From report at bugs.python.org Tue Aug 1 00:24:09 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Aug 2017 04:24:09 +0000 Subject: [issue31083] IDLE: document new TabPage(Frame) design for configdialog In-Reply-To: <1501451403.71.0.908658123964.issue31083@psf.upfronthosting.co.za> Message-ID: <1501561449.9.0.29884519107.issue31083@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 6f446bee4f6ac0c61bb2c3386a0149fd36855793 by Terry Jan Reedy (csabella) in branch 'master': bpo-31083: IDLE: Describe the Page classes in configdialog (#2965) https://github.com/python/cpython/commit/6f446bee4f6ac0c61bb2c3386a0149fd36855793 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 00:29:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Aug 2017 04:29:03 +0000 Subject: [issue31083] IDLE: document new TabPage(Frame) design for configdialog In-Reply-To: <1501451403.71.0.908658123964.issue31083@psf.upfronthosting.co.za> Message-ID: <1501561743.07.0.713833393021.issue31083@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3018 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 00:45:33 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Aug 2017 04:45:33 +0000 Subject: [issue31093] IDLE: Add tests for configdialog extensions tab Message-ID: <1501562733.48.0.832995547822.issue31093@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Add tests for configdialog extensions tab type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 00:59:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Aug 2017 04:59:48 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab Message-ID: <1501563588.57.0.756606299047.issue31001@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Pr2908 originally just sorted highlight methods together, but was extended to sort all methods together and relabeled for #31060. (This actually simplified the diff.) Pr2925, the 3.6 backport, appears on the replacement issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 01:00:37 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Aug 2017 05:00:37 +0000 Subject: [issue31083] IDLE: document new TabPage(Frame) design for configdialog In-Reply-To: <1501451403.71.0.908658123964.issue31083@psf.upfronthosting.co.za> Message-ID: <1501563637.4.0.283682290419.issue31083@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 48fcc72c83e1b47b200dd39f9dcc9f62fa0d4d17 by Terry Jan Reedy in branch '3.6': [3.6] bpo-31083: IDLE: Describe the Page classes in configdialog (GH-2965) (#2973) https://github.com/python/cpython/commit/48fcc72c83e1b47b200dd39f9dcc9f62fa0d4d17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 01:07:44 2017 From: report at bugs.python.org (Dmitry Vinokurov) Date: Tue, 01 Aug 2017 05:07:44 +0000 Subject: [issue31094] asyncio: get list of connected clients Message-ID: <1501564064.1.0.785973244818.issue31094@psf.upfronthosting.co.za> New submission from Dmitry Vinokurov: Hi! I'm using python-opcua and wonder if it is possible to get list of clients connected to running server? I've asked such question in python-opcua repo https://github.com/FreeOpcUa/python-opcua/issues/480 and developers redirected me here. Thanks in advance ---------- components: asyncio messages: 299598 nosy: Dmitry Vinokurov, yselivanov priority: normal severity: normal status: open title: asyncio: get list of connected clients type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 01:27:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Aug 2017 05:27:27 +0000 Subject: [issue31083] IDLE: document new TabPage(Frame) design for configdialog In-Reply-To: <1501451403.71.0.908658123964.issue31083@psf.upfronthosting.co.za> Message-ID: <1501565247.7.0.709630480221.issue31083@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The next blockers are the tests for the other 3 tabs: #31001, #31002, #31093. Steps for converting block of ConfigDialog methods for tab X into a class. Steps are updated from #31050. * In create_widgets, change 'self.create_page_/highlight/keys/extensions/' to '/High/Keys/Ext/Page(note)'. * In load_configs, comment-out load_X_cfgs. If there is no problem moving all these calls into the class inits, method will be deleted. * Copy the block for X into its appropriate position after class FontPage. * Comment out old code. * Before the copy, add 'class XPage(Frame):' and def __init__ as given in the outline. * In the 'create_page_x' method, at the top, Pass 'self' instead of 'parent' as tk Var masters; * delete 'frame = dialog.tabpages...'; * replace 'frame' with 'self' as master for widgets that used 'frame'; * delete 'return frame' at end. After tests pass with revision above, delete original block of methods. I have considered doing this before writing tests, but I don't quite feel comfortable doing so. To convert tests written first: * change 'XTest' to 'XPageTest' where 2nd X is abbreviated form. * change setUpClass similarly as in FontPageTest; * change test functions similarly as in FontPageTest; change 'dialog' to 'self.page' and 'd = dialog' to 'd = self.page'. * make other changes needed to keep tests passing, but there may not be any more changes needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 01:28:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Aug 2017 05:28:04 +0000 Subject: [issue31083] IDLE: document new TabPage(Frame) design for configdialog In-Reply-To: <1501451403.71.0.908658123964.issue31083@psf.upfronthosting.co.za> Message-ID: <1501565284.57.0.607267913365.issue31083@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 Tue Aug 1 01:49:49 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 01 Aug 2017 05:49:49 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC Message-ID: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> New submission from INADA Naoki: like GH-2966, most types with Py_TPFLAGS_HAVE_GC should call PyObject_GC_UnTrack() at top of the tp_dealloc. For example, I found lru_cache doesn't call it and I can produce segmentation fault. I'll check other types too. ---------- components: Extension Modules, Interpreter Core files: lru_cache_segv.py messages: 299600 nosy: inada.naoki priority: normal severity: normal status: open title: Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file47055/lru_cache_segv.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 01:51:58 2017 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 01 Aug 2017 05:51:58 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1501566718.83.0.963097752225.issue31095@psf.upfronthosting.co.za> Alexander Mohr added the comment: should the base method which calls tp_dealloc do this? Maybe can kill all birds with one stone. ---------- nosy: +thehesiod _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 02:01:15 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 01 Aug 2017 06:01:15 +0000 Subject: [issue31086] Add namedattrgetter function which acts like attrgetter but uses namedtuple In-Reply-To: <1501463947.14.0.101425417299.issue31086@psf.upfronthosting.co.za> Message-ID: <1501567275.1.0.291926906484.issue31086@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry Issac, but I'm going to decline this feature request. I know you're enthusiastic about this or some other variation but I don't think it is worthy of becoming part of the standard library. I do encourage you to post this somewhere as recipe (personally, I've used the ASPN cookbook to post my ideas) or as an offering on PyPI. Reasons: * The use cases are thin and likely to be uncommon. * The recipe is short and doesn't add much value. * The anonymous or autogenerated typename is unhelpful and the output doesn't look nice. * It is already possible to combine a namedtuple with field extraction using a simple lambda. * List comprehensions are clearer, easier, and more flexible for the task of extracting fields into a new named tuple. * The combination of an anonymous or autogenerated typename along with automatic field renaming will likely cause more problems than it is worth. * I don't expect this to mesh well with typing.NamedTuple and the needs of static typing tools * Debugging may become more challenging with implicitly created named tuples that have autogenerated type names. -- My experiments with the API ------------------------------ from collections import namedtuple from operator import attrgetter from pprint import pprint def namedattrgetter (attr, *attrs): ag = attrgetter (attr, *attrs) if attrs: nt = namedtuple ('_', (attr,) + attrs, rename=True) return lambda obj: nt._make (ag (obj)) else: return ag Person = namedtuple('Person', ['fname', 'lname', 'age', 'email']) FullName = namedtuple('FullName', ['lname', 'fname']) people = [ Person('tom', 'smith', 50, 'tsmith at example.com'), Person('sue', 'henry', 40, 'shenry at example.com'), Person('hank', 'jones', 30, 'hjones at example.com'), Person('meg', 'davis', 20, 'mdavis at example.com'), ] # Proposed way pprint(list(map(namedattrgetter('lname', 'fname'), people))) # Existing way with two-steps (attrgetter followed by nt._make) pprint(list(map(FullName._make, map(attrgetter(*FullName._fields), people)))) # Existing way using a lambda pprint(list(map(lambda p: FullName(p.lname, p.fname), people))) # Best way with a plain list comprehension pprint([FullName(p.lname, p.fname) for p in people]) ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 02:09:54 2017 From: report at bugs.python.org (Soujanya. Pasam) Date: Tue, 01 Aug 2017 06:09:54 +0000 Subject: [issue25698] The copy_reg module becomes unexpectedly empty in test_cpickle In-Reply-To: <1448218706.46.0.334921108763.issue25698@psf.upfronthosting.co.za> Message-ID: <1501567794.3.0.721893264657.issue25698@psf.upfronthosting.co.za> Soujanya. Pasam added the comment: I see test_cpickle failing with NPE while running the tests with IBM Java. Exception Stack Trace -------------------------------- _______________________________________ From report at bugs.python.org Tue Aug 1 02:26:03 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 01 Aug 2017 06:26:03 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1501568763.63.0.253927371032.issue31095@psf.upfronthosting.co.za> INADA Naoki added the comment: # collection module dequeiter_dealloc doesn't call Untrack(), but it's safe because it only frees deque and deque_dealloc calls Untrack() dequeiter_dealloc(dequeiterobject *dio) { Py_XDECREF(dio->deque); defdict_dealloc doesn't call Untrack(). And it can cause segfault: from collections import defaultdict import gc class Evil: def __del__(self): gc.collect() def __call__(self): return 42 def main(): d = defaultdict(Evil()) for i in range(1000): print(i) main() # _elementtree module elementiter_dealloc() calls UnTrack(), but it seems too late? static void elementiter_dealloc(ElementIterObject *it) { Py_ssize_t i = it->parent_stack_used; it->parent_stack_used = 0; while (i--) Py_XDECREF(it->parent_stack[i].parent); PyMem_Free(it->parent_stack); Py_XDECREF(it->sought_tag); Py_XDECREF(it->root_element); PyObject_GC_UnTrack(it); PyObject_GC_Del(it); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 02:30:08 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 01 Aug 2017 06:30:08 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1501569008.04.0.742872944508.issue31095@psf.upfronthosting.co.za> INADA Naoki added the comment: > dequeiter_dealloc doesn't call Untrack(), but it's safe because it only frees deque > and deque_dealloc calls Untrack() It may be not true, while I don't have exploit yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 02:34:09 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 01 Aug 2017 06:34:09 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1501569249.18.0.266018619842.issue31051@psf.upfronthosting.co.za> Louie Lu added the comment: This may relate to #31050, I would like to propose to change the name `GenTab` to `GeneralTab`. `GenTab` is ambiguous to `GenerateTab` in the first glimpse. How do you think, Terry and Cheryl ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 02:41:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Aug 2017 06:41:53 +0000 Subject: [issue29902] copy breaks staticmethod In-Reply-To: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za> Message-ID: <1501569713.8.0.883041878135.issue29902@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Benjamin for your review! But I have a design question. Is DeprecationWarning a correct warning type? DeprecationWarning is used when some feature less or more works in the current version, but will be removed in future releases. But pickling memoryview and staticmethod don't work and never worked correctly. A warning here is a sign that the code can not work as expected. Wouldn't RuntimeWarning be more appropriate warning type? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 02:57:57 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 01 Aug 2017 06:57:57 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1501570677.2.0.788743343232.issue31095@psf.upfronthosting.co.za> INADA Naoki added the comment: # _json module scanner_dealloc() encoder_dealloc() # _struct module unpackiter_dealloc # _ssl module context_dealloc() # Objects/ setiter_dealloc dictiter_dealloc dictview_dealloc # Parser/ ast_dealloc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 03:13:10 2017 From: report at bugs.python.org (paul j3) Date: Tue, 01 Aug 2017 07:13:10 +0000 Subject: [issue31012] suggestion: allow termination argument in argparse to be specified as argument In-Reply-To: <1500903609.87.0.148585957188.issue31012@psf.upfronthosting.co.za> Message-ID: <1501571590.3.0.367837354312.issue31012@psf.upfronthosting.co.za> paul j3 added the comment: argparse roughly follows POSIX practice: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap12.html Guideline 10: The first -- argument that is not an option-argument should be accepted as a delimiter indicating the end of options. Any following arguments should be treated as operands, even if they begin with the '-' character. I don't think this kind of thing is fixed, but there should be good reason to make an enhancement. For many users argparse is already too complicated, and the docs are hard to understand. Yet another parameter can get lost. There are some known problems with this '--', specially when there are more than one. It may also have problems when used with subparers, though I forget the details. It wouldn't hard to substitute a CONST variable for this '--', and wouldn't require changes to the API. Another possibility is to change this '--' to 'parser.prefix_chars[0]*2'. Documenting that would be more work than implementing it. And we'd have to add a unittest case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 03:27:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 01 Aug 2017 07:27:16 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1501572436.71.0.538727309511.issue31095@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 03:41:06 2017 From: report at bugs.python.org (Dmitry Malinovsky) Date: Tue, 01 Aug 2017 07:41:06 +0000 Subject: [issue31096] asyncio.stream.FlowControlMixin._drain_helper may lead to a blocking behavior Message-ID: <1501573266.21.0.530489547005.issue31096@psf.upfronthosting.co.za> New submission from Dmitry Malinovsky: When there is a huge amount of `writer.write` calls followed by `await writer.drain()` on a non-paused channel, and there are no other coroutine switches, `await writer.drain()` immediately returns without a switch. This is because `asyncio.stream.FlowControlMixin._drain_helper` do not `yield` or `yield from` on a non-paused stream. Use-case: AMQP basic.publish method, for which the broker (rabbitmq) do not send any replies back. Trying to publish 4k messages results in the following warnings (PYTHONASYNCIODEBUG env variable is set): `Executing () created at /Users/malinoff/Projects/ideas/amqproto/amqproto/channel.py:85> took 2.371 seconds` 2.371 seconds is the time spent on 4k `basic_publish` calls. You can find the test itself on github: https://github.com/malinoff/amqproto/blob/master/tests/stress/test_4k_msgs.py#L11-L12 An easy fix would be to replace return (https://github.com/python/cpython/blob/master/Lib/asyncio/streams.py#L206) with yield (and but the code below under the else clause; I'm willing to prepare a pull request), but maybe I'm missing something and such behavior is intentional? ---------- components: asyncio messages: 299610 nosy: Dmitry Malinovsky, yselivanov priority: normal severity: normal status: open title: asyncio.stream.FlowControlMixin._drain_helper may lead to a blocking behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 03:48:46 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Aug 2017 07:48:46 +0000 Subject: [issue31084] QueueHandler not formatting messages In-Reply-To: <1501451530.82.0.0352443251136.issue31084@psf.upfronthosting.co.za> Message-ID: <1501573726.78.0.272918812529.issue31084@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 04:16:13 2017 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 01 Aug 2017 08:16:13 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1501575373.23.0.100429528457.issue31095@psf.upfronthosting.co.za> Alexander Mohr added the comment: I suggest any places that don't need the calls should have comments so that future reviewers know why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 04:21:18 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 01 Aug 2017 08:21:18 +0000 Subject: [issue14243] tempfile.NamedTemporaryFile not particularly useful on Windows In-Reply-To: <1331345648.86.0.0206250913108.issue14243@psf.upfronthosting.co.za> Message-ID: <1501575678.94.0.340081899791.issue14243@psf.upfronthosting.co.za> Changes by Nathaniel Smith : ---------- nosy: +njs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 04:36:35 2017 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 01 Aug 2017 08:36:35 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1501576595.5.0.440332621928.issue31095@psf.upfronthosting.co.za> Alexander Mohr added the comment: actually another idea: could the PR for this also update https://docs.python.org/2/c-api/typeobj.html#c.PyTypeObject.tp_dealloc to mention about these macros and when they should be used? That, along with all the other locations correctly calling these macros, and having comments when they're not needed hopefully should prevent this from happening again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 04:52:02 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 01 Aug 2017 08:52:02 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1501577522.51.0.304072311738.issue31095@psf.upfronthosting.co.za> INADA Naoki added the comment: > should the base method which calls tp_dealloc do this? Maybe can kill all birds with one stone. It may be possible, but unclear. Object finalization process is very complicated. I agree that UnTrack object as soon as refcnt=0, and Track only when resurrected seems clearer. But changing such basic object system needs carefully designed by expert. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 04:59:48 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 01 Aug 2017 08:59:48 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1501577988.49.0.187967801327.issue31095@psf.upfronthosting.co.za> INADA Naoki added the comment: Docs/extending/newtypes.rst and Docs/include/noddy3.c should be updated too. But I'm not good English writer. I need help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 05:18:10 2017 From: report at bugs.python.org (Alexander Mohr) Date: Tue, 01 Aug 2017 09:18:10 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1501579090.08.0.00573742838633.issue31095@psf.upfronthosting.co.za> Alexander Mohr added the comment: omg I just realized I need the default dict one too, great investigation work! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 05:29:36 2017 From: report at bugs.python.org (Robert) Date: Tue, 01 Aug 2017 09:29:36 +0000 Subject: [issue31089] email.utils.parseaddr fails on odd double quotes in multiline header In-Reply-To: <1501512198.85.0.996248445964.issue31089@psf.upfronthosting.co.za> Message-ID: <1501579776.31.0.523441406707.issue31089@psf.upfronthosting.co.za> Robert added the comment: RFC regarding this topic looks quite complicated to me, but I know that \r\n is used for line breaking in e-mail headers and \n is not. So in my opinion it shouldn't be treated the same like \n. The \r\n should be removed in parsed text, but \n should be preserved like any other character. So I don't think "universal newline mode" is correct approach to read raw e-mails. I have tested policies in python3 - you have right - it works. But I cannot use it because of application incompatibility with python3. I was hoping it will be easy to fix for some more experienced than me... If not - you can close issue and I will stay with present solution (removing \r\n). Thanks for all your help! ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 05:52:31 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 01 Aug 2017 09:52:31 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1501581151.01.0.0903927320496.issue31095@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +3019 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 09:23:06 2017 From: report at bugs.python.org (LB) Date: Tue, 01 Aug 2017 13:23:06 +0000 Subject: [issue31097] itertools.islice not accepting np.int64 Message-ID: <1501593786.72.0.0101517996884.issue31097@psf.upfronthosting.co.za> New submission from LB: The error arises when this code is used: itertools.islice( [3, 4, 5], np.int64(2) ) but not with this itertools.islice([3,4,5], 2) ---------- components: Library (Lib) messages: 299617 nosy: braaannigan priority: normal severity: normal status: open title: itertools.islice not accepting np.int64 type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 10:14:53 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 01 Aug 2017 14:14:53 +0000 Subject: [issue31097] itertools.islice not accepting np.int64 In-Reply-To: <1501593786.72.0.0101517996884.issue31097@psf.upfronthosting.co.za> Message-ID: <1501596893.62.0.56915998052.issue31097@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See http://bugs.python.org/issue30537 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 11:02:43 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Aug 2017 15:02:43 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501599763.06.0.896848071604.issue31085@psf.upfronthosting.co.za> R. David Murray added the comment: I think the "vaguely" pretty much says it, and you are the at least the first person who has *requested* it :) This is one of those cost-versus-benefit calculations. It is a specialized use case, and in other specialized use cases the "automatically generated" name that makes the most sense is likely to be something different than an amalgamation of the field names. So I vote -0.5. I don't think even the small complication of the existing code is worth it, but I'm not strongly opposed. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 11:07:18 2017 From: report at bugs.python.org (LB) Date: Tue, 01 Aug 2017 15:07:18 +0000 Subject: [issue31097] itertools.islice not accepting np.int64 In-Reply-To: <1501593786.72.0.0101517996884.issue31097@psf.upfronthosting.co.za> Message-ID: <1501600038.75.0.406151818217.issue31097@psf.upfronthosting.co.za> LB added the comment: Thanks Ray. The use case is here: https://stackoverflow.com/questions/45356718/saving-matplotlib-animation-leads-to-error/45438057#45438057 I'm going to suggest a workaround in matplotlib for the moment. Changing type in this use case shouldn't be a big issue, it only happens once for each animation created. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 11:34:23 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Aug 2017 15:34:23 +0000 Subject: [issue31089] email.utils.parseaddr fails on odd double quotes in multiline header In-Reply-To: <1501512198.85.0.996248445964.issue31089@psf.upfronthosting.co.za> Message-ID: <1501601663.67.0.806344447371.issue31089@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, that is mostly likely why parseaddr operates the way it does. The old email package does not do very much hand-holding, it expects you to understand the RFCs, which as you note is a rather daunting task. The new email package (the new policies) in python3 aim to incorporate as much understanding of the RFCs into the library as possible and "do the right thing" automatically so you don't have to worry about it (it can't hide 100%, though...). As for universal new line mode, you are correct that technically \n by itself is data per the RFC (and illegal in the middle of a quoted string like that), but the way Python handles "text" is to convert \r\n into \n internally. So while parseaddr is doing the "right thing" per the RFC, the input parsing parts of the email package in fact accept \n or even mixed line endings to accommodate the difference between unix/python line endings and RFC line endings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 13:03:47 2017 From: report at bugs.python.org (Yaron de Leeuw) Date: Tue, 01 Aug 2017 17:03:47 +0000 Subject: [issue26253] tarfile in stream mode always set zlib compression level to 9 In-Reply-To: <1454288123.43.0.462874591937.issue26253@psf.upfronthosting.co.za> Message-ID: <1501607027.35.0.611945732408.issue26253@psf.upfronthosting.co.za> Yaron de Leeuw added the comment: I have submitted a PR on GitHub https://github.com/python/cpython/pull/2962 ---------- nosy: +jarondl versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 13:39:14 2017 From: report at bugs.python.org (Isaac Morland) Date: Tue, 01 Aug 2017 17:39:14 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501599763.06.0.896848071604.issue31085@psf.upfronthosting.co.za> Message-ID: Isaac Morland added the comment: First, another note I would like to point out: this is much nicer to write within namedtuple than as a wrapper function because it is trivial to use the existing rename logic when needed, as seen in the diff I provided. I suppose I could write a wrapper which calls namedtuple and then changes the class name after creation but that just feels icky. The only other alternatives would be to duplicate the rename logic or have the wrapper not work with rename. By way of response to R. David Murray: Every use case, of everything, is specialized. Another way of thinking of what I'm suggesting is that I would like to make providing a typename optional, and have the library do its best based on the other information provided in the call to namedtuple. This pretty well has to mean mashing the fieldnames together in some way because no other information about the contents of the namedtuple is provided. So I think this is a very natural feature: what else could it possibly mean to pass None for the typename? If for a particular application some other more meaningful auto-generated name is needed, that could still be provided to namedtuple(). For example, an ORM that uses the underlying table name. In response to other suggestions, I don't see how one can prefer "_" all over the place in debugging output to a string that identifies the fieldnames involved. Or really, just the option of having a string that identifies the fieldnames: I'm not forcing anyone to stop passing '_'. To INADA Naoki: thanks for pointing that out. I agree that in the subclass case it no longer matters what typename is used for the namedtuple itself. But isn't that a good reason to allow skipping the parameter, or (since you can't just skip positional parameters) passing an explicit None? On 1 August 2017 at 11:02, R. David Murray wrote: > > R. David Murray added the comment: > > I think the "vaguely" pretty much says it, and you are the at least the > first person who has *requested* it :) > > This is one of those cost-versus-benefit calculations. It is a > specialized use case, and in other specialized use cases the "automatically > generated" name that makes the most sense is likely to be something > different than an amalgamation of the field names. > > So I vote -0.5. I don't think even the small complication of the existing > code is worth it, but I'm not strongly opposed. > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 13:48:14 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 01 Aug 2017 17:48:14 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab Message-ID: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> New submission from Cheryl Sabella: I'm working on the tests for this. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 13:55:57 2017 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 01 Aug 2017 17:55:57 +0000 Subject: [issue31097] itertools.islice not accepting np.int64 In-Reply-To: <1501593786.72.0.0101517996884.issue31097@psf.upfronthosting.co.za> Message-ID: <1501610157.25.0.972454458165.issue31097@psf.upfronthosting.co.za> Mark Dickinson added the comment: That actually looks as though it may be worth a bug report to the matplotlib folks. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 14:12:29 2017 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 01 Aug 2017 18:12:29 +0000 Subject: [issue31084] QueueHandler not formatting messages In-Reply-To: <1501451530.82.0.0352443251136.issue31084@psf.upfronthosting.co.za> Message-ID: <1501611149.45.0.927909878317.issue31084@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset adfe3440f65dfd6cf4463db6cd02cdc78e77ce17 by Vinay Sajip (favll) in branch 'master': bpo-31084: QueueHandler now formats messages correctly. (GH-2954) https://github.com/python/cpython/commit/adfe3440f65dfd6cf4463db6cd02cdc78e77ce17 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 14:18:30 2017 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 01 Aug 2017 18:18:30 +0000 Subject: [issue31084] QueueHandler not formatting messages In-Reply-To: <1501451530.82.0.0352443251136.issue31084@psf.upfronthosting.co.za> Message-ID: <1501611510.59.0.888326811644.issue31084@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 14:32:16 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Aug 2017 18:32:16 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501612336.23.0.855224863061.issue31085@psf.upfronthosting.co.za> R. David Murray added the comment: The specialized use case is wanting to autogenerate a name with no other information provided. You suggested csv as one example where this would be used, but even in that case I'd rather see something based on the filename than a mashup of field names. I would also personally rather see '_' than a long string of field names (it would make the debug output prettier because the lines would be shorter). In contrast, being able to specify a name satisfies a wide variety of use cases, including that of autogenerating names with no other information provided. Which is why that is included in the API. I hear you about the rename logic. But for myself, since I don't like the idea of the name being a mashup of the field names, it isn't convincing :) I wrote a "parameterized tests" extension for unittest, and it has the option of autogenerating the test name from the parameter names and values. I've never used that feature, and I am considering ripping it out before I release the package, to simplify the code. If I do I might replace it with a hook for generating the test name so that the user can choose their own auto-naming scheme. Perhaps that would be an option here: a hook for generating the name, that would be called where you want your None processing to be? That would not be simpler than your proposal, but it would be more general (satisfy more use cases) and might be worth the cost. On the other hand, other developers might not like the API bloat ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 14:55:01 2017 From: report at bugs.python.org (LB) Date: Tue, 01 Aug 2017 18:55:01 +0000 Subject: [issue31097] itertools.islice not accepting np.int64 In-Reply-To: <1501593786.72.0.0101517996884.issue31097@psf.upfronthosting.co.za> Message-ID: <1501613701.39.0.376296891817.issue31097@psf.upfronthosting.co.za> LB added the comment: Hi Mark - I've done that here: https://github.com/matplotlib/matplotlib/issues/8973 Liam ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 14:56:27 2017 From: report at bugs.python.org (=?utf-8?q?Josef_Kemetm=C3=BCller?=) Date: Tue, 01 Aug 2017 18:56:27 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1501613787.05.0.366051073464.issue1222585@psf.upfronthosting.co.za> Changes by Josef Kemetm?ller : Removed file: http://bugs.python.org/file47045/GARBAGE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 14:57:38 2017 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 01 Aug 2017 18:57:38 +0000 Subject: [issue31098] test target of Makefile always run tests in parallel mode Message-ID: <1501613858.46.0.0685506045585.issue31098@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis: In CPython >=3.3, "test" target of Makefile calls Tools/scripts/run_tests.py script. This script contains: def is_multiprocess_flag(arg): return arg.startswith('-j') or arg.startswith('--multiprocess') ... def main(regrtest_args): ... if threading and not any(is_multiprocess_flag(arg) for arg in regrtest_args): args.extend(['-j', '0']) # Use all CPU cores In order to run tests sequentially, in CPython 3.5 and older branches, it is possible to set EXTRATESTOPTS with -j1: make test EXTRATESTOPTS="-j1" In CPython >=3.6, this workaround no longer works, because this code (Lib/test/regrtest.py in 3.5): if ns.use_mp is not None: if ns.use_mp <= 0: # Use all cores + extras for tests that like to sleep ns.use_mp = 2 + (os.cpu_count() or 1) if ns.use_mp == 1: ns.use_mp = None Was changed into (Lib/test/libregrtest/cmdline.py in 3.6 and 3.7): if ns.use_mp is not None: if ns.use_mp <= 0: # Use all cores + extras for tests that like to sleep ns.use_mp = 2 + (os.cpu_count() or 1) Currently the only remaining ways to run tests sequentially are to locally edit Tools/scripts/run_tests.py or to not use "test" target of Makefile and to run Lib/test/regrtest.py directly with appropriate options. ---------- assignee: haypo components: Tests messages: 299629 nosy: Arfrever, haypo priority: normal severity: normal status: open title: test target of Makefile always run tests in parallel mode versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 14:59:51 2017 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 01 Aug 2017 18:59:51 +0000 Subject: [issue31088] regrtest.py: "${test_file_name} skipped" message printed twice for each ${test_file_name} In-Reply-To: <1501505990.76.0.255583071807.issue31088@psf.upfronthosting.co.za> Message-ID: <1501613991.01.0.554655584004.issue31088@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: This bug in output actually occurs in sequential mode. Apparently problem can be reproduced in 3.*, but only if Tools/scripts/run_tests.py is changed to run tests sequentially. (That problem reported as issue 31098.) Example from 3.7: 0:00:42 load avg: 1.89 [ 11/405] test_cprofile 0:00:42 load avg: 1.89 [ 12/405] test_winsound test_winsound skipped -- Use of the 'audio' resource not enabled 0:00:43 load avg: 1.89 [ 13/405] test_pickletools -- test_winsound skipped (resource denied) 0:00:46 load avg: 1.82 [ 14/405] test_select 0:00:58 load avg: 1.54 [ 15/405] test_bisect ---------- versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 15:01:33 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Aug 2017 19:01:33 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1501614093.41.0.835517709747.issue31051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Given that I picked the page names without discussion, as part of quickly writing and merging the switch to Notebook (PR (to unblock the FontPage and GenPage conversion), I considered them subject to possible revision. I expect to review both the internal names and the tab labels *after* adding options from the 'extensions'. I have considered calling the class MainPage, as it governs the options in config-main other than the font, highlight, and keys choices. (As noted before, the tab space setting would fit better on this page.) Given that you have seen and used the dialog and its five tabs, is 'genpage' in the sequence 'fontpage, highpage, keyspage, genpage, extpage', which occurs 3 times in create_widgets(), really ambiguous to *you*? Or do you just not like it? Would you prefer MainPage? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 15:07:08 2017 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 01 Aug 2017 19:07:08 +0000 Subject: [issue31080] Allow `logging.config.fileConfig` to accept kwargs In-Reply-To: <1501434610.41.0.267137622883.issue31080@psf.upfronthosting.co.za> Message-ID: <1501614428.81.0.709603097225.issue31080@psf.upfronthosting.co.za> Vinay Sajip added the comment: Yes, seems reasonable, but don't change Misc/NEWS directly in your patch - this is now done using the "blurb" tool. Installed into a Python 3 environment using "pip install blurb". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 16:13:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 01 Aug 2017 20:13:32 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab In-Reply-To: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> Message-ID: <1501618412.94.0.752476840137.issue31002@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Great. It is non-trivial, so I don't expect perfection first try. Please revise docstring with explanation of how page works, like with Font and General pages. I finished tests using those explanations as a guide. They are also a guide for review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 16:50:29 2017 From: report at bugs.python.org (Randy Henderson) Date: Tue, 01 Aug 2017 20:50:29 +0000 Subject: [issue31099] Timer error pop from empty deque/list Message-ID: <1501620629.5.0.924905930294.issue31099@psf.upfronthosting.co.za> New submission from Randy Henderson: Even when a deque is populated in the Timer setup parameter, the interpreter gives "IndexError: pop from an empty deque". IndexError is generated for lists as well. >>> Timer(stmt='d.popleft()',setup='d=deque([1,2,3])',globals=globals()).timeit() Traceback (most recent call last): File "", line 1, in Timer(stmt='d.popleft()',setup='d=deque([1,2,3])',globals=globals()).timeit() File "C:\Program Files\Python\Python36\lib\timeit.py", line 178, in timeit timing = self.inner(it, self.timer) File "", line 6, in inner IndexError: pop from an empty deque ---------- components: Library (Lib) messages: 299634 nosy: Randy Henderson priority: normal severity: normal status: open title: Timer error pop from empty deque/list versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 16:55:19 2017 From: report at bugs.python.org (Julien Palard) Date: Tue, 01 Aug 2017 20:55:19 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1501620919.17.0.925941602332.issue31036@psf.upfronthosting.co.za> Julien Palard added the comment: Still unfixed on docs.iad1.psf.io, the venv I modified is only used for sphinx and uses Python 2. If we can easily upgrade it to Python 3 we'll be able to pass it as the PYTHON parameter for make in docsbuild-script, allowing blurb to be found. see: https://github.com/python/psf-salt/issues/109 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 16:58:34 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Aug 2017 20:58:34 +0000 Subject: [issue31099] Timer error pop from empty deque/list In-Reply-To: <1501620629.5.0.924905930294.issue31099@psf.upfronthosting.co.za> Message-ID: <1501621114.89.0.751336045895.issue31099@psf.upfronthosting.co.za> R. David Murray added the comment: Perhaps I'm missing something, but isn't this to be expected? Timer will run d.popleft() repeatedly until you get the error you see because the list is empty. Are you thinking that setup is run each time? That would defeat its purpose. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 17:25:45 2017 From: report at bugs.python.org (Andrew Pinkham) Date: Tue, 01 Aug 2017 21:25:45 +0000 Subject: [issue31073] Change metadata handling in check command In-Reply-To: <1501275107.85.0.857178760457.issue31073@psf.upfronthosting.co.za> Message-ID: <1501622745.32.0.826353673871.issue31073@psf.upfronthosting.co.za> Andrew Pinkham added the comment: Judging from ?ric's reaction on Github, I suspect there may be some reticence to changing this code. I've sub-classed the check command in the project I'm working on to demonstrate what I would like the new behavior to be. https://github.com/jambonsw/django-improved-user/blob/4b699814f68cefe6cf7a63f43f619ee21376cb01/setup.py#L34 If that looks interesting and people are open to changes along those lines, I'm happy to discuss, take feedback, and open a PR. Alternatively, I'm happy to see about overriding the check command in pypa/setuptools instead of modifying distutils. If neither of these are of interest, feel free to close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 17:36:24 2017 From: report at bugs.python.org (Ofek Lev) Date: Tue, 01 Aug 2017 21:36:24 +0000 Subject: [issue20849] add exist_ok to shutil.copytree In-Reply-To: <1393908922.06.0.91052425832.issue20849@psf.upfronthosting.co.za> Message-ID: <1501623384.15.0.529065253864.issue20849@psf.upfronthosting.co.za> Changes by Ofek Lev : ---------- pull_requests: +3020 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 18:21:55 2017 From: report at bugs.python.org (Randy Henderson) Date: Tue, 01 Aug 2017 22:21:55 +0000 Subject: [issue31099] Timer error pop from empty deque/list In-Reply-To: <1501621114.89.0.751336045895.issue31099@psf.upfronthosting.co.za> Message-ID: Randy Henderson added the comment: You're right. I was expecting the code in stmt to be run only once, but I just discovered in the documentation that the default is for it to be run one million times. I provided the argument 'number=1' to the timeit() method and am now getting the behavior I expected. I'll remove/close the bug entry. Sorry -- newbie! On Tue, Aug 1, 2017 at 1:58 PM, R. David Murray wrote: > > R. David Murray added the comment: > > Perhaps I'm missing something, but isn't this to be expected? Timer will > run d.popleft() repeatedly until you get the error you see because the list > is empty. Are you thinking that setup is run each time? That would defeat > its purpose. > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 18:25:49 2017 From: report at bugs.python.org (Randy Henderson) Date: Tue, 01 Aug 2017 22:25:49 +0000 Subject: [issue31099] Timer error pop from empty deque/list In-Reply-To: <1501620629.5.0.924905930294.issue31099@psf.upfronthosting.co.za> Message-ID: <1501626349.07.0.478961995092.issue31099@psf.upfronthosting.co.za> Changes by Randy Henderson : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 18:35:50 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 01 Aug 2017 22:35:50 +0000 Subject: [issue30897] Add a is_mount() to pathlib In-Reply-To: <1499740510.8.0.375940091685.issue30897@psf.upfronthosting.co.za> Message-ID: <1501626950.03.0.60561482203.issue30897@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset 173ff4a58a6b337fe8a0eb44f211f33f278d3d5f by ?ukasz Langa (Cooper Lees) in branch 'master': bpo-30897: Add is_mount() to pathlib.Path (#2669) https://github.com/python/cpython/commit/173ff4a58a6b337fe8a0eb44f211f33f278d3d5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 18:52:11 2017 From: report at bugs.python.org (Cooper Lees) Date: Tue, 01 Aug 2017 22:52:11 +0000 Subject: [issue30897] Add a is_mount() to pathlib In-Reply-To: <1499740510.8.0.375940091685.issue30897@psf.upfronthosting.co.za> Message-ID: <1501627931.49.0.963651010965.issue30897@psf.upfronthosting.co.za> Changes by Cooper Lees : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 19:32:10 2017 From: report at bugs.python.org (Preston Landers) Date: Tue, 01 Aug 2017 23:32:10 +0000 Subject: [issue31080] Allow `logging.config.fileConfig` to accept kwargs In-Reply-To: <1501434610.41.0.267137622883.issue31080@psf.upfronthosting.co.za> Message-ID: <1501630330.37.0.748407913719.issue31080@psf.upfronthosting.co.za> Changes by Preston Landers : ---------- pull_requests: +3021 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 19:40:25 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 01 Aug 2017 23:40:25 +0000 Subject: [issue30897] Add a is_mount() to pathlib In-Reply-To: <1499740510.8.0.375940091685.issue30897@psf.upfronthosting.co.za> Message-ID: <1501630825.16.0.196748564941.issue30897@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- pull_requests: +3022 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 21:07:09 2017 From: report at bugs.python.org (Kenneth Griffin) Date: Wed, 02 Aug 2017 01:07:09 +0000 Subject: [issue31100] unable to open python Message-ID: <1501636029.03.0.741480027722.issue31100@psf.upfronthosting.co.za> New submission from Kenneth Griffin: tried installing multiple versions of 3.6 on windows. the installation works. However, when trying to put python --version in the command line of powershell, i get a pop up that says python has stopped working. ---------- components: Installation messages: 299640 nosy: Kenneth Griffin priority: normal severity: normal status: open title: unable to open python type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 21:51:16 2017 From: report at bugs.python.org (Yuan Chao Chou) Date: Wed, 02 Aug 2017 01:51:16 +0000 Subject: [issue30841] Fix a variable shadowing warning in Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1501638676.12.0.83005788406.issue30841@psf.upfronthosting.co.za> Changes by Yuan Chao Chou : ---------- title: A shadowing variable naming emitted for Python-ast.c -> Fix a variable shadowing warning in Python-ast.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 1 23:41:35 2017 From: report at bugs.python.org (brobby crobby) Date: Wed, 02 Aug 2017 03:41:35 +0000 Subject: [issue31100] unable to open python In-Reply-To: <1501636029.03.0.741480027722.issue31100@psf.upfronthosting.co.za> Message-ID: <1501645295.75.0.732359421121.issue31100@psf.upfronthosting.co.za> brobby crobby added the comment: i get this message while using git bash $ python C:/Users/simrash2000/AppData/Local/Programs/Python/Python36/python.exe: error while loading shared libraries: api-ms-win-crt-heap-l1-1-0.dll: cannot open shared object file: No such file or directory ---------- nosy: +brobby crobby _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 01:00:57 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 02 Aug 2017 05:00:57 +0000 Subject: [issue29902] copy breaks staticmethod In-Reply-To: <1501569713.8.0.883041878135.issue29902@psf.upfronthosting.co.za> Message-ID: <1501650054.2571077.1060390112.43C7C07D@webmail.messagingengine.com> Benjamin Peterson added the comment: I don't think it's too important, though most py3k warnings have been DeprecationWarning. You can think of it as deprecating a misfeature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 01:12:44 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Aug 2017 05:12:44 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501650764.57.0.216651395125.issue31085@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [R David Murray] > So I vote -0.5. Put me down for a full -1: * This would be a potentially confusing addition to the API. * It may also encourage bad practices that we don't want to see in real code. * We want to be able to search for the namedtuple definition, want to have a meaningful repr, and want pickling to be easy. * This doesn't have to be shoe-horned into the namedtuple API. If an actual need did arise, it is trivial to write a wrapper that specifies whatever auto-naming logic happens to make sense for a particular application: >>> from collections import namedtuple >>> def auto_namedtuple(*attrnames, **kwargs): typename = '_'.join(attrnames) return namedtuple(typename, attrnames, **kwargs) >>> NT = auto_namedtuple('name', 'rank', 'serial') >>> print(NT.__doc__) name_rank_serial(name, rank, serial) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 02:31:09 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 02 Aug 2017 06:31:09 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501655469.54.0.845141941378.issue31061@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset de34cbe9cdaaf7b85fed86f99c2fd071e1a7b1d2 by INADA Naoki (Alexander Mohr) in branch 'master': bpo-31061: fix crash in asyncio speedup module (GH-2966) https://github.com/python/cpython/commit/de34cbe9cdaaf7b85fed86f99c2fd071e1a7b1d2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 03:11:43 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 02 Aug 2017 07:11:43 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501657903.79.0.236545314556.issue31061@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +3023 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 03:25:45 2017 From: report at bugs.python.org (Re-ax) Date: Wed, 02 Aug 2017 07:25:45 +0000 Subject: [issue31101] os.remove() auto add \ in Windows2012R2 Message-ID: <1501658745.81.0.821961109576.issue31101@psf.upfronthosting.co.za> New submission from Re-ax: I need to remove a file in python at Windows2012R2, but, os.remove()auto add \ in each seq. code: #coding=utf-8 import os dir_path='d:\c\d\e\t\c\t.xf' os.remove(dir_path) result: Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> Traceback (most recent call last): File "D:\test\script\test.py", line 4, in os.remove(dir_path) WindowsError: [Error 3] The system cannot find the path specified: 'd:\\c\\d\\e\t\\c\t.xf' >>> ---------- components: Windows messages: 299645 nosy: 007hengxyx, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os.remove() auto add \ in Windows2012R2 type: resource usage versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 03:42:15 2017 From: report at bugs.python.org (Paul Moore) Date: Wed, 02 Aug 2017 07:42:15 +0000 Subject: [issue31101] os.remove() auto add \ in Windows2012R2 In-Reply-To: <1501658745.81.0.821961109576.issue31101@psf.upfronthosting.co.za> Message-ID: <1501659735.3.0.676026146837.issue31101@psf.upfronthosting.co.za> Paul Moore added the comment: There are two problems with your code and bug report: 1. By using a single quoted string, some of the backslashes in the path are being interpreted as starting a special character (specifically \t is interpreted as a tab character). You should either double the backslashes to prevent this interpretation (dir_path='d:\\c\\d\\e\\t\\c\\t.xf'), use forward slashes (dir_path='d:/c/d/e/t/c/t.xf') or use a raw string (dir_path=r'd:\c\d\e\t\c\t.xf'). 2. You're reporting that Python "auto adds \". It doesn't, it's just that the repr of the string shows a single quoted string with backslashes doubled - that's the standard repr for strings. So, Python is behaving as expected, and there's no bug here. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 03:50:43 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 02 Aug 2017 07:50:43 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501660243.87.0.957698399686.issue31061@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset f142e85d22ba135d5205280240f3a2fe1df2649f by INADA Naoki in branch '3.6': bpo-31061: fix crash in asyncio speedup module (GH-2984) https://github.com/python/cpython/commit/f142e85d22ba135d5205280240f3a2fe1df2649f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 04:33:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Aug 2017 08:33:36 +0000 Subject: [issue29902] copy breaks staticmethod In-Reply-To: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za> Message-ID: <1501662816.31.0.914732257703.issue29902@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 3dd1ccbb0950b2b83713a495958c35d60b453fa9 by Serhiy Storchaka in branch '2.7': bpo-29902: Emit a Py3k deprecation warning when pickling or copying (#2823) https://github.com/python/cpython/commit/3dd1ccbb0950b2b83713a495958c35d60b453fa9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 04:34:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Aug 2017 08:34:21 +0000 Subject: [issue29902] copy breaks staticmethod In-Reply-To: <1490447804.79.0.661284691694.issue29902@psf.upfronthosting.co.za> Message-ID: <1501662861.03.0.507565881751.issue29902@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Benjamin. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 05:51:51 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Wed, 02 Aug 2017 09:51:51 +0000 Subject: [issue31102] deheader: double #incude of the same file Message-ID: <1501667511.46.0.397475744495.issue31102@psf.upfronthosting.co.za> New submission from ????? ????????: For cpython 3.6 deheader (http://www.catb.org/esr/deheader/) reports: Mac/Tools/pythonw.c has more than one inclusion of Modules/_sre.c has more than one inclusion of "sre_lib.h" Modules/_testcapimodule.c has more than one inclusion of "testcapi_long.h" Modules/_threadmodule.c has more than one inclusion of "structmember.h" Modules/expat/xmltok.c has more than one inclusion of "asciitab.h" Modules/expat/xmltok.c has more than one inclusion of "latin1tab.h" Modules/expat/xmltok.c has more than one inclusion of "utf8tab.h" Modules/faulthandler.c has more than one inclusion of Objects/unicodeobject.c has more than one inclusion of "stringlib/codecs.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/undef.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/fastsearch.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/split.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/ucs2lib.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/ucs1lib.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/partition.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/find_max_char.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/ucs4lib.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/asciilib.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/find.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/replace.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/localeutil.h" Objects/unicodeobject.c has more than one inclusion of "stringlib/count.h" ---------- components: Build messages: 299650 nosy: dilyan.palauzov priority: normal severity: normal status: open title: deheader: double #incude of the same file type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 06:04:48 2017 From: report at bugs.python.org (Markus Kramer) Date: Wed, 02 Aug 2017 10:04:48 +0000 Subject: [issue31103] Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 Message-ID: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> New submission from Markus Kramer: Each Windows installation has a ?product version?. The Windows installer python-3.6.2.exe has product version "3.6.2150.0" (accessible with context menu / Properties / Details). This causes at least 2 problems: - Automated software inventory relies on product version and therefore does not detect version 3.6.2 - Microsoft installation guidelines require the first three fields to be smaller than 256. Proposed alternatives for the value of product version: - "3.6.2.0" to indicate the final release build. - "3.6.2.150" to indicate the build number. The build number may be higher than 256, but this is unusual for a final release. Side note: This is a sub-problem of http://bugs.python.org/issue31077 ---------- components: Windows messages: 299651 nosy: Damon Atkins, Markus Kramer, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 06:11:17 2017 From: report at bugs.python.org (Markus Kramer) Date: Wed, 02 Aug 2017 10:11:17 +0000 Subject: [issue31103] Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 In-Reply-To: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> Message-ID: <1501668677.29.0.80204107525.issue31103@psf.upfronthosting.co.za> Markus Kramer added the comment: Screenshot of Product Version 3.6.2150.0 ---------- Added file: http://bugs.python.org/file47056/3.6.2.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 07:14:07 2017 From: report at bugs.python.org (Govind S Menokee) Date: Wed, 02 Aug 2017 11:14:07 +0000 Subject: [issue31104] posixpath.normpath truncating forward slashes from URL Message-ID: <1501672447.79.0.933201717254.issue31104@psf.upfronthosting.co.za> Changes by Govind S Menokee : ---------- components: Library (Lib) nosy: govindsmenokee priority: normal severity: normal status: open title: posixpath.normpath truncating forward slashes from URL type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 07:15:14 2017 From: report at bugs.python.org (Govind S Menokee) Date: Wed, 02 Aug 2017 11:15:14 +0000 Subject: [issue31104] posixpath.normpath truncating forward slashes from URL Message-ID: <1501672514.41.0.656733898718.issue31104@psf.upfronthosting.co.za> New submission from Govind S Menokee: Handle unwanted truncation of forward slash in case of URL input for normpath function. For Example - path = 'https://google.com' The current output of normpath function would be - 'https:/google.com' After changes the output would be - 'https://google.com' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 07:17:16 2017 From: report at bugs.python.org (Govind S Menokee) Date: Wed, 02 Aug 2017 11:17:16 +0000 Subject: [issue31104] posixpath.normpath truncating forward slashes from URL In-Reply-To: <1501672514.41.0.656733898718.issue31104@psf.upfronthosting.co.za> Message-ID: <1501672636.77.0.185223068698.issue31104@psf.upfronthosting.co.za> Changes by Govind S Menokee : ---------- pull_requests: +3024 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 07:38:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Aug 2017 11:38:18 +0000 Subject: [issue31104] posixpath.normpath truncating forward slashes from URL In-Reply-To: <1501672514.41.0.656733898718.issue31104@psf.upfronthosting.co.za> Message-ID: <1501673898.19.0.28189297775.issue31104@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is the string 'https://google.com' an URL or a path? If it is a path, posixpath.normpath() correctly collapses duplicated slashes. If it is an URL, using posixpath.normpath() is not correct. ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 07:47:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Aug 2017 11:47:50 +0000 Subject: [issue31102] deheader: double #incude of the same file In-Reply-To: <1501667511.46.0.397475744495.issue31102@psf.upfronthosting.co.za> Message-ID: <1501674470.04.0.650050543894.issue31102@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: "sre_lib.h" and "stringlib/*.h" are included multiple times for purpose. They are template files and different inclusions instantiate implementations for specific kind of Unicode strings. "testcapi_long.h" also is a template file. Modules/expat/xmltok.c is imported file. And it include some header files multiple times for purpose. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 08:22:29 2017 From: report at bugs.python.org (Armin Rigo) Date: Wed, 02 Aug 2017 12:22:29 +0000 Subject: [issue31105] Cyclic GC threshold may need tweaks Message-ID: <1501676549.78.0.999656095107.issue31105@psf.upfronthosting.co.za> New submission from Armin Rigo: The cyclic GC uses a simple and somewhat naive policy to know when it must run. It is based on counting "+1" for every call to _PyObject_GC_Alloc(). Explicit calls to PyObject_GC_Del() are counted as "-1". The cyclic GC will only be executed after the count reaches 700. There is then a scheme with multiple generations, but the point is that nothing is done at all before _PyObject_GC_Alloc() has been called 700 times. The problem is that each of these _PyObject_GC_Alloc() can be directly or indirectly responsible for a large quantity of memory. Take this example: while True: l = [None] * 10000000 # 80 MB, on 64-bit l[-1] = l del l This loop actually consumes 700 times 80 MB, which is unexpected to say the least, and looks like a very fast memory leak. The same program on 32-bit architectures simply runs out of virtual address space and fails with a MemoryError---even if we lower the length of the list to 10**9/700 = 1428571. The same problem exists whenever a single object is "large", we allocate and forget many such objects in sequence, and they are kept alive by a cycle. This includes the case where the large object is not part of a cycle, but merely referenced from a cycle. For examples of "large" objects with potentially low lifetimes, maybe more natural than large lists, would include bz2 objects (17MB each) or Numpy arrays. To fix it, the basic idea would be to have the "large" allocations count for more than "+1" in _PyObject_GC_Alloc(). Maybe they would also need to decrease the count by the same amount in PyObject_GC_Del(), though that may be less important. Still, I am unsure about how it could be implemented. Maybe a new C API is needed, which could then be used by a few built-in types (lists, bz2 objects, numpy arrays...) where the bulk of the memory allocation is not actually done by _PyObject_GC_Alloc() but by a separate call. I am thinking about something like PyMem_AddPressure(size), which would simply increase the count by a number based on 'size'. ---------- components: Interpreter Core messages: 299656 nosy: arigo priority: normal severity: normal status: open title: Cyclic GC threshold may need tweaks versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 09:25:40 2017 From: report at bugs.python.org (Wonsup Yoon) Date: Wed, 02 Aug 2017 13:25:40 +0000 Subject: [issue29456] bugs in unicodedata.normalize: u1176, u11a7 and u11c3 In-Reply-To: <1486355272.29.0.0894514518656.issue29456@psf.upfronthosting.co.za> Message-ID: <1501680340.76.0.0278776715754.issue29456@psf.upfronthosting.co.za> Wonsup Yoon added the comment: I added some test cases for this issue. Please, someone check this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 09:54:36 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 02 Aug 2017 13:54:36 +0000 Subject: [issue31103] Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 In-Reply-To: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> Message-ID: <1501682076.81.0.0337691211535.issue31103@psf.upfronthosting.co.za> Steve Dower added the comment: Can you link to those guidelines please? Microsoft release plenty of software with version numbers over 256. Also, since people already rely on the current scheme, we'd need a very compelling reason to break them. I don't believe you've made that case yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 10:08:14 2017 From: report at bugs.python.org (dubiousjim) Date: Wed, 02 Aug 2017 14:08:14 +0000 Subject: [issue28427] WeakValueDictionary next bug (with multithreading) In-Reply-To: <1476354989.22.0.575160455599.issue28427@psf.upfronthosting.co.za> Message-ID: <1501682894.45.0.576179354409.issue28427@psf.upfronthosting.co.za> dubiousjim added the comment: In response to Issue #7105, self._pending_removals was added to WeakValueDictionaries (and also WeakKeyDictionaries, but they're not relevant to what I'm about to discuss). This was in changesets 58194 to tip and 58195 to 3.1, back in Jan 2010. In those changesets, the implementation of WeakValueDictionary.setdefault acquired a check on self._pending_removals, but only after the key lookup had failed. (See lines starting 5.127 in both those changesets.) In changeset 87778, in Dec 2013, this same patch was backported to 2.7. More recently, in response to the issue discussed above (Issue #28427), similar checks were added to WeakValueDictionary.get, but now BEFORE the key lookup. This was in changesets 105851 to 3.5, 105852 to 3.6, 105853 to tip, and 105854 to 2.7, in Dec 2016. Notably, in the last changeset, the check on self._pending_removals on WeakValueDictionary.setdefault is also moved to the top of the function, before the key lookup is attempted. This parallels the change being made to WeakValueDictionary.get. However, that change to WeakValueDictionary.setdefault was only made to the 2.7 branch. If it's correct, then why wasn't the same also done for 3.5, 3.6, and tip? ---------- nosy: +dubiousjim _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 11:03:06 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Wed, 02 Aug 2017 15:03:06 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 Message-ID: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> New submission from ???? ?????????: === os.posix_fallocate(os.open('qwe.qwe', os.O_RDONLY|os.O_CREAT), 0, 1024*1024) === generates OSError with errno 0. Suppose this happen due to O_RDONLY flag. strace : ==== open("qwe.qwe", O_RDONLY|O_CREAT|O_CLOEXEC, 0777) = 3 fallocate(3, 0, 0, 1048576) = -1 EBADF (Bad file descriptor) ==== Python 3.5.3, Ubuntu 64-bit. ---------- components: Library (Lib) messages: 299660 nosy: socketpair priority: normal severity: normal status: open title: os.posix_fallocate() generate exception with errno 0 type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 11:45:54 2017 From: report at bugs.python.org (Guillaume Sanchez) Date: Wed, 02 Aug 2017 15:45:54 +0000 Subject: [issue30717] str.center() is not unicode aware In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1501688754.21.0.717702644755.issue30717@psf.upfronthosting.co.za> Guillaume Sanchez added the comment: Hi, Are you guys still interested? I haven't heard from you in a while ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 12:18:41 2017 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 02 Aug 2017 16:18:41 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501690721.03.0.00645733553019.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: I've verified that this along with the changes in 31095 resolve the crashes I've been seeing in our production environment ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 12:21:59 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 02 Aug 2017 16:21:59 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501690919.88.0.152075046025.issue31061@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you, Alexander. Bugs like this are notoriously hard to fix, you saved us from hours, if not days, of debugging. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 13:02:28 2017 From: report at bugs.python.org (Pierre Quentel) Date: Wed, 02 Aug 2017 17:02:28 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1501693348.71.0.390154870173.issue30576@psf.upfronthosting.co.za> Pierre Quentel added the comment: In the latest version of the PR, following Martin's comments : - apply Chunk Transfer for HTTP/1.1 only, change implementation of compression for previous protocols (send gzipped data without Content-Length) - use http.cookiejar to parse the Accept-Encoding header - fix a bug with chunk length (conversion to hex) - support x-gzip besides gzip - handle Python builds without zlib / gzip Headers parsing is done in several places in the standard distribution. It should probably be done in a single module, but I think it would be better to open a new issue for that, as it would impact more modules than just http.server. I couldn't find a simple way to reuse code from http.client to generate HTTP chunks (it's in HTTPConnection._send_output()), but I'm not sure it's worth it, the code to generate a chunk is a one-liner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 14:53:14 2017 From: report at bugs.python.org (Shane Harvey) Date: Wed, 02 Aug 2017 18:53:14 +0000 Subject: [issue31107] copyreg does not properly mangle __slots__ names Message-ID: <1501699994.79.0.0201468057837.issue31107@psf.upfronthosting.co.za> New submission from Shane Harvey: This line in copyreg._slotnames does not properly calculate mangled attribute names: https://github.com/python/cpython/blob/v3.6.2/Lib/copyreg.py#L131 The problem is that it does not strip leading underscores from the class name: >>> class _LeadingUnderscoreClassName(object): ... __slots__ = ("__bar",) ... >>> import copy_reg >>> copy_reg._slotnames(_LeadingUnderscoreClassName) ['__LeadingUnderscoreClassName__bar'] The result is that copy, pickle, and anything else that relies on _slotnames() do not work on classes with leading underscores and private __slots__. This bug is present in all versions of Python. ---------- components: Library (Lib) messages: 299665 nosy: Shane Harvey priority: normal severity: normal status: open title: copyreg does not properly mangle __slots__ names type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 14:53:46 2017 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 02 Aug 2017 18:53:46 +0000 Subject: [issue31108] add __contains__ for list_iterator (and others) for better performance Message-ID: <1501700026.5.0.776654640231.issue31108@psf.upfronthosting.co.za> New submission from Sergey Fedoseev: > python -mtimeit -s "l = list(range(100000))" "l[-1] in l" 1000 loops, best of 3: 1.34 msec per loop > python -mtimeit -s "l = list(range(100000))" "l[-1] in iter(l)" 1000 loops, best of 3: 1.59 msec per loop ---------- messages: 299666 nosy: sir-sigurd priority: normal severity: normal status: open title: add __contains__ for list_iterator (and others) for better performance type: performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 14:54:38 2017 From: report at bugs.python.org (Sergey Fedoseev) Date: Wed, 02 Aug 2017 18:54:38 +0000 Subject: [issue31108] add __contains__ for list_iterator (and others) for better performance In-Reply-To: <1501700026.5.0.776654640231.issue31108@psf.upfronthosting.co.za> Message-ID: <1501700078.14.0.792781203521.issue31108@psf.upfronthosting.co.za> Changes by Sergey Fedoseev : ---------- pull_requests: +3025 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 14:57:56 2017 From: report at bugs.python.org (Roundup Robot) Date: Wed, 02 Aug 2017 18:57:56 +0000 Subject: [issue31107] copyreg does not properly mangle __slots__ names In-Reply-To: <1501699994.79.0.0201468057837.issue31107@psf.upfronthosting.co.za> Message-ID: <1501700276.35.0.367536681094.issue31107@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3027 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 15:05:24 2017 From: report at bugs.python.org (Yaron de Leeuw) Date: Wed, 02 Aug 2017 19:05:24 +0000 Subject: [issue31109] zipimport argument clinic conversion Message-ID: <1501700724.15.0.635937814263.issue31109@psf.upfronthosting.co.za> New submission from Yaron de Leeuw: Convert zipimport to use the argument clinic. I will submit the PR shortly. ---------- components: Argument Clinic, Library (Lib) messages: 299667 nosy: jarondl, larry, twouters priority: normal severity: normal status: open title: zipimport argument clinic conversion type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 15:06:01 2017 From: report at bugs.python.org (cwee) Date: Wed, 02 Aug 2017 19:06:01 +0000 Subject: [issue31110] Small typo in plistlib docs Message-ID: <1501700761.19.0.284106835354.issue31110@psf.upfronthosting.co.za> New submission from cwee: Starting with 3.4, the docs for plistlib have had a typo: https://docs.python.org/3.4/library/plistlib.html#plistlib.readPlist https://docs.python.org/3.5/library/plistlib.html#plistlib.readPlist https://docs.python.org/3.6/library/plistlib.html#plistlib.readPlist https://docs.python.org/3.7/library/plistlib.html#plistlib.readPlist Functions `readPlist` and `readPlistFromBytes` reference the `__getitem_` method, which should be `__getitem__`. I'd be happy to submit a PR if there's a repo for the site's documentation. ---------- assignee: docs at python components: Documentation messages: 299668 nosy: cwee, docs at python priority: normal severity: normal status: open title: Small typo in plistlib docs type: enhancement versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 15:06:15 2017 From: report at bugs.python.org (Yaron de Leeuw) Date: Wed, 02 Aug 2017 19:06:15 +0000 Subject: [issue31109] zipimport argument clinic conversion In-Reply-To: <1501700724.15.0.635937814263.issue31109@psf.upfronthosting.co.za> Message-ID: <1501700775.66.0.345642367464.issue31109@psf.upfronthosting.co.za> Changes by Yaron de Leeuw : ---------- pull_requests: +3028 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 15:07:07 2017 From: report at bugs.python.org (Shane Harvey) Date: Wed, 02 Aug 2017 19:07:07 +0000 Subject: [issue31107] copyreg does not properly mangle __slots__ names In-Reply-To: <1501699994.79.0.0201468057837.issue31107@psf.upfronthosting.co.za> Message-ID: <1501700827.03.0.154171822787.issue31107@psf.upfronthosting.co.za> Changes by Shane Harvey : ---------- versions: -Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 15:35:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 02 Aug 2017 19:35:45 +0000 Subject: [issue31107] copyreg does not properly mangle __slots__ names In-Reply-To: <1501699994.79.0.0201468057837.issue31107@psf.upfronthosting.co.za> Message-ID: <1501702545.83.0.524989207159.issue31107@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.7 -Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 15:57:43 2017 From: report at bugs.python.org (Charles Ferguson) Date: Wed, 02 Aug 2017 19:57:43 +0000 Subject: [issue31111] Python 3.6 has an inaccessible attribute on FileNotFoundError Message-ID: <1501703863.51.0.936615948464.issue31111@psf.upfronthosting.co.za> New submission from Charles Ferguson: Whilst debugging a problem in some of my code (which turned out to be a misspelt filename), I found that I could not access one of the properties of the FileNotFoundError object. Essentially, if you get a 'FileNotFoundError' for opening a file that does not exist, you expect to be able to enumerate the attributes on that object. And if you try to access them, that they be accessible. However, there is an attribute - 'characters_written' - which claims to be present according to 'dir()' but not according to 'hasattr()' and trying to access it with 'getattr()' confirms that it's not really there. Looking at the documentation at https://docs.python.org/3/library/exceptions.html#OSError I see that it is a subclass of OSError(), and that the BlockingIOError can have this attribute. But none of the other OSError subclasses are documented as having the attribute. It is still reasonable that any attribute access could generate another exception (including an AttributeError), as their implementation may have other issues, but I do not feel that this applies here, as this is an internal exception object that probably ought not to have an issue. Since 'characters_written' doesn't seem to have any meaning in the context of 'FileNotFound', it seems like it's an oversight from the other exception subclass. What I conclude from this is that the documentation, hasattr() and getattr() are correct, but dir() is acting wrongly. Principle of least surprise also suggests that having inconsistent returns from these functions probably isn't correct. I guess it could be the other way around, and the documentation, hasattr and getattr could be returning incorrectly, but that feels like something of a stretch. I would wonder if the other OSError subclasses also suffer from this extraneous attribute name, and that it's been implemented at the wrong level, but I have no evidence to suggest that's the case (just that that's something I'd probably look at if I had the time). Reproduction code: ---- #!/usr/bin/python3.6 ## # Demonstrate oddity of FileNotFoundError. # try: fh = open('/nothing/at/all', 'r') except Exception as ex: print("Exception: {}".format(ex)) for attrname in dir(ex): if attrname.startswith('__'): # Ignore dunders for the sake of brevity continue print(" Attribute name: {}".format(attrname)) if not hasattr(ex, attrname): print(" hasattr: False - surprising!") print(" value: {}".format(getattr(ex, attrname))) ---- On 3.6 this generates: ---- Charles at charlesmbp:~/Coding/terraspock-develop (develop)$ python python3.6.2-filenotfound.py Exception: [Errno 2] No such file or directory: '/nothing/at/all' Attribute name: args value: (2, 'No such file or directory') Attribute name: characters_written hasattr: False - surprising! Traceback (most recent call last): File "python3.6.2-filenotfound.py", line 7, in fh = open('/nothing/at/all', 'r') FileNotFoundError: [Errno 2] No such file or directory: '/nothing/at/all' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "python3.6.2-filenotfound.py", line 18, in print(" value: {}".format(getattr(ex, attrname))) AttributeError: characters_written ---- On 2.7 this works fine, but I've not tested the other 3.x series versions as I don't have them to hand. Testing performed on macOS using Python 3.6.2. I find it hard to think that this is intended behaviour, but whether it's something that debugging tools (and users) would expect or find useful I don't know. ---------- components: Library (Lib) messages: 299669 nosy: gerph priority: normal severity: normal status: open title: Python 3.6 has an inaccessible attribute on FileNotFoundError type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 16:35:42 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Aug 2017 20:35:42 +0000 Subject: [issue31111] Python 3.6 has an inaccessible attribute on FileNotFoundError In-Reply-To: <1501703863.51.0.936615948464.issue31111@psf.upfronthosting.co.za> Message-ID: <1501706142.59.0.847035584154.issue31111@psf.upfronthosting.co.za> R. David Murray added the comment: It is intended. See issue 30554. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Inaccessible attribute characters_written on OSError instances _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 16:44:32 2017 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 02 Aug 2017 20:44:32 +0000 Subject: [issue31080] Allow `logging.config.fileConfig` to accept kwargs In-Reply-To: <1501434610.41.0.267137622883.issue31080@psf.upfronthosting.co.za> Message-ID: <1501706672.7.0.90095057858.issue31080@psf.upfronthosting.co.za> Vinay Sajip added the comment: New changeset 6ea56d2ebcae69257f8dd7af28c357b25bf394c3 by Vinay Sajip (Preston Landers) in branch 'master': bpo-31080: Allowed logging.config.fileConfig() to accept both args and kwargs. (GH-2979) https://github.com/python/cpython/commit/6ea56d2ebcae69257f8dd7af28c357b25bf394c3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 16:50:38 2017 From: report at bugs.python.org (Isaac Morland) Date: Wed, 02 Aug 2017 20:50:38 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501612336.23.0.855224863061.issue31085@psf.upfronthosting.co.za> Message-ID: Isaac Morland added the comment: On 1 August 2017 at 14:32, R. David Murray wrote: > > R. David Murray added the comment: > > I wrote a "parameterized tests" extension for unittest, and it has the > option of autogenerating the test name from the parameter names and > values. I've never used that feature, and I am considering ripping it out > before I release the package, to simplify the code. If I do I might > replace it with a hook for generating the test name so that the user can > choose their own auto-naming scheme. > > Perhaps that would be an option here: a hook for generating the name, that > would be called where you want your None processing to be? That would not > be simpler than your proposal, but it would be more general (satisfy more > use cases) and might be worth the cost. On the other hand, other > developers might not like the API bloat ;) > It's August, not April. Raymond Hettinger is accusing my proposed API of being potentially confusing, while you're suggesting providing a hook? All I want is the option of telling namedtuple() to make up its own typename, for situations where there should be one but I don't want to provide it. Having said that, if people really think a hook like this is worth doing, I'll implement it. But I agree that it seems excessively complicated. Let's see if auto-generation is useful first, then if somebody wants a different auto-generation, provide the capability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 17:00:06 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Aug 2017 21:00:06 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501707606.35.0.563212345817.issue31085@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, different developers have different opinions. We discuss (I'd say argue, which is accurate, but has acquired negative connotations) until we reach a consensus. And if we don't reach a consensus we leave it alone ("status quo wins a stalemate"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 17:05:10 2017 From: report at bugs.python.org (Isaac Morland) Date: Wed, 02 Aug 2017 21:05:10 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501650764.57.0.216651395125.issue31085@psf.upfronthosting.co.za> Message-ID: Isaac Morland added the comment: OK, so it's pretty clear this is heading towards a rejection, but I can't help but respond to your points: On 2 August 2017 at 01:12, Raymond Hettinger wrote: * This would be a potentially confusing addition to the API. > I'm giving a natural meaning to providing a None where it is not permitted now. The meaning is to provide a reasonable value for the missing parameter. How could that be confusing? Also it's completely ignorable - people don't have to pass None and get the auto-generated typename if they don't want to. > * It may also encourage bad practices that we don't want to see in real > code. > What bad practices? There are lots of times when providing an explicit name is a waste of effort. This provides a simple way of telling the library to figure it out. Aren't there supposedly just two hard things in computer science? Naming things, and cache invalidation. An opportunity to avoid naming things that don't need to be specifically named is something worth taking. > * We want to be able to search for the namedtuple definition, want to have > a meaningful repr, and want pickling to be easy. > You mean by searching for the typename in the source code? In my primary usecase, the typename is computed regardless, so it doesn't appear in the source code and can't be searched for. The other suggestion which appeared at one point was passing "_" as the typename. This is going to be somewhat challenging to search for also. As to the meaningful repr, that is why I want auto-generation of the typename. This is not for uses like this: MyType = namedtuple ('MyType', ['a', 'b', 'c']) It is for ones more like this: rowtype = namedtuple (None, row_headings) Or as it currently has to be: rowtype = namedtuple ('rowtype', row_headings) (leading to all the rowtypes being the same name, so less meaningful) Or: rowtype = namedtuple ('__'.join (row_headings), row_headings) (which repeats the irrelevant-in-its-details computation wherever it is needed and doesn't support rename=True, unless a more complicated computation that duplicates code inside of namedtuple() is repeated) Finally I'm not clear on how pickling is made more difficult by having namedtuple() generate a typename. The created type still has a typename. But I'm interested - this is the only point I don't think I understand. * This doesn't have to be shoe-horned into the namedtuple API. If an > actual need did arise, it is trivial to write a wrapper that specifies > whatever auto-naming logic happens to make sense for a particular > application: > > >>> from collections import namedtuple > >>> def auto_namedtuple(*attrnames, **kwargs): > typename = '_'.join(attrnames) > return namedtuple(typename, attrnames, **kwargs) > > >>> NT = auto_namedtuple('name', 'rank', 'serial') > >>> print(NT.__doc__) > name_rank_serial(name, rank, serial) Your code will not work if rename=True is needed. I don't want to repeat the rename logic as doing so is a code smell. In short, I'm disappointed. I'm not surprised to make a suggestion, and have people point out problems. For example, my original proposal ignored the difficulties of creating the C implementation, and the issue of circular imports, and I very much appreciated those criticisms. But I am disappointed at the quality of the objections to these modified proposals. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 17:22:00 2017 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 02 Aug 2017 21:22:00 +0000 Subject: [issue31080] Allow `logging.config.fileConfig` to accept kwargs In-Reply-To: <1501434610.41.0.267137622883.issue31080@psf.upfronthosting.co.za> Message-ID: <1501708920.39.0.775669081435.issue31080@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 17:51:26 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 02 Aug 2017 21:51:26 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501710686.26.0.8349846242.issue31085@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Your code will not work if rename=True is needed. It works just fine: >>> NT = auto_namedtuple('name', 'name', 'def', rename=True) >>> print(NT.__doc__) name_name_def(name, _1, _2) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 18:41:48 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 02 Aug 2017 22:41:48 +0000 Subject: [issue31103] Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 In-Reply-To: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> Message-ID: <1501713708.83.0.127891568124.issue31103@psf.upfronthosting.co.za> Eryk Sun added the comment: The docs [1] are clear that this property must be of the form major.minor.build. It can include at least one additional field, which the installer ignores. The major and minor version numbers can be up to 255, and the build number can be up to 65535. Python's ProductVersion property complies with this: db = msilib.OpenDatabase('core.msi', msilib.MSIDBOPEN_READONLY) v = db.OpenView("select * from Property where Property='ProductVersion'") v.Execute(None) r = v.Fetch() >>> r.GetString(2) '3.6.2150.0' It would be unorthodox to use the build version field for Python's micro release version number. I don't see why it's really important since micro releases are ABI compatible for in-place upgrades. [1]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa370859 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 18:51:15 2017 From: report at bugs.python.org (Preston Landers) Date: Wed, 02 Aug 2017 22:51:15 +0000 Subject: [issue31080] Allow `logging.config.fileConfig` to accept kwargs In-Reply-To: <1501434610.41.0.267137622883.issue31080@psf.upfronthosting.co.za> Message-ID: <1501714275.87.0.396829048798.issue31080@psf.upfronthosting.co.za> Preston Landers added the comment: A colleague pointed out that I used single quotes in the defaults where the line uses double quotes for another argument. I'm not sure if this is considered a problem but I could submit an update if it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 20:17:09 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 03 Aug 2017 00:17:09 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab In-Reply-To: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> Message-ID: <1501719429.98.0.995755785773.issue31002@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I'm making good progress on this. I should be able to open the PR tomorrow. It's definitely non-trivial, but using your font and general tests as a guide has been invaluable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 20:38:23 2017 From: report at bugs.python.org (Isaac Morland) Date: Thu, 03 Aug 2017 00:38:23 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501710686.26.0.8349846242.issue31085@psf.upfronthosting.co.za> Message-ID: Isaac Morland added the comment: Not if one of the attributes is something that cannot be part of a typename: >>> fields = ['def', '-'] >>> namedtuple ('test', fields, rename=True).__doc__ 'test(_0, _1)' >>> namedtuple ('__'.join (fields), fields, rename=True).__doc__ Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/collections.py", line 339, in namedtuple 'alphanumeric characters and underscores: %r' % name) ValueError: Type names and field names can only contain alphanumeric characters and underscores: 'def_-' >>> Which I admit is a weird thing to be doing, but duplicating attribute names or trying to use a keyword as an attribute name (or anything else that requires rename=True) is also weird. Also it's far from clear that the pre-renaming field names are what is wanted in the auto-generated typename. If I was actually using attribute names that required renaming I would want the auto-generated typename to match the renamed attributes. The original fieldnames play no part in the operation of the namedtuple class or its instances once it has been created: only the renamed fieldnames even remain reachable from the namedtuple object. Anyway I think I'm probably out at this point. I think Python development is not a good cultural fit for me, based on this discussion. Which is weird, since I love working in Python. I even like the whitespace indentation, although admittedly not quite as much as I thought I would before I tried it. I hugely enjoy the expressiveness of the language features, combined with the small but useful set of immediately-available library functions, together with the multitude of importable standard modules backing it all up. But I should have known when functools.compose (which ought to be almost the first thing in any sort of "functional programming" library) was rejected that I should stay away from attempting to get involved in the enhancement side of things. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 22:11:10 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 03 Aug 2017 02:11:10 +0000 Subject: [issue31085] Add option for namedtuple to name its result type automatically In-Reply-To: <1501463154.41.0.0907519926767.issue31085@psf.upfronthosting.co.za> Message-ID: <1501726270.06.0.330454101673.issue31085@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Also it's far from clear that the pre-renaming field names are > what is wanted in the auto-generated typename. I concur. > Anyway I think I'm probably out at this point. Okay, marking this as closed. Thank you for the suggestion. Sorry this didn't pan out. > I think Python development is not a good cultural fit > for me, based on this discussion. This particular proposal didn't seem compelling to us. Other suggestions are welcome. If you're the same Isaac Morlund who participated in the initial development of namedtuple() ten years ago, then you should know that the design of the _replace() method was principally due to your suggestion. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 2 23:11:54 2017 From: report at bugs.python.org (ericshenjs) Date: Thu, 03 Aug 2017 03:11:54 +0000 Subject: [issue31112] cannot run module with double quotes Message-ID: <1501729914.71.0.88312721886.issue31112@psf.upfronthosting.co.za> New submission from ericshenjs: (vPy3X64) test01 at NJNU f:\Src\localCode\python\py3_eric > python "-m locust.main -V" f:\SDKs\Python\vPy3X64\Scripts\python.exe: Error while finding module specification for ' locust.main -V' (ModuleNotFoundError: No module named ' locust') (vPy3X64) test01 at NJNU f:\Src\localCode\python\py3_eric > python -m locust.main -V [2017-08-03 10:53:19,111] NJNU/INFO/stdout: Locust 0.8a2 [2017-08-03 10:53:19,111] NJNU/INFO/stdout: (vPy3X64) test01 at NJNU f:\Src\localCode\python\py3_eric > python -V Python 3.6.1 :: Anaconda 4.4.0 (64-bit) ---------- components: Windows messages: 299681 nosy: ericshenjs, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: cannot run module with double quotes type: resource usage versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 00:58:23 2017 From: report at bugs.python.org (Eryk Sun) Date: Thu, 03 Aug 2017 04:58:23 +0000 Subject: [issue31112] cannot run module with double quotes In-Reply-To: <1501729914.71.0.88312721886.issue31112@psf.upfronthosting.co.za> Message-ID: <1501736303.29.0.120474547558.issue31112@psf.upfronthosting.co.za> Eryk Sun added the comment: Python uses the C runtime wmain entry point, which parses the commandline string into an argument array using documented rules [1]. The quoted string "-m locust.main -V" is passed as a single argument instead of the expected three arguments: ["-m", "locust.main", "-V"]. [1]: https://msdn.microsoft.com/en-us/library/17w5ykft ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 01:46:17 2017 From: report at bugs.python.org (Louie Lu) Date: Thu, 03 Aug 2017 05:46:17 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1501739177.63.0.0461627092779.issue31051@psf.upfronthosting.co.za> Louie Lu added the comment: I don't like the name "gentab". There is a "genobject.c" in source code but stand for "generator object". In the code, both docstring and the name didn't mention "General", it only mention at `note.add(self.genpage, 'General')`. That is why I got ambiguous when I look back to the code. Or maybe it just because I'm not familiar for the abbr., I take a search and found that in US Army that General abbr. is Gen. --- I'm a +0 of MainPage, since in the page, it used for general setting. I'm not sure about this changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 02:02:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 06:02:06 +0000 Subject: [issue25430] speed up ipaddress __contain__ method In-Reply-To: <1445083038.14.0.911555841878.issue25430@psf.upfronthosting.co.za> Message-ID: <1501740126.17.0.656434479622.issue25430@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 02:06:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 06:06:59 +0000 Subject: [issue31110] Small typo in plistlib docs In-Reply-To: <1501700761.19.0.284106835354.issue31110@psf.upfronthosting.co.za> Message-ID: <1501740419.09.0.474888691041.issue31110@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: https://github.com/python/cpython ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 02:11:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 06:11:50 +0000 Subject: [issue31110] Small typo in plistlib docs In-Reply-To: <1501700761.19.0.284106835354.issue31110@psf.upfronthosting.co.za> Message-ID: <1501740710.97.0.0978053874558.issue31110@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 3.4 and 3.5 can take only security fixes. Create a PR for the master branch. After merging it the changes can be cherry-picked into the 3.6 branch. See details in Python Developer?s Guide (https://docs.python.org/devguide/). ---------- stage: -> needs patch versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 02:32:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 06:32:08 +0000 Subject: [issue31108] add __contains__ for list_iterator (and others) for better performance In-Reply-To: <1501700026.5.0.776654640231.issue31108@psf.upfronthosting.co.za> Message-ID: <1501741928.11.0.457216938852.issue31108@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch adds almost 40 line of the code and increases the performance of not well famous feature at best by 10-20%. Adding an optimization for every new iterator type will add a comparable quantity of the code. I think this is too high cost. Using a common template implementation for iterators (issue27438) would decrease the relative cost of this feature. ---------- components: +Interpreter Core nosy: +rhettinger, serhiy.storchaka stage: -> patch review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 03:07:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 07:07:51 +0000 Subject: [issue31109] zipimport argument clinic conversion In-Reply-To: <1501700724.15.0.635937814263.issue31109@psf.upfronthosting.co.za> Message-ID: <1501744071.83.0.444193969506.issue31109@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If zipimport will be reimplemented in Python (issue25711) this change will be not needed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 03:47:41 2017 From: report at bugs.python.org (Georgy) Date: Thu, 03 Aug 2017 07:47:41 +0000 Subject: [issue28777] Add asyncio.Queue __aiter__, __anext__ methods In-Reply-To: <1479877132.48.0.693527153069.issue28777@psf.upfronthosting.co.za> Message-ID: <1501746461.37.0.987368554994.issue28777@psf.upfronthosting.co.za> Georgy added the comment: I successfully use my code: import asyncio, sanic class MyQueue(asyncio.Queue): def __aiter__(self): return self async def __anext__(self): return await self.get() app = sanic.Sanic() ws_set = set() app.static('/', 'async.html') @app.websocket('/ws') async def root_ws(request, ws): ws_set.add(ws) try: while True: await ws.recv() finally: ws_set.remove(ws) async def postgres(): import aiopg async with aiopg.create_pool('') as pool: async with pool.acquire() as connection: connection._notifies = MyQueue() async with connection.cursor() as cursor: await cursor.execute('LISTEN message') async for message in connection.notifies: for ws in ws_set: await ws.send(message.payload) try: asyncio.get_event_loop().run_until_complete(asyncio.gather(app.create_server(), postgres())) except KeyboardInterrupt: asyncio.get_event_loop().stop() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 04:10:51 2017 From: report at bugs.python.org (Manuel Krebber) Date: Thu, 03 Aug 2017 08:10:51 +0000 Subject: [issue31113] Stack overflow with large program Message-ID: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> New submission from Manuel Krebber: With a pattern matching library I am generating some Python code that matches patterns. For a very big pattern set I generate a Python file which is about 20MB and has ~300K LOC. When I try to execute the file with Python 3.6.2 on Windows 10 (64bit), the interpreter crashes. I do not have the Python source locally, but I could get it if necessary. The crash is because of a stack overflow when calling dfs() in compile.c. I can attach you the program, but it needs some dependencies which currently are only availiable via some Github repos. I will try to split the ig file into multiple smaller ones, but I thought you might want to know about an interpreter crash. ---------- components: Interpreter Core, Windows messages: 299689 nosy: Wheerd, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Stack overflow with large program type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 04:37:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 08:37:19 +0000 Subject: [issue31071] *args unpacking can mask TypeErrors In-Reply-To: <1501257802.36.0.460267167585.issue31071@psf.upfronthosting.co.za> Message-ID: <1501749439.79.0.209033644805.issue31071@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 25e4f779d7ae9f37a1933cb5cbfad06e673c01f9 by Serhiy Storchaka in branch 'master': bpo-31071: Avoid masking original TypeError in call with * unpacking (#2957) https://github.com/python/cpython/commit/25e4f779d7ae9f37a1933cb5cbfad06e673c01f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 04:40:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 08:40:10 +0000 Subject: [issue31071] *args unpacking can mask TypeErrors In-Reply-To: <1501257802.36.0.460267167585.issue31071@psf.upfronthosting.co.za> Message-ID: <1501749610.51.0.70047134247.issue31071@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3030 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 04:43:28 2017 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 03 Aug 2017 08:43:28 +0000 Subject: [issue31080] Allow `logging.config.fileConfig` to accept kwargs In-Reply-To: <1501434610.41.0.267137622883.issue31080@psf.upfronthosting.co.za> Message-ID: <1501749808.36.0.705137275668.issue31080@psf.upfronthosting.co.za> Vinay Sajip added the comment: No, that's OK - leave it as is, I'll consider it when next visiting the area. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 04:45:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 08:45:28 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1501749928.69.0.494737275693.issue30978@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5075416b8fedc5526b643dabc915f7945fa0d969 by Serhiy Storchaka in branch 'master': bpo-30978: str.format_map() now passes key lookup exceptions through. (#2790) https://github.com/python/cpython/commit/5075416b8fedc5526b643dabc915f7945fa0d969 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 04:50:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 08:50:06 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1501750206.57.0.686742163331.issue30978@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3031 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 05:14:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 09:14:10 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1501751650.39.0.3843286279.issue30978@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f08b2be4416163e3d18b8d09891e7cda0d8a21d4 by Serhiy Storchaka in branch '3.6': [3.6] bpo-30978: str.format_map() now passes key lookup exceptions through. (GH-2790) (#2992) https://github.com/python/cpython/commit/f08b2be4416163e3d18b8d09891e7cda0d8a21d4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 05:14:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 09:14:37 +0000 Subject: [issue31071] *args unpacking can mask TypeErrors In-Reply-To: <1501257802.36.0.460267167585.issue31071@psf.upfronthosting.co.za> Message-ID: <1501751677.43.0.899572592223.issue31071@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 946a0b69e217ff22a6c056047eab42053e9a2d5f by Serhiy Storchaka in branch '3.6': [3.6] bpo-31071: Avoid masking original TypeError in call with * unpacking (GH-2957) (#2991) https://github.com/python/cpython/commit/946a0b69e217ff22a6c056047eab42053e9a2d5f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 05:17:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 09:17:00 +0000 Subject: [issue30978] str.format_map() silences exceptions in __getitem__ In-Reply-To: <1500580435.37.0.778911522194.issue30978@psf.upfronthosting.co.za> Message-ID: <1501751820.34.0.591812885497.issue30978@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 05:18:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 09:18:25 +0000 Subject: [issue31071] *args unpacking can mask TypeErrors In-Reply-To: <1501257802.36.0.460267167585.issue31071@psf.upfronthosting.co.za> Message-ID: <1501751905.65.0.979321676695.issue31071@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 06:08:23 2017 From: report at bugs.python.org (Stefan Behnel) Date: Thu, 03 Aug 2017 10:08:23 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1501754903.36.0.336640835586.issue31113@psf.upfronthosting.co.za> Stefan Behnel added the comment: 1) Is this reproducible? 2) Getting a crash in compile.c indicates that this is happening at parse/compile time and not when your Python code is executing. Can you confirm that? Does it generate a .pyc file on import that would indicate a successful byte code compilation? If it's a compiler issue, then the dependencies won't actually matter. 2) Is the code position where the crash happens (in dfs()) predictable, or does it vary across multiple runs? 3) Does this appear to be specific to Windows, or can you reproduce it on other platforms, too? And yes, seeing the file would be helpful. Could you at least compress it and make it available on the web somewhere for now? ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 06:31:26 2017 From: report at bugs.python.org (Manuel Krebber) Date: Thu, 03 Aug 2017 10:31:26 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1501756286.74.0.121695852308.issue31113@psf.upfronthosting.co.za> Manuel Krebber added the comment: 1) Yes. 2) A .pyc file was not generated. 3) It is always the same location where the error occurs. 4) It did not crash on the linux machine that I tested it on. I have tried to split the code up into multiple files, but it still crashes. I have uploaded the file to http://wheerd.de/generated.zip If you want I can also provide the code with multiple files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 07:04:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 11:04:00 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1501758240.0.0.447270294828.issue30717@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Unicode nosy: +benjamin.peterson, ezio.melotti, lemburg, loewis stage: needs patch -> patch review title: str.center() is not unicode aware -> Add unicode grapheme cluster break algorithm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 07:07:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 11:07:26 +0000 Subject: [issue18406] unicodedata.itergraphemes / str.itergraphemes / str.graphemes In-Reply-To: <1373307945.33.0.806287270916.issue18406@psf.upfronthosting.co.za> Message-ID: <1501758446.43.0.75280709879.issue18406@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue30717 has a patch. ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Add unicode grapheme cluster break algorithm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 07:20:50 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Aug 2017 11:20:50 +0000 Subject: [issue31105] Cyclic GC threshold may need tweaks In-Reply-To: <1501676549.78.0.999656095107.issue31105@psf.upfronthosting.co.za> Message-ID: <1501759250.2.0.149170481325.issue31105@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, this is a potentially annoying limitation of the current scheme. Note that it's not obvious how to proceed for resizable objects such as lists. Should the list inform the GC of every internal resizing? May a list resize trigger a GC run? Also, a small container may keep alive a large non-GC object (think a 2-element list containing itself and a 1 GB bytestring). How will the GC know? ---------- nosy: +pitrou type: -> enhancement versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 07:21:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 11:21:37 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1501759297.91.0.0682923592822.issue30717@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue18406 is closed as a duplicate of this issue. There are useful links in issue18406. In particular see a proto-PEP of Unicode Indexing Helper Module: http://mail.python.org/pipermail/python-dev/2001-July/015938.html I agreed that providing grapheme iterator would be useful. But it would be useful to provide also word and sentence iterators. Should iterators provide just substrings or their positions? I think emitting a pair (pos, substring) would be more useful. It is easier to create an iterator of substrings from the iterator of pairs than opposite. Alternatively an iterator could emit slice objects. Or special objects similar to re match objects. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 08:14:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 03 Aug 2017 12:14:51 +0000 Subject: [issue31105] Cyclic GC threshold may need tweaks In-Reply-To: <1501676549.78.0.999656095107.issue31105@psf.upfronthosting.co.za> Message-ID: <1501762491.94.0.0780356045867.issue31105@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is an existing protocol for estimating the size of allocated memory. __sizeof__. Python API sys.getsizeof() and C API _PySys_GetSizeOf(). But it is too heavy for using in GC. As a fast approximation the default implementation of the __sizeof__ method can be used: tp_basicsize + tp_itemsize * Py_SIZE(self) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 08:15:39 2017 From: report at bugs.python.org (Leon Avery) Date: Thu, 03 Aug 2017 12:15:39 +0000 Subject: [issue31012] suggestion: allow termination argument in argparse to be specified as argument In-Reply-To: <1500903609.87.0.148585957188.issue31012@psf.upfronthosting.co.za> Message-ID: <1501762539.3.0.586367538396.issue31012@psf.upfronthosting.co.za> Leon Avery added the comment: The POSIX guideline suggests that -- should be available as an option argument. One should be able to say "command --opt --" in order to make '--' the value of the '--opt' option. > There are some known problems with this '--', specially when there are more than one. Yes. That is exactly the problem I have. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 08:20:42 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Aug 2017 12:20:42 +0000 Subject: [issue31105] Cyclic GC threshold may need tweaks In-Reply-To: <1501676549.78.0.999656095107.issue31105@psf.upfronthosting.co.za> Message-ID: <1501762842.72.0.63913841341.issue31105@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > As a fast approximation the default implementation of the __sizeof__ method can be used This doesn't handle further resizing of containers, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 08:34:04 2017 From: report at bugs.python.org (Guillaume Sanchez) Date: Thu, 03 Aug 2017 12:34:04 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1501763644.97.0.65696881264.issue30717@psf.upfronthosting.co.za> Guillaume Sanchez added the comment: Thanks for your consideration. I'm currently fixing what's been asked in the reviews. > But it would be useful to provide also word and sentence iterators. I'll gladly do that as well! > I think emitting a pair (pos, substring) would be more useful. That means emitting a pair like ((start, end), substr) ? Is it pythonic to return a structure like this? For what it's worth, I don't like it, but I definitely understand the value of it. I'd prefer having two versions. One returning indexes, the other returning substrings. But... > Alternatively an iterator could emit slice objects. I really like that. Do we have a clear common agreement or preference on any option? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 09:03:44 2017 From: report at bugs.python.org (Yaron de Leeuw) Date: Thu, 03 Aug 2017 13:03:44 +0000 Subject: [issue31109] zipimport argument clinic conversion In-Reply-To: <1501700724.15.0.635937814263.issue31109@psf.upfronthosting.co.za> Message-ID: <1501765424.04.0.297886048814.issue31109@psf.upfronthosting.co.za> Yaron de Leeuw added the comment: Oh that's a cool idea which I was not aware of. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 09:04:19 2017 From: report at bugs.python.org (Yaron de Leeuw) Date: Thu, 03 Aug 2017 13:04:19 +0000 Subject: [issue25711] Rewrite zipimport from scratch In-Reply-To: <1448296120.48.0.872112518039.issue25711@psf.upfronthosting.co.za> Message-ID: <1501765459.02.0.390764034194.issue25711@psf.upfronthosting.co.za> Yaron de Leeuw added the comment: What is the status of this work? Is there anything I can do to help make this happen? ---------- nosy: +jarondl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 09:05:32 2017 From: report at bugs.python.org (Guillaume Sanchez) Date: Thu, 03 Aug 2017 13:05:32 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1501765532.54.0.799356866824.issue30717@psf.upfronthosting.co.za> Guillaume Sanchez added the comment: I have a few criticism to do against that proto-PEP http://mail.python.org/pipermail/python-dev/2001-July/015938.html In particular, the fact that all those functions return an index prevents any state keeping. That's a problem because: > next_(u, index) -> integer As you've seen it, in grapheme clustering (as well as words and line breaking), we have to have an automaton to decide on the breaking point. Which means that starting at an arbitrary index is not possible. > prev_(u, index) -> integer Is it really necessary? It means implementing the same logic to go backward. In our current case, we'd need a backward grapheme cluster break automaton too. > _start(u, index) -> integer > _end(u, index) -> integer Not doable in O(1) for the same reason as next_(). We need a context, and the code point itself cannot give enough information to know if it's the start/end of a given indextype. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 09:30:56 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 03 Aug 2017 13:30:56 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1501759297.91.0.0682923592822.issue30717@psf.upfronthosting.co.za> Message-ID: <20170803133049.GQ3149@ando.pearwood.info> Steven D'Aprano added the comment: On Thu, Aug 03, 2017 at 11:21:38AM +0000, Serhiy Storchaka wrote: > Should iterators provide just substrings or their positions? [...] I think we're breaking new ground here and I'm not sure what the right API should be. Should we follow Perl 6? https://docs.perl6.org/type/Str Go has a "norm" package for dealing with normalised "characters" (graphemes). https://blog.golang.org/normalization http://godoc.org/golang.org/x/text/unicode/norm Are my comments unacceptible scope-creep? We've gone from talking about a grapheme cluster break algorithm to me talking about Perl6 and Go which have rich string APIs based on graphemes. I'm not even sure of the best place for this: - unicodedata - string - a new module? I don't think unicodedata is the right place -- that should be for data and processing of individual unicode code points, not string handling, and it shouldn't become a grab-bag of random unrelated functions just because they have something to do with Unicode. Can we mark this as having a Provisional API to give us time to decide on the best API before locking it in permanently? https://www.python.org/dev/peps/pep-0411/ I'm reluctant to say this, because it's a lot more work, but maybe this is complicated enough that we should go through a PEP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 10:11:17 2017 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 03 Aug 2017 14:11:17 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1501765532.54.0.799356866824.issue30717@psf.upfronthosting.co.za> Message-ID: <39b7a8d7-fa49-8167-8e46-93ee204e7314@egenix.com> Marc-Andre Lemburg added the comment: On 03.08.2017 15:05, Guillaume Sanchez wrote: > > Guillaume Sanchez added the comment: > > I have a few criticism to do against that proto-PEP > > http://mail.python.org/pipermail/python-dev/2001-July/015938.html > > In particular, the fact that all those functions return an index prevents any state keeping. If you want state keeping for iterating over multiple parts of the string, you can use an iterator. The APIs were inspired by the standard string.find() APIs, that's why they work on indexes and don't return Unicode strings. As such, they serve a different use case than an iterator. With the APIs, scanning would always start at the given index in the string and move forward/backward to the start of the next . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 10:42:32 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 03 Aug 2017 14:42:32 +0000 Subject: [issue29304] dict: simplify lookup functions In-Reply-To: <1484706973.14.0.775713839146.issue29304@psf.upfronthosting.co.za> Message-ID: <1501771352.5.0.785273498424.issue29304@psf.upfronthosting.co.za> INADA Naoki added the comment: # microbench https://gist.github.com/methane/db16224a99d12ad4ed170cf3bd45b819 Slower (2): - fromkeys_str: 3.85 us +- 0.07 us -> 4.09 us +- 0.09 us: 1.06x slower (+6%) - fromkeys_int: 4.24 us +- 0.13 us -> 4.48 us +- 0.16 us: 1.06x slower (+6%) Faster (2): - unicode_nodummy_6: 604 ns +- 37 ns -> 577 ns +- 8 ns: 1.05x faster (-4%) - unicode_nodummy_5: 626 ns +- 31 ns -> 600 ns +- 21 ns: 1.04x faster (-4%) Benchmark hidden because not significant (1): unicode_split # pyperformance Slower (10): - xml_etree_iterparse: 191 ms +- 5 ms -> 200 ms +- 5 ms: 1.05x slower (+5%) - pickle_list: 7.80 us +- 0.19 us -> 8.08 us +- 0.24 us: 1.04x slower (+4%) - unpack_sequence: 116 ns +- 5 ns -> 119 ns +- 4 ns: 1.03x slower (+3%) - meteor_contest: 183 ms +- 3 ms -> 187 ms +- 2 ms: 1.02x slower (+2%) - logging_silent: 330 ns +- 6 ns -> 336 ns +- 5 ns: 1.02x slower (+2%) - sqlite_synth: 8.65 us +- 0.16 us -> 8.78 us +- 0.14 us: 1.02x slower (+2%) - sympy_sum: 172 ms +- 1 ms -> 174 ms +- 1 ms: 1.01x slower (+1%) - json_dumps: 27.0 ms +- 0.4 ms -> 27.3 ms +- 0.3 ms: 1.01x slower (+1%) - pickle_dict: 65.1 us +- 1.9 us -> 65.8 us +- 1.7 us: 1.01x slower (+1%) - pickle: 20.4 us +- 0.3 us -> 20.6 us +- 0.2 us: 1.01x slower (+1%) Faster (20): - nbody: 287 ms +- 4 ms -> 231 ms +- 6 ms: 1.24x faster (-19%) - scimark_sparse_mat_mult: 8.94 ms +- 1.35 ms -> 8.26 ms +- 0.36 ms: 1.08x faster (-8%) - chaos: 248 ms +- 3 ms -> 229 ms +- 2 ms: 1.08x faster (-8%) - pickle_pure_python: 1.01 ms +- 0.02 ms -> 953 us +- 13 us: 1.06x faster (-5%) - scimark_fft: 689 ms +- 22 ms -> 654 ms +- 14 ms: 1.05x faster (-5%) - regex_v8: 41.5 ms +- 1.8 ms -> 39.8 ms +- 0.2 ms: 1.04x faster (-4%) - xml_etree_parse: 279 ms +- 12 ms -> 271 ms +- 10 ms: 1.03x faster (-3%) - chameleon: 23.2 ms +- 0.5 ms -> 22.6 ms +- 0.5 ms: 1.03x faster (-2%) - dulwich_log: 146 ms +- 2 ms -> 143 ms +- 1 ms: 1.02x faster (-2%) - unpickle_pure_python: 725 us +- 15 us -> 709 us +- 15 us: 1.02x faster (-2%) - nqueens: 211 ms +- 3 ms -> 206 ms +- 2 ms: 1.02x faster (-2%) - json_loads: 56.6 us +- 2.6 us -> 55.7 us +- 0.4 us: 1.02x faster (-2%) - 2to3: 636 ms +- 3 ms -> 625 ms +- 4 ms: 1.02x faster (-2%) - richards: 148 ms +- 4 ms -> 145 ms +- 2 ms: 1.02x faster (-2%) - spectral_norm: 253 ms +- 9 ms -> 250 ms +- 5 ms: 1.01x faster (-1%) - xml_etree_generate: 203 ms +- 5 ms -> 201 ms +- 4 ms: 1.01x faster (-1%) - html5lib: 194 ms +- 6 ms -> 191 ms +- 6 ms: 1.01x faster (-1%) - sqlalchemy_imperative: 55.0 ms +- 1.7 ms -> 54.3 ms +- 1.7 ms: 1.01x faster (-1%) - sqlalchemy_declarative: 285 ms +- 3 ms -> 281 ms +- 3 ms: 1.01x faster (-1%) - genshi_xml: 171 ms +- 2 ms -> 169 ms +- 2 ms: 1.01x faster (-1%) Benchmark hidden because not significant (30): ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 10:43:54 2017 From: report at bugs.python.org (cwee) Date: Thu, 03 Aug 2017 14:43:54 +0000 Subject: [issue31110] Small typo in plistlib docs In-Reply-To: <1501700761.19.0.284106835354.issue31110@psf.upfronthosting.co.za> Message-ID: <1501771434.89.0.867502767083.issue31110@psf.upfronthosting.co.za> cwee added the comment: Just noticed the note was removed in commit edef358ed6d in the latest 3.7 docs. Closing issue. Thanks for the intro on how to contribute though! ---------- resolution: -> out of date stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 10:45:17 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 03 Aug 2017 14:45:17 +0000 Subject: [issue29304] dict: simplify lookup functions In-Reply-To: <1484706973.14.0.775713839146.issue29304@psf.upfronthosting.co.za> Message-ID: <1501771517.96.0.119923868401.issue29304@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 778928b0c7aa438c282727535814d73df850693a by INADA Naoki in branch 'master': bpo-29304: Simplify dict lookup functions (GH-2407) https://github.com/python/cpython/commit/778928b0c7aa438c282727535814d73df850693a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 10:45:59 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 03 Aug 2017 14:45:59 +0000 Subject: [issue29304] dict: simplify lookup functions In-Reply-To: <1484706973.14.0.775713839146.issue29304@psf.upfronthosting.co.za> Message-ID: <1501771559.61.0.996409311624.issue29304@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 11:51:06 2017 From: report at bugs.python.org (rgbyrnes) Date: Thu, 03 Aug 2017 15:51:06 +0000 Subject: [issue29155] test.test_spwd.TestSpwdNonRoot failure with FileNotFoundError: In-Reply-To: <1483548166.48.0.314208460749.issue29155@psf.upfronthosting.co.za> Message-ID: <1501775466.0.0.0391424619674.issue29155@psf.upfronthosting.co.za> rgbyrnes added the comment: We are seeing this too, on RHEL 7. It happens when /etc/nsswitch.conf has ... shadow: files ldap The ldap nss back end seems to set errno = ENOENT when it gets no response from the ldap server. If we remove ldap (leaving only files), then we see errno = EACCES. Is it correct to insist on EACCES? The man page cited in the last message says only that ... The functions that return a pointer return NULL if no more entries are available or if an error occurs during processing. The functions which have int as the return value return 0 for success and -1 for failure, with errno set to indicate the cause of the error. getspnam isn't one of the "functions which have int as the return value," so it isn't clear whether application code should make any assumptions about errno when it returns. ---------- components: +Tests nosy: +rgbyrnes type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 12:05:42 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 03 Aug 2017 16:05:42 +0000 Subject: [issue29304] dict: simplify lookup functions In-Reply-To: <1484706973.14.0.775713839146.issue29304@psf.upfronthosting.co.za> Message-ID: <1501776342.96.0.130346009823.issue29304@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you Inada! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 12:34:27 2017 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 03 Aug 2017 16:34:27 +0000 Subject: [issue28777] Add asyncio.Queue __aiter__, __anext__ methods In-Reply-To: <1501746461.37.0.987368554994.issue28777@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: So that's an infinite loop right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 12:52:56 2017 From: report at bugs.python.org (Damon Atkins) Date: Thu, 03 Aug 2017 16:52:56 +0000 Subject: [issue31103] Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 In-Reply-To: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> Message-ID: <1501779176.27.0.71934400071.issue31103@psf.upfronthosting.co.za> Damon Atkins added the comment: Hi Guys, The reason I raise the original is for all those configuration management tools which need the version number. In the uninstall registry is very much an inconsistent. *Anything with a Display Name in the registry (name in the GUI) will be listed. * Their are two places for version information. ** 1 "large int (DWORD) version number" called "version" store across several integers in the registry, which supports <0-255>.<0-255>.<0-65535> this is not visible in the GUI. ** display version, which is a string, and can be set to anything, this is visible in the GUI. "display version" is set most of the time. "large int version number" not always "large int (DWORD) version number" I have actual see software which as created this as a text string, which is just wrong. e.g. Google Chrome, however Google Update Helper does the right thing. People see the "display version" so this needs to match the version of python. I would expect most configuration management tools to use "display version" before "large int (DWORD) version number" The following is based on installing python 3.6.2 (3.6.2150 not sure what this means) display name should be "Python 3.6 (64-bit)" if you wish to encourage only single version of 3.6 to be installed. or "Python 3.6.2 (64-bit)" if you wish to allow many versions of 3.6 to be installed. "3.6" matches closer to what happens in the unix/linux world (/usr/lib/python2.6). display version string should 3.6.2 or 3.6.2.2150 never 3.6.2150 "large int (DWORD) version number" should not be set, but you could force it to 3.6.2 given your unlikely to go higher than 255.255.65535 the automatic builds might not like doing this, might be easier not to set it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 13:06:50 2017 From: report at bugs.python.org (Damon Atkins) Date: Thu, 03 Aug 2017 17:06:50 +0000 Subject: [issue31103] Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 In-Reply-To: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> Message-ID: <1501780010.54.0.832315664678.issue31103@psf.upfronthosting.co.za> Damon Atkins added the comment: The python 3.5.3 (64-bit) installer currently adds most of the components installed in the "MACHINE" Registry all but 1 item (2 entries) "python 3.5.3 (64-bit)" software entry which it places in both the 32 bit and also the 64 bit registry. It should be in the "MACHINE" Registry and only in the 64 bit registry, which is the default for 64 bit installer. For example a 32 bit installer would place "python 3.5.3 (32-bit)" only in the 32 bit part of the registry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 13:09:39 2017 From: report at bugs.python.org (Damon Atkins) Date: Thu, 03 Aug 2017 17:09:39 +0000 Subject: [issue31103] Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 In-Reply-To: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> Message-ID: <1501780179.57.0.676985910445.issue31103@psf.upfronthosting.co.za> Damon Atkins added the comment: Because this entry "python 3.5.3 (64-bit)" is the USER part of the registry, only the user who installs python can see that it is installed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 13:40:40 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 03 Aug 2017 17:40:40 +0000 Subject: [issue31114] 'make install' fails when exec_prefix is '/' and DESTDIR not empty Message-ID: <1501782040.16.0.9530512469.issue31114@psf.upfronthosting.co.za> New submission from Xavier de Gaye: The error messages: running install_lib creating /lib/python3.7 error: could not create '/lib/python3.7': Permission denied make[1]: *** [Makefile:1449: sharedinstall] Error 1 The command that triggers this failure: _PYTHON_PROJECT_BASE=/tmp/android-makesetup/build/python3.7-android-21-armv7 _PYTHON_HOST_PLATFORM=linux-arm PYTHONPATH=/tmp/android-makesetup/build/python3.7-android-21-armv7/build/lib.linux-arm-3.7:/src/python/master/Lib _PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_m_linux_ python /src/python/master/setup.py install \ --prefix=/ \ --install-scripts=//bin \ --install-platlib=//lib/python3.7/lib-dynload \ --root=/tmp/android-makesetup/build/python3.7-install-android-21-armv7/ Note how some paths in the setup.py options start with two slashes. The problem is that change_root() in Lib/distutils/util.py cannot concatenate 'root' with 'pathname' as 'pathname' starts with two slashes and therefore cannot be made relative by just removing one slash. The behavior of change_root() is correct (although it could be made more robust by calling os.path.normpath() first before removing the first slash) because according to POSIX a pathname starting with two slashes is implementation defined (but not when starting with three or more slashes). And normpath respects this rule: >>> from os.path import normpath >>> normpath('//tmp') '//tmp' >>> normpath('///tmp') '/tmp' However for most posix systems (possibly except Cygwin ?), a path starting with two slashes is the same path as the path starting with one slash. The problem lies with the Makefile. A workaround for the user is to set the --exec-prefix option to '/./' instead of '/' when running configure and this fixes the problem, the installation is successfull. So a fix could be to swap '/' for '/./' in configure itself. Maybe there is a better solution. References: issue 1676135: The changes made by this issue have excluded the case of '/' as there was a concern at that time that the sys.prefix value would be wrong. I have checked that sys.prefix is correct when '/' is changed to '/./' (on configure command line). This is because the determination of sys.prefix made by Lib/site.py is quite different now from what it was 10 years ago. issue 9674: This is exactly the same issue as this one. I have preferred to open a new issue here because the discussion on issue 9674 is focused on making changes to distutils while the problem is actually in the posixly incorrect use of paths starting with double slashes in the Makefile. ---------- components: Build messages: 299718 nosy: xdegaye priority: normal severity: normal status: open title: 'make install' fails when exec_prefix is '/' and DESTDIR not empty type: behavior versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 14:47:16 2017 From: report at bugs.python.org (Shea Craig) Date: Thu, 03 Aug 2017 18:47:16 +0000 Subject: [issue24502] OS X installer provides flat sub-packages with no version numbers In-Reply-To: <1435173121.58.0.153613185242.issue24502@psf.upfronthosting.co.za> Message-ID: <1501786036.63.0.780648109726.issue24502@psf.upfronthosting.co.za> Shea Craig added the comment: For what it's worth, I manage a lot of Macs and know a lot of people in similar roles at major enterprises. We greatly prefer installer packages for automated installation, and end up having to repackage installer apps routinely for products that don't use that mechanism. If it's not an app that can be dropped into the Applications folder, Apple installer packages really are the best format for enterprise deployment. >From the development side I'm not familiar enough with the advantages of trying to use a metapackage to bundle the contained packages, but I can say that the version numbers all being 0 causes me to have to do some extra work to ensure upgrades can be compared against what's already installed. I assume the metapackage is used to create the ability for the user to choose to exclude some of the subpackages. This is not a feature I use in deploying the software, although I recognize its utility. ---------- nosy: +Shea Craig _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 15:05:52 2017 From: report at bugs.python.org (Yaron de Leeuw) Date: Thu, 03 Aug 2017 19:05:52 +0000 Subject: [issue26901] Argument Clinic test is broken In-Reply-To: <1462108807.42.0.528462387786.issue26901@psf.upfronthosting.co.za> Message-ID: <1501787152.92.0.706797470763.issue26901@psf.upfronthosting.co.za> Yaron de Leeuw added the comment: I have done some diving and git bisecting into this. There are at least two issues: 1. `Clinic.__init__` no longer works without passing in a filename. Because soon after `if filename` in line 1726 [1] it calls `d('file')` which only works if there is a `file` buffer. This makes the odd line 38 [2] in clinic_test.py to fail miserably with sys.exit. Deleting this line results in a proper test failure (22 test fail out of 54), which is already much better than the sys exit message. 2. `Clinic` has shifted from using `field_destinations` to `destination_buffers` in issue 23500. The test code did not change accordingly. This means that we need to adapt the test code to the use `destination_buffers`, and add it to the regular test suite. The whole situation could only have happened because the test were not run regularly. I would like to tackle this, but I am not entirely sure yet what should the differences between FakeClinic and Clinic be. So I am studying it. Hints are welcome. [1] https://github.com/python/cpython/blob/6969eaf4682beb01bc95eeb14f5ce6c01312e297/Tools/clinic/clinic.py#L1726 [2] https://github.com/python/cpython/blob/6969eaf4682beb01bc95eeb14f5ce6c01312e297/Tools/clinic/clinic_test.py#L38 ---------- nosy: +jarondl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 15:12:35 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 03 Aug 2017 19:12:35 +0000 Subject: [issue31103] Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 In-Reply-To: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> Message-ID: <1501787555.54.0.525267278464.issue31103@psf.upfronthosting.co.za> Steve Dower added the comment: There's an existing bug for the registration going to the wrong place. It requires changes to the Wix toolset to resolve. No need to conflate it with this issue. As far as I can tell, the problem here is just the version string displayed in Programs and Features? Correct? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 17:04:49 2017 From: report at bugs.python.org (Robert McLeod) Date: Thu, 03 Aug 2017 21:04:49 +0000 Subject: [issue31115] Py3.6 threading/reference counting issues with `numexpr` Message-ID: <1501794289.11.0.944319221721.issue31115@psf.upfronthosting.co.za> New submission from Robert McLeod: I'm working on the development branch of the `numexpr` module and I've run into some problems on Python 3.6, where I seem to get a variety of errors relating to threading or reference counting errors. This module is commonly used for accelerating NumPy code, as it can parse an expression into a C-extension virtual machine program and break the calculations down into blocks which are then dispatched over multiple threads. I get similar errors on both Ubuntu 16.04 with GCC5.4 and Win7 with MSVC2015. I created an issue here where I provide some of the `gcc` error outputs. https://github.com/pydata/numexpr/issues/252 Typically I'm getting a different error on every run. We use a wrapper for Windows threads that emulated pthreads, and I found on Windows crashes occurred on calling the Windows system function `WaitForSingleObject(cond->sema, INFINITE);` in the file numexpr3/win32/pthread.c. I cannot replicate this problem in Python 2.7/3.4/3.5 on Windows or Linux. I'm using Anaconda in both instances, with nomkl NumPy on Linux and mkl NumPy on Windows. I tried valgrinding with Python 3.5 and 3.6, and I get numerous errors coming from places like pickle and ast (which the new NumExpr uses) in 3.6 and it's basically clean in 3.5. The logs are attached to the issue linked above. ---------- components: Extension Modules, Library (Lib) messages: 299722 nosy: Robert McLeod priority: normal severity: normal status: open title: Py3.6 threading/reference counting issues with `numexpr` type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 18:00:09 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 03 Aug 2017 22:00:09 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab In-Reply-To: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> Message-ID: <1501797609.13.0.752063641987.issue31002@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3032 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 18:08:32 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 03 Aug 2017 22:08:32 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab In-Reply-To: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> Message-ID: <1501798112.9.0.552165252113.issue31002@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I tried to minimize the changes to configdialog. There were more I wanted to make, like reorganizing the order of the functions, but I didn't want to make the diff too crazy. I changed some variable names because all of them had 'keys' in it and I couldn't keep track of them. It was almost as descriptive as single letter variables! ;-) I think I made the new names inline with what had been done on the font and general tabs. Again, there were more renaming changes I wanted to make (such as key_set to keyset), but I didn't want every line to be a diff. Also, I used the name 'keyset' to refer to the section names and the keybindings to refer to the option:value pairs. Some old vars in configdialog weren't changed to reflect this 100%, but the comment should be correct. I did not include deactivate_current_config and activate_config__changes since those are not really specific to keys. There are also invoked from themes and from apply. I have notes for some of the other coding changes I'd like to make once this is in its own class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 18:32:23 2017 From: report at bugs.python.org (Derek Wilson) Date: Thu, 03 Aug 2017 22:32:23 +0000 Subject: [issue31116] base85 z85 variant encoding Message-ID: <1501799542.97.0.652442678927.issue31116@psf.upfronthosting.co.za> New submission from Derek Wilson: Issue #17618 introduced base85 options into the base64 module including b85 and a85/adobe variants. There has since been introduced a variant that is easier to work with specifically as it avoids " ' \ characters which avoids quoting/escaping issues when working with base85 literals in python, json, xml, etc. https://rfc.zeromq.org/spec:32/Z85/ there is a reference implementation in c for which an extension could easily be built. alternately it would be very easy to add a _z85alphabet etc. to the base64 module to mirror what has been done with a/b85. 1) is there any interest in this being in the language 2) if so do we want python impl or c extension around ref impl? ---------- components: Library (Lib) messages: 299724 nosy: underrun priority: normal severity: normal status: open title: base85 z85 variant encoding type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 18:37:21 2017 From: report at bugs.python.org (Benjamin Swan) Date: Thu, 03 Aug 2017 22:37:21 +0000 Subject: [issue31117] Intersphinx file objects.inv missing 'list' from py:class Message-ID: <1501799841.44.0.68321420837.issue31117@psf.upfronthosting.co.za> New submission from Benjamin Swan: The objects.inv file my project pulls in for python 2 (https://docs.python.org/2/objects.inv) no longer contains an entry of list under py:class. This is causing sphinx to output WARNING: py:obj reference target not found: list for intershpinx links to the list class. ---------- messages: 299725 nosy: Benjamin Swan priority: normal severity: normal status: open title: Intersphinx file objects.inv missing 'list' from py:class versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 19:26:26 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Aug 2017 23:26:26 +0000 Subject: [issue31117] Intersphinx file objects.inv missing 'list' from py:class In-Reply-To: <1501799841.44.0.68321420837.issue31117@psf.upfronthosting.co.za> Message-ID: <1501802786.08.0.0544002128445.issue31117@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Built-in list disappeared from Python 2.7 intersphinx inventory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 19:54:21 2017 From: report at bugs.python.org (Benjamin Swan) Date: Thu, 03 Aug 2017 23:54:21 +0000 Subject: [issue30882] Built-in list disappeared from Python 2.7 intersphinx inventory In-Reply-To: <1499622808.04.0.381858845257.issue30882@psf.upfronthosting.co.za> Message-ID: <1501804461.77.0.0455141285333.issue30882@psf.upfronthosting.co.za> Changes by Benjamin Swan : ---------- nosy: +Benjamin Swan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 20:45:14 2017 From: report at bugs.python.org (Robert Xiao) Date: Fri, 04 Aug 2017 00:45:14 +0000 Subject: [issue29427] Option to skip padding for base64 urlsafe encoding/decoding In-Reply-To: <1486085117.43.0.563120448637.issue29427@psf.upfronthosting.co.za> Message-ID: <1501807514.15.0.51723633216.issue29427@psf.upfronthosting.co.za> Robert Xiao added the comment: This sounds reasonable. I ran into a similar issue today trying to decode a JSON Web Key. Although I don't have any real say, I'd say that if you put together a patch it may have a higher chance to get reviewed. I wonder about the following: - What about adding a new kwarg to b64decode, passed through by urlsafe_b64decode, called "checkpad=True" which validates padding? Then we can just set that False when we need. - At the same time it might be nice to pass "validate=False" through from urlsafe_b64decode and friends, so we can have some nicer validation of data. - I like adding the "padding=True" arg to encode, but it may not be necessary given the ease of ".rstrip('=')" as an alternative. Anyway, if you will add it to encode, please add it to b64encode and pass through from the variant encoders to unify the API somewhat. If you are still interested in putting together a patch, post a comment. Otherwise I may work on a patch for this. ---------- nosy: +nneonneo versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 21:43:52 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 04 Aug 2017 01:43:52 +0000 Subject: [issue27470] -3 commandline option documented differently via man In-Reply-To: <1467994985.16.0.513883147731.issue27470@psf.upfronthosting.co.za> Message-ID: <1501811032.51.0.22701394022.issue27470@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 21:56:43 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Aug 2017 01:56:43 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1501811803.97.0.440676297921.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Next patch should correct bp0-30723. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 22:00:15 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 04 Aug 2017 02:00:15 +0000 Subject: [issue27470] -3 commandline option documented differently via man In-Reply-To: <1467994985.16.0.513883147731.issue27470@psf.upfronthosting.co.za> Message-ID: <1501812015.36.0.155317650264.issue27470@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset dd6e4aa113c6db4fcf9d252b5063ab217e8330a2 by Mariatta (Subhendu Ghosh) in branch '2.7': bpo-27470: Improve doc for commandline -3 option https://github.com/python/cpython/commit/dd6e4aa113c6db4fcf9d252b5063ab217e8330a2 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 22:02:55 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 04 Aug 2017 02:02:55 +0000 Subject: [issue27470] -3 commandline option documented differently via man In-Reply-To: <1467994985.16.0.513883147731.issue27470@psf.upfronthosting.co.za> Message-ID: <1501812175.76.0.590199755577.issue27470@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 22:46:50 2017 From: report at bugs.python.org (Louie Lu) Date: Fri, 04 Aug 2017 02:46:50 +0000 Subject: [issue30723] IDLE parenmatch - left and right highlighting, independent flash-delay In-Reply-To: <1498051390.64.0.726208179666.issue30723@psf.upfronthosting.co.za> Message-ID: <1501814810.1.0.998666657424.issue30723@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +3033 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 22:53:30 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Aug 2017 02:53:30 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1501815210.38.0.344329050691.issue19903@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: test needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 3 22:55:15 2017 From: report at bugs.python.org (paul j3) Date: Fri, 04 Aug 2017 02:55:15 +0000 Subject: [issue31012] suggestion: allow termination argument in argparse to be specified as argument In-Reply-To: <1500903609.87.0.148585957188.issue31012@psf.upfronthosting.co.za> Message-ID: <1501815315.82.0.163164938423.issue31012@psf.upfronthosting.co.za> paul j3 added the comment: The earlier issue for '--' as arguement http://bugs.python.org/issue14364 With the patch I suggested there '-f--' and '--foo=--' work as arguments. '--foo --' is still interpreted as a positionals switch. In optparse parsing, a flagged option gets all the remaining strings, and consume what it needs. In the argparse parser, strings are classed as flag and argument and '--'. The top level allocates strings to Actions. '--' is handled at the top level. This difference in parsing makes it impossible to complete replicate POSIX action. See also http://bugs.python.org/issue13922 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 00:55:12 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Aug 2017 04:55:12 +0000 Subject: [issue29910] Ctrl-D eats a character on IDLE In-Reply-To: <1490549101.95.0.397312441336.issue29910@psf.upfronthosting.co.za> Message-ID: <1501822512.6.0.59766159378.issue29910@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3034 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 01:01:30 2017 From: report at bugs.python.org (Rajath Agasthya) Date: Fri, 04 Aug 2017 05:01:30 +0000 Subject: [issue31029] test_tokenize fails when run directly In-Reply-To: <1500985522.57.0.56152485573.issue31029@psf.upfronthosting.co.za> Message-ID: <1501822890.05.0.348491751618.issue31029@psf.upfronthosting.co.za> Changes by Rajath Agasthya : ---------- pull_requests: +3035 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 01:06:58 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Aug 2017 05:06:58 +0000 Subject: [issue29910] Ctrl-D eats a character on IDLE In-Reply-To: <1490549101.95.0.397312441336.issue29910@psf.upfronthosting.co.za> Message-ID: <1501823218.99.0.2604463669.issue29910@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Adding 'break' to parenmatch.paren_closed_event prevented ')' from closing calltips. Removing it reverts the regression. I am leaving this open to re-review the other optional changes to see if ')' is unique or if anything else is being caught that needs to pass I am thinking that 'break' should perhaps be limited to events that are associated with user-settable control sequences (those with modifiers other than Shift). I am still looking at calltip_w.py to see whether, if the bindings were reversed, ')' could close a calltip but not pass on to parenmatch. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 02:25:20 2017 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 04 Aug 2017 06:25:20 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1501827920.24.0.391598389792.issue30717@psf.upfronthosting.co.za> Stefan Behnel added the comment: Wouldn't this be a typical case where we'd expect a module to evolve and gain usage on PyPI first, before adding it to the stdlib? Searching for "grapheme" in PyPI gives some results for me. Even if they do not cover what this ticket asks for, they might give inspiration for a suitable API design. And I'm probably missing other related packages by lack of a better search term. https://pypi.python.org/pypi?%3Aaction=search&term=grapheme ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 02:39:13 2017 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 04 Aug 2017 06:39:13 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1501828753.6.0.390382968881.issue31113@psf.upfronthosting.co.za> Stefan Behnel added the comment: I've looked at the file and it contains a huge amount of deeply nested if-statements. Given that parsers and compilers are typically recursive, I can well imagine that this is a problem, and my guess is that it's most likely just the different C level stack sizes, stack configurations and C compiler dependent stack allocation per function call that makes a difference for the platforms you tested. It would probably also crash on Linux, just for an even larger program. I'm actually not in the position to decide if something should be done about this, so I'm asking in Antoine for a comment. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 02:42:55 2017 From: report at bugs.python.org (Ashwini Chaudhary) Date: Fri, 04 Aug 2017 06:42:55 +0000 Subject: [issue31118] Make super() work with staticmethod by using __class__ for both arguments to super() Message-ID: <1501828975.1.0.737825658034.issue31118@psf.upfronthosting.co.za> New submission from Ashwini Chaudhary: >From this question I noticed that super() doesn't work with static methods with no arguments: https://stackoverflow.com/q/45498675/846892 My question is what's the issue with using __class__ for both arguments to super() in case of static method? Or was it just an oversight. ---------- messages: 299733 nosy: ashwch priority: normal severity: normal status: open title: Make super() work with staticmethod by using __class__ for both arguments to super() type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 02:44:18 2017 From: report at bugs.python.org (Ashwini Chaudhary) Date: Fri, 04 Aug 2017 06:44:18 +0000 Subject: [issue31118] Make super() work with staticmethod by using __class__ for both arguments to super() In-Reply-To: <1501828975.1.0.737825658034.issue31118@psf.upfronthosting.co.za> Message-ID: <1501829058.49.0.851651843764.issue31118@psf.upfronthosting.co.za> Changes by Ashwini Chaudhary : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 02:46:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Aug 2017 06:46:38 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1501829198.48.0.382825121448.issue30717@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The well known library for Unicode support in C++ and Java is ICU (International Components for Unicode). There is a Python wrapper [1]. This is a large complex library that covers many aspects of Unicode support. It's interface looks rather Javaic than Pythonic. Some parts of it already are covered by other parts of the stdlib (the str class, the codecs and locale modules). [1] https://pypi.python.org/pypi/PyICU/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 02:47:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Aug 2017 06:47:25 +0000 Subject: [issue31118] Make super() work with staticmethod by using __class__ for both arguments to super() In-Reply-To: <1501828975.1.0.737825658034.issue31118@psf.upfronthosting.co.za> Message-ID: <1501829245.26.0.259958818429.issue31118@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 02:48:19 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 04 Aug 2017 06:48:19 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1501829299.27.0.750562697449.issue15988@psf.upfronthosting.co.za> Oren Milman added the comment: How do we proceed? should I update (if needed) each of the patches I uploaded in March to eliminate commit conflicts? or can someone review them as they are now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 04:36:33 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 04 Aug 2017 08:36:33 +0000 Subject: [issue31119] Signal tripped flags need memory barriers Message-ID: <1501835793.8.0.586485802562.issue31119@psf.upfronthosting.co.za> New submission from Nathaniel Smith: Sometimes, CPython's signal handler (signalmodule.c:signal_handler) runs in a different thread from the main thread. On Unix this is rare but it does happen (esp. for SIGCHLD), and on Windows it happens 100% of the time. It turns out that there is a subtle race condition that means such signals can be lost. To notify the main thread that a signal has been received, and which signal it is, CPython's signal handler sets two global variables: Handlers[sig_num].tripped = 1; is_tripped = 1 And then PyErr_CheckSignals does: if (is_tripped) { is_tripped = 0; for (i = 1; i < NSIG; i++) { if (Handlers[i].is_tripped) { ... run signal handler ... } } } As some comments in the source note, this logic depends strongly on the assumption that when the signal handler sets the two flags, they are immediately visible to PyErr_CheckSignals, and that the two assignments happen in the given order. For example, suppose that is_tripped were set before Handlers[i].is_tripped. Then we could have the following sequence: 1. Thread A sets is_tripped = 1 2. Thread B runs PyErr_CheckSignals 3. Thread B notices is_tripped == 1, and sets it to 0 4. Thread B scans through all the Handlers, sees that none are set, and carries on 5. Thread A sets Handlers[i].is_tripped = 1 In this case the signal is lost until another signal arrives, which may not happen until an arbitrary amount of time has passed. Also, the fix for bpo-30038 (making sure that we set the flags before writing to the wakeup fd) assumes that setting the flags before writing to the wakeup fd means that, well, the flags will be written before the fd. However, when you have code running in separate threads, none of this is actually guaranteed. In general, the compiler is free to re-order writes, and more perniciously, the hardware memory hierarchy is also free to arbitrarily delay when writes to RAM made by one CPU become visible to another CPU, which can also create arbitrary reorderings. In an attempt to avoid these issues, signalmodule.c declares the signal flags as 'volatile sig_atomic_t'. However, the best one can hope for from this is that it'll stop the *compiler* from reordering writes. It does nothing to stop the *hardware* from reordering writes. Using volatile like this might be sufficient if the signal handler runs in the main thread, but not if it runs in another thread. The correct way to handle this is to use the primitives in pyatomic.h to get/set the tripped flags. ---- I noticed this because of the same test case that was failing due to bpo-30038... this thing has been frustrating me for months because it's intermittent and never seems to happen on my local VM. But specifically what I'm seeing at this point is: Thread A (the thread where the signal handler runs): A1. takes a lock. A2. with the lock held, calls the C function raise(SIGINT), which directly calls the CPython C-level signal handler. (Verified by consulting the Windows C runtime source.) A3. writes to the wakeup fd & sets both tripped flags, in whatever order A4. releases the lock Simultaneously, in thread B (the main thread): B1. observes that the wakeup fd has been written to B2. takes the lock B3. releases the lock B4. calls repr(), which unconditionally calls PyObject_Repr, which unconditionally calls PyErr_CheckSignals I expect the call in B4 to run the Python-level signal handler, but this does not happen. Instead it runs some time later, causing an unexpected KeyboardInterrupt. My reasoning is: the lock guarantees that no matter what the internal details of the C-level signal handler actually are, they have to all be complete before my code checks for signals. In excruciating detail: - the write to the wakeup fd must happen-after the lock is acquired (A1) - therefore, step B1 happens-after step A1 - B2 happens-after B1, so B2 happens-after A1. - B2 takes the same lock as A1, so if B2 happens-after A1, it must also happen-after A4, when the lock is released. - step B4 happens-after B2, therefore it happens-after A4 and A3. Therefore the tripped flags should be visible and the Python-level signal handler should run. Yet this does not happen, so *something* really weird is going on. The hypothesis that it's the lack of memory barriers both explains how this could happen -- specifically I think thread B may be running PyErr_CheckSignals as part of the wakeup-fd reading logic, and it's clearing is_tripped before Handlers[i].tripped becomes visible, like in my code above. And it also explains why it happens in like 1/50 runs in Appveyor, but never on my local Windows 10 VM that only has 1 virtual CPU. But regardless of whether this is the cause of my particular weird bug, it clearly *is* a bug and should be fixed. ---------- messages: 299736 nosy: haypo, njs priority: normal severity: normal status: open title: Signal tripped flags need memory barriers type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 04:45:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 04 Aug 2017 08:45:05 +0000 Subject: [issue31107] copyreg does not properly mangle __slots__ names In-Reply-To: <1501699994.79.0.0201468057837.issue31107@psf.upfronthosting.co.za> Message-ID: <1501836305.82.0.71962987277.issue31107@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c4c9866064f03646c686d7e08b00aeb203c35c19 by Serhiy Storchaka (Shane Harvey) in branch 'master': bpo-31107: Fix copyreg mangled slot names calculation. (#2989) https://github.com/python/cpython/commit/c4c9866064f03646c686d7e08b00aeb203c35c19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 07:41:14 2017 From: report at bugs.python.org (Johannes Lade) Date: Fri, 04 Aug 2017 11:41:14 +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: <1501846874.37.0.831716987005.issue23702@psf.upfronthosting.co.za> Johannes Lade added the comment: This is still a problem. Can please somebody fix this? There are already enough confusing discussion full of wrong information about this topic, so it would be nice if the official documentation would get it right. Also there's multiple Issues for this. Can they be combined into one? Just one example I found: on https://docs.python.org/3.5/howto/descriptor.html#functions-and-methods Documentation: >>> class D(object): ... def f(self, x): ... return x ... >>> d = D() >>> D.__dict__['f'] # Stored internally as a function >>> D.f # Get from a class becomes an unbound method >>> d.f # Get from an instance becomes a bound method > ipython3.5.3 In [1]: class D(object): ...: ... def f(self, x): ...: ... return x ...: ... In [2]: d = D() In [3]: D.__dict__['f'] # Stored internally as a function Out[3]: In [4]: D.f # Get from a class becomes an unbound method Out[4]: In [5]: d.f # Get from an instance becomes a bound method Out[5]: > ---------- nosy: +Johannes Lade _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 07:44:29 2017 From: report at bugs.python.org (Johannes Lade) Date: Fri, 04 Aug 2017 11:44:29 +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: <1501847069.3.0.628497285824.issue23702@psf.upfronthosting.co.za> Johannes Lade added the comment: And sorry for my lousy manners. Of course I appreciate all the hard work you do! It's just frustrating when you get confused by doc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 07:58:39 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 04 Aug 2017 11:58:39 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1501847919.44.0.729793756433.issue31106@psf.upfronthosting.co.za> ???? ????????? added the comment: man posix_fallocate: RETURN VALUE posix_fallocate() returns zero on success, or an error number on failure. Note that errno is not set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 08:12:23 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 04 Aug 2017 12:12:23 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1501848743.91.0.723234121405.issue31106@psf.upfronthosting.co.za> ???? ????????? added the comment: Also, EINTR will not be caught too (!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 08:37:31 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 04 Aug 2017 12:37:31 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1501850251.69.0.234559258108.issue31106@psf.upfronthosting.co.za> Changes by ???? ????????? : ---------- pull_requests: +3036 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 08:38:50 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 04 Aug 2017 12:38:50 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1501850330.57.0.909869893733.issue31106@psf.upfronthosting.co.za> ???? ????????? added the comment: https://github.com/python/cpython/pull/3000 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 09:02:50 2017 From: report at bugs.python.org (Hiren Vadalia) Date: Fri, 04 Aug 2017 13:02:50 +0000 Subject: [issue31120] [2.7] Python 64 bit _ssl compile fails due missing buildinf_amd64.h Message-ID: <1501851770.24.0.114310480088.issue31120@psf.upfronthosting.co.za> New submission from Hiren Vadalia: I am trying to compile Python 2.7.13 (https://github.com/python/cpython/tree/9c1426de7521299f70eb5483e7e25d1c2a73dbbd) in 64 bit but I am getting following error: Build started: Project: _ssl, Configuration: Release|x64 Performing Pre-Build Event... Found a working perl at 'c:\perl\bin\perl.exe' Traceback (most recent call last): File "build_ssl.py", line 248, in main() File "build_ssl.py", line 231, in main shutil.copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h") File "C:\projects\windows-work\cpython-2.7.13\lib\shutil.py", line 119, in copy copyfile(src, dst) File "C:\projects\windows-work\cpython-2.7.13\lib\shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: 'crypto\\buildinf_amd64.h' Project : error PRJ0019: A tool returned an error code from "Performing Pre-Build Event..." Build log was saved at "file://C:\projects\windows-work\cpython-2.7.13\PC\VS9.0\x64-temp-Release\_ssl\BuildLog.htm" _ssl - 1 error(s), 0 warning(s) Build started: Project: _hashlib, Configuration: Release|x64 Performing Pre-Build Event... Found a working perl at 'c:\perl\bin\perl.exe' Traceback (most recent call last): File "build_ssl.py", line 248, in main() File "build_ssl.py", line 231, in main shutil.copy(r"crypto\buildinf_%s.h" % arch, r"crypto\buildinf.h") File "C:\projects\windows-work\cpython-2.7.13\lib\shutil.py", line 119, in copy copyfile(src, dst) File "C:\projects\windows-work\cpython-2.7.13\lib\shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: 'crypto\\buildinf_amd64.h' Project : error PRJ0019: A tool returned an error code from "Performing Pre-Build Event..." Build log was saved at "file://C:\projects\windows-work\cpython-2.7.13\PC\VS9.0\x64-temp-Release\_hashlib\BuildLog.htm" _hashlib - 1 error(s), 0 warning(s) Build complete: 23 Projects succeeded, 2 Projects failed, 1 Projects skipped Then I did some search here + buildbots and I found there is already bug for it: https://bugs.python.org/issue30368 which seems to be fixed for upcoming Python 2.7.14 release. Also I found that for commit 9c1426de7521299f70eb5483e7e25d1c2a73dbbd AMD64 buildbot has failed build (http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%20VS9.0%202.7/builds/23/) ---------- assignee: christian.heimes components: Build, SSL messages: 299743 nosy: Hiren Vadalia, christian.heimes priority: normal severity: normal status: open title: [2.7] Python 64 bit _ssl compile fails due missing buildinf_amd64.h type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 09:03:37 2017 From: report at bugs.python.org (Hiren Vadalia) Date: Fri, 04 Aug 2017 13:03:37 +0000 Subject: [issue31120] [2.7] Python 64 bit _ssl compile fails due missing buildinf_amd64.h In-Reply-To: <1501851770.24.0.114310480088.issue31120@psf.upfronthosting.co.za> Message-ID: <1501851817.64.0.525660205253.issue31120@psf.upfronthosting.co.za> Hiren Vadalia added the comment: I did some more digging into this and I found something strange: So while compiling Python, it downloads externals from http://svn.python.org/projects/external/ Above site has many version of openssl so I looked into all openssl directory and found that from openssl version 0.9.8g we have ?buildinf_amd64.h? file under http://svn.python.org/projects/external/openssl-0.9.8g/crypto/ till openssl version 1.0.2f and after that we don?t have ?*_amd64.h? file under openssl-*/crypro directory and that is the reason 64 bit build is failing when user tries to compile Python 2.7.13 using PC\VS9.0 build scripts + Visual Studio 2008. Since all openssl source on http://svn.python.org/projects/external/ is pre-configured, don?t you guys think we should have *_amd64.h file under openssl-*/crypto directory? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 09:06:00 2017 From: report at bugs.python.org (Hiren Vadalia) Date: Fri, 04 Aug 2017 13:06:00 +0000 Subject: [issue31120] [2.7] Python 64 bit _ssl compile fails due missing buildinf_amd64.h In-Reply-To: <1501851770.24.0.114310480088.issue31120@psf.upfronthosting.co.za> Message-ID: <1501851960.38.0.237712679214.issue31120@psf.upfronthosting.co.za> Hiren Vadalia added the comment: Just another update I had chat with Zach for this on core-mentorship at python.org and he suggested to supply a patch which I will submit soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 09:09:56 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 04 Aug 2017 13:09:56 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1501852196.49.0.0375995614425.issue31106@psf.upfronthosting.co.za> ???? ????????? added the comment: All checks passed. Please merge. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 09:20:05 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 04 Aug 2017 13:20:05 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1501852805.52.0.754164102936.issue31106@psf.upfronthosting.co.za> ???? ????????? added the comment: posix_fadvise() is also affected :( Fixed in this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 09:21:51 2017 From: report at bugs.python.org (Hiren Vadalia) Date: Fri, 04 Aug 2017 13:21:51 +0000 Subject: [issue31120] [2.7] Python 64 bit _ssl compile fails due missing buildinf_amd64.h In-Reply-To: <1501851770.24.0.114310480088.issue31120@psf.upfronthosting.co.za> Message-ID: <1501852911.77.0.16596850796.issue31120@psf.upfronthosting.co.za> Changes by Hiren Vadalia : ---------- keywords: +patch Added file: http://bugs.python.org/file47057/openssl-1.0.2j.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 10:03:56 2017 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 04 Aug 2017 14:03:56 +0000 Subject: [issue31121] Unable to exit pdb when script becomes invalid Message-ID: <1501855436.72.0.136626793025.issue31121@psf.upfronthosting.co.za> New submission from Jason R. Coombs: Similar to #16180 and possible a duplicate of #14743, if the script being run under pdb becomes invalid such as through a chdir operation, pdb will get trapped in a loop, catching its own exception. $ mkdir foo $ cat > foo/script.py import os os.chdir('foo') $ python -m pdb foo/script.py > /Users/jaraco/Dropbox/code/privacymate/harvester/foo/script.py(1)() -> import os (Pdb) c The program finished and will be restarted Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pdb.py", line 1667, in main pdb._runscript(mainpyfile) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pdb.py", line 1545, in _runscript with open(filename, "rb") as fp: FileNotFoundError: [Errno 2] No such file or directory: 'foo/script.py' Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pdb.py(1545)_runscript() -> with open(filename, "rb") as fp: (Pdb) q Post mortem debugger finished. The foo/script.py will be restarted Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pdb.py", line 1667, in main pdb._runscript(mainpyfile) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pdb.py", line 1545, in _runscript with open(filename, "rb") as fp: FileNotFoundError: [Errno 2] No such file or directory: 'foo/script.py' Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pdb.py(1545)_runscript() -> with open(filename, "rb") as fp: (Pdb) q Post mortem debugger finished. The foo/script.py will be restarted Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pdb.py", line 1667, in main pdb._runscript(mainpyfile) File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pdb.py", line 1545, in _runscript with open(filename, "rb") as fp: FileNotFoundError: [Errno 2] No such file or directory: 'foo/script.py' Uncaught exception. Entering post mortem debugging Running 'cont' or 'step' will restart the program > /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pdb.py(1545)_runscript() -> with open(filename, "rb") as fp: (Pdb) I suggest PDB should always pass exceptions when the stack trace terminates in the pdb module. ---------- components: Library (Lib) messages: 299748 nosy: jason.coombs priority: normal severity: normal status: open title: Unable to exit pdb when script becomes invalid versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 10:05:37 2017 From: report at bugs.python.org (Hiren Vadalia) Date: Fri, 04 Aug 2017 14:05:37 +0000 Subject: [issue31120] [2.7] Python 64 bit _ssl compile fails due missing buildinf_amd64.h In-Reply-To: <1501851770.24.0.114310480088.issue31120@psf.upfronthosting.co.za> Message-ID: <1501855537.04.0.419222047085.issue31120@psf.upfronthosting.co.za> Changes by Hiren Vadalia : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 10:14:35 2017 From: report at bugs.python.org (Zachary Ware) Date: Fri, 04 Aug 2017 14:14:35 +0000 Subject: [issue31120] [2.7] Python 64 bit _ssl compile fails due missing buildinf_amd64.h In-Reply-To: <1501851770.24.0.114310480088.issue31120@psf.upfronthosting.co.za> Message-ID: <1501856075.28.0.836531509665.issue31120@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- assignee: christian.heimes -> zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 10:24:48 2017 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 04 Aug 2017 14:24:48 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1501856688.48.0.0322942650839.issue31113@psf.upfronthosting.co.za> Stefan Behnel added the comment: Regarding the user side of the problem, you might(!) be able to work around the crash by merging nested if-conditions into and-expressions if they have no elif/else. That's also why the split into multiple files doesn't help, it's the depth of the nesting and the overall code complexity that strike here, not the total length of the program. Side note: just for fun, I compiled your file with Cython. It took a few minutes and then generated a 1.1 GB C file :D - hadn't seen it do that before. That's 31MB xz compressed. I was sure it would crash my C compiler if I tried to compile that, but since processing time and renewable energy are cheap these days, I gave it a try. Now "gcc -O3" is still working on it after 7 hours, currently using some 8.5 GB of RAM. It's probably worth first recompiling gcc itself with proper C compiler flags next time... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 10:29:36 2017 From: report at bugs.python.org (Manuel Krebber) Date: Fri, 04 Aug 2017 14:29:36 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1501856976.49.0.391636436073.issue31113@psf.upfronthosting.co.za> Manuel Krebber added the comment: I have already tried to reduce the nesting, but it still crashes. I have to admit that ~20 levels of nesting are still quite a lot. But I am surprised that so few levels of nesting already are a problem for the parser... I have attached the generated code with reduced nesting. ---------- Added file: http://bugs.python.org/file47058/generated.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 10:48:16 2017 From: report at bugs.python.org (Segev Finer) Date: Fri, 04 Aug 2017 14:48:16 +0000 Subject: [issue26618] _overlapped extension module of asyncio uses deprecated WSAStringToAddressA() function In-Reply-To: <1458729832.02.0.462446337559.issue26618@psf.upfronthosting.co.za> Message-ID: <1501858096.69.0.815723342308.issue26618@psf.upfronthosting.co.za> Segev Finer added the comment: It was fixed here: https://github.com/python/cpython/commit/cc16be85c0b7119854c00fb5c666825deef641cf#diff-1308fc2ab05154373172f10e931c78f0L986. So it's fixed for 3.6 and 3.7, but not in 3.5. ---------- nosy: +Segev Finer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 11:01:52 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Aug 2017 15:01:52 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1501858912.96.0.565164439724.issue31113@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not an expert in the compiler myself. ---------- nosy: +benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 11:33:19 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 04 Aug 2017 15:33:19 +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: <1501860799.44.0.532506528842.issue23702@psf.upfronthosting.co.za> Raymond Hettinger added the comment: We have a sprint in early September and I'll fix it then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 13:52:51 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 04 Aug 2017 17:52:51 +0000 Subject: [issue30841] Fix a variable shadowing warning in Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1501869171.71.0.510977546051.issue30841@psf.upfronthosting.co.za> ?ukasz Langa added the comment: The actual change is just three lines in asdl_c.py. Python-ast.c is generated. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 13:59:28 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 04 Aug 2017 17:59:28 +0000 Subject: [issue30841] Fix a variable shadowing warning in Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1501869568.44.0.0157545675745.issue30841@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- pull_requests: +3037 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 14:00:35 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 04 Aug 2017 18:00:35 +0000 Subject: [issue30841] Fix a variable shadowing warning in Python-ast.c In-Reply-To: <1499109660.71.0.721864284128.issue30841@psf.upfronthosting.co.za> Message-ID: <1501869635.13.0.331967076142.issue30841@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Thanks! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 14:27:04 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 04 Aug 2017 18:27:04 +0000 Subject: [issue31119] Signal tripped flags need memory barriers In-Reply-To: <1501835793.8.0.586485802562.issue31119@psf.upfronthosting.co.za> Message-ID: <1501871224.36.0.969610585816.issue31119@psf.upfronthosting.co.za> Nathaniel Smith added the comment: On further investigation (= a few hours staring at the ceiling last night), it looks like there's another explanation for my particular bug... which is good, because on further investigation (= a few hours squinting at google results) it looks like this probably can't happen on x86/x86-64 (I think? maybe?). It's still true though that you can't just throw in a 'volatile' and expect cross-thread synchronization to work -- that's not C's semantics, and it's not true on popular architectures like ARM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 14:29:46 2017 From: report at bugs.python.org (Markus Kramer) Date: Fri, 04 Aug 2017 18:29:46 +0000 Subject: [issue31103] Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 In-Reply-To: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> Message-ID: <1501871386.67.0.080362194111.issue31103@psf.upfronthosting.co.za> Markus Kramer added the comment: Steve, yes: from my point of view, the version in "Programs and Features" should be 3.6.2 or 3.6.2.0 or 3.6.2.150. Eryk, thank you for your explanation - I had a wrong memory about the third field in ProductVersion to be the micro version and learned something. If that would be helpful, I could change the title of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 15:07:06 2017 From: report at bugs.python.org (Damon Atkins) Date: Fri, 04 Aug 2017 19:07:06 +0000 Subject: [issue31103] Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 In-Reply-To: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> Message-ID: <1501873626.13.0.815789687918.issue31103@psf.upfronthosting.co.za> Damon Atkins added the comment: To Summaries A) Name/DisplayName "Python 3.X (64-bit)" or "Python 3.X.Y" (64-bit) "Python 3.X (64-bit)" would match the install directory which is \Python3X (this should be \Python3.X) Display Version should start with 3.X.Y or 3.X.Y. version DWORD in the registry does not need to be set but if set would need to be 3.X.Y B) Registry being placed in in the wrong location HKU\\Software\Microsoft\Windows\CurrentVersion\Uninstall\{GUID} should be going into HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall C) Suggest the default install dir is "c:\Program Files\Python3.6" instead of "c:\Program Files\Python36" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 15:16:41 2017 From: report at bugs.python.org (Nikolaus Rath) Date: Fri, 04 Aug 2017 19:16:41 +0000 Subject: [issue31122] SSLContext.wrap_socket() throws OSError with errno == 0 Message-ID: <1501874201.48.0.0126792321555.issue31122@psf.upfronthosting.co.za> New submission from Nikolaus Rath: With a particularly atrocious network connection, I often get the following exception: File "/usr/lib/python3/dist-packages/dugong/__init__.py", line 503, in connect self._sock = self.ssl_context.wrap_socket(self._sock, server_hostname=server_hostname) File "/usr/lib/python3.5/ssl.py", line 385, in wrap_socket _context=self) File "/usr/lib/python3.5/ssl.py", line 760, in __init__ self.do_handshake() File "/usr/lib/python3.5/ssl.py", line 996, in do_handshake self._sslobj.do_handshake() File "/usr/lib/python3.5/ssl.py", line 641, in do_handshake self._sslobj.do_handshake() OSError: [Errno 0] Error I don't think an error with errno == 0 should ever be raised by Python. ---------- assignee: christian.heimes components: SSL messages: 299759 nosy: christian.heimes, nikratio priority: normal severity: normal status: open title: SSLContext.wrap_socket() throws OSError with errno == 0 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 16:30:33 2017 From: report at bugs.python.org (Armin Rigo) Date: Fri, 04 Aug 2017 20:30:33 +0000 Subject: [issue31119] Signal tripped flags need memory barriers In-Reply-To: <1501835793.8.0.586485802562.issue31119@psf.upfronthosting.co.za> Message-ID: <1501878633.5.0.772183391604.issue31119@psf.upfronthosting.co.za> Armin Rigo added the comment: For reference, no, it can't happen on x86 or x86-64. I've found that this simplified model actually works for reasoning about ordering at the hardware level: think about each core as a cache-less machine that always *reads* from the central RAM, but that has a delay for writes---i.e. writes issued by a core are queued internally, and actually sent to the central RAM at some unspecified later time, but in order. (Of course that model fails on other machines like ARM.) ---------- nosy: +arigo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 16:42:54 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Fri, 04 Aug 2017 20:42:54 +0000 Subject: [issue31119] Signal tripped flags need memory barriers In-Reply-To: <1501835793.8.0.586485802562.issue31119@psf.upfronthosting.co.za> Message-ID: <1501879374.51.0.530694363192.issue31119@psf.upfronthosting.co.za> Nathaniel Smith added the comment: @arigo: Technically we also need that the writes to memory are observed to happen-before the write() call on the wakeup fd, which is not something that Intel is going to make any guarantees about. But *probably* this is also safe because the kernel has to use some kind of cross-CPU synchronization to wake up the read()ing thread, and that imposes a memory barrier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 17:06:16 2017 From: report at bugs.python.org (Shane Harvey) Date: Fri, 04 Aug 2017 21:06:16 +0000 Subject: [issue31107] copyreg does not properly mangle __slots__ names In-Reply-To: <1501699994.79.0.0201468057837.issue31107@psf.upfronthosting.co.za> Message-ID: <1501880776.91.0.170652704236.issue31107@psf.upfronthosting.co.za> Changes by Shane Harvey : ---------- pull_requests: +3038 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 17:06:56 2017 From: report at bugs.python.org (Shane Harvey) Date: Fri, 04 Aug 2017 21:06:56 +0000 Subject: [issue31107] copyreg does not properly mangle __slots__ names In-Reply-To: <1501699994.79.0.0201468057837.issue31107@psf.upfronthosting.co.za> Message-ID: <1501880816.97.0.696558003893.issue31107@psf.upfronthosting.co.za> Changes by Shane Harvey : ---------- pull_requests: +3039 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 17:54:36 2017 From: report at bugs.python.org (Robert McLeod) Date: Fri, 04 Aug 2017 21:54:36 +0000 Subject: [issue31115] Py3.6 threading/reference counting issues with `numexpr` In-Reply-To: <1501794289.11.0.944319221721.issue31115@psf.upfronthosting.co.za> Message-ID: <1501883676.03.0.973059545653.issue31115@psf.upfronthosting.co.za> Robert McLeod added the comment: After building with Python3.7 I was able to get a useful error message that `PyMem` functions were being called inside GIL release. I will replace these with C-equivalents and try with Python 3.6. Fatal Python error: Python memory allocator called without holding the GIL Thread 0x0000000004044e00 (most recent call first): File "/home/rmcleod/py37/lib/python3.7/site-packages/numexpr3-3.0==19176== ==19176== Process terminating with default action of signal 6 (SIGABRT) ==19176== at 0x579C428: raise (raise.c:54) ==19176== by 0x579E029: abort (abort.c:89) ==19176== by 0x422DF7: Py_FatalError (pylifecycle.c:1849) ==19176== by 0x41ED4C: _PyMem_DebugCheckGIL (obmalloc.c:1972) ==19176== by 0x41ED23: _PyMem_DebugMalloc (obmalloc.c:1980) ==19176== by 0x41FCAC: PyMem_Malloc (obmalloc.c:418) ==19176== by 0xCEA1920: NumExprObject_copy_threadsafe(NumExprObject const*) (interpreter.cpp:147) ==19176== by 0xCEA77CE: th_worker(void*) (module.cpp:73) ==19176== by 0x4E416B9: start_thread (pthread_create.c:333) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 19:22:19 2017 From: report at bugs.python.org (Varun Agrawal) Date: Fri, 04 Aug 2017 23:22:19 +0000 Subject: [issue31123] fnmatch does not follow Unix fnmatch functionality Message-ID: <1501888939.57.0.889177550309.issue31123@psf.upfronthosting.co.za> New submission from Varun Agrawal: Currently, the fnmatch module in Python does not operate like the Unix equivalent command. This is especially the case with patterns such as `dir/` which does not match directory path returned by `os` (which would be `dir`) and neither does the pattern match the underlying files and sub-directories. Adding these functionalities so that fnmatch matches it's Unix equivalent would make it much more powerful to use. Glob is not useful since glob is a special case that matches only with the current directory paths rather than the a general purpose filename pattern matcher. ---------- components: Library (Lib) messages: 299763 nosy: Varun Agrawal priority: normal severity: normal status: open title: fnmatch does not follow Unix fnmatch functionality type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 19:34:25 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Aug 2017 23:34:25 +0000 Subject: [issue31123] fnmatch does not follow Unix fnmatch functionality In-Reply-To: <1501888939.57.0.889177550309.issue31123@psf.upfronthosting.co.za> Message-ID: <1501889665.89.0.288006817957.issue31123@psf.upfronthosting.co.za> R. David Murray added the comment: I don't believe there is an equivalent unix command. Are you referring to the fnmatch glibc function? Can you demonstrate the differences? I doubt we will change the functionality, but that would be the minimum starting point for a discussion. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 19:34:44 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Aug 2017 23:34:44 +0000 Subject: [issue31123] fnmatch does not follow Unix fnmatch functionality In-Reply-To: <1501888939.57.0.889177550309.issue31123@psf.upfronthosting.co.za> Message-ID: <1501889684.32.0.381890553747.issue31123@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- type: behavior -> enhancement versions: -Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 21:18:56 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 05 Aug 2017 01:18:56 +0000 Subject: [issue29304] dict: simplify lookup functions In-Reply-To: <1484706973.14.0.775713839146.issue29304@psf.upfronthosting.co.za> Message-ID: <1501895936.08.0.978027124034.issue29304@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It would have been nice to have timed this on ARM chips or 32-bit builds. I suspect that the previous code was mainly beneficial in register starved environments when it would have saved some memory accesses whenever there were an immediate first hit on a dictionary lookup (which is common). Also, it is more likely to make a difference on larger dicts where the memory accesses aren't all in L1 cache. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 21:49:39 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 05 Aug 2017 01:49:39 +0000 Subject: [issue31122] SSLContext.wrap_socket() throws OSError with errno == 0 In-Reply-To: <1501874201.48.0.0126792321555.issue31122@psf.upfronthosting.co.za> Message-ID: <1501897779.85.0.852741090708.issue31122@psf.upfronthosting.co.za> Martin Panter added the comment: It might help if you explained what ?atrocities? are happening on your network. Is there a proxy or man-in-the-middle (or the remote peer) that shuts down TCP connections? If so, perhaps this is similar to Issue 10808. From my memory, in that case an OS ?recv? or ?read? call returns zero to indicate a connection was shut down. Python and/or Open SSL correctly treats this as an error, but then assumes ?errno? is valid. Perhaps Python should be raising SSLEOFError in this situation. Maybe also check the ?suppress_ragged_eofs? setting, but I think that only affects later stages, after the handshake succeeds. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 21:58:08 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 05 Aug 2017 01:58:08 +0000 Subject: [issue31123] fnmatch does not follow Unix fnmatch functionality In-Reply-To: <1501888939.57.0.889177550309.issue31123@psf.upfronthosting.co.za> Message-ID: <1501898288.96.0.595967556967.issue31123@psf.upfronthosting.co.za> R. David Murray added the comment: Looking at the fnmatch man page, it looks like there are option flags that some shells use that our fnmatch doesn't support. I'm not sure if supporting them is a good idea for us or not, but it is probably worth discussing. I suspect our fnmatch was implemented before gnu added those extensions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 22:58:12 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Aug 2017 02:58:12 +0000 Subject: [issue31082] reduce takes iterable, not just sequence In-Reply-To: <1501448787.5.0.80084797494.issue31082@psf.upfronthosting.co.za> Message-ID: <1501901892.36.0.117096650734.issue31082@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy, given that the parameters of reduce are currently positional only (by experiment, it has not gotten the C.A. treatment yet), can 'sequence' in the signature in the docstring be changes to 'iterable'? ---------- nosy: +serhiy.storchaka, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 23:02:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Aug 2017 03:02:31 +0000 Subject: [issue31097] itertools.islice not accepting np.int64 In-Reply-To: <1501593786.72.0.0101517996884.issue31097@psf.upfronthosting.co.za> Message-ID: <1501902151.1.0.771013469595.issue31097@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Using PyNumber_AsSsize_t in itertools.islice type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 23:07:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Aug 2017 03:07:56 +0000 Subject: [issue31097] itertools.islice not accepting np.int64 In-Reply-To: <1501593786.72.0.0101517996884.issue31097@psf.upfronthosting.co.za> Message-ID: <1501902476.76.0.695823656529.issue31097@psf.upfronthosting.co.za> Terry J. Reedy added the comment: LB, an exception is a graceful shutdown, not a crash. A crash is a seg fault, core dump, or an OS message 'Your app has stopped unexpectedly'. In #30537, the exception was regarded as expected, not a bug, and changing islice to accept np ints was regarded as an enhancement, and therefore limited to 3.7 ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 4 23:10:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Aug 2017 03:10:27 +0000 Subject: [issue31100] unable to open python on Windows In-Reply-To: <1501636029.03.0.741480027722.issue31100@psf.upfronthosting.co.za> Message-ID: <1501902627.64.0.728918017685.issue31100@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware title: unable to open python -> unable to open python on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 00:08:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Aug 2017 04:08:27 +0000 Subject: [issue31108] add __contains__ for list_iterator (and others) for better performance In-Reply-To: <1501700026.5.0.776654640231.issue31108@psf.upfronthosting.co.za> Message-ID: <1501906107.31.0.445930663834.issue31108@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On my particular Win 10 machine with 3.6, the times are 1.52 and 2.14. But to me, the times are irrelevant. A performance enhancement, by definition, should not change computational results, but this does. If an iterator is a standard iterator, then 'x in iterator' runs the iterator until x is found or iterator is exhausted. The only current code that properly uses this operation on an iterator must be depending on the behavior. So while the change might fix some buggy code, it would break good code and divide 'iterator' into two subgroups: standard iterator and contained iterator. That is turn would require us to documents that while generators remain standard iterators, builtin collection iterators were now contained iterators. This is confusion we should not inflict on users. This should be rejected, as we have done with all other proposals to add features to iterators that only apply to a subset. (The apparently exception, __length_hint__ was defined to not necessarily be accurate, so that there is effectively a default __length_hint__ for all iterators, lambda self: n, where n depends on the caller.) ---------- nosy: +terry.reedy type: performance -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 00:26:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Aug 2017 04:26:33 +0000 Subject: [issue31082] reduce takes iterable, not just sequence In-Reply-To: <1501448787.5.0.80084797494.issue31082@psf.upfronthosting.co.za> Message-ID: <1501907193.69.0.298170213019.issue31082@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, I think it can. But be aware that "sequence" is used not only in the signature, but in following description. The term "sequence" in the documentation and the docstring looks to me like a synonym of "iterable", not a reference to collections.abc.Sequence. I don't know how the wording can be improved. Maybe looking at the documentation of builtins filter, map, zip, and itertools functions can help. ---------- nosy: +ncoghlan, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 00:34:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Aug 2017 04:34:15 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1501907655.1.0.963435173421.issue31113@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We know that compile has undocumented size limits of various sorts that are usually more than sufficient for normal human written code but which can be overwhelmed by machine-generated code. We do not regard this as a bug. However, 20 levels of if-nesting should not be a problem unless, say, you are recursively calling such a function. How are you running python, on what machine? What do you mean by 'crash'? Are you running python from a console/terminal, so that there is someplace for tracebacks and exceptions to be displayed? What does 'It did not crash' mean, versus the 'crash' label above? Have you tried increasing the recursion limit with sys.setrecursionlimit. The default for me is 1000. I have used 10000. On multi-gigabyte machines, 100000 might even work. Instead of directly running your code, have you tried a driver program that reads your code (one file at a time) into a string and then compiles it with compile()? You might somehow get a better error message, or in any case, find out which of the separate files fail. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 00:38:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Aug 2017 04:38:34 +0000 Subject: [issue31108] add __contains__ for list_iterator (and others) for better performance In-Reply-To: <1501700026.5.0.776654640231.issue31108@psf.upfronthosting.co.za> Message-ID: <1501907914.32.0.31719806978.issue31108@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Terry, this proposition doesn't change the behavior. It moves the iterator forward during searching. The only effect is inlining __next__ in a loop and getting rid of the overhead of few indirections and calls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 00:51:54 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Aug 2017 04:51:54 +0000 Subject: [issue31108] add __contains__ for list_iterator (and others) for better performance In-Reply-To: <1501700026.5.0.776654640231.issue31108@psf.upfronthosting.co.za> Message-ID: <1501908714.19.0.144060584485.issue31108@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- Removed message: http://bugs.python.org/msg299770 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 00:56:40 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Aug 2017 04:56:40 +0000 Subject: [issue31108] add __contains__ for list_iterator (and others) for better performance In-Reply-To: <1501700026.5.0.776654640231.issue31108@psf.upfronthosting.co.za> Message-ID: <1501909000.71.0.520289418644.issue31108@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Sorry, I mistakenly assumed, without carefully checking the C code, that the speedup was from checking the underlying collection, without advancing the iterator. I presume that " ++it->it_index;" is the statement to the contrary. I should have either asked or found this sooner. I unlinked the noisy comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 01:09:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Aug 2017 05:09:29 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1501909769.11.0.91670228829.issue31113@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I concur with Stefan. Some parts of the compiler are recursive. The crash is expected for enough complex programs, and the size of C stack is platform depended. There are few hard-coded limits (MAXINDENT, CO_MAXBLOCKS) that may prevent the crash by converting it to exception, but they don't take role in this case (MAXINDENT is too large (100), and CO_MAXBLOCKS limits only the level of nested "for" and "try" blocks). sys.setrecursionlimit doesn't have relation to C stack. Increasing the size of C stack on Windows can solve this issue for this particular case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 07:46:42 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 05 Aug 2017 11:46:42 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1501933602.51.0.269324824593.issue31113@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, since you're using Python 3, you can probably workaround this issue by delegating some of the work to helper functions using `yield from`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 07:51:39 2017 From: report at bugs.python.org (INADA Naoki) Date: Sat, 05 Aug 2017 11:51:39 +0000 Subject: [issue29304] dict: simplify lookup functions In-Reply-To: <1484706973.14.0.775713839146.issue29304@psf.upfronthosting.co.za> Message-ID: <1501933899.9.0.409584731742.issue29304@psf.upfronthosting.co.za> INADA Naoki added the comment: On i386 docker image, pyperformance: ./python -m perf compare_to before.json after.json -G --min-speed=2 Slower (4): - regex_dna: 279 ms +- 1 ms -> 288 ms +- 3 ms: 1.03x slower (+3%) - deltablue: 17.9 ms +- 0.3 ms -> 18.3 ms +- 1.0 ms: 1.03x slower (+3%) - scimark_monte_carlo: 258 ms +- 4 ms -> 264 ms +- 4 ms: 1.02x slower (+2%) - unpack_sequence: 115 ns +- 1 ns -> 117 ns +- 3 ns: 1.02x slower (+2%) Faster (9): - scimark_lu: 408 ms +- 16 ms -> 389 ms +- 13 ms: 1.05x faster (-5%) - spectral_norm: 315 ms +- 3 ms -> 302 ms +- 2 ms: 1.04x faster (-4%) - xml_etree_process: 235 ms +- 2 ms -> 228 ms +- 3 ms: 1.03x faster (-3%) - telco: 19.8 ms +- 0.4 ms -> 19.3 ms +- 0.3 ms: 1.03x faster (-3%) - scimark_sor: 487 ms +- 6 ms -> 474 ms +- 4 ms: 1.03x faster (-3%) - django_template: 385 ms +- 3 ms -> 376 ms +- 3 ms: 1.02x faster (-2%) - unpickle_pure_python: 934 us +- 13 us -> 913 us +- 11 us: 1.02x faster (-2%) - pathlib: 68.2 ms +- 0.8 ms -> 66.7 ms +- 0.5 ms: 1.02x faster (-2%) - xml_etree_generate: 277 ms +- 3 ms -> 271 ms +- 7 ms: 1.02x faster (-2%) Benchmark hidden because not significant (44) and microbench: ./python -m perf compare_to before-dict.json after-dict.json -G Slower (2): - fromkeys_str: 5.12 us +- 0.10 us -> 5.27 us +- 0.09 us: 1.03x slower (+3%) - unicode_split: 636 ns +- 11 ns -> 648 ns +- 16 ns: 1.02x slower (+2%) Faster (2): - unicode_nodummy_5: 837 ns +- 28 ns -> 818 ns +- 21 ns: 1.02x faster (-2%) - unicode_nodummy_6: 824 ns +- 10 ns -> 808 ns +- 20 ns: 1.02x faster (-2%) Benchmark hidden because not significant (1): fromkeys_int ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 08:33:06 2017 From: report at bugs.python.org (Segev Finer) Date: Sat, 05 Aug 2017 12:33:06 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1501936386.59.0.766808982731.issue16865@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +3040 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 08:48:00 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 05 Aug 2017 12:48:00 +0000 Subject: [issue31115] Py3.6 threading/reference counting issues with `numexpr` In-Reply-To: <1501794289.11.0.944319221721.issue31115@psf.upfronthosting.co.za> Message-ID: <1501937280.54.0.150187302286.issue31115@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If, judging by https://github.com/pydata/numexpr/commit/07d9245d88759f0c3dcabd88e6edefadc3061ee3, you are really calling a bunch of C API functions without holding the GIL, then it's not surprising you may get crashes all over the place. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 09:08:49 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 05 Aug 2017 13:08:49 +0000 Subject: [issue31114] 'make install' fails when exec_prefix is '/' and DESTDIR not empty In-Reply-To: <1501782040.16.0.9530512469.issue31114@psf.upfronthosting.co.za> Message-ID: <1501938529.14.0.362965770376.issue31114@psf.upfronthosting.co.za> Xavier de Gaye added the comment: In the subprocess test named test_executable_without_cwd and when the test is run on the installed Python, argv[0] is not the python executable and calculate_path() in Modules/getpath.c, as a last resort, searches the directories pointed to by the preprocessor variables PREFIX and EXEC_PREFIX defined in the Makefile. So this test indeed would have failed with the (rejected) proposition made in issue 1676135 to substitute the prefix '/' for '' in the configure script. But the test would succeed when the substitution replaces '/' with '/./' as proposed here (after Python has effectively been manually installed on '/' of course). Actually using '/.' instead of '/./' is better since the configure script will remove the trailing slash anyway. In both cases the value of prefix in the sysconfig module is '/.'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 09:10:18 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 05 Aug 2017 13:10:18 +0000 Subject: [issue9674] make install DESTDIR=/home/blah fails when the prefix specified is / In-Reply-To: <1282677588.85.0.771807305266.issue9674@psf.upfronthosting.co.za> Message-ID: <1501938618.76.0.306142105874.issue9674@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Issue 31114 is the same issue and proposes a workaround and another fix. ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 09:41:21 2017 From: report at bugs.python.org (=?utf-8?q?Jos=C3=A9_Leite?=) Date: Sat, 05 Aug 2017 13:41:21 +0000 Subject: [issue31124] ImportError: cannot import name HAS_ALPN Message-ID: <1501940481.62.0.440341735277.issue31124@psf.upfronthosting.co.za> New submission from Jos? Leite: When Running Web2py with Python 2.7.11 or 2.7.13 in windows 10 I get the following error: Traceback (most recent call last): File "C:\web2py\web2py.py", line 21, in import gluon.widget File "C:\web2py\gluon\widget.py", line 26, in from gluon import main, newcron File "C:\web2py\gluon\main.py", line 28, in import ssl File "C:\Python27\lib\ssl.py", line 126, in from _ssl import HAS_SNI, HAS_ECDH, HAS_NPN, HAS_ALPN ImportError: cannot import name HAS_ALPN ---------------------------------------------------- It seem like a windows Python bug in _ssl.py ---------- assignee: christian.heimes components: SSL, Windows messages: 299781 nosy: Jhleite, christian.heimes, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: ImportError: cannot import name HAS_ALPN versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 09:49:54 2017 From: report at bugs.python.org (Christian Heimes) Date: Sat, 05 Aug 2017 13:49:54 +0000 Subject: [issue31124] ImportError: cannot import name HAS_ALPN In-Reply-To: <1501940481.62.0.440341735277.issue31124@psf.upfronthosting.co.za> Message-ID: <1501940994.57.0.699726657913.issue31124@psf.upfronthosting.co.za> Christian Heimes added the comment: There is no _ssl.py. The internal _ssl module is a C extension module. Under Windows it is called _ssl.pyd. Do you have a _ssl.py or _ssl package in your project that may confict with _ssl.pyd? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 09:53:24 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 05 Aug 2017 13:53:24 +0000 Subject: [issue31100] unable to open python on Windows In-Reply-To: <1501636029.03.0.741480027722.issue31100@psf.upfronthosting.co.za> Message-ID: <1501941204.64.0.488588520814.issue31100@psf.upfronthosting.co.za> Steve Dower added the comment: This probably means that your system failed to install the C Runtime, but not badly enough that it actually reported an error. First try rebooting, and if that doesn't work then search for the VisualC++ 2015 Redistributable installer and run that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 09:55:57 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 05 Aug 2017 13:55:57 +0000 Subject: [issue31103] Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 In-Reply-To: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> Message-ID: <1501941357.46.0.423278778486.issue31103@psf.upfronthosting.co.za> Steve Dower added the comment: This issue is about A. B has a separate issue. C will not be changed. Please don't bother bringing them up again here, it's just a distraction. ---------- components: +Installation priority: normal -> low type: behavior -> enhancement versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 09:56:36 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 05 Aug 2017 13:56:36 +0000 Subject: [issue31103] Windows Installer Product does not include micro version in display name In-Reply-To: <1501668288.41.0.228516476421.issue31103@psf.upfronthosting.co.za> Message-ID: <1501941396.74.0.251723633125.issue31103@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- title: Windows Installer Product Version 3.6.2150.0 Offset By 0.0.150.0 -> Windows Installer Product does not include micro version in display name _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 10:45:58 2017 From: report at bugs.python.org (=?utf-8?q?Jos=C3=A9_Leite?=) Date: Sat, 05 Aug 2017 14:45:58 +0000 Subject: [issue31124] ImportError: cannot import name HAS_ALPN In-Reply-To: <1501940481.62.0.440341735277.issue31124@psf.upfronthosting.co.za> Message-ID: <1501944358.15.0.356095776586.issue31124@psf.upfronthosting.co.za> Jos? Leite added the comment: Yes, there is such a file. I will report to web2py developers for windows version. Thanks, renamed the file and everything seems fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 10:55:02 2017 From: report at bugs.python.org (Christian Heimes) Date: Sat, 05 Aug 2017 14:55:02 +0000 Subject: [issue31124] ImportError: cannot import name HAS_ALPN In-Reply-To: <1501940481.62.0.440341735277.issue31124@psf.upfronthosting.co.za> Message-ID: <1501944902.58.0.669026883558.issue31124@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- resolution: -> third party stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 10:55:13 2017 From: report at bugs.python.org (Christian Heimes) Date: Sat, 05 Aug 2017 14:55:13 +0000 Subject: [issue31124] ImportError: cannot import name HAS_ALPN In-Reply-To: <1501940481.62.0.440341735277.issue31124@psf.upfronthosting.co.za> Message-ID: <1501944913.95.0.495800932008.issue31124@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 11:01:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Aug 2017 15:01:13 +0000 Subject: [issue31107] copyreg does not properly mangle __slots__ names In-Reply-To: <1501699994.79.0.0201468057837.issue31107@psf.upfronthosting.co.za> Message-ID: <1501945273.18.0.607512740135.issue31107@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 4795ba857ef2a89e6b477285df961672106a1792 by Serhiy Storchaka (Shane Harvey) in branch '3.6': [3.6] bpo-31107: Fix copyreg mangled slot names calculation. (GH-2989) (#3003) https://github.com/python/cpython/commit/4795ba857ef2a89e6b477285df961672106a1792 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 11:03:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Aug 2017 15:03:03 +0000 Subject: [issue31107] copyreg does not properly mangle __slots__ names In-Reply-To: <1501699994.79.0.0201468057837.issue31107@psf.upfronthosting.co.za> Message-ID: <1501945383.75.0.883802732362.issue31107@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 88ffff5ddbb8692ecb2c661aa29000dbde9eff8c by Serhiy Storchaka (Shane Harvey) in branch '2.7': [2.7] bpo-31107: Fix copyreg mangled slot names calculation. (GH-2989). (#3004) https://github.com/python/cpython/commit/88ffff5ddbb8692ecb2c661aa29000dbde9eff8c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 11:22:04 2017 From: report at bugs.python.org (=?utf-8?q?Jos=C3=A9_Leite?=) Date: Sat, 05 Aug 2017 15:22:04 +0000 Subject: [issue31124] ImportError: cannot import name HAS_ALPN In-Reply-To: <1501940481.62.0.440341735277.issue31124@psf.upfronthosting.co.za> Message-ID: <1501946524.47.0.194740979424.issue31124@psf.upfronthosting.co.za> Jos? Leite added the comment: Thank You very much!!! Thumbs up! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 11:24:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Aug 2017 15:24:03 +0000 Subject: [issue31107] copyreg does not properly mangle __slots__ names In-Reply-To: <1501699994.79.0.0201468057837.issue31107@psf.upfronthosting.co.za> Message-ID: <1501946643.88.0.698831255529.issue31107@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 5 12:26:59 2017 From: report at bugs.python.org (Stephen Larroque) Date: Sat, 05 Aug 2017 16:26:59 +0000 Subject: [issue31125] shelve.open of temporary file fails with error "anydbm.error: db type could not be determined" Message-ID: <1501950419.2.0.502891257534.issue31125@psf.upfronthosting.co.za> New submission from Stephen Larroque: This is a followup of issue 23174. When using `shelve.open(tempfile.mkstemp()[1])`, the shelve (or anydbm or dumbdbm) fail with "anydbm.error: db type could not be determined". Instead, the module could detect the file is empty and use it as if it were not existing before ('c' or 'n' flag). For the moment, there is no way around except creating the temporary file and then delete it. ---------- components: IO messages: 299790 nosy: Stephen Larroque priority: normal severity: normal status: open title: shelve.open of temporary file fails with error "anydbm.error: db type could not be determined" type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 14:28:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Aug 2017 18:28:19 +0000 Subject: [issue31029] test_tokenize fails when run directly In-Reply-To: <1500985522.57.0.56152485573.issue31029@psf.upfronthosting.co.za> Message-ID: <1501957699.92.0.701357647566.issue31029@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9cd0ef8f3b93818f0ee5318cb1fc9a1ea32e95b6 by Serhiy Storchaka (Rajath Agasthya) in branch '3.6': bpo-31029: test_tokenize Add missing import unittest (#2998) https://github.com/python/cpython/commit/9cd0ef8f3b93818f0ee5318cb1fc9a1ea32e95b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 14:28:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 05 Aug 2017 18:28:49 +0000 Subject: [issue31029] test_tokenize fails when run directly In-Reply-To: <1500985522.57.0.56152485573.issue31029@psf.upfronthosting.co.za> Message-ID: <1501957729.11.0.461867165353.issue31029@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 14:51:01 2017 From: report at bugs.python.org (Alexander Mohr) Date: Sat, 05 Aug 2017 18:51:01 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1501959061.59.0.0891472197036.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: bad news, I just got a crash in the same place (updating defaultdict) after running for a week with the fixes from this and inada naoki's patches. I think the threadpool may be leaking threads too as I had > 40 threads after running for a week when I use no more than ~10. I'm going to switch to debug build and will update when I get more details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 16:07:04 2017 From: report at bugs.python.org (Nikolaus Rath) Date: Sat, 05 Aug 2017 20:07:04 +0000 Subject: [issue31122] SSLContext.wrap_socket() throws OSError with errno == 0 In-Reply-To: <1501874201.48.0.0126792321555.issue31122@psf.upfronthosting.co.za> Message-ID: <1501963624.05.0.860018961844.issue31122@psf.upfronthosting.co.za> Nikolaus Rath added the comment: Regarding "atrocious connection": I wish I knew, but I have no control of the connection. All I can tell is that there are frequent disconnects, occasional latency spikes, my remote ip address seems to change frequently (while the apparent local one stays as-is, so presumably some NAT in between), temporary bandwidth drops, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 17:08:43 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 05 Aug 2017 21:08:43 +0000 Subject: [issue1612262] Class Browser doesn't show internal classes Message-ID: <1501967323.97.0.391863000371.issue1612262@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I added a more complete set of unit tests to the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 5 17:22:40 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Sat, 05 Aug 2017 21:22:40 +0000 Subject: [issue31121] Unable to exit pdb when script becomes invalid In-Reply-To: <1501855436.72.0.136626793025.issue31121@psf.upfronthosting.co.za> Message-ID: <1501968160.99.0.430244591318.issue31121@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 07:29:18 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Aug 2017 11:29:18 +0000 Subject: [issue31119] Signal tripped flags need memory barriers In-Reply-To: <1501835793.8.0.586485802562.issue31119@psf.upfronthosting.co.za> Message-ID: <1502018958.84.0.500311108812.issue31119@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've recently merged https://github.com/python/cpython/pull/2417 which might address this. If you know of a way of reproducing the (theoretical) issue outlined here, it would be nice to know if it's fixed on git master. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 08:42:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Aug 2017 12:42:09 +0000 Subject: [issue31119] Signal tripped flags need memory barriers In-Reply-To: <1502018958.84.0.500311108812.issue31119@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Since it's described as a bug, should the change be backported to 3.6? I don't think that 2.7 has required tools to backport this change (C99, atomic types). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 09:01:52 2017 From: report at bugs.python.org (R. David Murray) Date: Sun, 06 Aug 2017 13:01:52 +0000 Subject: [issue31125] shelve.open of temporary file fails with error "anydbm.error: db type could not be determined" In-Reply-To: <1501950419.2.0.502891257534.issue31125@psf.upfronthosting.co.za> Message-ID: <1502024512.07.0.757662738247.issue31125@psf.upfronthosting.co.za> R. David Murray added the comment: No, it should not. A DBM is not necessarily a single file. What you should be doing is creating a temporary *directory*, and opening your DB inside that. ---------- components: +Library (Lib) -IO nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 09:02:58 2017 From: report at bugs.python.org (R. David Murray) Date: Sun, 06 Aug 2017 13:02:58 +0000 Subject: [issue31125] shelve.open of temporary file fails with error "anydbm.error: db type could not be determined" In-Reply-To: <1501950419.2.0.502891257534.issue31125@psf.upfronthosting.co.za> Message-ID: <1502024578.6.0.797398688536.issue31125@psf.upfronthosting.co.za> R. David Murray added the comment: By the way, if you want to open a doc issue with a suggestion of how to clarify this in the docs, that would be welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 09:17:16 2017 From: report at bugs.python.org (ksqsf) Date: Sun, 06 Aug 2017 13:17:16 +0000 Subject: [issue31126] dict comprehension shouldn't raise UnboundLocalError Message-ID: <1502025436.65.0.0753322940142.issue31126@psf.upfronthosting.co.za> New submission from ksqsf: The code key = ["a", "b"] val = [1, 2] dic = {key:val for key in key for val in val} will raise UnboundLocalError in Python 3.6.2 and 2.7.13. Intuitively, the element 'key' and the list 'key' are not the same, so generally the expected result is {"a": 1, "b": 2}. There are similar cases for listcomps, setcomps and genexprs: l = [1, 2, 3] {l for l in l} # => {1, 2, 3} [l for l in l] # => [1, 2, 3] for l in (l for l in l): print(l, end=' ') # => 1 2 3 All of them do as what is expected. For consistency and intuitiveness, the behavior of distcomps should be modified so that no UnboundLocalError is raised. ---------- components: Interpreter Core messages: 299799 nosy: ksqsf priority: normal severity: normal status: open title: dict comprehension shouldn't raise UnboundLocalError type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 10:07:09 2017 From: report at bugs.python.org (R. David Murray) Date: Sun, 06 Aug 2017 14:07:09 +0000 Subject: [issue29427] Option to skip padding for base64 urlsafe encoding/decoding In-Reply-To: <1486085117.43.0.563120448637.issue29427@psf.upfronthosting.co.za> Message-ID: <1502028429.45.0.265796129652.issue29427@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 10:07:19 2017 From: report at bugs.python.org (R. David Murray) Date: Sun, 06 Aug 2017 14:07:19 +0000 Subject: [issue31126] dict comprehension shouldn't raise UnboundLocalError In-Reply-To: <1502025436.65.0.0753322940142.issue31126@psf.upfronthosting.co.za> Message-ID: <1502028439.19.0.677358935414.issue31126@psf.upfronthosting.co.za> R. David Murray added the comment: The behavior is consistent: >>> a = [1, 2] >>> b = [3, 4] >>> [(a, b) for a in a for b in b] Traceback (most recent call last): File "", line 1, in File "", line 1, in UnboundLocalError: local variable 'b' referenced before assignment I'm not sure why it is only the nested loop that raises the error (https://docs.python.org/3/reference/expressions.html#displays-for-lists-sets-and-dictionaries seems to imply it should raise for both) By the way, the actual result of your comprehesion would be {"a": 2, "b" 2}. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 10:26:54 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 06 Aug 2017 14:26:54 +0000 Subject: [issue31126] dict comprehension shouldn't raise UnboundLocalError In-Reply-To: <1502025436.65.0.0753322940142.issue31126@psf.upfronthosting.co.za> Message-ID: <1502029614.9.0.0723516425975.issue31126@psf.upfronthosting.co.za> Eryk Sun added the comment: Comprehensions evaluate the iterator for the outermost loop in the surrounding scope. The iterators for all inner loops are evaluated in the local scope of the comprehension itself. ---------- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 11:08:09 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Aug 2017 15:08:09 +0000 Subject: [issue31119] Signal tripped flags need memory barriers In-Reply-To: <1501835793.8.0.586485802562.issue31119@psf.upfronthosting.co.za> Message-ID: <1502032089.7.0.567527060628.issue31119@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Backporting would be reasonable IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 11:10:26 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Aug 2017 15:10:26 +0000 Subject: [issue30808] Use _Py_atomic API for concurrency-sensitive signal state In-Reply-To: <1498766466.5.0.206048898577.issue30808@psf.upfronthosting.co.za> Message-ID: <1502032226.74.0.401040621663.issue30808@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +3041 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 11:20:03 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Aug 2017 15:20:03 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1502032803.37.0.784635396749.issue30450@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Has this actually been backported to 3.6? It looks like a lot of Tcl and OpenSSL stuff is being compiled on AppVeyor yet: https://ci.appveyor.com/project/python/cpython/build/3.6.1+.5134 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 12:23:43 2017 From: report at bugs.python.org (Manuel Krebber) Date: Sun, 06 Aug 2017 16:23:43 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502036623.0.0.896342046606.issue31113@psf.upfronthosting.co.za> Manuel Krebber added the comment: @Serhiy That would require me to compile Python myself though, right? Is there a reason why the limit is only for try/for and not for if? @Antoine Well, the goal is to be able to generate Python 2 compatible code . I will try to split the code into more functions and see if that helps... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 13:27:25 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 06 Aug 2017 17:27:25 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502040445.69.0.770902351604.issue31113@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Using master to debug, the (first) offending part of the generated file is the get_match_iter() function. The problem is not that there is too much nesting, rather it is simply the fact of too many if's period. Simple testing at the command prompt (using master debug build) reveals the limit for just ifs is around 25000 (on Windows x64). The actual limit is going to depend on the stack usage (debug/release/version of the C runtime). To verify: exec('if a: b = 1\n' * 25150) causes exceptions on my box. The precise limit will vary somewhat. ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 13:32:41 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Aug 2017 17:32:41 +0000 Subject: [issue30808] Use _Py_atomic API for concurrency-sensitive signal state In-Reply-To: <1498766466.5.0.206048898577.issue30808@psf.upfronthosting.co.za> Message-ID: <1502040761.77.0.527824898389.issue30808@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 57e836cb41656ac23042886db6b5985c036a7ce2 by Antoine Pitrou in branch '3.6': [3.6] bpo-30808: Use _Py_atomic API for concurrency-sensitive signal state (GH-2417) (#3007) https://github.com/python/cpython/commit/57e836cb41656ac23042886db6b5985c036a7ce2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 14:05:21 2017 From: report at bugs.python.org (R. David Murray) Date: Sun, 06 Aug 2017 18:05:21 +0000 Subject: [issue31126] dict comprehension shouldn't raise UnboundLocalError In-Reply-To: <1502025436.65.0.0753322940142.issue31126@psf.upfronthosting.co.za> Message-ID: <1502042721.95.0.19531887221.issue31126@psf.upfronthosting.co.za> R. David Murray added the comment: I wonder if that explanation should be added to the doc section to which I pointed. I thought I'd remembered something like that being in there, but it isn't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 14:12:01 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Aug 2017 18:12:01 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502043121.72.0.289945879663.issue31113@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > exec('if a: b = 1\n' * 25150) I need to increase it to 200000 and it fails with a stack overflow in dfs() here (git master on Ubuntu 16.04 in pydebug mode). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 14:12:14 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Aug 2017 18:12:14 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502043134.94.0.68794491536.issue31113@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 14:33:01 2017 From: report at bugs.python.org (Steve Dower) Date: Sun, 06 Aug 2017 18:33:01 +0000 Subject: [issue30450] Pull Windows dependencies from GitHub rather than svn.python.org In-Reply-To: <1495589626.97.0.920797927041.issue30450@psf.upfronthosting.co.za> Message-ID: <1502044381.59.0.939870374893.issue30450@psf.upfronthosting.co.za> Steve Dower added the comment: The prebuilt binaries have not, and the OpenSSL change has functional implications and should not be (unless someone wants to make the security justification, but right now I think it's a theoretical rather than an actual benefit). The TclTk build could be, but I haven't gone to the effort to split it up. There's also a separate issue for that part - this bug is for the location of sources. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 15:00:42 2017 From: report at bugs.python.org (Kevin Shweh) Date: Sun, 06 Aug 2017 19:00:42 +0000 Subject: [issue31127] Abstract classes derived from built-in classes don't block instance creation Message-ID: <1502046042.43.0.230510870536.issue31127@psf.upfronthosting.co.za> New submission from Kevin Shweh: The only check that prevents instantiating abstract classes is in object.__new__, but most built-in classes never actually call object.__new__. That means you can do stuff like import abc class Foo(list, metaclass=abc.ABCMeta): @abc.abstractmethod def abstract(self): pass Foo() and the Foo() call will silently succeed. Ideally, the Foo() call should fail. Other options include having the Foo class definition itself fail, or just making a note in the documentation describing the limitation. (As far as I can see, this is currently undocumented.) ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 299810 nosy: Kevin Shweh, docs at python priority: normal severity: normal status: open title: Abstract classes derived from built-in classes don't block instance creation type: behavior versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 15:03:36 2017 From: report at bugs.python.org (Adrian Wielgosik) Date: Sun, 06 Aug 2017 19:03:36 +0000 Subject: [issue24700] array compare is hideously slow In-Reply-To: <1437692474.17.0.61027224315.issue24700@psf.upfronthosting.co.za> Message-ID: <1502046216.87.0.455823611986.issue24700@psf.upfronthosting.co.za> Changes by Adrian Wielgosik : ---------- pull_requests: +3042 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 15:05:38 2017 From: report at bugs.python.org (Adrian Wielgosik) Date: Sun, 06 Aug 2017 19:05:38 +0000 Subject: [issue24700] array compare is hideously slow In-Reply-To: <1437692474.17.0.61027224315.issue24700@psf.upfronthosting.co.za> Message-ID: <1502046338.14.0.672249189256.issue24700@psf.upfronthosting.co.za> Adrian Wielgosik added the comment: Added a PR with a fast path that triggers when compared arrays store values of the same type. In this fast path, no Python objects are created. For big arrays the runtime reduction can reach 50-100x. It's possible to optimize the comparison loop a bit more - for example array('B') comparison could use memcmp and become extra 10x faster, and other types could receive similar treatment - but I wanted to keep the code relatively simple. Code duplication with macros is a bit ugly, but that's the best I could come up with so far. Benchmark results: Test Before After % of old time Equal, same stored type (new fast path) array('i', range(0)) 20.4ns 22.07ns 108.15% array('i', range(1)) 33.39ns 22.32ns 66.86% array('i', range(10)) 152.0ns 31.21ns 20.54% array('i', range(10000)) 447.7us 6.571us 1.47% array('i', range(100000)) 4.626ms 67.24us 1.45% array('i', [1<<30]*100000)) 5.234ms 65.8us 1.26% array('B', range(10)) 151.8ns 28.53ns 18.79% array('B', range(250)) 3.14us 194.5ns 6.19% array('B', [1,2,3]*1000) 37.76us 2.088us 5.53% array('d', range(10)) 311.9ns 31.22ns 10.01% array('d', range(100000)) 2.889ms 99.3us 3.44% Equal, different types (slow path) array('X', range(0)) 20.37ns 19.45ns 95.48% array('X', range(1)) 34.87ns 34.42ns 98.72% array('X', range(10)) 169.1ns 169.0ns 99.97% array('X', range(10000)) 462.2us 444.8us 96.23% array('X', range(100000)) 4.752ms 4.571ms 96.20% Not equal: first element (X) different array('i', [X] + [1,2,3]*10000) 42.77ns 21.84ns 51.06% Not equal: last element (X) different array('i', [1,2,3]*10000 + [X]) 375.4us 19.8us 5.27% ---------- nosy: +Adrian Wielgosik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 15:46:39 2017 From: report at bugs.python.org (Alex Gaynor) Date: Sun, 06 Aug 2017 19:46:39 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1502048799.45.0.294675741208.issue28414@psf.upfronthosting.co.za> Alex Gaynor added the comment: This came up on m.d.s.p. today: https://groups.google.com/d/msg/mozilla.dev.security.policy/K3sk5ZMv2DE/fx6c3WWFBgAJ I haven't dug in deeply, but it sounds like we handle IDNs in CNs and SANs differently? I think we should look for a way to solve that specific problem, without biting off the whole thing -- one solution would be to simply drop support for CNs in match_hostname, as both Chrome and Firefox have already done :-) ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 15:47:36 2017 From: report at bugs.python.org (Alex Gaynor) Date: Sun, 06 Aug 2017 19:47:36 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1502048856.69.0.61532524451.issue28414@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +dstufft, janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 16:15:23 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 06 Aug 2017 20:15:23 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1502050523.18.0.586956521561.issue28414@psf.upfronthosting.co.za> Nathaniel Smith added the comment: > I haven't dug in deeply, but it sounds like we handle IDNs in CNs and SANs differently? No -- Python's ssl module uses exactly the same hostname checking logic in both cases, and it's equally broken regardless. But, since CAs do all kinds of weird stuff with CNs, there's some chance that our brokenness and their brokenness will align and make things work by chance. Specifically, this will happen if the CA puts the U-encoded name in the CN field. Nick Lamb's concern is that CAs may be using this as justification for continuing to issue certs that are broken in this way. I don't know if that's true, but it's possible. > one solution would be to simply drop support for CNs in match_hostname That would indeed fix Nick Lamb's concern, but I'm dubious about this word "simply" :-). Obviously we should do this eventually, but it's going to break a bunch of people, you'll have to have a big fight about Python 2 and Redhat will probably refuse to take the patch and etc etc. OTOH fixing match_hostname to use A-labels would provide immediate benefits to Python's users (right now Python just... can't do SSL connections to IDNs) with minimal breakage, so you can call it a bug fix, and then worry about deprecating the CN field on its own schedule. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 17:39:14 2017 From: report at bugs.python.org (R. David Murray) Date: Sun, 06 Aug 2017 21:39:14 +0000 Subject: [issue31127] Abstract classes derived from built-in classes don't block instance creation In-Reply-To: <1502046042.43.0.230510870536.issue31127@psf.upfronthosting.co.za> Message-ID: <1502055554.72.0.877186875702.issue31127@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplidate of issue 5996. It is not clear if we are going to treat it as a bug or a doc bug. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> abstract class instantiable when subclassing dict _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 17:40:29 2017 From: report at bugs.python.org (R. David Murray) Date: Sun, 06 Aug 2017 21:40:29 +0000 Subject: [issue5996] abstract class instantiable when subclassing dict In-Reply-To: <1242050763.07.0.145569961651.issue5996@psf.upfronthosting.co.za> Message-ID: <1502055629.38.0.231577664446.issue5996@psf.upfronthosting.co.za> R. David Murray added the comment: Closed issue 31127 as a duplicate of this one. ---------- nosy: +Kevin Shweh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 17:44:15 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Sun, 06 Aug 2017 21:44:15 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1502055855.69.0.614949929062.issue28414@psf.upfronthosting.co.za> Changes by Nathaniel Smith : ---------- pull_requests: +3043 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 18:45:20 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 06 Aug 2017 22:45:20 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1502059520.13.0.568663032005.issue27755@psf.upfronthosting.co.za> Cheryl Sabella added the comment: FYI, I believe that the ttk.OptionMenu is essentially the same as the DynOptionMenu. ttk.OptionMenu added a `set_menu` which is the same code as DynOptionMenu.SetMenu, except the options are radiobuttons (which marks the current item.) The only difference is that DynOptionMenu has a highlightthickness, but this isn't directly available on any widgets in ttk. One other thing to consider is a Spinbox for the fontsize and maybe for the indentsize. There is a ttk Spinbox in the ttk documentation, but it doesn't appear to be implemented in Python. https://www.tcl.tk/man/tcl/TkCmd/ttk_spinbox.htm Maybe that should be added to ttk? Or maybe it didn't change from tkinter so that's why it wasn't added? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 18:55:50 2017 From: report at bugs.python.org (Feanil Patel) Date: Sun, 06 Aug 2017 22:55:50 +0000 Subject: [issue31128] Allow pydoc to run with an arbitrary hostname Message-ID: <1502060150.4.0.12208327143.issue31128@psf.upfronthosting.co.za> New submission from Feanil Patel: I want to run the pydoc server while doing development inside a container. However, the pydoc http server only binds to localhost with no option to override this. This means that if I'm trying to read the docs from a remote machine, I have to do some network Jiu Jitsu. Acceptance Criteria: - Pydoc takes a new argument that overrides the hostname the server binds to. - Pydoc continues to default to localhost ---------- assignee: docs at python components: Documentation messages: 299817 nosy: Feanil Patel, docs at python priority: normal severity: normal status: open title: Allow pydoc to run with an arbitrary hostname type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 19:00:34 2017 From: report at bugs.python.org (Roundup Robot) Date: Sun, 06 Aug 2017 23:00:34 +0000 Subject: [issue31128] Allow pydoc to run with an arbitrary hostname In-Reply-To: <1502060150.4.0.12208327143.issue31128@psf.upfronthosting.co.za> Message-ID: <1502060434.03.0.957083855281.issue31128@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3044 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 19:07:21 2017 From: report at bugs.python.org (Eryk Sun) Date: Sun, 06 Aug 2017 23:07:21 +0000 Subject: [issue31126] dict comprehension shouldn't raise UnboundLocalError In-Reply-To: <1502025436.65.0.0753322940142.issue31126@psf.upfronthosting.co.za> Message-ID: <1502060841.82.0.304638402251.issue31126@psf.upfronthosting.co.za> Eryk Sun added the comment: It's consistent with the behavior of generator expressions: Variables used in the generator expression are evaluated lazily when the __next__() method is called for the generator object (in the same fashion as normal generators). However, the leftmost for clause is immediately evaluated, so that an error produced by it can be seen before any other possible error in the code that handles the generator expression. Subsequent for clauses cannot be evaluated immediately since they may depend on the previous for loop. For example: (x*y for x in range(10) for y in bar(x)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 19:17:48 2017 From: report at bugs.python.org (Brian Thorne) Date: Sun, 06 Aug 2017 23:17:48 +0000 Subject: [issue29427] Option to skip padding for base64 urlsafe encoding/decoding In-Reply-To: <1486085117.43.0.563120448637.issue29427@psf.upfronthosting.co.za> Message-ID: <1502061468.3.0.312335739811.issue29427@psf.upfronthosting.co.za> Brian Thorne added the comment: Hi Robert, It would be at least a week or two before I could take another look at this so please feel free to work on it. Not sure why I didn't write a patch at the time! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 21:16:34 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 01:16:34 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1502068594.93.0.133913741658.issue27755@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, if nothing else, we can use ttk.OptionMenu. #24776 is about the font tab specifically, including possibly using a spinbox for font size. #24781 is about Highlights tab. Whatever we do with theme selection we will probably copy for keyset selection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 23:28:30 2017 From: report at bugs.python.org (Daniel Watkins) Date: Mon, 07 Aug 2017 03:28:30 +0000 Subject: [issue31129] RawConfigParser.items() is unusual in taking arguments Message-ID: <1502076510.54.0.648446505741.issue31129@psf.upfronthosting.co.za> New submission from Daniel Watkins: A grep through the codebase shows that RawConfigParser.items() is the only .items() method in the stdlib which accepts arguments. This is annoying as a stdlib user because when I see the arguments being passed to RawConfigParser.items(), I have _no idea_ what they do. Instinctively, I do not expect .items() to take arguments, and I have to go and work out what it does each time. I think it would be both easier to understand, and more consistent with general Pythonic practice, if the two codepaths in RawConfigParser.items() were split in to separate methods; one which takes no arguments (which will continue to behave as it does today when called that way) and one which is named in a way that makes it clearer what it does (and takes arguments). ---------- components: Library (Lib) messages: 299821 nosy: odd_bloke priority: normal severity: normal status: open title: RawConfigParser.items() is unusual in taking arguments versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 23:41:51 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 07 Aug 2017 03:41:51 +0000 Subject: [issue31129] RawConfigParser.items() is unusual in taking arguments In-Reply-To: <1502076510.54.0.648446505741.issue31129@psf.upfronthosting.co.za> Message-ID: <1502077311.3.0.193852345601.issue31129@psf.upfronthosting.co.za> R. David Murray added the comment: For backward compatibility reasons this will not be changed. I don't know if the idea of adding a method and doing a documentation deprecation is worth it or not. ---------- nosy: +lukasz.langa, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 23:42:24 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 07 Aug 2017 03:42:24 +0000 Subject: [issue31129] RawConfigParser.items() is unusual in taking arguments In-Reply-To: <1502076510.54.0.648446505741.issue31129@psf.upfronthosting.co.za> Message-ID: <1502077344.29.0.597168988872.issue31129@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 6 23:50:20 2017 From: report at bugs.python.org (Daniel Watkins) Date: Mon, 07 Aug 2017 03:50:20 +0000 Subject: [issue31129] RawConfigParser.items() is unusual in taking arguments In-Reply-To: <1502076510.54.0.648446505741.issue31129@psf.upfronthosting.co.za> Message-ID: <1502077820.32.0.279288822841.issue31129@psf.upfronthosting.co.za> Changes by Daniel Watkins : ---------- pull_requests: +3045 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 00:08:53 2017 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 07 Aug 2017 04:08:53 +0000 Subject: [issue31129] RawConfigParser.items() is unusual in taking arguments In-Reply-To: <1502076510.54.0.648446505741.issue31129@psf.upfronthosting.co.za> Message-ID: <1502078933.65.0.798462902744.issue31129@psf.upfronthosting.co.za> Guido van Rossum added the comment: I think the proposed change is not worth it. Developments in type checking (in particular overloading) make it unambiguous what the return type will be from just a static inspection of the call site. (Given that the _UNSET value is intended to be private.) See also https://github.com/python/mypy/issues/3805#issuecomment-320561797 ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 00:40:14 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 07 Aug 2017 04:40:14 +0000 Subject: [issue29555] Update Python Software Foundation Copyright Year In-Reply-To: <1487088120.64.0.260258993464.issue29555@psf.upfronthosting.co.za> Message-ID: <1502080814.52.0.46999261021.issue29555@psf.upfronthosting.co.za> Nick Coghlan added the comment: Van, could you take a look at Senthil & Mariatta's questions above regarding our handling of the copyright year in CPython's module headers? ---------- nosy: +ncoghlan, vanl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 01:18:35 2017 From: report at bugs.python.org (Jeffrey Rackauckas) Date: Mon, 07 Aug 2017 05:18:35 +0000 Subject: [issue30082] hide command prompt when using subprocess.Popen with shell=False on Windows In-Reply-To: <1492363586.51.0.498152844874.issue30082@psf.upfronthosting.co.za> Message-ID: <1502083115.14.0.503365224902.issue30082@psf.upfronthosting.co.za> Changes by Jeffrey Rackauckas : ---------- pull_requests: +3046 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 01:20:01 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 07 Aug 2017 05:20:01 +0000 Subject: [issue31082] reduce takes iterable, not just sequence In-Reply-To: <1501448787.5.0.80084797494.issue31082@psf.upfronthosting.co.za> Message-ID: <1502083201.89.0.173960348594.issue31082@psf.upfronthosting.co.za> Nick Coghlan added the comment: Checking older versions of the docs, it looks like we simply haven't reworded those docs since Python 2.0 (when the "list" of the 1.5 docs became "sequence" for 2.0). So I think the most appropriate resolution here would be to replace the current use of "sequence" with "iterable" in both the code and the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 02:58:12 2017 From: report at bugs.python.org (Julien Palard) Date: Mon, 07 Aug 2017 06:58:12 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1502089092.72.0.201550330207.issue31036@psf.upfronthosting.co.za> Julien Palard added the comment: We upgraded Python on docs.python.org to 3.6 (from 3.4), so blurb can run. I pushed https://github.com/python/docsbuild-scripts/pull/22 to give the right Python in the PYTHON Makefile parameter. I'm currently running a test build locally and will merge soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 03:38:43 2017 From: report at bugs.python.org (Larry Hastings) Date: Mon, 07 Aug 2017 07:38:43 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1502091523.17.0.8177707444.issue31036@psf.upfronthosting.co.za> Larry Hastings added the comment: This is marked as a release blocker for 3.4 and 3.5; however, Ned's Doc/Makefile change has been merged in both those versions. And no other branches have been "blurbified" yet. While we may improve the solution in the future, the fundamental problem (you can't build the docs without blurb from a tarball) is fixed. So I'm marking this closed. If I'm mistaken for some reason please reopen. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 03:47:49 2017 From: report at bugs.python.org (Larry Hastings) Date: Mon, 07 Aug 2017 07:47:49 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1502092069.82.0.561576166578.issue30876@psf.upfronthosting.co.za> Larry Hastings added the comment: It seems this change broke the 3.5 build on AMD FreeBSD: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.5 On the 3.5 branch, the previous revision (19b2890014d3098147d16475c492a47a43893768) built and tested successfully on July 26. But once this revision (f9fbed19a964e55ee703005823d8a7408f83d7f4) was checked in on July 27 the build started failing. I haven't included this fix in 3.5.4. Please fix the buildbot and it'll go into 3.5.5. ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 03:57:52 2017 From: report at bugs.python.org (Patrik Simons) Date: Mon, 07 Aug 2017 07:57:52 +0000 Subject: [issue13487] inspect.getmodule fails when module imports change sys.modules In-Reply-To: <1322363209.24.0.0935380803772.issue13487@psf.upfronthosting.co.za> Message-ID: <1502092672.84.0.537529689406.issue13487@psf.upfronthosting.co.za> Patrik Simons added the comment: list(sys.modules.items()) still raises RuntimeError: dictionary changed size during iteration when another thread imports a module. I would assume dict.copy() is thread-safe so a working fix could use sys.modules.copy().items() I hit this bug when printing the name of the caller function using inspect.stack(). The workaround in this case is calling inspect.stack(context=0). ---------- nosy: +psimons _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 04:23:53 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 07 Aug 2017 08:23:53 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1502094233.96.0.897487129545.issue31106@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Adding Larry who is listed as posix expert. ---------- nosy: +Mariatta, larry stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 04:27:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 08:27:24 +0000 Subject: [issue31045] Add a language switch to the Python documentation In-Reply-To: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> Message-ID: <1502094444.27.0.719314713611.issue31045@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset dff9b5f9d62aa0b23f8a255867d09d11890efd1b by Victor Stinner (Julien) in branch 'master': bpo-31045: Language switch (#2652) https://github.com/python/cpython/commit/dff9b5f9d62aa0b23f8a255867d09d11890efd1b ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 04:28:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Aug 2017 08:28:37 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1502094517.83.0.599460744946.issue30876@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a FreeBSD bug. It isn't related to this change. See issue31044 for details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 04:29:50 2017 From: report at bugs.python.org (Larry Hastings) Date: Mon, 07 Aug 2017 08:29:50 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1502094590.77.0.0853233916349.issue30876@psf.upfronthosting.co.za> Larry Hastings added the comment: Okay, that's good news. That means I don't have to accept a fix for it in the 3.5 branch *after* 3.5 transitions to security-fixes-only mode tomorrow ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 05:09:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 09:09:47 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1502096987.08.0.877690787649.issue31106@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 05:24:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 09:24:47 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references Message-ID: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> New submission from STINNER Victor: Starting at the following build, test_idle started to leak references: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x/builds/60/steps/test/logs/stdio Example of leak: $ ./python -m test -R 3:3 -u all test_idle -m idlelib.idle_test.test_configdialog.FontPageTest.test_set_samples (...) test_idle leaked [2168, 2168, 2168] references, sum=6504 test_idle leaked [1152, 1154, 1155] memory blocks, sum=3461 (...) A bisection identified this commit: commit 9397e2a87ed6e0e724ad71a0c751553620cb775e Author: csabella Date: Sun Jul 30 13:34:25 2017 -0400 bpo-31004: IDLE: Factor out FontPage class from configdialog (step 1) (#2905) The slightly modified tests continue to pass. The General test broken by the switch to Notebook is fixed. Patch mostly by Cheryl Sabella. ---------- messages: 299834 nosy: haypo priority: normal severity: normal status: open title: test_idle: idlelib.configdialog leaks references type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 05:25:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 09:25:28 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1502097928.75.0.33516169851.issue31004@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset 9397e2a87ed6e0e724ad71a0c751553620cb775e by Terry Jan Reedy (csabella) in branch 'master': > bpo-31004: IDLE: Factor out FontPage class from configdialog (step 1) (#2905) This change introduced reference leaks in test_idle: see bpo-31130. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 05:28:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 09:28:04 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502098084.83.0.777294840511.issue31130@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 05:30:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 09:30:49 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1502098249.57.0.716803154178.issue31004@psf.upfronthosting.co.za> STINNER Victor added the comment: By the way, I suggest to not backport refactoring changes to stable branches like Python 3.6. Any refactoring is a risk of regressions. Well, it's just an advice, Terry knows IDLE much better than me ;-) It's up to you to decide to backport or not such change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 05:54:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 09:54:21 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502099661.63.0.0809681924894.issue31130@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't know anything about idlelib, but it seems like the following patch fixes the failing test: diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py index aff3c2f..9f495fd 100644 --- a/Lib/idlelib/idle_test/test_configdialog.py +++ b/Lib/idlelib/idle_test/test_configdialog.py @@ -41,6 +41,7 @@ def tearDownModule(): global root, dialog idleConf.userCfg = usercfg tracers.detach() + tracers.clear() del dialog root.update_idletasks() root.destroy() Extract of ConfigDialog.create_page_highlight(): self.builtin_theme = tracers.add( StringVar(parent), self.var_changed_builtin_theme) This method contains many tracers.add() calls, but tearDownModule() of Lib/idlelib/idle_test/test_configdialog.py only calls "tracers.detach()" and detatch() doesn't clear VarTrace.untraced list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 05:56:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 09:56:58 +0000 Subject: [issue30830] HTTPHandlerTest of test_logging leaks a "dangling" thread on AMD64 FreeBSD CURRENT Non-Debug 3.x In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1502099818.12.0.559116730868.issue30830@psf.upfronthosting.co.za> STINNER Victor added the comment: Another test_listen_config_10_ok() example: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/674/steps/test/logs/stdio test_config_8a_ok (test.test_logging.ConfigDictTest) ... ok test_config_9_ok (test.test_logging.ConfigDictTest) ... ok test_listen_config_10_ok (test.test_logging.ConfigDictTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 2 sec (count: 0, dangling: 1) ok test_listen_config_1_ok (test.test_logging.ConfigDictTest) ... ok test_listen_verify (test.test_logging.ConfigDictTest) ... ok test_out_of_order (test.test_logging.ConfigDictTest) ... ok test_manager_loggerclass (test.test_logging.ManagerTest) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 06:02:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 10:02:40 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1502100160.9.0.392023946949.issue30855@psf.upfronthosting.co.za> STINNER Victor added the comment: The test failed on "AMD64 Windows8.1 Refleaks 2.7" buildbot: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/60/steps/test/logs/stdio test_padx (test_tkinter.test_widgets.ToplevelTest) ... ok test_pady (test_tkinter.test_widgets.ToplevelTest) ... ok test_relief (test_tkinter.test_widgets.ToplevelTest) ... ok test_screen (test_tkinter.test_widgets.ToplevelTest) ... skipped 'No $DISPLAY set.' test_takefocus (test_tkinter.test_widgets.ToplevelTest) ... ok test_use (test_tkinter.test_widgets.ToplevelTest) ... ERROR test_visual (test_tkinter.test_widgets.ToplevelTest) ... ok test_width (test_tkinter.test_widgets.ToplevelTest) ... test test_tk failed -- Traceback (most recent call last): File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 92, in test_use widget2 = self.create(use=wid) File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 67, in create return tkinter.Toplevel(self.root, **kwargs) File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\Tkinter.py", line 2138, in __init__ BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra) File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\Tkinter.py", line 2095, in __init__ (widgetName, self._w) + extra + self._options(cnf)) TclError: expected integer but got "0xffffffff92b20298L" ok ====================================================================== ERROR: test_use (test_tkinter.test_widgets.ToplevelTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 92, in test_use widget2 = self.create(use=wid) File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\test\test_tkinter\test_widgets.py", line 67, in create return tkinter.Toplevel(self.root, **kwargs) File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\Tkinter.py", line 2138, in __init__ BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra) File "D:\buildarea\2.7.ware-win81-release.refleak\build\lib\lib-tk\Tkinter.py", line 2095, in __init__ (widgetName, self._w) + extra + self._options(cnf)) TclError: expected integer but got "0xffffffff92b20298L" ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 06:07:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 10:07:42 +0000 Subject: [issue30855] [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1502100462.89.0.528251398386.issue30855@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, the test also failed on Python 3.5 (on "AMD64 Windows8.1 Refleaks 3.5" buildbot): http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.5/builds/62/steps/test/logs/stdio ====================================================================== ERROR: test_use (tkinter.test.test_tkinter.test_widgets.ToplevelTest) (wid='0xffffffff87a60298') ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.5.ware-win81-release.refleak\build\lib\tkinter\test\test_tkinter\test_widgets.py", line 96, in test_use widget2 = self.create(use=wid) File "D:\buildarea\3.5.ware-win81-release.refleak\build\lib\tkinter\test\test_tkinter\test_widgets.py", line 70, in create return tkinter.Toplevel(self.root, **kwargs) File "D:\buildarea\3.5.ware-win81-release.refleak\build\lib\tkinter\__init__.py", line 2190, in __init__ BaseWidget.__init__(self, master, 'toplevel', cnf, {}, extra) File "D:\buildarea\3.5.ware-win81-release.refleak\build\lib\tkinter\__init__.py", line 2147, in __init__ (widgetName, self._w) + extra + self._options(cnf)) _tkinter.TclError: integer value too large to represent ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 06:20:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 10:20:07 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502101207.82.0.0789237995671.issue31130@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3047 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 06:24:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 10:24:39 +0000 Subject: [issue31068] test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502101479.94.0.535615481493.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: I interrupted the build 61 (it was running since 58 hours). ... running: test_ttk_guionly (191065 sec) running: test_ttk_guionly (191095 s command interrupted, attempting to kill ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 06:32:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 10:32:04 +0000 Subject: [issue31068] test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502101924.12.0.0877748650618.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: The build 56 was also interrupted, it was running for 85 hours. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 06:35:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 10:35:24 +0000 Subject: [issue31068] test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502102124.21.0.537702148149.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: The build 43 was also interrupted (it was running for 10 hours). Summary on builds 42-61, builds interrupted because of test_ttk_guionly: 43, 52, 55, 56, 61. Note: build 53 also failed, but for a different unknown reason. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 06:36:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 10:36:20 +0000 Subject: [issue31068] test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502102180.76.0.188810040205.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: > Summary on builds 42-61, builds interrupted because of test_ttk_guionly: 43, 52, 55, 56, 61. 5 fails/20 builds: a failure rate of 25% (1/4) :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 06:39:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 10:39:01 +0000 Subject: [issue31120] [2.7] Python 64 bit _ssl compile fails due missing buildinf_amd64.h In-Reply-To: <1501851770.24.0.114310480088.issue31120@psf.upfronthosting.co.za> Message-ID: <1502102341.36.0.0352325973904.issue31120@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 07:06:35 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 07 Aug 2017 11:06:35 +0000 Subject: [issue31131] asyncio.wait_for() TimeoutError doesn't provide full traceback Message-ID: <1502103995.24.0.900898482206.issue31131@psf.upfronthosting.co.za> New submission from Chris Jerdonek: In Python 3.6.1, if asyncio.wait_for() times out with a TimeoutError, the traceback doesn't show what line the code was waiting on when the timeout occurred. This makes it more difficult to diagnose the cause of a timeout. To reproduce, you can use the following code: import asyncio async def run(): print('running...') await asyncio.sleep(1000000) def main(coro): loop = asyncio.new_event_loop() future = asyncio.wait_for(coro, timeout=1) loop.run_until_complete(future) main(run()) It gives the following output (notice that the sleep() line is missing): $ python test-timeouterror.py running... Traceback (most recent call last): File "test-timeouterror.py", line 12, in main(run()) File "test-timeouterror.py", line 10, in main loop.run_until_complete(future) File "/Users/.../python3.6/asyncio/base_events.py", line 466, in run_until_complete return future.result() File "/Users/.../python3.6/asyncio/tasks.py", line 356, in wait_for raise futures.TimeoutError() concurrent.futures._base.TimeoutError It seems like it should be possible to show the full traceback because, for example, if I register a signal handler with loop.add_signal_handler() as described here: https://mail.python.org/pipermail/async-sig/2017-August/000374.html and press Control-C before the timeout occurs, I do get a full traceback showing the line: await asyncio.sleep(1000000) ---------- components: Library (Lib), asyncio messages: 299845 nosy: chris.jerdonek, yselivanov priority: normal severity: normal status: open title: asyncio.wait_for() TimeoutError doesn't provide full traceback type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 08:23:11 2017 From: report at bugs.python.org (Christian Heimes) Date: Mon, 07 Aug 2017 12:23:11 +0000 Subject: [issue28414] SSL match_hostname fails for internationalized domain names In-Reply-To: <1476172956.13.0.85556243538.issue28414@psf.upfronthosting.co.za> Message-ID: <1502108591.6.0.21347746452.issue28414@psf.upfronthosting.co.za> Christian Heimes added the comment: For the record, I'm now considering match_hostname() on U-Labels crazy level 'A sure sign of someone who wears his underpants on his head.'. Once upon a time I had some hope to make it work and keep server_hostname to be an IDN U-Label. I no longer think it feasible and safe at the same time. Pros: * ACE is native encoding in SNI TLSEXT. * ACE is native encoding in X509v3 SAN extension. * ACE is native encoding in DNS. * ACE is required to avoid partial wildcards on punycode ("x*" must not match "xn--..."). * OpenSSL's hostname verification operates on ACE. * ACE is not ambiguous, ACE -> U-label -> ACE depends on IDNA standard and settings. Cons: * Making SSLSocket.server_hostname IDN A-label instead of U-label is backwards incompatible. Self-quote from https://github.com/pyca/cryptography/issues/3357#issuecomment-318902879 --- I have been struggling with similar issues in Python's ssl module. The current implementation cannot verify and match IDN host names. It's also a bit of a mess, SNI callback and server_hostname are IDN U-labels, cert attributes are IDN A-labels. I have played with several approaches to fix the issue. So far only one approach is both simple enough to be memorable and not a potential source of security issues. It's also fully backwards compatible with ASCII-only host names. User supplied input (hostname for TCP connection, server hostname) can be specified as either IDN U-label (str), IDN A-label (aka ACE, str) or ACE bytes. Internally the socket module and SSL module use ACE bytes only. Text (str) are converted to ACE bytes using IDNA. Since ACE str are just ASCII, IDNA encoding of ACE str is equivalent to encoding with ASCII encoding. All output (SAN dNSName, SAN URI, CN, SNI callback, server_hostname attribute) are decoded as ACE strings. Since IDN is not a bijective mapping and also depends on the IDNA standard (2003, 2008, UTS46), this avoids some potential security issues. X.509 hostname verification and matching is defined on ACE, not IDN U-labels. I would rather keep them as bytes, but it wouldn't be backwards compatible. Also the aligns the SSL module with the socket module. socket.getnameinfo() decodes with ASCII, not with IDNA. The new approach will make the SSL module compatible with the external idna package and IDNA 2008. Users just have to pass in ACE bytes as server_hostname. --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 08:25:42 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 07 Aug 2017 12:25:42 +0000 Subject: [issue29432] wait_for(gather(...)) logs weird error message In-Reply-To: <1486121124.44.0.178086142975.issue29432@psf.upfronthosting.co.za> Message-ID: <1502108742.51.0.524180523982.issue29432@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I noticed that the future defined by asyncio.gather(sleep) is in a "pending" state immediately after the asyncio.TimeoutError. One workaround is to wait for the cancellation to finish: @asyncio.coroutine def main(): sleep = asyncio.sleep(0.2) future = asyncio.gather(sleep) try: yield from asyncio.wait_for(future, timeout=0.1) except asyncio.TimeoutError: print(f'future: {future}') try: yield from future except asyncio.CancelledError: print(f'future: {future}') yield from asyncio.sleep(0.1) asyncio.get_event_loop().run_until_complete(main()) Outputs: future: <_GatheringFuture pending> future: <_GatheringFuture finished exception=CancelledError()> Another option is to pass return_exceptions=True to gather(). This appears to make the log messages you were concerned about go away: future: <_GatheringFuture pending> ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 09:47:49 2017 From: report at bugs.python.org (Guillaume Sanchez) Date: Mon, 07 Aug 2017 13:47:49 +0000 Subject: [issue30717] Add unicode grapheme cluster break algorithm In-Reply-To: <1497986122.28.0.540580196076.issue30717@psf.upfronthosting.co.za> Message-ID: <1502113669.02.0.13367737221.issue30717@psf.upfronthosting.co.za> Guillaume Sanchez added the comment: > I don't think unicodedata is the right place I do agree with that. A new module sounds good, would it be a problem if that module would contain very few functions at first? > Can we mark this as having a Provisional API to give us time to decide on the best API before locking it in permanently? I'm not sure it's my call to make, but I would gladly consider that option. > we should go through a PEP. Why not. I may need a bit of guidance though. > If you want state keeping for iterating over multiple parts of the string, you can use an iterator. Sure thing. It just wasn't specified like this in the proto-PEP. > The APIs were inspired by the standard string.find() APIs, that's why they work on indexes and don't return Unicode strings. As such, they serve a different use case than an iterator. I personally like having a generator returning slice objects, as suggested above. What would be some good objections to this? > Wouldn't this be a typical case where we'd expect a module to evolve and gain usage on PyPI first, before adding it to the stdlib? [...] they might give inspiration for a suitable API design I'll give it a look. > The well known library for Unicode support in C++ and Java is ICU Yes. I clearly don't want this PR to be interpreted as "we're needing ICU". ICU provides much much more than what I'm willing to provide. My goal here is just to "fix" how the python's standard library iterates over characters. Noting more, nothing less. One might think that splitlines() should be "fixed" too, and there is clearly matter to discuss here. Same for words splitting. However, I do not intend to bring normalization, which you already have, collations, locale dependant upcasing or lowercasing, etc. We might need a wheel, but we don't have to take the whole truck. How do we discuss all of this? Who's in charge of making decisions? How long should we debate? That's my first time contributing to Python and I'm new to all of that. Thanks for your time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 09:50:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Aug 2017 13:50:36 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502113836.13.0.462871865049.issue31113@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3048 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 09:59:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 07 Aug 2017 13:59:04 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502114344.74.0.871107480905.issue31113@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 3015 gets rid of recursion for normal control flow in the compiler. This fixes a stack overflow for this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 10:52:25 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 07 Aug 2017 14:52:25 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502117545.54.0.492400710211.issue31113@psf.upfronthosting.co.za> Jeremy Kloth added the comment: The PR resolved the stack overflow in dfs(), however it now fails in the stackdepth() routine (technically, the stackdepth_walk() helper). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 11:26:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 15:26:32 +0000 Subject: [issue31004] IDLE, configdialog: Factor out FontTab class from ConfigDialog In-Reply-To: <1500883425.86.0.0330979126605.issue31004@psf.upfronthosting.co.za> Message-ID: <1502119592.29.0.0184899195735.issue31004@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Idlelib is a bit exceptional: see PEP 434. Except for one test and the news files, I keep idlelib identical in 3.6 and 3.7. This makes all backports, *including new tests*, trivial and overall reduces the risk of regression (unless IDLE 3.6 were abandoned completely). The risk of regression is why I have only touched 3.6/7 since last Fall, why I am increasingly strict about testing, and why I will manually test everything at least a few days before the next release candidate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 12:18:05 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 16:18:05 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502122685.26.0.723304711628.issue31130@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 12:43:22 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Mon, 07 Aug 2017 16:43:22 +0000 Subject: [issue31132] test_prlimit from test_resource fails when building python3 inside systemd-nspawn environment Message-ID: <1502124202.05.0.637493609291.issue31132@psf.upfronthosting.co.za> New submission from Charalampos Stratakis: FAIL: test_prlimit (test.test_resource.ResourceTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/Python-3.6.2/Lib/test/support/__init__.py", line 556, in wrapper return func(*args, **kw) File "/builddir/build/BUILD/Python-3.6.2/Lib/test/test_resource.py", line 153, in test_prlimit 1, resource.RLIMIT_AS) AssertionError: PermissionError not raised by prlimit I observed this issue when mock [0] the underlying build system we use in Fedora started using the systemd-nspawn container technology instead of chroot [1][2] in order to create a minimal build environment. [0] https://github.com/rpm-software-management/mock [1] https://github.com/rpm-software-management/mock/wiki/Release-Notes-1.4.1 [2] https://www.freedesktop.org/software/systemd/man/systemd-nspawn.html ---------- messages: 299852 nosy: cstratak priority: normal severity: normal status: open title: test_prlimit from test_resource fails when building python3 inside systemd-nspawn environment versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 12:55:50 2017 From: report at bugs.python.org (Tomas Orsava) Date: Mon, 07 Aug 2017 16:55:50 +0000 Subject: [issue31132] test_prlimit from test_resource fails when building python3 inside systemd-nspawn environment In-Reply-To: <1502124202.05.0.637493609291.issue31132@psf.upfronthosting.co.za> Message-ID: <1502124950.01.0.124719408365.issue31132@psf.upfronthosting.co.za> Tomas Orsava added the comment: So the issue seems to be that Python believes it's run without root privileges, but it's mistaken because it indeed has root. ---------- nosy: +torsava _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 13:25:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 17:25:50 +0000 Subject: [issue31133] [2.7] PCbuild/pcbuild.sln cannot be open by Visual Studio 2010 Message-ID: <1502126750.5.0.768313426275.issue31133@psf.upfronthosting.co.za> New submission from STINNER Victor: The devguide says that Python 2.7 can be build using VS 2010 but it's wrong. PCbuild/pcbuild.sln starts with: Microsoft Visual Studio Solution File, Format Version 12.00 Where 12.00 means Visual Studio 2013. Replacing 12.00 with 11.00 allows me to open the solution in Visual Studio 2010. So I suggest to make this change. Note: By the way, why VS wants to build in 32-bit mode by default? It would be nice to switch to 64-bit mode by default! ---------- components: Build, Windows messages: 299854 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: [2.7] PCbuild/pcbuild.sln cannot be open by Visual Studio 2010 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 13:28:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 17:28:51 +0000 Subject: [issue31133] [2.7] PCbuild/pcbuild.sln of Python 2.7 cannot be open by Visual Studio 2010 In-Reply-To: <1502126750.5.0.768313426275.issue31133@psf.upfronthosting.co.za> Message-ID: <1502126931.41.0.379416766282.issue31133@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: [2.7] PCbuild/pcbuild.sln cannot be open by Visual Studio 2010 -> [2.7] PCbuild/pcbuild.sln of Python 2.7 cannot be open by Visual Studio 2010 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 13:37:12 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 17:37:12 +0000 Subject: [issue29910] Ctrl-D eats a character on IDLE In-Reply-To: <1490549101.95.0.397312441336.issue29910@psf.upfronthosting.co.za> Message-ID: <1502127432.95.0.604530651749.issue29910@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 89225871d314fa675ea9ac292e7bc75320f1aef5 by Terry Jan Reedy in branch 'master': bpo-29910: IDLE - revert `break`s that disabled calltip close. (#2997) https://github.com/python/cpython/commit/89225871d314fa675ea9ac292e7bc75320f1aef5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 13:50:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 17:50:53 +0000 Subject: [issue29910] Ctrl-D eats a character on IDLE In-Reply-To: <1490549101.95.0.397312441336.issue29910@psf.upfronthosting.co.za> Message-ID: <1502128253.05.0.154932052304.issue29910@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3050 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 14:06:46 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 18:06:46 +0000 Subject: [issue30642] Fix leaks in idlelib In-Reply-To: <1497331046.43.0.660269627815.issue30642@psf.upfronthosting.co.za> Message-ID: <1502129206.18.0.813943920499.issue30642@psf.upfronthosting.co.za> Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file46948/findleak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 14:07:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 18:07:39 +0000 Subject: [issue30642] Fix leaks in idlelib In-Reply-To: <1497331046.43.0.660269627815.issue30642@psf.upfronthosting.co.za> Message-ID: <1502129259.09.0.20902836903.issue30642@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Unlinked old findleak.py after uploading much improved version to #31130. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 14:09:43 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 18:09:43 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502129383.72.0.543115438054.issue31130@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Attached is an improved idlelib.idle_test.test_* leak checker that uses the --match option. ---------- assignee: -> terry.reedy components: +IDLE, Tests nosy: +terry.reedy Added file: http://bugs.python.org/file47059/findleak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 14:22:46 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 18:22:46 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502130166.37.0.950845587972.issue31130@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 733d0f63c562090a2b840859b96028d6ec0a4803 by Terry Jan Reedy in branch 'master': bpo-31130: IDLE -- stop leaks in test_configdialog. (#3016) https://github.com/python/cpython/commit/733d0f63c562090a2b840859b96028d6ec0a4803 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 14:23:09 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 18:23:09 +0000 Subject: [issue29910] Ctrl-D eats a character on IDLE In-Reply-To: <1490549101.95.0.397312441336.issue29910@psf.upfronthosting.co.za> Message-ID: <1502130189.84.0.545570740379.issue29910@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset b61de2d46596ac00dcf2d33bbce2023d0bf4207b by Terry Jan Reedy in branch '3.6': [3.6] bpo-29910: IDLE - revert `break`s that disabled calltip close. (GH-2997) (#3017) https://github.com/python/cpython/commit/b61de2d46596ac00dcf2d33bbce2023d0bf4207b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 14:25:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 18:25:03 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502130303.09.0.561259818926.issue31130@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3051 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 14:29:55 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Aug 2017 18:29:55 +0000 Subject: [issue24700] array compare is hideously slow In-Reply-To: <1437692474.17.0.61027224315.issue24700@psf.upfronthosting.co.za> Message-ID: <1502130595.81.0.677172659832.issue24700@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Not saying that this issue shouldn't be fixed, but Numpy arrays are a much more powerful and well-optimized replacement for array.array. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 15:05:35 2017 From: report at bugs.python.org (Mark Roseman) Date: Mon, 07 Aug 2017 19:05:35 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1471117947.7.0.659308305751.issue27755@psf.upfronthosting.co.za> Message-ID: <1502132735.6.0.379058034841.issue27755@psf.upfronthosting.co.za> Mark Roseman added the comment: Cheryl, regarding the spinbox, as per http://www.tkdocs.com/tutorial/morewidgets.html#spinbox, the ttk version appeared in Tk 8.5.9, which might explain it's absence in tkinter. A wrapper isn't too hard to do of course... e.g. https://stackoverflow.com/questions/30783603/create-new-ttk-widget-from-tkinter ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 15:20:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 19:20:08 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502133608.47.0.609423613645.issue31130@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 9d7d928b5853b921ed27f1e535dfe8174169854c by Terry Jan Reedy in branch '3.6': [3.6] bpo-31130: IDLE -- stop leaks in test_configdialog. (GH-3016) (#3018) https://github.com/python/cpython/commit/9d7d928b5853b921ed27f1e535dfe8174169854c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 15:20:36 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 07 Aug 2017 19:20:36 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502133636.56.0.954087404472.issue31130@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 15:32:20 2017 From: report at bugs.python.org (Alexander Mohr) Date: Mon, 07 Aug 2017 19:32:20 +0000 Subject: [issue31061] asyncio segfault when using threadpool and "_asyncio" native module In-Reply-To: <1501186590.27.0.993176632925.issue31061@psf.upfronthosting.co.za> Message-ID: <1502134340.78.0.59441338375.issue31061@psf.upfronthosting.co.za> Alexander Mohr added the comment: hmm, may be my fault due to docker image tagging issue. Will redeploy and update if the issue persists. If I don't reply again sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 16:12:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 20:12:38 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502136758.88.0.737513820194.issue31130@psf.upfronthosting.co.za> STINNER Victor added the comment: I confirm that test_idle doesn't leak anymore: $ ./python -m test -R 3:3 -u all test_idle 1 test OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 16:15:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 20:15:47 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502136947.07.0.317058156054.issue31130@psf.upfronthosting.co.za> STINNER Victor added the comment: The merged change is the correct fix. My change was only a workaround. Thanks for the fix Terry ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 16:20:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 20:20:00 +0000 Subject: [issue31132] test_prlimit from test_resource fails when building python3 inside systemd-nspawn environment In-Reply-To: <1502124202.05.0.637493609291.issue31132@psf.upfronthosting.co.za> Message-ID: <1502137200.23.0.14270373371.issue31132@psf.upfronthosting.co.za> STINNER Victor added the comment: Maybe we should simply skip the test if the user is root? If os.getuid()==0. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 16:34:55 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Mon, 07 Aug 2017 20:34:55 +0000 Subject: [issue27755] Retire DynOptionMenu with a ttk Combobox In-Reply-To: <1502132735.6.0.379058034841.issue27755@psf.upfronthosting.co.za> Message-ID: Cheryl Sabella added the comment: Maybe there should be a bug tracker issue to add it to ttk.py? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 16:46:32 2017 From: report at bugs.python.org (AW) Date: Mon, 07 Aug 2017 20:46:32 +0000 Subject: [issue31134] python not added to path Message-ID: <1502138792.87.0.0405556214712.issue31134@psf.upfronthosting.co.za> New submission from AW: I selected "Add Python 3.6 to PATH" when I installed the program. I am able to launch Python from the start button. It isn't recognized on the command line. See screen shots in the attached Word file. ---------- files: PythonError.docx messages: 299868 nosy: AW priority: normal severity: normal status: open title: python not added to path type: behavior Added file: http://bugs.python.org/file47060/PythonError.docx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 16:52:48 2017 From: report at bugs.python.org (Shane Harvey) Date: Mon, 07 Aug 2017 20:52:48 +0000 Subject: [issue1322] Deprecate platform.dist() and platform.linux_distribution() functions In-Reply-To: <1193246464.1.0.269134020057.issue1322@psf.upfronthosting.co.za> Message-ID: <1502139168.8.0.616279271975.issue1322@psf.upfronthosting.co.za> Shane Harvey added the comment: When are these functions going to be deprecated? In 3.5, 3.6, and master they still raise PendingDeprecationWarning, not DeprecationWarning: https://github.com/python/cpython/blob/v3.5.3/Lib/platform.py#L305-L306 https://github.com/python/cpython/blob/v3.6.2/Lib/platform.py#L304-L305 https://github.com/python/cpython/blob/5c4b0d0/Lib/platform.py#L304-L305 ---------- nosy: +ShaneHarvey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 17:07:36 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 07 Aug 2017 21:07:36 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1502117545.54.0.492400710211.issue31113@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: One fix at a time. ? On Mon, Aug 7, 2017, 07:52 Jeremy Kloth, wrote: > > Jeremy Kloth added the comment: > > The PR resolved the stack overflow in dfs(), however it now fails in the > stackdepth() routine (technically, the stackdepth_walk() helper). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 17:12:03 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 07 Aug 2017 21:12:03 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1502140323.17.0.208641848504.issue30876@psf.upfronthosting.co.za> Ned Deily added the comment: Just to clarify: the revision added since 3.5.4rc1, f9fbed19a964e55ee703005823d8a7408f83d7f4 ([3.5] bpo-30876: Add new import test files to projects) fixes a test failure seen on all non-Windows platforms when running tests from an installed Python. It's probably not worth retagging 3.5.4 final at this point just for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 17:17:46 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 07 Aug 2017 21:17:46 +0000 Subject: [issue31134] python not added to path In-Reply-To: <1502138792.87.0.0405556214712.issue31134@psf.upfronthosting.co.za> Message-ID: <1502140666.16.0.196966693596.issue31134@psf.upfronthosting.co.za> Eryk Sun added the comment: A WM_SETTINGCHANGE message gets broadcasted to top-level windows, so Explorer should reload its environment from the registry. Did you start a new command prompt from Explorer? ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 17:32:58 2017 From: report at bugs.python.org (AW) Date: Mon, 07 Aug 2017 21:32:58 +0000 Subject: [issue31134] python not added to path In-Reply-To: <1502138792.87.0.0405556214712.issue31134@psf.upfronthosting.co.za> Message-ID: <1502141578.52.0.231157770383.issue31134@psf.upfronthosting.co.za> AW added the comment: Sorry, no I didn't. When I went off to find out how to add Python to the path manually, I found out that opening a new command window would be needed to see any update. I was coming back to say "never mind" when I saw your message. Sorry to bother you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 17:34:02 2017 From: report at bugs.python.org (AW) Date: Mon, 07 Aug 2017 21:34:02 +0000 Subject: [issue31134] python not added to path In-Reply-To: <1502138792.87.0.0405556214712.issue31134@psf.upfronthosting.co.za> Message-ID: <1502141642.51.0.884258507014.issue31134@psf.upfronthosting.co.za> Changes by AW : ---------- resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 18:02:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 22:02:04 +0000 Subject: [issue30351] [2.7] regrtest hangs on Python 2.7 (test_threading?) In-Reply-To: <1494588560.82.0.408106199182.issue30351@psf.upfronthosting.co.za> Message-ID: <1502143324.68.0.373080980555.issue30351@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3052 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 18:27:42 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 07 Aug 2017 22:27:42 +0000 Subject: [issue31134] python not added to path In-Reply-To: <1502138792.87.0.0405556214712.issue31134@psf.upfronthosting.co.za> Message-ID: <1502144862.54.0.356762252327.issue31134@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 18:30:03 2017 From: report at bugs.python.org (Varun Agrawal) Date: Mon, 07 Aug 2017 22:30:03 +0000 Subject: [issue31123] fnmatch does not follow Unix fnmatch functionality In-Reply-To: <1501888939.57.0.889177550309.issue31123@psf.upfronthosting.co.za> Message-ID: <1502145003.39.0.667648083939.issue31123@psf.upfronthosting.co.za> Varun Agrawal added the comment: Hi David, It seems you already took a look at the man page. There are some subtle differences such as being unable to match to a directory when the pattern ends with a forward slash. Overall, I'd like to see fnmatch be used to create a program that can perform pattern matching of files similar to how a gitignore works. Currently, this involves quite a bit of hackery to get working well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 19:20:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 23:20:12 +0000 Subject: [issue31068] test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502148012.77.0.631555994184.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm trying to reproduce the bug using the following command run in a Command Prompt: PCbuild\amd64\python_d.exe -m test -r -u all -R 3:3 -F -v --timeout=30 test_ttk_guionly Note: I'm using https://github.com/python/cpython/pull/3019 to get --timeout feature. Once (when I wasn't using --timeout=30), I saw test_ttk.test_widgets.TreeviewTest.test_tag_bind() stuck! But it only saw this bug twice in 1 hour of intensive tests, and so I'm not sure that it exists. Since I unable to easily reproduce the bug, it's hard to collect more information about the program state when the bug occurs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 19:37:08 2017 From: report at bugs.python.org (Eryk Sun) Date: Mon, 07 Aug 2017 23:37:08 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502149028.08.0.677235763605.issue31113@psf.upfronthosting.co.za> Eryk Sun added the comment: Here are a couple of workarounds for the crash in Windows. The default stack reservation size is a field in the PE/COFF header, which you can edit using editbin.exe, e.g.: editbin /stack:[size_in_bytes] "path\to\python.exe" The distributed python.exe has a 20000000 byte stack reservation. I changed it to 3 MiB and was able to run generated.py. You can also pre-compile it on a thread with a larger stack, e.g.: >>> import threading >>> from compileall import compile_file >>> threading.stack_size(2**20 * 3) 0 >>> t = threading.Thread(target=compile_file, args=('generated.py',)) >>> t.start() >>> Compiling 'generated.py'... ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 19:39:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Aug 2017 23:39:47 +0000 Subject: [issue31068] test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502149187.0.0.573471942353.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah! I captured the traceback of a first bug using the command: PCbuild\amd64\python_d.exe -m test -R 3:3 -u all -v --timeout=30 -r -F test_ttk_guionly Output: (...) test_resize (test_ttk.test_extensions.LabeledScaleTest) ... *** STACKTRACE - START *** # ThreadID: 1216 File: "C:\haypo\2.7\lib\threading.py", line 774, in __bootstrap self.__bootstrap_inner() File: "C:\haypo\2.7\lib\threading.py", line 801, in __bootstrap_inner self.run() File: "C:\haypo\2.7\lib\test\regrtest.py", line 2024, in run self.dump_threads() File: "C:\haypo\2.7\lib\test\regrtest.py", line 2050, in dump_threads self.dump_thread(stack) # ThreadID: 2172 File: "C:\haypo\2.7\lib\runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File: "C:\haypo\2.7\lib\runpy.py", line 72, in _run_code exec code in run_globals File: "C:\haypo\2.7\lib\test\__main__.py", line 3, in regrtest.main_in_temp_cwd() File: "C:\haypo\2.7\lib\test\regrtest.py", line 2083, in main_in_temp_cwd main() File: "C:\haypo\2.7\lib\test\regrtest.py", line 841, in main result = local_runtest() File: "C:\haypo\2.7\lib\test\regrtest.py", line 827, in local_runtest testdir=testdir) File: "C:\haypo\2.7\lib\test\regrtest.py", line 1042, in runtest return runtest_inner(test, verbose, quiet, huntrleaks, pgo, testdir) File: "C:\haypo\2.7\lib\test\regrtest.py", line 1234, in runtest_inner huntrleaks) File: "C:\haypo\2.7\lib\test\regrtest.py", line 1369, in dash_R run_the_test() File: "C:\haypo\2.7\lib\test\regrtest.py", line 1355, in run_the_test indirect_test() File: "C:\haypo\2.7\lib\test\test_ttk_guionly.py", line 37, in test_main *runtktests.get_tests(text=False, packages=['test_ttk'])) File: "C:\haypo\2.7\lib\test\support\__init__.py", line 1577, in run_unittest _run_suite(suite) File: "C:\haypo\2.7\lib\test\support\__init__.py", line 1532, in _run_suite result = runner.run(suite) File: "C:\haypo\2.7\lib\unittest\runner.py", line 151, in run test(result) File: "C:\haypo\2.7\lib\unittest\suite.py", line 70, in __call__ return self.run(*args, **kwds) File: "C:\haypo\2.7\lib\unittest\suite.py", line 108, in run test(result) File: "C:\haypo\2.7\lib\unittest\suite.py", line 70, in __call__ return self.run(*args, **kwds) File: "C:\haypo\2.7\lib\unittest\suite.py", line 108, in run test(result) File: "C:\haypo\2.7\lib\unittest\case.py", line 393, in __call__ return self.run(*args, **kwds) File: "C:\haypo\2.7\lib\unittest\case.py", line 329, in run testMethod() File: "C:\haypo\2.7\lib\lib-tk\test\test_ttk\test_extensions.py", line 184, in t est_resize x.update() File: "C:\haypo\2.7\lib\lib-tk\Tkinter.py", line 1023, in update self.tk.call('update') *** STACKTRACE - END *** ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 19:45:23 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 07 Aug 2017 23:45:23 +0000 Subject: [issue29432] wait_for(gather(...)) logs weird error message In-Reply-To: <1486121124.44.0.178086142975.issue29432@psf.upfronthosting.co.za> Message-ID: <1502149523.65.0.809795124634.issue29432@psf.upfronthosting.co.za> Chris Jerdonek added the comment: By the way, I see this exact issue was also raised and discussed here, with a couple responses by Guido, too: https://github.com/python/asyncio/issues/253 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 20:31:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 00:31:09 +0000 Subject: [issue31068] test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502152269.36.0.702783586271.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: Another bug, truncated traceback since the top was the same: (...) File: "C:\haypo\2.7\lib\lib-tk\test\test_ttk\test_widgets.py", line 1367, in test_heading_callback self.tv.update() File: "C:\haypo\2.7\lib\lib-tk\Tkinter.py", line 1023, in update self.tk.call('update') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 20:46:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 00:46:39 +0000 Subject: [issue31135] test_ttk_guionly doesn't destroy all widgets Message-ID: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> New submission from STINNER Victor: While working on bpo-31068, I wrote attached widget_instance.patch to check if test_ttk_guionly really removes all widgets. Bad news: it doesn't. Example: haypo at selma$ ./python -m test -u all test_ttk_guionly (...) test test_ttk_guionly crashed -- : leaking 69 widgets (...) Attached fix_destroy.patch is my attempt to fix this issue. ---------- components: Tkinter files: widget_instance.patch keywords: patch messages: 299880 nosy: haypo priority: normal severity: normal status: open title: test_ttk_guionly doesn't destroy all widgets type: resource usage versions: Python 2.7 Added file: http://bugs.python.org/file47061/widget_instance.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 20:46:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 00:46:59 +0000 Subject: [issue31135] test_ttk_guionly doesn't destroy all widgets In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502153219.9.0.790006044655.issue31135@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file47062/fix_destroy.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 20:47:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 00:47:23 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502153243.17.0.697710770806.issue31135@psf.upfronthosting.co.za> STINNER Victor added the comment: I only tested Python 2.7. I didn't check if other branches are affected. ---------- title: test_ttk_guionly doesn't destroy all widgets -> [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 20:48:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 00:48:19 +0000 Subject: [issue31068] test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502153299.85.0.0162668554141.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-31135: "[2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 20:48:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 00:48:29 +0000 Subject: [issue31068] test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502153309.91.0.355172036818.issue31068@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 20:48:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 00:48:35 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502153315.76.0.322080508802.issue31135@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 20:50:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 00:50:31 +0000 Subject: [issue31068] test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502153431.48.0.332099860322.issue31068@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_ttk_guionly hangs on AMD64 Windows8.1 Refleaks 2.7 -> test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 20:50:49 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 08 Aug 2017 00:50:49 +0000 Subject: [issue31136] raw strings cannot end with a backslash character r'\' Message-ID: <1502153449.52.0.763252325075.issue31136@psf.upfronthosting.co.za> New submission from Gregory P. Smith: A raw string literal cannot end in a backslash. There is no friendly way to write a string that ends in a backslash character. In particular I want to put the following into a Python string: \\?\ '\\\\?\\' works but is escaping hell so I wanted to suggest to the author to use r'\\?\' but that leads to: SyntaxError: EOL while scanning string literal Tested in a random 3.7.0a0 build as well as older 2.7 and 3.x stable versions. r'\' is the easiest way to reproduce this. (which could be written using the same number of bytes as '\\'... the use case above where a string containing a lot of \s that also ends in a \ is where it matters more from a code beauty point of view) Can we update the parser to allow this? ---------- components: Interpreter Core messages: 299883 nosy: gregory.p.smith priority: normal severity: normal status: open title: raw strings cannot end with a backslash character r'\' versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 20:59:25 2017 From: report at bugs.python.org (Wilfredo Sanchez) Date: Tue, 08 Aug 2017 00:59:25 +0000 Subject: [issue31137] Add a path attribute to NamedTemporaryFile Message-ID: <1502153965.8.0.297181946686.issue31137@psf.upfronthosting.co.za> New submission from Wilfredo Sanchez: Add a path attribute to NamedTemporaryFile which provides a pathlib.Path object pointing to the file on disk. ---------- components: Library (Lib) messages: 299884 nosy: wsanchez priority: normal severity: normal status: open title: Add a path attribute to NamedTemporaryFile type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:02:08 2017 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 08 Aug 2017 01:02:08 +0000 Subject: [issue31136] raw strings cannot end with a backslash character r'\' In-Reply-To: <1502153449.52.0.763252325075.issue31136@psf.upfronthosting.co.za> Message-ID: <1502154128.8.0.601775528351.issue31136@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:06:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 01:06:18 +0000 Subject: [issue31136] raw strings cannot end with a backslash character r'\' In-Reply-To: <1502153449.52.0.763252325075.issue31136@psf.upfronthosting.co.za> Message-ID: <1502154378.32.0.440112926265.issue31136@psf.upfronthosting.co.za> STINNER Victor added the comment: Workaround working on all Python versions, string concatenation made by the compiler: r"...." "...". >>> print(r"a\n" "\\") a\n\ ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:12:27 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 08 Aug 2017 01:12:27 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1502154747.2.0.755494907351.issue31033@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:19:17 2017 From: report at bugs.python.org (Wilfredo Sanchez) Date: Tue, 08 Aug 2017 01:19:17 +0000 Subject: [issue31138] dir argument NamedTemporaryFile should accept a pathlib.Path Message-ID: <1502155157.73.0.00743957621165.issue31138@psf.upfronthosting.co.za> New submission from Wilfredo Sanchez: Or, better, any object which conforms to the file system path protocol (__fspath__). ---------- components: Library (Lib) messages: 299886 nosy: wsanchez priority: normal severity: normal status: open title: dir argument NamedTemporaryFile should accept a pathlib.Path versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:28:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 01:28:41 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502155721.23.0.638349440867.issue31135@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:28:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 01:28:45 +0000 Subject: [issue31068] test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502155725.0.0.470911291438.issue31068@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:34:07 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 08 Aug 2017 01:34:07 +0000 Subject: [issue30681] email.utils.parsedate_to_datetime() should return None when date cannot be parsed In-Reply-To: <1497568363.46.0.596536376967.issue30681@psf.upfronthosting.co.za> Message-ID: <1502156047.75.0.638672072366.issue30681@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:34:39 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 08 Aug 2017 01:34:39 +0000 Subject: [issue30988] Exception parsing invalid email address headers starting or ending with dot In-Reply-To: <1500699002.76.0.343337119039.issue30988@psf.upfronthosting.co.za> Message-ID: <1502156079.31.0.925879373623.issue30988@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:35:21 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 08 Aug 2017 01:35:21 +0000 Subject: [issue30701] Exception parsing certain invalid email address headers In-Reply-To: <1497864347.44.0.160991763633.issue30701@psf.upfronthosting.co.za> Message-ID: <1502156121.88.0.627694015111.issue30701@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:36:59 2017 From: report at bugs.python.org (George King) Date: Tue, 08 Aug 2017 01:36:59 +0000 Subject: [issue29400] Add instruction level tracing via sys.settrace In-Reply-To: <1485886852.16.0.854514177291.issue29400@psf.upfronthosting.co.za> Message-ID: <1502156219.05.0.722908285724.issue29400@psf.upfronthosting.co.za> George King added the comment: I've updated the patch and I think it's ready for a more serious review. A few notes: * settracestate now takes a flag `trace_instructions`. This describes slightly better the behavior, which is that line events take precedence over instructions. * the old gettrace now raises when `trace_instructions` was set, to prevent silent failure of the old idiom `saved = gettrace(); ... settrace(saved)`. * gettracestate returns a dictionary, which can be passed to settracestate as kwargs. This allows for a replacement idiom `saved = gettracestate(); ... settracestate(**saved)` which should be forward-compatible with any flags we might add in the future. The patch can be viewed here: https://github.com/python/cpython/compare/master...gwk:trace-inst Let me know if I should open up an official PR. Also I just filled out the CLA. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:38:23 2017 From: report at bugs.python.org (George King) Date: Tue, 08 Aug 2017 01:38:23 +0000 Subject: [issue29400] Add instruction level tracing via sys.settrace In-Reply-To: <1485886852.16.0.854514177291.issue29400@psf.upfronthosting.co.za> Message-ID: <1502156303.59.0.221461308842.issue29400@psf.upfronthosting.co.za> George King added the comment: (Also I did prototype instruction filtering but it had mild performance implications when tracing so I have shelved it for the moment.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 21:55:38 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 08 Aug 2017 01:55:38 +0000 Subject: [issue31136] raw strings cannot end with a backslash character r'\' In-Reply-To: <1502153449.52.0.763252325075.issue31136@psf.upfronthosting.co.za> Message-ID: <1502157338.07.0.93862837102.issue31136@psf.upfronthosting.co.za> Martin Panter added the comment: What would your proposal do where an embedded backslash is currently valid? >>> print(r'Backslash apostrophe: \'.') Backslash apostrophe: \'. >>> r'\' # Comment or string?' "\\' # Comment or string?" ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 22:11:03 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 08 Aug 2017 02:11:03 +0000 Subject: [issue31136] raw strings cannot end with a backslash character r'\' In-Reply-To: <1502153449.52.0.763252325075.issue31136@psf.upfronthosting.co.za> Message-ID: <1502158263.01.0.739623726497.issue31136@psf.upfronthosting.co.za> Gregory P. Smith added the comment: This may well be a "not a bug" resolution to preserve existing semantics that weren't what I expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 22:15:28 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 08 Aug 2017 02:15:28 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1502158528.45.0.693993400893.issue31033@psf.upfronthosting.co.za> Chris Jerdonek added the comment: A couple thoughts on this issue: First, I think the OP's original issue could perhaps largely be addressed without having to change cancel()'s signature. Namely, simply passing a hard-coded string to CancelledError in the couple spots that CancelledError is raised would cause the exception to display: https://github.com/python/cpython/blob/733d0f63c562090a2b840859b96028d6ec0a4803/Lib/asyncio/futures.py#L153 https://github.com/python/cpython/blob/733d0f63c562090a2b840859b96028d6ec0a4803/Lib/asyncio/futures.py#L173 The "raise CancelledError" could be changed to "raise CancelledError('future is cancelled')", a bit like how InvalidStateError is handled a couple lines later: if self._state == _CANCELLED: raise CancelledError if self._state != _FINISHED: raise InvalidStateError('Result is not ready.') Second, in terms of making cancellations easier to debug, is it a deliberate design decision that the CancelledError traceback "swallows" / doesn't show the point at which the coroutine was cancelled? For example, running the following code-- async def run(): await asyncio.sleep(1000000) loop = asyncio.new_event_loop() task = asyncio.ensure_future(run(), loop=loop) loop.call_later(2, task.cancel) loop.run_until_complete(task) Results in the following output: Traceback (most recent call last): File "test-cancel.py", line 46, in loop.run_until_complete(task) File "/Users/.../python3.6/asyncio/base_events.py", line 466, in run_until_complete return future.result() concurrent.futures._base.CancelledError In particular, it doesn't show that the task was waiting on asyncio.sleep(1000000) when the task was cancelled. It would be very useful to see full tracebacks in these cases. (Sorry in advance if this second point is off-topic for this issue.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 22:26:08 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 08 Aug 2017 02:26:08 +0000 Subject: [issue31139] Improve tracemalloc demo code in docs Message-ID: <1502159168.93.0.181996633352.issue31139@psf.upfronthosting.co.za> New submission from Louie Lu: Current tutorial of tracemalloc: https://docs.python.org/3/library/tracemalloc.html Current doc using a un-reproducible output, that will confuse the reader. Propose to use the test code `allocate_bytes` to control the memory usage output, provide more meaningful output to reader. ---------- assignee: docs at python components: Documentation messages: 299892 nosy: docs at python, haypo, louielu priority: normal severity: normal status: open title: Improve tracemalloc demo code in docs type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 22:28:28 2017 From: report at bugs.python.org (Tim Peters) Date: Tue, 08 Aug 2017 02:28:28 +0000 Subject: [issue31136] raw strings cannot end with a backslash character r'\' In-Reply-To: <1502153449.52.0.763252325075.issue31136@psf.upfronthosting.co.za> Message-ID: <1502159308.27.0.388804026795.issue31136@psf.upfronthosting.co.za> Tim Peters added the comment: Yes, I'm closing as not-a-bug. It's been this way (and documented) forever. More specifically, as the docs say, a raw string can't end with an _odd_ number of backslashes: """ String quotes can be escaped with a backslash, but the backslash remains in the string; for example, r"\"" is a valid string literal consisting of two characters: a backslash and a double quote; r"\" is not a valid string literal (even a raw string cannot end in an odd number of backslashes). Specifically, a raw string cannot end in a single backslash (since the backslash would escape the following quote character). """ ---------- nosy: +tim.peters resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 7 23:40:47 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 08 Aug 2017 03:40:47 +0000 Subject: [issue31139] Improve tracemalloc demo code in docs In-Reply-To: <1502159168.93.0.181996633352.issue31139@psf.upfronthosting.co.za> Message-ID: <1502163647.82.0.33737953749.issue31139@psf.upfronthosting.co.za> Changes by Louie Lu : ---------- pull_requests: +3053 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 00:36:32 2017 From: report at bugs.python.org (Jeffrey Rackauckas) Date: Tue, 08 Aug 2017 04:36:32 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1502166992.71.0.00122313254227.issue31072@psf.upfronthosting.co.za> Changes by Jeffrey Rackauckas : ---------- pull_requests: +3054 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 00:45:20 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 08 Aug 2017 04:45:20 +0000 Subject: [issue29910] Ctrl-D eats a character on IDLE In-Reply-To: <1490549101.95.0.397312441336.issue29910@psf.upfronthosting.co.za> Message-ID: <1502167520.22.0.587601746943.issue29910@psf.upfronthosting.co.za> Louie Lu added the comment: After bisecting, commit 213ce12adfc9281c6f381bb45d132e9de8ffd450 cause calltip can't close when type to `)` at the end. for example: print('blablalbalba') ^ show ^ didn't tip close tip ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 00:46:37 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 08 Aug 2017 04:46:37 +0000 Subject: [issue29910] Ctrl-D eats a character on IDLE In-Reply-To: <1490549101.95.0.397312441336.issue29910@psf.upfronthosting.co.za> Message-ID: <1502167597.93.0.902350388029.issue29910@psf.upfronthosting.co.za> Louie Lu added the comment: da..., Terry reverts this soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 01:09:30 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Aug 2017 05:09:30 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502168970.96.0.0761159687148.issue31113@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The PR resolved the stack overflow in dfs(), however it now fails in the stackdepth() routine (technically, the stackdepth_walk() helper). Indeed. The compiler crashes for longer sequences on Linux too. I'm trying to rewrite stackdepth_walk() too, but it is much harder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 01:23:21 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Aug 2017 05:23:21 +0000 Subject: [issue31138] dir argument NamedTemporaryFile should accept a pathlib.Path In-Reply-To: <1502155157.73.0.00743957621165.issue31138@psf.upfronthosting.co.za> Message-ID: <1502169801.54.0.334297986951.issue31138@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Doesn't it support it? >>> import tempfile, pathlib >>> tempfile.NamedTemporaryFile(dir=pathlib.Path('/tmp')) ---------- nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 01:30:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Aug 2017 05:30:39 +0000 Subject: [issue31137] Add a path attribute to NamedTemporaryFile In-Reply-To: <1502153965.8.0.297181946686.issue31137@psf.upfronthosting.co.za> Message-ID: <1502170239.66.0.0410701609627.issue31137@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You can just pass the name attribute to the pathlib.Path constructor. Adding a name attribute will not allow you to do what you can't do now, but will increase the coupling between the tempfile and pathlib modules. The purpose of introducing the path protocol was avoiding creating such couplings. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 01:41:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Aug 2017 05:41:09 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502170869.73.0.208869018301.issue31135@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue25130. Maybe forcing garbage collecting will help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 02:07:14 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Aug 2017 06:07:14 +0000 Subject: [issue24700] array compare is hideously slow In-Reply-To: <1437692474.17.0.61027224315.issue24700@psf.upfronthosting.co.za> Message-ID: <1502172434.74.0.975950897943.issue24700@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The PR looks very reasonable. This is a nice optimization. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 04:55:58 2017 From: report at bugs.python.org (chris.259263) Date: Tue, 08 Aug 2017 08:55:58 +0000 Subject: [issue31140] Insufficient error message with incorrect formated string literal Message-ID: <1502182558.08.0.700048111188.issue31140@psf.upfronthosting.co.za> New submission from chris.259263: Trying to run a script with a bug in a formated string literal (in the example the ":" is missing) throws an "invalid syntax" error at the first expression of the script. Example: import math a = "a" b = f"{a>2s}" # forgotten ":", should be f"{a:>2s}" Running this script throws an "invalid syntax" error in the first line "import math". In a large program this behavior makes it nearly impossible to find the real bug in the program as the error message does not give any hint about the line or the type of the error in the program. Using Python 3.6.2, IDLE 3.6.2 on Mac macOS Sierra (10.12.1) ---------- messages: 299901 nosy: chris.259263 priority: normal severity: normal status: open title: Insufficient error message with incorrect formated string literal type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 05:55:06 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Aug 2017 09:55:06 +0000 Subject: [issue24700] array compare is hideously slow In-Reply-To: <1437692474.17.0.61027224315.issue24700@psf.upfronthosting.co.za> Message-ID: <1502186106.5.0.883951053659.issue24700@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 06:11:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 10:11:05 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502187065.09.0.359061316797.issue31113@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 06:20:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 10:20:27 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502187627.56.0.699198902214.issue31135@psf.upfronthosting.co.za> STINNER Victor added the comment: My widget_instance.patch calls test_support.gc_collect() and removes all widgets from the root window. It's not enough. That's why I proposed to modify LabeledScale.destroy(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 07:13:28 2017 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 08 Aug 2017 11:13:28 +0000 Subject: [issue31140] Insufficient error message with incorrect formated string literal In-Reply-To: <1502182558.08.0.700048111188.issue31140@psf.upfronthosting.co.za> Message-ID: <1502190808.03.0.653960048453.issue31140@psf.upfronthosting.co.za> Eric V. Smith added the comment: On 3.6.1 on Windows, I get: % python3 bpo-31140.py File "", line 1 (a>2s) ^ SyntaxError: invalid syntax Which is far from ideal, but at least points to (a portion of) the correct text. I won't have access to a copy of 3.6.2 or 3.7 until later today. Can you show the exact output from 3.6.2? ---------- components: +Interpreter Core nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 07:16:25 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 08 Aug 2017 11:16:25 +0000 Subject: [issue31036] building the python docs requires the blurb module In-Reply-To: <1500995634.2.0.614160562868.issue31036@psf.upfronthosting.co.za> Message-ID: <1502190985.03.0.394899190165.issue31036@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset abe7b60b80f5cb23f84a49f95ef6ce23521eed14 by Larry Hastings (Ned Deily) in branch '3.5': [3.5] bpo-31036: use an existing Misc/NEWS rather than trying to use blurb (#2874) https://github.com/python/cpython/commit/abe7b60b80f5cb23f84a49f95ef6ce23521eed14 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 07:16:25 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 08 Aug 2017 11:16:25 +0000 Subject: [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1502190985.34.0.298935539174.issue25910@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset 14167c9524bd65f231dfd85edc0b938c4781f42a by Larry Hastings (Mariatta) in branch '3.5': bpo-25910: Update LICENSE (GH-2873) (GH-2968) https://github.com/python/cpython/commit/14167c9524bd65f231dfd85edc0b938c4781f42a ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 07:43:46 2017 From: report at bugs.python.org (chris.259263) Date: Tue, 08 Aug 2017 11:43:46 +0000 Subject: [issue31140] Insufficient error message with incorrect formated string literal In-Reply-To: <1502182558.08.0.700048111188.issue31140@psf.upfronthosting.co.za> Message-ID: <1502192626.95.0.133238405145.issue31140@psf.upfronthosting.co.za> chris.259263 added the comment: Hi Eric, running the script from the terminal on my system (macOS, Python 3.6.2) gives the same ErrorMessage as you stated. The problem is the output "line 1". Running the script from IDLE (3.6.2), the error points to the first line. And in IDLE you do not get the useful hint "(a>2s)" but just "SyntaxError: invalid syntax". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 07:46:25 2017 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 08 Aug 2017 11:46:25 +0000 Subject: [issue31140] Insufficient error message with incorrect formated string literal In-Reply-To: <1502182558.08.0.700048111188.issue31140@psf.upfronthosting.co.za> Message-ID: <1502192785.9.0.344785701734.issue31140@psf.upfronthosting.co.za> Eric V. Smith added the comment: Thanks. There was some work on this recently: I'll try and check 3.7 later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 07:52:48 2017 From: report at bugs.python.org (Mark Bell) Date: Tue, 08 Aug 2017 11:52:48 +0000 Subject: [issue31141] Start should be a keyword argument of the built-in sum Message-ID: <1502193168.16.0.095124886528.issue31141@psf.upfronthosting.co.za> New submission from Mark Bell: The built-in function sum takes an optional argument "start" to specify what value to start adding from (defaults to 0). This argument should be a keyword argument in order to match the other built-in functions such as: enumerate(range(10), start=5) This patch allows users to write: sum(range(10), start=5) which previously raised "TypeError: sum() takes no keyword arguments". Since the only change is making an optional positional argument into a keyword argument, this has no effect on any existing code using the current convention of: sum(range(10), 5) ---------- components: ctypes messages: 299908 nosy: Mark.Bell priority: normal severity: normal status: open title: Start should be a keyword argument of the built-in sum versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 07:53:21 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Aug 2017 11:53:21 +0000 Subject: [issue31141] Start should be a keyword argument of the built-in sum In-Reply-To: <1502193168.16.0.095124886528.issue31141@psf.upfronthosting.co.za> Message-ID: <1502193201.38.0.919292953923.issue31141@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3055 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 07:55:44 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Aug 2017 11:55:44 +0000 Subject: [issue31045] Add a language switch to the Python documentation In-Reply-To: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> Message-ID: <1502193344.85.0.845774272441.issue31045@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3056 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 07:56:21 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Aug 2017 11:56:21 +0000 Subject: [issue31045] Add a language switch to the Python documentation In-Reply-To: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> Message-ID: <1502193381.67.0.66944284527.issue31045@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3058 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 08:00:27 2017 From: report at bugs.python.org (Mark Bell) Date: Tue, 08 Aug 2017 12:00:27 +0000 Subject: [issue31141] Start should be a keyword argument of the built-in sum In-Reply-To: <1502193168.16.0.095124886528.issue31141@psf.upfronthosting.co.za> Message-ID: <1502193627.12.0.694016988043.issue31141@psf.upfronthosting.co.za> Changes by Mark Bell : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 08:09:52 2017 From: report at bugs.python.org (py78py90py) Date: Tue, 08 Aug 2017 12:09:52 +0000 Subject: [issue31142] python shell crashed while input quotes in print() Message-ID: <1502194192.96.0.619398073227.issue31142@psf.upfronthosting.co.za> New submission from py78py90py: I have downloaded python 3.6 into MacOSX system. Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Then I opened the IDLE and try to input some sentences. I inputed "print()", then input single quote in print. But the IDLE crashed. ---------- components: Demos and Tools messages: 299909 nosy: py78py90py priority: normal severity: normal status: open title: python shell crashed while input quotes in print() versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 08:13:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 12:13:56 +0000 Subject: [issue31045] Add a language switch to the Python documentation In-Reply-To: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> Message-ID: <1502194435.99.0.552122089349.issue31045@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e93135dbb265e801c0000a19cd9c5428d57d1cf4 by Victor Stinner (Julien Palard) in branch '3.6': bpo-31045: Language switch (#2652) (#3023) https://github.com/python/cpython/commit/e93135dbb265e801c0000a19cd9c5428d57d1cf4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 08:14:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 12:14:25 +0000 Subject: [issue31045] Add a language switch to the Python documentation In-Reply-To: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> Message-ID: <1502194465.69.0.982604688458.issue31045@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 245dafca85097dd8b84f02b01f39f5d32091754b by Victor Stinner (Julien Palard) in branch '2.7': bpo-31045: Language switch (#2652) (#3024) https://github.com/python/cpython/commit/245dafca85097dd8b84f02b01f39f5d32091754b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 08:16:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 12:16:26 +0000 Subject: [issue31045] Add a language switch to the Python documentation In-Reply-To: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> Message-ID: <1502194586.3.0.487436447404.issue31045@psf.upfronthosting.co.za> STINNER Victor added the comment: Even if changes are merged, I prefer to wait until the doc at docs.python.org is to date before closing the issue. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 08:39:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 12:39:46 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502195986.09.0.644422983385.issue31135@psf.upfronthosting.co.za> STINNER Victor added the comment: On master, LabeledScaleTest.test_initialization() leaks a widget in the root widget, even after root.destroy(). The problem is that LabeledScaleTest.__del__() doesn't call Frame.destroy(self) if self._variable is not set. So master has at least this bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 08:41:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 12:41:40 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502196100.49.0.103369118281.issue31135@psf.upfronthosting.co.za> STINNER Victor added the comment: widget_instance-master.patch: Check that Tkinter.Widget.destroy() removes all children and check that test_ttk_guionly doesn't leak widgets. ---------- Added file: http://bugs.python.org/file47063/widget_instance-master.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 08:48:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 12:48:21 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502196501.98.0.999000666096.issue31135@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3059 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 08:49:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 12:49:47 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502196587.67.0.610055612621.issue31135@psf.upfronthosting.co.za> STINNER Victor added the comment: Example of failure on master using widget_instance-master.patch: haypo at selma$ ./python -m test -v -u all test_ttk_guionly ====================================================================== ERROR: test_initialization (tkinter.test.test_ttk.test_extensions.LabeledScaleTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/haypo/prog/python/master/Lib/tkinter/test/test_ttk/test_extensions.py", line 14, in tearDown super().tearDown() File "/home/haypo/prog/python/master/Lib/tkinter/test/support.py", line 40, in tearDown w.destroy() File "/home/haypo/prog/python/master/Lib/tkinter/__init__.py", line 2305, in destroy % self.children) Exception: destroy() doesn't clear all children: {'!labeledscale2': } My https://github.com/python/cpython/pull/3025 PR fixes LabeledScale and OptionMenu destroy() method in the master branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 09:00:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 13:00:43 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502197243.73.0.708645714101.issue31135@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3060 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 09:04:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 13:04:49 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502197489.61.0.438501504167.issue31135@psf.upfronthosting.co.za> STINNER Victor added the comment: widget_instance-2.7-v2.patch: Updated patch for Python 2.7 to debug test_ttk_guionly. https://github.com/python/cpython/pull/3026 fix LabeledScale and OptionMenu destroy() method for Python 2.7. ---------- Added file: http://bugs.python.org/file47064/widget_instance-2.7-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 09:14:33 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Aug 2017 13:14:33 +0000 Subject: [issue31123] fnmatch does not follow Unix fnmatch functionality In-Reply-To: <1501888939.57.0.889177550309.issue31123@psf.upfronthosting.co.za> Message-ID: <1502198073.63.0.589226072241.issue31123@psf.upfronthosting.co.za> R. David Murray added the comment: That seems like a reasonable use case, but is fnmatch what git is using for this? If so, what is the feature set required? In any case, the existing functionality must remain as is for backward compatibility reasons, so this would either be a new function or keyword controlled optional behavior. (You will note that our fnmatch documentation specifically mentions treating / as a normal character.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 09:24:31 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Aug 2017 13:24:31 +0000 Subject: [issue31136] raw strings cannot end with a backslash character r'\' In-Reply-To: <1502153449.52.0.763252325075.issue31136@psf.upfronthosting.co.za> Message-ID: <1502198671.86.0.0269818626507.issue31136@psf.upfronthosting.co.za> R. David Murray added the comment: In fact, this ia a FAQ: https://docs.python.org/3/faq/design.html#why-can-t-raw-strings-r-strings-end-with-a-backslash ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 09:31:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 13:31:53 +0000 Subject: [issue31068] [2.7] test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502199113.74.0.134735463625.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: Calling "self.tk.call('update')" runs the Tcl event loop: * http://wiki.tcl.tk/1252 * https://www.tcl.tk/man/tcl/TclCmd/update.htm Interesting but very old (2001) article: "Update considered harmful" http://wiki.tcl.tk/1255 ---------- title: test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 -> [2.7] test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 09:43:40 2017 From: report at bugs.python.org (Todd Schiller) Date: Tue, 08 Aug 2017 13:43:40 +0000 Subject: [issue31143] lib2to3 requires source files for fixes Message-ID: <1502199820.45.0.266789530898.issue31143@psf.upfronthosting.co.za> New submission from Todd Schiller: The lib2to3 library doesn't detect/apply any fixes if the source files aren't included with the distribution. See get_all_fix_names at https://github.com/python/cpython/blob/master/Lib/lib2to3/refactor.py#L30 This affects Azure's official Python site extensions [1], which only include bytecode pyc's for the fixes [2]. This results in bad installs when using setuptools to install packages that leverage the use_2to3 flag during the install [3] [1] https://github.com/Azure/azure-python-siteextensions [2] https://github.com/Azure/azure-python-siteextensions/issues/14 [3] https://github.com/pypa/setuptools/issues/1120#issuecomment-320769664 ---------- components: 2to3 (2.x to 3.x conversion tool) messages: 299920 nosy: tschiller priority: normal severity: normal status: open title: lib2to3 requires source files for fixes type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 10:02:30 2017 From: report at bugs.python.org (nvdv) Date: Tue, 08 Aug 2017 14:02:30 +0000 Subject: [issue31144] add initializer to concurrent.futures.ProcessPoolExecutor Message-ID: <1502200949.97.0.102357103627.issue31144@psf.upfronthosting.co.za> New submission from nvdv: Unfortunately concurrent.futures.ProcessPoolExecutor does not provide any means to interact with worker processes (like initializer function in multiprocessing.Pool constructor). This problem has been mentioned at least once: https://mail.python.org/pipermail/python-dev/2014-March/133697.html. It's not hard to work around this issue by subclassing ProcessPoolExecutor and adding all necessary methods, but IMO solution can be more generic. ---------- components: Library (Lib) messages: 299921 nosy: nvdv priority: normal severity: normal status: open title: add initializer to concurrent.futures.ProcessPoolExecutor type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 10:09:13 2017 From: report at bugs.python.org (=?utf-8?q?Miko=C5=82aj_Babiak?=) Date: Tue, 08 Aug 2017 14:09:13 +0000 Subject: [issue31145] PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same. Message-ID: <1502201353.41.0.0622825133632.issue31145@psf.upfronthosting.co.za> New submission from Miko?aj Babiak: # list of tuples in form of (priority_number, data) bugged = [ (-25.691, {'feedback': 13, 'sentiment': 0.309, 'support_ticket': 5}), (-25.691, {'feedback': 11, 'sentiment': 0.309, 'support_ticket': 3}), (-25.0, {'feedback': 23, 'sentiment': 0.0, 'support_ticket': 15}), ] from queue import PriorityQueue pq = PriorityQueue() for item in bugged: pq.put(item) # TypeError: '<' not supported between instances of 'dict' and 'dict' It seems that if priority_numbers are equal, heapq.heapify() falls back to comparing data element from tuple (priority_number, data). I belive this is an undesired behaviour. It is acctually listed as one of implementation challenges on https://docs.python.org/3/library/heapq.html: "Tuple comparison breaks for (priority, task) pairs if the priorities are equal and the tasks do not have a default comparison order." In python 2.7 the issue in not present and PriorityQueue.put() works as expected ---------- components: Library (Lib) messages: 299922 nosy: Miko?aj Babiak priority: normal severity: normal status: open title: PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same. type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 10:16:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 14:16:46 +0000 Subject: [issue31068] [2.7] test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502201806.08.0.78836282661.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: The Tcl event loop is recursive: http://wiki.tcl.tk/1527 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 10:22:23 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Aug 2017 14:22:23 +0000 Subject: [issue31143] lib2to3 requires source files for fixes In-Reply-To: <1502199820.45.0.266789530898.issue31143@psf.upfronthosting.co.za> Message-ID: <1502202143.89.0.17664023132.issue31143@psf.upfronthosting.co.za> R. David Murray added the comment: What are you reporting as the bug here? 2to3 obviously can't work without the source, so based just on what you have written here this sounds like an Azure bug. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 10:23:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 14:23:19 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1502202199.06.0.785707662025.issue22635@psf.upfronthosting.co.za> STINNER Victor added the comment: Bug mentionned on a Twitter discussion: https://twitter.com/zhenech/status/894444040992829441 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 10:28:32 2017 From: report at bugs.python.org (Todd Schiller) Date: Tue, 08 Aug 2017 14:28:32 +0000 Subject: [issue31143] lib2to3 requires source files for fixes In-Reply-To: <1502199820.45.0.266789530898.issue31143@psf.upfronthosting.co.za> Message-ID: <1502202512.26.0.116243321711.issue31143@psf.upfronthosting.co.za> Todd Schiller added the comment: I'm reporting that lib2to3 doesn't work without having source .py files for the fixes that are packaged with the lib2to3 library. Perhaps the get_all_fix_names method in lib2to3/refactor.py should check for either .py or .pyc files? The source files are included with the package that I'm installing (anyjson 0.3.3 in this case). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 10:37:59 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Aug 2017 14:37:59 +0000 Subject: [issue31143] lib2to3 requires source files for fixes In-Reply-To: <1502199820.45.0.266789530898.issue31143@psf.upfronthosting.co.za> Message-ID: <1502203079.83.0.068821285675.issue31143@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I see. We don't really support .pyc-only distribution, though we try not to break it. Do you want to propose a fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 10:47:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 14:47:32 +0000 Subject: [issue31068] [2.7] test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502203652.02.0.891837552258.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: Yesterday, I ran test_ttk_guionly during 3 hours on Windows with Python 2.7 compiled in debug mode. I saw between 4 and 7 hangs. I'm not sure about the exact number since sometimes the test unblocked when I just moved my mouse or clicked on my Command Prompt window.... At this point, I'm only sure that the following tests blocked: * test_ttk\test_extensions.py:184: LabeledScaleTest.test_resize() -- test ttk.LabeledScale * test_ttk\test_widgets.py:1367: TreeviewTest.test_heading_callback() -- test ttk.Treeview * test_ttk.test_widgets.TreeviewTest.test_tag_bind() -- test ttk.Treeview bpo-31135 fixes LabeledScale.destroy(), so it may be related. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 10:51:06 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 08 Aug 2017 14:51:06 +0000 Subject: [issue31145] PriorityQueue.put() fails with TypeError if priority_number in tuples of (priority_number, data) are the same. In-Reply-To: <1502201353.41.0.0622825133632.issue31145@psf.upfronthosting.co.za> Message-ID: <1502203866.23.0.705408147073.issue31145@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't see any way to change PriorityQueue to fix this. The non-comparability of dicts likely won't be restored, nor will the lexicographic comparison order of tuples be likely to change. One possible way forward is to provide a wrapper with the desired comparison behavior: pq = PriorityQueue() pq.put(Prioritize(13, task)) task = pq.get().item where Prioritize is implemented something like this: import functools @functools.total_ordering class Prioritize: def __init__(self, priority, item): self.priority = priority self.item = item def __eq__(self, other): return self.priority == other.priority def __lt__(self, other): return self.priority < other.priority from queue import PriorityQueue, Empty from contextlib import suppress bugged = [ (-25.691, {'feedback': 13, 'sentiment': 0.309, 'support_ticket': 5}), (-25.691, {'feedback': 11, 'sentiment': 0.309, 'support_ticket': 3}), (-25.0, {'feedback': 23, 'sentiment': 0.0, 'support_ticket': 15}), ] pq = PriorityQueue() for priority, item in bugged: pq.put(Prioritize(priority, item)) with suppress(Empty): while True: item = pq.get_nowait().item print(item) ---------- assignee: -> rhettinger nosy: +rhettinger type: behavior -> enhancement versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 11:14:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 15:14:07 +0000 Subject: [issue31068] [2.7] test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502205247.07.0.0818330592426.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: Another hang: test_ttk\test_extensions.py:335: LabeledScaleTest.test2_variable_change(). Traceback: (...) File: "C:\haypo\2.7\lib\lib-tk\test\test_ttk\test_extensions.py", line 335, in test2_variable_change x.update() File: "C:\haypo\2.7\lib\lib-tk\Tkinter.py", line 1023, in update self.tk.call('update') I'm now using this batch script: --- :repeat PCbuild\amd64\python_d.exe -m test -u all --timeout=30 -R 3:3 -r test_ttk_guionly if not %errorlevel% equ 0 goto :fail echo OKKKKK goto :repeat :fail echo ERRRRRR --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 11:17:12 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 08 Aug 2017 15:17:12 +0000 Subject: [issue31045] Add a language switch to the Python documentation In-Reply-To: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> Message-ID: <1502205432.25.0.217985416366.issue31045@psf.upfronthosting.co.za> Ned Deily added the comment: For future reference, please make sure to include current release managers on proposed changes like this since doc building and distribution is part of the release process. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 11:29:40 2017 From: report at bugs.python.org (Julien Palard) Date: Tue, 08 Aug 2017 15:29:40 +0000 Subject: [issue31146] Docs: On non-public translations, language picker fallback to "English" Message-ID: <1502206180.29.0.859774070814.issue31146@psf.upfronthosting.co.za> New submission from Julien Palard: As, by default, "english" is selected, and as we're building translations far before rendering them public by adding them to the language switcher, there's a timespan where a human can voluntarily land on a translation with a language switcher unaware of this language. The language switcher currently defaults to english, so english is selected. As "english" is already selected, one can't select "english" to navigate to the english version. Solutions may be to just hide the select element on unknown translations, or display the unknown language tag. With more work and a "predicted" list of tags-names, it may be possible to also display the name of the language. Code is here: https://github.com/python/cpython/blob/master/Doc/tools/static/switchers.js I'll take a look, but if some want to do it, let me know. ---------- assignee: docs at python components: Documentation messages: 299932 nosy: docs at python, mdk priority: normal severity: normal status: open title: Docs: On non-public translations, language picker fallback to "English" type: enhancement versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 11:30:36 2017 From: report at bugs.python.org (Oren Milman) Date: Tue, 08 Aug 2017 15:30:36 +0000 Subject: [issue31147] a mostly useless check in list_extend() Message-ID: <1502206236.15.0.974518538682.issue31147@psf.upfronthosting.co.za> New submission from Oren Milman: in listobject.c, in case list_extend() receives an 'iterable' which isn't 'self' nor a tuple nor a list, we have the following (heavily edited for brevity): mn = Py_SIZE(self) + PyObject_LengthHint(iterable); list_resize(self, mn); ... // self is extended to also include the elements of 'iterable'. // (*) if (Py_SIZE(self) < self->allocated) { list_resize(self, Py_SIZE(self)); } IMHO, the condition in (*) is mostly useless, for two reasons: 1. the list_resize() which is called in (*) does nothing in case (Py_SIZE(self) >= (self->allocated >> 1)) is true. In particular, this call to list_resize() would have done nothing if it had been called while the condition in (*) was false. 2. the condition in (*) is false only in the following cases: - list_resize(self, mn) caused (self->allocated == Py_SIZE(self) + actual_length_of_iterable) to be true. e.g.: Py_SIZE(self) = 58 and PyObject_LengthHint(iterable) == 8 and actual_length_of_iterable == 22 (because 66 + 66 // 8 + 6 == 80 == 58 + 22). - list_resize(self, mn) caused (self->allocated < Py_SIZE(self) + actual_length_of_iterable), which sometime later caused list_extend() to call app1(), which called list_resize(), which caused (self->allocated == Py_SIZE(self) + actual_length_of_iterable) to be true. e.g.: Py_SIZE(self) == 58 and PyObject_LengthHint(iterable) == 8 and actual_length_of_iterable == 39 (because 66 + 66 // 8 + 6 == 80 and 81 + 81 // 8 + 6 == 97 == 58 + 39) so ISTM that the condition is only rarely false, especially as PyObject_LengthHint(iterable) >= actual_length_of_iterable is usually true (i guess). Thus, i believe we should either change the condition in (*) to (Py_SIZE(self) < (self->allocated >> 1)), or remove it (and always call list_resize()). (note that i ignored error cases, as ISTM they are quite irrelevant to the issue.) ---------- components: Interpreter Core messages: 299933 nosy: Oren Milman priority: normal severity: normal status: open title: a mostly useless check in list_extend() type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 11:34:39 2017 From: report at bugs.python.org (Ned Deily) Date: Tue, 08 Aug 2017 15:34:39 +0000 Subject: [issue31146] Docs: On non-public translations, language picker fallback to "English" In-Reply-To: <1502206180.29.0.859774070814.issue31146@psf.upfronthosting.co.za> Message-ID: <1502206479.15.0.438794562501.issue31146@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 11:39:57 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 08 Aug 2017 15:39:57 +0000 Subject: [issue31136] raw strings cannot end with a backslash character r'\' In-Reply-To: <1502153449.52.0.763252325075.issue31136@psf.upfronthosting.co.za> Message-ID: <1502206797.23.0.752992597452.issue31136@psf.upfronthosting.co.za> Gregory P. Smith added the comment: If i could stop thinking of r as meaning "raw" as we document it and instead "regular expression literal" I wouldn't make this mistake. :) Thanks everyone! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 12:06:58 2017 From: report at bugs.python.org (Steven Winfield) Date: Tue, 08 Aug 2017 16:06:58 +0000 Subject: [issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows In-Reply-To: <1393854882.06.0.561987523346.issue20844@psf.upfronthosting.co.za> Message-ID: <1502208418.45.0.773715915442.issue20844@psf.upfronthosting.co.za> Steven Winfield added the comment: I've just been bitten by this on 3.6.2, Windows Server 2008 R2, when running the setup.py script for QuantLib-SWIG: https://github.com/lballabio/QuantLib-SWIG/blob/v1.10.x/Python/setup.py It seems there is different behaviour depending on whether: * Unix (LF) or Windows (CRLF) line endings are used * The file is >4096 bytes or <=4096 bytes * The module docstring has an initial space Some of that has been mentioned previously, but I think the 4096-byte limit might be new, which is why I'm posting. I've attached a script I used to come up with the results below. It contains: * a -*- coding line (for iso-8859-1 in this case) * a docstring consisting entirely of lines of x's, of length 78 * Unix line endings The file's length is exactly 4096 bytes. Running this, or slightly modified versions of this, with a 3.6.2 interpreter gave the following results: * In all cases, when Windows line endings were used there was no issue - running the script produced no errors or output. * With Unix line endings: * File length <= 4096, with no leading spaces in the docstring: File "issue20844.py", line 1 SyntaxError: encoding problem: iso-8859-1 * File length > 4096, with no leading spaces in the docstring: File "issue20844.py", line 56 xxxxx""" ^ SyntaxError: EOF while scanning triple-quoted string literal * Any file length, with the first 'x' on line 3 replaced with a space (line 2 if the coding line is ignored): File "issue20844.py", line 2 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ^ IndentationError: unexpected indent I had no issues with python 2.7.13. ---------- nosy: +steven.winfield versions: +Python 3.6 Added file: http://bugs.python.org/file47065/issue20844.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 12:38:31 2017 From: report at bugs.python.org (D Gentry) Date: Tue, 08 Aug 2017 16:38:31 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? Message-ID: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> New submission from D Gentry: I've noticed that the only installers that are able to successfully complete on my windows 7 x64 system are the MSI installers. Unfortunately, python.org hasn't released an MSI version since 3.4.4 it seems. Is it possible to get an MSI installer for one of the more recent versions? ---------- files: Python 3.6.2 (64-bit)_20170808103648.log messages: 299936 nosy: D Gentry priority: normal severity: normal status: open title: Can we get an MSI installer for something past 3.4.4? type: crash versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file47066/Python 3.6.2 (64-bit)_20170808103648.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 12:47:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 08 Aug 2017 16:47:44 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502210864.1.0.0721763903168.issue31113@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Updated patch makes stackdepth() not consuming the C stack for recursion. The new code is not strictly equivalent to the old code, but I think they should produce the same results in common cases (the existing stack depth calculation algorithm is not free from bugs, see issue24340). Since this change is not trivial, I think it should be made it only in master. In maintained versions it is safer to change build options on Windows to produce the executable with larger stack. ---------- stage: -> patch review versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 12:48:09 2017 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 08 Aug 2017 16:48:09 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1502210889.0.0.951043398417.issue31113@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: -yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 13:15:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 17:15:55 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502212555.43.0.145394457472.issue31135@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 56e162ad5c5d3effe9b4f05d0179e1b6a2a2d9b8 by Victor Stinner in branch '2.7': ttk: fix LabeledScale and OptionMenu destroy() method (#3026) https://github.com/python/cpython/commit/56e162ad5c5d3effe9b4f05d0179e1b6a2a2d9b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 13:26:19 2017 From: report at bugs.python.org (Ross Rosen) Date: Tue, 08 Aug 2017 17:26:19 +0000 Subject: [issue26350] Windows: signal doc should state certains signals can't be registered In-Reply-To: <1455285703.05.0.44078516142.issue26350@psf.upfronthosting.co.za> Message-ID: <1502213179.03.0.130429054095.issue26350@psf.upfronthosting.co.za> Ross Rosen added the comment: I'm not sure if this is helpful, but I thought it might be useful for you to hear a non-expert user's perspective. (In summary, I'm agreeing with the OP.) I spent a lot of time getting some signal handling working on OSX. Then finally in my process got to porting to Windows. I spent a bunch more time scratching my head trying to figure out why it wasn't working. Even after reading the os.kill and signal docs and searching for "Windows" I still wasn't clear what was wrong. This thread was the answer. So my suggestion at the least would be to put warnings in the signal doc, and clarify the language in the os.kill. ---------- nosy: +Ross Rosen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 13:41:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 17:41:23 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502214083.44.0.408629934067.issue31135@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cd7e9c1b67d3d07ee03e0a79af2791c19031cecb by Victor Stinner in branch 'master': ttk: fix LabeledScale and OptionMenu destroy() method (#3025) https://github.com/python/cpython/commit/cd7e9c1b67d3d07ee03e0a79af2791c19031cecb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 13:42:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 17:42:12 +0000 Subject: [issue31068] [2.7] test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502214132.87.0.278312149864.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: I pushed my fix for bpo-31135, no idea at this point if it fix this issue. New changeset 56e162ad5c5d3effe9b4f05d0179e1b6a2a2d9b8 by Victor Stinner in branch '2.7': ttk: fix LabeledScale and OptionMenu destroy() method (#3026) https://github.com/python/cpython/commit/56e162ad5c5d3effe9b4f05d0179e1b6a2a2d9b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 13:44:19 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Aug 2017 17:44:19 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1502214259.49.0.502600586767.issue31148@psf.upfronthosting.co.za> R. David Murray added the comment: The short answer is no. We no longer use the MSI installer. Perhaps the windows experts will be interested in exploring why you can't use the current installers, since they work for most people. ---------- components: +Windows nosy: +paul.moore, r.david.murray, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 13:50:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 17:50:15 +0000 Subject: [issue31068] [2.7] test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502214615.67.0.0635223299215.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: I interrupted http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%202.7/builds/63/ which was running since 17 hours... ("running: test_ttk_guionly (32770 sec)") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 13:52:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 17:52:10 +0000 Subject: [issue31068] [2.7] test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502214730.57.0.293290662751.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: > I pushed my fix for bpo-31135, no idea at this point if it fix this issue. Too bad, test_resize() failed again while testing commit 56e162ad5c5d3effe9b4f05d0179e1b6a2a2d9b8 :-( So this fix was not enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 14:02:02 2017 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 08 Aug 2017 18:02:02 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1502215322.77.0.410458810141.issue26510@psf.upfronthosting.co.za> Changes by Anthony Sottile : ---------- pull_requests: +3061 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 16:00:50 2017 From: report at bugs.python.org (Wilfredo Sanchez) Date: Tue, 08 Aug 2017 20:00:50 +0000 Subject: [issue31138] dir argument NamedTemporaryFile should accept a pathlib.Path In-Reply-To: <1502155157.73.0.00743957621165.issue31138@psf.upfronthosting.co.za> Message-ID: <1502222450.12.0.842860149496.issue31138@psf.upfronthosting.co.za> Wilfredo Sanchez added the comment: Huh? my apologies. I must have been fiddling with an older interpreter REPL without noticing when I ran into this. Never mind me. :-) ---------- stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 16:57:48 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 08 Aug 2017 20:57:48 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1502225868.75.0.442639792071.issue31148@psf.upfronthosting.co.za> Steve Dower added the comment: Looking at your log, you clearly have some sort of configuration blocking installers or else corruption somewhere on your system. There really isn't enough information available for me to be able to tell. Perhaps you have a virus scanner running that is blocking the installer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 16:57:56 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 08 Aug 2017 20:57:56 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1502225876.11.0.253032057532.issue31148@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 16:58:44 2017 From: report at bugs.python.org (Julien Palard) Date: Tue, 08 Aug 2017 20:58:44 +0000 Subject: [issue31149] Add Japanese to the language switcher Message-ID: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> New submission from Julien Palard: Japanese translation have reached the prerequisites from PEP 545, their last step is to be added to the language switcher. Current build has been reviewed by Inada and is OK: https://docs.python.org/ja/3.7/ Note: On the current build, the /ja/ is not detected by the language switcher, as this *is* the step to add /ja/ to this same language switcher, this is the issue http://bugs.python.org/issue31146 ---------- messages: 299947 nosy: inada.naoki, mdk, ned.deily priority: normal severity: normal status: open title: Add Japanese to the language switcher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 17:00:40 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 08 Aug 2017 21:00:40 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502226040.07.0.219656189788.issue31149@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3062 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 17:09:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 21:09:37 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6 In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1502226577.85.0.507148642798.issue30849@psf.upfronthosting.co.za> STINNER Victor added the comment: Hey Antoine, as expected, your test fails randomly on the CI :-( Another failure: http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%203.x/builds/829/steps/test/logs/stdio test_stress_delivery_dependent (test.test_signal.StressTest) ... Timeout (0:15:00)! Thread 0xb74bd700 (most recent call first): File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_signal.py", line 973 in measure_itimer_resolution File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_signal.py", line 985 in decide_itimer_count File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/test_signal.py", line 1001 in test_stress_delivery_dependent File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/case.py", line 615 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/case.py", line 663 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/unittest/runner.py", line 176 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/support/__init__.py", line 1896 in _run_suite File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/support/__init__.py", line 1940 in run_unittest File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/runtest.py", line 168 in test_runner File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/runtest.py", line 169 in runtest_inner File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/runtest.py", line 137 in runtest File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/main.py", line 290 in rerun_failed_tests File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/main.py", line 540 in _main File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/main.py", line 510 in main File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/libregrtest/main.py", line 585 in main File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/__main__.py", line 2 in File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/runpy.py", line 85 in _run_code File "/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/runpy.py", line 193 in _run_module_as_main ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 17:26:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 21:26:49 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502227609.55.0.127293044049.issue31149@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c82b7f332aff606af6c9c163da75f1e86514125e by Victor Stinner (Julien Palard) in branch 'master': bpo-31149: Doc: Add Japanese to the language switcher. (#3028) https://github.com/python/cpython/commit/c82b7f332aff606af6c9c163da75f1e86514125e ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 18:10:10 2017 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 08 Aug 2017 22:10:10 +0000 Subject: [issue20844] SyntaxError: encoding problem: iso-8859-1 on Windows In-Reply-To: <1393854882.06.0.561987523346.issue20844@psf.upfronthosting.co.za> Message-ID: <1502230210.24.0.801110441507.issue20844@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 18:40:23 2017 From: report at bugs.python.org (Brett Cannon) Date: Tue, 08 Aug 2017 22:40:23 +0000 Subject: [issue27869] test failures under Bash on Windows / WSL In-Reply-To: <1472236837.41.0.811658562373.issue27869@psf.upfronthosting.co.za> Message-ID: <1502232023.28.0.936081664794.issue27869@psf.upfronthosting.co.za> Brett Cannon added the comment: Running with `./python -m test -u all -j0` causes test_ssl to hang so that needs to also be skipped (otherwise failures look to be the same from a test module level): 19 tests failed: test_asyncio test_asyncore test_epoll test_fcntl test_ftplib test_httpservers test_import test_mmap test_multiprocessing_fork test_multiprocessing_forkserver test_multiprocessing_spawn test_os test_posix test_resource test_selectors test_signal test_subprocess test_time test_unicode_file 24 tests skipped: test_bz2 test_curses test_dbm_gnu test_dbm_ndbm test_devpoll test_gdb test_idle test_kqueue test_lzma test_msilib test_ossaudiodev test_readline test_sqlite test_startfile test_tcl test_tix test_tk test_ttk_guionly test_ttk_textonly test_turtle test_winconsoleio test_winreg test_winsound test_zipfile64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 18:59:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 22:59:16 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502233156.33.0.711722519418.issue31070@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, it's easy to reproduce the bug on the master branch. Example on Linux: haypo at selma$ ./python -m test test_threaded_import Run tests sequentially 0:00:00 load avg: 0.16 [1/1] test_threaded_import Exception ignored in: .cb at 0x7f53201e2f70> Traceback (most recent call last): File "", line 176, in cb KeyError: ('random',) 1 test OK. Total duration: 2 sec Tests result: SUCCESS ---------- nosy: +brett.cannon, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 19:40:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 23:40:56 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502235656.48.0.208405535066.issue31070@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem is the weakref callback of _module_locks. It seems like the callback is called after a second thread replaced _module_locks[name] * Thread 1: _get_module_lock('random') sets _module_locks['random'] and registers a weakref callback on the newly created lock * Thread 1: the lock is destroyed, the weakref callback will be called as soon as possible * Thread 2: _get_module_lock('random') sees that the weakref is dead and so replaces _module_locks['random'] with a new lock, and registers a new weakref callback on the second lock * Thread 1: Call the weakref callback removing _module_locks['random'] -- BUG: the callback is called too late, after Thread 2 already sets a new lock * Thread 2: The lock is destroyed, the second weakref callback will be called as soon as possible * Thread 2: The second callback is called and fails with KeyError since _module_locks['random'] was already called in the Thread 1 in the meanwhile ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 19:42:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 23:42:16 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502235736.42.0.573288134177.issue31070@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3064 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 19:43:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 23:43:57 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502235837.52.0.532337378443.issue31070@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote https://github.com/python/cpython/pull/3029 which seems to fix the issue. I don't know importlib well enough to understand why we need a weak reference to a lock. My PR adds a second lock per module lock (!) to be able to wait until _module_locks[name] is deleted when a thread detects that _module_locks[name] exists and the associated lock was destroyed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 19:47:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 23:47:05 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502236025.78.0.763017641609.issue31135@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3065 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 19:50:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 23:50:44 +0000 Subject: [issue31068] [2.7] test_ttk_guionly hangs at self.tk.call('update') on AMD64 Windows8.1 Refleaks 2.7 In-Reply-To: <1501253987.12.0.378567132122.issue31068@psf.upfronthosting.co.za> Message-ID: <1502236244.52.0.597403125609.issue31068@psf.upfronthosting.co.za> STINNER Victor added the comment: > Too bad, test_resize() failed again while testing commit 56e162ad5c5d3effe9b4f05d0179e1b6a2a2d9b8 :-( So this fix was not enough. I am not sure anymore about this statement. I had a bug in my watchdog code, that I fixed after this failure. I ran again the test during 3 hours and it didn't fail. I reverted all my local changes, I rebuild Python 2.7 in debug mode to get a fresh python_d.exe, I removed all __pycache__, and then I ran again the test during 1 hour: no fail. I ran 4 instances of the test in parallel during 1 hour: no fail. Hum, it *seems* like the bug was fixed. Since it's a race condition, it's not possible to say that it's really fixed. But my test results show that the bug is very likely to be fixed, so I close the bug. I will watch AMD64 Windows8.1 Refleaks 2.7 buildbot slave next days to check if the bug occurs again. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 19:54:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 23:54:19 +0000 Subject: [issue31133] [2.7] PCbuild/pcbuild.sln of Python 2.7 cannot be open by Visual Studio 2010 In-Reply-To: <1502126750.5.0.768313426275.issue31133@psf.upfronthosting.co.za> Message-ID: <1502236459.28.0.612995095488.issue31133@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3066 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 19:56:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Aug 2017 23:56:38 +0000 Subject: [issue31133] [2.7] PCbuild/pcbuild.sln of Python 2.7 cannot be open by Visual Studio 2010 In-Reply-To: <1502126750.5.0.768313426275.issue31133@psf.upfronthosting.co.za> Message-ID: <1502236598.61.0.903264426066.issue31133@psf.upfronthosting.co.za> STINNER Victor added the comment: My notes on compiling CPython 2.7 on Windows using Visual Studio: http://haypo-notes.readthedocs.io/cpython_windows.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 20:27:16 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 09 Aug 2017 00:27:16 +0000 Subject: [issue31142] python shell crashed while input quotes in print() In-Reply-To: <1502194192.96.0.619398073227.issue31142@psf.upfronthosting.co.za> Message-ID: <1502238436.81.0.509409411188.issue31142@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I'm afraid your error report isn't completely clear. What do you mean "input single quote in print"? Do you mean this? print(') You say IDLE "crashed". What do you mean? Do you mean the IDLE application put up an error message and then disappeared? If so, what was the error message? If IDLE said something like: SyntaxError: EOL while scanning string literal that's perfectly normal. That's because you haven't written a valid string, you need to quote the single quote: print("'"). ---------- assignee: -> terry.reedy components: +IDLE -Demos and Tools nosy: +steven.daprano, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 20:33:03 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 09 Aug 2017 00:33:03 +0000 Subject: [issue31141] Start should be a keyword argument of the built-in sum In-Reply-To: <1502193168.16.0.095124886528.issue31141@psf.upfronthosting.co.za> Message-ID: <1502238783.83.0.576260380152.issue31141@psf.upfronthosting.co.za> Steven D'Aprano added the comment: This seems like a reasonable enhancement to `sum` to me. Since 2.7 is in feature freeze, this can only apply to 3.7. ---------- nosy: +steven.daprano type: behavior -> enhancement versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 20:35:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 00:35:38 +0000 Subject: [issue31150] [EASY] test_thread: Warning -- reap_children() reaped child process Message-ID: <1502238938.02.0.869596216729.issue31150@psf.upfronthosting.co.za> New submission from STINNER Victor: It seems like an unit test of test_thread leaks a process. A bisection found the following 2 tests are enough to get the warning: * test.test_thread.TestForkInThread.test_forkinthread * test.test_thread.LockTests.test_acquire_contended I bet that test_forkinthread() doesn't wait correctly for the child process (fork) completion using os.waitpid() or something like that. Example 1 (from Refleak buildbot): haypo at selma$ ./python -m test -R 3:3 test_thread Run tests sequentially 0:00:00 load avg: 0.55 [1/1] test_thread beginning 6 repetitions 123456 Warning -- reap_children() reaped child process 6984 .Warning -- reap_children() reaped child process 7054 .Warning -- reap_children() reaped child process 7125 .Warning -- reap_children() reaped child process 7195 .Warning -- reap_children() reaped child process 7266 .Warning -- reap_children() reaped child process 7336 . 1 test OK. Total duration: 5 sec Tests result: SUCCESS Example 2 (only run the 2 methods): haypo at selma$ ./python -m test -m test.test_thread.TestForkInThread.test_forkinthread -m test.test_thread.LockTests.test_acquire_contended -v test_thread test_thread 0:00:00 load avg: 0.27 [1/2] test_thread test_acquire_contended (test.test_thread.LockTests) ... ok test_forkinthread (test.test_thread.TestForkInThread) ... ok ---------------------------------------------------------------------- Ran 2 tests in 0.037s OK 0:00:00 load avg: 0.27 [2/2] test_thread test_acquire_contended (test.test_thread.LockTests) ... Warning -- reap_children() reaped child process 10613 ok test_forkinthread (test.test_thread.TestForkInThread) ... ok ---------------------------------------------------------------------- Ran 2 tests in 0.036s OK test_thread failed (env changed) ---------- keywords: easy messages: 299958 nosy: haypo priority: normal severity: normal status: open title: [EASY] test_thread: Warning -- reap_children() reaped child process versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 20:40:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 00:40:39 +0000 Subject: [issue31151] [3.6] test_socketserver: Warning -- reap_children() reaped child process Message-ID: <1502239239.94.0.0719119279673.issue31151@psf.upfronthosting.co.za> New submission from STINNER Victor: It seems like test_socketserver leaks child processes on the "x86 Gentoo Refleaks 3.6" buildbot, but I'm unable to reproduce the bug. http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.6/builds/49/steps/test/logs/stdio 0:48:11 load avg: 3.91 [154/405/2] test_socketserver failed -- running: test_decimal (630 sec) Warning -- reap_children() reaped child process 1044 beginning 6 repetitions 123456 Warning -- reap_children() reaped child process 1104 Warning -- reap_children() reaped child process 1115 .Warning -- reap_children() reaped child process 1170 Warning -- reap_children() reaped child process 1175 Warning -- reap_children() reaped child process 1184 .Warning -- reap_children() reaped child process 1249 .Warning -- reap_children() reaped child process 1311 Warning -- reap_children() reaped child process 1316 ... test_socketserver leaked [1, 1, 1] memory blocks, sum=3 (...) test_ForkingUnixStreamServer (test.test_socketserver.SocketServerTest) ... creating server ADDR = /tmp/unix_socket.hqh5x95a CLASS = server running test client 0 test client 1 test client 2 waiting for server done Warning -- reap_children() reaped child process 17938 ok test_ForkingUnixDatagramServer (test.test_socketserver.SocketServerTest) ... creating server ADDR = /tmp/unix_socket.gry6ulhp CLASS = server running test client 0 test client 1 test client 2 waiting for server done Warning -- reap_children() reaped child process 18212 ok test_ForkingUDPServer (test.test_socketserver.SocketServerTest) ... creating server ADDR = ('127.0.0.1', 43415) CLASS = server running test client 0 test client 1 test client 2 waiting for server done Warning -- reap_children() reaped child process 18281 ok test_ForkingUnixDatagramServer (test.test_socketserver.SocketServerTest) ---------- components: Tests messages: 299959 nosy: haypo priority: normal severity: normal status: open title: [3.6] test_socketserver: Warning -- reap_children() reaped child process type: resource usage versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 20:41:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 00:41:38 +0000 Subject: [issue31151] test_socketserver: Warning -- reap_children() reaped child process In-Reply-To: <1502239239.94.0.0719119279673.issue31151@psf.upfronthosting.co.za> Message-ID: <1502239298.71.0.828940417274.issue31151@psf.upfronthosting.co.za> STINNER Victor added the comment: Ah, the master branch is also affected. Example: http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.x/builds/47/steps/test/logs/stdio 1:35:05 load avg: 4.64 [212/406] test_socketserver passed -- running: test_subprocess (370 sec) beginning 6 repetitions 123456 Warning -- reap_children() reaped child process 4641 .Warning -- reap_children() reaped child process 4708 ..Warning -- reap_children() reaped child process 4832 .Warning -- reap_children() reaped child process 4916 Warning -- reap_children() reaped child process 4921 .. ---------- title: [3.6] test_socketserver: Warning -- reap_children() reaped child process -> test_socketserver: Warning -- reap_children() reaped child process versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 21:33:27 2017 From: report at bugs.python.org (D Gentry) Date: Wed, 09 Aug 2017 01:33:27 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502225876.18.0.675960022017.issue31148@psf.upfronthosting.co.za> Message-ID: D Gentry added the comment: If that's the best thing that you can suggest, it's obvious why my request is being redirected. That is unfortunate that you have decided to opt out of using the MSI installer, as that seems to be the solution as far as I can see. I've enjoyed working with Python for years and was hoping for a new MSI installer to be released eventually, but hearing that you have decided to discontinue porting for any future release for MSI is definitely not what I was expecting. I guess I'll wait to see if your Windows guys have anything to add but save it to say that I have already tried disabling any anti virus software, checked my user permission as well as the folder permissions, and attempted installing via administrator as well, all with no difference in the result. Meanwhile, I have been able to uninstall python 2.7 and re-install it without issue (at the time I was investigating a possible path conflict as the issue) and even installed 3.4.4rc1, as that is the most current version available in MSI format. Your exe files all fail to execute properly, and ends up throwing the same non-descript error in a log that offers very little insight into the root of the problem, yet you tell me the problem is with my system when I have investigated the alternatives and the only issue I have found is you don't have a MSI version offered any more. Are you expecting users to compile the source code into a MSI installer, if that's what they require? If that's what it's going to take, I'll do it myself, get what I need done and move on from python after this project. On Tue, Aug 8, 2017 at 2:57 PM, Steve Dower wrote: > > Changes by Steve Dower : > > > ---------- > type: crash -> behavior > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 22:37:55 2017 From: report at bugs.python.org (Lorem Ipsum) Date: Wed, 09 Aug 2017 02:37:55 +0000 Subject: [issue31152] Tutorial wording implies an understanding of a concept prior to it being introduced Message-ID: <1502246275.38.0.890057309211.issue31152@psf.upfronthosting.co.za> New submission from Lorem Ipsum: Python 3.5.4 Tutorial Section 8.5. User-defined Exceptions Paragraph 2 (https://docs.python.org/3.5/tutorial/errors.html#user-defined-exceptions) states [emphasis mine]: "When creating a module that can raise several distinct errors, a common practice is to create a base class for exceptions defined by that module, and SUBCLASS THAT TO create specific exception classes for different error conditions:" The use of 'subclass' as a verb when it has not been used so prior is confusing, especially to beginners. The concept of a class is not formally covered until Section 9 and up until this point in the tutorial, 'class' has been used as a noun. When read with 'subclass' as a noun, the sentence is nonsensical. It may also be that the comma which precedes 'and' is not proper usage. Suggested improvement: change "subclass that to create specific classes for..." to "then create specific exception subclasses for..." "When creating a module that can raise several distinct errors, a common practice is to create a base class for exceptions defined by that module, and then create specific exception subclasses for different error conditions:" ---------- assignee: docs at python components: Documentation messages: 299962 nosy: Lorem Ipsum, docs at python priority: normal severity: normal status: open title: Tutorial wording implies an understanding of a concept prior to it being introduced type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 23:08:51 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 09 Aug 2017 03:08:51 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1502248131.06.0.993049804338.issue30876@psf.upfronthosting.co.za> Nick Coghlan added the comment: Tagging Petr Viktorin and Matthias Klose, as this may impact distro builds of 3.5.4 that run the tests over the installed version rather than directly from the VCS checkout. It would be slightly helpful to not have to carry the "fix Python's self-tests" patch indefinitely, but it's also not likely to be a major cause of patch conflicts with security updates, so it shouldn't matter much either way. ---------- nosy: +doko, encukou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 23:19:53 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 09 Aug 2017 03:19:53 +0000 Subject: [issue30876] SystemError on importing module from unloaded package In-Reply-To: <1499490436.26.0.607421012374.issue30876@psf.upfronthosting.co.za> Message-ID: <1502248793.61.0.92195390653.issue30876@psf.upfronthosting.co.za> Larry Hastings added the comment: If the change has been checked into the 3.5 branch, it'll go out with 3.5.5. TBH we should probably stop accepting bug fixes into a branch when it hits rc1 of "last release to accept bugfixes" (e.g. 3.5.4rc1). There are two or three bugfixes in the 3.5 branch that I cherry-picked around when I made 3.5.4 final. I'm going to let them simply ship in 3.5.5 (eventually), even though 3.5.5 shouldn't have any "bug fixes". Maybe we'll be crisper when it comes to 3.6.xrc1 etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 23:28:18 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 09 Aug 2017 03:28:18 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1502249298.78.0.521809447135.issue22635@psf.upfronthosting.co.za> Nick Coghlan added the comment: I've added Greg to the nosy list and filed an issue with subprocess32 about this: https://github.com/google/python-subprocess32/issues/30 I did that mainly to make sure they don't inadvertently backport this regression, but also to ask if subprocess32 might potentially provide a way to get the old intended-but-not-actually-tested behaviour back in 3.x. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 8 23:54:09 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Aug 2017 03:54:09 +0000 Subject: [issue31152] Tutorial wording implies an understanding of a concept prior to it being introduced In-Reply-To: <1502246275.38.0.890057309211.issue31152@psf.upfronthosting.co.za> Message-ID: <1502250849.25.0.943935476094.issue31152@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It is okay for the tutorial to occasionally have forward references. Python is a fully object oriented language so references to classes and instances will appear in many places. AFAICT, this particular passage has never caused any reported difficulty for any users. As it reads now, I find it to be clear and correct guidance. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 00:09:30 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Aug 2017 04:09:30 +0000 Subject: [issue31147] a mostly useless check in list_extend() In-Reply-To: <1502206236.15.0.974518538682.issue31147@psf.upfronthosting.co.za> Message-ID: <1502251770.51.0.179877327434.issue31147@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -0 The test "Py_SIZE(self) < self->allocated" is very cheap so I don't mind leaving it in to handle the rare cases (or to prevent future bugs if the list_resize logic ever changes). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 00:11:49 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Aug 2017 04:11:49 +0000 Subject: [issue31141] Start should be a keyword argument of the built-in sum In-Reply-To: <1502193168.16.0.095124886528.issue31141@psf.upfronthosting.co.za> Message-ID: <1502251909.56.0.241830297844.issue31141@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Lisa, would you like to take this one? ---------- assignee: -> lisroach nosy: +lisroach, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 00:19:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 04:19:53 +0000 Subject: [issue31138] dir argument NamedTemporaryFile should accept a pathlib.Path In-Reply-To: <1502155157.73.0.00743957621165.issue31138@psf.upfronthosting.co.za> Message-ID: <1502252393.78.0.391814846407.issue31138@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> out of date _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 00:37:42 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 09 Aug 2017 04:37:42 +0000 Subject: [issue31150] [EASY] test_thread: Warning -- reap_children() reaped child process In-Reply-To: <1502238938.02.0.869596216729.issue31150@psf.upfronthosting.co.za> Message-ID: <1502253462.65.0.454150390314.issue31150@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +3067 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 00:57:10 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 09 Aug 2017 04:57:10 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1502254630.09.0.880940337717.issue22635@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I intend subprocess32 to Python 2 only. Python 3 users should use the standard library subprocess module. subprocess32 does not include getstatusoutput() or getoutput() functions as those are available in the Python 2 stdlib commands module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 01:05:04 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 09 Aug 2017 05:05:04 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1502255104.52.0.641545383871.issue22635@psf.upfronthosting.co.za> Gregory P. Smith added the comment: If you want something API compatible that can be used in a Python 2 and 3 application that wants a getstatusoutput() API I think an appropriate place to put it would be to add a commands modules to https://pypi.python.org/pypi/past/ with a consistent getstatusoutput() API. Either there or something in https://pypi.python.org/pypi/six/. The inadvertent API difference between 2.7 commands.getstatusoutput() and 3.3.4 subprocess.getstatusoutput() is unfortunate but - I agree - too late to change. Fixing the documentation to mention the discrepancy is the least worst option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 02:42:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 06:42:41 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502260961.73.0.0346218066651.issue31070@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3068 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 02:45:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 06:45:12 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502261112.82.0.483530641216.issue31070@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think the solution can be simpler. PR 3033 uses the global import lock for guarding modification of the _module_locks dictionary. ---------- components: +Interpreter Core -Tests stage: -> patch review type: -> behavior versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 02:52:09 2017 From: report at bugs.python.org (SylvainDe) Date: Wed, 09 Aug 2017 06:52:09 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1502261529.13.0.307059274498.issue26656@psf.upfronthosting.co.za> SylvainDe added the comment: @swapnil agarwal I think you can go for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 03:08:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 07:08:11 +0000 Subject: [issue31141] Start should be a keyword argument of the built-in sum In-Reply-To: <1502193168.16.0.095124886528.issue31141@psf.upfronthosting.co.za> Message-ID: <1502262491.06.0.921336978641.issue31141@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Adding this feature is so easy as moving '/' in Argument Clinic declaration one line up. I don't think it is worth to allow passing the first argument as a keyword argument. Check what performance effect of this change on simple calls sum(()), sum((), 0). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 03:11:15 2017 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 09 Aug 2017 07:11:15 +0000 Subject: [issue30491] Add a lightweight mechanism for detecting un-awaited coroutine objects In-Reply-To: <1495867380.86.0.533205071954.issue30491@psf.upfronthosting.co.za> Message-ID: <1502262675.16.0.565658424466.issue30491@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 03:38:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 07:38:57 +0000 Subject: [issue31082] reduce takes iterable, not just sequence In-Reply-To: <1501448787.5.0.80084797494.issue31082@psf.upfronthosting.co.za> Message-ID: <1502264337.9.0.248278007723.issue31082@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The term "sequence" also is used in the docstring of itertools.starmap() (actually an iterable is accepted). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 03:42:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 07:42:39 +0000 Subject: [issue31153] Update docstrings of itertools function Message-ID: <1502264559.87.0.404253644107.issue31153@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Docstrings of some itertools functions look outdated. 1. The docstring of groupby() contains the signature "groupby(iterable[, keyfunc])". But groupby() supports keyword arguments, the name of the second parameter is "key", and its default value is None. 2. accumulate() accepts None as the second argument. 3. The equivalent code of count() has the first parameter "firstval" instead of "start". It uses the "while 1" loop instead of more idiomatic in Python 3 "while True". 4. The term "sequence" is used in the docstring of starmap(), while actually an iterable is accepted. Compare with the docstring of map(). See also issue31082. ---------- assignee: docs at python components: Documentation keywords: easy messages: 299975 nosy: docs at python, rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Update docstrings of itertools function type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 03:50:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 07:50:38 +0000 Subject: [issue31153] Update docstrings of itertools functions In-Reply-To: <1502264559.87.0.404253644107.issue31153@psf.upfronthosting.co.za> Message-ID: <1502265038.25.0.389746916477.issue31153@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Update docstrings of itertools function -> Update docstrings of itertools functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 04:07:01 2017 From: report at bugs.python.org (Alberto Gomez-Casado) Date: Wed, 09 Aug 2017 08:07:01 +0000 Subject: [issue31154] Path.replace and Path.rename naming, behavior and documentation Message-ID: <1502266021.69.0.915795011515.issue31154@psf.upfronthosting.co.za> New submission from Alberto Gomez-Casado: I find the naming of Path.replace quite unfortunate, coming from the os.path and basestring mindset, the expectation would be that it would change some substring by another substring in the Path instance. Instead, it _moves_ the file indicated by the Path object in the file system. Most of the methods of Path have no effect in the filesystem, and we have here one with a slightly misleading name which goes and moves your files around. Practically the same operation is done with Path.rename, which is less surprising since it matches popular OS commands/UIs (ren, Rename). IMHO Path.replace should not exist as is and a keyword modifier (silent?) for Path.rename toggles between the minor behavior differences of the two. Additionally: Both calls lack any kind of return, which leads me to expect after a rename/replace the Path instance would be changed to the new path. This is not the case, after the call the Path instance keeps "pointing" to the previous (and quite likely now useless) path. Returning the new path would be another reasonable option. In any case, I think the documentation should mention this behavior explicitly. And, while we are at it, having implemented the relatively dangerous replace/rename (along with convenience shorcuts for reading, writing, opening...), why was a Path.copy not included? ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 299976 nosy: Alberto Gomez-Casado, docs at python priority: normal severity: normal status: open title: Path.replace and Path.rename naming, behavior and documentation type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 04:47:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 08:47:24 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502268444.5.0.118603877624.issue31070@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_threaded_import: KeyError ignored in _get_module_lock..cb on AMD64 Windows8.1 Refleaks 3.x -> test_threaded_import: KeyError ignored in _get_module_lock..cb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 04:48:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 08:48:16 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502268496.45.0.345416016683.issue31135@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 33460fa7e0bd126bee739a66e1228665dc22e70f by Victor Stinner in branch '3.6': ttk: fix LabeledScale and OptionMenu destroy() method (#3025) (#3030) https://github.com/python/cpython/commit/33460fa7e0bd126bee739a66e1228665dc22e70f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 04:51:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 08:51:45 +0000 Subject: [issue31150] [EASY] test_thread: Warning -- reap_children() reaped child process In-Reply-To: <1502238938.02.0.869596216729.issue31150@psf.upfronthosting.co.za> Message-ID: <1502268705.4.0.991466267288.issue31150@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 88eee44a91c991dbbdf284fa220e2928b5de105c by Victor Stinner (Ammar Askar) in branch 'master': bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3032) https://github.com/python/cpython/commit/88eee44a91c991dbbdf284fa220e2928b5de105c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 04:58:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 08:58:41 +0000 Subject: [issue31150] [EASY] test_thread: Warning -- reap_children() reaped child process In-Reply-To: <1502238938.02.0.869596216729.issue31150@psf.upfronthosting.co.za> Message-ID: <1502269121.48.0.464501647575.issue31150@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 05:21:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 09:21:04 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1502270464.81.0.980131134285.issue22635@psf.upfronthosting.co.za> STINNER Victor added the comment: IMHO it's too late to change *again* subprocess.getstatusoutput() behaviour. Otherwise, it would mean that a complex test like "if not((3, 4) <= sys.version_info < (3, 7))" would be needed to workaround the bug... Whereas right now, basically we only have to check if we are running on Python 3 or not. (Python 3.0-3.3 is almost not used in the wild.) Instead we should just *document* the behaviour change using ".. versionchanged:: 3.4" in Doc/library/subprocess.rst. Any volunteer to do that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 05:23:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 09:23:04 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502270584.69.0.676327199783.issue31070@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: "I think the solution can be simpler. PR 3033 uses the global import lock for guarding modification of the _module_locks dictionary." I tried exactly that, but it wasn't enough. But your PR is correct because it also checks the current value of _module_locks[name] using the callback parameter. I disliked my own PR, so I'm happy that someone else wrote a simpler fix! (I already abandonned my PR.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 05:23:16 2017 From: report at bugs.python.org (Javen O'Neal) Date: Wed, 09 Aug 2017 09:23:16 +0000 Subject: [issue31155] Encode set, frozenset, bytearray, and iterators as json arrays Message-ID: <1502270596.69.0.819927554445.issue31155@psf.upfronthosting.co.za> New submission from Javen O'Neal: Currently json.dump, json.dumps, and json.JSONEncoder do not support writing iterator objects. Users can choose to pass the iterator to a tuple and write that as a json array, but this is wasteful if the iterator is large, requiring a large amount of memory to be temporarily allocated for the tuple prior to json encoding. The json module also does not support writing sets, frozensets, or bytearrays. ---------- components: Library (Lib) messages: 299981 nosy: javenoneal priority: normal pull_requests: 3069 severity: normal status: open title: Encode set, frozenset, bytearray, and iterators as json arrays type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 05:49:19 2017 From: report at bugs.python.org (=?utf-8?q?G=C3=BCnter_Rote?=) Date: Wed, 09 Aug 2017 09:49:19 +0000 Subject: [issue31156] Stopiteration terminates while-loop Message-ID: <1502272159.56.0.437301068833.issue31156@psf.upfronthosting.co.za> New submission from G?nter Rote: It should be mentioned in the documentation that A StopIteration exception raised in the body of a while loop will terminate (and is caught by) the while-loop, thus leading to graceful termination. A good place would be here: 1) https://docs.python.org/3/reference/compound_stmts.html#the-while-statement I don't know how such a StopIteration termination of a while loop affects the else-clause. This should be clarified. Here: 2) https://docs.python.org/3/library/exceptions.html#StopIteration it would be good to explicitly state: An enclosing while-loop or for-loop acts like an implicit catch for StopIteration. The StopIteration exception will terminate the loop. (I guess, a for-loop is also just terminated when the StopIteration originates in the BODY of the loop, although this is not the typical case.) ---------- assignee: docs at python components: Documentation messages: 299982 nosy: G?nter Rote, docs at python priority: normal severity: normal status: open title: Stopiteration terminates while-loop type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 05:54:19 2017 From: report at bugs.python.org (Mick Press) Date: Wed, 09 Aug 2017 09:54:19 +0000 Subject: [issue31157] math.sqrt function wrong Message-ID: <1502272459.7.0.676857812876.issue31157@psf.upfronthosting.co.za> New submission from Mick Press: math.sqrt for very large numbers returns wrong value. Attached is screen shot showing my sqrt function result and math.sqrt function result. ---------- components: Windows files: PyCuda - [C__Users_mick_PyScripts_PyCuda] - C__Users_mick_.PyCharmCE2017.2_config_scratches_scratch_5.py - PyCharm Community Edition 2017.2 09_08_2017 10_44_31.png messages: 299983 nosy: Mick Press, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: math.sqrt function wrong type: performance versions: Python 3.5 Added file: http://bugs.python.org/file47067/PyCuda - [C__Users_mick_PyScripts_PyCuda] - C__Users_mick_.PyCharmCE2017.2_config_scratches_scratch_5.py - PyCharm Community Edition 2017.2 09_08_2017 10_44_31.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 05:58:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 09:58:42 +0000 Subject: [issue31157] math.sqrt function wrong In-Reply-To: <1502272459.7.0.676857812876.issue31157@psf.upfronthosting.co.za> Message-ID: <1502272722.9.0.472366433672.issue31157@psf.upfronthosting.co.za> STINNER Victor added the comment: The math module uses the float type which has a limited precision: it's 64-bit IEEE. For better precision, you can use the decimal module which has configurable precision. Example: --- import decimal decimal.getcontext().prec = 5 root = decimal.Decimal('123').sqrt() print(root) decimal.getcontext().prec = 50 root = decimal.Decimal('123').sqrt() print(root) --- Output: --- 11.091 11.090536506409417162051600102609932918463376742454 --- Said differently: the behaviour that you noticed is not a bug, but a known limitation of Python, of the Python float type to be exact. https://docs.python.org/3/tutorial/floatingpoint.html ---------- nosy: +haypo resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 06:03:42 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Aug 2017 10:03:42 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6 In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1502273022.25.0.704918975346.issue30849@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm. Perhaps someone can give me temporary shell access to one of those buildbots? ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 06:31:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 10:31:37 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6 In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1502274697.22.0.29034684194.issue30849@psf.upfronthosting.co.za> STINNER Victor added the comment: Antoine: "Hmm. Perhaps someone can give me temporary shell access to one of those buildbots?" Contact directly the owners: * AMD64 Debian root 3.6: Chris Angelico * x86 Gentoo Non-Debug with X 3.x: Zachary Ware ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 06:52:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 10:52:13 +0000 Subject: [issue31158] test_pty: test_basic() fails randomly on Travis CI Message-ID: <1502275933.96.0.349321322315.issue31158@psf.upfronthosting.co.za> New submission from STINNER Victor: https://travis-ci.org/python/cpython/jobs/262606831 0:13:26 load avg: 134.81 [256/403] test_pty test test_pty failed -- Traceback (most recent call last): File "/home/travis/build/python/cpython/Lib/test/test_pty.py", line 109, in test_basic self.assertEqual(b'For my pet fish, Eric.\n', normalize_output(s2)) AssertionError: b'For my pet fish, Eric.\n' != b'For m' ---------- components: Tests messages: 299987 nosy: haypo priority: normal severity: normal status: open title: test_pty: test_basic() fails randomly on Travis CI versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 07:01:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 11:01:18 +0000 Subject: [issue31158] test_pty: test_basic() fails randomly on Travis CI In-Reply-To: <1502275933.96.0.349321322315.issue31158@psf.upfronthosting.co.za> Message-ID: <1502276478.51.0.855817042869.issue31158@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3070 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 07:02:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 11:02:16 +0000 Subject: [issue31158] test_pty: test_basic() fails randomly on Travis CI In-Reply-To: <1502275933.96.0.349321322315.issue31158@psf.upfronthosting.co.za> Message-ID: <1502276536.67.0.661637705582.issue31158@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't know why test_pty fails. https://github.com/python/cpython/pull/3037 makes sure that all data is written into the master fd using a new write_all() helper function which loops until all data is written: handle os.write() partial write. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 07:29:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 11:29:15 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502278155.33.0.910483878946.issue31070@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9b0d1d647e3d2ec9d299e5c9f49b02fbbb810a5a by Serhiy Storchaka in branch 'master': bpo-31070: Fix a race condition in importlib _get_module_lock(). (#3033) https://github.com/python/cpython/commit/9b0d1d647e3d2ec9d299e5c9f49b02fbbb810a5a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 07:37:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 11:37:26 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502278646.61.0.0663638831787.issue31070@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3071 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 07:38:46 2017 From: report at bugs.python.org (Julien Palard) Date: Wed, 09 Aug 2017 11:38:46 +0000 Subject: [issue31159] Doc: Language switch can't switch on specific cases Message-ID: <1502278726.47.0.617689885912.issue31159@psf.upfronthosting.co.za> New submission from Julien Palard: Since ja has been added to the language switch, a bug appeared and in some case the switch won't ... switch. Due to a regex bug in switchers.js, a needed trailing slash is sometimes not matched. It has not been detected previously as it can happen only when there more than two languages in the picker which is now the case. Bug is in: var language_regexp = '\.org/(' + Object.keys(all_languages).join('|') + '/)'; It only matches the trailing slash for the last language, currently the / is for ja, so fr does no longer match the needed slash. Fix may consists in adding a non-matching group around the join. But there's another issue when a user goes to a version in which there's a language picker but the current langage is not known by the picker, typically if a user is on /ja/2.7/ but the language picker with Japanese has only been merged on 3.6 and 3.7: the regex on /ja/2.7 will not contain "ja", so it will not be able to match it. So we should write this regex otherwise, I grepped on the server logs and checked on the filesystem, this one should work better and still be safe: var language_regexp = '\.org/([a-z]{2}(?:-[a-z]{2})?/)'; ---------- messages: 299990 nosy: mdk priority: normal severity: normal status: open title: Doc: Language switch can't switch on specific cases _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 07:53:46 2017 From: report at bugs.python.org (Roundup Robot) Date: Wed, 09 Aug 2017 11:53:46 +0000 Subject: [issue31159] Doc: Language switch can't switch on specific cases In-Reply-To: <1502278726.47.0.617689885912.issue31159@psf.upfronthosting.co.za> Message-ID: <1502279626.7.0.165655690205.issue31159@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3072 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 07:54:39 2017 From: report at bugs.python.org (Julien Palard) Date: Wed, 09 Aug 2017 11:54:39 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502279679.99.0.599252184646.issue31149@psf.upfronthosting.co.za> Changes by Julien Palard : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 07:55:18 2017 From: report at bugs.python.org (Julien Palard) Date: Wed, 09 Aug 2017 11:55:18 +0000 Subject: [issue31045] Add a language switch to the Python documentation In-Reply-To: <1501078214.01.0.529111921671.issue31045@psf.upfronthosting.co.za> Message-ID: <1502279718.45.0.546352243483.issue31045@psf.upfronthosting.co.za> Changes by Julien Palard : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 07:55:50 2017 From: report at bugs.python.org (Martin Panter) Date: Wed, 09 Aug 2017 11:55:50 +0000 Subject: [issue31158] test_pty: test_basic() fails randomly on Travis CI In-Reply-To: <1502275933.96.0.349321322315.issue31158@psf.upfronthosting.co.za> Message-ID: <1502279750.54.0.977571717678.issue31158@psf.upfronthosting.co.za> Martin Panter added the comment: Checking for short writes is worthwhile, but in Issue 29070 it looks like Cornelius identified the main problem was short _reads_. See the parts of his patch to do with ?_os_read_exactly? and related functions. ---------- nosy: +Cornelius Diekmann, martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 07:56:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 11:56:16 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502279776.13.0.0342432649755.issue31070@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset f3b891718e104b6e7018b58bbcd86421a2837fb8 by Serhiy Storchaka in branch '3.6': [3.6] bpo-31070: Fix a race condition in importlib _get_module_lock(). (GH-3033). (#3038) https://github.com/python/cpython/commit/f3b891718e104b6e7018b58bbcd86421a2837fb8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 07:57:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 11:57:47 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502279867.52.0.306864783647.issue31070@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for review Victor and Nick. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 08:10:31 2017 From: report at bugs.python.org (Paul Moore) Date: Wed, 09 Aug 2017 12:10:31 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1502280631.66.0.132082480684.issue31148@psf.upfronthosting.co.za> Paul Moore added the comment: To be clear, Steve *is* our main Windows developer, and specifically the person who developed the Windows installers we now use. They work perfectly for many people, including myself, so there certainly isn't a general issue with them. I myself routinely install Python with the new installers on Windows 7 x64 systems, so it's definitely something specific to your system. Is your PC running a "corporate" build that might include security restrictions or other permission limitations that might be affecting the behaviour of the installer? As a workaround, Python is installable using nuget, from https://www.nuget.org/packages/python. I don't know much myself about nuget, but basically "nuget install python" will create a local copy of Python in the current directory that you can use without needing to be installed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 08:24:31 2017 From: report at bugs.python.org (Charalampos Stratakis) Date: Wed, 09 Aug 2017 12:24:31 +0000 Subject: [issue31158] test_pty: test_basic() fails randomly on Travis CI In-Reply-To: <1502275933.96.0.349321322315.issue31158@psf.upfronthosting.co.za> Message-ID: <1502281471.03.0.51262052743.issue31158@psf.upfronthosting.co.za> Charalampos Stratakis added the comment: I've observed the exact same issue on Fedora at random times. ---------- nosy: +cstratak _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 08:50:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 12:50:03 +0000 Subject: [issue31160] Enhance support.reap_children() Message-ID: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached PR enhances the support.reap_children() function: * reap_children() now sets environment_altered to True to detect bugs using python3 -m test --fail-env-changed * Replace bare "except:" with "except OSError:" in reap_children() * Write an unit test for reap_children() using a timeout of 60 seconds ---------- messages: 299996 nosy: haypo priority: normal pull_requests: 3073 severity: normal status: open title: Enhance support.reap_children() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 08:51:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 12:51:10 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502283070.82.0.19353435664.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: The GCC job of Travis CI failed with ENV_CHANGED: Test wait() behavior when waitpid returns WIFSTOPPED; issue29335. ... Warning -- reap_children() reaped child process 19839 ok I tested and... WOW! When run in a loop, this test leaks 100 MB per second. It creates a lot of processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 08:54:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 12:54:50 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502283290.61.0.0323358470959.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: > The GCC job of Travis CI failed with ENV_CHANGED: Ooops, in fact it was a macOS job: https://travis-ci.org/python/cpython/jobs/262606830 The GCC job failed with much more errors: https://travis-ci.org/python/cpython/jobs/262606831 --- 0:00:02 load avg: 121.34 [ 7/403] test_unittest Warning -- reap_children() reaped child process 11088 Warning -- reap_children() reaped child process 11089 Warning -- reap_children() reaped child process 11090 Warning -- reap_children() reaped child process 11091 0:14:22 load avg: 136.67 [282/403/1] test_select Warning -- reap_children() reaped child process 14686 0:16:00 load avg: 110.41 [297/403/1] test_socketserver Warning -- reap_children() reaped child process 15483 Warning -- reap_children() reaped child process 15492 Warning -- reap_children() reaped child process 15499 Warning -- reap_children() reaped child process 15508 0:18:36 load avg: 105.94 [333/403/1] test_thread Warning -- reap_children() reaped child process 20670 --- For test_socketserver, see bpo-31151. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 09:12:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 13:12:19 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502284339.41.0.417309310058.issue31070@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm curious to know if this issue is a regression caused by recent changes: bpo-30891 and bpo-30876. But well, it doesn't matter as soon as it's fixed :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 09:20:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 13:20:00 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502284800.3.0.0392770630104.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: A reap_children() warning was fixed in test_thread: bpo-31150. It seems like the commit 88eee44a91c991dbbdf284fa220e2928b5de105c was not enough to fix all warnings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 09:30:18 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Aug 2017 13:30:18 +0000 Subject: [issue31154] Path.replace and Path.rename naming, behavior and documentation In-Reply-To: <1502266021.69.0.915795011515.issue31154@psf.upfronthosting.co.za> Message-ID: <1502285418.78.0.945007660307.issue31154@psf.upfronthosting.co.za> R. David Murray added the comment: Both the replace and rename functions will remain in the API, as they mirror the os module, not the os itself. I agree that the naming is unfortunate, but it has the weight of history behind it, so we are stuck with it. Issue 24229 rejected adding a copy method. Having replace and rename return a value strikes me as a good idea. Please open a separate issue with that enhancement proposal, and nosy 'pitrou', who is the author of the pathlib module. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 09:31:18 2017 From: report at bugs.python.org (Martijn Pieters) Date: Wed, 09 Aug 2017 13:31:18 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses Message-ID: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> New submission from Martijn Pieters: SyntaxError.__init__() checks for the `print` and `exec` error cases where the user forgot to use parentheses: >>> exec 1 File "", line 1 exec 1 ^ SyntaxError: Missing parentheses in call to 'exec' >>> print 1 File "", line 1 print 1 ^ SyntaxError: Missing parentheses in call to 'print' However, this check is also applied to *subclasses* of SyntaxError: >>> if True: ... print "Look ma, no parens!" File "", line 2 print "Look ma, no parens!" ^ IndentationError: Missing parentheses in call to 'print' and >>> compile('if 1:\n 1\n\tprint "Look ma, tabs!"', '', 'single') Traceback (most recent call last): File "", line 1, in File "", line 3 print "Look ma, tabs!" ^ TabError: Missing parentheses in call to 'print' Perhaps the check needs to be limited to just the exact type. ---------- messages: 300002 nosy: mjpieters priority: normal severity: normal status: open title: Only check for print and exec parentheses cases for SyntaxError, not subclasses _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 09:36:15 2017 From: report at bugs.python.org (Martijn Pieters) Date: Wed, 09 Aug 2017 13:36:15 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1502285775.9.0.150475371517.issue31161@psf.upfronthosting.co.za> Martijn Pieters added the comment: Credit for uncovering this gem: https://stackoverflow.com/questions/45591883/why-is-an-indentionerror-being-raised-here-rather-than-a-syntaxerror ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 09:37:22 2017 From: report at bugs.python.org (Paul Moore) Date: Wed, 09 Aug 2017 13:37:22 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1502285842.53.0.856792732603.issue31072@psf.upfronthosting.co.za> Paul Moore added the comment: New changeset b811d664defed085d16951088afb579fb649c58d by Paul Moore (Jeffrey Rackauckas) in branch 'master': bpo-31072: Add filter to zipapp (#3021) https://github.com/python/cpython/commit/b811d664defed085d16951088afb579fb649c58d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 09:37:54 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Aug 2017 13:37:54 +0000 Subject: [issue31156] Stopiteration terminates while-loop In-Reply-To: <1502272159.56.0.437301068833.issue31156@psf.upfronthosting.co.za> Message-ID: <1502285874.97.0.988111911739.issue31156@psf.upfronthosting.co.za> R. David Murray added the comment: >>> while True: ... raise StopIteration ... Traceback (most recent call last): File "", line 2, in StopIteration ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 09:39:28 2017 From: report at bugs.python.org (Paul Moore) Date: Wed, 09 Aug 2017 13:39:28 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1502285968.77.0.918853250437.issue31072@psf.upfronthosting.co.za> Paul Moore added the comment: Thanks to Jeffrey Rackauckas for the implementation of this feature. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 09:46:14 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 09 Aug 2017 13:46:14 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502286374.23.0.549510760913.issue31070@psf.upfronthosting.co.za> Nick Coghlan added the comment: I don't think the changes created the bug, but I do think the new tests to provoke the other race conditions made it easier for the test suite to hit this race as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 09:46:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 13:46:22 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502286382.43.0.0779450533927.issue31160@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3074 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 09:51:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 13:51:57 +0000 Subject: [issue31041] test_handle_called_with_mp_queue() of test_logging: threading_cleanup() failed to cleanup, on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1501030445.94.0.683702784342.issue31041@psf.upfronthosting.co.za> Message-ID: <1502286717.49.0.590826544178.issue31041@psf.upfronthosting.co.za> STINNER Victor added the comment: New fail: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/680/steps/test/logs/stdio test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 3 sec (count: 0, dangling: 1) ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 10:01:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 14:01:24 +0000 Subject: [issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb In-Reply-To: <1501254221.02.0.861232217344.issue31070@psf.upfronthosting.co.za> Message-ID: <1502287284.77.0.859635001231.issue31070@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't think the changes created the bug, but I do think the new tests to provoke the other race conditions made it easier for the test suite to hit this race as well. Oh ok, that's a good news! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 10:05:31 2017 From: report at bugs.python.org (py78py90py) Date: Wed, 09 Aug 2017 14:05:31 +0000 Subject: [issue31142] python shell crashed while input quotes in print() In-Reply-To: <1502194192.96.0.619398073227.issue31142@psf.upfronthosting.co.za> Message-ID: <1502287531.51.0.508406512616.issue31142@psf.upfronthosting.co.za> py78py90py added the comment: Sorry for the incomplete information. I have inputed following line: print(") IDLE crashed. I also input following line: print(') IDLE also crashed. I have uploaded the crash log. ---------- Added file: http://bugs.python.org/file47068/crashlog.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 10:22:02 2017 From: report at bugs.python.org (=?utf-8?q?G=C3=BCnter_Rote?=) Date: Wed, 09 Aug 2017 14:22:02 +0000 Subject: [issue31156] Stopiteration terminates while-loop In-Reply-To: <1502272159.56.0.437301068833.issue31156@psf.upfronthosting.co.za> Message-ID: <1502288522.63.0.578433190572.issue31156@psf.upfronthosting.co.za> G?nter Rote added the comment: Sorry, that was my misinterpretation of what happened. I had been stumbling over an old program I had written, but apparently it works because the while-loop is inside a generator function, and the StopIteration is simply passed on. Here is a small demonstration example: >>> def f(): ... for x in range(5): ... yield x ... >>> def g(): ... h=f() ... while True: ... yield next(h)+100 ... yield next(h) ... >>> list(g()) [100, 1, 102, 3, 104] (I am beginning to wonder whether this program will be adversely affected by PEP 479 -- Change StopIteration handling inside generators.) ---------- stage: -> resolved status: open -> closed versions: +Python 3.4 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 10:29:44 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 09 Aug 2017 14:29:44 +0000 Subject: [issue31150] [EASY] test_thread: Warning -- reap_children() reaped child process In-Reply-To: <1502238938.02.0.869596216729.issue31150@psf.upfronthosting.co.za> Message-ID: <1502288984.29.0.694274488732.issue31150@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +3075 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 10:38:19 2017 From: report at bugs.python.org (Ammar Askar) Date: Wed, 09 Aug 2017 14:38:19 +0000 Subject: [issue31150] [EASY] test_thread: Warning -- reap_children() reaped child process In-Reply-To: <1502238938.02.0.869596216729.issue31150@psf.upfronthosting.co.za> Message-ID: <1502289499.48.0.592077273233.issue31150@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +3076 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 10:49:18 2017 From: report at bugs.python.org (CHUA Chew Bock) Date: Wed, 09 Aug 2017 14:49:18 +0000 Subject: [issue31162] urllib.request.urlopen error Message-ID: <1502290158.78.0.927502362928.issue31162@psf.upfronthosting.co.za> New submission from CHUA Chew Bock: Error encountered when executing urllib.request.urlopen on IDLE3 interactive as well as run from script. ---------- components: Library (Lib) messages: 300012 nosy: chua.chewbock at gmail.com priority: normal severity: normal status: open title: urllib.request.urlopen error type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 10:50:09 2017 From: report at bugs.python.org (CHUA Chew Bock) Date: Wed, 09 Aug 2017 14:50:09 +0000 Subject: [issue31162] urllib.request.urlopen error In-Reply-To: <1502290158.78.0.927502362928.issue31162@psf.upfronthosting.co.za> Message-ID: <1502290209.09.0.629768524014.issue31162@psf.upfronthosting.co.za> Changes by CHUA Chew Bock : Added file: http://bugs.python.org/file47069/scriptError.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 10:54:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 14:54:56 +0000 Subject: [issue31150] [EASY] test_thread: Warning -- reap_children() reaped child process In-Reply-To: <1502238938.02.0.869596216729.issue31150@psf.upfronthosting.co.za> Message-ID: <1502290496.18.0.387822376529.issue31150@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 425680bbd2dc14ef8dc5d1928f44fc7cc43018c4 by Victor Stinner (Ammar Askar) in branch '2.7': [2.7] bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3042) https://github.com/python/cpython/commit/425680bbd2dc14ef8dc5d1928f44fc7cc43018c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 10:59:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 14:59:24 +0000 Subject: [issue31150] [EASY] test_thread: Warning -- reap_children() reaped child process In-Reply-To: <1502238938.02.0.869596216729.issue31150@psf.upfronthosting.co.za> Message-ID: <1502290764.33.0.881026782921.issue31150@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4388b4257abf3b9c348cf4db8c6144dcc07f3e98 by Victor Stinner (Ammar Askar) in branch '3.6': [3.6] bpo-31150: Wait for child process in test_forkinthread to avoid thread reaped warnings (#3041) https://github.com/python/cpython/commit/4388b4257abf3b9c348cf4db8c6144dcc07f3e98 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 10:59:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 14:59:51 +0000 Subject: [issue31150] [EASY] test_thread: Warning -- reap_children() reaped child process In-Reply-To: <1502238938.02.0.869596216729.issue31150@psf.upfronthosting.co.za> Message-ID: <1502290791.35.0.491360185975.issue31150@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Ammar Askar for your contribution! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 11:01:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 15:01:18 +0000 Subject: [issue31159] Doc: Language switch can't switch on specific cases In-Reply-To: <1502278726.47.0.617689885912.issue31159@psf.upfronthosting.co.za> Message-ID: <1502290878.13.0.931634233607.issue31159@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 122081deef86174beee965be1207fa46ea23533d by Victor Stinner (Julien Palard) in branch 'master': bpo-31159: fix language switch regex on unknown yet built languages. (#3039) https://github.com/python/cpython/commit/122081deef86174beee965be1207fa46ea23533d ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 11:04:36 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 09 Aug 2017 15:04:36 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6 In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1502291076.46.0.348986992964.issue30849@psf.upfronthosting.co.za> Zachary Ware added the comment: > Hmm. Perhaps someone can give me temporary shell access to one of those buildbots? Check your @python.org inbox. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 11:13:14 2017 From: report at bugs.python.org (Emily Morehouse) Date: Wed, 09 Aug 2017 15:13:14 +0000 Subject: [issue31152] Tutorial wording implies an understanding of a concept prior to it being introduced In-Reply-To: <1502246275.38.0.890057309211.issue31152@psf.upfronthosting.co.za> Message-ID: <1502291594.09.0.417501370421.issue31152@psf.upfronthosting.co.za> Emily Morehouse added the comment: I concur with Raymond, particularly because paragraph 1 of section 8.5 links to the Classes tutorial which covers inheritance. I think the documentation is sufficient as is. ---------- nosy: +emilyemorehouse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 11:23:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 15:23:08 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502292188.1.0.451931077243.issue31160@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3077 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 11:27:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 15:27:09 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502292429.37.0.481057023194.issue31160@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3078 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 11:32:24 2017 From: report at bugs.python.org (Alberto Gomez-Casado) Date: Wed, 09 Aug 2017 15:32:24 +0000 Subject: [issue31163] Return destination path in Path.rename and Path.replace Message-ID: <1502292744.48.0.627996317333.issue31163@psf.upfronthosting.co.za> New submission from Alberto Gomez-Casado: Extracted from issue31154 Both calls lack any kind of return, which leads me to expect after a rename/replace the Path instance would be changed to the new path. This is not the case (reading the PEP I have seen Path instances are kind of immutable), after the call the Path instance keeps "pointing" to the previous (and quite likely now useless) path. Returning the new path would be a reasonable option. In any case, I think the documentation should mention this behavior explicitly. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 300019 nosy: Alberto Gomez-Casado, docs at python, pitrou priority: normal severity: normal status: open title: Return destination path in Path.rename and Path.replace type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 11:41:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 15:41:57 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502293317.35.0.843083288209.issue31160@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3079 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 11:44:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 15:44:21 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502293461.41.0.695518306521.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4baca1b0f7325032598cd38e7ceffc79b616d255 by Victor Stinner in branch 'master': bpo-31160: Fix test_builtin for zombie process (#3043) https://github.com/python/cpython/commit/4baca1b0f7325032598cd38e7ceffc79b616d255 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 11:44:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 15:44:35 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502293475.43.0.164933984838.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e3510d74aacc477c30f42f2b941d69689bbc478e by Victor Stinner in branch 'master': bpo-31160: regrtest now reaps child processes (#3044) https://github.com/python/cpython/commit/e3510d74aacc477c30f42f2b941d69689bbc478e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 11:53:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 15:53:43 +0000 Subject: [issue31164] test_functools: test_recursive_pickle() stack overflow on x86 Gentoo Refleaks 3.x Message-ID: <1502294023.01.0.985500913327.issue31164@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.x/builds/51/steps/test/logs/stdio 0:17:12 load avg: 2.97 [ 52/406/1] test_functools crashed (Exit code -6) -- running: test_nntplib (406 sec) beginning 6 repetitions 123456 Fatal Python error: Cannot recover from stack overflow. Current thread 0xb74f1700 (most recent call first): File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/test_functools.py", line 336 in test_recursive_pickle File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 615 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/case.py", line 663 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 122 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/unittest/suite.py", line 84 in __call__ File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1772 in run File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1896 in _run_suite File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/support/__init__.py", line 1940 in run_unittest File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 171 in test_runner File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/refleak.py", line 54 in dash_R File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 174 in runtest_inner File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest.py", line 140 in runtest File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/runtest_mp.py", line 71 in run_tests_slave File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 519 in _main File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 512 in main File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/libregrtest/main.py", line 587 in main File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", line 46 in _main File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/test/regrtest.py", line 50 in File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 85 in _run_code File "/buildbot/buildarea/3.x.ware-gentoo-x86.refleak/build/Lib/runpy.py", line 193 in _run_module_as_main ---------- components: Tests messages: 300022 nosy: haypo priority: normal severity: normal status: open title: test_functools: test_recursive_pickle() stack overflow on x86 Gentoo Refleaks 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 11:59:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 15:59:10 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502294350.98.0.796595135197.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset da5e9301877346942fa4279612750d6a09e05153 by Victor Stinner in branch 'master': bpo-31160: Fix test_random for zombie process (#3045) https://github.com/python/cpython/commit/da5e9301877346942fa4279612750d6a09e05153 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 12:03:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 16:03:40 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502294620.56.0.40879854791.issue31160@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3080 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 12:19:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Aug 2017 16:19:41 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502295581.3.0.245419354094.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset 4baca1b0f7325032598cd38e7ceffc79b616d255 by Victor Stinner in branch 'master': > bpo-31160: Fix test_builtin for zombie process (#3043) This change introduced a regression: http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/1159/steps/test/logs/stdio ====================================================================== FAIL: test_input_no_stdout_fileno (test.test_builtin.PtyTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_builtin.py", line 1624, in test_input_no_stdout_fileno lines = self.run_child(child, b"quux\r") File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_builtin.py", line 1573, in run_child self.assertEqual(status, 0) AssertionError: 1 != 0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 12:28:14 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 09 Aug 2017 16:28:14 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1502296094.75.0.857295582882.issue31072@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Wouldn't be better to name the parameter filterfunc for conformity with PyZipFile? I think the new feature needs at least the versionadded directive in the module documentation. And may be an entry in the What's New document. ---------- nosy: +serhiy.storchaka versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 14:10:42 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Aug 2017 18:10:42 +0000 Subject: [issue31162] urllib.request.urlopen error In-Reply-To: <1502290158.78.0.927502362928.issue31162@psf.upfronthosting.co.za> Message-ID: <1502302242.07.0.977098699693.issue31162@psf.upfronthosting.co.za> R. David Murray added the comment: What makes you think this is a python bug rather than exactly what it says: a cert verification error? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 14:14:33 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Aug 2017 18:14:33 +0000 Subject: [issue31163] Return destination path in Path.rename and Path.replace In-Reply-To: <1502292744.48.0.627996317333.issue31163@psf.upfronthosting.co.za> Message-ID: <1502302473.8.0.559509484321.issue31163@psf.upfronthosting.co.za> R. David Murray added the comment: I agree. The normal python convention is that an immutable object returns the new value when an operation "changes" it, while a mutable object returns None. It seems like replace and rename should follow this convention (and that it would also be convenient). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 14:39:08 2017 From: report at bugs.python.org (nicholas kobald) Date: Wed, 09 Aug 2017 18:39:08 +0000 Subject: [issue31153] Update docstrings of itertools functions In-Reply-To: <1502264559.87.0.404253644107.issue31153@psf.upfronthosting.co.za> Message-ID: <1502303948.88.0.306616085621.issue31153@psf.upfronthosting.co.za> Changes by nicholas kobald : ---------- pull_requests: +3081 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 14:55:44 2017 From: report at bugs.python.org (Sijis Aviles) Date: Wed, 09 Aug 2017 18:55:44 +0000 Subject: [issue30824] Add mimetype for extension .json In-Reply-To: <1498937496.5.0.283718177471.issue30824@psf.upfronthosting.co.za> Message-ID: <1502304944.81.0.106482661274.issue30824@psf.upfronthosting.co.za> Changes by Sijis Aviles : ---------- nosy: +sijis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 15:00:31 2017 From: report at bugs.python.org (Nate Tangsurat) Date: Wed, 09 Aug 2017 19:00:31 +0000 Subject: [issue30824] Add mimetype for extension .json In-Reply-To: <1498937496.5.0.283718177471.issue30824@psf.upfronthosting.co.za> Message-ID: <1502305231.49.0.489142778825.issue30824@psf.upfronthosting.co.za> Changes by Nate Tangsurat : ---------- pull_requests: +3082 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 15:07:35 2017 From: report at bugs.python.org (Paul Moore) Date: Wed, 09 Aug 2017 19:07:35 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1502305655.77.0.675097689638.issue31072@psf.upfronthosting.co.za> Paul Moore added the comment: Good point - I wasn't even aware of the filterfunc argument in PyZipFile. I'll rename the argument. I wasn't initially sure about a what's new entry. I'll add one - and thanks for the reminder about versionadded. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 15:14:14 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Aug 2017 19:14:14 +0000 Subject: [issue31152] Tutorial wording implies an understanding of a concept prior to it being introduced In-Reply-To: <1502246275.38.0.890057309211.issue31152@psf.upfronthosting.co.za> Message-ID: <1502306054.86.0.130273133577.issue31152@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Emily, thanks for the second review. Lorem, thanks for the suggestion, but we're going to decline. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 15:15:47 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Aug 2017 19:15:47 +0000 Subject: [issue31155] Encode set, frozenset, bytearray, and iterators as json arrays In-Reply-To: <1502270596.69.0.819927554445.issue31155@psf.upfronthosting.co.za> Message-ID: <1502306147.49.0.549916968309.issue31155@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> bob.ippolito nosy: +bob.ippolito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 15:17:10 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Aug 2017 19:17:10 +0000 Subject: [issue31153] Update docstrings of itertools functions In-Reply-To: <1502264559.87.0.404253644107.issue31153@psf.upfronthosting.co.za> Message-ID: <1502306230.97.0.383860501612.issue31153@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 15:21:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Aug 2017 19:21:41 +0000 Subject: [issue31142] python shell crashed while input quotes in print() In-Reply-To: <1502194192.96.0.619398073227.issue31142@psf.upfronthosting.co.za> Message-ID: <1502306501.64.0.566082628247.issue31142@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is still something you left out. Entering either print(") or print(') at either a shell prompt or in a file and running the file should result in "SyntaxError: EOL while scanning string literal", as Steven said. Ditto for eval("print(')") or eval('print(")'). The error comes from Python's compile() function. The result *should* be the same on all systems. This is feature, neither a crash nor a bug. So my first inclination was to close this as 'Not a bug'. But getting a system crash log is usually a bug when running Python code. From my reading of Mac's crash log, what crashed is not IDLE but Python running _tkinter calling tcl running tk calling OSX's CoreFoundation which raised NSRangeException. How did you bypass compile()? Where did you get the Python that you installed? If from python.org, did you pay attention to https://www.python.org/download/mac/tcltk/ and install a tcl/tk that works? If not, not our bug. Ned and Serhiy: can we patch _tkinter on Mac to refuse to run with the buggy Apple tcl/tk? Or at least pop up a Warning box that says to not bug us when it crashes? ---------- components: +Tkinter, macOS nosy: +ned.deily, ronaldoussoren, serhiy.storchaka type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 15:38:22 2017 From: report at bugs.python.org (Paul Moore) Date: Wed, 09 Aug 2017 19:38:22 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1502307502.92.0.0892175941924.issue31072@psf.upfronthosting.co.za> Changes by Paul Moore : ---------- pull_requests: +3084 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 15:40:50 2017 From: report at bugs.python.org (Paul Moore) Date: Wed, 09 Aug 2017 19:40:50 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1502307650.44.0.64380294003.issue31072@psf.upfronthosting.co.za> Paul Moore added the comment: I've created a new PR 3049 adding the fixes you suggested (and tightening up the tests, as I noticed an untested aspect of the change while editing). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 16:11:35 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 09 Aug 2017 20:11:35 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1502309495.72.0.0859881533901.issue22635@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I'll get to it. acassaigne's patches are already a good attempt at that, i'll probably find wording tweaks to make as I apply them. ---------- assignee: docs at python -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 21:18:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Aug 2017 01:18:32 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1502327912.43.0.582792033434.issue19903@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3086 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 21:34:05 2017 From: report at bugs.python.org (drallensmith) Date: Thu, 10 Aug 2017 01:34:05 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1502328845.35.0.338835811665.issue5001@psf.upfronthosting.co.za> Changes by drallensmith : ---------- nosy: +drallensmith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 21:43:02 2017 From: report at bugs.python.org (geeknik) Date: Thu, 10 Aug 2017 01:43:02 +0000 Subject: [issue31165] null pointer deref and segfault in list_slice (listobject.c:455) Message-ID: <1502329382.83.0.596499846373.issue31165@psf.upfronthosting.co.za> New submission from geeknik: Python 3.7 git commit 3ca9f50 compiled with afl-clang-fast on Ubuntu 16 x64. The following script triggers undefined-behavior followed by a null pointer dereference and a segfault. import weakref class A(object):pass def callback(x):del lst[0] keepali0e=[] for i in range(1): lst=[str()] a=A() a.c=a keepali0e.append(weakref.ref(a,callback)) del a while lst:keepali0e.append(lst[:]) Objects/dictobject.c:547:12: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:547:12 in Objects/dictobject.c:1105:18: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1105:18 in Objects/dictobject.c:2739:15: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:2739:15 in Objects/dictobject.c:789:27: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:789:27 in Objects/dictobject.c:1104:18: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1104:18 in Objects/dictobject.c:994:15: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:994:15 in Objects/dictobject.c:683:11: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:683:11 in Objects/dictobject.c:1024:9: runtime error: index 64 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1024:9 in Objects/dictobject.c:2882:31: runtime error: index 64 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:2882:31 in Objects/dictobject.c:2346:15: runtime error: index 128 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:2346:15 in Objects/dictobject.c:1449:11: runtime error: index 32 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1449:11 in Objects/dictobject.c:744:27: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:744:27 in Objects/dictobject.c:1631:22: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1631:22 in Objects/dictobject.c:554:31: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:554:31 in Objects/dictobject.c:1183:15: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1183:15 in Objects/dictobject.c:835:27: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:835:27 in Objects/dictobject.c:2036:10: runtime error: index 128 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:2036:10 in Objects/dictobject.c:3504:38: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:3504:38 in Objects/dictobject.c:3422:38: runtime error: index 64 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:3422:38 in Objects/listobject.c:455:23: runtime error: load of null pointer of type 'PyObject *' (aka 'struct _object *') SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/listobject.c:455:23 in ASAN:DEADLYSIGNAL ================================================================= ==29900==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x0000007772df bp 0x7fffdd00ce30 sp 0x7fffdd00cde0 T0) ==29900==The signal is caused by a READ memory access. ==29900==Hint: address points to the zero page. #0 0x7772de in list_slice /root/cpython/Objects/listobject.c:455:23 #1 0x79257b in list_subscript /root/cpython/Objects/listobject.c:2499:20 #2 0xca195c in _PyEval_EvalFrameDefault /root/cpython/Python/ceval.c:1442:29 #3 0xcc723c in _PyEval_EvalCodeWithName /root/cpython/Python/ceval.c:4173:14 #4 0xc679f3 in PyEval_EvalCodeEx /root/cpython/Python/ceval.c:4200:12 #5 0xc679f3 in PyEval_EvalCode /root/cpython/Python/ceval.c:657 #6 0x53056e in run_mod /root/cpython/Python/pythonrun.c:982:9 #7 0x531d77 in PyRun_FileExFlags /root/cpython/Python/pythonrun.c:935:11 #8 0x52d219 in PyRun_SimpleFileExFlags /root/cpython/Python/pythonrun.c:398:13 #9 0x5a958e in run_file /root/cpython/Modules/main.c:341:11 #10 0x5a958e in Py_Main /root/cpython/Modules/main.c:901 #11 0x500382 in main /root/cpython/./Programs/python.c:102:11 #12 0x7f17562f83f0 in __libc_start_main /build/glibc-mXZSwJ/glibc-2.24/csu/../csu/libc-start.c:291 #13 0x433e49 in _start (/root/cpython/python+0x433e49) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /root/cpython/Objects/listobject.c:455:23 in list_slice ==29900==ABORTING ---------- components: Interpreter Core messages: 300033 nosy: geeknik priority: normal severity: normal status: open title: null pointer deref and segfault in list_slice (listobject.c:455) versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 21:46:50 2017 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 10 Aug 2017 01:46:50 +0000 Subject: [issue26110] Speedup method calls 1.2x In-Reply-To: <1452791347.05.0.923215900831.issue26110@psf.upfronthosting.co.za> Message-ID: <1502329610.06.0.89423432459.issue26110@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 22:02:53 2017 From: report at bugs.python.org (geeknik) Date: Thu, 10 Aug 2017 02:02:53 +0000 Subject: [issue31165] null pointer deref and segfault in list_slice (listobject.c:455) In-Reply-To: <1502329382.83.0.596499846373.issue31165@psf.upfronthosting.co.za> Message-ID: <1502330573.87.0.344774713582.issue31165@psf.upfronthosting.co.za> Changes by geeknik : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 22:04:37 2017 From: report at bugs.python.org (geeknik) Date: Thu, 10 Aug 2017 02:04:37 +0000 Subject: [issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258) Message-ID: <1502330677.73.0.512215884622.issue31166@psf.upfronthosting.co.za> New submission from geeknik: Python 3.7 git commit 3ca9f50 compiled with afl-clang-fast on Ubuntu 16 x64. The following script triggers undefined-behavior followed by a null pointer dereference and a segfault. import gc t0ing0=object() class A(object): def f():0 x=t0ing0 r=gc.get_referrers(t0ing0) if[0]:dct=r[0] a=A for i in range(1):a.f dct["f"]=lambda:0 (a.f) Objects/dictobject.c:547:12: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:547:12 in Objects/dictobject.c:1105:18: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1105:18 in Objects/dictobject.c:2739:15: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:2739:15 in Objects/dictobject.c:789:27: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:789:27 in Objects/dictobject.c:1104:18: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1104:18 in Objects/dictobject.c:994:15: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:994:15 in Objects/dictobject.c:683:11: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:683:11 in Objects/dictobject.c:1024:9: runtime error: index 64 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1024:9 in Objects/dictobject.c:2882:31: runtime error: index 64 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:2882:31 in Objects/dictobject.c:2346:15: runtime error: index 128 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:2346:15 in Objects/dictobject.c:1449:11: runtime error: index 32 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1449:11 in Objects/dictobject.c:744:27: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:744:27 in Objects/dictobject.c:1631:22: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1631:22 in Objects/dictobject.c:554:31: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:554:31 in Objects/dictobject.c:1183:15: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:1183:15 in Objects/dictobject.c:835:27: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:835:27 in Objects/dictobject.c:2036:10: runtime error: index 128 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:2036:10 in Objects/dictobject.c:3504:38: runtime error: index 16 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:3504:38 in Objects/dictobject.c:3422:38: runtime error: index 64 out of bounds for type 'int8_t [8]' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/dictobject.c:3422:38 in Objects/obmalloc.c:1258:36: runtime error: load of misaligned address 0xffffffffffffffff for type 'block *' (aka 'unsigned char *'), which requires 8 byte alignment 0xffffffffffffffff: note: pointer points here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/obmalloc.c:1258:36 in ASAN:DEADLYSIGNAL ================================================================= ==768==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000506f9f bp 0x7fff0666cbc0 sp 0x7fff0666cb20 T0) ==768==The signal is caused by a READ memory access. ==768==Hint: address points to the zero page. #0 0x506f9e in _PyObject_Alloc /root/cpython/Objects/obmalloc.c:1258:36 #1 0x9a669b in PyUnicode_New /root/cpython/Objects/unicodeobject.c:1296:24 #2 0x9fea51 in _PyUnicodeWriter_PrepareInternal /root/cpython/Objects/unicodeobject.c:13561:26 #3 0x9b9db4 in PyUnicode_DecodeUTF8Stateful /root/cpython/Objects/unicodeobject.c:4995:9 #4 0x9c0e65 in _PyUnicode_FromId /root/cpython/Objects/unicodeobject.c:2115:22 #5 0x89561e in _PyObject_GetAttrId /root/cpython/Objects/object.c:850:23 #6 0x6b3f4a in _PyObject_CallMethodId /root/cpython/Objects/call.c:1086:16 #7 0x518569 in flush_std_files /root/cpython/Python/pylifecycle.c:889:15 #8 0x517942 in Py_FinalizeEx /root/cpython/Python/pylifecycle.c:959:9 #9 0x5a882b in Py_Main /root/cpython/Modules/main.c:921:9 #10 0x500382 in main /root/cpython/./Programs/python.c:102:11 #11 0x7f94db0bb3f0 in __libc_start_main /build/glibc-mXZSwJ/glibc-2.24/csu/../csu/libc-start.c:291 #12 0x433e49 in _start (/root/cpython/python+0x433e49) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV /root/cpython/Objects/obmalloc.c:1258:36 in _PyObject_Alloc ==768==ABORTING ---------- components: Interpreter Core messages: 300034 nosy: geeknik priority: normal severity: normal status: open title: null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258) type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 22:04:40 2017 From: report at bugs.python.org (Joshua Li) Date: Thu, 10 Aug 2017 02:04:40 +0000 Subject: [issue31167] timedelta produced by datetime.__sub__ does not take Daylight Savings Time into account Message-ID: <1502330680.91.0.483669668972.issue31167@psf.upfronthosting.co.za> New submission from Joshua Li: See my SO answer and the corresponding question for detail: https://stackoverflow.com/a/45602760/5348393 Essentially, given two datetime.datetime instances t1 and t2, the following two syntactically different lines of code should be logically equivalent, but in fact differ by plus or minus one hour on Daylight Savings Time dates because `datetime.datetime.__sub__` does not appear to take DST into account. `t1.timestamp()-t2.timestamp()` `(t1-t2).total_seconds()` I am not sure if this is by intentional design, or a behavioral bug. ---------- components: Library (Lib) messages: 300035 nosy: JoshuaRLi priority: normal severity: normal status: open title: timedelta produced by datetime.__sub__ does not take Daylight Savings Time into account type: behavior versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 22:04:45 2017 From: report at bugs.python.org (Dan Snider) Date: Thu, 10 Aug 2017 02:04:45 +0000 Subject: [issue31168] IDLE hangs with absurdly long __repr__s Message-ID: <1502330685.65.0.748621081688.issue31168@psf.upfronthosting.co.za> New submission from Dan Snider: Objects with a 500,000+ character __repr__ will cause the IDLE shell to hang and thus lose any progress on open windows. 200,000 (on a decent system) seems to be the tipping point where it can never recover. ---------- assignee: terry.reedy components: IDLE messages: 300036 nosy: bup, terry.reedy priority: normal severity: normal status: open title: IDLE hangs with absurdly long __repr__s versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 22:17:46 2017 From: report at bugs.python.org (drallensmith) Date: Thu, 10 Aug 2017 02:17:46 +0000 Subject: [issue31169] convert_to_error assertion failure in multiprocessing/managers.py Message-ID: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> New submission from drallensmith: I am seeing a triggering of one of the assertions in convert_to_error, in managers.py. (This assertion is completely without any message, incidentally, which is also problematic - I've commented on this in issue5001.) This is in common across all versions of cpython that I have access to, and possibly to pypy as well. See https://travis-ci.org/drallensmith/neat-python/builds/262839326 for a set of examples. (The assertion is that "result" is a string. It is somewhat problematic when error-reporting code has an error...) ---------- components: Library (Lib) messages: 300037 nosy: drallensmith priority: normal severity: normal status: open title: convert_to_error assertion failure in multiprocessing/managers.py type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 23:18:07 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 10 Aug 2017 03:18:07 +0000 Subject: [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1502335087.78.0.0715221240392.issue22635@psf.upfronthosting.co.za> Nick Coghlan added the comment: Issue filed with six about this: https://github.com/benjaminp/six/issues/207 It turns out to be somewhat timely on that side as well, as it turns out that six has a not-yet-released change adding "six.moves.commands", which doesn't currently account for this inadvertent incompatibility in the way exit codes are reported. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 9 23:46:54 2017 From: report at bugs.python.org (Wonsup Yoon) Date: Thu, 10 Aug 2017 03:46:54 +0000 Subject: [issue29456] bugs in unicodedata.normalize: u1176, u11a7 and u11c3 In-Reply-To: <1486355272.29.0.0894514518656.issue29456@psf.upfronthosting.co.za> Message-ID: <1502336814.3.0.235614462051.issue29456@psf.upfronthosting.co.za> Wonsup Yoon added the comment: I think it can be merged. Is there anything I need to do? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 00:02:18 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Aug 2017 04:02:18 +0000 Subject: [issue31167] timedelta produced by datetime.__sub__ does not take Daylight Savings Time into account In-Reply-To: <1502330680.91.0.483669668972.issue31167@psf.upfronthosting.co.za> Message-ID: <1502337738.77.0.778515985379.issue31167@psf.upfronthosting.co.za> R. David Murray added the comment: It is by design. Read the footnote associated with the subtraction opertion on datetimes: after subtraction date2 + timedelta = date1, which implies that the subtraction ignores daylight savings transitions, since the addition does ("Note that no time zone adjustments are done even if the input is an aware object"). Perhaps the reason why it is designed this way is menioned in the PEP; I haven't looked. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 00:11:28 2017 From: report at bugs.python.org (=?utf-8?b?6auY5Y+v54ix?=) Date: Thu, 10 Aug 2017 04:11:28 +0000 Subject: [issue29456] bugs in unicodedata.normalize: u1176, u11a7 and u11c3 In-Reply-To: <1486355272.29.0.0894514518656.issue29456@psf.upfronthosting.co.za> Message-ID: <1502338288.98.0.35860139834.issue29456@psf.upfronthosting.co.za> Changes by ??? : Added file: http://bugs.python.org/file47070/800.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 00:23:16 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 10 Aug 2017 04:23:16 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1502338996.72.0.547659981189.issue19903@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Am I right in assuming this will also fix the bug mentioned in this comment https://emptysqua.re/blog/copying-a-python-functions-signature/#comment-1816090904 ? If yes, I'm glad I didn't have to report it. :-) ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 00:46:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Aug 2017 04:46:31 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1502340391.52.0.708122455221.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 646f6c3096abfe5bde13f039ebf32bce5baf083a by Terry Jan Reedy in branch '3.6': [3.6] bpo-19903: IDLE: Calltips changed to use inspect.signature (GH-2822) (#3053) https://github.com/python/cpython/commit/646f6c3096abfe5bde13f039ebf32bce5baf083a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 00:48:25 2017 From: report at bugs.python.org (Lin Tian) Date: Thu, 10 Aug 2017 04:48:25 +0000 Subject: [issue31170] expat: utf8_toUtf8 cannot properly handle exhausting buffer Message-ID: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> New submission from Lin Tian: utf8_toUtf8(const ENCODING *UNUSED_P(enc), const char **fromP, const char *fromLim, char **toP, const char *toLim) { char *to; const char *from; const char *fromLimInitial = fromLim; /* Avoid copying partial characters. */ align_limit_to_full_utf8_characters(*fromP, &fromLim); for (to = *toP, from = *fromP; (from < fromLim) && (to < toLim); from++, to++) *to = *from; *fromP = from; *toP = to; if (fromLim < fromLimInitial) return XML_CONVERT_INPUT_INCOMPLETE; else if ((to == toLim) && (from < fromLim)) // <===== Bug is here. In case (to == toLim), it's possible that // from is still pointing to partial character. For example, // a character with 3 bytes (A, B, C) and form is pointing to C. // It means only A and B is copied to output buffer. Next // scanning will start with C which could be considered as invalid // byte and got dropped. After this, only "AB" is kept in memory // and thus it will lead to invalid continuation byte. return XML_CONVERT_OUTPUT_EXHAUSTED; else return XML_CONVERT_COMPLETED; } ---------- components: Library (Lib) messages: 300043 nosy: Lin Tian priority: normal severity: normal status: open title: expat: utf8_toUtf8 cannot properly handle exhausting buffer type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 00:52:50 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Aug 2017 04:52:50 +0000 Subject: [issue31142] python shell crashed while input quotes in print() In-Reply-To: <1502194192.96.0.619398073227.issue31142@psf.upfronthosting.co.za> Message-ID: <1502340770.89.0.684306000399.issue31142@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: terry.reedy -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 00:58:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 Aug 2017 04:58:29 +0000 Subject: [issue31170] expat: utf8_toUtf8 cannot properly handle exhausting buffer In-Reply-To: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> Message-ID: <1502341109.68.0.503704506495.issue31170@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is not our code. Please use corresponding bug tracker [1] if you have found a bug in Expat. But I think there is not a bug here. [1] https://github.com/libexpat/libexpat/issues ---------- nosy: +serhiy.storchaka resolution: -> third party stage: -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 00:59:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 10 Aug 2017 04:59:02 +0000 Subject: [issue31170] expat: utf8_toUtf8 cannot properly handle exhausting buffer In-Reply-To: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> Message-ID: <1502341142.86.0.111525363327.issue31170@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 00:59:30 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 10 Aug 2017 04:59:30 +0000 Subject: [issue29456] bugs in unicodedata.normalize: u1176, u11a7 and u11c3 In-Reply-To: <1486355272.29.0.0894514518656.issue29456@psf.upfronthosting.co.za> Message-ID: <1502341170.37.0.327273207753.issue29456@psf.upfronthosting.co.za> Changes by Xiang Zhang : Removed file: http://bugs.python.org/file47070/800.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 00:59:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Aug 2017 04:59:32 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1502341172.06.0.452306158431.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Although my freshly opened window says PR2822 is open, it was merged with https://github.com/python/cpython/commit/3b0f620c1a2a21272a9e2aeca6ca1d1ac10f8162 4 hours ago, and then backported. Louie, thanks for the patch and the persistence. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 01:00:53 2017 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 10 Aug 2017 05:00:53 +0000 Subject: [issue29456] bugs in unicodedata.normalize: u1176, u11a7 and u11c3 In-Reply-To: <1486355272.29.0.0894514518656.issue29456@psf.upfronthosting.co.za> Message-ID: <1502341253.0.0.090200851704.issue29456@psf.upfronthosting.co.za> Xiang Zhang added the comment: Hi Wonsup, sorry for the delay. I get really busy with my work these days. If no one get involved I'd try to find time reviewing your patch this week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 01:35:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Aug 2017 05:35:07 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1502343307.14.0.687682279713.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This issue is about IDLE getting further out of the business of calculating signatures and depending instead on the newest (and tested) inspect function. In 2012, the blogger used getargspec, which was deprecated for 3.x a few years before, in 3.0. I suspect that the blog is about 2.x, which is no longer relevant for IDLE development. Inspect.getargspec was superceded by getfullargspec, which was superceded by signature. Read more at https://docs.python.org/3/library/inspect.html#inspect.getfullargspec https://docs.python.org/3/library/inspect.html#introspecting-callables-with-the-signature-object Signature() has a keyword-only option follow_wrapped=True. The new patch uses this default. I suspect that this is relevant to the blogger's concern, but I don't know which value the blogger would want. Either way, I would not switch unless convinced that False is the best choice for beginning users. Any such discussion would be a new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 01:40:46 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 10 Aug 2017 05:40:46 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1502343646.07.0.962876204376.issue19903@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Hm... now I see that link is very misleading... it opens a blog post, and then only a few seconds later jumps to the comment. So now I'll paste the comment here, to avoid misunderstandings: Python3.6.0 (now in 2017). I start IDLE, and write >>> def deco(f): import functools @functools.wraps(f) def ret(*args, **kw): return f(*args, **kw) return ret >>> @deco def f(n, k): return n + k*2 >>> f( And get a tooltip (*args, **kw) instead of (n, k). I guess this is a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 02:15:00 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Aug 2017 06:15:00 +0000 Subject: [issue19903] Idle: Use inspect.signature for calltips In-Reply-To: <1386289306.22.0.0855188637089.issue19903@psf.upfronthosting.co.za> Message-ID: <1502345700.62.0.995515357901.issue19903@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is much clearer. What you got is a limitation of getfullargspec relative to signature (see the links). In this case, you want follow_wrapped=True, to get the specific signature of the wrapped function instead of the generic signature of the wrapper*. With the patch, the tip in 3.6 and 3.7 is '(n, k)'. So yes, this is one of the changes consequent on the switch. >>> str(inspect.signature(f,follow_wrapped=False)) '(*args, **kw)' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 02:49:53 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 10 Aug 2017 06:49:53 +0000 Subject: [issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258) In-Reply-To: <1502330677.73.0.512215884622.issue31166@psf.upfronthosting.co.za> Message-ID: <1502347793.3.0.850157879033.issue31166@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yeah, bad things happen when the underlying class dict, which isn't normally exposed to Python, is mutated. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:02:32 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 10 Aug 2017 07:02:32 +0000 Subject: [issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258) In-Reply-To: <1502330677.73.0.512215884622.issue31166@psf.upfronthosting.co.za> Message-ID: <1502348552.89.0.232898709638.issue31166@psf.upfronthosting.co.za> INADA Naoki added the comment: I think it's false positive of ASAN. We have dynamically sized block. https://github.com/python/cpython/blob/3b0f620c1a2a21272a9e2aeca6ca1d1ac10f8162/Objects/dict-common.h#L49-L69 dictobject.c:547 calls memcpy to fill the block and head pointer is defined as `int8_t [8]`. ASAN doesn't know this is overallocated memory block. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:21:56 2017 From: report at bugs.python.org (Hongxu Jia) Date: Thu, 10 Aug 2017 07:21:56 +0000 Subject: [issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform Message-ID: <1502349716.95.0.155037219321.issue31171@psf.upfronthosting.co.za> New submission from Hongxu Jia: To build python for embedded Linux systems, (http://www.yoctoproject.org/docs/2.3.1/yocto-project-qs/yocto-project-qs.html) The 32-bit python's multiprocessing.BoundedSemaphore could not work. 1. Prerequisite - Build 32bit python on 64bit host, add '-m32' to gcc - Cross compling on linux platform, not have `-pthread' In configure.ac, ac_cv_pthread=no while cross compiling ... 2001 AC_MSG_CHECKING(whether $CC accepts -pthread) 2002 AC_CACHE_VAL(ac_cv_pthread, 2003 [ac_save_cc="$CC" 2004 CC="$CC -pthread" 2005 AC_RUN_IFELSE([AC_LANG_SOURCE([[ [snip] 2018 ]])],[ac_cv_pthread=yes],[ac_cv_pthread=no],[ac_cv_pthread=no]) ... ? Macro: AC_RUN_IFELSE (input, [action-if-true], [action-if-false], [action-if-cross-compiling]) 2. Reproduce with simplifying the prerequisite $ git clone https://github.com/python/cpython.git; cd ./cpython $ ac_cv_pthread=no CC="gcc -m32" ./configure $ make -j 10 $ ./python -c "import multiprocessing; pool_sema = multiprocessing.BoundedSemaphore(value=1); pool_sema.acquire(); pool_sema.release()" Traceback (most recent call last): File "", line 1, in ValueError: semaphore or lock released too many times And the issue also caused invoking put of 'multiprocessing.Queue' hung. $ ./python -c "import multiprocessing; queue_instance = multiprocessing.Queue(); queue_instance.put(('install'))" ---------- components: Library (Lib) messages: 300052 nosy: hongxu priority: normal severity: normal status: open title: multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform type: crash versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:22:33 2017 From: report at bugs.python.org (Hongxu Jia) Date: Thu, 10 Aug 2017 07:22:33 +0000 Subject: [issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform In-Reply-To: <1502349716.95.0.155037219321.issue31171@psf.upfronthosting.co.za> Message-ID: <1502349753.4.0.42097653157.issue31171@psf.upfronthosting.co.za> Hongxu Jia added the comment: 3. Analysis 1) The multiprocessing invokes named semaphore in C library (sem_open/sem_post/sem_getvalue/sem_unlink in ./Modules/_multiprocessing/semaphore.c) 2) The glibc defines two different sem_getvalue since the following commit. https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/sem_getvalue.c;h=1432cc795ece84d5bf31c7e5cafe01cc1a09d98d;hb=042e1521c794a945edc43b5bfa7e69ad70420524 The `__new_sem_getvalue' is the sem_getvalue@@GLIBC_2.1 which work with named semaphore `sem_open' The `__old_sem_getvalue' is the old version sem_getvalue at GLIBC_2.0 which work with unamed semaphore `sem_init' In 32-bit C library, it provides both of them. $ nm -g /lib/i386-linux-gnu/libpthread-2.23.so 0000df30 T sem_getvalue at GLIBC_2.0 0000df10 T sem_getvalue@@GLIBC_2.1 3) In multiprocessing, it invokes sem_open, so sem_getvalue@@GLIBC_2.1 is supposed. If `-pthread' or `-lpthread' not passed to gcc, the compiled _multiprocessing dynamic library could not explicitly linked to sem_getvalue@@GLIBC_2.1 $ nm -g ./build/lib.linux-x86_64-3.7/_multiprocessing.cpython-37m-i386-linux-gnu.so U sem_getvalue U sem_open If `-pthread' or `-lpthread' passed to gcc: $ nm -g ./build/lib.linux-x86_64-3.7/_multiprocessing.cpython-37m-i386-linux-gnu.so U sem_getvalue@@GLIBC_2.1 U sem_open@@GLIBC_2.1.1 4) On 32-bit OS, the multiprocessing was incorrectly linked to sem_getvalue at GLIBC_2.0 which caused the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:23:39 2017 From: report at bugs.python.org (Hongxu Jia) Date: Thu, 10 Aug 2017 07:23:39 +0000 Subject: [issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform In-Reply-To: <1502349716.95.0.155037219321.issue31171@psf.upfronthosting.co.za> Message-ID: <1502349819.5.0.550098876622.issue31171@psf.upfronthosting.co.za> Hongxu Jia added the comment: 4. Solution For cross compiling, there is no `-pthread', so we should explicitly add `-lpthread' to build multiprocessing. Peterson tried to do it in the following commit: ... commit e711cafab13efc9c1fe6c5cd75826401445eb585 Author: Benjamin Peterson Date: Wed Jun 11 16:44:04 2008 +0000 Merged revisions 64104,64117 via svnmerge from svn+ssh://pythondev at svn.python.org/python/trunk ... git show e711cafab13efc9c1fe6c5cd75826401445eb585 -- setup.py --- a/setup.py +++ b/setup.py @@ -1110,6 +1110,56 @@ class PyBuildExt(build_ext): # _fileio -- supposedly cross platform exts.append(Extension('_fileio', ['_fileio.c'])) + # Richard Oudkerk's multiprocessing module + if platform == 'win32': # Windows + macros = dict() + libraries = ['ws2_32'] + + elif platform == 'darwin': # Mac OSX + macros = dict( + HAVE_SEM_OPEN=1, + HAVE_SEM_TIMEDWAIT=0, + HAVE_FD_TRANSFER=1, + HAVE_BROKEN_SEM_GETVALUE=1 + ) + libraries = [] + + elif platform == 'cygwin': # Cygwin + macros = dict( + HAVE_SEM_OPEN=1, + HAVE_SEM_TIMEDWAIT=1, + HAVE_FD_TRANSFER=0, + HAVE_BROKEN_SEM_UNLINK=1 + ) + libraries = [] + else: # Linux and other unices + macros = dict( + HAVE_SEM_OPEN=1, + HAVE_SEM_TIMEDWAIT=1, + HAVE_FD_TRANSFER=1 + ) + libraries = ['rt'] + + if platform == 'win32': + multiprocessing_srcs = [ '_multiprocessing/multiprocessing.c', + '_multiprocessing/semaphore.c', + '_multiprocessing/pipe_connection.c', + '_multiprocessing/socket_connection.c', + '_multiprocessing/win32_functions.c' + ] + + else: + multiprocessing_srcs = [ '_multiprocessing/multiprocessing.c', + '_multiprocessing/socket_connection.c' + ] + + if macros.get('HAVE_SEM_OPEN', False): + multiprocessing_srcs.append('_multiprocessing/semaphore.c') + + exts.append ( Extension('_multiprocessing', multiprocessing_srcs, + define_macros=list(macros.items()), + include_dirs=["Modules/_multiprocessing"])) + # End multiprocessing It defined variable `libraries' and assigned it according to host_platform, but forgot to pass it to Extension. So we should correct it, and add `-lpthread' for linux. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:23:51 2017 From: report at bugs.python.org (Patrick Rutkowski) Date: Thu, 10 Aug 2017 07:23:51 +0000 Subject: [issue31172] Py_Main() is totally broken on Visual Studio 2017 Message-ID: <1502349831.97.0.859885233288.issue31172@psf.upfronthosting.co.za> New submission from Patrick Rutkowski: Install Visual Studio 2017 Download and unpack Python-3.6.2.tgz Open a Visual Studio command prompt Browse to Python-3.6.2\PCBuild Run build.bat -p x64 -c Release Run build.bat -p x64 -c Debug Add the PCbuild\amd64 directory to your PATH Create a new Visual Studio Win32 GUI project called mypythonw Copy-paste the source code of Python-3.6.2\PCBuild\WinMain.c into your mypthonw project. Add Python-3.6.2\Include and Python-3.6.2\PC to mypythonw's include path. Add Python-3.6.2\PCbuild\amd64 to mypythonw's library search path Build mypthonw Run these two commands: pythonw -c "import ctypes; ctypes.windll.user32.MessageBoxW(0, 'Hello World!', 'Hello', 0) mypythonw -c "import ctypes; ctypes.windll.user32.MessageBoxW(0, 'Hello World!', 'Hello', 0) The first will show a message box, while the second will show nothing. You won't get an error message or a debugger from mypythonw.exe. It'll just silently do nothing. There must be something in the configuration of pythonw.vcxproj that is necessary for Python embedding to work, and which makes it work in pythonw but fail in mypythonw. The two projects are executing the exact same C code, but one works and the other doesn't. What's going on here? ---------- messages: 300055 nosy: rutski priority: normal severity: normal status: open title: Py_Main() is totally broken on Visual Studio 2017 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:26:13 2017 From: report at bugs.python.org (Julien Palard) Date: Thu, 10 Aug 2017 07:26:13 +0000 Subject: [issue31159] Doc: Language switch can't switch on specific cases In-Reply-To: <1502278726.47.0.617689885912.issue31159@psf.upfronthosting.co.za> Message-ID: <1502349973.74.0.991884851534.issue31159@psf.upfronthosting.co.za> Julien Palard added the comment: Now works in 3.7, needs backports to 3.6 and 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:37:01 2017 From: report at bugs.python.org (Hongxu Jia) Date: Thu, 10 Aug 2017 07:37:01 +0000 Subject: [issue31171] multiprocessing.BoundedSemaphore of 32-bit python could not work while cross compiling on linux platform In-Reply-To: <1502349716.95.0.155037219321.issue31171@psf.upfronthosting.co.za> Message-ID: <1502350621.81.0.999295322575.issue31171@psf.upfronthosting.co.za> Changes by Hongxu Jia : ---------- pull_requests: +3087 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:37:30 2017 From: report at bugs.python.org (Patrick Rutkowski) Date: Thu, 10 Aug 2017 07:37:30 +0000 Subject: [issue31172] Py_Main() is totally broken on Visual Studio 2017 In-Reply-To: <1502349831.97.0.859885233288.issue31172@psf.upfronthosting.co.za> Message-ID: <1502350650.67.0.714979837884.issue31172@psf.upfronthosting.co.za> Patrick Rutkowski added the comment: Just for kicks I tried the same Py_Main() code from a Win32 console application (instead of from a GUI application). The C code this time was #include int wmain(int argc, wchar_t** argv) { return Py_Main(argc, argv); } The resulting error message when trying to run the program is now =========================================================== > mypythoncmd.exe -c "import ctypes; ctypes.windll.user32.MessageBoxW(0, 'Hello World!', 'Hello', 0)" Fatal Python error: Py_Initialize: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x000009f0 (most recent call first): OUTPUT ENDS HERE =========================================================== ---------- assignee: -> christian.heimes components: +SSL nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:40:59 2017 From: report at bugs.python.org (Christian Heimes) Date: Thu, 10 Aug 2017 07:40:59 +0000 Subject: [issue31172] Py_Main() is totally broken on Visual Studio 2017 In-Reply-To: <1502349831.97.0.859885233288.issue31172@psf.upfronthosting.co.za> Message-ID: <1502350859.22.0.258911462656.issue31172@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- assignee: christian.heimes -> components: +Windows -SSL nosy: +paul.moore, steve.dower, tim.golden, zach.ware -christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:51:30 2017 From: report at bugs.python.org (geeknik) Date: Thu, 10 Aug 2017 07:51:30 +0000 Subject: [issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258) In-Reply-To: <1502330677.73.0.512215884622.issue31166@psf.upfronthosting.co.za> Message-ID: <1502351490.98.0.420319803025.issue31166@psf.upfronthosting.co.za> geeknik added the comment: So if I leave UBSan and ASan out of the equation and compile with gcc and run this script: Program received signal SIGSEGV, Segmentation fault. update_refs (containers=) at Modules/gcmodule.c:353 353 _PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc))); (gdb) bt #0 update_refs (containers=) at Modules/gcmodule.c:353 #1 collect (generation=generation at entry=2, n_collected=n_collected at entry=0x7fffffffe2f8, n_uncollectable=n_uncollectable at entry=0x7fffffffe300, nofail=nofail at entry=0) at Modules/gcmodule.c:962 #2 0x00005555555d5365 in collect_with_callback (generation=2) at Modules/gcmodule.c:1135 #3 PyGC_Collect () at Modules/gcmodule.c:1622 #4 _PyGC_CollectIfEnabled () at Modules/gcmodule.c:1635 #5 0x00005555555b8e28 in Py_FinalizeEx () at Python/pylifecycle.c:978 #6 0x00005555555b9225 in Py_FinalizeEx () at Python/pylifecycle.c:1119 #7 0x00005555555d2ed2 in Py_Main (argc=, argv=) at Modules/main.c:921 #8 0x00005555555aa1cb in main (argc=2, argv=) at ./Programs/python.c:102 (gdb) list 348 update_refs(PyGC_Head *containers) 349 { 350 PyGC_Head *gc = containers->gc.gc_next; 351 for (; gc != containers; gc = gc->gc.gc_next) { 352 assert(_PyGCHead_REFS(gc) == GC_REACHABLE); 353 _PyGCHead_SET_REFS(gc, Py_REFCNT(FROM_GC(gc))); 354 /* Python's cyclic gc should never see an incoming refcount 355 * of 0: if something decref'ed to 0, it should have been 356 * deallocated immediately at that time. 357 * Possible cause (if the assert triggers): a tp_dealloc Valgrind shows a null deref as well after some invalid reads and conditional jumps. I've attached the log, it's a bit verbose. ---------- Added file: http://bugs.python.org/file47071/31166.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:54:27 2017 From: report at bugs.python.org (D Gentry) Date: Thu, 10 Aug 2017 07:54:27 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502280631.66.0.132082480684.issue31148@psf.upfronthosting.co.za> Message-ID: D Gentry added the comment: Ok, it sounds like as good a solution as I can expect. No, I don't have a corporate build but I think my registry developed issues some time in the past and windows locked it down to prevent exe from installing. It's been a while but that is the only thing I can come up with that would be why it won't work. Your exe isn't the only one that gives me issues but its usually a false positive error with other installs and everything works as expected. I have tried every suggestion I have found online and nothing seems to improve the issue. If the problem is the registry issue that I suspect, then nothing short of rebuilding the entire system from initial install would solve the problem. I have communicated with Microsoft, who's answer was to upgrade to Windows 10. I have two systems with python installed, both with windows 7 x64, the older system won't install without an MSI where as the new one would. The closest thing I can figure is there is some permission handling that is done differently via MSI vs executable installs and this is causing the issue, as all the documentation online seems to agree that it is a permissions related error. I can't fix my system if the problem that I suspect is the culprit so my only option is to build the MSI of your installer. It definitely seems like that will be more successful than continuing to be directed and redirected to perform the same tasks that have already been completed to no avail. >From what I have been reading online, its simple enough with Visual Studio as long as you have access to the source code. Thanks for enlightening me to the most of your abilities. It seems pretty clear that I on my own on this one. On Wed, Aug 9, 2017 at 6:10 AM, Paul Moore wrote: > > Paul Moore added the comment: > > To be clear, Steve *is* our main Windows developer, and specifically the > person who developed the Windows installers we now use. They work perfectly > for many people, including myself, so there certainly isn't a general issue > with them. I myself routinely install Python with the new installers on > Windows 7 x64 systems, so it's definitely something specific to your system. > > Is your PC running a "corporate" build that might include security > restrictions or other permission limitations that might be affecting the > behaviour of the installer? > > As a workaround, Python is installable using nuget, from > https://www.nuget.org/packages/python. I don't know much myself about > nuget, but basically "nuget install python" will create a local copy of > Python in the current directory that you can use without needing to be > installed. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 03:56:57 2017 From: report at bugs.python.org (Patrick Rutkowski) Date: Thu, 10 Aug 2017 07:56:57 +0000 Subject: [issue31172] Py_Main() is totally broken on Visual Studio 2017 In-Reply-To: <1502349831.97.0.859885233288.issue31172@psf.upfronthosting.co.za> Message-ID: <1502351817.26.0.548930582649.issue31172@psf.upfronthosting.co.za> Patrick Rutkowski added the comment: I removed my custom built Python and installed the one provided by the python-3.6.2-amd64.exe installer instead. The Win32 Command Line application now works, and shows the message box. The Win32 GUI Application still fails to work, the output is just nothing. As expected, pythonw works as always, it shows the popup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 04:27:17 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 10 Aug 2017 08:27:17 +0000 Subject: [issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258) In-Reply-To: <1502330677.73.0.512215884622.issue31166@psf.upfronthosting.co.za> Message-ID: <1502353637.23.0.734242857846.issue31166@psf.upfronthosting.co.za> INADA Naoki added the comment: As Benjamin commented, this is caused by mutating internal dict. PyType_Lookup() use "method cache", based on "tp_version_tag" in the type object. When you modify internal dict directly, namespace is changed without invalidating tp_version_tag. So cached pointer is used, and it's already deallocated. I don't know we should fix it or not. I don't have any idea fix this without any performance penalty. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 04:38:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 08:38:57 +0000 Subject: [issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258) In-Reply-To: <1502330677.73.0.512215884622.issue31166@psf.upfronthosting.co.za> Message-ID: <1502354337.51.0.483389734378.issue31166@psf.upfronthosting.co.za> STINNER Victor added the comment: > I don't know we should fix it or not. I don't have any idea fix this without any performance penalty. The PEP 509 (dict version) might help if we want to fix this bug. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 04:49:51 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 10 Aug 2017 08:49:51 +0000 Subject: [issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258) In-Reply-To: <1502330677.73.0.512215884622.issue31166@psf.upfronthosting.co.za> Message-ID: <1502354991.3.0.91445007843.issue31166@psf.upfronthosting.co.za> INADA Naoki added the comment: But we should check dicts of all parents. It will has significant penalty, especially for classes having long mro (inheriting metaclass from typing module cause long mro). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 05:02:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 09:02:41 +0000 Subject: [issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258) In-Reply-To: <1502330677.73.0.512215884622.issue31166@psf.upfronthosting.co.za> Message-ID: <1502355761.54.0.911342698044.issue31166@psf.upfronthosting.co.za> STINNER Victor added the comment: "But we should check dicts of all parents. It will has significant penalty, especially for classes having long mro (inheriting metaclass from typing module cause long mro)." Oh right. That would defeat the whole purpose of the cache. Maybe we should not fix the bug. You are not supposed to access the hidden dictionary :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 05:03:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 09:03:27 +0000 Subject: [issue31166] null pointer deref and segfault in _PyObject_Alloc (obmalloc.c:1258) In-Reply-To: <1502330677.73.0.512215884622.issue31166@psf.upfronthosting.co.za> Message-ID: <1502355807.06.0.344199987267.issue31166@psf.upfronthosting.co.za> STINNER Victor added the comment: Another solution is to replace class dict with a special type which invalidates the type cache on dict[key]=value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 05:20:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 09:20:53 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process Message-ID: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> New submission from STINNER Victor: The test_child_terminated_in_stopped_state() test creates a child process which calls ptrace(PTRACE_ME, 0, 0) and then crashs using SIGSEGV. The problem is that even if we read the exit status using os.waitpid() through subprocess, the process remains alive in the "t (tracing stop)" state. I would prefer to not use ptrace() is an unit test since this API is very low-level and it's hard to use it correctly. I suggest to either remove the functional test, or to rewrite it as an unit test using mocks to test bpo-29335 without ptrace(). haypo at selma$ ./python -m test -m test_child_terminated_in_stopped_state -F test_subprocess Run tests sequentially 0:00:00 load avg: 0.95 [ 1] test_subprocess 0:00:00 load avg: 0.95 [ 2] test_subprocess 0:00:01 load avg: 0.96 [ 3] test_subprocess 0:00:01 load avg: 0.96 [ 4] test_subprocess 0:00:02 load avg: 0.96 [ 5] test_subprocess 0:00:03 load avg: 0.96 [ 6] test_subprocess 0:00:03 load avg: 0.96 [ 7] test_subprocess 0:00:04 load avg: 0.96 [ 8] test_subprocess 0:00:05 load avg: 0.96 [ 9] test_subprocess 0:00:05 load avg: 0.96 [ 10] test_subprocess ^Z [1]+ Stopp? ./python -m test -m test_child_terminated_in_stopped_state -F test_subprocess haypo at selma$ ps PID TTY TIME CMD 30359 pts/0 00:00:00 bash 31882 pts/0 00:00:00 python 31885 pts/0 00:00:00 python 31888 pts/0 00:00:00 python 31892 pts/0 00:00:00 python 31895 pts/0 00:00:00 python 31898 pts/0 00:00:00 python 31901 pts/0 00:00:00 python 31904 pts/0 00:00:00 python 31907 pts/0 00:00:00 python 31910 pts/0 00:00:00 python 31912 pts/0 00:00:00 python 31920 pts/0 00:00:00 ps haypo at selma$ grep Stat /proc/31885/status State: t (tracing stop) ---------- messages: 300066 nosy: haypo priority: normal severity: normal status: open title: test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 05:21:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 09:21:02 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process In-Reply-To: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> Message-ID: <1502356862.8.0.472953622619.issue31173@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Tests versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 05:28:59 2017 From: report at bugs.python.org (Cornelius Diekmann) Date: Thu, 10 Aug 2017 09:28:59 +0000 Subject: [issue31158] test_pty: test_basic() fails randomly on Travis CI In-Reply-To: <1502275933.96.0.349321322315.issue31158@psf.upfronthosting.co.za> Message-ID: <1502357339.37.0.0733932142847.issue31158@psf.upfronthosting.co.za> Cornelius Diekmann added the comment: I observed the same issue, but the problem occurs mainly when reading data. In my proposed patch in issue29070, I use the existing pty._writen() to make sure all data is written. As Martin mentioned, reading is a problem. My patch proposes _os_timeout_read(), _os_readline(), _os_read_exactly(), _os_read_exhaust_exactly() to give fine-grained, deterministic control. Cheeky advertisement: Anybody cares to review issue29070 or cherry pick the pty._writen() and _os_read* parts? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 06:04:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 10:04:16 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process In-Reply-To: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> Message-ID: <1502359456.1.0.495461615947.issue31173@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3090 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 06:08:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 10:08:24 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process In-Reply-To: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> Message-ID: <1502359704.34.0.940745964628.issue31173@psf.upfronthosting.co.za> STINNER Victor added the comment: https://github.com/python/cpython/pull/3055 removes the functional test and replaces it with an unit test which mocks os.waitpid() using a new _testcapi.W_STOPCODE() function to test the WIFSTOPPED() path. The functional test created a core dump, but it's now fixed using SuppressCrashReport. It leaks a zombie process in a special state, the process is traced and cannot be killed. I tried to wait for the process a second time, but it's not enough to "close" it. I guess that we would have to write a little debugger to attach the process in the parent process. IMHO it's overcomplicated just to check that subprocess calls WIFSTOPPED(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 06:33:01 2017 From: report at bugs.python.org (py78py90py) Date: Thu, 10 Aug 2017 10:33:01 +0000 Subject: [issue31142] python shell crashed while input quotes in print() In-Reply-To: <1502194192.96.0.619398073227.issue31142@psf.upfronthosting.co.za> Message-ID: <1502361181.48.0.878028486146.issue31142@psf.upfronthosting.co.za> py78py90py added the comment: I downloaded python from www.python.org. And I think I have tcl/tk installed. Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "copyright", "credits" or "license()" for more information. >>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable. Visit http://www.python.org/download/mac/tcltk/ for current information. I am trying to use the recommended tcltk version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 06:37:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 10:37:01 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process In-Reply-To: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> Message-ID: <1502361421.19.0.208454884271.issue31173@psf.upfronthosting.co.za> STINNER Victor added the comment: I chose to only add W_STOPCODE() to _testcapi rather than the os module, because I don't want to have to document this function. I don't think that anyone needs such function, usually we only need to consume process statuses, not to produce them. The only use case is to write an unit test. This issue is part of bpo-31160 which ensures that unit tests don't leak child processes. This issue is part of my large project of reducing the fail rate on CIs (Travis CI, AppVeyor, buildbots): https://haypo.github.io/python-buildbots-2017q2.html I will now merge my PR 3055 to be able to unblock my work on CIs. But I will wait for feedback from Gregory before backporting this fix to 2.7 and 3.6. ---------- nosy: +gregory.p.smith versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 06:37:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 10:37:41 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process In-Reply-To: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> Message-ID: <1502361461.8.0.770029940895.issue31173@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 7b7c6dcfff6a35333988a3c74c895ed19dff2e09 by Victor Stinner in branch 'master': bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055) https://github.com/python/cpython/commit/7b7c6dcfff6a35333988a3c74c895ed19dff2e09 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 06:41:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 10:41:51 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502361711.54.0.151253570721.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: bpo-31173 fixed a leaked child process in test_subprocess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 06:47:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 10:47:03 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502362023.75.0.0277187742662.issue31160@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3091 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 07:05:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 11:05:09 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502363109.06.0.214862368627.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6c8c2943d996b59a48d331f61f22cbe72933910e by Victor Stinner in branch 'master': bpo-31160: test_tempfile: Fix reap_children() warning (#3056) https://github.com/python/cpython/commit/6c8c2943d996b59a48d331f61f22cbe72933910e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 07:30:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 11:30:13 +0000 Subject: [issue31151] test_socketserver: Warning -- reap_children() reaped child process In-Reply-To: <1502239239.94.0.0719119279673.issue31151@psf.upfronthosting.co.za> Message-ID: <1502364613.47.0.513275379013.issue31151@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem is that socketserver.ForkinMixin doesn't wait until all children completes. It's only calls os.waitpid() in non-blocking module (using os.WNOHANG) after each loop iteration. If a child process completes after the last call to ForkingMixIn.collect_children(), the server leaks zombie processes. The server must wait until all children completes. Attached PR implements that. The bug was be reproduced with the attached forkingmixin_sleep.patch. haypo at selma$ ./python -m test -v -u all test_socketserver --fail-env-changed -m '*Fork*' (...) Warning -- reap_children() reaped child process 17093 Warning -- reap_children() reaped child process 17094 (...) ---------- keywords: +patch Added file: http://bugs.python.org/file47072/forkingmixin_sleep.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 07:30:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 11:30:30 +0000 Subject: [issue31151] test_socketserver: Warning -- reap_children() reaped child process In-Reply-To: <1502239239.94.0.0719119279673.issue31151@psf.upfronthosting.co.za> Message-ID: <1502364630.8.0.835363046783.issue31151@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3092 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 07:45:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 11:45:39 +0000 Subject: [issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.x Message-ID: <1502365539.11.0.343233157276.issue31174@psf.upfronthosting.co.za> New submission from STINNER Victor: The "x86 Gentoo Refleaks 3.x" buildbot runs tests using -u-cpu to disable the cpu resource. The problem is that DirectoryTestCase.test_files() of Lib/test/test_tools/test_unparse.py uses random: # Test limited subset of files unless the 'cpu' resource is specified. if not test.support.is_resource_enabled("cpu"): names = random.sample(names, 10) So when we run the same test 7 times, each run uses different data. I see different options: * Reseed random using the same seed in dash_R() of regrtest * Always test all data in test_unparse.py: all files, or select a specific set of interesting files The random issue is more generic than just test_unparse.py, and so it would be interesting to explore this path. Maybe the random issue explains why some other tests fail randomly. libregrtest always seeds the random RNG using a seed displayed on the standard output. We should either reuse this seed, or create a new unique seed for each test file, and display it (to be able to reproduce tests). Reseed random before running each test file can also helps to make tests more reproductible -- http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.x/builds/52/steps/test/logs/stdio test_tools leaked [1, 4, 2] memory blocks, sum=7 (...) Re-running test 'test_tools' in verbose mode (...) test_tools leaked [1, 2, 2] memory blocks, sum=5 (...) 1 test failed again: test_tools ---------- components: Tests messages: 300075 nosy: haypo, serhiy.storchaka priority: normal severity: normal status: open title: test_tools leaks randomly references on x86 Gentoo Refleaks 3.x versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 08:12:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 12:12:21 +0000 Subject: [issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.x In-Reply-To: <1502365539.11.0.343233157276.issue31174@psf.upfronthosting.co.za> Message-ID: <1502367141.0.0.0646861769764.issue31174@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3093 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 08:18:45 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 10 Aug 2017 12:18:45 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1502367525.59.0.249028909687.issue31161@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I'm not sure whether this is a bug or a feature. In the examples you show, we have *both* an IndentationError/TabError and missing parentheses around print. So I'm almost inclined to say that this is right: - you get an IndentationError (or TabError); - and the error message *also* tells you that print is missing parens. Two errors for the price of one! I'm not sure that I would have designed it this way from scratch, but given that it already exists I'm not sure that it should be "fixed". In any case, since the error message itself is not part of the public API, I don't think there's any problem in changing it in a bug-fix release. So *if* we change this, we can change it in 3.6. ---------- components: +Interpreter Core nosy: +steven.daprano type: -> behavior versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 08:53:15 2017 From: report at bugs.python.org (drallensmith) Date: Thu, 10 Aug 2017 12:53:15 +0000 Subject: [issue31169] convert_to_error assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502369595.67.0.421278746934.issue31169@psf.upfronthosting.co.za> drallensmith added the comment: An example on 2.7.13: Traceback (most recent call last): File "/opt/python/2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/opt/python/2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run self._target(*self._args, **self._kwargs) File "/home/travis/build/drallensmith/neat-python/tests/test_distributed.py", line 412, in run_secondary de.start(secondary_wait=3, exit_on_stop=True) File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 414, in start self._secondary_loop(reconnect_max_time=reconnect_max_time) File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 616, in _secondary_loop self.outqueue.put(res) File "", line 2, in put File "/opt/python/2.7.9/lib/python2.7/multiprocessing/managers.py", line 774, in _callmethod raise convert_to_error(kind, result) AssertionError Process Child evaluation process (multiple workers): Traceback (most recent call last): File "/opt/python/2.7.9/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap self.run() File "/opt/python/2.7.9/lib/python2.7/multiprocessing/process.py", line 114, in run self._target(*self._args, **self._kwargs) File "/home/travis/build/drallensmith/neat-python/tests/test_distributed.py", line 412, in run_secondary de.start(secondary_wait=3, exit_on_stop=True) File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 414, in start self._secondary_loop(reconnect_max_time=reconnect_max_time) File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 616, in _secondary_loop self.outqueue.put(res) File "", line 2, in put File "/opt/python/2.7.9/lib/python2.7/multiprocessing/managers.py", line 774, in _callmethod raise convert_to_error(kind, result) AssertionError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 08:55:49 2017 From: report at bugs.python.org (drallensmith) Date: Thu, 10 Aug 2017 12:55:49 +0000 Subject: [issue31169] convert_to_error assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502369749.05.0.4857201172.issue31169@psf.upfronthosting.co.za> drallensmith added the comment: Correction - 2.7.9 - Travis seems to be a bit behind. Here's one from 3.6.2: Traceback (most recent call last): File "/opt/python/3.6.2/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap self.run() File "/opt/python/3.6.2/lib/python3.6/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "/home/travis/build/drallensmith/neat-python/tests/test_distributed.py", line 412, in run_secondary de.start(secondary_wait=3, exit_on_stop=True) File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 414, in start self._secondary_loop(reconnect_max_time=reconnect_max_time) File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 616, in _secondary_loop self.outqueue.put(res) File "", line 2, in put File "/opt/python/3.6.2/lib/python3.6/multiprocessing/managers.py", line 772, in _callmethod raise convert_to_error(kind, result) AssertionError Process Child evaluation process (multiple workers): Traceback (most recent call last): File "/opt/python/3.6.2/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap self.run() File "/opt/python/3.6.2/lib/python3.6/multiprocessing/process.py", line 93, in run self._target(*self._args, **self._kwargs) File "/home/travis/build/drallensmith/neat-python/tests/test_distributed.py", line 412, in run_secondary de.start(secondary_wait=3, exit_on_stop=True) File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 414, in start self._secondary_loop(reconnect_max_time=reconnect_max_time) File "/home/travis/build/drallensmith/neat-python/neat/distributed.py", line 616, in _secondary_loop self.outqueue.put(res) File "", line 2, in put File "/opt/python/3.6.2/lib/python3.6/multiprocessing/managers.py", line 772, in _callmethod raise convert_to_error(kind, result) AssertionError ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 08:58:15 2017 From: report at bugs.python.org (drallensmith) Date: Thu, 10 Aug 2017 12:58:15 +0000 Subject: [issue31169] convert_to_error assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502369895.03.0.916011821853.issue31169@psf.upfronthosting.co.za> drallensmith added the comment: The section in question is: def convert_to_error(kind, result): if kind == '#ERROR': return result elif kind == '#TRACEBACK': assert type(result) is str return RemoteError(result) elif kind == '#UNSERIALIZABLE': assert type(result) is str return RemoteError('Unserializable message: %s\n' % result) else: return ValueError('Unrecognized message type') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 09:05:08 2017 From: report at bugs.python.org (Tarmo Randel) Date: Thu, 10 Aug 2017 13:05:08 +0000 Subject: [issue31175] Exception while extracting file from ZIP with non-matching file name in central directory Message-ID: <1502370308.59.0.330372218363.issue31175@psf.upfronthosting.co.za> New submission from Tarmo Randel: The problem: miscreants are modifying ZIP file header parts so, that Python based automated analysis tools are unable to process the contents of the ZIP file but intended clients are able to open the file and extract the possibly malicious contents. Github pull request contains patch addressing the issue so that developer can make conscious decision to allow extraction process to complete. Quite important feature for security researchers. ---------- components: Library (Lib) files: ZIP_filename_confusion.pdf messages: 300080 nosy: zyxtarmo priority: normal pull_requests: 3094 severity: normal status: open title: Exception while extracting file from ZIP with non-matching file name in central directory type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file47073/ZIP_filename_confusion.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 09:08:08 2017 From: report at bugs.python.org (Tarmo Randel) Date: Thu, 10 Aug 2017 13:08:08 +0000 Subject: [issue31175] Exception while extracting file from ZIP with non-matching file name in central directory In-Reply-To: <1502370308.59.0.330372218363.issue31175@psf.upfronthosting.co.za> Message-ID: <1502370488.69.0.99212805907.issue31175@psf.upfronthosting.co.za> Tarmo Randel added the comment: Proposed patch ---------- keywords: +patch Added file: http://bugs.python.org/file47074/zipfile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 09:24:11 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Aug 2017 13:24:11 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1502371451.35.0.501210688544.issue31148@psf.upfronthosting.co.za> Steve Dower added the comment: Okay, if that's the way you want to go. Be aware that the old MSI code is gone though, so rebuilding it will not be trivial. Though if you do, there are a few people who would find it more convenient, so you may be able to enlist help maintaining it (we didn't get any offers of help, just requests for free work, so you may not get it either...) If you're having trouble with a range of installers, there's a process you can run to reset your security policy, which is what I'd suggest doing. I'd have to find the details for you, but it basically resets permissions on everything. Doesn't delete any files, but may help with this problem. Let me know if you'd like me to find the details (requires Windows Pro IIRC, at least pre-Win 10). ---------- resolution: -> works for me stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 09:28:01 2017 From: report at bugs.python.org (twisteroid ambassador) Date: Thu, 10 Aug 2017 13:28:01 +0000 Subject: [issue31176] Is a UDP transport also a ReadTransport/WriteTransport? Message-ID: <1502371681.86.0.869371272399.issue31176@psf.upfronthosting.co.za> New submission from twisteroid ambassador: In docs / Library Reference / asyncio / Transports and Protocols, it is mentioned that "asyncio currently implements transports for TCP, UDP, SSL, and subprocess pipes. The methods available on a transport depend on the transport?s kind." It also lists methods available on a BaseTransport, ReadTransport, WriteTransport, DatagramTransport and BaseSubprocessTransport. However, the docs does not explain which transports have methods from which base classes, or in other words which base classes each concrete transport class inherits from. And this may not be obvious: for example, a UDP transport certainly is a DatagramTransport, but is it also a ReadTransport, or a WriteTransport? (I feel like the answer is "no it isn't", but there are plenty of conflicting evidence. The docs show that WriteTransport has write_eof() and can_write_eof() -- methods clearly geared towards stream-like transports, and it duplicates abort() from DatagramTransport, so it would seem like WriteTransport and DatagramTransport are mutually exclusive. On the other hand, the default concrete implementation of _SelectorDatagramTransport actually inherits from Transport which inherits from both ReadTransport and WriteTransport, yet it does not inherit from DatagramTransport; As a result _SelectorDatagramTransport has all the methods from ReadTransport and WriteTransport, but many of them raise NotImplemented. This is why I'm asking this question in the first place: I found that the transport object I got from create_datagram_endpoint() has both pause_reading() and resume_reading() methods that raise NotImplemented, and thought that perhaps some event loop implementations would have these methods working, and I should try to use them. And before you say "UDP doesn't do flow control", asyncio actually does provide flow control for UDP on the writing end: see https://www.mail-archive.com/python-tulip at googlegroups.com/msg00532.html So it's not preposterous that there might be flow control on the reading end as well.) I think it would be nice if the documentation can state the methods implemented for each type of transport, as the designers of Python intended, so there's a clear expectation of what methods will / should be available across different implementations of event loops and transports. Something along the lines of "The methods available on a transport depend on the transport?s kind: TCP transports support methods declared in BaseTransport, ReadTransport and WriteTransport below, etc." ---------- assignee: docs at python components: Documentation, asyncio messages: 300083 nosy: docs at python, twisteroid ambassador, yselivanov priority: normal severity: normal status: open title: Is a UDP transport also a ReadTransport/WriteTransport? type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 09:28:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 13:28:19 +0000 Subject: [issue31151] test_socketserver: Warning -- reap_children() reaped child process In-Reply-To: <1502239239.94.0.0719119279673.issue31151@psf.upfronthosting.co.za> Message-ID: <1502371699.12.0.905226496184.issue31151@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset aa8ec34ad52bb3b274ce91169e1bc4a598655049 by Victor Stinner in branch 'master': bpo-31151: Add socketserver.ForkingMixIn.server_close() (#3057) https://github.com/python/cpython/commit/aa8ec34ad52bb3b274ce91169e1bc4a598655049 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 09:29:37 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Aug 2017 13:29:37 +0000 Subject: [issue31172] Py_Main() is totally broken on Visual Studio 2017 In-Reply-To: <1502349831.97.0.859885233288.issue31172@psf.upfronthosting.co.za> Message-ID: <1502371777.73.0.408117069841.issue31172@psf.upfronthosting.co.za> Steve Dower added the comment: Your final file layout needs to match any of our standard ones. On my phone now so I'm not going to write them all out (will do it later if you need), but you need to put your .exe in the same location as the python.exe for the runtime you're using (or move the runtime around your exe). Also look at the embeddable zip package. It's meant for this (though you still need a full install to build). I do this all the time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 09:29:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 13:29:53 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502371793.51.0.134699643179.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: bpo-31151 fixed test_socketserver. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 09:41:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 13:41:11 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502372471.55.0.535611928683.issue31160@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 09:49:42 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 10 Aug 2017 13:49:42 +0000 Subject: [issue31169] convert_to_error assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502372982.56.0.0368022381357.issue31169@psf.upfronthosting.co.za> Berker Peksag added the comment: For those who want to triage this issue, the test case can be found at https://github.com/drallensmith/neat-python/blob/e4aeb39eccefbd73babfb61bb13fd23feef2a102/tests/test_distributed.py#L234 ---------- nosy: +berker.peksag, davin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:00:07 2017 From: report at bugs.python.org (David K. Hess) Date: Thu, 10 Aug 2017 14:00:07 +0000 Subject: [issue4963] mimetypes.guess_extension result changes after mimetypes.init() In-Reply-To: <1232107494.83.0.0570958889295.issue4963@psf.upfronthosting.co.za> Message-ID: <1502373607.64.0.659649408118.issue4963@psf.upfronthosting.co.za> Changes by David K. Hess : ---------- pull_requests: +3096 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:02:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 14:02:02 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502373722.96.0.333887867999.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 719a15b32587de6c4add4385ee3f84a20711340f by Victor Stinner in branch '3.6': [3.6] bpo-31160: Backport reap_children() fixes from master to 3.6 (#3060) https://github.com/python/cpython/commit/719a15b32587de6c4add4385ee3f84a20711340f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:09:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 14:09:58 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502374198.49.0.807367769408.issue31160@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3097 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:11:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 14:11:32 +0000 Subject: [issue31133] [2.7] PCbuild/pcbuild.sln of Python 2.7 cannot be open by Visual Studio 2010 In-Reply-To: <1502126750.5.0.768313426275.issue31133@psf.upfronthosting.co.za> Message-ID: <1502374292.21.0.729391541912.issue31133@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 693790817a93701093ef93333be7abbb0d6d4309 by Victor Stinner in branch '2.7': PCbuild: downgrade pcbuild.sln to support VS 2010 (#3031) https://github.com/python/cpython/commit/693790817a93701093ef93333be7abbb0d6d4309 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:12:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 14:12:00 +0000 Subject: [issue31133] [2.7] PCbuild/pcbuild.sln of Python 2.7 cannot be open by Visual Studio 2010 In-Reply-To: <1502126750.5.0.768313426275.issue31133@psf.upfronthosting.co.za> Message-ID: <1502374320.83.0.582785099025.issue31133@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:15:44 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Aug 2017 14:15:44 +0000 Subject: [issue31159] Doc: Language switch can't switch on specific cases In-Reply-To: <1502278726.47.0.617689885912.issue31159@psf.upfronthosting.co.za> Message-ID: <1502374544.1.0.971712933877.issue31159@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3098 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:16:29 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 10 Aug 2017 14:16:29 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502374589.78.0.139387501631.issue31149@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3099 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:22:19 2017 From: report at bugs.python.org (Hmvp) Date: Thu, 10 Aug 2017 14:22:19 +0000 Subject: [issue31177] unittest mock's reset_mock throws an error when an attribute has been deleted Message-ID: <1502374939.75.0.688742031254.issue31177@psf.upfronthosting.co.za> New submission from Hmvp: When using a mock and deleting a attribute reset_mock cannot be used anymore since it tries to call reset_mock on the _deleted sentinel value. Reproduction path: ``` from unittest.mock import MagicMock mock = MagicMock() mock.a = 'test' del mock.a mock.reset_mock() ``` Gives: ``` Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.5/unittest/mock.py", line 544, in reset_mock child.reset_mock(visited) AttributeError: '_SentinelObject' object has no attribute 'reset_mock' ``` Expected result: mock is reset without throwing an exception and the 'a' attribute is no longer in a deleted state Only checked 3.5 and current master if bug is present ---------- components: Library (Lib) messages: 300090 nosy: hmvp priority: normal severity: normal status: open title: unittest mock's reset_mock throws an error when an attribute has been deleted type: behavior versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:23:23 2017 From: report at bugs.python.org (David K. Hess) Date: Thu, 10 Aug 2017 14:23:23 +0000 Subject: [issue4963] mimetypes.guess_extension result changes after mimetypes.init() In-Reply-To: <1232107494.83.0.0570958889295.issue4963@psf.upfronthosting.co.za> Message-ID: <1502375003.12.0.166239524454.issue4963@psf.upfronthosting.co.za> David K. Hess added the comment: FYI, PR opened: https://github.com/python/cpython/pull/3062 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:45:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 14:45:42 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502376342.66.0.897694355641.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 1247e2cda514d7a73187e0b53ec8c35d87a34a84 by Victor Stinner in branch '2.7': [2.7] bpo-31160: Backport reap_children fixes from master to 2.7 (#3063) https://github.com/python/cpython/commit/1247e2cda514d7a73187e0b53ec8c35d87a34a84 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:54:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 14:54:28 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502376868.94.0.365631346633.issue31149@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e8e7fba0b24582959feca9c31f2a72fc0251f83d by Victor Stinner (Julien Palard) in branch '3.6': bpo-31159: fix language switch regex on unknown yet built languages. ? (#3051) https://github.com/python/cpython/commit/e8e7fba0b24582959feca9c31f2a72fc0251f83d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 10:54:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 14:54:29 +0000 Subject: [issue31159] Doc: Language switch can't switch on specific cases In-Reply-To: <1502278726.47.0.617689885912.issue31159@psf.upfronthosting.co.za> Message-ID: <1502376869.04.0.0281832563025.issue31159@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e8e7fba0b24582959feca9c31f2a72fc0251f83d by Victor Stinner (Julien Palard) in branch '3.6': bpo-31159: fix language switch regex on unknown yet built languages. ? (#3051) https://github.com/python/cpython/commit/e8e7fba0b24582959feca9c31f2a72fc0251f83d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:00:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:00:06 +0000 Subject: [issue31164] test_functools: test_recursive_pickle() stack overflow on x86 Gentoo Refleaks 3.x In-Reply-To: <1502294023.01.0.985500913327.issue31164@psf.upfronthosting.co.za> Message-ID: <1502377206.2.0.176611366106.issue31164@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:00:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:00:44 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502377244.56.0.218810867571.issue31149@psf.upfronthosting.co.za> STINNER Victor added the comment: I reopen the issue: backport to 2.7 is still needed. ---------- status: closed -> open versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:03:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:03:03 +0000 Subject: [issue31135] [2.7] test_ttk_guionly doesn't destroy all widgets on Python 2.7 In-Reply-To: <1502153199.22.0.664616149528.issue31135@psf.upfronthosting.co.za> Message-ID: <1502377383.66.0.156664095434.issue31135@psf.upfronthosting.co.za> STINNER Victor added the comment: Copy of interesting comments: https://github.com/python/cpython/pull/3025 serhiy-storchaka: "Parent's destroy() now is called even if this destroy() already was called. I.e. it can be called twice." haypo: "Yes, it's a deliberate choice. All other ttk widgets now have the same behaviour." -- Ok, the bug is now fixed in 2.7, 3.6 and 3.7 (master) branches. I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:03:53 2017 From: report at bugs.python.org (drallensmith) Date: Thu, 10 Aug 2017 15:03:53 +0000 Subject: [issue31169] convert_to_error assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502377433.63.0.223989819668.issue31169@psf.upfronthosting.co.za> drallensmith added the comment: Well, it looks like I was incorrect in where the AssertionError is coming from - the attached patches, while an improvement IMO on the current code, did not result in a change in behavior. Unfortunately, the combination of bare asserts (with no messages) with remote raising of errors makes it rather hard to debug - I will see if pdb will do it, but given that it's involving a subprocess I will be very impressed if it does. (Coverage.py frequently misses lines that are only executed in subprocesses, for instance.) ---------- keywords: +patch Added file: http://bugs.python.org/file47075/managers-3.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:04:40 2017 From: report at bugs.python.org (drallensmith) Date: Thu, 10 Aug 2017 15:04:40 +0000 Subject: [issue31169] convert_to_error assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502377480.41.0.50292200205.issue31169@psf.upfronthosting.co.za> drallensmith added the comment: Here is the patch for 2.7. ---------- Added file: http://bugs.python.org/file47076/managers-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:04:54 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Aug 2017 15:04:54 +0000 Subject: [issue31143] lib2to3 requires source files for fixes In-Reply-To: <1502199820.45.0.266789530898.issue31143@psf.upfronthosting.co.za> Message-ID: <1502377494.76.0.900409945861.issue31143@psf.upfronthosting.co.za> Steve Dower added the comment: It also breaks .zip file distribution, which I'm fairly sure we do explicitly support by virtue of having "python36.zip" in sys.path by default. And the ".pyc-only in a zip file" distribution is *totally* busted :) (and also officially released for Windows...) I'm dragging in an importlib expert to the discussion, probably against his will, since this is really a problem of "how do I programmatically discover what I can import without using os.listdir()". Hopefully Brett can answer that question and we can come up with a patch. ---------- nosy: +brett.cannon, steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:08:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:08:53 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1502377733.64.0.649657335303.issue26762@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3101 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:20:58 2017 From: report at bugs.python.org (drallensmith) Date: Thu, 10 Aug 2017 15:20:58 +0000 Subject: [issue31169] convert_to_error assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502378458.78.0.852472753919.issue31169@psf.upfronthosting.co.za> drallensmith added the comment: pdb is not currently working for debugging a subprocess. I suspect I will need to put "import pdb" and "pdb.set_trace()" into managers.py. BTW, a thank-you to berker.peksag; while the link is present in Travis, I should still have put it in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:29:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:29:44 +0000 Subject: [issue31178] [EASY] subprocess: TypeError: can't concat str to bytes, in _execute_child() Message-ID: <1502378984.02.0.493180637871.issue31178@psf.upfronthosting.co.za> New submission from STINNER Victor: Lib/subprocess.py contains the following code: try: exception_name, hex_errno, err_msg = ( errpipe_data.split(b':', 2)) except ValueError: exception_name = b'SubprocessError' hex_errno = b'0' err_msg = (b'Bad exception data from child: ' + repr(errpipe_data)) b'...' + repr() is wrong: it raises a "TypeError: can't concat str to bytes" when python3 is run with -bb. Example with attached subprocess_bug.patch: haypo at selma$ ./python -bb -m test -v test_subprocess -m test_invalid_args (...) ====================================================================== ERROR: test_invalid_args (test.test_subprocess.ContextManagerTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/haypo/prog/python/master/Lib/subprocess.py", line 1309, in _execute_child errpipe_data.split(b':', 1)) ValueError: not enough values to unpack (expected 3, got 2) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/haypo/prog/python/master/Lib/test/test_subprocess.py", line 2880, in test_invalid_args stderr=subprocess.PIPE) as proc: File "/home/haypo/prog/python/master/Lib/subprocess.py", line 709, in __init__ restore_signals, start_new_session) File "/home/haypo/prog/python/master/Lib/subprocess.py", line 1314, in _execute_child repr(errpipe_data)) TypeError: can't concat str to bytes IMHO err_msg should be decoded using err_msg.decode(errors="surrogatepass") and then use 'Bad ...: %s' % err_msg. It would need to add an "else:" block to the try/except to do the err_msg.decode(errors="surrogatepass") when no error is raised. Well, something like that :-) ---------- components: Library (Lib) files: subprocess_bug.patch keywords: easy, patch messages: 300102 nosy: haypo priority: normal severity: normal status: open title: [EASY] subprocess: TypeError: can't concat str to bytes, in _execute_child() versions: Python 3.7 Added file: http://bugs.python.org/file47077/subprocess_bug.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:34:40 2017 From: report at bugs.python.org (drallensmith) Date: Thu, 10 Aug 2017 15:34:40 +0000 Subject: [issue31169] Unknown-source assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502379280.14.0.922802157965.issue31169@psf.upfronthosting.co.za> drallensmith added the comment: I've updated the title to be more accurate. On second thought, putting in a pdb.set_trace() would require that I know where the assertion failure is taking place... sigh. BTW, is there some way to edit earlier messages? I am used to github in that regard... ---------- title: convert_to_error assertion failure in multiprocessing/managers.py -> Unknown-source assertion failure in multiprocessing/managers.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:36:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:36:53 +0000 Subject: [issue26762] test_multiprocessing_spawn leaves processes running in background In-Reply-To: <1460693065.24.0.946570360611.issue26762@psf.upfronthosting.co.za> Message-ID: <1502379413.7.0.752225609068.issue26762@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 957d0e9b59bd27ca7c473560634d8b5dbe66338c by Victor Stinner in branch 'master': bpo-26762: _test_multiprocessing reports dangling (#3064) https://github.com/python/cpython/commit/957d0e9b59bd27ca7c473560634d8b5dbe66338c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:38:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:38:19 +0000 Subject: [issue31010] test_socketserver.test_ForkingTCPServer(): threading_cleanup() and reap_children() warnings on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1500888073.5.0.311417517305.issue31010@psf.upfronthosting.co.za> Message-ID: <1502379499.84.0.0295845291225.issue31010@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not 100% sure, but it looks like a duplicate of bpo-31151. ---------- resolution: -> duplicate superseder: -> test_socketserver: Warning -- reap_children() reaped child process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:38:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:38:29 +0000 Subject: [issue31010] test_socketserver.test_ForkingTCPServer(): threading_cleanup() and reap_children() warnings on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1500888073.5.0.311417517305.issue31010@psf.upfronthosting.co.za> Message-ID: <1502379509.22.0.816982293279.issue31010@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:38:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:38:47 +0000 Subject: [issue31151] test_socketserver: Warning -- reap_children() reaped child process In-Reply-To: <1502239239.94.0.0719119279673.issue31151@psf.upfronthosting.co.za> Message-ID: <1502379527.33.0.833801899449.issue31151@psf.upfronthosting.co.za> STINNER Victor added the comment: bpo-31010 has been marked as a duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:41:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:41:54 +0000 Subject: [issue31008] FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) on x86 Windows7 3.x In-Reply-To: <1500887505.08.0.647481409973.issue31008@psf.upfronthosting.co.za> Message-ID: <1502379714.48.0.56378181385.issue31008@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3102 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:43:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:43:02 +0000 Subject: [issue30830] test_logging leaks a "dangling" threads on FreeBSD In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1502379782.89.0.229856609687.issue30830@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: HTTPHandlerTest of test_logging leaks a "dangling" thread on AMD64 FreeBSD CURRENT Non-Debug 3.x -> test_logging leaks a "dangling" threads on FreeBSD _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:43:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:43:31 +0000 Subject: [issue31041] test_handle_called_with_mp_queue() of test_logging: threading_cleanup() failed to cleanup, on AMD64 FreeBSD 10.x Shared 3.x In-Reply-To: <1501030445.94.0.683702784342.issue31041@psf.upfronthosting.co.za> Message-ID: <1502379811.4.0.448640777447.issue31041@psf.upfronthosting.co.za> STINNER Victor added the comment: Let's mark this issue as a duplicate of bpo-30830. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_logging leaks a "dangling" threads on FreeBSD _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:44:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 15:44:34 +0000 Subject: [issue30830] test_logging leaks a "dangling" threads on FreeBSD In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1502379874.15.0.124854505662.issue30830@psf.upfronthosting.co.za> STINNER Victor added the comment: bpo-31041 has been marked as a duplicate of this issue. Extracts: test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 4 sec (count: 0, dangling: 1) and test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 3 sec (count: 0, dangling: 1) -- "Maybe threading_cleanup() should call support.gc_collect()." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 11:48:51 2017 From: report at bugs.python.org (Martijn Pieters) Date: Thu, 10 Aug 2017 15:48:51 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1502380131.26.0.0669473377278.issue31161@psf.upfronthosting.co.za> Martijn Pieters added the comment: It's confusing; a syntax error reports on the first error found, not two errors at once. The TabError or IndentationError exception detail message itself is lost (it should be "IndentationError: Improper mixture of spaces and tabs." or "TabError: Improper indentation.", respectively). So you end up with an end-user scratching their head, the two parts of the message make no sense together. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 13:36:06 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Aug 2017 17:36:06 +0000 Subject: [issue31168] IDLE hangs with absurdly long __repr__s In-Reply-To: <1502330685.65.0.748621081688.issue31168@psf.upfronthosting.co.za> Message-ID: <1502386566.72.0.479912587935.issue31168@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am quite aware that tk text widgets (and probably other widgets) have line-length limitations. Which issue this duplicates depends on what action you propose. #28840 proposes addressing limits in the docs. #1442493 is about code changes. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 14:00:08 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Aug 2017 18:00:08 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1502388008.54.0.90539968132.issue31148@psf.upfronthosting.co.za> R. David Murray added the comment: Steve, when we changed installers was that when we also fixed the security/permissions problems with the install dir? If permissions are the issue the OP's problem may have nothing to do with it not being msi. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 15:17:41 2017 From: report at bugs.python.org (Ammar Askar) Date: Thu, 10 Aug 2017 19:17:41 +0000 Subject: [issue31178] [EASY] subprocess: TypeError: can't concat str to bytes, in _execute_child() In-Reply-To: <1502378984.02.0.493180637871.issue31178@psf.upfronthosting.co.za> Message-ID: <1502392661.55.0.361679203915.issue31178@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +3103 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 15:17:50 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 10 Aug 2017 19:17:50 +0000 Subject: [issue31143] lib2to3 requires source files for fixes In-Reply-To: <1502199820.45.0.266789530898.issue31143@psf.upfronthosting.co.za> Message-ID: <1502392670.11.0.179430202964.issue31143@psf.upfronthosting.co.za> Brett Cannon added the comment: Simplest way is to do https://docs.python.org/3/library/importlib.html#importlib.util.find_spec and see if a spec can be found for the module in question. That will do the search for the module but it won't load it. This does dictate that you know the name of the module upfront, though. If you want more of a "list all modules since I don't know what I want" then you're out of luck until I develop the API (maybe 3.7?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 16:40:05 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 10 Aug 2017 20:40:05 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1502397605.62.0.423487215325.issue31148@psf.upfronthosting.co.za> Steve Dower added the comment: > when we changed installers was that when we also fixed the security/permissions problems with the install dir Yes, but the permissions issue here isn't the install directory - it is probably the TEMP directory or some other system restriction. It's basically impossible to tell from the logs, and I don't even know where to start asking for configuration settings to see what may be wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 16:54:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Aug 2017 20:54:39 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab In-Reply-To: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> Message-ID: <1502398479.82.0.476975833951.issue31002@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am not sure I agree with all your suggested name changes. But I am looking as more substantive issues first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 16:57:45 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Aug 2017 20:57:45 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502398665.18.0.286353687577.issue31130@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Victor: Something seems to have changed in the last few days. When I merged, both specific classes python -m test -R 3:3 -u gui -v test_idle -m idlelib.idle_test.test_configdialog.FontPageTest.* and the module as a whole passed. python -m test -R 3:3 -u gui -v test_idle -m idlelib.idle_test.test_configdialog.*.* Today, not having touched configdialog or test_configdialog, test_configdialog as a whole passes but FontPageTest, IndentTest, and GenPageTest fail with test_idle leaked [1, 1, 1, 1] memory blocks, sum=4 (Tested individually, VarTraceTest and the empty HighlightTest pass.) I presume that cleanUpModule still runs with the restriction. Could any of your other recent changes to regrtest have introduced a spurious 1 block error when tests are filtered? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 17:28:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 21:28:13 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502400493.78.0.531235738135.issue31130@psf.upfronthosting.co.za> STINNER Victor added the comment: > test_idle leaked [1, 1, 1, 1] memory blocks, sum=4 While reference leaks are more or less stable, the check on memory blocks is fragile. I'm unable to reproduce your issue on Linux. I tested "./python -m test -R 3:3 -u gui -v test_idle". If you have a reproductible failure, please open a new issue since this one is closed. If you consider that it's a recent regression, you can go back in history using git checkout , or even git bisect. If you open a new issue, you may want to use "python -m test.bisect ..." to identify which test leaks memory blocks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 17:31:33 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 10 Aug 2017 21:31:33 +0000 Subject: [issue31179] Speed-up dict.copy() up to 5.5 times. Message-ID: <1502400693.03.0.6389481443.issue31179@psf.upfronthosting.co.za> New submission from Yury Selivanov: It's possible to significantly improve performance of shallow dict copy. Currently, PyDict_Copy creates a new empty dict object and then inserts key/values into it one by one. My idea is to simply memcpy the whole keys/items region and do the necessary increfs after it. This works just fine for non-key-sharing dicts. With the following simple microbenchmark: import time N = 1000000 for size in [0, 1, 10, 20, 50, 100, 500, 1000]: d = dict([(str(i), i) for i in range(size)]) t = time.monotonic() for i in range(N): d.copy() e = time.monotonic() - t print(f'dict(size={size}).copy() x {N} times:\t {e:.4f}') Output for 3.7 master: dict(size=0).copy() x 1000000 times: 0.1299 dict(size=1).copy() x 1000000 times: 0.1499 dict(size=10).copy() x 1000000 times: 0.3758 dict(size=20).copy() x 1000000 times: 0.7722 dict(size=50).copy() x 1000000 times: 1.2784 dict(size=100).copy() x 1000000 times: 2.5128 dict(size=500).copy() x 1000000 times: 12.8968 dict(size=1000).copy() x 1000000 times: 25.4276 Output for patched 3.7: dict(size=0).copy() x 1000000 times: 0.1352 dict(size=1).copy() x 1000000 times: 0.1285 dict(size=10).copy() x 1000000 times: 0.1632 dict(size=20).copy() x 1000000 times: 0.3076 dict(size=50).copy() x 1000000 times: 0.3663 dict(size=100).copy() x 1000000 times: 0.5140 dict(size=500).copy() x 1000000 times: 2.3419 dict(size=1000).copy() x 1000000 times: 4.6176 ---------- components: Interpreter Core messages: 300117 nosy: haypo, inada.naoki, yselivanov priority: normal severity: normal stage: patch review status: open title: Speed-up dict.copy() up to 5.5 times. type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 17:33:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 21:33:31 +0000 Subject: [issue31069] test_multiprocessing_spawn leaked a process on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502400811.62.0.0454142875163.issue31069@psf.upfronthosting.co.za> STINNER Victor added the comment: With the commit 957d0e9b59bd27ca7c473560634d8b5dbe66338c (bpo-26762), _test_multiprocessing now fails with ENV_CHANGED if a warning is emitted. It allowed to catch a warning on x86-64 El Capitan 3.x: http://buildbot.python.org/all/builders/x86-64%20El%20Capitan%203.x/builds/581/steps/test/logs/stdio test_enable_logging (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test_level (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test_rapid_restart (test.test_multiprocessing_spawn.WithProcessesTestManagerRestart) ... ok Warning -- Dangling processes: {} test_access (test.test_multiprocessing_spawn.WithProcessesTestPicklingConnections) ... ok test_pickling (test.test_multiprocessing_spawn.WithProcessesTestPicklingConnections) ... ok test_boundaries (test.test_multiprocessing_spawn.WithProcessesTestPoll) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 17:33:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 21:33:45 +0000 Subject: [issue31069] test_multiprocessing_spawn leaked a dangling process In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502400825.27.0.76067883603.issue31069@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_multiprocessing_spawn leaked a process on AMD64 Windows8.1 Refleaks 3.x -> test_multiprocessing_spawn leaked a dangling process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 17:35:14 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 10 Aug 2017 21:35:14 +0000 Subject: [issue31179] Speed-up dict.copy() up to 5.5 times. In-Reply-To: <1502400693.03.0.6389481443.issue31179@psf.upfronthosting.co.za> Message-ID: <1502400914.3.0.434926594124.issue31179@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- pull_requests: +3104 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 17:36:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 21:36:15 +0000 Subject: [issue31180] test_multiprocessing_spawn hangs randomly on x86 Windows7 3.6 Message-ID: <1502400975.07.0.689018470672.issue31180@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows7%203.6/builds/570/steps/test/logs/stdio 1:21:25 [402/405] test_frame passed -- running: test_multiprocessing_spawn (2805 sec) 1:21:32 [403/405] test_hash passed -- running: test_multiprocessing_spawn (2811 sec) 1:21:33 [404/405] test_raise passed -- running: test_multiprocessing_spawn (2812 sec) command timed out: 1200 seconds without output running ['Tools\\buildbot\\test.bat', '-j2', '--timeout', '900'], attempting to kill program finished with exit code 1 elapsedTime=6104.779000 ---------- components: Tests messages: 300119 nosy: haypo priority: normal severity: normal status: open title: test_multiprocessing_spawn hangs randomly on x86 Windows7 3.6 versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 17:43:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 21:43:02 +0000 Subject: [issue31179] Speed-up dict.copy() up to 5.5 times. In-Reply-To: <1502400693.03.0.6389481443.issue31179@psf.upfronthosting.co.za> Message-ID: <1502401382.47.0.942281203092.issue31179@psf.upfronthosting.co.za> STINNER Victor added the comment: > PyDict_Copy creates a new empty dict object and then inserts key/values into it one by one. Why not creating a "preallocated" dict in that case? _PyDict_NewPresized() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 17:43:17 2017 From: report at bugs.python.org (lchin) Date: Thu, 10 Aug 2017 21:43:17 +0000 Subject: [issue31181] Segfault in gcmodule.c:360 visit_decref (PyObject_IS_GC(op)) Message-ID: <1502401397.09.0.667650470232.issue31181@psf.upfronthosting.co.za> New submission from lchin: When running a python script with YML data as input, it stopped with segmentation fault /home/appuser/pyETL/tableTrimmer.py /home/appuser/pyETL/csidPyLib/etlConfig/ip4AuditSync.yml (gdb) bt Core was generated by `python2.7 tableTrimmer.py csidPyLib/etlConfig/ip4AuditSync.yml'. Program terminated with signal 11, Segmentation fault. #0 visit_decref (op=0x7f08c1afb320, data=0x0) at Modules/gcmodule.c:360 360 if (PyObject_IS_GC(op)) { ---------- components: Interpreter Core messages: 300121 nosy: lchin priority: normal severity: normal status: open title: Segfault in gcmodule.c:360 visit_decref (PyObject_IS_GC(op)) type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 17:43:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 21:43:54 +0000 Subject: [issue31069] test_multiprocessing_spawn leaked a dangling process In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502401434.61.0.983815147982.issue31069@psf.upfronthosting.co.za> STINNER Victor added the comment: Another warning on x86 Tiger 3.x: http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/1043/steps/test/logs/stdio test_rapid_restart (test.test_multiprocessing_forkserver.WithProcessesTestManagerRestart) ... ok Warning -- Dangling processes: {} test_access (test.test_multiprocessing_forkserver.WithProcessesTestPicklingConnections) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 17:46:08 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 10 Aug 2017 21:46:08 +0000 Subject: [issue31179] Speed-up dict.copy() up to 5.5 times. In-Reply-To: <1502400693.03.0.6389481443.issue31179@psf.upfronthosting.co.za> Message-ID: <1502401568.1.0.958545967471.issue31179@psf.upfronthosting.co.za> Yury Selivanov added the comment: >> PyDict_Copy creates a new empty dict object and then inserts key/values into it one by one. > Why not creating a "preallocated" dict in that case? _PyDict_NewPresized() I don't think it's related to the proposed patch. Please take a look at the PR. `_PyDict_NewPresized` and inserting entries one by one will not be faster than a `memcpy`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 17:54:59 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Aug 2017 21:54:59 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab In-Reply-To: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> Message-ID: <1502402099.69.0.315154106383.issue31002@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have thought about factoring out common test code into helper functions either within test_configdialog or in a new module. One example: simulate a click on a listbox, with common before and after code. Another: Testing the group of selection widgets on both theme and keys pages. (If I were not planning to replace this group, we could factor out a SelectionFrame and put an instance on each page.) We might do some such refactoring after this, before HighPageTest. Keep notes on redundancies you notice that might be candidates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 18:00:39 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 10 Aug 2017 22:00:39 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502402439.96.0.541712845812.issue31130@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My message was most a heads-up. As I said, I only get the 1 block leak with a micro test of a class or method. It is possible that even that is Windows-specific. As long as you only care that test_idle not leak, I don't care about this either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 18:58:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 22:58:52 +0000 Subject: [issue31130] test_idle: idlelib.configdialog leaks references In-Reply-To: <1502097887.03.0.529765316852.issue31130@psf.upfronthosting.co.za> Message-ID: <1502405932.09.0.615528001021.issue31130@psf.upfronthosting.co.za> STINNER Victor added the comment: > As I said, I only get the 1 block leak with a micro test of a class or method. Yeah, again, the memory block check is fragile. It might be an legit internal cache filled for good reasons. It can be a free list. It can be a lot of things. It's really hard to track such very tiny memory allocation. "leaked [1, 1, 1, 1] memory blocks" can be a false alarm, it's not big. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:23:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:23:24 +0000 Subject: [issue31008] FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) on x86 Windows7 3.x In-Reply-To: <1500887505.08.0.647481409973.issue31008@psf.upfronthosting.co.za> Message-ID: <1502407404.39.0.857731306223.issue31008@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5659a72f487579be76335c09c8ba8b2f1800adde by Victor Stinner in branch 'master': bpo-31008: Fix asyncio test_wait_for_handle on Windows (#3065) https://github.com/python/cpython/commit/5659a72f487579be76335c09c8ba8b2f1800adde ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:23:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:23:57 +0000 Subject: [issue31008] FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) on x86 Windows7 3.x In-Reply-To: <1500887505.08.0.647481409973.issue31008@psf.upfronthosting.co.za> Message-ID: <1502407437.07.0.155497332291.issue31008@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3105 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:34:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:34:58 +0000 Subject: [issue28087] macOS 12 poll syscall returns prematurely In-Reply-To: <1473637008.93.0.918549766701.issue28087@psf.upfronthosting.co.za> Message-ID: <1502408098.5.0.453470391912.issue28087@psf.upfronthosting.co.za> STINNER Victor added the comment: What is the status of this issue? Is there still something to do? If you ask me my opinion, I would just suggest to remove select.poll() on macOS to stop to have to bother with poll() bugs which only trigger at runtime :-/ ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:44:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:44:35 +0000 Subject: [issue30030] Simplify _RandomNameSequence In-Reply-To: <1491815858.77.0.234884449004.issue30030@psf.upfronthosting.co.za> Message-ID: <1502408675.86.0.441954646307.issue30030@psf.upfronthosting.co.za> STINNER Victor added the comment: No consensus was found on this issue how to "simplify" _RandomNameSequence, so I close the issue. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:45:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:45:29 +0000 Subject: [issue29736] Optimize builtin types constructor In-Reply-To: <1488812174.68.0.707747009021.issue29736@psf.upfronthosting.co.za> Message-ID: <1502408729.47.0.663490539968.issue29736@psf.upfronthosting.co.za> STINNER Victor added the comment: I lost interest in this issue. I closed my PR, now I close this old issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:51:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:51:52 +0000 Subject: [issue30982] AMD64 Windows8.1 Refleaks 3.x: compilation error, cannot open python37_d.dll In-Reply-To: <1500628494.4.0.575498765725.issue30982@psf.upfronthosting.co.za> Message-ID: <1502409112.64.0.324622132893.issue30982@psf.upfronthosting.co.za> STINNER Victor added the comment: The bug is gone. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:52:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:52:15 +0000 Subject: [issue31008] FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests) on x86 Windows7 3.x In-Reply-To: <1500887505.08.0.647481409973.issue31008@psf.upfronthosting.co.za> Message-ID: <1502409135.38.0.831500606021.issue31008@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 270c3c62edd81c14fcdb6a24b4b518a777ec6534 by Victor Stinner in branch '3.6': bpo-31008: Fix asyncio test_wait_for_handle on Windows (#3065) (#3068) https://github.com/python/cpython/commit/270c3c62edd81c14fcdb6a24b4b518a777ec6534 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:54:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:54:39 +0000 Subject: [issue30885] test_subprocess hangs on AMD64 Windows8.1 Refleaks 3.x In-Reply-To: <1499637524.07.0.247905249864.issue30885@psf.upfronthosting.co.za> Message-ID: <1502409279.89.0.324541997162.issue30885@psf.upfronthosting.co.za> STINNER Victor added the comment: Sadly, I didn't see the bug recently, so I just close the issue. Note: Python 3.5 just entered security only fixes stage. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:55:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:55:58 +0000 Subject: [issue30857] test_bsddb3 hangs longer than 37 minutes on x86 Tiger 2.7 In-Reply-To: <1499263525.13.0.741673625602.issue30857@psf.upfronthosting.co.za> Message-ID: <1502409358.3.0.94015127256.issue30857@psf.upfronthosting.co.za> STINNER Victor added the comment: Sadly I didn't see this bug recently, so I just close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:56:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:56:52 +0000 Subject: [issue30855] [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 In-Reply-To: <1499257127.67.0.747001147165.issue30855@psf.upfronthosting.co.za> Message-ID: <1502409412.18.0.947563465449.issue30855@psf.upfronthosting.co.za> STINNER Victor added the comment: Change the Python version to 2.7 only, since Python 3.5 doesn't accept bug fixes anymore (only security fixes). ---------- title: [3.5] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 -> [2.7] test_tk: test_use() of test_tkinter.test_widgets randomly fails with "integer value too large to represent" on with AMD64 Windows8 3.5 versions: +Python 2.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:57:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:57:39 +0000 Subject: [issue31069] test_multiprocessing_spawn leaks a dangling process In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502409459.85.0.70326932111.issue31069@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_multiprocessing_spawn leaked a dangling process -> test_multiprocessing_spawn leaks a dangling process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:58:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:58:04 +0000 Subject: [issue30846] [3.6] test_rapid_restart() of test_multiprocessing_fork fails randomly on AMD64 Debian PGO 3.6 In-Reply-To: <1499166614.41.0.795338423823.issue30846@psf.upfronthosting.co.za> Message-ID: <1502409484.85.0.685072582448.issue30846@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-31069. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 19:58:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Aug 2017 23:58:17 +0000 Subject: [issue31069] test_multiprocessing_spawn leaks a dangling process In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502409497.29.0.931464843389.issue31069@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-30846. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:00:24 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:00:24 +0000 Subject: [issue30845] [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.5 In-Reply-To: <1499163547.99.0.882941259602.issue30845@psf.upfronthosting.co.za> Message-ID: <1502409624.03.0.48287646968.issue30845@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 3.5 doesn't accept bugfixes anymore, so I close this issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:01:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:01:22 +0000 Subject: [issue30834] Warning -- files was modified by test_import, After: ['@test_4852_tmp.pyc'] In-Reply-To: <1499078167.36.0.142114160693.issue30834@psf.upfronthosting.co.za> Message-ID: <1502409682.65.0.258185374663.issue30834@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 3.5 doesn't accept bugfixes anymore, so I close this issue. I never saw this bug on 2.7, 3.6 or master buildbots. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:01:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:01:38 +0000 Subject: [issue30830] test_logging leaks dangling threads on FreeBSD In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1502409698.23.0.43515902496.issue30830@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_logging leaks a "dangling" threads on FreeBSD -> test_logging leaks dangling threads on FreeBSD _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:02:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:02:48 +0000 Subject: [issue30778] test_bsddb3 crash on x86 Windows7 2.7 In-Reply-To: <1498514316.81.0.754509003042.issue30778@psf.upfronthosting.co.za> Message-ID: <1502409768.88.0.991600732085.issue30778@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_bsddb3 crash on x86 Windows XP 2.7 -> test_bsddb3 crash on x86 Windows7 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:02:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:02:57 +0000 Subject: [issue30778] [2.7] test_bsddb3 crash on x86 Windows7 2.7 In-Reply-To: <1498514316.81.0.754509003042.issue30778@psf.upfronthosting.co.za> Message-ID: <1502409777.98.0.834863574839.issue30778@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_bsddb3 crash on x86 Windows7 2.7 -> [2.7] test_bsddb3 crash on x86 Windows7 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:04:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:04:07 +0000 Subject: [issue30683] Enhance doctest support in regrtest --list-cases In-Reply-To: <1497613234.61.0.125565868386.issue30683@psf.upfronthosting.co.za> Message-ID: <1502409847.41.0.114870742852.issue30683@psf.upfronthosting.co.za> STINNER Victor added the comment: I have no idea how to implement this idea. I'm not interested to work on this topic, so I just close this issue. If someone wants to work on this topic, please open a new issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:05:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:05:02 +0000 Subject: [issue30653] test_socket hangs in ThreadableTest.tearDown() on AMD64 FreeBSD CURRENT Debug 3.6 In-Reply-To: <1497353526.11.0.249152453229.issue30653@psf.upfronthosting.co.za> Message-ID: <1502409902.49.0.0685682312094.issue30653@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this bug recently, so I close this issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:06:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:06:11 +0000 Subject: [issue30391] test_threading_handled() and test_threading_not_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1495048024.31.0.0717718671213.issue30391@psf.upfronthosting.co.za> Message-ID: <1502409971.01.0.870626681972.issue30391@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't see this bug recently, I hesitate to close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:06:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:06:53 +0000 Subject: [issue30382] test_stdin_broken_pipe() of test_asyncio failed randomly on AMD64 FreeBSD CURRENT Non-Debug 3.x In-Reply-To: <1494977916.79.0.707715566505.issue30382@psf.upfronthosting.co.za> Message-ID: <1502410013.12.0.0355856782503.issue30382@psf.upfronthosting.co.za> STINNER Victor added the comment: I only saw this bug once since June, so I close this issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:07:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:07:42 +0000 Subject: [issue30369] test_thread crashed with SIGBUS on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1494842055.33.0.428896000784.issue30369@psf.upfronthosting.co.za> Message-ID: <1502410062.71.0.30859032336.issue30369@psf.upfronthosting.co.za> STINNER Victor added the comment: I only saw this bug once, so I close the issue. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:09:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:09:08 +0000 Subject: [issue30229] Closing a BufferedRandom calls lseek() mutliple times In-Reply-To: <1493727473.11.0.059505577548.issue30229@psf.upfronthosting.co.za> Message-ID: <1502410148.69.0.536172040182.issue30229@psf.upfronthosting.co.za> STINNER Victor added the comment: I closed my PR, so I also close this issue. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:09:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:09:45 +0000 Subject: [issue30188] test_nntplib: random EOFError in setUpClass() In-Reply-To: <1493305628.27.0.924756319794.issue30188@psf.upfronthosting.co.za> Message-ID: <1502410185.96.0.890494742658.issue30188@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:11:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:11:47 +0000 Subject: [issue30051] Document that the random module doesn't support fork In-Reply-To: <1491989089.77.0.552733144958.issue30051@psf.upfronthosting.co.za> Message-ID: <1502410307.11.0.681611213277.issue30051@psf.upfronthosting.co.za> STINNER Victor added the comment: Since Raymond and Antoine don't like the documentation idea, I just close my issue. Hopefully, Python 3.7 now reseeds automatically random at fork! ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:12:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:12:50 +0000 Subject: [issue31160] Enhance support.reap_children() In-Reply-To: <1502283003.36.0.514915057261.issue31160@psf.upfronthosting.co.za> Message-ID: <1502410370.4.0.300835636624.issue31160@psf.upfronthosting.co.za> STINNER Victor added the comment: I pushed the most important change: reap_children() now makes tests fail with ENV_CHANGED on warning, so I close the issue. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:15:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:15:21 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process In-Reply-To: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> Message-ID: <1502410521.11.0.0437849001747.issue31173@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3106 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:19:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:19:05 +0000 Subject: [issue30845] [3.5] test_first_completed_some_already_completed() of test_concurrent_futures.ProcessPoolWaitTests: time.sleep() fails with "sleep length must be non-negative" in setUp() on x86 Tiger 3.5 In-Reply-To: <1499163547.99.0.882941259602.issue30845@psf.upfronthosting.co.za> Message-ID: <1502410745.81.0.951402064237.issue30845@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: fixed -> out of date _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:36:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:36:34 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process In-Reply-To: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> Message-ID: <1502411794.48.0.0844303191143.issue31173@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset bc69d00288a0b1f5ef49dcfd60a91c5e9b5b81ae by Victor Stinner in branch '3.6': bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055) (#3070) https://github.com/python/cpython/commit/bc69d00288a0b1f5ef49dcfd60a91c5e9b5b81ae ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:45:46 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:45:46 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process In-Reply-To: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> Message-ID: <1502412346.88.0.943707568862.issue31173@psf.upfronthosting.co.za> STINNER Victor added the comment: Reopen. I forgot Python 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 10 20:45:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 00:45:56 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process In-Reply-To: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> Message-ID: <1502412356.16.0.6039911831.issue31173@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3107 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 00:04:27 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Fri, 11 Aug 2017 04:04:27 +0000 Subject: [issue31143] lib2to3 requires source files for fixes In-Reply-To: <1502199820.45.0.266789530898.issue31143@psf.upfronthosting.co.za> Message-ID: <1502424267.72.0.964378651873.issue31143@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: I'm sorry about entering the discussion without knowing any connection between the original problem and Brett's question, but isn't the latter answered by pkgutil.iter_modules (and pkgutil.walk_packages if needed)? ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 01:20:36 2017 From: report at bugs.python.org (Ammar Askar) Date: Fri, 11 Aug 2017 05:20:36 +0000 Subject: [issue12887] Documenting all SO_* constants in socket module In-Reply-To: <1314987180.49.0.607596056761.issue12887@psf.upfronthosting.co.za> Message-ID: <1502428836.84.0.422380500446.issue12887@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +3108 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 01:20:36 2017 From: report at bugs.python.org (Ammar Askar) Date: Fri, 11 Aug 2017 05:20:36 +0000 Subject: [issue14345] Document socket.SOL_SOCKET In-Reply-To: <1331962982.1.0.381278454339.issue14345@psf.upfronthosting.co.za> Message-ID: <1502428836.96.0.825832533746.issue14345@psf.upfronthosting.co.za> Changes by Ammar Askar : ---------- pull_requests: +3109 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 01:22:58 2017 From: report at bugs.python.org (Ammar Askar) Date: Fri, 11 Aug 2017 05:22:58 +0000 Subject: [issue1732367] Document the constants in the socket module Message-ID: <1502428978.37.0.873760877767.issue1732367@psf.upfronthosting.co.za> Ammar Askar added the comment: I've opened up a PR for this ticket's dependencies. There's some things I'm looking for feedback on there: https://github.com/python/cpython/pull/3072 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 01:34:50 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 11 Aug 2017 05:34:50 +0000 Subject: [issue31033] Add argument to .cancel() of Task and Future In-Reply-To: <1500988900.8.0.188595649246.issue31033@psf.upfronthosting.co.za> Message-ID: <1502429690.06.0.0743875174398.issue31033@psf.upfronthosting.co.za> ???? ????????? added the comment: 1. Yes, specifying argument to cancel in `raise CancelledError` would be perfect 2. specifying argument to `.cancel()` is still actual. 3. Yes, important part of exceptions should not be swallowed (please open separate issue). Also, it will be nice to show which code calls `.cancel()`, not only `sleep()` you menitioned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 01:34:58 2017 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 11 Aug 2017 05:34:58 +0000 Subject: [issue14345] Document socket.SOL_SOCKET In-Reply-To: <1331962982.1.0.381278454339.issue14345@psf.upfronthosting.co.za> Message-ID: <1502429698.69.0.162205856178.issue14345@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 02:06:47 2017 From: report at bugs.python.org (INADA Naoki) Date: Fri, 11 Aug 2017 06:06:47 +0000 Subject: [issue31179] Speed-up dict.copy() up to 5.5 times. In-Reply-To: <1502400693.03.0.6389481443.issue31179@psf.upfronthosting.co.za> Message-ID: <1502431607.43.0.870503138522.issue31179@psf.upfronthosting.co.za> INADA Naoki added the comment: I like idea. One worrying point is how to deal with dirty dict. How about do it only when ma_used == keys->dk_nentries? Slightly off topic. Copy on write can be implemented via dk_refcnt. Functions just passing `**kwargs` has temporal copy of dict. And CoW will reduce the cost of temporal dict. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 02:53:45 2017 From: report at bugs.python.org (Steve Barnes) Date: Fri, 11 Aug 2017 06:53:45 +0000 Subject: [issue28972] Document all "python -m" utilities In-Reply-To: <1481720403.32.0.43245427479.issue28972@psf.upfronthosting.co.za> Message-ID: <1502434425.81.0.180402591225.issue28972@psf.upfronthosting.co.za> Steve Barnes added the comment: Having done some checks for the practicality of auto documenting library items with a -m command line usage I have to say that it will not be so simple. Many of the library items that provide useful functionality, including zipfile & tarfile, are implemented as single .py files, rather than as modules so have no __main__.py to trigger the inclusion in auto-generated documentation. I also tried searching for standard library items that use `if __name__ == "__main__":` constructs but, of course, many files simply use that to expose tests rather than useful functionality - so that is out as well. I even thought of trying for a regex that would look for this followed, in the same scope by argparse but of course there is no obligation to use it. And of course main() does not HAVE to be called main so that is out. Sorry to scotch the idea Eric! ---------- nosy: +Steve Barnes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 03:10:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Aug 2017 07:10:08 +0000 Subject: [issue31179] Speed-up dict.copy() up to 5.5 times. In-Reply-To: <1502400693.03.0.6389481443.issue31179@psf.upfronthosting.co.za> Message-ID: <1502435408.31.0.851761537774.issue31179@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The PR adds over 50 lines of code for optimising not very often used feature. There are two obvious ways of copying, dict(d) and d.copy(), the PR optimises just the latter one, and I'm not sure this is the most used way. The PR duplicates the low-level code, that increases maintainability cost. The PR changes the behavior. Currently the effect of copying is compacting the dict. >>> import sys >>> sys.getsizeof(d) 41020 >>> sys.getsizeof(d.copy()) 41020 >>> sys.getsizeof(dict(d)) 41020 >>> for i in range(1000): del d[i] ... >>> sys.getsizeof(dict(d)) 20544 >>> sys.getsizeof(d.copy()) 20544 >>> sys.getsizeof(d) 41020 >>> import sys >>> d = dict.fromkeys(range(2000)) >>> sys.getsizeof(d) 41020 >>> sys.getsizeof(d.copy()) 41020 >>> d = dict.fromkeys(range(2000)) >>> for i in range(1999): del d[i] ... >>> sys.getsizeof(d) 41020 >>> sys.getsizeof(d.copy()) 136 The PR preserves non compact layout in the copy. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 03:10:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Aug 2017 07:10:53 +0000 Subject: [issue31179] Speed-up dict.copy() up to 5.5 times. In-Reply-To: <1502400693.03.0.6389481443.issue31179@psf.upfronthosting.co.za> Message-ID: <1502435453.48.0.973623204307.issue31179@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 04:25:56 2017 From: report at bugs.python.org (Steve Barnes) Date: Fri, 11 Aug 2017 08:25:56 +0000 Subject: [issue31182] Suggested Enhancements to zipfile & tarfile command line interfaces Message-ID: <1502439956.47.0.572068463872.issue31182@psf.upfronthosting.co.za> New submission from Steve Barnes: I would like to add to the command line of both tarfile and zipfile interface some additional options that I believe to be useful. 1. Wildcard filename matching for archiving 2. Recursive archiving (with excludes) 3. Append to archive option 4. Compression Selection 4.1 For zipfile: zip64, bizp2 & lzma (if available) 4.2 For tarfile: document that gz, xz & bz2 are there and determined by ext. ---------- components: Library (Lib) messages: 300156 nosy: Steve Barnes priority: normal severity: normal status: open title: Suggested Enhancements to zipfile & tarfile command line interfaces type: enhancement versions: Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 04:55:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Aug 2017 08:55:42 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1502441742.94.0.694074224201.issue31072@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are two differences between filterfunc arguments in zipapp and PyZipFile: 1. An argument of filterfunc is a string in PyZipFile and a Path object in zipapp. 2. The patch in zipapp is relative to the root of the archive. The patch in PyZipFile is a path on FS (absolute or relative to the current working directory). I afraid that these differences can cause confusions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 05:00:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Aug 2017 09:00:24 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1502442024.83.0.0567907900669.issue31161@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Perhaps the check needs to be limited to just the exact type. Looks reasonable to me. Do you want to provide a PR Martijn? ---------- keywords: +easy (C) nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 05:24:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 09:24:27 +0000 Subject: [issue31179] Speed-up dict.copy() up to 5.5 times. In-Reply-To: <1502400693.03.0.6389481443.issue31179@psf.upfronthosting.co.za> Message-ID: <1502443467.38.0.566045081389.issue31179@psf.upfronthosting.co.za> STINNER Victor added the comment: >>>> d = dict.fromkeys(range(2000)) >>>> for i in range(1999): del d[i] > ... >>>> sys.getsizeof(d) > 41020 >>>> sys.getsizeof(d.copy()) > 136 Why "del" doesn't compact the dict? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 05:41:42 2017 From: report at bugs.python.org (Paul Moore) Date: Fri, 11 Aug 2017 09:41:42 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1502444502.23.0.599464734555.issue31072@psf.upfronthosting.co.za> Paul Moore added the comment: Zipapp uses path objects throughout, so making the filter function take a path object is consistent with that. I guess modifying PyZipFile to take either a string or a path object would be possible. As for the relative path, that's deliberate as I expect that a common use case will be to exclude a directory, and doing that via lambda pth: pth.parts[0] != 'dir_to_exclude' is a simple possibility. Having to do this with an absolute path would just require the user to make the path relative, and we've already done that in zipapp so why duplicate the work? So I guess I'm saying I want to keep both those choices. Do you think this is a sufficient problem that we should *not* use the same name? Any suggestions on a better name (or should we stick with the original ``include_file``)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 08:38:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 12:38:42 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process In-Reply-To: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> Message-ID: <1502455122.62.0.975536693561.issue31173@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4dea06531ece28dffc1452de2694fb22e99b45f9 by Victor Stinner in branch '2.7': bpo-31173: Rewrite WSTOPSIG test of test_subprocess (#3055) (#3071) https://github.com/python/cpython/commit/4dea06531ece28dffc1452de2694fb22e99b45f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 08:38:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 12:38:59 +0000 Subject: [issue31173] test_subprocess: test_child_terminated_in_stopped_state() leaks a zombie process In-Reply-To: <1502356853.63.0.0769606130984.issue31173@psf.upfronthosting.co.za> Message-ID: <1502455139.3.0.614501430471.issue31173@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 10:02:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 14:02:49 +0000 Subject: [issue31067] test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1501252972.97.0.198077467946.issue31067@psf.upfronthosting.co.za> Message-ID: <1502460169.54.0.891141614815.issue31067@psf.upfronthosting.co.za> STINNER Victor added the comment: I tried and failed to reproduce the bug manually on the FreeBSD 10 buildbot. I ran 14 iterations of "./python -m test test_subprocess -v -F --fail-env-changed" and 50 iterations of "./python -m test test_subprocess -m test_leak_fast_process_del_killed -F". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 10:12:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 14:12:28 +0000 Subject: [issue31067] test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1501252972.97.0.198077467946.issue31067@psf.upfronthosting.co.za> Message-ID: <1502460748.56.0.678336932829.issue31067@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3110 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 10:13:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 14:13:21 +0000 Subject: [issue31067] test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1501252972.97.0.198077467946.issue31067@psf.upfronthosting.co.za> Message-ID: <1502460801.81.0.202024435038.issue31067@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3111 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 10:48:01 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 11 Aug 2017 14:48:01 +0000 Subject: [issue31179] Speed-up dict.copy() up to 5.5 times. In-Reply-To: <1502400693.03.0.6389481443.issue31179@psf.upfronthosting.co.za> Message-ID: <1502462881.73.0.0978090415954.issue31179@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I like idea. > One worrying point is how to deal with dirty dict. > How about do it only when ma_used == keys->dk_nentries? I've added this check. See the updated PR. > The PR changes the behavior. Currently the effect of copying is compacting the dict. The check that INADA suggested enables compacting on copy, if it is needed. > The PR adds over 50 lines of code for optimising not very often used feature. I started to look into the problem because I need this for my upcoming PEP, so please don't dismiss this idea right away. I also think that copying a dict isn't a "not very often used feature", it depends on your frame of references. In some applications you do copy dict a lot. 50 lines of code speeding up one of the core methods 5.5x is a fair price to pay. > There are two obvious ways of copying, dict(d) and d.copy() That can also be easily optimized, btw. I'll see if I can do that without impacting the performance of creating new dicts. > The PR duplicates the low-level code, that increases maintainability cost. FWIW, the PR doesn't duplicate any of the code. It provides a new implementation that is more efficient than the old approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 10:49:02 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 11 Aug 2017 14:49:02 +0000 Subject: [issue31179] Speed-up dict.copy() up to 5.5 times. In-Reply-To: <1502400693.03.0.6389481443.issue31179@psf.upfronthosting.co.za> Message-ID: <1502462942.53.0.0181720861669.issue31179@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Why "del" doesn't compact the dict? This is a good question, btw. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 11:14:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 15:14:33 +0000 Subject: [issue31067] test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1501252972.97.0.198077467946.issue31067@psf.upfronthosting.co.za> Message-ID: <1502464473.94.0.272900056931.issue31067@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 504939fdf4ebdff47aacfab7876754edeb57bbe1 by Victor Stinner in branch '2.7': bpo-31067: test_subprocess calls reap_children() (#2931) (#3073) https://github.com/python/cpython/commit/504939fdf4ebdff47aacfab7876754edeb57bbe1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 11:14:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 15:14:39 +0000 Subject: [issue31067] test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1501252972.97.0.198077467946.issue31067@psf.upfronthosting.co.za> Message-ID: <1502464479.39.0.415695219856.issue31067@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f2d769d539279f01a6589dd3a0d5865dd00e13b0 by Victor Stinner in branch '3.6': bpo-31067: test_subprocess calls reap_children() (#2931) (#3074) https://github.com/python/cpython/commit/f2d769d539279f01a6589dd3a0d5865dd00e13b0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 11:18:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 15:18:38 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502464718.57.0.140693136026.issue30871@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3112 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 11:21:31 2017 From: report at bugs.python.org (George Collins) Date: Fri, 11 Aug 2017 15:21:31 +0000 Subject: [issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects Message-ID: <1502464891.48.0.226484247582.issue31183@psf.upfronthosting.co.za> New submission from George Collins: Issue 21947 informed the `dis` module about the `gi_code` attribute, which stores code objects for generator objects. This allows inspection of generator objects, not just functions which return them. However, asynchronous generator objects use `ag_code` and coroutine objects use `cr_code`, so dis raises a TypeError on them. I'm making a pull request to extend the generator behavior to async generators and coroutines. Credit to Luciano Ramalho: I tripped over this at his (great) concurrency workshop at PyBay 2017 and he identified exactly what was happening and suggested a patch. ---------- components: Extension Modules messages: 300167 nosy: George Collins priority: normal severity: normal status: open title: `Dis` module doesn't know how to disassemble async generator or coroutine objects type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 11:31:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 15:31:45 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502465505.3.0.724130539985.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote https://github.com/python/cpython/pull/3075 to add "python3 -m test.pythoninfo". I chose to add the script into Lib/test/ to notice users that it's design for Python internal usage, for Python tests. I modified scripts running tests on our CI to also run pythoninfo, and then also started to cleanup ("simplify") the regrtest header (remove information rarely useful). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 11:35:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 15:35:41 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502465741.55.0.123843956748.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: Nir Soffer: "I like the idea, may be also useful in https://github.com/sosreport/sos/blob/master/sos/plugins/python.py" It's hard to guess which kinds of informations are needed. My use case is to debug failing tests on the Python CIs. Other use cases may want other kinds of information. For example, my perf module also a "python3 -m perf collect_metadata" which has a similar goal but reads also information about the CPU: CPU configuration, model, temperature, etc. I don't think that these information are useful for Python tests. Serhiy Storchaka: "Note that there are two versions: the version with which the interpreter is build, and the version of the dynamic library." Sorry, version of what? The readline module has two versions, my proposed test.pythoninfo tool saves both. Depending on the failing test, you need one version or the other, or both. The purpose of pythoninfo is to be able to log a long list of informations, without after to care if it is useful or not in general ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 12:22:11 2017 From: report at bugs.python.org (David Halter) Date: Fri, 11 Aug 2017 16:22:11 +0000 Subject: [issue31184] Fix data descriptor detection in inspect.getattr_static Message-ID: <1502468531.27.0.204472955702.issue31184@psf.upfronthosting.co.za> New submission from David Halter: inspect.getattr_static is currently not identifying data descriptors the right way. Data descriptors are defined by having a __get__ attribute and at least one of the __set__ and __delete__ attributes. Implementation detail: Both __delete__ and __get__ set the same slot called tp_descr_set in CPython. I have attached a patch that fixes the issue IMO. ---------- files: 0001-Fix-data-descriptor-detection-in-inspect.getattr_sta.patch keywords: patch messages: 300170 nosy: davidhalter priority: normal severity: normal status: open title: Fix data descriptor detection in inspect.getattr_static versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file47078/0001-Fix-data-descriptor-detection-in-inspect.getattr_sta.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 12:28:18 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Aug 2017 16:28:18 +0000 Subject: [issue31185] Miscellaneous errors in asyncio speedup module Message-ID: <1502468898.65.0.496074575123.issue31185@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch fixes miscellaneous errors in asyncio speedup module. It is hard to enumerate they all, but they are mostly NULL dereferencing, reference leaks, and handling exceptions in corner cases. ---------- components: Extension Modules, asyncio messages: 300171 nosy: giampaolo.rodola, haypo, serhiy.storchaka, yselivanov priority: normal severity: normal stage: patch review status: open title: Miscellaneous errors in asyncio speedup module type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 12:33:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Aug 2017 16:33:09 +0000 Subject: [issue31185] Miscellaneous errors in asyncio speedup module In-Reply-To: <1502468898.65.0.496074575123.issue31185@psf.upfronthosting.co.za> Message-ID: <1502469189.82.0.889895945745.issue31185@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3113 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 12:33:30 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 11 Aug 2017 16:33:30 +0000 Subject: [issue31185] Miscellaneous errors in asyncio speedup module In-Reply-To: <1502468898.65.0.496074575123.issue31185@psf.upfronthosting.co.za> Message-ID: <1502469210.49.0.711500244293.issue31185@psf.upfronthosting.co.za> Yury Selivanov added the comment: Adding INADA, he is a co-author/reviewer of that code. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 12:36:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Aug 2017 16:36:24 +0000 Subject: [issue31184] Fix data descriptor detection in inspect.getattr_static In-Reply-To: <1502468531.27.0.204472955702.issue31184@psf.upfronthosting.co.za> Message-ID: <1502469384.82.0.376192938542.issue31184@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue26103. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 12:36:30 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 11 Aug 2017 16:36:30 +0000 Subject: [issue31185] Miscellaneous errors in asyncio speedup module In-Reply-To: <1502468898.65.0.496074575123.issue31185@psf.upfronthosting.co.za> Message-ID: <1502469390.82.0.535043257502.issue31185@psf.upfronthosting.co.za> Yury Selivanov added the comment: Huge thanks, Serhiy, btw. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 12:38:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 16:38:23 +0000 Subject: [issue31185] Miscellaneous errors in asyncio speedup module In-Reply-To: <1502468898.65.0.496074575123.issue31185@psf.upfronthosting.co.za> Message-ID: <1502469503.83.0.922463852743.issue31185@psf.upfronthosting.co.za> STINNER Victor added the comment: "reference leaks" oh? our Refleaks buildbots didn't catch them. Do your new tests reproduce the bugs, to make sure that we don't leak anymore? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 12:40:31 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 11 Aug 2017 16:40:31 +0000 Subject: [issue31185] Miscellaneous errors in asyncio speedup module In-Reply-To: <1502468898.65.0.496074575123.issue31185@psf.upfronthosting.co.za> Message-ID: <1502469631.54.0.242897052594.issue31185@psf.upfronthosting.co.za> Yury Selivanov added the comment: > "reference leaks" oh? our Refleaks buildbots didn't catch them. The test suite for Tasks and Futures is pretty extensive, but it obviously doesn't cover some obscure use cases. +1 to make sure that any refleak that was discovered should have a new regression test for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 12:51:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 11 Aug 2017 16:51:08 +0000 Subject: [issue31185] Miscellaneous errors in asyncio speedup module In-Reply-To: <1502468898.65.0.496074575123.issue31185@psf.upfronthosting.co.za> Message-ID: <1502470268.55.0.153805579583.issue31185@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: They are occurred in very obscure cases like calling __init__ multiple times. The patch doesn't contain tests for them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 14:03:23 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Aug 2017 18:03:23 +0000 Subject: [issue31143] lib2to3 requires source files for fixes In-Reply-To: <1502199820.45.0.266789530898.issue31143@psf.upfronthosting.co.za> Message-ID: <1502474603.18.0.777961269984.issue31143@psf.upfronthosting.co.za> Brett Cannon added the comment: You're technically right, Verdan, but pkgutils is kind of a hack as it isn't always using standard APIs to achieve its goals, so I personally never recommend using the module unless absolutely necessary and you know exactly how brittle it can be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 15:00:07 2017 From: report at bugs.python.org (George Collins) Date: Fri, 11 Aug 2017 19:00:07 +0000 Subject: [issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects In-Reply-To: <1502464891.48.0.226484247582.issue31183@psf.upfronthosting.co.za> Message-ID: <1502478007.82.0.928241050252.issue31183@psf.upfronthosting.co.za> Changes by George Collins : ---------- pull_requests: +3114 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 17:18:11 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 11 Aug 2017 21:18:11 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1502486291.17.0.196491392185.issue31072@psf.upfronthosting.co.za> Brett Cannon added the comment: What about simply 'filter' as a name? or 'path_filter'? ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 17:38:45 2017 From: report at bugs.python.org (Paul Moore) Date: Fri, 11 Aug 2017 21:38:45 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1502487525.9.0.267756974295.issue31072@psf.upfronthosting.co.za> Paul Moore added the comment: Sounds reasonable :-) I'm not going to be checking mails for a week or so, so I'll revisit this once I get back. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 18:14:59 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 11 Aug 2017 22:14:59 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6 In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1502489699.62.0.984296477097.issue30849@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Victor, Zachary, http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%203.x/builds/830 corresponds to a very old changeset (more than one month old) before itimer() was fixed in 729780a810bbcb12b245a1b652302a601fc9f6fd. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 18:19:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Aug 2017 22:19:53 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6 In-Reply-To: <1502489699.62.0.984296477097.issue30849@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Oh, Zach's Gentoo buildbot was offline for a long time. Maybe it ran tests on old commits? What about the first messages of this issue on the other buildbot? Maybe it's also outdated? I am fine with closing the issue if you fixed a bug in the meanwhile. Don't worry, I will reopen it if it comes back :-D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 18:29:51 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 11 Aug 2017 22:29:51 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502490591.96.0.345688972926.issue30871@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- pull_requests: +3116 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 18:30:31 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 11 Aug 2017 22:30:31 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502490631.95.0.826625019562.issue30871@psf.upfronthosting.co.za> Berker Peksag added the comment: Two things: 1. I've just closed PR 2618 as the scope of this issue is broader than my PR. 2. Could you also add version information of sqlite3? ---------- nosy: +berker.peksag stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 18:32:59 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 11 Aug 2017 22:32:59 +0000 Subject: [issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects In-Reply-To: <1502464891.48.0.226484247582.issue31183@psf.upfronthosting.co.za> Message-ID: <1502490779.73.0.417857518716.issue31183@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Adding Serhiy and Nick who worked on these parts of CPython. ---------- nosy: +Mariatta, ncoghlan, serhiy.storchaka stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 23:00:10 2017 From: report at bugs.python.org (D Gentry) Date: Sat, 12 Aug 2017 03:00:10 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502397605.62.0.423487215325.issue31148@psf.upfronthosting.co.za> Message-ID: D Gentry added the comment: If you would like to keep track of others who would find it useful, I'd be happy to contribute the msi to the community once its completed. Also, any information or good references that you could recommend that might aid in producing the installer would be appreciated. Steve mentioned the temp directory as possibly being part of the problem and that would make sense as its only when installer make use of this that the issues seem to occur so I will definitely be looking at that as a possible root cause for the failure. Steve also mentioned that it's not as easy to produce an installer as it may seem.I was wondering if you could elaborate some on what you mean. On a scale of one to ten, with ten being the most difficult, how difficult of a task would you say it is to create this as it seems you have some experience doing this in the past and this will be my first attempt, so I would like to know what I'm getting into before I start. >From the Microsoft article on producing MSI installers, https://msdn.microsoft.com/en-us/library/aa266427(v=vs.60).aspx#vehowbuildinginstallerpackagefileanchor1, it seems fairly simple as long as you have Visual Studio. Is there something I'm not seeing or understanding in the process? Again, if you know of any references that might help educate me or direct me through the process, these would be helpful. I already have a couple strategies I'm thinking of to do this but I would like to see what someone with some experience has to say regarding the issue. -David Gentry On Thu, Aug 10, 2017 at 2:40 PM, Steve Dower wrote: > > Steve Dower added the comment: > > > when we changed installers was that when we also fixed the > security/permissions problems with the install dir > > Yes, but the permissions issue here isn't the install directory - it is > probably the TEMP directory or some other system restriction. It's > basically impossible to tell from the logs, and I don't even know where to > start asking for configuration settings to see what may be wrong. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 23:23:59 2017 From: report at bugs.python.org (Ned Deily) Date: Sat, 12 Aug 2017 03:23:59 +0000 Subject: [issue31142] python shell crashed while input quotes in print() In-Reply-To: <1502194192.96.0.619398073227.issue31142@psf.upfronthosting.co.za> Message-ID: <1502508239.14.0.167389117377.issue31142@psf.upfronthosting.co.za> Ned Deily added the comment: Note that the web page states you need to use Tcl/Tk 8.5.18, and not 8.6.x. Both are available from ActiveState here: https://www.activestate.com/activetcl/downloads Try installing 8.5.18 (you don't need to uninstall 8.6.x) and your crashes should go away. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 11 23:41:09 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 12 Aug 2017 03:41:09 +0000 Subject: [issue31143] lib2to3 requires source files for fixes In-Reply-To: <1502199820.45.0.266789530898.issue31143@psf.upfronthosting.co.za> Message-ID: <1502509269.88.0.212138057848.issue31143@psf.upfronthosting.co.za> Steve Dower added the comment: Perhaps the more important question is whether 2to3 really needs to dynamically generate a list of fixers or if that should have been stopped due to YAGNI. There are only a few modules in the stdlib, and it doesn't seem to support proper namespace packages, so unless there are plans to suddenly add many more we could just make it a hard coded list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 00:36:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 12 Aug 2017 04:36:17 +0000 Subject: [issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects In-Reply-To: <1502464891.48.0.226484247582.issue31183@psf.upfronthosting.co.za> Message-ID: <1502512577.69.0.715782365522.issue31183@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is this a bug fix or a new feature? Adding support of generators in issue21947 was a new feature and was not backported to older versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 01:23:44 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 12 Aug 2017 05:23:44 +0000 Subject: [issue1732367] Document the constants in the socket module Message-ID: <1502515424.19.0.774170039825.issue1732367@psf.upfronthosting.co.za> Martin Panter added the comment: Issue 13256 contains a patch documenting socket options, but was closed because the author lost interest. Issue 27409 is a proposal to list the symbols available without documenting what each one is for. ---------- dependencies: +Document and test new socket options, List socket.SO_*, SCM_*, MSG_*, IPPROTO_* symbols _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 01:31:53 2017 From: report at bugs.python.org (Rajath Agasthya) Date: Sat, 12 Aug 2017 05:31:53 +0000 Subject: [issue31186] Support heapfix() and heapremove() APIs in heapq module Message-ID: <1502515912.85.0.983303815097.issue31186@psf.upfronthosting.co.za> New submission from Rajath Agasthya: I'd like to suggest a couple of utility methods for the heapq module which I think are useful: 1. heapfix() - Re-establishes heap invariant after item at 'any index' in the heap changes its value. Currently, the way to fix the heap after an arbitrary item has changed is to just call heapify() on the entire heap. This is inefficient because heapify() tries to perform _siftup() operation on half of the items of the heap to maintain the heap invariant. Doing this is unnecessary because we know exactly which element (or index) was changed and became out of place. With a heapfix() function, we can just "fix" the heap from that position. 2. heapremove() - Removes an item at 'any index' from the heap and maintains heap invariant. Pretty much same as above. If you remove an item from an arbitrary index, you have to call heapify() to restore the heap invariant. Supporting these methods require minimal changes to the existing _siftup() and _siftdown() methods (basically just returning position values without changing any logic at all). I have a draft implementation which I've attached as a patch file here. If there's interest in this, I can write some tests and create a Github PR. Thanks! ---------- components: Library (Lib) files: heapq_fix_remove.patch keywords: patch messages: 300190 nosy: rajathagasthya, rhettinger, stutzbach priority: normal severity: normal status: open title: Support heapfix() and heapremove() APIs in heapq module type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file47079/heapq_fix_remove.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 05:19:35 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Aug 2017 09:19:35 +0000 Subject: [issue30747] _Py_atomic_* not actually atomic on Windows with MSVC In-Reply-To: <1498332959.93.0.572211672441.issue30747@psf.upfronthosting.co.za> Message-ID: <1502529575.24.0.930736870741.issue30747@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset e664d7f89d2b9960d9049237136396e824795cac by Antoine Pitrou (P?r Bj?rklund) in branch 'master': bpo-30747: Attempt to fix atomic load/store (#2383) https://github.com/python/cpython/commit/e664d7f89d2b9960d9049237136396e824795cac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 05:19:47 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Aug 2017 09:19:47 +0000 Subject: [issue30747] _Py_atomic_* not actually atomic on Windows with MSVC In-Reply-To: <1498332959.93.0.572211672441.issue30747@psf.upfronthosting.co.za> Message-ID: <1502529587.28.0.378367442655.issue30747@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> backport needed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 06:33:59 2017 From: report at bugs.python.org (Martin Panter) Date: Sat, 12 Aug 2017 10:33:59 +0000 Subject: [issue1732367] Document the constants in the socket module Message-ID: <1502534039.65.0.265793784069.issue1732367@psf.upfronthosting.co.za> Martin Panter added the comment: The general rule for documenting availability seems to be to only list the special cases. Many of the socket options are specified by Posix, and seem to be available on Linux, Windows, BSD and other OSes. If you say ?Availability: Linux, Windows?, it could imply that the API is specific to those two platforms, and not available on Free BSD or other platforms in general. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 06:37:02 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 12 Aug 2017 10:37:02 +0000 Subject: [issue31187] suboptimal code in Py_ReprEnter() Message-ID: <1502534222.01.0.165858988283.issue31187@psf.upfronthosting.co.za> New submission from Oren Milman: in Objects/object.c, Py_ReprEnter() does the following: - try to retrieve the Py_Repr list from the thread-state dict. - in case the list is not in the dict, add it to the dict as an empty list. - check whether the received object is in the Py_Repr list, even in case the list was just created, and guaranteed to be empty. I propose to put this check inside an else clause, so that it wouldn't take place in case the list is guaranteed to be empty, i.e.: list = _PyDict_GetItemId(dict, &PyId_Py_Repr); if (list == NULL) { list = PyList_New(0); ... } else { i = PyList_GET_SIZE(list); while (--i >= 0) { if (PyList_GET_ITEM(list, i) == obj) return 1; } } I ran the test suite, and it seems that this change doesn't break anything, so I would be happy to open a PR for it. ---------- components: Interpreter Core messages: 300193 nosy: Oren Milman priority: normal severity: normal status: open title: suboptimal code in Py_ReprEnter() type: performance versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 06:39:17 2017 From: report at bugs.python.org (George Collins) Date: Sat, 12 Aug 2017 10:39:17 +0000 Subject: [issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects In-Reply-To: <1502464891.48.0.226484247582.issue31183@psf.upfronthosting.co.za> Message-ID: <1502534357.91.0.291893501698.issue31183@psf.upfronthosting.co.za> George Collins added the comment: Hm--either/both? I encountered it as a bug ("dis works on my generator object and my async generator function, why does it break on my async generator object?") but strictly speaking it's a new feature (just as issue21947 was). To my mind, adding this level of indirection (finding the code object) for generators was a bit of a design decision but once it's in for generators it should be in for async generators and coroutines by analogy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 06:40:35 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 12 Aug 2017 10:40:35 +0000 Subject: [issue31147] a suboptimal check in list_extend() In-Reply-To: <1502206236.15.0.974518538682.issue31147@psf.upfronthosting.co.za> Message-ID: <1502534435.52.0.815261859169.issue31147@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- title: a mostly useless check in list_extend() -> a suboptimal check in list_extend() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 06:42:29 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Aug 2017 10:42:29 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1502534549.58.0.744279024629.issue5001@psf.upfronthosting.co.za> Antoine Pitrou added the comment: @drallensmith, the patch you commented on is very old and probably doesn't apply anymore. It would be useful to make an updated patch (or rather PR, as we are using Github for development now: see https://devguide.python.org/pullrequest/). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 07:41:49 2017 From: report at bugs.python.org (drallensmith) Date: Sat, 12 Aug 2017 11:41:49 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1502538109.75.0.676870259467.issue5001@psf.upfronthosting.co.za> drallensmith added the comment: Patches (for 2.7 and 3.5; the code is identical, only the line numbers changed) for the portion I commented on can be found in issue 31169. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 08:12:03 2017 From: report at bugs.python.org (Ammar Askar) Date: Sat, 12 Aug 2017 12:12:03 +0000 Subject: [issue1732367] Document the constants in the socket module Message-ID: <1502539923.64.0.176557906337.issue1732367@psf.upfronthosting.co.za> Ammar Askar added the comment: That makes sense, listing availability for exceptions would certainly make everything more succinct. How do you propose we mention that certain options don't actually do anything on Windows. Currently I have a footnote in the table that links to the MSDN documentation here: https://msdn.microsoft.com/en-us/library/windows/desktop/ms740532(v=vs.85).aspx control+f for "SO_RCVLOWAT" for example ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 08:45:07 2017 From: report at bugs.python.org (drallensmith) Date: Sat, 12 Aug 2017 12:45:07 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1502541907.41.0.828984028582.issue5001@psf.upfronthosting.co.za> Changes by drallensmith : ---------- pull_requests: +3117 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 08:45:07 2017 From: report at bugs.python.org (drallensmith) Date: Sat, 12 Aug 2017 12:45:07 +0000 Subject: [issue31169] Unknown-source assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502541907.57.0.590168315472.issue31169@psf.upfronthosting.co.za> Changes by drallensmith : ---------- pull_requests: +3118 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 08:47:19 2017 From: report at bugs.python.org (drallensmith) Date: Sat, 12 Aug 2017 12:47:19 +0000 Subject: [issue31169] Unknown-source assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502542039.7.0.517468429591.issue31169@psf.upfronthosting.co.za> drallensmith added the comment: Pull request equivalent for the patch submitted. This will not, of course, fix this particular bug, but it should help others with debugging such errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 11:18:14 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 12 Aug 2017 15:18:14 +0000 Subject: [issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects In-Reply-To: <1502464891.48.0.226484247582.issue31183@psf.upfronthosting.co.za> Message-ID: <1502551094.87.0.0208923026659.issue31183@psf.upfronthosting.co.za> Nick Coghlan added the comment: While I agree the line is blurry, extending automatic disassembly to cover new types is currently still considered a new feature in the dis module rather than a bug in the addition of those new types to the language. Whether or not that's the *right* policy, or if we should consider tweaking it so that oversights in `dis` and `inspect` are treated as bugs in the addition of affected types, would be a question for python-dev (fortunately, the new cherry-pick based workflow means the current PR review can proceed independently of that question). ---------- versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 11:37:11 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Aug 2017 15:37:11 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1502552231.84.0.375189215553.issue5001@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 48d9823a0ebde4dfab8bc154bb6df462fb2ee403 by Antoine Pitrou (Allen W. Smith, Ph.D) in branch 'master': bpo-5001, bpo-31169: Fix two uninformative asserts in multiprocessing/managers.py (#3078) https://github.com/python/cpython/commit/48d9823a0ebde4dfab8bc154bb6df462fb2ee403 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 11:37:12 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Aug 2017 15:37:12 +0000 Subject: [issue31169] Unknown-source assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502552232.0.0.872677453936.issue31169@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 48d9823a0ebde4dfab8bc154bb6df462fb2ee403 by Antoine Pitrou (Allen W. Smith, Ph.D) in branch 'master': bpo-5001, bpo-31169: Fix two uninformative asserts in multiprocessing/managers.py (#3078) https://github.com/python/cpython/commit/48d9823a0ebde4dfab8bc154bb6df462fb2ee403 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 11:39:35 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 12 Aug 2017 15:39:35 +0000 Subject: [issue31169] Unknown-source assertion failure in multiprocessing/managers.py In-Reply-To: <1502331466.32.0.179260204496.issue31169@psf.upfronthosting.co.za> Message-ID: <1502552375.58.0.412072143847.issue31169@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Now fixed in git master thanks to drallensmith. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 13:58:52 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sat, 12 Aug 2017 17:58:52 +0000 Subject: [issue31188] Makefile.pre.in: commoninstall: reformat Message-ID: <1502560732.74.0.724807734516.issue31188@psf.upfronthosting.co.za> New submission from ????? ????????: When @FRAMEWORKALTINSTALLLAST@ expands to "", the last line of recipe commoninstall in the resulting Makefile consists solely of two tabs, for which emacs complains as "suspicious line". diff --git a/Makefile.pre.in b/Makefile.pre.in --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1069,8 +1069,7 @@ altinstall: commoninstall commoninstall: @FRAMEWORKALTINSTALLFIRST@ \ altbininstall libinstall inclinstall libainstall \ - sharedinstall oldsharedinstall altmaninstall \ - @FRAMEWORKALTINSTALLLAST@ + sharedinstall oldsharedinstall altmaninstall @FRAMEWORKALTINSTALLLAST@ # Install shared libraries enabled by Setup DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED) ---------- components: Build messages: 300204 nosy: dilyan.palauzov priority: normal severity: normal status: open title: Makefile.pre.in: commoninstall: reformat versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 13:59:49 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sat, 12 Aug 2017 17:59:49 +0000 Subject: [issue31189] README.rst: installing multiple versions: typo Message-ID: <1502560789.4.0.0378607685463.issue31189@psf.upfronthosting.co.za> New submission from ????? ????????: It speaks about pythonX.Y but means python3.${subversion} diff --git a/README.rst b/README.rst --- a/README.rst +++ b/README.rst @@ -190,7 +190,7 @@ script) you must take care that your primary python executable is not overwritten by the installation of a different version. All files and directories installed using ``make altinstall`` contain the major and minor version and can thus live side-by-side. ``make install`` also creates -``${prefix}/bin/python3`` which refers to ``${prefix}/bin/pythonX.Y``. If you +``${prefix}/bin/python3`` which refers to ``${prefix}/bin/python3.X``. If you intend to install multiple versions using the same prefix you must decide which version (if any) is your "primary" version. Install that version using ``make install``. Install all other versions using ``make altinstall``. ---------- assignee: docs at python components: Documentation messages: 300205 nosy: dilyan.palauzov, docs at python priority: normal severity: normal status: open title: README.rst: installing multiple versions: typo versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 14:04:09 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sat, 12 Aug 2017 18:04:09 +0000 Subject: [issue31190] ./configure: add ability to build and install only shared library (without static libpython3.a) Message-ID: <1502561049.05.0.30023365478.issue31190@psf.upfronthosting.co.za> New submission from ????? ????????: diff --git a/Makefile.pre.in b/Makefile.pre.in --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -578,7 +578,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o # Build static library # avoid long command lines, same as LIBRARY_OBJS -$(LIBRARY): $(LIBRARY_OBJS) +libpython$(LDVERSION).a: $(LIBRARY_OBJS) -rm -f $@ $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o $(AR) $(ARFLAGS) $@ $(PARSER_OBJS) diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -987,9 +987,9 @@ esac AC_SUBST(LIBRARY) AC_MSG_CHECKING(LIBRARY) -if test -z "$LIBRARY" +if test -z "$LIBRARY" -a "x$enable_static" != "xno" then - LIBRARY='libpython$(VERSION)$(ABIFLAGS).a' + LIBRARY='libpython$(LDVERSION).a' fi AC_MSG_RESULT($LIBRARY) @@ -1086,6 +1086,16 @@ then fi AC_MSG_RESULT($enable_shared) +AC_MSG_CHECKING(for --disable-static) +AC_ARG_ENABLE(static, + AS_HELP_STRING([--disable-static], [disable building static python library])) +AC_MSG_RESULT($enable_static) + +if test "x$enable_static" == "xno" -a "x$enable_shared" == "xno" +then + AC_MSG_ERROR(["Both static and shared library disabled"]) +fi + AC_MSG_CHECKING(for --enable-profiling) AC_ARG_ENABLE(profiling, AS_HELP_STRING([--enable-profiling], [enable C-level code profiling])) ---------- components: Build messages: 300206 nosy: dilyan.palauzov priority: normal severity: normal status: open title: ./configure: add ability to build and install only shared library (without static libpython3.a) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 14:59:14 2017 From: report at bugs.python.org (drallensmith) Date: Sat, 12 Aug 2017 18:59:14 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1502564354.0.0.967575004423.issue5001@psf.upfronthosting.co.za> Changes by drallensmith : ---------- pull_requests: +3120 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 17:00:27 2017 From: report at bugs.python.org (Saurabh Chaturvedi) Date: Sat, 12 Aug 2017 21:00:27 +0000 Subject: [issue31191] Fix grammar in threading.Barrier docs Message-ID: <1502571627.6.0.886151225778.issue31191@psf.upfronthosting.co.za> Changes by Saurabh Chaturvedi : ---------- nosy: schedutron priority: normal pull_requests: 3121 severity: normal status: open title: Fix grammar in threading.Barrier docs versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 17:33:48 2017 From: report at bugs.python.org (George Collins) Date: Sat, 12 Aug 2017 21:33:48 +0000 Subject: [issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects In-Reply-To: <1502464891.48.0.226484247582.issue31183@psf.upfronthosting.co.za> Message-ID: <1502573628.84.0.594393280113.issue31183@psf.upfronthosting.co.za> George Collins added the comment: Makes sense. I'll update the PR in a bit, and if anyone is hitting this repeatedly and thinks it should be added to 3.6 they can advocate for a policy change in the maintaining-consistency-with-previous-new-features corner case. Thanks, all! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 12 20:21:13 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 13 Aug 2017 00:21:13 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502442024.83.0.0567907900669.issue31161@psf.upfronthosting.co.za> Message-ID: <20170813002101.GO7395@ando.pearwood.info> Steven D'Aprano added the comment: > > Perhaps the check needs to be limited to just the exact type. > Looks reasonable to me. Do you want to provide a PR Martijn? You realise that is making the current traceback *less* informative instead of more informative? I think that's going backwards -- useful information about the syntax errors are being discarded. "Practicality beats purity" -- the current behaviour is helpful, even if it mixes information about two errors into one traceback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 00:50:41 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Aug 2017 04:50:41 +0000 Subject: [issue31186] Support heapfix() and heapremove() APIs in heapq module In-Reply-To: <1502515912.85.0.983303815097.issue31186@psf.upfronthosting.co.za> Message-ID: <1502599841.03.0.808886628757.issue31186@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 00:58:12 2017 From: report at bugs.python.org (Brian) Date: Sun, 13 Aug 2017 04:58:12 +0000 Subject: [issue31192] "return await coro()" SyntaxError despite being "valid syntax" in PEP 492 Message-ID: <1502600292.75.0.87512622225.issue31192@psf.upfronthosting.co.za> New submission from Brian: PEP 492 lists the following under "valid syntax" and yet 3.5.2 raises a SyntaxError: def foo(): return await coro() but this works: def bar(): return await (coro()) ---------- components: Interpreter Core messages: 300209 nosy: merrellb priority: normal severity: normal status: open title: "return await coro()" SyntaxError despite being "valid syntax" in PEP 492 type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 00:59:13 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Aug 2017 04:59:13 +0000 Subject: [issue31186] Support heapfix() and heapremove() APIs in heapq module In-Reply-To: <1502515912.85.0.983303815097.issue31186@psf.upfronthosting.co.za> Message-ID: <1502600353.7.0.656457946162.issue31186@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 I don't think this is the right way to use heaps. Also, I don't want to introduce any O(n) operations for fine-grained changes of a single element (part of the point of having a heap is to make fine-grained changes cheap). FWIW, it isn't common to change an element and then call heapify. Instead, the usual approach is either mark an entry as invalid or keep a pending deletion list or sets. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 01:12:20 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 13 Aug 2017 05:12:20 +0000 Subject: [issue31147] a suboptimal check in list_extend() In-Reply-To: <1502206236.15.0.974518538682.issue31147@psf.upfronthosting.co.za> Message-ID: <1502601140.45.0.778586650805.issue31147@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm concerned that is would provide near zero benefit but would set us up for future bugs by tightly coupling two ideas that I would like to be able to reason about separately. The logic for list.extend() makes a potential overallocation, fills the list, and fixes-up the overallocation if needed (I want that logic should all stay together). And list_resize() should have its own separate logic as well. For a course grained operation like extend(), I really don't mind having a code path that makes a relatively cheap test that only occasionally useful. So, thank you for the suggestion, but I'm going to decline on the grounds that 1) the current code is sometimes useful, 2) it is always cheap, 3) that removing it is odds with the principles of loose coupling and high cohesion, 4) it creates a risk of introducing unnoticed errors in the future the list_resize logic were to change, and 5) no one else has stepped forward to advocate this patch. ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 01:49:02 2017 From: report at bugs.python.org (Martin Panter) Date: Sun, 13 Aug 2017 05:49:02 +0000 Subject: [issue31192] "return await coro()" SyntaxError despite being "valid syntax" in PEP 492 In-Reply-To: <1502600292.75.0.87512622225.issue31192@psf.upfronthosting.co.za> Message-ID: <1502603342.53.0.141824084716.issue31192@psf.upfronthosting.co.za> Martin Panter added the comment: In 3.5, ?await? is an ordinary identifier outside of ?async def? functions. You have to use the ?async def? syntax to enable it as a special keyword. >>> async def foo(): # ?Async def? enables ?await? as a keyword ... return await coro() # Valid syntax ... >>> async def coro(): pass ... >>> def await(c): ... c.close() # Avoid RuntimeWarning ... return "Called await({!r})".format(c) ... >>> def bar(): # Ordinary non-PEP-492 function ... return await (coro()) ... >>> bar() 'Called await()' ---------- nosy: +martin.panter resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 04:02:31 2017 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 13 Aug 2017 08:02:31 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502611351.19.0.0260016299025.issue31149@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: There is a minor inconsistency: For French language, name in the list is displayed in French as "Fran?ais". For Japanese language, name in the list is displayed in English as "Japanese" instead of in Japanese as "???". Maybe it would be best to display 2 names for each non-English language? Example: "Fran?ais (French)" "??? (Japanese)" ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 04:10:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Aug 2017 08:10:54 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1502611854.38.0.426105915396.issue31161@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The current traceback is incorrect. It mixes exception type and message from different errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 05:12:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Aug 2017 09:12:19 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502615539.69.0.208324087564.issue30871@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Sorry, version of what? Versions of any external library. Python can be built with headers of one version, but dynamically load the library of other version. For example TCL_VERSION and TK_VERSION are static versions (they should be equal in modern Tcl/Tk), and Tcl command "info patchlevel" returns the dynamic version. In the readline module _READLINE_VERSION is header version, _READLINE_RUNTIME_VERSION and _READLINE_LIBRARY_VERSION are runtime versions. In the zlib module ZLIB_VERSION is header version, ZLIB_RUNTIME_VERSION is runtime version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 06:24:58 2017 From: report at bugs.python.org (Julien Palard) Date: Sun, 13 Aug 2017 10:24:58 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502619898.32.0.292217194915.issue31149@psf.upfronthosting.co.za> Julien Palard added the comment: Arfrever: nice catch! Inda: What do you think? Any preference between "???", "Japanese", and "??? (Japanese)"? I personally don't like much the "??? (Japanese)" version, but I don't care much between "French" and "Fran?ais" as they're using the same alphabet. Maybe displaying "???" instead of "Japanese" show more commitment into translations? Like displaying "Japanese" meaning "OK we translated, but not everything, starting by your language". Another solution would be to translate each languages in each languages, and display "Anglais, Japonais, Fran?ais" in the french translation, "English, Japanese, French" in the english one, and so on? I think I prefer to display languages in their own language, so "English, "Fran?ais", "???" for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 06:33:36 2017 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Aug 2017 10:33:36 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502620416.6.0.743722628904.issue31149@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3122 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 06:33:36 2017 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Aug 2017 10:33:36 +0000 Subject: [issue31159] Doc: Language switch can't switch on specific cases In-Reply-To: <1502278726.47.0.617689885912.issue31159@psf.upfronthosting.co.za> Message-ID: <1502620416.72.0.829516489812.issue31159@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3123 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 06:36:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Aug 2017 10:36:23 +0000 Subject: [issue31187] suboptimal code in Py_ReprEnter() In-Reply-To: <1502534222.01.0.165858988283.issue31187@psf.upfronthosting.co.za> Message-ID: <1502620583.68.0.916831984661.issue31187@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PyList_GET_SIZE(list) is cheap (especially in comparison of _PyDict_GetItemId(), _PyDict_SetItemId() and PyList_New()), and its tiny overhead can be avoided at most once per thread's lifetime. I'm sure you can't measure the effect of this change. If surrounding code be modified for other reasons, may be your change could be applied. But it alone just makes a code churn. ---------- nosy: +rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 06:42:15 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Aug 2017 10:42:15 +0000 Subject: [issue15988] Inconsistency in overflow error messages of integer argument In-Reply-To: <1348167070.37.0.305629822418.issue15988@psf.upfronthosting.co.za> Message-ID: <1502620935.62.0.231630689828.issue15988@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Glad to see you again Oren! Maybe first finish issue28261? It looks easier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 09:43:47 2017 From: report at bugs.python.org (David MacIver) Date: Sun, 13 Aug 2017 13:43:47 +0000 Subject: [issue31193] re.IGNORECASE strips combining character from lower case of LATIN CAPITAL LETTER I WITH DOT ABOVE Message-ID: <1502631827.21.0.810598108454.issue31193@psf.upfronthosting.co.za> New submission from David MacIver: chr(304).lower() is a two character string - a lower case i followed by a combining chr(775) ('COMBINING DOT ABOVE'). The re module seems not to understand the combining character and a regex compiled with IGNORECASE will erroneously match a single lower case i without the required combining character. The attached file demonstrates this. I've tested this on Python 3.6.1 with my locale as ('en_GB', 'UTF-8') (I don't know whether that matters for reproducing this, but I know it can affect how lower/upper work so am including it for the sake of completeness). The problem does not reproduce on Python 2.7.13 because on that case chr(304).lower() is 'i' without the combining character, so it fails earlier. This is presumably related to #12728, but as that is closed as fixed while this still reproduces I don't believe it's a duplicate. ---------- components: Library (Lib) files: casing.py messages: 300219 nosy: David MacIver priority: normal severity: normal status: open title: re.IGNORECASE strips combining character from lower case of LATIN CAPITAL LETTER I WITH DOT ABOVE versions: Python 3.6 Added file: http://bugs.python.org/file47080/casing.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 10:52:37 2017 From: report at bugs.python.org (Martijn Pieters) Date: Sun, 13 Aug 2017 14:52:37 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1502635957.93.0.745580493756.issue31161@psf.upfronthosting.co.za> Martijn Pieters added the comment: This does not increase clarity. It creates confusion. There are two distinct syntax errors, and they should be reported separately, just like `print "abc" 42` is two syntax errors; you'll hear about the second one once the first one is fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 10:54:02 2017 From: report at bugs.python.org (Martijn Pieters) Date: Sun, 13 Aug 2017 14:54:02 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1502636042.48.0.442362737736.issue31161@psf.upfronthosting.co.za> Martijn Pieters added the comment: Disregard my last message, I misread Serhiy's sentence (read 'correct' for 'incorrect'). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 11:01:30 2017 From: report at bugs.python.org (Martijn Pieters) Date: Sun, 13 Aug 2017 15:01:30 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1502636490.03.0.253224497012.issue31161@psf.upfronthosting.co.za> Changes by Martijn Pieters : ---------- pull_requests: +3124 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 11:03:21 2017 From: report at bugs.python.org (Martijn Pieters) Date: Sun, 13 Aug 2017 15:03:21 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1502636601.61.0.982927357576.issue31161@psf.upfronthosting.co.za> Changes by Martijn Pieters : ---------- pull_requests: +3125 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 12:12:55 2017 From: report at bugs.python.org (Dan Snider) Date: Sun, 13 Aug 2017 16:12:55 +0000 Subject: [issue31194] Inconsistent __repr__s for _collections objects Message-ID: <1502640775.21.0.0795700296627.issue31194@psf.upfronthosting.co.za> New submission from Dan Snider: With the new C implementation of collections.OrderedDict, its repr correctly uses the subclass's name, unlike deque and defaultdict. class Thing(_collections.OrderedDict): pass >>> Thing() Thing([]) class Thing(_collections.deque): pass >>> Thing() deque([]) ---------- components: Library (Lib) messages: 300222 nosy: bup priority: normal severity: normal status: open title: Inconsistent __repr__s for _collections objects type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 12:55:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 13 Aug 2017 16:55:29 +0000 Subject: [issue31194] Inconsistent __repr__s for _collections objects In-Reply-To: <1502640775.21.0.0795700296627.issue31194@psf.upfronthosting.co.za> Message-ID: <1502643329.28.0.556266979856.issue31194@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 13:04:32 2017 From: report at bugs.python.org (Rajath Agasthya) Date: Sun, 13 Aug 2017 17:04:32 +0000 Subject: [issue31186] Support heapfix() and heapremove() APIs in heapq module In-Reply-To: <1502515912.85.0.983303815097.issue31186@psf.upfronthosting.co.za> Message-ID: <1502643872.73.0.793460452267.issue31186@psf.upfronthosting.co.za> Rajath Agasthya added the comment: Thanks, Raymond. I think it's fair comment, but I'm not sure which operation is O(n) though. FWIW, Go supports these operations (https://golang.org/pkg/container/heap/), so the usage is there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 14:41:24 2017 From: report at bugs.python.org (Brett Cannon) Date: Sun, 13 Aug 2017 18:41:24 +0000 Subject: [issue31195] Make any() and all() work with async generators Message-ID: <1502649683.99.0.877940152738.issue31195@psf.upfronthosting.co.za> New submission from Brett Cannon: It would be great if I could do something like: if any(x for async x in aiter()): ... But as of right now, any() complains that "TypeError: 'async_generator' object is not iterable". I would assume that any() and all() could be updated to look for __aiter__() instead of just __iter__() and do the right thing in either case? Or am I missing something subtle here? ---------- components: Library (Lib) messages: 300224 nosy: brett.cannon, giampaolo.rodola, haypo, yselivanov priority: normal severity: normal status: open title: Make any() and all() work with async generators versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 14:46:30 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sun, 13 Aug 2017 18:46:30 +0000 Subject: [issue31195] Make any() and all() work with async generators In-Reply-To: <1502649683.99.0.877940152738.issue31195@psf.upfronthosting.co.za> Message-ID: <1502649990.72.0.296081406065.issue31195@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Or am I missing something subtle here? We'll need to make any() and all() coroutines. Not simple coroutines though, but weird "hybrid" functions that preserve the old semantics + implement async stuff. I don't think this is a very good idea. Maybe we should think about "asyncitertools" package with functions like "anext", "aiter", "async_all", "async_chain", etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 14:46:55 2017 From: report at bugs.python.org (Tim Peters) Date: Sun, 13 Aug 2017 18:46:55 +0000 Subject: [issue31186] Support heapfix() and heapremove() APIs in heapq module In-Reply-To: <1502515912.85.0.983303815097.issue31186@psf.upfronthosting.co.za> Message-ID: <1502650015.7.0.217327462888.issue31186@psf.upfronthosting.co.za> Tim Peters added the comment: @Rajath, I suspect Raymond may have been bamboozled because your suggested `heapfix()` and `heapremove()` didn't appear to take any arguments. If the index is a required argument, then these are O(log N) operations. I thought about adding them years ago, but didn't find a _plausible_ use case: the index at which a specific heap item appears is pretty much senseless, and typically varies over a heap's lifetime. So how does the user know _which_ index to pass? A linear search over the underlying list to find the index of a specific heap item is probably unacceptable. The only hacks around that I could think of required a more complex kind of heap; e.g., restricting heap items to objects usable as dict keys, using a hidden dict to map heap items to their current index, and fiddling all the heap operations to keep that dict up to date. So, in the absence of an obvious way to proceed, I gave up :-) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 15:04:58 2017 From: report at bugs.python.org (Rajath Agasthya) Date: Sun, 13 Aug 2017 19:04:58 +0000 Subject: [issue31186] Support heapfix() and heapremove() APIs in heapq module In-Reply-To: <1502515912.85.0.983303815097.issue31186@psf.upfronthosting.co.za> Message-ID: <1502651098.79.0.879510010132.issue31186@psf.upfronthosting.co.za> Rajath Agasthya added the comment: > The only hacks around that I could think of required a more complex kind of heap; e.g., restricting heap items to objects usable as dict keys, using a hidden dict to map heap items to their current index, and fiddling all the heap operations to keep that dict up to date. Actually, this is *exactly* how I ended up thinking about this feature. I was using a separate dict to track the index at which objects are inserted in a heap, using the index to make updates to heap directly, and fixing the heap by calling heapify() every time which was slightly costly. Maybe I chose the wrong data structure for the problem, but constant time getMin() operation was crucial for me. And I didn't really care if inserts (or updates) were costlier. But I completely agree that it's a niche use case and I understand if we don't want to support this :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 15:10:31 2017 From: report at bugs.python.org (Rajath Agasthya) Date: Sun, 13 Aug 2017 19:10:31 +0000 Subject: [issue31186] Support heapfix() and heapremove() APIs in heapq module In-Reply-To: <1502515912.85.0.983303815097.issue31186@psf.upfronthosting.co.za> Message-ID: <1502651431.85.0.709643152133.issue31186@psf.upfronthosting.co.za> Rajath Agasthya added the comment: And yes, both of these methods do take index as the argument as shown in my patch file. I should've probably specified that. The signatures are: heapfix(heap, pos) heapremove(heap, pos) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 15:14:51 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 13 Aug 2017 19:14:51 +0000 Subject: [issue31147] a suboptimal check in list_extend() In-Reply-To: <1502206236.15.0.974518538682.issue31147@psf.upfronthosting.co.za> Message-ID: <1502651691.46.0.0922050640211.issue31147@psf.upfronthosting.co.za> Oren Milman added the comment: thank you for the elaborate reply :) do you feel the same about changing the check to (Py_SIZE(self) < (self->allocated >> 1)) ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 15:21:51 2017 From: report at bugs.python.org (Steve Barnes) Date: Sun, 13 Aug 2017 19:21:51 +0000 Subject: [issue31182] Suggested Enhancements to zipfile & tarfile command line interfaces In-Reply-To: <1502439956.47.0.572068463872.issue31182@psf.upfronthosting.co.za> Message-ID: <1502652111.53.0.209108860734.issue31182@psf.upfronthosting.co.za> Changes by Steve Barnes : ---------- pull_requests: +3126 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 16:41:20 2017 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 13 Aug 2017 20:41:20 +0000 Subject: [issue31158] test_pty: test_basic() fails randomly on Travis CI In-Reply-To: <1502275933.96.0.349321322315.issue31158@psf.upfronthosting.co.za> Message-ID: <1502656880.79.0.152095343588.issue31158@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 17:12:37 2017 From: report at bugs.python.org (Malcolm Smith) Date: Sun, 13 Aug 2017 21:12:37 +0000 Subject: [issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter Message-ID: <1502658757.92.0.0359191508861.issue31196@psf.upfronthosting.co.za> New submission from Malcolm Smith: The standard interpreter is more eager to give an error on incomplete input, while the InteractiveConsole will keep on prompting for more: Python 3.5.3 (default, Apr 10 2017, 07:53:16) [GCC 6.3.0 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> try: ... File "", line 2 ^ IndentationError: expected an indented block >>> import code >>> code.interact() Python 3.5.3 (default, Apr 10 2017, 07:53:16) [GCC 6.3.0 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> try: ... ... ... ... The InteractiveConsole isn't totally wrong here, because after all, a blank line in this position is syntactically correct. But the inconsistency is confusing. ---------- components: Library (Lib) messages: 300230 nosy: Malcolm Smith priority: normal severity: normal status: open title: Blank line inconsistency between InteractiveConsole and standard interpreter type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 17:44:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 13 Aug 2017 21:44:54 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502660694.2.0.317455154104.issue31149@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fe8d9dc479a96ef490034107e7d4a6228b4be140 by Victor Stinner (Julien Palard) in branch '2.7': bpo-31159: fix language switch regex on unknown yet built languages. ? (#3051) (#3081) https://github.com/python/cpython/commit/fe8d9dc479a96ef490034107e7d4a6228b4be140 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 17:44:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 13 Aug 2017 21:44:54 +0000 Subject: [issue31159] Doc: Language switch can't switch on specific cases In-Reply-To: <1502278726.47.0.617689885912.issue31159@psf.upfronthosting.co.za> Message-ID: <1502660694.37.0.431291261489.issue31159@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset fe8d9dc479a96ef490034107e7d4a6228b4be140 by Victor Stinner (Julien Palard) in branch '2.7': bpo-31159: fix language switch regex on unknown yet built languages. ? (#3051) (#3081) https://github.com/python/cpython/commit/fe8d9dc479a96ef490034107e7d4a6228b4be140 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 17:48:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Sun, 13 Aug 2017 21:48:21 +0000 Subject: [issue31159] Doc: Language switch can't switch on specific cases In-Reply-To: <1502660694.37.0.431291261489.issue31159@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: To choose the langague, see what Wikipedia does: Wikipedia EN displays "Fran?ais", no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 18:00:41 2017 From: report at bugs.python.org (Roundup Robot) Date: Sun, 13 Aug 2017 22:00:41 +0000 Subject: [issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms In-Reply-To: <1459322243.53.0.921219428076.issue26669@psf.upfronthosting.co.za> Message-ID: <1502661641.98.0.047847934688.issue26669@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3127 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 19:05:56 2017 From: report at bugs.python.org (Tom Viner) Date: Sun, 13 Aug 2017 23:05:56 +0000 Subject: [issue31193] re.IGNORECASE strips combining character from lower case of LATIN CAPITAL LETTER I WITH DOT ABOVE In-Reply-To: <1502631827.21.0.810598108454.issue31193@psf.upfronthosting.co.za> Message-ID: <1502665556.85.0.605203731108.issue31193@psf.upfronthosting.co.za> Changes by Tom Viner : ---------- nosy: +tomviner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 13 19:19:18 2017 From: report at bugs.python.org (Tom Viner) Date: Sun, 13 Aug 2017 23:19:18 +0000 Subject: [issue31196] Blank line inconsistency between InteractiveConsole and standard interpreter In-Reply-To: <1502658757.92.0.0359191508861.issue31196@psf.upfronthosting.co.za> Message-ID: <1502666358.23.0.865105111559.issue31196@psf.upfronthosting.co.za> Changes by Tom Viner : ---------- nosy: +tomviner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 02:39:45 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 14 Aug 2017 06:39:45 +0000 Subject: [issue31197] Namespace disassembly omits some compiled objects Message-ID: <1502692785.51.0.58821810388.issue31197@psf.upfronthosting.co.za> New submission from Nick Coghlan: In reviewing the PR for issue 31183, I noticed that the criteria for deciding which values to disassemble when disassembling a namespace (objects with a __dict__ attribute) has gotten out of sync with the criteria used by the dis() itself. The problem is that dis() checks for particular attributes that may contain code objects, while the recursive descent when processing a __dict__ attribute is based on isinstance() and a predefined list of types. My proposed remedy for this would be: 1. Factor out a dis._get_code() helper function that returns either None or a compiled code object 2. Base the recursive descent in __dict__ processing on the value either having a __dict__ attribute, or else _get_code() returning a non-None result (in the latter case, the code object itself would be passed to the recursive call, rather than the original value from the namespace) ---------- messages: 300234 nosy: ncoghlan priority: normal severity: normal status: open title: Namespace disassembly omits some compiled objects versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 02:44:55 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 14 Aug 2017 06:44:55 +0000 Subject: [issue31197] Namespace disassembly omits some compiled objects In-Reply-To: <1502692785.51.0.58821810388.issue31197@psf.upfronthosting.co.za> Message-ID: <1502693095.21.0.28930816429.issue31197@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that the current dis._get_code_object() helper doesn't *quite* cover this, as it will implicitly compile raw strings, which isn't the desired behaviour for this use case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 03:35:10 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 14 Aug 2017 07:35:10 +0000 Subject: [issue31198] getaddrinfo: inconsistent handling of port=None Message-ID: <1502696110.72.0.954086075417.issue31198@psf.upfronthosting.co.za> New submission from Nathaniel Smith: socket.getaddrinfo accepts None as a port argument, and translates it into 0. This is handy, because bind() understands 0 to mean "pick a port for me", and if you want bind to pick a port for you and port=None is a slightly more obvious way to say that then port=0. For example: >>> socket.getaddrinfo("127.0.0.1", None) [(, , 6, '', ('127.0.0.1', 0)), (, , 17, '', ('127.0.0.1', 0)), (, , 0, '', ('127.0.0.1', 0))] socket.getaddrinfo also accepts None as a host name; this is necessary because the underlying getaddrinfo(3) call has special handling for host=NULL, and we need some way to access it: >>> socket.getaddrinfo(None, 0) [(, , 6, '', ('::1', 0, 0, 0)), (, , 17, '', ('::1', 0, 0, 0)), (, , 0, '', ('::1', 0, 0, 0)), (, , 6, '', ('127.0.0.1', 0)), (, , 17, '', ('127.0.0.1', 0)), (, , 0, '', ('127.0.0.1', 0))] However, even though both of these features are supported separately... if you try to use them *together*, then socket.getaddrinfo errors out: >>> socket.getaddrinfo(None, None) socket.gaierror: [Errno -2] Name or service not known I expected that last call to be equivalent to socket.getaddrinfo(None, 0). ---------- components: Extension Modules messages: 300236 nosy: njs priority: normal severity: normal status: open title: getaddrinfo: inconsistent handling of port=None versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 03:36:20 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Mon, 14 Aug 2017 07:36:20 +0000 Subject: [issue31198] getaddrinfo: inconsistent handling of port=None In-Reply-To: <1502696110.72.0.954086075417.issue31198@psf.upfronthosting.co.za> Message-ID: <1502696180.87.0.305384012839.issue31198@psf.upfronthosting.co.za> Changes by Nathaniel Smith : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 03:54:14 2017 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 14 Aug 2017 07:54:14 +0000 Subject: [issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms In-Reply-To: <1459322243.53.0.921219428076.issue26669@psf.upfronthosting.co.za> Message-ID: <1502697254.93.0.0801683852412.issue26669@psf.upfronthosting.co.za> Mark Dickinson added the comment: > potentially questionable? I'll ask a C compiler person... Questionable indeed. Attempting to cast a NaN to an integer type results in undefined behaviour. Unfortunately, so does attempting to cast any double value that's outside the range represented by the `time_t` type, so the questionability extends beyond just the NaN handling. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 04:01:57 2017 From: report at bugs.python.org (Paulo Matos) Date: Mon, 14 Aug 2017 08:01:57 +0000 Subject: [issue31199] !HAVE_CLOCK_GETTIME causes problems with _PyTime_FromTimespec Message-ID: <1502697717.3.0.518925337608.issue31199@psf.upfronthosting.co.za> New submission from Paulo Matos: On a Fedora 26 system, I run configure as: $ ../configure --with-assertions --with-lto --with-pydebug --with-address-sanitizer --disable-ipv6 My pyconfig.h contains: /* #undef HAVE_CLOCK */ /* Define to 1 if you have the `clock_getres' function. */ /* #undef HAVE_CLOCK_GETRES */ /* Define to 1 if you have the `clock_gettime' function. */ /* #undef HAVE_CLOCK_GETTIME */ /* Define to 1 if you have the `clock_settime' function. */ /* #undef HAVE_CLOCK_SETTIME */ /* Define if the C compiler supports computed gotos. */ /* #undef HAVE_COMPUTED_GOTOS */ When this happens, __PyTime_FromTimespec is undefined in pytime.c:747. ../Python/pytime.c:747:9: error: implicit declaration of function ?_PyTime_FromTimespec?; did you mean ?_PyTime_FromTimeval?? [-Werror=implicit-function-declaration] if (_PyTime_FromTimespec(tp, &ts, raise) < 0) ^~~~~~~~~~~~~~~~~~~~ _PyTime_FromTimeval cc1: some warnings being treated as errors make[2]: *** [Makefile:1553: Python/pytime.o] Error 1 ---------- components: Build messages: 300238 nosy: pmatos priority: normal severity: normal status: open title: !HAVE_CLOCK_GETTIME causes problems with _PyTime_FromTimespec type: compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 05:15:22 2017 From: report at bugs.python.org (Paulo Matos) Date: Mon, 14 Aug 2017 09:15:22 +0000 Subject: [issue31199] !HAVE_CLOCK_GETTIME causes problems with _PyTime_FromTimespec In-Reply-To: <1502697717.3.0.518925337608.issue31199@psf.upfronthosting.co.za> Message-ID: <1502702122.29.0.996183180568.issue31199@psf.upfronthosting.co.za> Paulo Matos added the comment: OK, the problem was the missing libasan which made quite a few checks fail. We should check for libasan before all other checks, when compiling with --with-address-sanitizer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 05:21:33 2017 From: report at bugs.python.org (Paulo Matos) Date: Mon, 14 Aug 2017 09:21:33 +0000 Subject: [issue31200] address sanitizer build fails Message-ID: <1502702493.31.0.645434199194.issue31200@psf.upfronthosting.co.za> New submission from Paulo Matos: Build with address sanitizer fails miserably. Configuration in Fedora 26. I attach config.log and the output of $ ../configure --with-assertions --with-lto --with-pydebug --with-address-sanitizer --disable-ipv6 $ make -j18 profile-opt ---------- components: Build files: files.zip messages: 300240 nosy: pmatos priority: normal severity: normal status: open title: address sanitizer build fails type: compile error Added file: http://bugs.python.org/file47081/files.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 06:43:48 2017 From: report at bugs.python.org (Paulo Matos) Date: Mon, 14 Aug 2017 10:43:48 +0000 Subject: [issue31201] module test that failed doesn't exist Message-ID: <1502707428.17.0.905101363291.issue31201@psf.upfronthosting.co.za> New submission from Paulo Matos: Trying to rerun the tests that failed but it just says that the module doesn't exist. I am running the exact command line mentioned in the readme file: $ make test TESTOPTS="-v test_that_failed" running build running build_ext The following modules found by detect_modules() in setup.py, have been built by the Makefile instead, as configured by the Setup files: atexit pwd time running build_scripts copying and adjusting /home/pmatos/Projects/cpython/Tools/scripts/pydoc3 -> build/scripts-3.7 copying and adjusting /home/pmatos/Projects/cpython/Tools/scripts/idle3 -> build/scripts-3.7 copying and adjusting /home/pmatos/Projects/cpython/Tools/scripts/2to3 -> build/scripts-3.7 copying and adjusting /home/pmatos/Projects/cpython/Tools/scripts/pyvenv -> build/scripts-3.7 changing mode of build/scripts-3.7/pydoc3 from 664 to 775 changing mode of build/scripts-3.7/idle3 from 664 to 775 changing mode of build/scripts-3.7/2to3 from 664 to 775 changing mode of build/scripts-3.7/pyvenv from 664 to 775 renaming build/scripts-3.7/pydoc3 to build/scripts-3.7/pydoc3.7 renaming build/scripts-3.7/idle3 to build/scripts-3.7/idle3.7 renaming build/scripts-3.7/2to3 to build/scripts-3.7/2to3-3.7 renaming build/scripts-3.7/pyvenv to build/scripts-3.7/pyvenv-3.7 ./python ../Tools/scripts/run_tests.py -v test_that_failed /home/pmatos/Projects/cpython/debug/python -u -W default -bb -E -W error::BytesWarning -m test -r -w -j 0 -u all,-largefile,-audio,-gui -v test_that_failed == CPython 3.7.0a0 (heads/master:48d9823a0e, Aug 14 2017, 11:53:56) [GCC 7.1.1 20170622 (Red Hat 7.1.1-3)] == Linux-4.11.11-300.fc26.x86_64-x86_64-with-fedora-26-Twenty_Six little-endian == hash algorithm: siphash24 64bit == cwd: /home/pmatos/Projects/cpython/debug/build/test_python_22582 == CPU count: 16 == encodings: locale=UTF-8, FS=utf-8 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=1, verbose=0, bytes_warning=2, quiet=0, hash_randomization=1, isolated=0) Using random seed 8085058 Run tests in parallel using 18 child processes 0:00:00 load avg: 15.90 [1/1/1] test_that_failed failed test test_that_failed crashed -- Traceback (most recent call last): File "/home/pmatos/Projects/cpython/Lib/test/libregrtest/runtest.py", line 163, in runtest_inner the_module = importlib.import_module(abstest) File "/home/pmatos/Projects/cpython/Lib/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'test.test_that_failed' 1 test failed: test_that_failed Re-running failed tests in verbose mode Re-running test 'test_that_failed' in verbose mode test test_that_failed crashed -- Traceback (most recent call last): File "/home/pmatos/Projects/cpython/Lib/test/libregrtest/runtest.py", line 163, in runtest_inner the_module = importlib.import_module(abstest) File "/home/pmatos/Projects/cpython/Lib/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'test.test_that_failed' 1 test failed again: test_that_failed Total duration: 355 ms Tests result: FAILURE make: *** [Makefile:1019: test] Error 2 ---------- components: Tests messages: 300241 nosy: pmatos priority: normal severity: normal status: open title: module test that failed doesn't exist _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 07:28:45 2017 From: report at bugs.python.org (INADA Naoki) Date: Mon, 14 Aug 2017 11:28:45 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502710125.8.0.751950043364.issue31149@psf.upfronthosting.co.za> INADA Naoki added the comment: My preference is "Japanese". After selecting drop down list, we can type "jap" to select Japanese. On the other hand, we should use IME to input "???". It's not so easy as input alphabets. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 09:46:21 2017 From: report at bugs.python.org (Julien Palard) Date: Mon, 14 Aug 2017 13:46:21 +0000 Subject: [issue31200] address sanitizer build fails In-Reply-To: <1502702493.31.0.645434199194.issue31200@psf.upfronthosting.co.za> Message-ID: <1502718381.08.0.738756776165.issue31200@psf.upfronthosting.co.za> Julien Palard added the comment: Are you sure you build is failing? It looks like it succeeded, if we only speak about the build. You're seeing AddressSanitizer reports because, during the build, the built python is used. Like in `./python -E -S -m sysconfig --generate-posix-vars`. So if you see AddressSanitizer output, it's because a `./python` has been successfully built and used. The built cpython with AddressSanitizer however reports leaks, which is probably reproductible by running, typically: ./python -c '' ---------- nosy: +mdk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 09:55:19 2017 From: report at bugs.python.org (Larry Hastings) Date: Mon, 14 Aug 2017 13:55:19 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1502718919.37.0.316114490392.issue31106@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset d4b93e21c2664d6a78e0656e7a7be0807be1c352 by larryhastings (????????? ????) in branch 'master': bpo-31106: Fix handling of erros in posix_fallocate() and posix_fadvise() (#3000) (#3000) https://github.com/python/cpython/commit/d4b93e21c2664d6a78e0656e7a7be0807be1c352 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 09:57:32 2017 From: report at bugs.python.org (aicirbs) Date: Mon, 14 Aug 2017 13:57:32 +0000 Subject: [issue31202] Windows pathlib.Path.glob(pattern) fixed part of the pattern changed to lowercase whereas it should be unchanged. Message-ID: <1502719052.2.0.11123711046.issue31202@psf.upfronthosting.co.za> New submission from aicirbs: Windows pathlib.Path.glob(pattern) fixed part of the pattern to lowercase whereas it should be unchanged. Note that this issue is different from http://bugs.python.org/issue26655 : "pathlib glob case sensitivity issue on Windows" where it was asked to get the actual case of the folder from the file system. Assuming a directory contains a folder named 'Folder'. On Windows, calling pathlib.Path().glob('Folder') gives 'folder', but 'Folde?' will return 'Folder' This is an issue for instance if trying to glob files to put them in an archive to be sent to a case sensitive platform. glob.glob() does behave properly though, Windows pathlib.Path is the only platform which has such a behavior. I would expect Path.glob to output the same as glob.glob() for each platform. >From comments on http://bugs.python.org/issue19718 : "Path.glob() on case-insensitive Posix filesystems" it sounds that it should even match the native shell behavior. And it looks like it is the case for linux and macOS, I tested that with the following script, whose results on win32, darwin and linux platforms follow: ``` #!/usr/bin/env python3.6 # Let's say this path exists : ./Folder/file from pathlib import Path import glob import os import sys import subprocess def ls(pattern): if sys.platform in ('win32', 'win64'): process = subprocess.run(['powershell', '-Command', f'dir {pattern}'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, cwd=os.getcwd(), encoding='utf-8') if process.returncode: return [] # expected output: # # # Directory: C:\path_to\Folder # # # Mode LastWriteTime Length Name # ---- ------------- ------ ---- # -a---- 2017-08-14 10:16 0 file lines = process.stdout.splitlines() folder = os.path.basename(lines[2].split()[-1]) file = lines[7].split()[-1] result = f"{folder}{os.path.sep}{file}" return [result] else: cmd = ['ls', f'{pattern}'] process = subprocess.run(' '.join(cmd), stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=os.getcwd(), encoding='utf-8', shell=True) if process.returncode: return [] return [process.stdout.strip()] def main(): print(sys.platform) p = Path('.') tests = ['Folder/*', 'FOlder/*', 'F?lder/*', 'FOlde?/*', 'folder/*', 'f?lder/*'] for t in tests: print(f'{t}:') print(f' Path.glob(): {[str(f) for f in p.glob(t)]}') print(f' glob.glob(): {[f for f in glob.glob(str(p/t))]}') print(f' shell: {ls(str(p/t))}') if __name__ == '__main__': main() ``` ``` Output: win32 darwin linux 1: Folder/*: Folder/*: Folder/*: 1a: Path.glob(): ['folder\\file'] Path.glob(): ['Folder/file'] Path.glob(): ['Folder/file'] 1b: glob.glob(): ['Folder\\file'] glob.glob(): ['Folder/file'] glob.glob(): ['Folder/file'] 1c: shell: ['Folder\\file'] shell: ['Folder/file'] shell: ['Folder/file'] 2: FOlder/*: FOlder/*: FOlder/*: 2a: Path.glob(): ['folder\\file'] Path.glob(): ['FOlder/file'] Path.glob(): [] 2b: glob.glob(): ['FOlder\\file'] glob.glob(): ['FOlder/file'] glob.glob(): [] 2c: shell: ['FOlder\\file'] shell: ['FOlder/file'] shell: [] 3: F?lder/*: F?lder/*: F?lder/*: 3a: Path.glob(): ['Folder\\file'] Path.glob(): ['Folder/file'] Path.glob(): ['Folder/file'] 3b: glob.glob(): ['Folder\\file'] glob.glob(): ['Folder/file'] glob.glob(): ['Folder/file'] 3c: shell: ['Folder\\file'] shell: ['Folder/file'] shell: ['Folder/file'] 4: FOlde?/*: FOlde?/*: FOlde?/*: 4a: Path.glob(): ['Folder\\file'] Path.glob(): [] Path.glob(): [] 4b: glob.glob(): ['Folder\\file'] glob.glob(): [] glob.glob(): [] 4c: shell: ['Folder\\file'] shell: [] shell: [] 5: folder/*: folder/*: folder/*: 5a: Path.glob(): ['folder\\file'] Path.glob(): ['folder/file'] Path.glob(): [] 5b: glob.glob(): ['folder\\file'] glob.glob(): ['folder/file'] glob.glob(): [] 5c: shell: ['folder\\file'] shell: ['folder/file'] shell: [] 6: f?lder/*: f?lder/*: f?lder/*: 6a: Path.glob(): ['Folder\\file'] Path.glob(): [] Path.glob(): [] 6b: glob.glob(): ['Folder\\file'] glob.glob(): [] glob.glob(): [] 6c: shell: ['Folder\\file'] shell: [] shell: [] ``` ---------- components: Library (Lib), Windows messages: 300245 nosy: aicirbs, paul.moore, steve.dower, tim.golden, zach.ware priority: normal pull_requests: 3128 severity: normal status: open title: Windows pathlib.Path.glob(pattern) fixed part of the pattern changed to lowercase whereas it should be unchanged. type: behavior versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 09:59:16 2017 From: report at bugs.python.org (Larry Hastings) Date: Mon, 14 Aug 2017 13:59:16 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1502719156.52.0.634663041869.issue31106@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- pull_requests: +3129 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 10:14:34 2017 From: report at bugs.python.org (Julien Palard) Date: Mon, 14 Aug 2017 14:14:34 +0000 Subject: [issue31200] address sanitizer build fails In-Reply-To: <1502702493.31.0.645434199194.issue31200@psf.upfronthosting.co.za> Message-ID: <1502720074.04.0.257210489688.issue31200@psf.upfronthosting.co.za> Julien Palard added the comment: Some (most?) of them looks to be unicode strings, and according to the very end of the main function: #ifdef __INSURE__ /* Insure++ is a memory analysis tool that aids in discovering * memory leaks and other memory problems. On Python exit, the * interned string dictionaries are flagged as being in use at exit * (which it is). Under normal circumstances, this is fine because * the memory will be automatically reclaimed by the system. Under * memory debugging, it's a huge source of useless noise, so we * trade off slower shutdown for less distraction in the memory * reports. -baw */ _Py_ReleaseInternedUnicodeStrings(); #endif /* __INSURE__ */ So, to ensure everything is as expected, I compiled with the __INSURE__ flag, and got: releasing 1894 interned strings total size of all interned strings: 17945/0 mortal/immortal ASAN:DEADLYSIGNAL ================================================================= ==23814==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000000a0 (pc 0x5575b1c16904 bp 0x7ffe1c4f1f60 sp 0x7ffe1c4f1f40 T0) #0 0x5575b1c16903 in list_dealloc (/home/mdk/Downloads/cpython/python+0x524903) #1 0x5575b1bf287d in _Py_Dealloc (/home/mdk/Downloads/cpython/python+0x50087d) #2 0x5575b1c3daca in _Py_ReleaseInternedUnicodeStrings (/home/mdk/Downloads/cpython/python+0x54baca) #3 0x5575b206c0d3 in Py_Main (/home/mdk/Downloads/cpython/python+0x97a0d3) #4 0x5575b206d1d2 in main (/home/mdk/Downloads/cpython/python+0x97b1d2) #5 0x7f5ed0b622b0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202b0) #6 0x5575b1b1f8d9 in _start (/home/mdk/Downloads/cpython/python+0x42d8d9) AddressSanitizer can not provide additional info. SUMMARY: AddressSanitizer: SEGV (/home/mdk/Downloads/cpython/python+0x524903) in list_dealloc ==23814==ABORTING Which in this case does not looks normal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 10:25:58 2017 From: report at bugs.python.org (=?utf-8?b?QmVybsOhdCBHw6Fib3I=?=) Date: Mon, 14 Aug 2017 14:25:58 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1502720758.58.0.322077763237.issue31024@psf.upfronthosting.co.za> Bern?t G?bor added the comment: how can we find it out? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 10:59:44 2017 From: report at bugs.python.org (Laurent GUERBY) Date: Mon, 14 Aug 2017 14:59:44 +0000 Subject: [issue31203] socket.IP_PKTINFO is missing from python Message-ID: <1502722784.42.0.622750235869.issue31203@psf.upfronthosting.co.za> New submission from Laurent GUERBY: The constant socket.IP_PKTINFO is missing. Definition on Linux: http://elixir.free-electrons.com/linux/v4.12.7/source/include/uapi/linux/in.h#L96 Exemple code that would benefit from the definition: https://chiliproject.tetaneutral.net/projects/tetaneutral/wiki/Netconsole#nagios-selectors Note: socket.IPV6_PKTINFO is defined :). ---------- components: Library (Lib) messages: 300248 nosy: guerby priority: normal severity: normal status: open title: socket.IP_PKTINFO is missing from python type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 11:09:27 2017 From: report at bugs.python.org (Laurent GUERBY) Date: Mon, 14 Aug 2017 15:09:27 +0000 Subject: [issue31203] socket.IP_PKTINFO is missing from python In-Reply-To: <1502722784.42.0.622750235869.issue31203@psf.upfronthosting.co.za> Message-ID: <1502723367.85.0.436232467903.issue31203@psf.upfronthosting.co.za> Laurent GUERBY added the comment: Probable fix in Modules/socketmodule.c after /* IPv4 [gs]etsockopt options */ add: #ifdef IP_PKTINFO PyModule_AddIntMacro(m, IP_PKTINFO); #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 11:10:59 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 Aug 2017 15:10:59 +0000 Subject: [issue31201] module test that failed doesn't exist In-Reply-To: <1502707428.17.0.905101363291.issue31201@psf.upfronthosting.co.za> Message-ID: <1502723459.44.0.256049938977.issue31201@psf.upfronthosting.co.za> R. David Murray added the comment: Replace "test_that_failed" with the name of the test that failed. The README could be improved by saying: If any tests fail, you can re-run the failing test(s) in verbose mode. For example if, 'test_os' and 'test_gdb' failed, you can run:: make test TESTOPTS="-v test_os test_gdb" ---------- assignee: -> docs at python components: +Documentation -Tests nosy: +docs at python, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 11:13:34 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 Aug 2017 15:13:34 +0000 Subject: [issue31199] configure checks fail confusingly under --with-address-sanitizer if libasan is missing In-Reply-To: <1502697717.3.0.518925337608.issue31199@psf.upfronthosting.co.za> Message-ID: <1502723614.41.0.788071144007.issue31199@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: !HAVE_CLOCK_GETTIME causes problems with _PyTime_FromTimespec -> configure checks fail confusingly under --with-address-sanitizer if libasan is missing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 11:21:08 2017 From: report at bugs.python.org (Paulo Matos) Date: Mon, 14 Aug 2017 15:21:08 +0000 Subject: [issue31201] module test that failed doesn't exist In-Reply-To: <1502707428.17.0.905101363291.issue31201@psf.upfronthosting.co.za> Message-ID: <1502724068.53.0.534711101255.issue31201@psf.upfronthosting.co.za> Paulo Matos added the comment: Argh, apologies David. I hadn't noticed the mistake. I simply copy/pasted and was expecting the command line to rerun all the tests that had previously failed. I was assuming the suite had some kind of state that recorded the tests that previously failed and ran only those. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 11:28:25 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 Aug 2017 15:28:25 +0000 Subject: [issue31201] module test that failed doesn't exist In-Reply-To: <1502707428.17.0.905101363291.issue31201@psf.upfronthosting.co.za> Message-ID: <1502724505.33.0.303714118936.issue31201@psf.upfronthosting.co.za> R. David Murray added the comment: Yep, I figured that. That's why I suggested the clarification to the README, if someone wants to generate a PR for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 11:28:47 2017 From: report at bugs.python.org (Julien Palard) Date: Mon, 14 Aug 2017 15:28:47 +0000 Subject: [issue31200] address sanitizer build fails In-Reply-To: <1502702493.31.0.645434199194.issue31200@psf.upfronthosting.co.za> Message-ID: <1502724527.72.0.301685843417.issue31200@psf.upfronthosting.co.za> Julien Palard added the comment: Segfault occur in Include/object.h line 1054: #define Py_TRASHCAN_SAFE_BEGIN(op) \ do { \ PyThreadState *_tstate = PyThreadState_GET(); \ if (_tstate->trash_delete_nesting < PyTrash_UNWIND_LEVEL) { \ ?_tstate->trash_delete_nesting; /* The body of the deallocator is here. */ the _tstate is null at this moment. It's NULL because in the main, right before the _Py_ReleaseInternedUnicodeStrings there's a call to Py_FinalizeEx which calls PyThreadState_Swap(NULL), see pylifecycle.c:1097: /* Delete current thread. After this, many C API calls become crashy. */ PyThreadState_Swap(?); But there's probably still references to strings before the Py_FinalizeEx so it does not make sense to garbage collect before it. Maybe make Py_TRASHCAN_SAFE_BEGIN more robust by disabling the counter when the state is NULL? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 12:39:54 2017 From: report at bugs.python.org (Daniel Watkins) Date: Mon, 14 Aug 2017 16:39:54 +0000 Subject: [issue31129] RawConfigParser.items() is unusual in taking arguments In-Reply-To: <1502078933.65.0.798462902744.issue31129@psf.upfronthosting.co.za> Message-ID: Daniel Watkins added the comment: Having ironed out my confusion over typing the method, I agree that making the types more obvious is not a compelling argument for this change. That said, I think the current API has been confusing to me in the past, and I think the proposed change is still a worthwhile improvement for users of this module. On Mon, Aug 7, 2017 at 12:08 AM Guido van Rossum wrote: > > Guido van Rossum added the comment: > > I think the proposed change is not worth it. Developments in type checking > (in particular overloading) make it unambiguous what the return type will > be from just a static inspection of the call site. (Given that the _UNSET > value is intended to be private.) See also > https://github.com/python/mypy/issues/3805#issuecomment-320561797 > > ---------- > nosy: +gvanrossum > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 12:44:42 2017 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 14 Aug 2017 16:44:42 +0000 Subject: [issue31129] RawConfigParser.items() is unusual in taking arguments In-Reply-To: <1502076510.54.0.648446505741.issue31129@psf.upfronthosting.co.za> Message-ID: <1502729082.18.0.789866159674.issue31129@psf.upfronthosting.co.za> Guido van Rossum added the comment: I don't think this is worth it. ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 13:45:53 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 14 Aug 2017 17:45:53 +0000 Subject: [issue31195] Make any() and all() work with async generators In-Reply-To: <1502649683.99.0.877940152738.issue31195@psf.upfronthosting.co.za> Message-ID: <1502732753.43.0.305057646436.issue31195@psf.upfronthosting.co.za> Brett Cannon added the comment: I figured there was something. :( Closing this as "rejected". ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 13:57:37 2017 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 14 Aug 2017 17:57:37 +0000 Subject: [issue31193] re.IGNORECASE strips combining character from lower case of LATIN CAPITAL LETTER I WITH DOT ABOVE In-Reply-To: <1502631827.21.0.810598108454.issue31193@psf.upfronthosting.co.za> Message-ID: <1502733456.99.0.422932492964.issue31193@psf.upfronthosting.co.za> Matthew Barnett added the comment: The re module works with codepoints, it doesn't understand canonical equivalence. For example, it doesn't recognise that "\N{LATIN CAPITAL LETTER E}\N{COMBINING ACUTE ACCENT}" is equivalent to "\N{LATIN CAPITAL LETTER E WITH ACUTE}". This is true for Python in general, except for identifiers, which are normalised: >>> "\N{LATIN CAPITAL LETTER E}\N{COMBINING ACUTE ACCENT}" 'E?' >>> E? = 0 >>> "\N{LATIN CAPITAL LETTER E WITH ACUTE}" '?' >>> ? 0 This also means that, say '.' will match only 1 _codepoint_. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 14:03:49 2017 From: report at bugs.python.org (David MacIver) Date: Mon, 14 Aug 2017 18:03:49 +0000 Subject: [issue31193] re.IGNORECASE strips combining character from lower case of LATIN CAPITAL LETTER I WITH DOT ABOVE In-Reply-To: <1502631827.21.0.810598108454.issue31193@psf.upfronthosting.co.za> Message-ID: <1502733829.95.0.00398950633966.issue31193@psf.upfronthosting.co.za> David MacIver added the comment: Sure, but 'i' is a single code point. The bug is that the regex matches 'i', not that it doesn't match the actual two codepoint lower case of the string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 14:09:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 14 Aug 2017 18:09:36 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1502734176.24.0.46528992803.issue31106@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Needed a NEWS entry. ---------- nosy: +serhiy.storchaka versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 14:39:48 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 Aug 2017 18:39:48 +0000 Subject: [issue30824] Add mimetype for extension .json In-Reply-To: <1498937496.5.0.283718177471.issue30824@psf.upfronthosting.co.za> Message-ID: <1502735988.4.0.838394691877.issue30824@psf.upfronthosting.co.za> R. David Murray added the comment: New changeset 8204b903683f9e0f037ccfaa87622716019914d7 by R. David Murray (Nate Tangsurat) in branch 'master': bpo-30824: Add mimetype for .json (#3048) https://github.com/python/cpython/commit/8204b903683f9e0f037ccfaa87622716019914d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 14:40:22 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 Aug 2017 18:40:22 +0000 Subject: [issue30824] Add mimetype for extension .json In-Reply-To: <1498937496.5.0.283718177471.issue30824@psf.upfronthosting.co.za> Message-ID: <1502736022.17.0.181024419012.issue30824@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: needs patch -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 14:54:55 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 14 Aug 2017 18:54:55 +0000 Subject: [issue31191] Fix grammar in threading.Barrier docs Message-ID: <1502736895.43.0.873183336096.issue31191@psf.upfronthosting.co.za> New submission from Mariatta Wijaya: New changeset 143be366295038b36fc32c44b8e1b48a375eab56 by Mariatta (Saurabh Chaturvedi) in branch 'master': bpo-31191: Improve grammar in threading.Barrier docs (GH-3080) https://github.com/python/cpython/commit/143be366295038b36fc32c44b8e1b48a375eab56 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 14:55:32 2017 From: report at bugs.python.org (Steve Dower) Date: Mon, 14 Aug 2017 18:55:32 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1502736932.21.0.391353043048.issue31148@psf.upfronthosting.co.za> Steve Dower added the comment: The general requirements of an installer are: * runs without any preinstalled prerequisites * does not install anything permanent until the user says so (Visual Studio breaks this rule :( ) * installs all required prerequisites * install on all supported operating systems * allow users to [de]select optional components * correctly uninstall previous compatible versions * correctly do *not* uninstall previous identical versions * update user environment settings (registry, environment, etc.) * create Start Menu shortcuts * create file associations * create context menus * install files into customizable location with correct security settings * correctly roll back when installation fails, including restoring previously uninstalled components and attempting to execute installed tools that may not be installed correctly * attempt to execute just-installed components that may not be installed correctly (e.g. ensurepip, compileall, trigger environment variable reload) * detect and abort when installation is going to fail, and explain to the user how to solve the problem * provide live progress feedback and information about what operations are occurring * provide detailed log files to help offer user support post-installation, and help users find those logs * provide registration information so the operating system can help users modify or remove the installation * allow users to modify, repair and upgrade the installation without corrupting it (or any others) or forcing them to remove/reinstall * allow users to choose whether to install just for themselves or for the entire machine, and request correct permissions based on this choice * allow administrators to script an entire installation and have it run silently and/or with progress (and cancellation) only * allow users to minimize download size by deselecting optional components * allow users to obtain all optional components to allow full installation without public internet access * install without executing arbitrary third-party code that may have been maliciously placed in a user's download directory * automatically include new files added by developers who have not explicitly modified the installer These are all the features of our current installer, and nearly all of them work for basically every user. Many of these are literally not achievable with just an MSI, or require significantly more complicated commands to be run by the end user, rather than providing options in a user interface. If you're still interested in giving it a go, visit http://wixtoolset.org/ and have a look at their tools. These are the gold-standard right now for building MSIs (and Burn bundles, which is what we currently have). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 14:57:06 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 14 Aug 2017 18:57:06 +0000 Subject: [issue31191] Fix grammar in threading.Barrier docs In-Reply-To: <1502736895.43.0.873183336096.issue31191@psf.upfronthosting.co.za> Message-ID: <1502737026.51.0.923275330216.issue31191@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> backport needed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 14:57:13 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 14 Aug 2017 18:57:13 +0000 Subject: [issue31191] Fix grammar in threading.Barrier docs In-Reply-To: <1502736895.43.0.873183336096.issue31191@psf.upfronthosting.co.za> Message-ID: <1502737033.14.0.221532381271.issue31191@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 15:22:48 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 14 Aug 2017 19:22:48 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1502738568.67.0.696481417601.issue31024@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Bern?t, I would recommend asking this on Sphinx tracker (I also assigned this to docs at python since this seems to be a purely documentation issue). https://github.com/sphinx-doc/sphinx ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 15:42:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 14 Aug 2017 19:42:48 +0000 Subject: [issue1612262] Class Browser doesn't show internal classes Message-ID: <1502739768.66.0.783150154694.issue1612262@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +IDLE: add docstrings to browser.py stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 16:39:24 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Mon, 14 Aug 2017 20:39:24 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1502743164.8.0.154130267522.issue31106@psf.upfronthosting.co.za> ???? ????????? added the comment: If I understand right, Python 3.5 will not be fixed with this pathc. Right ? If yes, I will tell Debian maintainers to backport this patch to Python 3.5, which is shipped with latest stable Debian 9. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 17:40:21 2017 From: report at bugs.python.org (Julien Palard) Date: Mon, 14 Aug 2017 21:40:21 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502746821.71.0.201977741587.issue31149@psf.upfronthosting.co.za> Julien Palard added the comment: @inada make sense, so I'll change "Fran?ais" for "French" for consistency. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 18:14:15 2017 From: report at bugs.python.org (Larry Hastings) Date: Mon, 14 Aug 2017 22:14:15 +0000 Subject: [issue31106] os.posix_fallocate() generate exception with errno 0 In-Reply-To: <1501686186.83.0.555586832167.issue31106@psf.upfronthosting.co.za> Message-ID: <1502748855.71.0.276136184177.issue31106@psf.upfronthosting.co.za> Larry Hastings added the comment: You understand correctly. It won't be backported to Python 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 18:14:19 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Aug 2017 22:14:19 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1502748859.32.0.919235430472.issue30983@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset 2e0f4db114424a00354eab889ba8f7334a2ab8f0 by ?ukasz Langa (Bruno "Polaco" Penteado) in branch 'master': bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (#2803) https://github.com/python/cpython/commit/2e0f4db114424a00354eab889ba8f7334a2ab8f0 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 18:31:41 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Aug 2017 22:31:41 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1502749901.98.0.417229241485.issue30983@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- pull_requests: +3130 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 18:40:41 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Aug 2017 22:40:41 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1502750441.48.0.496837998778.issue30983@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- pull_requests: +3131 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 18:44:19 2017 From: report at bugs.python.org (Lin Tian) Date: Mon, 14 Aug 2017 22:44:19 +0000 Subject: [issue31170] expat: utf8_toUtf8 cannot properly handle exhausting buffer In-Reply-To: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> Message-ID: <1502750659.33.0.0265940375655.issue31170@psf.upfronthosting.co.za> Lin Tian added the comment: Reactive this issue as to let you know that libexpat has confirmed and fixed the bug and they are interested in porting the fix to python. Reactive this in case you want to know what's going on and make a decision accordingly. (Sorry, I'm not very familiar with process here) ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 19:06:30 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Aug 2017 23:06:30 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1502751990.83.0.437192827773.issue30983@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset 09b77165e3fffa7b7ff160ad06042cdcfa004bf5 by ?ukasz Langa in branch '3.6': [3.6] bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (GH-2803) (#3090) https://github.com/python/cpython/commit/09b77165e3fffa7b7ff160ad06042cdcfa004bf5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 19:06:59 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 14 Aug 2017 23:06:59 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1502752019.71.0.296983101142.issue30983@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 20:04:36 2017 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 15 Aug 2017 00:04:36 +0000 Subject: [issue31204] Support __fspath__ in shlex.quote Message-ID: <1502755476.29.0.30041692032.issue31204@psf.upfronthosting.co.za> New submission from Anthony Sottile: Given shlex.quote often is used closely with calls in `subprocess`, should it also support quoting __fspath__ objects? I'll write up a quick patch for this ---------- components: Library (Lib) messages: 300270 nosy: Anthony Sottile priority: normal severity: normal status: open title: Support __fspath__ in shlex.quote type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 20:07:16 2017 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 15 Aug 2017 00:07:16 +0000 Subject: [issue31204] Support __fspath__ in shlex.quote In-Reply-To: <1502755476.29.0.30041692032.issue31204@psf.upfronthosting.co.za> Message-ID: <1502755636.09.0.451153195633.issue31204@psf.upfronthosting.co.za> Anthony Sottile added the comment: Ah oops, I'm incorrect here, the __fspath__ object I was dealing with supported __str__ and that's how subprocess was converting it -- not via __fspath__. ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 20:58:54 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Aug 2017 00:58:54 +0000 Subject: [issue31194] Inconsistent __repr__s for _collections objects In-Reply-To: <1502640775.21.0.0795700296627.issue31194@psf.upfronthosting.co.za> Message-ID: <1502758734.8.0.19188447861.issue31194@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger priority: normal -> low versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:03:28 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 15 Aug 2017 01:03:28 +0000 Subject: [issue31194] Inconsistent __repr__s for _collections objects In-Reply-To: <1502640775.21.0.0795700296627.issue31194@psf.upfronthosting.co.za> Message-ID: <1502759008.91.0.234964522853.issue31194@psf.upfronthosting.co.za> Raymond Hettinger added the comment: IIRC, deque() did this to better match the behavior of list(). Not everything in Python is consistent and sometimes we have to pick and choose between what we want to be consistent with. For the most part, the decisions have worked out well in practice (deque.__repr__ hasn't seemed to bother anyone in its dozen year history). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:13:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:13:03 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog Message-ID: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Do as did with #31050 and GenPage class. This should be done *before* #31001, highlights test. ---------- assignee: terry.reedy components: IDLE messages: 300273 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE, configdialog: Factor out KeysPage class from ConfigDialog type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:21:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:21:48 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab In-Reply-To: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> Message-ID: <1502760108.78.0.782801368637.issue31002@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 2f8964634918bdf09107c49a2d5ca62460091e54 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-31002: IDLE: Add tests for configdialog keys tab (#2996) https://github.com/python/cpython/commit/2f8964634918bdf09107c49a2d5ca62460091e54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:24:19 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:24:19 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab In-Reply-To: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> Message-ID: <1502760259.35.0.773504925518.issue31002@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3132 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:26:25 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:26:25 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1502760385.34.0.377656452977.issue31205@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Let me know if you start on this. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:32:33 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:32:33 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab In-Reply-To: <1501563588.57.0.756606299047.issue31001@psf.upfronthosting.co.za> Message-ID: <1502760753.69.0.360782725519.issue31001@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If we do the same renamings for the theme selection vars and functions as done for keys selection on the keys tab, then the corresponding tests can be copied and slightly altered. However, duplicate names require that KeyPage be separated first. Hence the dependency. When the current mess is replaced on both pages, we *might* be able to make a simple Frame subclass tested once and used on both pages. ---------- dependencies: +IDLE, configdialog: Factor out KeysPage class from ConfigDialog nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:45:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:45:04 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab In-Reply-To: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> Message-ID: <1502761504.9.0.896142037034.issue31002@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset a31459008c5b3230363d155a2e8616664dc4f0c6 by Terry Jan Reedy in branch '3.6': [3.6] bpo-31002: IDLE: Add tests for configdialog keys tab (GH-2996) (#3092) https://github.com/python/cpython/commit/a31459008c5b3230363d155a2e8616664dc4f0c6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:48:57 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:48:57 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog Message-ID: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> New submission from Terry J. Reedy: As with #31050, #31205 ---------- assignee: terry.reedy components: IDLE messages: 300278 nosy: csabella, terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE, configdialog: Factor out HighPage class from ConfigDialog type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:49:11 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:49:11 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1502761751.47.0.10596110117.issue31206@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +IDLE: Add tests for configdialog highlight tab _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:52:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:52:03 +0000 Subject: [issue31207] IDLE, configdialog: Factor out ExtPage class from ConfigDialog Message-ID: <1502761923.78.0.599195471762.issue31207@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: terry.reedy components: IDLE nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE, configdialog: Factor out ExtPage class from ConfigDialog versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:53:21 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:53:21 +0000 Subject: [issue31207] IDLE, configdialog: Factor out ExtPage class from ConfigDialog Message-ID: <1502762001.43.0.215636326288.issue31207@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +IDLE: Add tests for configdialog extensions tab _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:54:36 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:54:36 +0000 Subject: [issue31093] IDLE: Add tests for configdialog extensions tab Message-ID: <1502762076.64.0.663384568036.issue31093@psf.upfronthosting.co.za> New submission from Terry J. Reedy: It is not clear what will be left after #27099 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 21:55:44 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 01:55:44 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab In-Reply-To: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> Message-ID: <1502762144.29.0.246787058558.issue31002@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Great work. Thank you. Next: #31205, #31001, #31206, then ... ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 22:11:14 2017 From: report at bugs.python.org (Nathaniel Smith) Date: Tue, 15 Aug 2017 02:11:14 +0000 Subject: [issue31198] getaddrinfo: inconsistent handling of port=None In-Reply-To: <1502696110.72.0.954086075417.issue31198@psf.upfronthosting.co.za> Message-ID: <1502763074.41.0.507080231318.issue31198@psf.upfronthosting.co.za> Nathaniel Smith added the comment: Ugh, apparently this weird behavior is actually mandated by the RFC :-(. RFC 3493: The nodename and servname arguments are either null pointers or pointers to null-terminated strings. One or both of these two arguments must be a non-null pointer. So... never mind! ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 23:23:46 2017 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 15 Aug 2017 03:23:46 +0000 Subject: [issue26510] [argparse] Add required argument to add_subparsers In-Reply-To: <1457445361.5.0.530669445668.issue26510@psf.upfronthosting.co.za> Message-ID: <1502767426.91.0.40728157123.issue26510@psf.upfronthosting.co.za> Anthony Sottile added the comment: I've added a patch for this https://github.com/python/cpython/pull/3027 Would love to get a review so it could be included ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 14 23:49:22 2017 From: report at bugs.python.org (TaoQingyun) Date: Tue, 15 Aug 2017 03:49:22 +0000 Subject: [issue31208] Simplify `low_fds_to_close` in subprocess.py Message-ID: <1502768962.86.0.659487659571.issue31208@psf.upfronthosting.co.za> Changes by TaoQingyun <845767657 at qq.com>: ---------- components: Library (Lib) files: subprocess.patch keywords: patch nosy: qingyunha priority: normal severity: normal status: open title: Simplify `low_fds_to_close` in subprocess.py type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file47082/subprocess.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 00:03:38 2017 From: report at bugs.python.org (Anthony Sottile) Date: Tue, 15 Aug 2017 04:03:38 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1502769818.72.0.680433906494.issue9253@psf.upfronthosting.co.za> Anthony Sottile added the comment: I've attempted to address some of the backward/forward compatibility issue with subparsers becoming optional by default (vs required by default in python2) with this pull request: https://github.com/python/cpython/pull/3027 (would love to get a review as well!) ---------- nosy: +Anthony Sottile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 00:49:11 2017 From: report at bugs.python.org (Alex Hayes) Date: Tue, 15 Aug 2017 04:49:11 +0000 Subject: [issue31209] MappingProxyType can not be pickled Message-ID: <1502772551.88.0.290451219237.issue31209@psf.upfronthosting.co.za> New submission from Alex Hayes: I imagine that this is by design (likely because it can't be implemented) however I wanted to check if this was the case. Instances of types.MappingProxyType can't be pickled. For example; ``` import pickle from types import MappingProxyType eggs = MappingProxyType(dict(sausage=True)) pickle.dumps(eggs) ``` Raises: TypeError: can't pickle mappingproxy objects ---- Is this the desired behaviour or is it a bug? ---------- components: Library (Lib) messages: 300284 nosy: Alex Hayes priority: normal severity: normal status: open title: MappingProxyType can not be pickled type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 04:00:02 2017 From: report at bugs.python.org (Pierre Quentel) Date: Tue, 15 Aug 2017 08:00:02 +0000 Subject: [issue30576] http.server should support HTTP compression (gzip) In-Reply-To: <1496691724.59.0.955308322691.issue30576@psf.upfronthosting.co.za> Message-ID: <1502784002.24.0.135028087518.issue30576@psf.upfronthosting.co.za> Pierre Quentel added the comment: On Python-ideas someone asked if other compressions could be supported besides gzip. The latest version of the PR adds a mechanism for that : SimpleHTTPRequestHandler has a new attribute "compressions", a dictionary that maps compression encodings (eg "gzip") to a "compressed data generator". The generator takes a file object as argument, yields non-empty chunks of compressed data and ends by yielding b'' for compliance with Chunked Transfer Encoding protocol. To support other compression algorithms, "compressions" can be extended with another key (eg "brotli") mapped to the appropriate generator. A test has been added with the non-standard "bzip2" encoding, using the bz2 module in the standard distribution. I also added support for "deflate" by default (it's very close to "gzip"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 04:25:09 2017 From: report at bugs.python.org (Christian Heimes) Date: Tue, 15 Aug 2017 08:25:09 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols() In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1502785509.43.0.543265395718.issue30714@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- pull_requests: +3133 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 04:25:31 2017 From: report at bugs.python.org (Christian Heimes) Date: Tue, 15 Aug 2017 08:25:31 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols() In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1502785531.07.0.251486075622.issue30714@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- pull_requests: +3134 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 04:33:46 2017 From: report at bugs.python.org (Christian Heimes) Date: Tue, 15 Aug 2017 08:33:46 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols() In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1502786026.32.0.945015936953.issue30714@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 7b40cb7293cb14e5c7c8ed123efaf9acb33edae2 by Christian Heimes in branch 'master': bpo-30714: ALPN changes for OpenSSL 1.1.0f (#2305) https://github.com/python/cpython/commit/7b40cb7293cb14e5c7c8ed123efaf9acb33edae2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 04:45:43 2017 From: report at bugs.python.org (Christian Heimes) Date: Tue, 15 Aug 2017 08:45:43 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols() In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1502786743.51.0.59241622172.issue30714@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 7f6a13bd562ff6a265fc63a991327feaecb07a77 by Christian Heimes in branch '3.6': [3.6] bpo-30714: ALPN changes for OpenSSL 1.1.0f (#3093) https://github.com/python/cpython/commit/7f6a13bd562ff6a265fc63a991327feaecb07a77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 04:55:05 2017 From: report at bugs.python.org (Christian Heimes) Date: Tue, 15 Aug 2017 08:55:05 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols() In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1502787305.6.0.80195114011.issue30714@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset 05b7d9c6675b71d17f5fcf379b3888fba431f14e by Christian Heimes in branch '2.7': [2.7] bpo-30714: ALPN changes for OpenSSL 1.1.0f (#3094) https://github.com/python/cpython/commit/05b7d9c6675b71d17f5fcf379b3888fba431f14e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 04:56:08 2017 From: report at bugs.python.org (Christian Heimes) Date: Tue, 15 Aug 2017 08:56:08 +0000 Subject: [issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols() In-Reply-To: <1497972401.5.0.807136343886.issue30714@psf.upfronthosting.co.za> Message-ID: <1502787368.6.0.00622871557858.issue30714@psf.upfronthosting.co.za> Christian Heimes added the comment: 2.7, 3.6 and master are fixed. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 05:32:03 2017 From: report at bugs.python.org (Yu Zhigang) Date: Tue, 15 Aug 2017 09:32:03 +0000 Subject: [issue25144] 3.5 Win install fails with "TARGETDIR" In-Reply-To: <1442424932.17.0.0389991499722.issue25144@psf.upfronthosting.co.za> Message-ID: <1502789523.46.0.572182475562.issue25144@psf.upfronthosting.co.za> Yu Zhigang added the comment: It's quite an issue... This is 2017 and it's still there. Anyway, I encountered the same problem by running the installer in Win7, and it was fixed by running it again in administrative mode. ---------- nosy: +Yu Zhigang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 05:37:11 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 15 Aug 2017 09:37:11 +0000 Subject: [issue31197] Namespace disassembly omits some compiled objects In-Reply-To: <1502692785.51.0.58821810388.issue31197@psf.upfronthosting.co.za> Message-ID: <1502789831.14.0.549418324892.issue31197@psf.upfronthosting.co.za> Nick Coghlan added the comment: Another refactoring point that came up in the same discussion: it might be nice if the objects that expose code attributes all offered a read-only __code__ property, rather than requiring the dis module (and other consumers) to be aware of all the different object-specific property names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 07:55:07 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 15 Aug 2017 11:55:07 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1502798107.79.0.112505605711.issue31205@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I'll work on this today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 08:29:44 2017 From: report at bugs.python.org (=?utf-8?q?C=C3=A9dric_Krier?=) Date: Tue, 15 Aug 2017 12:29:44 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM Message-ID: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> New submission from C?dric Krier: If the path on which Python is installed contains the DELIM, the resulted sys.path is split. I think maybe there should be a escape mechanism for the PYTHONPATH. ---------- components: Interpreter Core messages: 300293 nosy: ced priority: normal severity: normal status: open title: Can not import site from sys.prefix containing DELIM type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 09:00:07 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Aug 2017 13:00:07 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502802007.02.0.00991376673474.issue31210@psf.upfronthosting.co.za> R. David Murray added the comment: By DELIM, you mean the shell ':'? As far as I've been able to determine there is no way defined in posix to escape that character. If you can find one, please let us know. (I think the same is true for the Windows semicolon but I'm not sure.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 09:15:45 2017 From: report at bugs.python.org (=?utf-8?q?C=C3=A9dric_Krier?=) Date: Tue, 15 Aug 2017 13:15:45 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502802945.55.0.819510092783.issue31210@psf.upfronthosting.co.za> C?dric Krier added the comment: Yes I mean ':' for posix. Indeed I do not known a posix way to escape the colon (it was discussed here: https://stackoverflow.com/questions/14661373/how-to-escape-colon-in-path-on-unix). But it does not mean that the method makepathobject could not support one. I'm thinking about path single-quoted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 09:44:15 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Aug 2017 13:44:15 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502804655.96.0.308569362292.issue31210@psf.upfronthosting.co.za> R. David Murray added the comment: I'm not sure there is anything we should do here, then, because we are conforming to the posix parsing for PATH in our PYTHONPATH implementation. I think if you want to pursue this further you should take it to the python-ideas mailing list. I'm going to close the issue, but you can reopen it if python-ideas thinks it is worth doing something (and there is something we can reasonably do :) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 10:50:14 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 15 Aug 2017 14:50:14 +0000 Subject: [issue31194] Inconsistent __repr__s for _collections objects In-Reply-To: <1502640775.21.0.0795700296627.issue31194@psf.upfronthosting.co.za> Message-ID: <1502808614.53.0.162995771706.issue31194@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: More and more, Python looks to me like a certain language that I thought I had left behind a long time ago. [...] Each operator decides which sort of scalar it would be most appropriate to return. [...] In general, they do what you want, unless you want consistency. Maybe it's just a sign of growing up. :-) ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 10:54:52 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Aug 2017 14:54:52 +0000 Subject: [issue31194] Inconsistent __repr__s for _collections objects In-Reply-To: <1502640775.21.0.0795700296627.issue31194@psf.upfronthosting.co.za> Message-ID: <1502808892.96.0.659465618094.issue31194@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of issue 27541. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Repr of collection's subclasses _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 11:23:12 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 15 Aug 2017 15:23:12 +0000 Subject: [issue25144] 3.5 Win install fails with "TARGETDIR" In-Reply-To: <1442424932.17.0.0389991499722.issue25144@psf.upfronthosting.co.za> Message-ID: <1502810592.2.0.197866091147.issue25144@psf.upfronthosting.co.za> Steve Dower added the comment: Yu Zhigang - can you post your install logs from the failed install? You'll notice in my last message I said that I added some extra logging. However, it sounds like you have a certain system option set that essentially breaks paths passed between non-admin and admin processes. There is very little we can do about that, and the fix applied for this issue is not intended to solve it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 12:20:30 2017 From: report at bugs.python.org (Siming Yuan) Date: Tue, 15 Aug 2017 16:20:30 +0000 Subject: [issue31211] distutils/util.py get_platform() does not identify linux-i686 platforms Message-ID: <1502814030.02.0.254840991446.issue31211@psf.upfronthosting.co.za> New submission from Siming Yuan: in CentOS installations where both 32 and 64 bit libraries can co exist, and when python is compiled to run with 32-bit libraries (i686) >>> from distutils.util import get_platform >>> get_platform() 'linux-x86_64' because the api only looks at OS flavor and not the actual binary architecture. this string is used as part of PEP425 tags in the built wheel/egg file: my_package-3.3.0-cp34-cp34m-linux-x86_64.whl but this creates a mismatch with PIP - pip.pep425tags returns "linux-i686" instead on the same python instance, addressed by: # snippet pip code def _is_running_32bit(): return sys.maxsize == 2147483647 if result == "linux_x86_64" and _is_running_32bit(): # 32 bit Python program (running on a 64 bit Linux): pip should only # install and run 32 bit compiled extensions in that case. result = "linux_i686" so the end result is any packages built with sdist_wheel (using setuptools/distutils) is not installable on the same instance. Of course the workaround is to overwrite that and provide --plat-name linux_i686. but the question is - shouldn't the tags line up? ---------- components: Distutils messages: 300300 nosy: dstufft, merwok, siming85 priority: normal severity: normal status: open title: distutils/util.py get_platform() does not identify linux-i686 platforms versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 13:04:50 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 15 Aug 2017 17:04:50 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1502816690.41.0.63435237137.issue31205@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3135 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 13:11:12 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 15 Aug 2017 17:11:12 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1502817072.41.0.364067567601.issue31205@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I ran into an issue with the three calls to functions in ConfigDialog (deactivate_current_config, activate_config_changes, and save_all_changed_extensions) from within the KeysPage class. I tried to minimize the changes by just creating self.cd for the ConfigDialog instance. Besides that, the changes were the same as the FontPage and GenPage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 13:12:16 2017 From: report at bugs.python.org (=?utf-8?q?C=C3=A9dric_Krier?=) Date: Tue, 15 Aug 2017 17:12:16 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502817136.29.0.313270905178.issue31210@psf.upfronthosting.co.za> C?dric Krier added the comment: A last comment, I do not think it is an issue to follow posix way to parse PATH. But for me, the problem is that Python adds without sanitation the sys.prefix to the PYTHONPATH. So I think internally Python should not use PATH notation to extend the PYTHONPATH because it is not a robust notation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 13:26:32 2017 From: report at bugs.python.org (Dave Johansen) Date: Tue, 15 Aug 2017 17:26:32 +0000 Subject: [issue31212] min date can't be converted to timestamp Message-ID: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> New submission from Dave Johansen: This worked in Python 3.6.0 and before: ``` from datetime import datetime d = datetime(1, 1, 1, 0, 0, 0) d.timestamp() ``` The error output is: ``` ValueError: year 0 is out of range ``` But it used to return `-62135658000.0`. Appears to be related to https://bugs.python.org/issue29921 ---------- messages: 300303 nosy: Dave Johansen priority: normal severity: normal status: open title: min date can't be converted to timestamp type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 13:32:15 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Aug 2017 17:32:15 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502818335.65.0.42261269336.issue31210@psf.upfronthosting.co.za> R. David Murray added the comment: You mean to create the entries on sys.path that do not come from the PYTHONPATH? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 13:43:59 2017 From: report at bugs.python.org (Christopher Stelma) Date: Tue, 15 Aug 2017 17:43:59 +0000 Subject: [issue31213] __context__ reset to None in nested exception Message-ID: <1502819039.28.0.810222147268.issue31213@psf.upfronthosting.co.za> New submission from Christopher Stelma: When I try to re-raise an exception with a __cause__ inside a nested exception, the __context__ of the outer __context__ appears to be reset to None. e.g. >>> try: ... try: ... raise Exception('foo') ... except Exception as foo: ... print(foo, foo.__context__, foo.__cause__) ... try: ... raise Exception('bar') from foo ... except Exception as bar: ... print(bar, bar.__context__, bar.__context__.__context__) ... raise foo from bar ... except Exception as foo: ... wat = foo ... foo None None bar foo None >>> print(wat, wat.__context__, wat.__context__.__context__) foo bar None >>> print(wat, wat.__cause__, wat.__cause__.__context__) foo bar None >>> print(wat, wat.__cause__, wat.__cause__.__cause__) foo bar foo here, between "raise foo from bar" and the end, bar.__context__ goes from foo to None. since bar is only raised once, clearly in the context of foo (twice over), I would expect bar.__context__ to stay foo. ---------- messages: 300305 nosy: Christopher Stelma priority: normal severity: normal status: open title: __context__ reset to None in nested exception type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 13:45:07 2017 From: report at bugs.python.org (Christopher Stelma) Date: Tue, 15 Aug 2017 17:45:07 +0000 Subject: [issue31213] __context__ reset to None in nested exception In-Reply-To: <1502819039.28.0.810222147268.issue31213@psf.upfronthosting.co.za> Message-ID: <1502819107.87.0.00286217603318.issue31213@psf.upfronthosting.co.za> Christopher Stelma added the comment: crosslink to related future lib issue that led me to this: https://github.com/PythonCharmers/python-future/issues/141 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 14:20:06 2017 From: report at bugs.python.org (=?utf-8?q?C=C3=A9dric_Krier?=) Date: Tue, 15 Aug 2017 18:20:06 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502818335.65.0.42261269336.issue31210@psf.upfronthosting.co.za> Message-ID: <20170815181932.GH3622@kei> C?dric Krier added the comment: On 2017-08-15 17:32, R. David Murray wrote: > You mean to create the entries on sys.path that do not come from the PYTHONPATH? Yes because such path could contain ':'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 14:30:09 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Aug 2017 18:30:09 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502821809.38.0.60808911805.issue31210@psf.upfronthosting.co.za> R. David Murray added the comment: OK, that seems reasonable to me. I'll reopen the issue. Assuming other developers agree that this should be changed, I'm not sure if it will qualify as a bug or an enhancement, so I'm leaving versions unselected for now :) ---------- resolution: not a bug -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 14:30:55 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Aug 2017 18:30:55 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502821855.55.0.0496455681468.issue31210@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +brett.cannon, eric.snow, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 14:38:42 2017 From: report at bugs.python.org (sping) Date: Tue, 15 Aug 2017 18:38:42 +0000 Subject: [issue31170] expat: utf8_toUtf8 cannot properly handle exhausting buffer In-Reply-To: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> Message-ID: <1502822322.82.0.00890716202916.issue31170@psf.upfronthosting.co.za> sping added the comment: For the record, the upstream fix is commit https://github.com/libexpat/libexpat/commit/74a7090a6eb92c27b7010287a4082de6b357fa42 and it will be part of Expat 2.2.4. ---------- nosy: +sping versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 15:45:03 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 15 Aug 2017 19:45:03 +0000 Subject: [issue30747] _Py_atomic_* not actually atomic on Windows with MSVC In-Reply-To: <1498332959.93.0.572211672441.issue30747@psf.upfronthosting.co.za> Message-ID: <1502826303.41.0.109742555029.issue30747@psf.upfronthosting.co.za> Steve Dower added the comment: This commit added *a lot* of warnings - http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/1056 Most are of the form: warning C4133: 'function': incompatible types - from 'volatile uintptr_t *' to 'volatile int *' I can't obviously see where they are coming from, but someone please fix them. ---------- resolution: fixed -> stage: backport needed -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 17:50:09 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 21:50:09 +0000 Subject: [issue31002] IDLE: Add tests for configdialog keys tab In-Reply-To: <1501609694.55.0.711905176074.issue31002@psf.upfronthosting.co.za> Message-ID: <1502833809.58.0.271618432889.issue31002@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Lines not yet covered in keys group, other than deactivate_current_config and activate_config_changes functions: def save_new_key_set if not idleConf.userCfg['keys'].has_section(keyset_name): # never false - minor issue def delete_custom_keys if not item_list: # never false hence following never executed else: self.customlist.SetMenu(item_list, item_list[0]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 18:26:25 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 22:26:25 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1502835985.19.0.0490747526553.issue31205@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset e36d9f5568093b3885da62a0bf0fdfbe3771672b by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-31205: IDLE: Factor KeysPage class from ConfigDialog (#3096) https://github.com/python/cpython/commit/e36d9f5568093b3885da62a0bf0fdfbe3771672b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 18:41:39 2017 From: report at bugs.python.org (Chris Lovett) Date: Tue, 15 Aug 2017 22:41:39 +0000 Subject: [issue31214] os.walk has a bug on Windows Message-ID: <1502836899.02.0.348534526331.issue31214@psf.upfronthosting.co.za> New submission from Chris Lovett: When I walk a directory recursively, it is tacking on an additional non-existant file from one of the subdirectories. Here's the code: def copy_dir(self, src, dest): result = sftp.mkdir(dest) for dirname, dirnames, filenames in os.walk(src): for subdirname in dirnames: print("entering dir:" + subdirname) self.copy_dir(os.path.join(src, subdirname), os.path.join(dest, subdirname)) for filename in filenames: print("copying:" + filename) Here's the output: entering dir:include copying:CallbackInterface.h copying:ClockInterface.h entering dir:tcc copying:CallbackInterface.tcc copying:CMakeLists.txt copying:darknet.i copying:darknet.i.h copying:darknet.obj copying:darknet.py copying:darknetImageNetLabels.txt copying:darknetPYTHON_wrap.cxx copying:darknetPYTHON_wrap.h copying:darknet_config.json copying:demo.py copying:demoHelper.py copying:OpenBLASSetup.cmake copying:runtest.sh copying:schoolbus.png copying:CallbackInterface.h copying:ClockInterface.h copying:CallbackInterface.tcc The last 3 files listed here doesn't exist, they are a repeat of the files found in the subdirectories. ---------- components: Windows messages: 300313 nosy: clovett, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: os.walk has a bug on Windows type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 18:47:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 22:47:56 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1502837276.6.0.540182992334.issue31205@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3136 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 18:56:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 22:56:03 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1502837763.61.0.138374930528.issue30928@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3137 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 19:01:57 2017 From: report at bugs.python.org (Peter Otten) Date: Tue, 15 Aug 2017 23:01:57 +0000 Subject: [issue31214] os.walk has a bug on Windows In-Reply-To: <1502836899.02.0.348534526331.issue31214@psf.upfronthosting.co.za> Message-ID: <1502838117.09.0.415210953974.issue31214@psf.upfronthosting.co.za> Peter Otten added the comment: Read the documentation of os.walk() again. It already walks the complete directory tree starting with src. When you invoke it again by calling your copy_dir() method recursively you will of course see once more the files and directories in the respective subdirectory. ---------- nosy: +peter.otten _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 19:10:59 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 15 Aug 2017 23:10:59 +0000 Subject: [issue31214] os.walk has a bug on Windows In-Reply-To: <1502836899.02.0.348534526331.issue31214@psf.upfronthosting.co.za> Message-ID: <1502838659.59.0.580728627689.issue31214@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 Tue Aug 15 19:12:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 23:12:56 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1502838776.13.0.913782059104.issue31205@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The change to configdialog is basically a block move with a few edits. The resulting diff is so complicated that git could not apply it cleanly to the identical code in 3.6. We should do multiple PRs for the highlight group. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 19:13:13 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 23:13:13 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1502838793.34.0.111409683266.issue31205@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset ff4b222b029f9977a4509d8697ba2b82c09b477a by Terry Jan Reedy in branch '3.6': [3.6] bpo-31205: IDLE: Factor KeysPage class from ConfigDialog (GH-3096) (#3097) https://github.com/python/cpython/commit/ff4b222b029f9977a4509d8697ba2b82c09b477a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 19:14:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 23:14:03 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1502838843.31.0.0752423794802.issue31205@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 19:15:06 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 23:15:06 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1502838906.19.0.161042113299.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 7f066844a79ea201a28b9555baf4bceded90484f by Terry Jan Reedy in branch 'master': bpo-30928: Update idlelib/NEWS.txt to 2017-08-15. (#3098) https://github.com/python/cpython/commit/7f066844a79ea201a28b9555baf4bceded90484f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 19:16:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 23:16:51 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1502839011.02.0.775420381249.issue30928@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3138 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 19:23:33 2017 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 15 Aug 2017 23:23:33 +0000 Subject: [issue31211] distutils/util.py get_platform() does not identify linux-i686 platforms In-Reply-To: <1502814030.02.0.254840991446.issue31211@psf.upfronthosting.co.za> Message-ID: <1502839413.83.0.993898667625.issue31211@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello! Your analysis sounds right, but this is the wrong place. distutils doesn?t know about wheels, it?s setuptools and/or the wheel module that generate them, and pip and others who consumes them. Please report the issue to the setuptools and/or wheel bug trackers (see https://packaging.python.org/key_projects/ ) and I?ll close this one. ---------- resolution: -> third party status: open -> pending versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 19:26:36 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 23:26:36 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1502839596.17.0.688572147091.issue31206@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The configdialog diff for #31205 was so jumbled that it did not apply correctly to 3.6. Let's do this in 2 PRs. First adds the class to how we think it should be. The second deletes the old code, makes any edits needed for the new class, and redirects the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 19:27:33 2017 From: report at bugs.python.org (Chris Lovett) Date: Tue, 15 Aug 2017 23:27:33 +0000 Subject: [issue31214] os.walk has a bug on Windows In-Reply-To: <1502836899.02.0.348534526331.issue31214@psf.upfronthosting.co.za> Message-ID: <1502839653.98.0.463093505636.issue31214@psf.upfronthosting.co.za> Chris Lovett added the comment: Oh, my bad then. Apologies for the noise in your system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 19:41:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 15 Aug 2017 23:41:08 +0000 Subject: [issue30928] Copy modified blurbs to idlelib/NEWS.txt In-Reply-To: <1500004288.4.0.547702885246.issue30928@psf.upfronthosting.co.za> Message-ID: <1502840468.1.0.302604990925.issue30928@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset de36ba065e933648f5687998021175cf21d4564b by Terry Jan Reedy in branch '3.6': [3.6] bpo-30928: Update idlelib/NEWS.txt to 2017-08-15. (GH-3098) (#3099) https://github.com/python/cpython/commit/de36ba065e933648f5687998021175cf21d4564b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 22:16:46 2017 From: report at bugs.python.org (D Gentry) Date: Wed, 16 Aug 2017 02:16:46 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502736932.21.0.391353043048.issue31148@psf.upfronthosting.co.za> Message-ID: D Gentry added the comment: Thank you for the information. That will definitely be helpful. Also, thank you for being so detailed with your explanation. Even though it will be difficult and may take more time than I was initially intending, I believe its within the realm of possibility. Therefore, I will be trying my hand at crafting the MSI, though like you said earlier, it's not nearly as easy as the msdn article made it appear. The toolset you offered should help out a lot. Thank you for all of your expert advice. I have one last question before I begin on my journey. You mentioned "burn bundles" at the end of the message. Are these something I would have to build myself or is there a repository where I can download the files? On Mon, Aug 14, 2017 at 12:55 PM, Steve Dower wrote: > > Steve Dower added the comment: > > The general requirements of an installer are: > * runs without any preinstalled prerequisites > * does not install anything permanent until the user says so (Visual > Studio breaks this rule :( ) > * installs all required prerequisites > * install on all supported operating systems > * allow users to [de]select optional components > * correctly uninstall previous compatible versions > * correctly do *not* uninstall previous identical versions > * update user environment settings (registry, environment, etc.) > * create Start Menu shortcuts > * create file associations > * create context menus > * install files into customizable location with correct security settings > * correctly roll back when installation fails, including restoring > previously uninstalled components and attempting to execute installed tools > that may not be installed correctly > * attempt to execute just-installed components that may not be installed > correctly (e.g. ensurepip, compileall, trigger environment variable reload) > * detect and abort when installation is going to fail, and explain to the > user how to solve the problem > * provide live progress feedback and information about what operations are > occurring > * provide detailed log files to help offer user support post-installation, > and help users find those logs > * provide registration information so the operating system can help users > modify or remove the installation > * allow users to modify, repair and upgrade the installation without > corrupting it (or any others) or forcing them to remove/reinstall > * allow users to choose whether to install just for themselves or for the > entire machine, and request correct permissions based on this choice > * allow administrators to script an entire installation and have it run > silently and/or with progress (and cancellation) only > * allow users to minimize download size by deselecting optional components > * allow users to obtain all optional components to allow full installation > without public internet access > * install without executing arbitrary third-party code that may have been > maliciously placed in a user's download directory > * automatically include new files added by developers who have not > explicitly modified the installer > > These are all the features of our current installer, and nearly all of > them work for basically every user. Many of these are literally not > achievable with just an MSI, or require significantly more complicated > commands to be run by the end user, rather than providing options in a user > interface. > > If you're still interested in giving it a go, visit http://wixtoolset.org/ > and have a look at their tools. These are the gold-standard right now for > building MSIs (and Burn bundles, which is what we currently have). > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 22:17:23 2017 From: report at bugs.python.org (Craig McQueen) Date: Wed, 16 Aug 2017 02:17:23 +0000 Subject: [issue6090] zipfile: Bad error message when zipping a file with timestamp before 1980 In-Reply-To: <1243011059.87.0.0917631314165.issue6090@psf.upfronthosting.co.za> Message-ID: <1502849843.08.0.507202939494.issue6090@psf.upfronthosting.co.za> Craig McQueen added the comment: One ongoing weakness I see with this situation is that it's difficult to code a suitable work-around if a user wants to zip files that have a date < 1980 (e.g. to zip it with a datestamp of 1-Jan-1980). https://stackoverflow.com/q/45703747/60075 I am trying to create a zip file with Python 3.5.2 zipfile, on Linux. Some of the files I'm trying to add have timestamps of 1-Jan-1970 (embedded system without a real-time clock module). So zipfile gives an exception: ValueError: ZIP does not support timestamps before 1980 My goal then is to implement a work-around to add these files to the zip file with a timestamp of 1-Jan-1980. However, I am finding it difficult to find a suitable work-around. At first I thought I can do this: def zinfo_from_file(fullname, arcname): st = os.stat(fullname) mtime = time.localtime(st.st_mtime) date_time = mtime[0:6] if date_time[0] < 1980: date_time = (1980, 1, 1, 0, 0, 0) zinfo = zipfile.ZipInfo(arcname, date_time) return zinfo ... zinfo = zinfo_from_file(fullname, arcname) chunksize=512 with open(fullname, 'rb') as src, myzipfile.open(zinfo, 'w') as dest: while True: data = src.read(chunksize) if not data: break dest.write(data) ... However, it turns out that myzipfile.open(zinfo, 'w') is not supported until Python 3.6. (I'm using Yocto to build embedded Linux, which currently only supports Python 3.5.x.) I guess I could try doing myzipfile.writestr(...), although then it appears that I have to load the entire file data into memory. ---------- nosy: +cmcqueen1975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 15 23:33:07 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 16 Aug 2017 03:33:07 +0000 Subject: [issue31209] MappingProxyType can not be pickled In-Reply-To: <1502772551.88.0.290451219237.issue31209@psf.upfronthosting.co.za> Message-ID: <1502854387.5.0.115125869405.issue31209@psf.upfronthosting.co.za> Raymond Hettinger added the comment: What would be the point of pickling a MappingProxy? Do you have use case or is it just a curiosity? ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 00:12:13 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 16 Aug 2017 04:12:13 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1502856733.0.0.717803195417.issue31148@psf.upfronthosting.co.za> Steve Dower added the comment: Burn bundles are part of Wix, but it's the part you don't like :) If you just want a single MSI, you won't want a bundle. But you will have to leave out nearly half of the features I listed because they simply are not possible without it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 00:43:40 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 16 Aug 2017 04:43:40 +0000 Subject: [issue31212] min date can't be converted to timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502858620.81.0.959071137118.issue31212@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> haypo nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 01:17:39 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 16 Aug 2017 05:17:39 +0000 Subject: [issue31215] Add version changed notes for OpenSSL 1.1.0 compatibility Message-ID: <1502860659.7.0.930691554308.issue31215@psf.upfronthosting.co.za> New submission from Nick Coghlan: https://bugs.python.org/issue26470 updated the ssl and hashlib modules in 2.7 and 3.5+ to be compatible with OpenSSL 1.1.0. However, it's currently unclear what the *minimum* versions actually are for platforms that want to drop support for OpenSSL 1.0.x, and it's particularly unclear in 2.7, as that lacks the deprecation warning for OpenSSL 0.9.8, 1.0.0 and 1.0.1 that was introduced in Python 3.6. This doesn't rise to the level of something to be documented as a new feature in the 2.7 What's New, but I think a version changed note in the opening section of the `ssl` module documentation would be appropriate: 2.7 branch: .. versionchanged: 2.7.13 Updated to support linking with OpenSSL 1.1.0 3.6 and master branches (immediately before the 3.6 deprecation notice): .. versionchanged: 3.5.3 Updated to support linking with OpenSSL 1.1.0 ---------- assignee: docs at python components: Documentation messages: 300326 nosy: christian.heimes, docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Add version changed notes for OpenSSL 1.1.0 compatibility type: enhancement versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 01:46:56 2017 From: report at bugs.python.org (TaoQingyun) Date: Wed, 16 Aug 2017 05:46:56 +0000 Subject: [issue31216] Add ensure_ascii argument to json.tool Message-ID: <1502862416.63.0.620713992739.issue31216@psf.upfronthosting.co.za> New submission from TaoQingyun: Sometimes I want this ``` $ echo -e '"\xe4\xbd\xa0\xe5\xa5\xbd"' | ./python -m json.tool --no-escape "??" ``` not just ``` $ echo -e '"\xe4\xbd\xa0\xe5\xa5\xbd"' | ./python -m json.tool "\u4f60\u597d" ``` ---------- components: Library (Lib) files: jsontool.patch keywords: patch messages: 300327 nosy: qingyunha priority: normal severity: normal status: open title: Add ensure_ascii argument to json.tool type: enhancement versions: Python 3.7 Added file: http://bugs.python.org/file47083/jsontool.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 02:04:32 2017 From: report at bugs.python.org (Yu Zhigang) Date: Wed, 16 Aug 2017 06:04:32 +0000 Subject: [issue25144] 3.5 Win install fails with "TARGETDIR" In-Reply-To: <1442424932.17.0.0389991499722.issue25144@psf.upfronthosting.co.za> Message-ID: <1502863472.6.0.842800300464.issue25144@psf.upfronthosting.co.za> Yu Zhigang added the comment: Hi, if everything goes well you shall see the log in the attachment or somewhere. I'm uploading it. ---------- Added file: http://bugs.python.org/file47084/python install failure.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 03:13:39 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 16 Aug 2017 07:13:39 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502867619.59.0.904009335987.issue31210@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm marking this as Python 3.7 only, not because I don't think it's a bug, but because getpath.c is a maintainability nightmare and I strongly prefer we avoid going anywhere near it in maintenance releases :) Targeting Python 3.7+ also means we may be able to take advantage of the initial phase of PEP 432 changes and look at switching getpath.c to use higher level CPython data structures (specifically list objects) internally. I've also added the Windows folks to the nosy list to check if Windows might have a similar problem with semi-colons appearing in sys.prefix. ---------- nosy: +paul.moore, steve.dower, tim.golden, zach.ware versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 03:36:10 2017 From: report at bugs.python.org (=?utf-8?b?UMOkciBCasO2cmtsdW5k?=) Date: Wed, 16 Aug 2017 07:36:10 +0000 Subject: [issue30747] _Py_atomic_* not actually atomic on Windows with MSVC In-Reply-To: <1498332959.93.0.572211672441.issue30747@psf.upfronthosting.co.za> Message-ID: <1502868970.14.0.349873729927.issue30747@psf.upfronthosting.co.za> P?r Bj?rklund added the comment: My guess would be the cast from uintptr_t to intptr_t in the return type. I'll look into this, when possible, should have some time later this week or over the weekend. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 04:01:23 2017 From: report at bugs.python.org (Christian Heimes) Date: Wed, 16 Aug 2017 08:01:23 +0000 Subject: [issue31215] Add version changed notes for OpenSSL 1.1.0 compatibility In-Reply-To: <1502860659.7.0.930691554308.issue31215@psf.upfronthosting.co.za> Message-ID: <1502870483.54.0.803135159727.issue31215@psf.upfronthosting.co.za> Christian Heimes added the comment: +1 For reference, Python 3.5 received OpenSSL 1.1.0 support in 3.5.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 04:31:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 08:31:37 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1502872297.47.0.121025527202.issue30983@psf.upfronthosting.co.za> STINNER Victor added the comment: This change broke test_gdb on most buildbots :-( http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/1159/steps/test/logs/stdio ====================================================================== FAIL: test_pyup_command (test.test_gdb.StackNavigationTests) Verify that the "py-up" command works ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_gdb.py", line 688, in test_pyup_command $''') File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_gdb.py", line 259, in assertMultilineMatches self.fail(msg='%r did not match %r' % (actual, pattern)) AssertionError: 'Breakpoint 1 (builtin_id) pending.\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".\n\nBreakpoint 1, builtin_id (self=self at entry=, v=42) at Python/bltinmodule.c:1103\n1103\t{\n#4 Frame 0x4086b4cc, for file /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/gdb_sample.py, line 10, in baz (args=(1, 2, 3))\n id(42)\n#5 Frame 0x4086b4cc, for file /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/gdb_sample.py, line 10, in baz (args=(1, 2, 3))\n id(42)\n' did not match '^.*\n#[0-9]+ Frame 0x-?[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \\(a=1, b=2, c=3\\)\n baz\\(a, b, c\\)\n$' ---------- nosy: +haypo resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 04:38:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 08:38:45 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1502872725.83.0.679410310312.issue30983@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3139 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 04:39:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 08:39:50 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1502872790.76.0.334865300735.issue30983@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3140 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 04:43:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 08:43:53 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1502873033.35.0.82825023015.issue30983@psf.upfronthosting.co.za> STINNER Victor added the comment: I chose to revert the change because I don't have the bandwidth right now to investigate why the change broke test_gdb. I'm surprised that a change affecting python-gdb.py wasn't properly tested manually using test_gdb.py :-( I understand that Travis CI doesn't have gdb and/or that the test pass in some cases? The revert only gives us more time to design the proper solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 04:45:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 08:45:58 +0000 Subject: [issue31069] test_multiprocessing_spawn leaks a dangling process In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502873158.39.0.124566982517.issue31069@psf.upfronthosting.co.za> STINNER Victor added the comment: I marked bpo-30846 as a duplicate of this issue. Copy of its message: http://buildbot.python.org/all/builders/AMD64%20Debian%20PGO%203.6/builds/517/steps/test/logs/stdio ====================================================================== ERROR: test_rapid_restart (test.test_multiprocessing_fork.WithProcessesTestManagerRestart) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/test/_test_multiprocessing.py", line 2410, in test_rapid_restart manager.start() File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/managers.py", line 517, in start self._address = reader.recv() File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/connection.py", line 250, in recv buf = self._recv_bytes() File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/connection.py", line 407, in _recv_bytes buf = self._recv(4) File "/var/lib/buildbot/slaves/enable-optimizations-bot/3.6.gps-debian-profile-opt.nondebug/build/Lib/multiprocessing/connection.py", line 383, in _recv raise EOFError EOFError (...) Re-running test 'test_multiprocessing_fork' in verbose mode (...) test_rapid_restart (test.test_multiprocessing_fork.WithManagerTestManagerRestart) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 04:46:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 08:46:19 +0000 Subject: [issue30846] [3.6] test_rapid_restart() of test_multiprocessing_fork fails randomly on AMD64 Debian PGO 3.6 In-Reply-To: <1499166614.41.0.795338423823.issue30846@psf.upfronthosting.co.za> Message-ID: <1502873179.24.0.297180480415.issue30846@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not 100% sure that it's a duplicate of bpo-31069, but it's similar. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_multiprocessing_spawn leaks a dangling process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 04:47:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 08:47:35 +0000 Subject: [issue30830] test_logging leaks dangling threads on FreeBSD In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1502873255.6.0.0442453170757.issue30830@psf.upfronthosting.co.za> STINNER Victor added the comment: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%2010.x%20Shared%203.x/builds/698/steps/test/logs/stdio test_output (test.test_logging.UnixDatagramHandlerTest) ... ok test_output (test.test_logging.UnixSysLogHandlerTest) ... ok test__all__ (test.test_logging.MiscTestCase) ... ok test_handle_called_with_mp_queue (test.test_logging.QueueListenerTest) ... Warning -- threading_cleanup() failed to cleanup -1 threads after 3 sec (count: 0, dangling: 1) ok test_handle_called_with_queue_queue (test.test_logging.QueueListenerTest) ... ok test_no_messages_in_queue_after_stop (test.test_logging.QueueListenerTest) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 04:48:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 08:48:56 +0000 Subject: [issue31069] test_multiprocessing_spawn leaks a dangling process In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502873336.36.0.955396090818.issue31069@psf.upfronthosting.co.za> STINNER Victor added the comment: AppVeyor: https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.5341 test_lock_context (test.test_multiprocessing_spawn.WithProcessesTestLock) ... ok test_rlock (test.test_multiprocessing_spawn.WithProcessesTestLock) ... ok test_enable_logging (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test_level (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test_rapid_restart (test.test_multiprocessing_spawn.WithProcessesTestManagerRestart) ... ok Warning -- Dangling processes: {} test_access (test.test_multiprocessing_spawn.WithProcessesTestPicklingConnections) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 04:58:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 08:58:59 +0000 Subject: [issue31212] min date can't be converted to timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502873939.99.0.616489780277.issue31212@psf.upfronthosting.co.za> STINNER Victor added the comment: This error is a side effect of the implementation of the PEP 495. In your timezone, datetime(1, 1, 1, 0, 0, 0).timestamp() creates an internal timestamp with year=0. The problem is that the internal function ymd_to_ord() doesn't support year=0: /* This is incorrect if year <= 0; we really want the floor * here. But so long as MINYEAR is 1, the smallest year this * can see is 1. */ assert (year >= 1); > This worked in Python 3.6.0 and before: (...) The question is if the result was correct before? ---------- assignee: haypo -> belopolsky nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 05:01:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 09:01:02 +0000 Subject: [issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502874062.58.0.863280552702.issue31212@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: min date can't be converted to timestamp -> datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 05:01:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 09:01:34 +0000 Subject: [issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502874094.04.0.582546542029.issue31212@psf.upfronthosting.co.za> STINNER Victor added the comment: Note: My change was the commit 5b804b2fb0eaa2bacb4afcfe4cfa85b31475e87f which prevented a crash, bpo-29100. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 05:02:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 09:02:09 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1502874129.91.0.382330203673.issue30983@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 7cc33998b83df6ab8cf2c1afe16a61ee232e39ec by Victor Stinner in branch 'master': bpo-30983: Revert changes which broke most buildbots (#3100) https://github.com/python/cpython/commit/7cc33998b83df6ab8cf2c1afe16a61ee232e39ec ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 05:02:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 09:02:10 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1502874130.84.0.121867960261.issue30983@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 98e26979aa4c15b391fd3780340772a17d513d4d by Victor Stinner in branch '3.6': Revert "[3.6] bpo-30983: eval frame rename in pep 0523 broke gdb's python extension (GH-2803) (#3090)" (#3101) https://github.com/python/cpython/commit/98e26979aa4c15b391fd3780340772a17d513d4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 05:12:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 09:12:25 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1502874745.71.0.750155161877.issue29619@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3141 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 05:26:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 09:26:33 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1502875593.94.0.829793322476.issue30910@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you please elaborate? I don't know the compiler flag -fexceptions. Why is it specific to ppc64le? What about ppc64? What about other platforms? Is this issue specific to Python 2.7? If not, please tag add also 3.6 and 3.7 versions. I never used Python with C++. I didn't work on PPC64 recently. ---------- nosy: +haypo, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 05:34:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 09:34:29 +0000 Subject: [issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502876069.14.0.324879845211.issue31069@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_multiprocessing_spawn leaks a dangling process -> test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 05:34:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 09:34:49 +0000 Subject: [issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502876089.17.0.282622467397.issue31069@psf.upfronthosting.co.za> STINNER Victor added the comment: http://buildbot.python.org/all/builders/x86-64%20El%20Capitan%203.x/builds/590/steps/test/logs/stdio test_enable_logging (test.test_multiprocessing_forkserver.WithProcessesTestLogging) ... ok test_level (test.test_multiprocessing_forkserver.WithProcessesTestLogging) ... ok test_rapid_restart (test.test_multiprocessing_forkserver.WithProcessesTestManagerRestart) ... ok Warning -- Dangling processes: {} test_access (test.test_multiprocessing_forkserver.WithProcessesTestPicklingConnections) ... ok test_pickling (test.test_multiprocessing_forkserver.WithProcessesTestPicklingConnections) ... ok (...) test_level (test.test_multiprocessing_spawn.WithProcessesTestLogging) ... ok test_rapid_restart (test.test_multiprocessing_spawn.WithProcessesTestManagerRestart) ... ok Warning -- Dangling processes: {} test_access (test.test_multiprocessing_spawn.WithProcessesTestPicklingConnections) ... ok test_pickling (test.test_multiprocessing_spawn.WithProcessesTestPicklingConnections) ... ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 05:41:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 09:41:40 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6 Message-ID: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.6/builds/58/steps/test/logs/stdio test_code leaked [1, 1, 1] memory blocks, sum=3 (...) Re-running test 'test_code' in verbose mode (...) test_code leaked [1, 1, 1] memory blocks, sum=3 I'm unable to reproduce the bug: haypo at selma$ ./python -m test -R 3:3 test_code (...) 1 test OK. ---------- components: Tests messages: 300344 nosy: haypo priority: normal severity: normal status: open title: test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6 type: resource usage versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 06:28:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 10:28:38 +0000 Subject: [issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502879318.6.0.836504947416.issue31069@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3142 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 06:46:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 10:46:06 +0000 Subject: [issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502880366.99.0.271122165197.issue31069@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 17657bb9458ff8f8804b7637d61686a68f4b9471 by Victor Stinner in branch 'master': bpo-31069, test_multiprocessing: Fix dangling process (#3103) https://github.com/python/cpython/commit/17657bb9458ff8f8804b7637d61686a68f4b9471 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 06:46:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 10:46:54 +0000 Subject: [issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502880414.07.0.223435805485.issue31069@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3143 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 06:48:18 2017 From: report at bugs.python.org (Calvin) Date: Wed, 16 Aug 2017 10:48:18 +0000 Subject: [issue31218] del expects __delitem__ if __setitem__ is defined Message-ID: <1502880498.02.0.663608848315.issue31218@psf.upfronthosting.co.za> New submission from Calvin: I noticed some odd behaviour on classes defining __setitem__. Using del on a class defining __setitem__ but not __delitem__ results in "AttributeError: __delitem__". On classes definig neiter __setitem__ nor __delitem__ on the other hand this results in "TypeError: 'WithoutSetItem' object doesn't support item deletion". See the appended example script. ---------- files: delitem_example.py messages: 300346 nosy: raumzeitkeks priority: normal severity: normal status: open title: del expects __delitem__ if __setitem__ is defined type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47085/delitem_example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 06:48:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 10:48:19 +0000 Subject: [issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502880499.79.0.806690091899.issue31069@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3144 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 07:09:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 11:09:29 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502881769.55.0.283161898878.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: Berker: "2. Could you also add version information of sqlite3?" Sure, done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 07:14:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 11:14:40 +0000 Subject: [issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502882080.44.0.868308819189.issue31069@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 78c66a641a0d4fe61356ebfae8772e4fae24dcb7 by Victor Stinner in branch '3.6': bpo-31069, test_multiprocessing: Fix dangling process (#3103) (#3104) https://github.com/python/cpython/commit/78c66a641a0d4fe61356ebfae8772e4fae24dcb7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 07:14:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 11:14:42 +0000 Subject: [issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502882082.24.0.898459595327.issue31069@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 883520a846d87f01a14636978cfa9cee1ecc07c1 by Victor Stinner in branch '2.7': bpo-31069, test_multiprocessing: Fix dangling process (#3103) (#3105) https://github.com/python/cpython/commit/883520a846d87f01a14636978cfa9cee1ecc07c1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 07:17:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 11:17:45 +0000 Subject: [issue31069] test_multiprocessing_spawn and test_multiprocessing_forkserver leak dangling processes In-Reply-To: <1501254125.76.0.503297385938.issue31069@psf.upfronthosting.co.za> Message-ID: <1502882265.39.0.863735354739.issue31069@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, the main bug should have been fixed. I will reopen it if it's not the case, or open a new issue if a second bug is seen on buildbots. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 07:43:59 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 16 Aug 2017 11:43:59 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab In-Reply-To: <1501563588.57.0.756606299047.issue31001@psf.upfronthosting.co.za> Message-ID: <1502883839.91.0.949269779307.issue31001@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Working on this now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 08:20:33 2017 From: report at bugs.python.org (Gustavo Serra Scalet) Date: Wed, 16 Aug 2017 12:20:33 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1502886033.94.0.89091706257.issue30910@psf.upfronthosting.co.za> Changes by Gustavo Serra Scalet : ---------- nosy: +gut _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 08:20:59 2017 From: report at bugs.python.org (Bruno Rosa) Date: Wed, 16 Aug 2017 12:20:59 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1502875593.94.0.829793322476.issue30910@psf.upfronthosting.co.za> Message-ID: Bruno Rosa added the comment: Hi there, I'm delegating this issue to @gut. He will elaborate it with more detail. Thanks a lot, Bruno Rosa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 08:21:46 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Aug 2017 12:21:46 +0000 Subject: [issue31216] Add ensure_ascii argument to json.tool In-Reply-To: <1502862416.63.0.620713992739.issue31216@psf.upfronthosting.co.za> Message-ID: <1502886106.15.0.688825544501.issue31216@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of issue 27413. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Add an option to json.tool to bypass non-ASCII characters. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 08:22:10 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Aug 2017 12:22:10 +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: <1502886130.24.0.313233707283.issue27413@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +qingyunha _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 08:22:16 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Aug 2017 12:22:16 +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: <1502886136.46.0.936391990984.issue27413@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 08:47:05 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Aug 2017 12:47:05 +0000 Subject: [issue31218] del expects __delitem__ if __setitem__ is defined In-Reply-To: <1502880498.02.0.663608848315.issue31218@psf.upfronthosting.co.za> Message-ID: <1502887625.73.0.196063474083.issue31218@psf.upfronthosting.co.za> R. David Murray added the comment: I'm not sure we would consider this a bug (the message is accurate), but I wouldn't object to fixing it, since that would indeed seem more consistent with how __delitem__ and del are defined in the language reference. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 08:47:57 2017 From: report at bugs.python.org (Gustavo Serra Scalet) Date: Wed, 16 Aug 2017 12:47:57 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1502887677.3.0.637594444001.issue30910@psf.upfronthosting.co.za> Gustavo Serra Scalet added the comment: -fexceptions documentation: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fexceptions Highlight to: "you may need to enable this option when compiling C code that needs to interoperate properly with exception handlers written in C++" And this issue was detected when cpython is used like the following: .---------------------. | A C++ code | <= Designed to be the catcher :---------------------: | cpython | <= Should only pass exception up :---------------------: | called C++ function | <= Raises a C++ exception '---------------------' This is already working for X64, but not on PPC64LE (and possibly ARM64 and other architectures as well). For some reason the C++ unwinder can unwind C frames without special unwind information on X64. Maybe it can assume frame information on this architectures and it succeeds, but that's just pure luck in my opinion. ps: this patch is not v2.7 specific. It should be applied globally to other versions as well. It was merely reported to v2.7 as it was the python version that our c++ library was using. Maybe it'll be easier to backport this patch to other versions once it's in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 08:52:16 2017 From: report at bugs.python.org (Mark Bell) Date: Wed, 16 Aug 2017 12:52:16 +0000 Subject: [issue31141] Start should be a keyword argument of the built-in sum In-Reply-To: <1502193168.16.0.095124886528.issue31141@psf.upfronthosting.co.za> Message-ID: <1502887936.17.0.510359117642.issue31141@psf.upfronthosting.co.za> Mark Bell added the comment: I ran some timing tests of the patch I submitted to compare it to the current build of Python. Using timit on the current master branch I got: python.exe -m timeit "sum(())" .... 1.12 usec per loop python.exe -m timeit "sum((), 0)" .... 1.22 usec per loop And for the patched version: python.exe -m timeit "sum(())" .... 1.46 usec per loop python.exe -m timeit "sum((), 0)" .... 1.57 usec per loop However my patch wasn't just the simple argument clinic change suggested by serhiy.storchaka, so maybe that would be more efficient and easier to understand. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 08:54:28 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 Aug 2017 12:54:28 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1502888068.76.0.394737292002.issue30910@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure why we should apply this patch to CPython. We don't have any tests checking for interoperability with C++ exceptions. We don't have any PPC64LE expertise in-house. It's probably fine for third-party distributors to apply the patch themselves. It's also rather unexpected that a flag is needed for this at all. Why doesn't gcc make it the default behaviour? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 09:03:51 2017 From: report at bugs.python.org (Basiruddin Syarifan Radifan) Date: Wed, 16 Aug 2017 13:03:51 +0000 Subject: [issue31219] test Message-ID: <1502888631.71.0.92474975609.issue31219@psf.upfronthosting.co.za> Changes by Basiruddin Syarifan Radifan : ---------- components: Argument Clinic files: indonesia.htm nosy: Basiruddin Syarifan Radifan, larry priority: normal severity: normal status: open title: test type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47086/indonesia.htm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 09:04:31 2017 From: report at bugs.python.org (Basiruddin Syarifan Radifan) Date: Wed, 16 Aug 2017 13:04:31 +0000 Subject: [issue31219] test Message-ID: <1502888671.59.0.428159648624.issue31219@psf.upfronthosting.co.za> Changes by Basiruddin Syarifan Radifan : Removed file: http://bugs.python.org/file47086/indonesia.htm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 09:05:01 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 16 Aug 2017 13:05:01 +0000 Subject: [issue31219] test Message-ID: <1502888701.46.0.794855931419.issue31219@psf.upfronthosting.co.za> New submission from St?phane Wirtel: Useless message ---------- nosy: +matrixise resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 09:07:13 2017 From: report at bugs.python.org (Basiruddin Syarifan Radifan) Date: Wed, 16 Aug 2017 13:07:13 +0000 Subject: [issue31220] test Message-ID: <1502888833.1.0.837244974032.issue31220@psf.upfronthosting.co.za> Changes by Basiruddin Syarifan Radifan : ---------- components: Argument Clinic files: _.txt nosy: Basiruddin Syarifan Radifan, larry priority: normal severity: normal status: open title: test type: crash versions: Python 3.4 Added file: http://bugs.python.org/file47087/_.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 09:07:49 2017 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 16 Aug 2017 13:07:49 +0000 Subject: [issue31220] test Message-ID: <1502888869.3.0.406935606168.issue31220@psf.upfronthosting.co.za> New submission from St?phane Wirtel: Please could you stop your spam ? Thank you ---------- nosy: +matrixise resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 09:13:23 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 16 Aug 2017 13:13:23 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502889203.16.0.66762291409.issue31210@psf.upfronthosting.co.za> Steve Dower added the comment: We don't. Semicolons are not valid path characters, so you can't have them in a single path (unless you're deliberately trying to break your entire machine...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 09:24:47 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Aug 2017 13:24:47 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502889887.75.0.196443006281.issue31210@psf.upfronthosting.co.za> R. David Murray added the comment: Is this post wrong then?: https://superuser.com/questions/584870/how-can-i-add-a-folder-containing-a-semicolon-to-the-windows-path ("I noticed that the semicolon ; is a valid character for Windows (NTFS) file and directory names.") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 09:33:42 2017 From: report at bugs.python.org (Gustavo Serra Scalet) Date: Wed, 16 Aug 2017 13:33:42 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1502890422.29.0.98247692709.issue30910@psf.upfronthosting.co.za> Gustavo Serra Scalet added the comment: > Why doesn't gcc make it the default behaviour? Because it "can produce significant data size overhead, although it does not affect execution" for C code. However it'd improves interoperability with C++, which I think it makes sense for a universal software like cpython. Or isn't interoperability with c++ a concern? I noticed you said that there are not tests for it currently, but I wonder the reason behind it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 09:37:03 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 Aug 2017 13:37:03 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1502890623.85.0.879562451047.issue30910@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Or isn't interoperability with c++ a concern? I noticed you said that there are not tests for it currently, but I wonder the reason behind it. I suppose nobody cared enough, and/or those tests are difficult to write (you need a cross-platform way to invoke a C++ compiler with exceptions enabled). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 10:18:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 14:18:58 +0000 Subject: [issue31067] test_subprocess.test_leak_fast_process_del_killed() fails randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1501252972.97.0.198077467946.issue31067@psf.upfronthosting.co.za> Message-ID: <1502893138.54.0.413349410369.issue31067@psf.upfronthosting.co.za> STINNER Victor added the comment: I made many changes in tests to prevent leaking zombie processes. Let's hope that it was enough to fix this bug. Since the bug occurred randomly, it's hard to say. I close the bug, but will reopen it if the bug occurs again. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 10:21:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 14:21:19 +0000 Subject: [issue30947] Update embeded copy of libexpat to 2.2.2 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1502893279.89.0.0271174970663.issue30947@psf.upfronthosting.co.za> STINNER Victor added the comment: Expat 2.2.3 was released: Release 2.2.3 Wed August 2 2017 Security fixes: #82 CVE-2017-11742 -- Windows: Fix DLL hijacking vulnerability using Steve Holme's LoadLibrary wrapper for/of cURL Bug fixes: #85 Fix a dangling pointer issue related to realloc Other changes: Increase code coverage #91 Linux: Allow getrandom to fail if nonblocking pool has not yet been initialized and read /dev/urandom then, instead. This is in line with what recent Python does. #81 Pre-10.7/Lion macOS: Support entropy from arc4random #86 Check that a UTF-16 encoding in an XML declaration has the right endianness #4 #5 #7 Recover correctly when some reallocations fail Repair "./configure && make" for systems without any provider of high quality entropy and try reading /dev/urandom on those Ensure that user-defined character encodings have converter functions when they are needed Fix mis-leading description of argument -c in xmlwf.1 Rely on macro HAVE_ARC4RANDOM_BUF (rather than __CloudABI__) for CloudABI #100 Fix use of SIPHASH_MAIN in siphash.h #23 Test suite: Fix memory leaks Version info bumped from 7:4:6 to 7:5:6 Special thanks to: Chanho Park Joe Orton Pascal Cuoq Rhodri James Simon McVittie Vadim Zeitlin Viktor Szakats and Core Infrastructure Initiative ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 10:22:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 14:22:54 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1502893374.22.0.220905978007.issue30947@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Update embeded copy of libexpat to 2.2.2 -> Update embeded copy of libexpat from 2.2.1 to 2.2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 10:26:28 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 16 Aug 2017 14:26:28 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1502893588.42.0.910453425673.issue28261@psf.upfronthosting.co.za> Oren Milman added the comment: I replied to your comments in Rietveld, Serhiy. (http://bugs.python.org/review/28261) also, i found two places with a quite similar issue: - in Objects/exceptions.c in ImportError_init: >>> ImportError(1, 2, 3, 4, a=5, b=6, c=7) Traceback (most recent call last): File "", line 1, in TypeError: ImportError() takes at most 2 arguments (3 given) - in Python/bltinmodule.c in min_max: >>> min(1, 2, 3, 4, a=5, b=6, c=7) Traceback (most recent call last): File "", line 1, in TypeError: function takes at most 2 arguments (3 given) may I fix them also as part of this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 10:30:37 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 14:30:37 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1502893837.41.0.911801492088.issue30947@psf.upfronthosting.co.za> STINNER Victor added the comment: Previous update: bpo-30694. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 10:34:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 14:34:32 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1502894072.06.0.405145216807.issue30947@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3145 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 10:35:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 14:35:08 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1502894108.87.0.0465643688145.issue30947@psf.upfronthosting.co.za> STINNER Victor added the comment: cpython_rebuild_expat_dir.sh: Script used to update Modules/expat/ to 2.2.3. The script now uses the libexpat Git repository. Previously, I used tarballs. ---------- Added file: http://bugs.python.org/file47088/cpython_rebuild_expat_dir.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 10:38:43 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 14:38:43 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1502894323.06.0.260756576733.issue30947@psf.upfronthosting.co.za> STINNER Victor added the comment: > #82 CVE-2017-11742 -- Windows: Fix DLL hijacking vulnerability using Steve Holme's LoadLibrary wrapper for/of cURL https://github.com/libexpat/libexpat/issues/82 I don't think that this bug affects Python since Python sets a hash secret. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 11:31:15 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 16 Aug 2017 15:31:15 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502897475.08.0.301131832404.issue31210@psf.upfronthosting.co.za> Eryk Sun added the comment: > Is this post wrong then? No, it's not wrong that semicolon is a valid character in Windows NTFS and FAT32 filesystems. However, the answer by Kevin Edwards that recommends using double quotes needs qualification. It only works in CMD. It doesn't work in PowerShell nor the runtime library functions used by CreateProcess or SearchPath (i.e. RtlDosSearchPath_U[str]) or the loader's LdrpSearchPath function. These all split PATH on semicolon, with no supported escape character or quoting. In fact they retain double quotes in the computed filename when testing for existence, so quoting paths in PATH is wrong in general. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 11:37:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 15:37:47 +0000 Subject: [issue29169] update zlib to 1.2.11 In-Reply-To: <1483629107.49.0.982374684244.issue29169@psf.upfronthosting.co.za> Message-ID: <1502897867.55.0.737848834865.issue29169@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3146 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 11:42:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 15:42:09 +0000 Subject: [issue29169] update zlib to 1.2.11 In-Reply-To: <1483629107.49.0.982374684244.issue29169@psf.upfronthosting.co.za> Message-ID: <1502898129.77.0.253708162139.issue29169@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3147 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 11:42:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 15:42:09 +0000 Subject: [issue18527] Upgrade Modules/zlib to 1.2.8 In-Reply-To: <1374483245.68.0.946100267151.issue18527@psf.upfronthosting.co.za> Message-ID: <1502898129.91.0.835347413925.issue18527@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3148 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 11:54:23 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 16 Aug 2017 15:54:23 +0000 Subject: [issue25166] Windows AllUsers installation places uninstaller in user profile In-Reply-To: <1442575090.58.0.314641407957.issue25166@psf.upfronthosting.co.za> Message-ID: <1502898863.8.0.607348995712.issue25166@psf.upfronthosting.co.za> Steve Dower added the comment: There are no more binary installers for 3.5, so updating the target versions. I have some ideas about how to do this and will hopefully get time at the dev sprints to try them out. ---------- stage: -> needs patch type: -> behavior versions: +Python 3.6, Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 11:59:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 15:59:10 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories Message-ID: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> New submission from STINNER Victor: My PR https://github.com/python/cpython/pull/3106 failed because patchcheck wants me to normalize spaces of Modules/expat/siphash.h, whereas this file is copied from libexpat: see bpo-30947. Attached PR changes Tools/scripts/patchcheck.py to ignore changes in Modules/expat/ and Modules/zlib/ subdirectories. The change also drops support for Mercurial, since CPython migrated to Git. ---------- messages: 300372 nosy: haypo priority: normal severity: normal status: open title: Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 12:00:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 16 Aug 2017 16:00:10 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502899210.91.0.320495871793.issue31221@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3149 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 12:06:00 2017 From: report at bugs.python.org (Larry Hastings) Date: Wed, 16 Aug 2017 16:06:00 +0000 Subject: [issue29169] update zlib to 1.2.11 In-Reply-To: <1483629107.49.0.982374684244.issue29169@psf.upfronthosting.co.za> Message-ID: <1502899560.04.0.357896994699.issue29169@psf.upfronthosting.co.za> Larry Hastings added the comment: New changeset d0e61bded5256e775e470e2c0da22367a1a81970 by larryhastings (Victor Stinner) in branch '3.4': bpo-29169: Update zlib to 1.2.11 (#3107) https://github.com/python/cpython/commit/d0e61bded5256e775e470e2c0da22367a1a81970 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 12:24:30 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Aug 2017 16:24:30 +0000 Subject: [issue31210] Can not import site from sys.prefix containing DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502900670.47.0.927593214089.issue31210@psf.upfronthosting.co.za> R. David Murray added the comment: All right. So the challenge here for windows is: if python is installed on a path that has a semicolon in one of the directory names, is it even possible to populate sys.path such that modules can be imported from the lib directory that is under that path? (IMO we shouldn't jump through big hoops to support this, but if it can be done and the refactoring Nick is contemplating makes it *relatively* easily, it would probably be good to do, to be consistent). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 12:31:27 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Aug 2017 16:31:27 +0000 Subject: [issue31210] Can not import modules if sys.prefix contains DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502901087.08.0.0943342839111.issue31210@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: Can not import site from sys.prefix containing DELIM -> Can not import modules if sys.prefix contains DELIM _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 12:41:32 2017 From: report at bugs.python.org (Eryk Sun) Date: Wed, 16 Aug 2017 16:41:32 +0000 Subject: [issue31210] Can not import modules if sys.prefix contains DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502901692.81.0.310174823097.issue31210@psf.upfronthosting.co.za> Eryk Sun added the comment: It's simple to work around using a junction or symbolic link, so is this worth pursuing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 12:51:35 2017 From: report at bugs.python.org (Gustavo Serra Scalet) Date: Wed, 16 Aug 2017 16:51:35 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1502902295.61.0.221949647333.issue30910@psf.upfronthosting.co.za> Gustavo Serra Scalet added the comment: well, now I'm confused: what should we do with this change? Do we need to ask any other expert? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 13:01:46 2017 From: report at bugs.python.org (Paul G) Date: Wed, 16 Aug 2017 17:01:46 +0000 Subject: [issue31222] datetime.py implementation of .replace inconsistent with C implementation Message-ID: <1502902905.88.0.809330827331.issue31222@psf.upfronthosting.co.za> New submission from Paul G: In the .py implementation of datetime.replace (and date.replace and time.replace), the new datetime is created using the datetime type: https://github.com/python/cpython/blob/master/Lib/datetime.py#L1578 But in the C source, it is created from type(self): https://github.com/python/cpython/blob/master/Modules/_datetimemodule.c#L5046 I think the second should be the preferred behavior, so the datetime.py source should be updated to reflect that it's calling self.__class__(...) rather than datetime(...). I can prepare a PR if this would be desirable. (That said, I'm not 100% clear under what circumstances the code in datetime.py is actually *used*, so I'm not sure how to write tests for it - is datetime.py essentially documentation, or is there a way to explicitly fall back to it?) Per this issue on the pypy3 tracker: https://bitbucket.org/pypy/pypy/issues/2635/datetimereplace-always-returns ---------- components: Interpreter Core messages: 300377 nosy: p-ganssle priority: normal severity: normal status: open title: datetime.py implementation of .replace inconsistent with C implementation versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 13:13:13 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 16 Aug 2017 17:13:13 +0000 Subject: [issue31222] datetime.py implementation of .replace inconsistent with C implementation In-Reply-To: <1502902905.88.0.809330827331.issue31222@psf.upfronthosting.co.za> Message-ID: <1502903593.71.0.724832824469.issue31222@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I agree that returning type(self) or self.__class__ (not sure which is better) is the right thing to do. It might be possible to argue that the Python version is buggy, if the C version is treated as the reference implementation and the Python version has to duplicate that. Or if the documentation specifies the C version's behaviour. But if the precise behaviour is unspecified, or if the Python version is the reference implementation, its best to treat this as an enhancement rather than a bug fix and only apply it to 3.7. I'm not sure which is the right approach here. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 13:15:22 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 16 Aug 2017 17:15:22 +0000 Subject: [issue31222] datetime.py implementation of .replace inconsistent with C implementation In-Reply-To: <1502902905.88.0.809330827331.issue31222@psf.upfronthosting.co.za> Message-ID: <1502903722.13.0.374065814064.issue31222@psf.upfronthosting.co.za> R. David Murray added the comment: See also issue 20371. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 13:22:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 16 Aug 2017 17:22:33 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502904153.03.0.32566140933.issue31221@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is it worth to add other imported libs (libmpdec, libffi)? Or may be just remove trailing spaces when import sources from upstream? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 13:25:56 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 Aug 2017 17:25:56 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1502904356.37.0.802681121397.issue30910@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Several comments: - we don't want to risk bugfix branches for this, so this should only go into the master branch (future 3.7) - I'm not sure it's a reasonable policy to fix shortcomings of all compilers in our configure script; though of course we already have such code for common setups - regarding the PR, OPT does not look like the right variable to use (it's not an optimization setting) ---------- components: +Build type: -> enhancement versions: +Python 3.7 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 13:39:48 2017 From: report at bugs.python.org (Paul G) Date: Wed, 16 Aug 2017 17:39:48 +0000 Subject: [issue31222] datetime.py implementation of .replace inconsistent with C implementation In-Reply-To: <1502902905.88.0.809330827331.issue31222@psf.upfronthosting.co.za> Message-ID: <1502905188.13.0.707581183553.issue31222@psf.upfronthosting.co.za> Paul G added the comment: @r.david.murray In the other thread, you mention that the full test suite is run against the C and Python implementations, so that answers the question of how to write the tests. I think treating it as an enhancement in Python 3.7 makes a reasonable amount of sense - it's clearly under-specified at the moment and people are probably relying on the CPython behavior (dateutil definitely is in the latest stable release, but not on master). Saying "it's implementation-specific before Python 3.7 but in Python 3.7+, the spec says it should use self(type)" is fine by me. It's not particularly hard to work around if you're subclassing datetime anyway. Among the major libraries that provide their own datetime objects: - Arrow seems to use composition (https://github.com/crsmithdev/arrow/blob/master/arrow/arrow.py) - pendulum subclasses, but implements their own "replace": https://github.com/sdispater/pendulum/blob/master/pendulum/pendulum.py#L25 - delorean uses composition: https://github.com/myusuf3/delorean/blob/master/delorean/dates.py#L174 - maya uses composition: https://github.com/kennethreitz/maya/blob/master/maya/core.py#L72 I'd say for the most part it's not a major issue to change it even as a bugfix, particularly if the line we're going with is "it was always implementation-specific", but there's also no rush. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:05:41 2017 From: report at bugs.python.org (adminos) Date: Wed, 16 Aug 2017 18:05:41 +0000 Subject: [issue31223] Hacked By KingSkrupellos Cyberizm.Org Digital Security Technological Turkish Moslem Army Message-ID: <1502906741.75.0.248119207821.issue31223@psf.upfronthosting.co.za> New submission from adminos: Hacked By KingSkrupellos Cyberizm.Org Digital Security Technological Turkish Moslem Army ---------- components: Argument Clinic messages: 300383 nosy: adminos, doko, larry priority: normal severity: normal status: open title: Hacked By KingSkrupellos Cyberizm.Org Digital Security Technological Turkish Moslem Army type: compile error versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:06:13 2017 From: report at bugs.python.org (adminos) Date: Wed, 16 Aug 2017 18:06:13 +0000 Subject: [issue31223] Hacked By KingSkrupellos Cyberizm.Org Digital Security Technological Turkish Moslem Army In-Reply-To: <1502906741.75.0.248119207821.issue31223@psf.upfronthosting.co.za> Message-ID: <1502906773.7.0.985099392639.issue31223@psf.upfronthosting.co.za> adminos added the comment: Hacked By KingSkrupellos Cyberizm.Org Digital Security Technological Turkish Moslem Army ---------- components: +Unicode -Argument Clinic nosy: +ezio.melotti, haypo resolution: -> works for me Added file: http://bugs.python.org/file47089/kingskrupellos.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:07:09 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Aug 2017 18:07:09 +0000 Subject: [issue31223] Hacked By KingSkrupellos Cyberizm.Org Digital Security Technological Turkish Moslem Army In-Reply-To: <1502906773.7.0.985099392639.issue31223@psf.upfronthosting.co.za> Message-ID: <1502906829.98.0.0432655737218.issue31223@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- Removed message: http://bugs.python.org/msg300383 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:07:20 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Aug 2017 18:07:20 +0000 Subject: [issue31223] Hacked By KingSkrupellos Cyberizm.Org Digital Security Technological Turkish Moslem Army Message-ID: <1502906840.22.0.0720659396618.issue31223@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- Removed message: http://bugs.python.org/msg300384 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:07:56 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Aug 2017 18:07:56 +0000 Subject: [issue31223] Spam Message-ID: <1502906876.75.0.672516681239.issue31223@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- components: -Unicode nosy: -adminos, doko, ezio.melotti, haypo, larry resolution: works for me -> not a bug stage: -> resolved status: open -> closed title: Hacked By KingSkrupellos Cyberizm.Org Digital Security Technological Turkish Moslem Army -> Spam type: compile error -> versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:08:07 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Aug 2017 18:08:07 +0000 Subject: [issue31223] Spam Message-ID: <1502906887.35.0.524822763781.issue31223@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file47089/kingskrupellos.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:11:02 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Aug 2017 18:11:02 +0000 Subject: [issue31220] test In-Reply-To: <1502888869.3.0.406935606168.issue31220@psf.upfronthosting.co.za> Message-ID: <1502907062.12.0.731804079327.issue31220@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file47087/_.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:11:26 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Aug 2017 18:11:26 +0000 Subject: [issue31220] Spam In-Reply-To: <1502888869.3.0.406935606168.issue31220@psf.upfronthosting.co.za> Message-ID: <1502907086.81.0.506413315535.issue31220@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- components: -Argument Clinic nosy: -Basiruddin Syarifan Radifan, larry, matrixise resolution: rejected -> not a bug title: test -> Spam type: crash -> versions: -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:11:59 2017 From: report at bugs.python.org (Zachary Ware) Date: Wed, 16 Aug 2017 18:11:59 +0000 Subject: [issue31219] Spam In-Reply-To: <1502888701.46.0.794855931419.issue31219@psf.upfronthosting.co.za> Message-ID: <1502907119.34.0.142404685531.issue31219@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- components: -Argument Clinic nosy: -Basiruddin Syarifan Radifan, larry, matrixise resolution: rejected -> not a bug title: test -> Spam type: behavior -> versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:27:28 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 Aug 2017 18:27:28 +0000 Subject: [issue18966] Threads within multiprocessing Process terminate early In-Reply-To: <1378603227.91.0.146993702012.issue18966@psf.upfronthosting.co.za> Message-ID: <1502908048.58.0.321127076276.issue18966@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +3150 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:35:47 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 Aug 2017 18:35:47 +0000 Subject: [issue18966] Threads within multiprocessing Process terminate early In-Reply-To: <1378603227.91.0.146993702012.issue18966@psf.upfronthosting.co.za> Message-ID: <1502908547.46.0.3278383263.issue18966@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: needs patch -> patch review versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:53:31 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 Aug 2017 18:53:31 +0000 Subject: [issue18966] Threads within multiprocessing Process terminate early In-Reply-To: <1378603227.91.0.146993702012.issue18966@psf.upfronthosting.co.za> Message-ID: <1502909611.32.0.247149718916.issue18966@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset ee84a608587b930176d37303afae8a4358e15990 by Antoine Pitrou in branch 'master': bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit (#3111) https://github.com/python/cpython/commit/ee84a608587b930176d37303afae8a4358e15990 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 14:54:02 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 16 Aug 2017 18:54:02 +0000 Subject: [issue18966] Threads within multiprocessing Process terminate early In-Reply-To: <1378603227.91.0.146993702012.issue18966@psf.upfronthosting.co.za> Message-ID: <1502909642.04.0.636655391114.issue18966@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is now fixed in git master. Thank you for the report! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 15:22:16 2017 From: report at bugs.python.org (Christian Heimes) Date: Wed, 16 Aug 2017 19:22:16 +0000 Subject: [issue30102] improve performance of libSSL usage on hashing In-Reply-To: <1492625768.04.0.0441991699383.issue30102@psf.upfronthosting.co.za> Message-ID: <1502911336.94.0.991365704869.issue30102@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- pull_requests: +3151 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 16:38:06 2017 From: report at bugs.python.org (Siming Yuan) Date: Wed, 16 Aug 2017 20:38:06 +0000 Subject: [issue31211] distutils/util.py get_platform() does not identify linux-i686 platforms In-Reply-To: <1502814030.02.0.254840991446.issue31211@psf.upfronthosting.co.za> Message-ID: <1502915886.08.0.1769752437.issue31211@psf.upfronthosting.co.za> Siming Yuan added the comment: Hi Eric I understand where you are coming from, but I disagree with having to raise this to 3rd party tools. both wheel/pip makes calls to distutils.util.get_platform(). Fixing it in one location would fix it across the board. In addition, taking setuptools & pip out of picture (uninstalling), using just distutils.core.setup() and doing a bdist (built-in command available in distutils) is still generating a wrong tag in linux 32-bit arch. pkg-1.0.0.linux-x86_64.tar.gz within distutils.util.get_platform() the code under sunos makes attempts to identify the correct bitness: bitness = {2147483647:"32bit", 9223372036854775807:"64bit"} machine += ".%s" % bitness[sys.maxsize] why would the linux logic not handle the same problem? ---------- resolution: third party -> status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 16:39:31 2017 From: report at bugs.python.org (Siming Yuan) Date: Wed, 16 Aug 2017 20:39:31 +0000 Subject: [issue31211] distutils/util.py get_platform() does not identify linux-i686 platforms In-Reply-To: <1502814030.02.0.254840991446.issue31211@psf.upfronthosting.co.za> Message-ID: <1502915971.22.0.418578542266.issue31211@psf.upfronthosting.co.za> Changes by Siming Yuan : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 17:08:22 2017 From: report at bugs.python.org (=?utf-8?q?C=C3=A9dric_Krier?=) Date: Wed, 16 Aug 2017 21:08:22 +0000 Subject: [issue31210] Can not import modules if sys.prefix contains DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502917702.85.0.992946604846.issue31210@psf.upfronthosting.co.za> C?dric Krier added the comment: I'm wondering if it could have security implications and be used to fool user by changing the PYTHONPATH. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 17:13:12 2017 From: report at bugs.python.org (Dave Johansen) Date: Wed, 16 Aug 2017 21:13:12 +0000 Subject: [issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502917992.26.0.637832852939.issue31212@psf.upfronthosting.co.za> Dave Johansen added the comment: That's a valid `datetime` (i.e. within the min and max values) and `tzinfo` is `None` so I think it's completely reasonable to assume that `timestamp()` will return the correct value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 17:44:01 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 16 Aug 2017 21:44:01 +0000 Subject: [issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502919841.99.0.886807096904.issue31212@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The question is whether -62135658000.0 is the "correct" or even meaningful value: >>> datetime.utcfromtimestamp(-62135658000.0) Traceback (most recent call last): File "", line 1, in ValueError: year is out of range (I ran the above in Python 2.7 to avoid any 3.x datetime innovations.) I don't see much of a value in allowing datetime.timestamp() to produce values that correspond to out of bounds datetimes in UTC. In most cases this will only result in error later on in the program, or worse an error passing undetected. What is the use case for datetime.min.timestamp()? I suspect OP encountered this issue in an overly aggressive edge case testing and not in a real user scenario. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 17:57:10 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 16 Aug 2017 21:57:10 +0000 Subject: [issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502920630.44.0.838214704279.issue31212@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On the second thought, a reasonable design can use datetime.min/max as placeholders for unknown times far in the past/future compensating for the lack datetime ?inf. In this use case, it may be annoying to see errors from timestamp() instead of some ridiculously large values. I am -0 on making this change. If anyone is motivated to produce a patch - I'll review it, but I am not going to write it myself. I am marking this "tests needed" because we need a test complete with setting an appropriate timezone that demonstrates this issue. ---------- components: +Extension Modules stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 18:02:30 2017 From: report at bugs.python.org (Dave Johansen) Date: Wed, 16 Aug 2017 22:02:30 +0000 Subject: [issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502920950.69.0.0385930122319.issue31212@psf.upfronthosting.co.za> Dave Johansen added the comment: The use case was parsing user input of ISO 8601 date strings and converting them to UNIX epochs. The input "0001-01-01T00:00:00" is valid, parses to a valid `datetime` and it seems like a reasonable expectation that all of the functions should work on a valid `datetime` (especially when they worked in earlier versions of Python). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 18:18:41 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 16 Aug 2017 22:18:41 +0000 Subject: [issue29593] Improve UnboundLocalError message for deleted names In-Reply-To: <1487351217.08.0.939746599909.issue29593@psf.upfronthosting.co.za> Message-ID: <1502921921.52.0.741486427583.issue29593@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 18:30:21 2017 From: report at bugs.python.org (Dave Johansen) Date: Wed, 16 Aug 2017 22:30:21 +0000 Subject: [issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502922621.13.0.191637914779.issue31212@psf.upfronthosting.co.za> Dave Johansen added the comment: Ok, so I understand the issue now. `timestamp()` for naive datetime instances applies the local timezone offset ( https://docs.python.org/3.6/library/datetime.html#datetime.datetime.timestamp ). This is surprising because naive datetime instances usually are just that and don't make assumptions the timezone, but I guess that the behavior is documented and I was just unaware of it. It still seems like this shouldn't give an error (especially when the timezone of the local machine is UTC), but I guess that it is what it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 18:35:51 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 16 Aug 2017 22:35:51 +0000 Subject: [issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502922951.77.0.451274597539.issue31212@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It your use case, the input "0001-01-01T00:00:00" was in what timezone? I suspect what you want is >>> datetime.min.replace(tzinfo=timezone.utc).timestamp() -62135596800.0 And not -62135658000.0. If you work with naive datetimes and just want to roundtrip between datetimes and numbers, you should not use a timezone-dependent conversion - attach UTC timezone before calling .timestamp() as shown above. You probably don't want your program to produce different numbers for the same "0001-01-01T00:00:00" input depending on where it is run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 18:47:55 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 16 Aug 2017 22:47:55 +0000 Subject: [issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502923675.64.0.361324007471.issue31212@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: BTW, I was originally against introducing .timestamp() method and this issue illustrates why it is problematic: people use it without understanding what it does. If you want the distance between datetime.min and datetime(1970,1,1) in seconds - compute it explicitly: >>> (datetime.min - datetime(1970,1,1)) / timedelta(0, 1) -62135596800.0 If you don't want to loose precision is roundtriping between datetimes and numbers - use microseconds: >>> (datetime.min - datetime(1970,1,1)) // datetime.resolution -62135596800000000 It is perfectly fine to work with naive datetimes and ignore the timezone issues when all your timestamps are in one timezones, but if you choose to ignore timezones - don't use .timestamp(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 19:00:16 2017 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 16 Aug 2017 23:00:16 +0000 Subject: [issue31212] datetime: min date (0001-01-01 00:00:00) can't be converted to local timestamp In-Reply-To: <1502817992.35.0.826006067807.issue31212@psf.upfronthosting.co.za> Message-ID: <1502924416.85.0.264748273769.issue31212@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > It still seems like this shouldn't give an error (especially when the timezone of the local machine is UTC) This is the part where I agree with you. I suspect the error in the UTC case is an artifact of PEP 495 fold calculations that require probing times ?24 hours around the time being converted. For the times before timezones were invented (late 1800s?) we can safely assume that fold=0 always. To be safe, I would set the fold cut-off at the year 1000. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 20:22:13 2017 From: report at bugs.python.org (drallensmith) Date: Thu, 17 Aug 2017 00:22:13 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1502929333.87.0.938345990266.issue5001@psf.upfronthosting.co.za> drallensmith added the comment: Pull request submitted (4 days ago) for managers.py, queue.py; just added pool.py changes to those. ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 16 23:33:22 2017 From: report at bugs.python.org (D Gentry) Date: Thu, 17 Aug 2017 03:33:22 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502856733.0.0.717803195417.issue31148@psf.upfronthosting.co.za> Message-ID: D Gentry added the comment: So basically what your saying is that the MSI that I compile will only work for my specific situation as I'm not building it with a bundle? Hmm, that kind of sucks. Disregarding the difficulty of manually converting from source to MSI, if I was to choose to produce a version that included all the features you listed so it was able to be considered a full MSI release so others could benefit as well, would it be possible to get a bundle, even if was only for some of the older releases? I have a strategy I am considering employing to solve the problem where the more data I can get, the better it will all come together. Basically, I have a 5x raspberry pi 3 neural network unit that I am planning on getting here within the next couple of weeks to experiment with machine learning. Considering the situation, I believe this may be a good task to apply a convolution neural net to solve. The problem is essentially converting the raw source code into the corresponding MSI, via Wix. If I use the old release's source and MSI repositories as models, I believe it should be possible to train the system to do the conversion for future versions as well. The more data I have to feed the system, such as the bundles you mentioned, would definitely help increase the accuracy of the algorithm more quickly, but I'm not sure if this would be something Python.org would be willing to share. Even without the bundles, I think it will still be achievable. It just may take the system longer to attain sufficient accuracy as it would have to extrapolate more from the raw data. Is this an idea that intrigues you even slightly? Even if its a long shot, I think the benefits would be worth the attempt and the vast majority of the investment of time and resources would be my responsibilty. After the fact, should the algorithm succeed, I would be happy to share all my data with python.org regarding the experiment so you could begin providing MSI releases again with minimal effort on your part. Should you feel like there is something that would inherently and irrefutably inhibit the process, making this a completely hopeless endeavor, I will resign myself to producing the one-time use, stripped down version you were describing previously. I just hate investing a bunch of time into a project and the code I create is basically useless after I use it once, but I do respect your opinion therefore wanted to submit the proposal for your consideration before diving down the rabbit hole. Virus-free. www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> On Tue, Aug 15, 2017 at 10:12 PM, Steve Dower wrote: > > Steve Dower added the comment: > > Burn bundles are part of Wix, but it's the part you don't like :) > > If you just want a single MSI, you won't want a bundle. But you will have > to leave out nearly half of the features I listed because they simply are > not possible without it. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 00:47:50 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 17 Aug 2017 04:47:50 +0000 Subject: [issue29593] Improve UnboundLocalError message for deleted names In-Reply-To: <1487351217.08.0.939746599909.issue29593@psf.upfronthosting.co.za> Message-ID: <1502945270.21.0.653872406003.issue29593@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Re: http://bugs.python.org/msg288032 I don't know what example Raymond had, but your example In [5]: def foo(): ...: n = 1 ...: def g(): # imagine a more complex g ...: del n ...: g() ...: print(n) #UnboundLocalError is completely wrong, at least in what you imply in the comments. It would be a horrible language where functions could just delete nonlocal names in the same way as local ones. (You can force it by adding `nonlocal n` inside g. But "nonlocal keyword is ugly for a good reason", to quote Guido.:) It's interesting that in your example, you also get an ULE, but for a whole different reason: it is _g_'s call that tries to _delete_ (a kind of "referencing") a local (to _it_) variable n, that hasn't yet been set _in the scope of g_. You can see it easily in the traceback, and you'd probably see it if you didn't have preconceived notions about what happens. :-] You can easily see it by removing print(n), it is a red herring, or even more simply, just define g globally: >>> def g(): del n >>> g() UnboundLocalError: ... You'll get the same phenomenon. --- About the error message: I agree with Serhiy. See http://www.drmaciver.com/2013/07/a-case-study-in-bad-error-messages/#comment-9095 (and the whole discussion if you miss the context). Trying to cover all the possible situations where an ULE might get raised is (a) futile, (b) worsening things, since experienced programmers already know that error messages are just approximations, and beginners are best helped with just the most common case. May I ask why do you even teach "del on simple names" (as opposed to del on list items, which is kinda useful since it has a sideeffect) to beginners? It's very rarely needed, especially in a language with a powerful garbage collector. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 03:32:33 2017 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 17 Aug 2017 07:32:33 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1502955153.92.0.514841689975.issue30910@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Throwing exceptions through CPython is totally unsupported, -fexceptions or not. Like C++ code that's not exception-aware, CPython lacks any of the catch handlers to properly clean up resources on unwind. Thus, throwing exceptions through CPython will lead to, at best, resource leaks and, at worst, subtle corruption of interpreter data structures. I'm not sure why Debian would take this patch. ---------- nosy: +benjamin.peterson resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 03:57:44 2017 From: report at bugs.python.org (Andy Balaam) Date: Thu, 17 Aug 2017 07:57:44 +0000 Subject: [issue30782] Allow limiting the number of concurrent tasks in asyncio.as_completed In-Reply-To: <1498525522.6.0.617023291854.issue30782@psf.upfronthosting.co.za> Message-ID: <1502956664.11.0.834019866239.issue30782@psf.upfronthosting.co.za> Andy Balaam added the comment: bump ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 03:59:55 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 17 Aug 2017 07:59:55 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1502956795.49.0.0531458439071.issue28261@psf.upfronthosting.co.za> Oren Milman added the comment: After more looking, I found this issue in two more places: - in Modules/itertoolsmodule.c in product_new: >>> itertools.product(0, a=1, b=2, c=3, d=4, e=5, f=6) Traceback (most recent call last): File "", line 1, in TypeError: product() takes at most 1 argument (6 given) - in Python/bltinmodule.c in builtin_print: >>> print(0, a=1, b=2, c=3, d=4, e=5, f=6) Traceback (most recent call last): File "", line 1, in TypeError: print() takes at most 4 arguments (6 given) what do you think? should I open another issue for these and the other two I mentioned in msg300366? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 04:12:49 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 17 Aug 2017 08:12:49 +0000 Subject: [issue28332] keyword arguments In-Reply-To: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> Message-ID: <1502957569.57.0.185806209108.issue28332@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- title: silent truncations in socket.htons and socket.ntohs -> keyword arguments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 04:13:59 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 17 Aug 2017 08:13:59 +0000 Subject: [issue28332] Deprecated silent truncations in socket.htons and socket.ntohs. In-Reply-To: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> Message-ID: <1502957639.26.0.566120523716.issue28332@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- title: keyword arguments -> Deprecated silent truncations in socket.htons and socket.ntohs. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 04:14:54 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 17 Aug 2017 08:14:54 +0000 Subject: [issue28332] silent truncations in socket.htons and socket.ntohs In-Reply-To: <1475334370.1.0.257280912764.issue28332@psf.upfronthosting.co.za> Message-ID: <1502957694.64.0.37004443623.issue28332@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- title: Deprecated silent truncations in socket.htons and socket.ntohs. -> silent truncations in socket.htons and socket.ntohs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 04:29:49 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Aug 2017 08:29:49 +0000 Subject: [issue31210] Can not import modules if sys.prefix contains DELIM In-Reply-To: <1502800184.6.0.906228632756.issue31210@psf.upfronthosting.co.za> Message-ID: <1502958589.12.0.728021096433.issue31210@psf.upfronthosting.co.za> Nick Coghlan added the comment: If you have access to modify PYTHONPATH at all, you can already shadow almost all standard library modules: $ PYTHONPATH=/MY_CHOSEN_DIRECTORY python3 -m site sys.path = [ '/home/ncoghlan', '/MY_CHOSEN_DIRECTORY', '/usr/lib64/python36.zip', '/usr/lib64/python3.6', '/usr/lib64/python3.6/lib-dynload', '/home/ncoghlan/.local/lib/python3.6/site-packages', '/usr/lib64/python3.6/site-packages', '/usr/lib/python3.6/site-packages', ] The only ones you can't shadow that way are builtin and frozen modules, and any modules that get imported even before PYTHONPATH is processed. So no, this doesn't open up any new attack vectors that weren't already present by design. As far as whether or not it's worth fixing goes, yes, I think so - one of my original motivations for writing PEP 432 was to allow the use of CPython data structures when calculating the initial value of sys.path, and this is a nice concrete example of a bug arising from the current implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 04:57:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 08:57:32 +0000 Subject: [issue30616] Cannot use functional API to create enum with zero values In-Reply-To: <1497029417.9.0.731294800985.issue30616@psf.upfronthosting.co.za> Message-ID: <1502960252.96.0.963248072713.issue30616@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for the bugreport Gerrit Holl and thanks for fixes Dong-hee Na! ---------- nosy: +haypo resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 05:55:56 2017 From: report at bugs.python.org (TaoQingyun) Date: Thu, 17 Aug 2017 09:55:56 +0000 Subject: [issue31208] Simplify `low_fds_to_close` in subprocess.py Message-ID: <1502963756.91.0.563220396751.issue31208@psf.upfronthosting.co.za> Changes by TaoQingyun <845767657 at qq.com>: ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 06:55:01 2017 From: report at bugs.python.org (Marco Buttu) Date: Thu, 17 Aug 2017 10:55:01 +0000 Subject: [issue31224] Missing definition of frozen module Message-ID: <1502967301.1.0.268769760961.issue31224@psf.upfronthosting.co.za> New submission from Marco Buttu: In the doc there are several hints [*] to frozen modules, but there is no definition of them. Do you think we should add a "frozen module" definition to the glossary? * Doc/library/importlib.rst, Doc/library/imp.rst, Doc/reference/import.rst, ... ---------- assignee: docs at python components: Documentation messages: 300405 nosy: docs at python, marco.buttu priority: normal severity: normal status: open title: Missing definition of frozen module type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 06:59:35 2017 From: report at bugs.python.org (ksqsf) Date: Thu, 17 Aug 2017 10:59:35 +0000 Subject: [issue31225] allow hashlib `update' to accept str Message-ID: <1502967575.03.0.97521659396.issue31225@psf.upfronthosting.co.za> New submission from ksqsf: It'll be nice if `update' can accept str directly, rather than str.encode first. One of the most common use cases is "m.update(s.encode())", so it shouldn't make a big difference to just use "m.update(s)"; after all, users who want to specify encoding explicitly can still do so. ---------- components: Library (Lib) messages: 300406 nosy: ksqsf priority: normal severity: normal status: open title: allow hashlib `update' to accept str type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 07:30:35 2017 From: report at bugs.python.org (Gustavo Serra Scalet) Date: Thu, 17 Aug 2017 11:30:35 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1502969435.73.0.20713407382.issue30910@psf.upfronthosting.co.za> Gustavo Serra Scalet added the comment: > Throwing exceptions through CPython is totally unsupported, -fexceptions or not. Like C++ code that's not exception-aware, CPython lacks any of the catch handlers to properly clean up resources on unwind. wait wait. It's not expected that CPython would handle the exception at all! The only thing it's needed for CPython is to let the compiler generate extra information about how each function looks like in the stack (how the frame is structured, in DWARF language) in order for the unwinder to do his job. As documented, the code would not change its current behavior (no machine code is added or removed, so when debugging your function looks the same) but extra information is given in other for unwind to happen through those frames. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:11:28 2017 From: report at bugs.python.org (Gustavo Serra Scalet) Date: Thu, 17 Aug 2017 12:11:28 +0000 Subject: [issue30910] Add -fexception to ppc64le build In-Reply-To: <1499876037.27.0.944341854308.issue30910@psf.upfronthosting.co.za> Message-ID: <1502971888.09.0.253594901069.issue30910@psf.upfronthosting.co.za> Gustavo Serra Scalet added the comment: Sorry, I didn't take a deeper analysis on what you said, I guess you wanted to point out this problem: .---------------------. | A C++ code | <= Designed to be the catcher :---------------------: | cpython | <= Malloc'd something but unwind will not free it :---------------------: | called C++ function | <= Raises a C++ exception '---------------------' I guess memory leak would be a consequence, yes. *Sigh* ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:24:43 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Aug 2017 12:24:43 +0000 Subject: [issue31225] allow hashlib `update' to accept str In-Reply-To: <1502967575.03.0.97521659396.issue31225@psf.upfronthosting.co.za> Message-ID: <1502972683.66.0.556499913047.issue31225@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This will never happen as this is precisely the kind of confusion Python 3 was designed to avoid. ---------- nosy: +pitrou resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:31:12 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Aug 2017 12:31:12 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6 In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1502973072.64.0.554318884838.issue31217@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:31:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 12:31:55 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502973115.29.0.631994370664.issue31221@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: "Is it worth to add other imported libs (libmpdec, libffi)?" Oh right, I forgot libmpdec: I updated my PR. By the way, I started a list of embedded libraries: http://haypo-notes.readthedocs.io/cpython.html#embedded-libraries * zlib * expat * libmpdec * libffi libffi should be excluded in Python 2.7 and 3.6, but it was removed from Python 3.7. Serhiy: "Or may be just remove trailing spaces when import sources from upstream?" I prefer to leave the copied code unchanged, so it allows to easily cherry-pick from upstream. I did that once for libexpat (for fix a compilation issue on Visual Studio 2008). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:32:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Aug 2017 12:32:08 +0000 Subject: [issue31225] allow hashlib `update' to accept str In-Reply-To: <1502967575.03.0.97521659396.issue31225@psf.upfronthosting.co.za> Message-ID: <1502973128.13.0.0923685075795.issue31225@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Explicit is better than implicit. It is easy to add ".encode()" in the user code if it needs this. Adding this feature has non-zero (and actually not a small) cost. Since update() is not just a method, but a part of a protocol, you need to update all implementations. On other hand, raising an error on string argument can help to catch an error if a string unexpectedly occurred instead of a bytes object. ---------- nosy: +christian.heimes, gregory.p.smith, serhiy.storchaka versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:33:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 12:33:09 +0000 Subject: [issue29619] st_ino (unsigned long long) is casted to long long in posixmodule.c:_pystat_fromstructstat In-Reply-To: <1487766242.34.0.703380697066.issue29619@psf.upfronthosting.co.za> Message-ID: <1502973189.19.0.65340219286.issue29619@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ffbb6f7334ccf54f09dcc9e760766d861928f13e by Victor Stinner in branch '3.6': bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH-1666) (#3102) https://github.com/python/cpython/commit/ffbb6f7334ccf54f09dcc9e760766d861928f13e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:41:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Aug 2017 12:41:48 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502973708.6.0.195163619894.issue31221@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > libffi should be excluded in Python 2.7 and 3.6, but it was removed from Python 3.7. The parts for OSX and MSVC still are in the source tree. As for dropping support for Mercurial, is patchcheck.py used in other Python implementations (PyPy, Jython) which still use Mercurial? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:44:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Aug 2017 12:44:44 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1502973884.82.0.526209000308.issue30947@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could the updating script be added into the CPython repository? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:46:08 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Aug 2017 12:46:08 +0000 Subject: [issue24700] array compare is hideously slow In-Reply-To: <1437692474.17.0.61027224315.issue24700@psf.upfronthosting.co.za> Message-ID: <1502973968.8.0.847246682452.issue24700@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 7c17e2304b9387f321c813516bf134e4f0bd332a by Antoine Pitrou (Adrian Wielgosik) in branch 'master': bpo-24700: Add a fast path for comparing array.array of equal type (#3009) https://github.com/python/cpython/commit/7c17e2304b9387f321c813516bf134e4f0bd332a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:46:35 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Aug 2017 12:46:35 +0000 Subject: [issue24700] array compare is hideously slow In-Reply-To: <1437692474.17.0.61027224315.issue24700@psf.upfronthosting.co.za> Message-ID: <1502973995.91.0.509254513552.issue24700@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Adrian's PR was merged. Thank you Adrian! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:52:11 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Aug 2017 12:52:11 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1502974331.86.0.638379101036.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > also, i found two places with a quite similar issue: > may I fix them also as part of this issue? This looks as a different issue to me. All these cases are similar, but different from the original issue. Please open a new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 08:58:13 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 17 Aug 2017 12:58:13 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1502974693.06.0.169224141698.issue14976@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 09:05:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Aug 2017 13:05:12 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1502975112.06.0.0607189130359.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Answered questions on Rietveld. I'm not sure email notification from Rietveld works now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 09:09:37 2017 From: report at bugs.python.org (Stefan Krah) Date: Thu, 17 Aug 2017 13:09:37 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502975377.32.0.901561000996.issue31221@psf.upfronthosting.co.za> Stefan Krah added the comment: Yes, please add libmpdec to the ignored files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 09:13:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Aug 2017 13:13:16 +0000 Subject: [issue31141] Start should be a keyword argument of the built-in sum In-Reply-To: <1502193168.16.0.095124886528.issue31141@psf.upfronthosting.co.za> Message-ID: <1502975596.83.0.151898038387.issue31141@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Your tests show that there is a performance regression of getting rid of Argument Clinic (in addition to increasing the maintenance cost of the code that was generated previously). Try to use the simple Argument Clinic change (it can has non-zero cost too, but I expect that its penalty is much smaller). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 09:16:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Aug 2017 13:16:37 +0000 Subject: [issue31187] suboptimal code in Py_ReprEnter() In-Reply-To: <1502534222.01.0.165858988283.issue31187@psf.upfronthosting.co.za> Message-ID: <1502975797.76.0.90303510302.issue31187@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 09:25:52 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Aug 2017 13:25:52 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502976352.89.0.825104579766.issue31149@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3152 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 09:52:09 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 17 Aug 2017 13:52:09 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1502977929.37.0.818258779028.issue14976@psf.upfronthosting.co.za> Nick Coghlan added the comment: Itamar wrote up a post describing the GC variant of this problem in more detail: https://codewithoutrules.com/2017/08/16/concurrency-python/ In particular, he highlighted a particularly nasty action-at-a-distance variant of the deadlock where: 1. Someone registers a logging.handlers.QueueHandler instance with the logging system 2. One or more types in the application or libraries it uses call logging functions in a __del__ method or a weakref callback 3. A GC cycle triggers while a log message is already being processed and hence the thread already holds the queue's put() lock 4. Things deadlock because the put() operation isn't re-entrant As far as I can see, there's no application level way of resolving that short of "Only register logging.handlers.QueueHandler with a logger you completely control and hence can ensure is never used in a __del__ method or weakref callback", which doesn't feel like a reasonable restriction to place on the safe use of a standard library logging handler. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 09:54:49 2017 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 17 Aug 2017 13:54:49 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1502978089.09.0.632223290977.issue14976@psf.upfronthosting.co.za> Yury Selivanov added the comment: An idea from the blog post: if we rewrite queue in C it will use the GIL as a lock which will fix this particular bug. I can make a patch. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 09:55:20 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Aug 2017 13:55:20 +0000 Subject: [issue31179] Speed-up dict.copy() up to 5.5 times. In-Reply-To: <1502400693.03.0.6389481443.issue31179@psf.upfronthosting.co.za> Message-ID: <1502978120.39.0.661856583449.issue31179@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The side effect of this patch is making dict.copy() atomic. This is a worthy feature if extent it to dict constructor. For now the only way of making an atomic (or almost atomic) copy of a dict is dict(list(d.itemview())). It isn't very time and memory efficient. If you will make dict copying removing holes and extend your patch to dict constructor, it could be more useful. Look at the set implementation. It doesn't just use memcpy, but it contains specialized insertion implementation for the case if all items are unique. Fast copying is more important for dicts since the copying is more common for sets. It is a part of set operations and it is common to convert a set to a frozenset. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 09:58:18 2017 From: report at bugs.python.org (Vidar Fauske) Date: Thu, 17 Aug 2017 13:58:18 +0000 Subject: [issue31226] shutil.rmtree fails when target has an internal directory junction (Windows) Message-ID: <1502978298.87.0.60982184572.issue31226@psf.upfronthosting.co.za> New submission from Vidar Fauske: On Windows (Windows 10 in my case), given the following directory structure: - rootfolder - a - b - junc (directory junction to ../a) a call to `shutil.rmtree('root')` will fail with an exception `FileNotFoundError: [WinError 3]`, in a call to `os.listdir()` in `_rmtree_unsafe`. See attached minimal working example. Note that sorting order is important: A link in 'a' pointing to 'b' does not fail. This is because `os.listdir()` raises an exception for 'b/junc' when its target ('a') has already been deleted. Also, note that this is only for junctions, not directory links (`mklink /J` vs `mklink /D`), because: - Directory links flag false in the `stat.S_ISDIR(os.lstat('b/junc').st_mode)` test while junctions do not. - `os.islink()` returns false for both junctions, while directory links do not. Indicated Python versions are those which I have personally tested on, and observed this behavior. Current use case: Deleting a folder tree generated by an external tool, which creates junction links as part of its normal operation ('lerna' tool for the 'npm' javascript package manager). ---------- components: IO, Library (Lib), Windows files: mwe.py messages: 300424 nosy: paul.moore, steve.dower, tim.golden, vidartf, zach.ware priority: normal severity: normal status: open title: shutil.rmtree fails when target has an internal directory junction (Windows) versions: Python 3.3, Python 3.6 Added file: http://bugs.python.org/file47090/mwe.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:02:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 14:02:27 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502978547.87.0.857314094634.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: "For example TCL_VERSION and TK_VERSION are static versions (they should be equal in modern Tcl/Tk), and Tcl command "info patchlevel" returns the dynamic version." Ok, I added tkinter.patchlevel info which calls "info patchlevel". Serhiy: "In the readline module _READLINE_VERSION is header version, _READLINE_RUNTIME_VERSION and _READLINE_LIBRARY_VERSION are runtime versions." The 3 variables are stored. Serhiy: "In the zlib module ZLIB_VERSION is header version, ZLIB_RUNTIME_VERSION is runtime version." I just added the 2 variables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:15:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 14:15:08 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502979308.15.0.624957837067.issue31221@psf.upfronthosting.co.za> STINNER Victor added the comment: Serhiy: "The parts for OSX and MSVC still are in the source tree." Oh, I didn't know that we still had two special libffi directories for macOS and Windows! Why do we still have these directories? Both seems to be very outdated, no? I completed my list: http://haypo-notes.readthedocs.io/cpython.html#embedded-libraries Serhiy: "As for dropping support for Mercurial, is patchcheck.py used in other Python implementations (PyPy, Jython) which still use Mercurial?" I reverted my change to keep Mercurial support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:28:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 14:28:51 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502980131.13.0.79822759289.issue31221@psf.upfronthosting.co.za> STINNER Victor added the comment: Stefan Krah: "Yes, please add libmpdec to the ignored files." Ok, (already) done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:29:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 14:29:17 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502980157.71.0.230072053046.issue31221@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4a347ce426fe7381885703d9074d7a6b3aeb2f2b by Victor Stinner in branch 'master': bpo-31221: patchcheck ignores external libraries (#3109) https://github.com/python/cpython/commit/4a347ce426fe7381885703d9074d7a6b3aeb2f2b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:31:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 14:31:56 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502980316.21.0.262022328113.issue31221@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3153 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:32:10 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Aug 2017 14:32:10 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502980330.37.0.638980333159.issue31149@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3154 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:34:30 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 17 Aug 2017 14:34:30 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502980470.99.0.688269051125.issue31149@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3155 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:35:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 14:35:16 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502980516.01.0.1402688175.issue31221@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3156 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:40:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 14:40:53 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502980853.41.0.605609844868.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b907abc88589f7bea52c5afe172ececc6edcda70 by Victor Stinner in branch 'master': bpo-30871: Add test.pythoninfo (#3075) https://github.com/python/cpython/commit/b907abc88589f7bea52c5afe172ececc6edcda70 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:53:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 14:53:30 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502981610.05.0.776527173968.issue31221@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d23b1c4fd82a326e729027a791220d6011e097b4 by Victor Stinner in branch '3.6': [3.6] bpo-31221: patchcheck ignores external libraries (#3109) (#3116) https://github.com/python/cpython/commit/d23b1c4fd82a326e729027a791220d6011e097b4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:56:16 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 17 Aug 2017 14:56:16 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1502981776.36.0.79186249997.issue28261@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3157 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 10:57:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 14:57:56 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502981876.07.0.764808263952.issue30871@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3158 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:00:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:00:20 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502982020.52.0.0176104301795.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: I created https://github.com/python/cpython/pull/3120 to add "make pythoninfo" because it's more tricky than what I expected to run "./python -m test.pythoninfo" on buildbots. Depending if Python is built with shared library, depending on the OS (./python, or ./python.exe for macOS?), ... the command is different. I plan to backport Lib/test/pythoninfo.py and "make pythoninfo" to Python 2.7 and 3.6 to ease debug on all supported Python branches. ---------- versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:01:48 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 17 Aug 2017 15:01:48 +0000 Subject: [issue31148] Can we get an MSI installer for something past 3.4.4? In-Reply-To: <1502210311.11.0.464984034279.issue31148@psf.upfronthosting.co.za> Message-ID: <1502982108.11.0.760586095059.issue31148@psf.upfronthosting.co.za> Steve Dower added the comment: The idea interests me from a theoretical point of view, but then I did my PhD in that field. I don't believe it's a practical solution, if only because you would need to manually generate the result in order to validate before releasing, and that's the step you're going to avoid. I don't think there's anything left to pursue here. Good luck with your efforts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:04:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:04:47 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502982287.32.0.245401626295.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: > I plan to backport Lib/test/pythoninfo.py and "make pythoninfo" to Python 2.7 and 3.6 to ease debug on all supported Python branches. Oh, but I will first only run pythoninfo on buildbot for the master branch, since I expect surprises depending on the platform :-) Once everything is fine, I will backport the enhancement to other branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:05:08 2017 From: report at bugs.python.org (Julien Palard) Date: Thu, 17 Aug 2017 15:05:08 +0000 Subject: [issue31149] Add Japanese to the language switcher In-Reply-To: <1502225924.72.0.833937750759.issue31149@psf.upfronthosting.co.za> Message-ID: <1502982308.81.0.837524222719.issue31149@psf.upfronthosting.co.za> Julien Palard added the comment: Has been merged on master, backported to 3.6 and 2.7. It starts to appear on some versions as the script is currently running, like in https://docs.python.org/2.7/. I'll close when I'll see this on all versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:13:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:13:04 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502982784.19.0.014223384859.issue31221@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset d45cb040b9fcd74e8824d417bf789fcef4c9592c by Victor Stinner in branch '2.7': [2.7] bpo-31221: patchcheck ignores external libraries (#3109) (#3118) https://github.com/python/cpython/commit/d45cb040b9fcd74e8824d417bf789fcef4c9592c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:13:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:13:35 +0000 Subject: [issue31221] Tools/scripts/patchcheck.py must ignore changes in Modules/expat/ and Modules/zlib/ subdirectories In-Reply-To: <1502899150.0.0.5988032686.issue31221@psf.upfronthosting.co.za> Message-ID: <1502982815.06.0.0155631435035.issue31221@psf.upfronthosting.co.za> STINNER Victor added the comment: patchcheck fixed in 2.7, 3.6 and 3.7 master. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:24:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:24:56 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1502983496.23.0.468124539839.issue30947@psf.upfronthosting.co.za> STINNER Victor added the comment: If libexpat is upgraded in Python 2.7, the new Modules/expat/loadlibrary.c should also be added to PC/VS9.0/ project files, as I did for PCbuild. Note: PC/VS7.1/ and PC/VS8.0/ are likely broken and don't need to be updated, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:32:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:32:04 +0000 Subject: [issue31227] regrtest: reseed random with the same seed before running a test file Message-ID: <1502983924.76.0.0545413601956.issue31227@psf.upfronthosting.co.za> New submission from STINNER Victor: Attached PR changes regrtest to reseed the random RNG before each test file. Use also more entropy for the seed: 2**32 (32 bits) rather than 10_000_000 (24 bits). The change should avoid random failure of test_tools when hunting reference leaks: see bpo-31174. Maybe it will also reduce false positive when hunting memory leaks, like bpo-31217. ---------- components: Tests messages: 300438 nosy: haypo priority: normal severity: normal status: open title: regrtest: reseed random with the same seed before running a test file versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:32:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:32:13 +0000 Subject: [issue31227] regrtest: reseed random with the same seed before running a test file In-Reply-To: <1502983924.76.0.0545413601956.issue31227@psf.upfronthosting.co.za> Message-ID: <1502983933.33.0.82549378102.issue31227@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3159 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:33:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:33:50 +0000 Subject: [issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.x In-Reply-To: <1502365539.11.0.343233157276.issue31174@psf.upfronthosting.co.za> Message-ID: <1502984030.54.0.793001410789.issue31174@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-31227: "regrtest: reseed random with the same seed before running a test file". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:33:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:33:59 +0000 Subject: [issue31227] regrtest: reseed random with the same seed before running a test file In-Reply-To: <1502983924.76.0.0545413601956.issue31227@psf.upfronthosting.co.za> Message-ID: <1502984039.17.0.0650850833101.issue31227@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +pitrou, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:35:40 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Aug 2017 15:35:40 +0000 Subject: [issue31227] regrtest: reseed random with the same seed before running a test file In-Reply-To: <1502983924.76.0.0545413601956.issue31227@psf.upfronthosting.co.za> Message-ID: <1502984140.92.0.320233413367.issue31227@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If refleaks depend on the random seed, perhaps it's a bug worth fixing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:46:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:46:27 +0000 Subject: [issue31227] regrtest: reseed random with the same seed before running a test file In-Reply-To: <1502983924.76.0.0545413601956.issue31227@psf.upfronthosting.co.za> Message-ID: <1502984787.66.0.502883920393.issue31227@psf.upfronthosting.co.za> STINNER Victor added the comment: Antoine Pitrou: "If refleaks depend on the random seed, perhaps it's a bug worth fixing?" I propose to change regrtest behaviour even when -R is not used, to make regrtest more deterministic. Currently, when you run "./python -m test -r test_xxx test_yyyy", it's hard to guess the state of the RNG in test_yyy: it depends on many bytes were consumed by test_xxx. For example, if test_xxx is run on a buildbot, but skipped when I run it locally: we get a different behaviour. I would prefer that test_yyy behaves the same when run with "./python -m test -r --randseed=5 test_xxx test_yyyy" (with test_xxx) and with "./python -m test -r --randseed=5 test_yyyy" (without test_xxx). With my change, "./python -m test -r --randseed=5 test_yyyy test_yyyy" (sequential) and "./python -m test -r --randseed=5 -j2 test_yyyy test_yyyy" (parallel) runs test_yyy twice with the RNG in the same state. Proposed change is part of a more global project to reduce side effects of tests, to make tests more reproductible and more "isolated". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:48:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:48:08 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6 In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1502984888.55.0.0266934453058.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: It's even worse, many tests fail with 1 to 3 memory blocks on x86 Gentoo Refleaks 3.x... but then pass when run again. I created bpo-31227 "regrtest: reseed random with the same seed before running a test file" which might help (or not?) this issue. http://buildbot.python.org/all/builders/x86%20Gentoo%20Refleaks%203.x/builds/62 test_sys leaked [1, 1, 1] memory blocks, sum=3 test_robotparser leaked [1, 1, 1] memory blocks, sum=3 test_nntplib leaked [1, 1, 1] memory blocks, sum=3 test_tools leaked [3, 2, 1] memory blocks, sum=6 test_fork1 leaked [1, 1, 1] memory blocks, sum=3 test_poll leaked [1, 1, 1] memory blocks, sum=3 test_asyncio leaked [2, 1, 1] memory blocks, sum=4 Re-running failed tests in verbose mode Re-running test 'test_sys' in verbose mode Re-running test 'test_robotparser' in verbose mode Re-running test 'test_nntplib' in verbose mode Re-running test 'test_tools' in verbose mode test_tools leaked [1, 3, 1] memory blocks, sum=5 Re-running test 'test_fork1' in verbose mode Re-running test 'test_poll' in verbose mode Re-running test 'test_asyncio' in verbose mode ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 11:51:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 15:51:25 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6 In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1502985085.68.0.626980530703.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: regrtest also has an issue: when tests are run again, they should be run in a fresh process, especially when tests are run in parallel (-jN). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 12:16:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 16:16:26 +0000 Subject: [issue31227] regrtest: reseed random with the same seed before running a test file In-Reply-To: <1502983924.76.0.0545413601956.issue31227@psf.upfronthosting.co.za> Message-ID: <1502986586.97.0.897725760921.issue31227@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure if we should use the same RNG seed for all tests, or create one seed per test when the option -r is used. For example, I expect that "./python -m test -r -F test_tools" will catch a random bug which only occurs for a specific random seed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 12:33:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 16:33:26 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502987606.3.0.97501326405.issue30871@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3160 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 13:28:26 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 Aug 2017 17:28:26 +0000 Subject: [issue31228] Subprocess.Popen crash w/ Win10, debug32, bad file, and PIPE Message-ID: <1502990905.97.0.599281951083.issue31228@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Running Debug|Win32 interpreter... Python 3.7.0a0 (heads/master:b907abc885, Aug 17 2017, 11:41:56) [MSC v.1900 32 bit (Intel)] on win32 I get the following crash report -------------------------------------------------------------- Microsoft Visual C++ Runtime Library (X) Debug Assertion Failed! Program: F:\dev\3x\PCBuild\win32\python_d.exe File: minkernel\crts\ucrt\src\appcrt\lowio\close.cpp Line: 48 Expression: (fh >= 0 && (unsigned)fh < (unsigned)_nhandle ... (Press Retry to debug the application) ---------------------------------------------------------------- when running the following, extracted from test.pythoninfo import subprocess proc = subprocess.Popen(["gdb", "-nx", "--version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) If I do any of the following, I get the expected FileNotFound error. 1. Run with installed normal 64-bit 3.6. 2. Replace 'gdb' with 'python' (but 'xyz' still crashes). 3. Remove the std... options or replace subprocess.PIPE with a real file. ---------- components: Library (Lib), Windows messages: 300445 nosy: paul.moore, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Subprocess.Popen crash w/ Win10, debug32, bad file, and PIPE type: crash versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 13:35:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Aug 2017 17:35:26 +0000 Subject: [issue31227] regrtest: reseed random with the same seed before running a test file In-Reply-To: <1502983924.76.0.0545413601956.issue31227@psf.upfronthosting.co.za> Message-ID: <1502991326.06.0.267104389925.issue31227@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The PRNG is not the only source of the randomness in the tests. The exact behavior depends on the order of files in directories, on string hashes randomization, on address randomization, and on many other things out of our control. Couldn't reseeding the PRNG just add a false promise? The success in making tests deterministic can also narrow down the coverage of the testing. Some branches that lead to failures can be never executed. Our target not just making tests always success, but catch and fix even pretty rare errors. ---------- nosy: +ezio.melotti, mark.dickinson, michael.foord, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 13:36:23 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 Aug 2017 17:36:23 +0000 Subject: [issue31228] Subprocess.Popen crash w/ Win10, debug32, bad file, and PIPE In-Reply-To: <1502990905.97.0.599281951083.issue31228@psf.upfronthosting.co.za> Message-ID: <1502991383.7.0.794725641547.issue31228@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Appveyor ran pythoninfo successfully on its normal 32-bit build. https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.5381 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 13:36:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 Aug 2017 17:36:56 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1502991416.68.0.364786290953.issue30871@psf.upfronthosting.co.za> Terry J. Reedy added the comment: python -m test.pythoninfo crashes for me on Win10, debug32, but I don't think it is the fault of pythoninfo. See #31288. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 13:51:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 17:51:42 +0000 Subject: [issue31227] regrtest: reseed random with the same seed before running a test file In-Reply-To: <1502983924.76.0.0545413601956.issue31227@psf.upfronthosting.co.za> Message-ID: <1502992302.24.0.410861325097.issue31227@psf.upfronthosting.co.za> STINNER Victor added the comment: > The exact behavior depends on the order of files in directories, on string hashes randomization, on address randomization, and on many other things out of our control. For hash randomization, maybe we need to generate a PYTHONHASHSEED, as tox test runner does. For the filesystem: right, it's not possible to get 100% reproductible tests, but IMHO it's worth it to make them more reliable. > Couldn't reseeding the PRNG just add a false promise? I'm trying to fix random failures on the Refleaks buildbots, not to promise anything :-) To be honest, at this point, I don't know if it would be enough since I'm unable to reproduce bugs... > The success in making tests deterministic can also narrow down the coverage of the testing. Some branches that lead to failures can be never executed. Our target not just making tests always success, but catch and fix even pretty rare errors. I know that it's though question, and that's why I opened this issue, to discuss it :-) But I see more and more projects to get more reproductible softwares and tests: * https://reproducible-builds.org/ * systemd big project to get more "stateless" computers, or said differently: to isolate better services * containers which also want to isolate services, "stateless" containers * etc. Other test runners, like tox, also make efforts to get reproductible tests, like setting PYTHONHASHSEED. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 13:56:05 2017 From: report at bugs.python.org (Eryk Sun) Date: Thu, 17 Aug 2017 17:56:05 +0000 Subject: [issue31226] shutil.rmtree fails when target has an internal directory junction (Windows) In-Reply-To: <1502978298.87.0.60982184572.issue31226@psf.upfronthosting.co.za> Message-ID: <1502992565.01.0.525137008048.issue31226@psf.upfronthosting.co.za> Eryk Sun added the comment: Junctions are sometimes used as links (e.g. mklink /j) and sometimes as volume mount points (e.g. mountvol.exe). GetVolumePathName can be called to distinguish these cases. If a junction is a volume mount point, then its absolute path and volume path are the same. This test is already used in ntpath.ismount(). For a junction link, islink() should return true, readlink() should work, and S_ISDIR() should return false for the lstat() st_mode. For a junction mount point, islink() should return false, readlink() should not work, and S_ISDIR() should return true for the lstat() st_mode. A helper function could be added in fileutils.c to determine whether a reparse point is a link, based on the file path and reparse tag. Then modify _Py_attribute_data_to_stat() to take `BOOL is_link` instead of `ULONG reparse_tag`. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 13:57:09 2017 From: report at bugs.python.org (Eryk Sun) Date: Thu, 17 Aug 2017 17:57:09 +0000 Subject: [issue31226] shutil.rmtree fails when target has an internal directory junction (Windows) In-Reply-To: <1502978298.87.0.60982184572.issue31226@psf.upfronthosting.co.za> Message-ID: <1502992629.83.0.20853280419.issue31226@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- components: -IO stage: -> test needed type: -> behavior versions: +Python 3.7 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 14:02:16 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 17 Aug 2017 18:02:16 +0000 Subject: [issue31229] wrong error messages when too many kwargs are received Message-ID: <1502992936.21.0.653436354644.issue31229@psf.upfronthosting.co.za> New submission from Oren Milman: Some functions produce wrong error messages in case they receive too many keyword arguments: - in Objects/exceptions.c - ImportError_init: >>> ImportError(1, 2, 3, 4, a=5, b=6, c=7) TypeError: ImportError() takes at most 2 arguments (3 given) - in Python/bltinmodule.c - min_max: >>> min(1, 2, 3, 4, a=5, b=6, c=7) TypeError: function takes at most 2 arguments (3 given) >>> max(1, 2, 3, 4, a=5, b=6, c=7) TypeError: function takes at most 2 arguments (3 given) - in Modules/itertoolsmodule.c - product_new: >>> itertools.product(0, a=1, b=2, c=3, d=4, e=5, f=6) TypeError: product() takes at most 1 argument (6 given) - in Python/bltinmodule.c - builtin_print: >>> print(0, a=1, b=2, c=3, d=4, e=5, f=6) TypeError: print() takes at most 4 arguments (6 given) ISTM that changing these error messages to refer to 'keyword arguments' instead of 'arguments' is a possible solution. (e.g. the last one would become 'print() takes at most 4 keyword arguments (6 given)' To do that, I changed two 'takes at most' PyErr_Format calls in Python/getargs.c. I ran the test suite, and it seems that this patch doesn't break anything. The diff file is attached. (I didn't open a PR before hearing your opinion, as ISTM that changing code in getargs.c is a delicate thing.) what do you think? ---------- components: Interpreter Core messages: 300451 nosy: Oren Milman priority: normal severity: normal status: open title: wrong error messages when too many kwargs are received type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 14:04:11 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 17 Aug 2017 18:04:11 +0000 Subject: [issue31229] wrong error messages when too many kwargs are received In-Reply-To: <1502992936.21.0.653436354644.issue31229@psf.upfronthosting.co.za> Message-ID: <1502993051.32.0.00871822428244.issue31229@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- keywords: +patch Added file: http://bugs.python.org/file47091/issue31229_ver1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 14:06:14 2017 From: report at bugs.python.org (Matthias Bussonnier) Date: Thu, 17 Aug 2017 18:06:14 +0000 Subject: [issue29593] Improve UnboundLocalError message for deleted names In-Reply-To: <1487351217.08.0.939746599909.issue29593@psf.upfronthosting.co.za> Message-ID: <1502993174.81.0.532826493393.issue29593@psf.upfronthosting.co.za> Matthias Bussonnier added the comment: Thanks you all for your input, it seem like to much of electronic ink and time has been spend on this issue. For the sake of everyone and avoiding more to be spent, I'm going to close it. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 14:23:47 2017 From: report at bugs.python.org (Igor) Date: Thu, 17 Aug 2017 18:23:47 +0000 Subject: [issue16865] ctypes arrays >=2GB in length causes exception In-Reply-To: <1357334898.38.0.395259266999.issue16865@psf.upfronthosting.co.za> Message-ID: <1502994227.33.0.972168298014.issue16865@psf.upfronthosting.co.za> Changes by Igor : ---------- nosy: +i3v _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 14:27:23 2017 From: report at bugs.python.org (Igor) Date: Thu, 17 Aug 2017 18:27:23 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1502994443.24.0.923724794028.issue29843@psf.upfronthosting.co.za> Igor added the comment: Oren, won't the "too large _length_" case vanish, if https://github.com/python/cpython/pull/3006 would be accepted ? ( http://bugs.python.org/issue16865 ) ---------- nosy: +i3v _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 14:30:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 17 Aug 2017 18:30:22 +0000 Subject: [issue31229] wrong error messages when too many kwargs are received In-Reply-To: <1502992936.21.0.653436354644.issue31229@psf.upfronthosting.co.za> Message-ID: <1502994622.99.0.676560178017.issue31229@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In all of these cases PyArg_ParseTupleAndKeywords() is used in uncommon way. These functions accept variable number of positional-only arguments, and PyArg_ParseTupleAndKeywords() is called with empty args tuple for parsing keyword arguments only. The patch uses a trick for detecting this case and generating more appropriate error message. Correct error message is generated in a normal case too. LGTM. But it may be worth to add a short comment about the necessary of this special case. And please add tests for error messages in all of these functions. test_call looks appropriate place for them. ---------- nosy: +haypo, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 14:52:46 2017 From: report at bugs.python.org (Eryk Sun) Date: Thu, 17 Aug 2017 18:52:46 +0000 Subject: [issue31228] Subprocess.Popen crash w/ Win10, debug32, bad file, and PIPE In-Reply-To: <1502990905.97.0.599281951083.issue31228@psf.upfronthosting.co.za> Message-ID: <1502995966.0.0.694303497937.issue31228@psf.upfronthosting.co.za> Changes by Eryk Sun : ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: -> Windows: subprocess debug assertion on failure to execute the process _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 15:18:01 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 17 Aug 2017 19:18:01 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab In-Reply-To: <1501563588.57.0.756606299047.issue31001@psf.upfronthosting.co.za> Message-ID: <1502997481.26.0.71567351413.issue31001@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3161 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 16:01:27 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Aug 2017 20:01:27 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503000087.84.0.923037727756.issue14976@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Using any kind of potentially-blocking synchronization primitive from __del__ or weakref callback is indeed a bug waiting for happen. I agree non-trivial cases can be hard to debug, especially when people don't expect that kind of cause. It would be ok to submit a patch solving this issue using C code IMHO. Note the maxsize argument complicates things even though most uses of Queue don't use maxsize. Of course, the general issue isn't only about Queue: other synchronization primitives are widely used. See https://github.com/tornadoweb/tornado/pull/1876 for an example. ---------- nosy: +pitrou resolution: wont fix -> stage: -> needs patch type: crash -> behavior versions: +Python 3.7 -Python 2.7, Python 3.3, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 16:13:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 20:13:15 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503000795.82.0.697913588673.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset f6ebd838f00b4c211c72d85ee49749e910cd3afe by Victor Stinner in branch 'master': bpo-30871: pythoninfo: add expat and _decimal (#3121) https://github.com/python/cpython/commit/f6ebd838f00b4c211c72d85ee49749e910cd3afe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 16:50:21 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 17 Aug 2017 20:50:21 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1503003021.64.0.447308788387.issue30983@psf.upfronthosting.co.za> ?ukasz Langa added the comment: In this case it would be great if the buildbots commented on the relevant pull request that it broke the build. Otherwise this creates this dissonance that it was all green during merging of the PR when in fact it wasn't. I think we need to make test_gdb run on Travis, this is an unfortunate omission. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 17:18:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 Aug 2017 21:18:32 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1503004712.94.0.668871930393.issue30121@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I determined in #31228 (also on Windows, closed as a duplicate) that a debug build, bad file, and subprocess.PIPE are all required. Has this been tried on non-Windows? I confirmed the crash on 3.6. I do not have a 2.7 repository build. The two lines above constitute a unittest that currently fails on a Windows debug build. Even if there is no such buildbot, I think a test should be added that will fail on developer machines with such builds. It should be skipped on non-debug and perhaps non-Windows machines. ---------- nosy: +terry.reedy stage: -> patch review type: behavior -> crash versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 17:56:57 2017 From: report at bugs.python.org (Christian Heimes) Date: Thu, 17 Aug 2017 21:56:57 +0000 Subject: [issue31225] allow hashlib `update' to accept str In-Reply-To: <1502967575.03.0.97521659396.issue31225@psf.upfronthosting.co.za> Message-ID: <1503007017.09.0.558174200654.issue31225@psf.upfronthosting.co.za> Christian Heimes added the comment: Yes, what Antoine and Serhiy said. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 18:13:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 22:13:12 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1503007992.51.0.197093400563.issue30121@psf.upfronthosting.co.za> STINNER Victor added the comment: See https://github.com/python/cpython/pull/1224 and http://bugs.python.org/issue30121 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 18:21:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Aug 2017 22:21:31 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1503003021.64.0.447308788387.issue30983@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: While our CI is getting better everyday, it still has a few flaws. There is no automated buildbot failure notification to the author and committer yet because random failures were very common 6 months ago. I fixed something like 90% of the most common race conditions (in tests but also in the code), and now the remaining 10% are the least funny ones :-) My latest report: https://haypo.github.io/python-buildbots-2017q2.html In the meanwhile I check manually buildbots output and report bugs and regressions. For gdb, don't worry, the buildbots were fixed quickly, it's fine if the pre-commit CI missed the issue since gdb changes are rare. I am confident that we can design a fix without introducing regressions ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 19:54:14 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 17 Aug 2017 23:54:14 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1503014054.69.0.0637291453375.issue30983@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I am unable to repro this locally. With the changes to libpython.py test_gdb still passes on CentOS 7 and macOS 10.12. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 19:56:47 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 17 Aug 2017 23:56:47 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab In-Reply-To: <1501563588.57.0.756606299047.issue31001@psf.upfronthosting.co.za> Message-ID: <1503014207.85.0.934840671082.issue31001@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Coverage now 95%. We are getting close. Still not covered in highlight group: create_page_highlight: # Highlight only. text.bind('', lambda e: 'break') text.bind('', lambda e: 'break') Callbacks are never called. I presume that these mask something. I am not sure that they are needed. save_new: # Same as for keys. if not idleConf.userCfg['highlight'].has_section(theme_name): Never false. delete_custom: # Same as for keys. if not item_list: self.custom_theme_on['state'] = DISABLED self.customlist.SetMenu(item_list, '- no custom themes -') else: self.customlist.SetMenu(item_list, item_list[0]) Condition never false, else never executed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 20:39:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Aug 2017 00:39:03 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab In-Reply-To: <1501563588.57.0.756606299047.issue31001@psf.upfronthosting.co.za> Message-ID: <1503016743.65.0.105186443714.issue31001@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 82aff62462e65077a6614b466c986f93a601c33d by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-31001: IDLE: Add tests for configdialog highlight tab (#3123) https://github.com/python/cpython/commit/82aff62462e65077a6614b466c986f93a601c33d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 20:40:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Aug 2017 00:40:53 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab In-Reply-To: <1501563588.57.0.756606299047.issue31001@psf.upfronthosting.co.za> Message-ID: <1503016853.75.0.72454116292.issue31001@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3162 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 20:43:46 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Aug 2017 00:43:46 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503017026.35.0.631930217039.issue31206@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Delete frame.highlight_sample when frame becomes self. text = self.highlight_sample = frame.highlight_sample = Text( Change coverage to 95% when edit test file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 21:02:23 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Aug 2017 01:02:23 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab In-Reply-To: <1501563588.57.0.756606299047.issue31001@psf.upfronthosting.co.za> Message-ID: <1503018143.49.0.582213185704.issue31001@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 6db2edbe050cc9ac9026f350a24f2d525bcadecd by Terry Jan Reedy in branch '3.6': [3.6] bpo-31001: IDLE: Add tests for configdialog highlight tab (GH-3123) (#3124) https://github.com/python/cpython/commit/6db2edbe050cc9ac9026f350a24f2d525bcadecd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 21:03:13 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Aug 2017 01:03:13 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab In-Reply-To: <1501563588.57.0.756606299047.issue31001@psf.upfronthosting.co.za> Message-ID: <1503018193.32.0.263460442092.issue31001@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 Thu Aug 17 21:03:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Aug 2017 01:03:29 +0000 Subject: [issue31001] IDLE: Add tests for configdialog highlight tab In-Reply-To: <1501563588.57.0.756606299047.issue31001@psf.upfronthosting.co.za> Message-ID: <1503018209.32.0.402265658879.issue31001@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Another big thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 22:25:30 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 02:25:30 +0000 Subject: [issue31230] Add __code__ attributes to generator and coroutine objects Message-ID: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> New submission from Nick Coghlan: As covered in issue 31183, correctly disassembling functions, generator-iterators, coroutines, and async generator-iterators currently requires checking for 4 different attributes: * __code__ (functions) * gi_code (generator iterators) * cr_code (coroutines) * ag_code (async generator iterators) This could be simplified if the latter three all *also* exposed their code attributes as `__code__`. ---------- messages: 300468 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Add __code__ attributes to generator and coroutine objects type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 22:26:15 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 02:26:15 +0000 Subject: [issue31197] Namespace disassembly omits some compiled objects In-Reply-To: <1502692785.51.0.58821810388.issue31197@psf.upfronthosting.co.za> Message-ID: <1503023175.65.0.193133038202.issue31197@psf.upfronthosting.co.za> Nick Coghlan added the comment: For ease of reference, I separated out the idea of a common __code__ attribute to its own RFE: https://bugs.python.org/issue31230 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 22:29:23 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 02:29:23 +0000 Subject: [issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects In-Reply-To: <1502464891.48.0.226484247582.issue31183@psf.upfronthosting.co.za> Message-ID: <1503023363.26.0.22603474691.issue31183@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset fe2b56ab9212c1cf19c48b848fa60f7f201c366f by Nick Coghlan (syncosmic) in branch 'master': bpo-31183: `dis` now handles coroutines & async generators (GH-3077) https://github.com/python/cpython/commit/fe2b56ab9212c1cf19c48b848fa60f7f201c366f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 22:37:54 2017 From: report at bugs.python.org (syncosmic) Date: Fri, 18 Aug 2017 02:37:54 +0000 Subject: [issue31230] Add __code__ attributes to generator and coroutine objects In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503023874.39.0.219544094386.issue31230@psf.upfronthosting.co.za> Changes by syncosmic : ---------- pull_requests: +3163 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 22:41:01 2017 From: report at bugs.python.org (syncosmic) Date: Fri, 18 Aug 2017 02:41:01 +0000 Subject: [issue31230] Add __code__ attributes to generator and coroutine objects In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503024061.81.0.132700253843.issue31230@psf.upfronthosting.co.za> Changes by syncosmic : ---------- nosy: +syncosmic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 22:41:20 2017 From: report at bugs.python.org (syncosmic) Date: Fri, 18 Aug 2017 02:41:20 +0000 Subject: [issue31230] Add __code__ attributes to generator and coroutine objects In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503024080.88.0.402371853527.issue31230@psf.upfronthosting.co.za> Changes by syncosmic : ---------- pull_requests: -3163 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 22:52:32 2017 From: report at bugs.python.org (syncosmic) Date: Fri, 18 Aug 2017 02:52:32 +0000 Subject: [issue31230] Add __code__ attributes to generator and coroutine objects In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503024752.45.0.233655753029.issue31230@psf.upfronthosting.co.za> syncosmic added the comment: Some possibly helpful background (adapted from a discussion in PR 3077): It looks as though `gi_code` was added to generators in bpo-1473257. At this time, function bytecode was still stored in `f.func_code`, so `gi_code` was a clear analogy. My best guess is that `gi_code` was not chosen to deliberately create a namespace difference between functions and generators, but just because it wouldn't have made sense to add a `func_code` attribute to generators. In other words, if functions had had `code_object` instead of `func_code` at the time, bpo-1473257 might well have proposed `code_object` for generators. This doesn't, of course, mean that there might not be some post hoc reason to distinguish this part of the namespace now. Then `func_code` was changed in 3.0 to `__code__` as part of the `f.func_X` to `f.__X__` renaming. The 3.0 whatsnew explained that the purpose of this change was to "free up [the f.func_X] names in the function attribute namespace for user-defined attributes". But this wasn't done for the analogous code object in generators. On a quick look, I didn't find any discussion of this at the time, but that doesn't mean there wasn't any. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 23:00:41 2017 From: report at bugs.python.org (syncosmic) Date: Fri, 18 Aug 2017 03:00:41 +0000 Subject: [issue31230] Add __code__ attributes to generator and coroutine objects In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503025241.89.0.899530238595.issue31230@psf.upfronthosting.co.za> syncosmic added the comment: A related issue (since this issue is contemplating restructuring these objects anyway): Other than `??_code`, none of the `f.func_X` attributes which were eliminated in 3.0 have direct equivalents in generator-iterators, coroutines, or async generator-iterators. However, all three of those have `[gi|cr|ag]_running` and `[gi|cr|ag]_frame` attributes. Generator-iterators also have `gi_yieldfrom`, and coroutines and async generator-iterators have `[cr|ag]_await`. On a clean slate (with no attention paid to issues around breaking changes or how these attributes are already used in existing code), is there an argument for dundering some or all of these along with `__code__`? Or is special casing a better pattern when dealing with these other attributes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 17 23:52:15 2017 From: report at bugs.python.org (drallensmith) Date: Fri, 18 Aug 2017 03:52:15 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1503028335.51.0.73236821907.issue5001@psf.upfronthosting.co.za> drallensmith added the comment: No discussion yet on pull request (5 days); just submitted fixes for util.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 02:38:47 2017 From: report at bugs.python.org (Han Lee) Date: Fri, 18 Aug 2017 06:38:47 +0000 Subject: [issue31231] Travis CI mac test broken: Message-ID: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> New submission from Han Lee: CPython: master branch In mac and window create python.exe not python https://github.com/python/cpython/blob/master/Makefile.pre.in#L154 But Travis CI and docs use ./python command for test https://docs.python.org/devguide/ https://travis-ci.org/python/cpython/jobs/265843638 /Users/travis/.travis/job_stages: line 73: ./python: is a directory ---------- messages: 300474 nosy: sn0wle0pard priority: normal severity: normal status: open title: Travis CI mac test broken: _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 02:39:30 2017 From: report at bugs.python.org (Han Lee) Date: Fri, 18 Aug 2017 06:39:30 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503038370.6.0.0149909822995.issue31231@psf.upfronthosting.co.za> Changes by Han Lee : ---------- title: Travis CI mac test broken: -> Travis CI mac test broken: ./python: is a directory _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 02:57:53 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 06:57:53 +0000 Subject: [issue31230] Add __code__ attributes to generator and coroutine objects In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503039473.22.0.246560706315.issue31230@psf.upfronthosting.co.za> Nick Coghlan added the comment: I think there's a strong case for a generic __frame__ attribute, since there are plenty of useful things you can do given "object with a linked frame" as a protocol (like extract the current locals namespace). We may even want to include traceback objects in that particular attribute access consolidation (since they have a tb_frame attribute). Looking at the way inspect.getgeneratorstate() and inspect.getcoroutinestate() are implemented, I also think there may be a case for consolidating `[gi|cr|ag]_running` into a single `__running__` attribute, such that for objects that provide a `__frame__` attribute: * `__running__` doesn't exist -> not an asynchronous operation * `__running__ = True` -> running asynchronous operation * `__running__ = False` -> paused or halted asynchronous operation Then, rather than adding an inspect API specifically for async generators, we could add a general "inspect.getasyncstate()" one that covered all the object types, with the possible states: ASYNC_RUNNING: __running__ == True, assert __frame__ is not None ASYNC_CREATED: __running__ == False, __frame__.f_lasti == -1 ASYNC_CLOSED: __running__ == False, __frame__ is None ASYNC_SUSPENDED: __running__ == False, neither closed nor created Properly interpreting `gi_yieldfrom` and `[cr|ag]_await` is a bit trickier, since they require additional knowledge of how the control flow for those objects actually work. However, if we run with the "async operation introspection protocol" idea, then a suitably generic name would be `__async_call__`, and we could make it a doubly-linked list for the coroutine and async generator case by setting an `__async_return__` attribute on the target (to say where we expect control to return to when we're done). ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 03:00:42 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 07:00:42 +0000 Subject: [issue31230] Add __code__ attributes to generator and coroutine objects In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503039642.97.0.17650085139.issue31230@psf.upfronthosting.co.za> Nick Coghlan added the comment: Actually, __async_return__ would be applicable for the synchronous generator case as well, since it would link to the generator containing the `yield from` expression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 03:14:22 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 07:14:22 +0000 Subject: [issue31230] Define a general "asynchronous operation introspection" protocol In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503040462.53.0.591673813747.issue31230@psf.upfronthosting.co.za> Nick Coghlan added the comment: Slight amendment: `__delegated_to__` and `__returns_to__` might be better names for the doubly-linked list of the async call chain. "__async_call__" and "__async_return__" both have the problem that they look like imperative commands (since "call" and "return" are typically used as verbs), and collection referring to "yield from" and "await" as "asynchronous delegation" would help avoid potential confusion with regular synchronous function calls. I've also retitled the issue to cover the broader scope that also addresses the needs of the inspect module, not just the dis module. ---------- title: Add __code__ attributes to generator and coroutine objects -> Define a general "asynchronous operation introspection" protocol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 05:06:21 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Aug 2017 09:06:21 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503047181.18.0.414035140687.issue14976@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a pure Python PoC patch that allows unbounded Queue and LifoQueue to have reentrant put(). ---------- keywords: +patch nosy: +serhiy.storchaka Added file: http://bugs.python.org/file47092/q_reentrancy.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 05:31:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 09:31:57 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503048717.46.0.532320403941.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a3a01a2fceab2188b282ab9911f79c99a4c32273 by Victor Stinner in branch 'master': bpo-30871: Add "make pythoninfo" (#3120) https://github.com/python/cpython/commit/a3a01a2fceab2188b282ab9911f79c99a4c32273 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 05:45:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 09:45:56 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503049556.05.0.860943769325.issue30871@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3164 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 06:08:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 10:08:50 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503050930.0.0.268016697401.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ad7eaed54382b346784e51a6f0122ce81e8842b5 by Victor Stinner in branch 'master': bpo-30871: pythoninfo: more sys, os, time data (#3130) https://github.com/python/cpython/commit/ad7eaed54382b346784e51a6f0122ce81e8842b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 06:26:04 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 10:26:04 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503051964.8.0.507698011715.issue30871@psf.upfronthosting.co.za> Nick Coghlan added the comment: If we end up deciding some of this information might be useful to end users as well, it would be reasonable to extend "python -m sysconfig" to report it, perhaps with the extra imports gated behind a command line option. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 06:33:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 10:33:00 +0000 Subject: [issue30871] Add a "python info" command somewhere to dump versions of all dependencies In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503052380.64.0.81161643856.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: Nick Coghlan: "If we end up deciding some of this information might be useful to end users as well, it would be reasonable to extend "python -m sysconfig" to report it, perhaps with the extra imports gated behind a command line option." Designing such tool is a can of worm. Everybody can have different expectation, different information. IMHO PyPI is a better home for a more general tool. I prefer to keep test.pythoninfo specialized to debug failures on CIs (Travis CI, AppVeyor, buildbots). For test.pythoninfo, I'm mostly interested to get plaintext output right now, and JSON output later, to correlate information. For example, be able to say which readline versions are tested on all buildbots for one Python branch. Moreover, I would like to add test.pythoninfo to Python 2.7 and 3.6. It wouldn't be doable if the tool would be in the stdlib, since these branches don't accept new features ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 06:35:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 10:35:14 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503052514.36.0.133998172563.issue30923@psf.upfronthosting.co.za> STINNER Victor added the comment: The following commit broke _decimal compilation on the "x86 Tiger 3.x" buildbot: commit 72b543308ee3087e3fa247981f5cb4be1138c515 Author: Stefan Krah Date: Thu Jul 13 20:54:20 2017 +0200 bpo-30923: Suppress fall-through warnings in libmpdec. (#2698) http://buildbot.python.org/all/builders/x86%20Tiger%203.x/builds/1068/steps/compile/logs/stdio building '_decimal' extension gcc -fno-strict-aliasing -Wsign-compare -g -O0 -Wall -Wstrict-prototypes -std=c99 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUNIVERSAL=1 -I/Users/db3l/buildarea/3.x.bolen-tiger/build/Modules/_decimal/libmpdec -I./Include -I. -I/usr/local/include -I/Users/db3l/buildarea/3.x.bolen-tiger/build/Include -I/Users/db3l/buildarea/3.x.bolen-tiger/build -c /Users/db3l/buildarea/3.x.bolen-tiger/build/Modules/_decimal/_decimal.c -o build/temp.macosx-10.4-i386-3.7-pydebug/Users/db3l/buildarea/3.x.bolen-tiger/build/Modules/_decimal/_decimal.o -Wno-implicit-fallthrough cc1: error: unrecognized command line option "-Wno-implicit-fallthrough" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 06:37:39 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Aug 2017 10:37:39 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1503052659.57.0.719989669719.issue30721@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 5e2eb35bbed3e84079165e576cdb50ef36e13493 by Serhiy Storchaka (Sanyam Khurana) in branch 'master': bpo-30721: Show correct syntax hint in Py3 when using Py2 redirection syntax (#2345) https://github.com/python/cpython/commit/5e2eb35bbed3e84079165e576cdb50ef36e13493 ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 07:00:15 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 11:00:15 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1503054015.22.0.243867649868.issue30721@psf.upfronthosting.co.za> Nick Coghlan added the comment: Checking the merged implementation locally, I belatedly noticed that we forgot the trailing question mark on the question: ``` >>> import sys >>> print >> sys.stderr Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'. Did you mean "print(, file=)" ``` So putting this back to "needs patch" (no NEWS entry needed, just the missing question marks in the patch and the tests). ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 07:07:17 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 11:07:17 +0000 Subject: [issue31232] Backport the new custom "print >> sys.stderr" error message? Message-ID: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za> New submission from Nick Coghlan: https://bugs.python.org/issue30721 introduces a new custom error message, such that in 3.7+ "print >> sys.stderr" will report: ``` >>> import sys >>> print >> sys.stderr Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and '_io.TextIOWrapper'. Did you mean "print(, file=)"? ``` This is quite clearly an enhancement to the error reporting rather than a bug fix, but similar to the syntax errors for print statements without parentheses, it's an enhancement that only touches an error handling code path (specifically, the one where >> is already in the process of raising TypeError after operand coercion failed), and relates to an issue that a lot of ad hoc Python scripts are likely to encounter. As such, before I propose it as a downstream patch for Fedora's Python 3.6 stack, I figured I'd propose it as an upstream maintenance backport first. ---------- messages: 300486 nosy: encukou, ncoghlan, ned.deily priority: normal severity: normal status: open title: Backport the new custom "print >> sys.stderr" error message? type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 07:08:25 2017 From: report at bugs.python.org (Sanyam Khurana) Date: Fri, 18 Aug 2017 11:08:25 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1503054505.94.0.997262844982.issue30721@psf.upfronthosting.co.za> Sanyam Khurana added the comment: Ah, sorry for that. I'll just fix that right away in a few mins :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 07:08:35 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 11:08:35 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1503054515.07.0.460037906915.issue30721@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that I filed a separate issue to ask Ned about potentially backporting this to 3.6: https://bugs.python.org/issue31232 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 07:08:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Aug 2017 11:08:52 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503054532.29.0.817541670658.issue14976@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Are all changes are necessary for this issue or some of them are just an optimization? The patch changes the semantic of public attribute unfinished_tasks. Seems that old unfinished_tasks is new unfinished_tasks + _qsize(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 07:24:13 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Aug 2017 11:24:13 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503055453.7.0.657614870272.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: Thanks. I tried to revert it, but got: remote: Resolving deltas: 100% (2/2), completed with 2 local objects. remote: error: GH006: Protected branch update failed for refs/heads/master. remote: error: 2 of 2 required status checks are expected. To https://github.com/python/cpython.git ! [remote rejected] master -> master (protected branch hook declined) error: failed to push some refs to 'https://github.com/python/cpython.git' So I'm supposed to spend 20 min creating an irrelevant PR to revert a 3 line diff?! I would never have finished _decimal under these conditions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 07:35:34 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Aug 2017 11:35:34 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503056134.07.0.115501783894.issue14976@psf.upfronthosting.co.za> Antoine Pitrou added the comment: `unfinished_tasks` is not a public attribute AFAIK (it's not documented). The change is necessary: you cannot increment unfinished_tasks in reentrant put(), since incrementing in pure Python is not atomic. So the incrementation is moved to get(), which probably cannot be made reentrant at all. If keeping the visible semantics of the `unfinished_tasks` attribute is important, we could make it a property that computes the desired value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 07:38:08 2017 From: report at bugs.python.org (Sanyam Khurana) Date: Fri, 18 Aug 2017 11:38:08 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1503056288.13.0.854138387593.issue30721@psf.upfronthosting.co.za> Changes by Sanyam Khurana : ---------- pull_requests: +3165 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 07:49:41 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Aug 2017 11:49:41 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503056981.86.0.0770649259975.issue30923@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- pull_requests: +3166 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 08:18:17 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 12:18:17 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1503058697.01.0.458505624121.issue30721@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset a7c449b8c08933deabcf329fb74ed1336f6db34f by Nick Coghlan (Sanyam Khurana) in branch 'master': bpo-30721: Add missing '?' to new error message (GH-3131) https://github.com/python/cpython/commit/a7c449b8c08933deabcf329fb74ed1336f6db34f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 08:19:05 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 18 Aug 2017 12:19:05 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1503058745.94.0.94010461413.issue30721@psf.upfronthosting.co.za> Nick Coghlan added the comment: And done - thanks folks! ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 08:59:43 2017 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 18 Aug 2017 12:59:43 +0000 Subject: [issue31232] Backport the new custom "print >> sys.stderr" error message? In-Reply-To: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za> Message-ID: <1503061183.88.0.318677360983.issue31232@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'm in favor of backporting to 3.6. It's not an intrusive change and is helpful in porting 2.x scripts. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 09:18:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 13:18:17 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1503062297.87.0.933725875316.issue30121@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4d3851727fb82195e4995c6064b0b2d6cbc031c4 by Victor Stinner (Segev Finer) in branch 'master': bpo-30121: Fix debug assert in subprocess on Windows (#1224) https://github.com/python/cpython/commit/4d3851727fb82195e4995c6064b0b2d6cbc031c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 09:27:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 13:27:56 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1503062876.79.0.320608155384.issue30121@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3167 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 09:32:10 2017 From: report at bugs.python.org (Matt Rasband) Date: Fri, 18 Aug 2017 13:32:10 +0000 Subject: [issue28777] Add asyncio.Queue __aiter__, __anext__ methods In-Reply-To: <1479877132.48.0.693527153069.issue28777@psf.upfronthosting.co.za> Message-ID: <1503063130.33.0.603918136048.issue28777@psf.upfronthosting.co.za> Matt Rasband added the comment: I attempted this myself, it seemed to have too many costs associated for the stdlib and is something easy enough to wrap myself when I need this functionality with explicit semantics on how to "stop" the queue (using an `object()` sentinel). My implementation is flawed as the sentinel is global, instead of per queue instance, if you decide to use this at all. See https://github.com/python/asyncio/pull/445 ---------- nosy: +Matt Rasband _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 09:40:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 13:40:31 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503063631.75.0.654296253819.issue30871@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Add a "python info" command somewhere to dump versions of all dependencies -> Add test.pythoninfo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 09:42:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 13:42:12 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503063732.3.0.361484712999.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: I applied Segev Finer's fix for bpo-30121 (commit 4d3851727fb82195e4995c6064b0b2d6cbc031c4 ), so test.pythoninfo now works properly on Windows. I added a new pythoninfo step to Unix and Windows buildbots. It seems like everything is fine. I will wait a few days before starting to backport to 3.6, and then 2.7, just in case ;-) Backporting pythoninfo will likely have to wait until bpo-30121 is fixed in Python 3.6 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 10:21:26 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 18 Aug 2017 14:21:26 +0000 Subject: [issue31232] Backport the new custom "print >> sys.stderr" error message? In-Reply-To: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za> Message-ID: <1503066086.69.0.403081146962.issue31232@psf.upfronthosting.co.za> Ned Deily added the comment: I am OK with adding it to 3.6.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 10:25:19 2017 From: report at bugs.python.org (mike bayer) Date: Fri, 18 Aug 2017 14:25:19 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503066319.13.0.448634906245.issue14976@psf.upfronthosting.co.za> mike bayer added the comment: > Here is a pure Python PoC patch that allows unbounded Queue and LifoQueue to have reentrant put(). per http://bugs.python.org/msg275377 guido does not want an RLock here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 10:37:20 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 Aug 2017 14:37:20 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503067040.26.0.355851197621.issue31231@psf.upfronthosting.co.za> R. David Murray added the comment: The docs you point to are correct (they mention python.exe). The Travis log also shows it using python.exe. So the error message about the directory must be about some other operation than just running the python command. ---------- components: +macOS nosy: +ned.deily, r.david.murray, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 10:43:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 14:43:15 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503067395.45.0.756334569409.issue31231@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3168 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 10:43:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 14:43:15 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503067395.56.0.460359495855.issue30871@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3169 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 10:44:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 14:44:04 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503067444.68.0.624430801711.issue31231@psf.upfronthosting.co.za> STINNER Victor added the comment: The error comes from "./python -m test.pythoninfo": see bpo-30871. Attached PR should fix this bug. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 10:47:04 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 Aug 2017 14:47:04 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503067624.64.0.167910977034.issue31231@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, this is probably the issue: https://github.com/python/cpython/pull/3134 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 10:47:52 2017 From: report at bugs.python.org (R. David Murray) Date: Fri, 18 Aug 2017 14:47:52 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503067672.46.0.32049329398.issue31231@psf.upfronthosting.co.za> R. David Murray added the comment: Heh. I saw the PR but didn't realize it was attached to this issue :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 10:59:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 14:59:53 +0000 Subject: [issue30830] test_logging leaks dangling threads on FreeBSD In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1503068393.54.0.861971633824.issue30830@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3170 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 11:24:53 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Aug 2017 15:24:53 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503069893.54.0.26683988712.issue14976@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'll believe it when Guido chimes in and actually says so himself. Otherwise, I am skeptical Guido cares a lot about whether the internal implementation of Queue uses a Lock, a RLock or whatever else. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 11:29:41 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Aug 2017 15:29:41 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503070181.06.0.519747580252.issue14976@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Guido, apparently you are opposed to the Queue implementation using a RLock instead of a Lock, according to Raymond in https://bugs.python.org/issue14976#msg275377. I find this a bit surprising, so could you confirm it yourself? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 11:30:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 15:30:55 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503070255.01.0.567233067693.issue31231@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 92b1f90143286385c0ff5be98d3721b90580a912 by Victor Stinner in branch 'master': bpo-31231: Fix pythoninfo in Travis config (#3134) https://github.com/python/cpython/commit/92b1f90143286385c0ff5be98d3721b90580a912 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 11:30:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 15:30:55 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503070255.14.0.466285990743.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 92b1f90143286385c0ff5be98d3721b90580a912 by Victor Stinner in branch 'master': bpo-31231: Fix pythoninfo in Travis config (#3134) https://github.com/python/cpython/commit/92b1f90143286385c0ff5be98d3721b90580a912 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 11:32:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 15:32:23 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503070343.73.0.521063576318.issue31231@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks Han Lee for the bug report, the issue should now be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 11:32:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 15:32:40 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503070360.96.0.666131956341.issue31231@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 11:34:10 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Aug 2017 15:34:10 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503070450.59.0.0285498615249.issue14976@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Also, to elaborate a bit, I don't think we should aim to make Queue fully reentrant, as that would be extremely involved. I think we can settle on the simpler goal of making put() reentrant for unbounded LIFO and FIFO queues, which is what most people care about (and which is incidentally what the posted patch claims to do). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 11:37:59 2017 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 18 Aug 2017 15:37:59 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503070679.28.0.114245624994.issue14976@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Here is a pure Python PoC patch that allows unbounded Queue and LifoQueue to have reentrant put(). Is it guaranteed that the GC will happen in the same thread that is holding the lock? IOW will RLock help with all GC/__del__ deadlocking scenarios? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 11:51:40 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Aug 2017 15:51:40 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1503070679.28.0.114245624994.issue14976@psf.upfronthosting.co.za> Message-ID: <56397a0d-fdff-d823-6ff4-7a9d4009c64e@free.fr> Antoine Pitrou added the comment: Le 18/08/2017 ? 17:37, Yury Selivanov a ?crit : > > Is it guaranteed that the GC will happen in the same thread that is holding the lock? By design, if it's called from a different thread, Queue will cope fine: __del__ implicitly calls RLock.acquire which, if the RLock is already taken, releases the GIL and waits until the RLock is released by the other thread. The contentious case is when a Queue method call is interrupted by some asychronous event (signal handler, GC callback) that calls another Queue method in the same thread. Note, in my patch, the RLock isn't even used for its recursive properties, but only because it allows to query if it's already taken by the current thread (using a private method that's already used by threading.Condition, and which could reasonably be made public IMHO). (on that topic, the pure Python implementation of RLock doesn't guarantee proper reentrancy against asynchronous events itself -- see https://bugs.python.org/issue13697 --, but fortunately we use a C implementation by default which is pretty much ok) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 11:56:13 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Aug 2017 15:56:13 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1503071773.62.0.432870659136.issue5001@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Please allow us a bit of time :-) We are all volunteers here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 12:16:17 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 18 Aug 2017 16:16:17 +0000 Subject: [issue18156] Add an 'attr' attribute to AttributeError In-Reply-To: <1370619110.26.0.980030189702.issue18156@psf.upfronthosting.co.za> Message-ID: <1503072977.44.0.198682018237.issue18156@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 12:22:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 16:22:34 +0000 Subject: [issue30830] test_logging leaks dangling threads on FreeBSD In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1503073354.47.0.880820086563.issue30830@psf.upfronthosting.co.za> STINNER Victor added the comment: The problem is that socketserver.ThreadingMixIn spawns threads without waiting for their completion in server_close(). For example, the following two tests use socketserver.ThreadingMixIn and so can leak a running thread: * test.test_logging.SocketHandlerTest.test_output() * test.test_logging.DatagramHandlerTest.test_output() Example: 10-STABLE-amd64% ./python -m test -v test_logging --fail-env-changed -F -m test.test_logging.DatagramHandlerTest.test_output -m test.test_logging.ConfigDictTest.test_listen_config_10_ok --match=test.test_logging.SocketHandlerTest.test_output (...) 0:00:09 load avg: 2.54 [ 7] test_logging test_output (test.test_logging.SocketHandlerTest) ... ok test_output (test.test_logging.DatagramHandlerTest) ... ok test_listen_config_10_ok (test.test_logging.ConfigDictTest) ... threading_setup (1, <_weakrefset.WeakSet object at 0x806243398>) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 12:24:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 16:24:59 +0000 Subject: [issue31233] socketserver.ThreadingMixIn leaks running threads after server_close() Message-ID: <1503073499.39.0.93886151367.issue31233@psf.upfronthosting.co.za> New submission from STINNER Victor: test_logging has a race condition: sometimes, it leaks dangling threads on FreeBSD: bpo-30830. I identified the root issue: socketserver.ThreadingMixIn spawns threads without waiting for their completion in server_close(). This issue is very similar to socketserver.ForkingMixIn which leaks child processes and so create zombie processes. See bpo-31151. ---------- components: Library (Lib) messages: 300514 nosy: haypo priority: normal severity: normal status: open title: socketserver.ThreadingMixIn leaks running threads after server_close() type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 12:37:21 2017 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 18 Aug 2017 16:37:21 +0000 Subject: [issue31211] distutils/util.py get_platform() does not identify linux-i686 platforms In-Reply-To: <1502814030.02.0.254840991446.issue31211@psf.upfronthosting.co.za> Message-ID: <1503074241.13.0.592905244947.issue31211@psf.upfronthosting.co.za> ?ric Araujo added the comment: > both wheel/pip makes calls to distutils.util.get_platform(). Fixing it in one location > would fix it across the board. True, but it may have unintended effects in other places that disrupt or break parts of the CPython build process, or downstream packaging toolchains. > using just distutils.core.setup() and doing a bdist (built-in command available in > distutils) is still generating a wrong tag in linux 32-bit arch. I would say that this is irrelevant, since these kinds of bdist are not well defined and not really used. > within distutils.util.get_platform() the code under sunos makes attempts to identify the > correct bitness: [...] > why would the linux logic not handle the same problem? That?s always the question with distutils, and the reason for us being over-cautious with these requests for changes. One needs to do VCS archaeology to understand if a specific line was a conscious decision, an assumption, an oversight or a mistake. My suggestion of bringing this to setuptools is because they have a much faster release cycle, and broad testing. They can change only the wheel compatibility tags and get feedback immediately, whereas changing distutils.util.get_plaform may break many things and we?ll only know in a couple years when the next release is packaged by distributions and third-party vendors. [removing Raymond from nosy and adding Jason the setuptools maintainer] ---------- nosy: +jason.coombs -rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 12:42:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 16:42:03 +0000 Subject: [issue30830] test_logging leaks dangling threads on FreeBSD In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1503074523.72.0.260817427533.issue30830@psf.upfronthosting.co.za> STINNER Victor added the comment: > Example: > > 10-STABLE-amd64% ./python -m test -v test_logging --fail-env-changed -F -m test.test_logging.DatagramHandlerTest.test_output -m test.test_logging.ConfigDictTest.test_listen_config_10_ok --match=test.test_logging.SocketHandlerTest.test_output Oh, I forgot to mention that I also run "./python -m test -j4" in a different terminal in parallel to make the bug more likely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 12:54:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 16:54:54 +0000 Subject: [issue30830] test_logging leaks dangling threads on FreeBSD In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1503075294.92.0.446133292513.issue30830@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3171 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 12:58:21 2017 From: report at bugs.python.org (syncosmic) Date: Fri, 18 Aug 2017 16:58:21 +0000 Subject: [issue31230] Define a general "asynchronous operation introspection" protocol In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503075501.35.0.560187361569.issue31230@psf.upfronthosting.co.za> syncosmic added the comment: I like where this is heading! Aside from the cleaner patterns for handling these objects, I think it'll make it a little easier for people who are just starting to use asynchronous objects in Python (e.g. me) to grasp what's similar about them. +1 that `__async_call__` could be confusing, for the general reason you mention, but in particular because it would look exactly analogous to `function.__call__()` (what the French call a "faux ami"). A not-thought-out alternative: what about noun-ing the verbs into `__async_calls__` and `__async_returns__` (or maybe `__async_returns_to__`)? BTW, I was thinking of taking a quick run at bpo-31197 while this simmers. I don't /think/ that risks being eventually mooted by these changes; if anything, it might be easier to adapt `dis` to this proposal if that refactoring has already been done. LMK if you think that's the wrong order, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 13:01:04 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 18 Aug 2017 17:01:04 +0000 Subject: [issue31233] socketserver.ThreadingMixIn leaks running threads after server_close() In-Reply-To: <1503073499.39.0.93886151367.issue31233@psf.upfronthosting.co.za> Message-ID: <1503075664.52.0.269486796291.issue31233@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The difference is that letting a thread run doesn't create a zombie thread, so I don't think the issue is really similar. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 13:12:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 17:12:58 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter Message-ID: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> New submission from STINNER Victor: Currently, support.threading_cleanup() waits 1 second before emitting a warning about threads running in the background. I propose to emit immediately the warning to be able to catch bugs quicker, bugs like bpo-31233 or bpo-30830. The problem is that currently, 12 test files still leak threads: --- 12 tests altered the execution environment: test_asyncio test_concurrent_futures test_fork1 test_httpservers test_logging test_pydoc test_ssl test_thread test_threaded_import test_threading test_wait3 test_xmlrpc --- Since threading_cleanup() warnings now mark tests as failed, we should first fix these tests before being able to make support.threading_cleanup() stricter. ---------- components: Tests messages: 300519 nosy: haypo priority: normal severity: normal status: open title: Make support.threading_cleanup() stricter versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 13:15:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 17:15:25 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503076525.24.0.738753153099.issue31234@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3172 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 13:17:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 17:17:57 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503076677.52.0.0785897380302.issue31234@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3173 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 13:19:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 17:19:13 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503076753.45.0.753086459197.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: test_fork1, test_wait3: https://github.com/python/cpython/pull/3139 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 13:27:53 2017 From: report at bugs.python.org (Segev Finer) Date: Fri, 18 Aug 2017 17:27:53 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1503077273.54.0.282142464789.issue9566@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +3174 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 13:27:53 2017 From: report at bugs.python.org (Segev Finer) Date: Fri, 18 Aug 2017 17:27:53 +0000 Subject: [issue30747] _Py_atomic_* not actually atomic on Windows with MSVC In-Reply-To: <1498332959.93.0.572211672441.issue30747@psf.upfronthosting.co.za> Message-ID: <1503077273.74.0.742645605829.issue30747@psf.upfronthosting.co.za> Changes by Segev Finer : ---------- pull_requests: +3175 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 13:28:56 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 18 Aug 2017 17:28:56 +0000 Subject: [issue31232] Backport the new custom "print >> sys.stderr" error message? In-Reply-To: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za> Message-ID: <1503077336.09.0.407255899735.issue31232@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: It's probably fine, since it should be a rare occurrence, but it of course has the potential to break things like tests (doc and otherwise). Unlikely, but it should be pointed out. Still, I'm also fine with backporting it. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 13:29:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 17:29:29 +0000 Subject: [issue30830] test_logging leaks dangling threads on FreeBSD In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1503077369.77.0.588662941898.issue30830@psf.upfronthosting.co.za> STINNER Victor added the comment: I opened bpo-31233: socketserver.ThreadingMixIn leaks running threads after server_close(). ---------- dependencies: +socketserver.ThreadingMixIn leaks running threads after server_close() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 14:20:33 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 18 Aug 2017 18:20:33 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503080433.3.0.0935470299318.issue31206@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3176 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 14:34:30 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 18 Aug 2017 18:34:30 +0000 Subject: [issue31232] Backport the new custom "print >> sys.stderr" error message? In-Reply-To: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za> Message-ID: <1503081270.36.0.193930784732.issue31232@psf.upfronthosting.co.za> Raymond Hettinger added the comment: But this backport would break my code: >>> print = 10 >>> print >> 1 5 Just kidding ;-) +1 for the backport. It will likely save some headaches. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 14:41:16 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 18 Aug 2017 18:41:16 +0000 Subject: [issue31109] zipimport argument clinic conversion In-Reply-To: <1501700724.15.0.635937814263.issue31109@psf.upfronthosting.co.za> Message-ID: <1503081676.46.0.581233699941.issue31109@psf.upfronthosting.co.za> Brett Cannon added the comment: New changeset 02f3b7d5ab2206d256879e5a8a34f560218ed397 by Brett Cannon (Yaron de Leeuw) in branch 'master': bpo-31109: Convert zipimport to use Argument Clinic (GH-2990) https://github.com/python/cpython/commit/02f3b7d5ab2206d256879e5a8a34f560218ed397 ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 14:43:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 18 Aug 2017 18:43:46 +0000 Subject: [issue31232] Backport the new custom "print >> sys.stderr" error message? In-Reply-To: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za> Message-ID: <1503081826.9.0.978298362209.issue31232@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It will not break this code. The only visible effect is changing error messages of some TypeError exceptions. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 14:44:44 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Aug 2017 18:44:44 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503081884.19.0.769659616005.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: So I installed gcc-7.2.0 from source. Hilariously compiling gcc *itself* emits fallthrough warnings! Then I tried to be a good open source drone and add 20 /* fall through */ comments to libmpdec. gcc is too stupid to recognize the /* fall through */ at the #endif position. Perhaps the author of this gcc warning wants to submit a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 15:24:52 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Aug 2017 19:24:52 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503084292.03.0.352332522015.issue30923@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- pull_requests: +3177 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 15:39:35 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 18 Aug 2017 19:39:35 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503085175.15.0.525623346852.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: New changeset d73a960c575207539c3f9765cff26d4fff400b45 by Stefan Krah in branch 'master': bpo-30923: Disable warning that has been part of -Wextra since gcc-7.0. (#3142) https://github.com/python/cpython/commit/d73a960c575207539c3f9765cff26d4fff400b45 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 15:58:40 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 18 Aug 2017 19:58:40 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1503086320.73.0.308001950558.issue30983@psf.upfronthosting.co.za> ?ukasz Langa added the comment: OK, I got the repro. You have to rebuild python for /Tools/gdb/libpython.py to land in /python-gdb.py. The latter is used during test_gdb.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 16:17:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 20:17:36 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1503086320.73.0.308001950558.issue30983@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > You have to rebuild python for /Tools/gdb/libpython.py to land in /python-gdb.py. The latter is used during test_gdb.py. Ah yes, sorry, that's not obvious. "make" does the copy for you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 16:27:30 2017 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Aug 2017 20:27:30 +0000 Subject: [issue28777] Add asyncio.Queue __aiter__, __anext__ methods In-Reply-To: <1479877132.48.0.693527153069.issue28777@psf.upfronthosting.co.za> Message-ID: <1503088050.54.0.315190024982.issue28777@psf.upfronthosting.co.za> Guido van Rossum added the comment: Let's not do this. ---------- resolution: -> rejected stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:12:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 21:12:31 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503090751.47.0.181177770069.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset c99d41f9c0304fcf06550515c3db55f93a629e9e by Victor Stinner in branch 'master': bpo-31234: fork_wait tests now join threads (#3139) https://github.com/python/cpython/commit/c99d41f9c0304fcf06550515c3db55f93a629e9e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:26:53 2017 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 18 Aug 2017 21:26:53 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503091613.09.0.382886788001.issue14976@psf.upfronthosting.co.za> Guido van Rossum added the comment: Given the date from that comment I assume that I told Raymond this during the 2016 core sprint. I can't recall that conversation but I am still pretty worried about using an RLock. (What if someone slightly more insane decides to call get() from inside a GC callback or signal handler?) However I do think we have to do something here. It's also helpful that all mutable state except for unfinished_tasks is just a deque or list, and the _get()/_put() operations for these are atomic. (I betcha heappop() is too when implemented in C, but not when implemented in Python.) I can't say I understand all of Antoine's patch, but it's probably okay to do it this way; however I would rather see if we can add _is_owned() to Lock, assuming it can be implemented using any of the threading/locking libraries we still support (I presume that's basically posix and Windows). IIUC the end result would be a Queue whose put() works from signal handlers, GC callbacks and __del__, as long as it's unbounded, right? And when it *is* bounded, it will give a decent message if the queue is full and the lock is already taken, right? Antoine, can you confirm? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:35:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 21:35:30 +0000 Subject: [issue31233] socketserver.ThreadingMixIn leaks running threads after server_close() In-Reply-To: <1503073499.39.0.93886151367.issue31233@psf.upfronthosting.co.za> Message-ID: <1503092130.13.0.863012426398.issue31233@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, test_socketserver just failed with ENV_CHANGED on AMD64 Windows7 SP1 3.x: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/865/steps/test/logs/stdio test_TCPServer (test.test_socketserver.SocketServerTest) ... creating server (...) waiting for server done Warning -- threading_cleanup() failed to cleanup -1 threads after 5 sec (count: 0, dangling: 1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:42:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 21:42:26 +0000 Subject: [issue31235] test_logging: ResourceWarning: unclosed Message-ID: <1503092546.47.0.171395017879.issue31235@psf.upfronthosting.co.za> New submission from STINNER Victor: Sometimes, running test_logging emits such warning: ResourceWarning: unclosed I'm not sure where it does come from. See also bpo-30830 (test_logging leaks dangling threads on FreeBSD). ---------- messages: 300534 nosy: haypo priority: normal severity: normal status: open title: test_logging: ResourceWarning: unclosed type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:43:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 21:43:56 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1503092636.62.0.775131058903.issue30947@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 93d0cb58b4da2a88c56f472c6c19491cc7a390df by Victor Stinner in branch 'master': bpo-30947: Update libexpat from 2.2.1 to 2.2.3 (#3106) https://github.com/python/cpython/commit/93d0cb58b4da2a88c56f472c6c19491cc7a390df ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:47:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 21:47:56 +0000 Subject: [issue31233] socketserver.ThreadingMixIn leaks running threads after server_close() In-Reply-To: <1503073499.39.0.93886151367.issue31233@psf.upfronthosting.co.za> Message-ID: <1503092876.58.0.865152007913.issue31233@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6966960468327c958b03391f71f24986bd697307 by Victor Stinner in branch 'master': bpo-30830: test_logging uses threading_setup/cleanup (#3137) https://github.com/python/cpython/commit/6966960468327c958b03391f71f24986bd697307 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:47:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 21:47:56 +0000 Subject: [issue30830] test_logging leaks dangling threads on FreeBSD In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1503092876.67.0.297809989213.issue30830@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 6966960468327c958b03391f71f24986bd697307 by Victor Stinner in branch 'master': bpo-30830: test_logging uses threading_setup/cleanup (#3137) https://github.com/python/cpython/commit/6966960468327c958b03391f71f24986bd697307 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:49:32 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 21:49:32 +0000 Subject: [issue30830] test_logging leaks dangling threads on FreeBSD In-Reply-To: <1499069345.75.0.633359739013.issue30830@psf.upfronthosting.co.za> Message-ID: <1503092972.77.0.519835046282.issue30830@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset 6966960468327c958b03391f71f24986bd697307 by Victor Stinner in branch 'master': > bpo-30830: test_logging uses threading_setup/cleanup (#3137) With this commit, test_logging should detect better bugs in the code. The commit also skips all tests using socketserver, until bpo-31233 is fixed, just to reduce the failure rate on the FreeBSD buildbots. This issue (bpo-30830) made FreeBSD 10 buildbot very unstable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:49:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 21:49:50 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1503092990.58.0.666787127069.issue30947@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3178 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:51:19 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 18 Aug 2017 21:51:19 +0000 Subject: [issue31236] improve some error messages of min() and max() Message-ID: <1503093079.31.0.160974520345.issue31236@psf.upfronthosting.co.za> New submission from Oren Milman: currently, we have the following: >>> min(0, a=1) TypeError: 'a' is an invalid keyword argument for this function >>> max(0, a=1) TypeError: 'a' is an invalid keyword argument for this function >>> max(0, a=1, b=2, c=3) TypeError: function takes at most 2 arguments (3 given) >>> min(0, a=1, b=2, c=3) TypeError: function takes at most 2 arguments (3 given) ISTM it would be preferable for min() and max() to have error messages similar to those of int(): >>> int(0, a=1) TypeError: 'a' is an invalid keyword argument for int() >>> int(0, a=1, b=2) TypeError: int() takes at most 2 arguments (3 given) we can achieve this by making a small change in Python/bltinmodule.c in min_max (I would open a PR soon), and by resolving #31229. ---------- components: IO messages: 300539 nosy: Oren Milman priority: normal severity: normal status: open title: improve some error messages of min() and max() type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:51:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 21:51:52 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1503093112.03.0.0926893082662.issue30947@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3179 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 17:55:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 21:55:42 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1503093342.98.0.20938633049.issue30947@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3180 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 18:04:19 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 18 Aug 2017 22:04:19 +0000 Subject: [issue31236] improve some error messages of min() and max() In-Reply-To: <1503093079.31.0.160974520345.issue31236@psf.upfronthosting.co.za> Message-ID: <1503093859.7.0.682127348395.issue31236@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3181 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 18:06:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 22:06:30 +0000 Subject: [issue31235] test_logging: ResourceWarning: unclosed In-Reply-To: <1503092546.47.0.171395017879.issue31235@psf.upfronthosting.co.za> Message-ID: <1503093990.84.0.706116318866.issue31235@psf.upfronthosting.co.za> STINNER Victor added the comment: Traceback from tracemalloc: 10-STABLE-amd64% ./python -X tracemalloc=10 -m test -v test_logging --fail-env-changed (...) /usr/home/haypo/cpython/Lib/test/support/__init__.py:1515: ResourceWarning: unclosed gc.collect() Object allocated at (most recent call first): File "/usr/home/haypo/cpython/Lib/socket.py", lineno 210 sock = socket(self.family, type, self.proto, fileno=fd) File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 348 conn, addr = self.socket.accept() File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 492 pair = self.accept() File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 417 self.handle_accept() File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 83 obj.handle_read_event() File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 150 read(obj) File "/usr/home/haypo/cpython/Lib/asyncore.py", lineno 203 poll_fun(timeout, map) File "/usr/home/haypo/cpython/Lib/test/test_logging.py", lineno 782 asyncore.loop(poll_interval, map=self._map) File "/usr/home/haypo/cpython/Lib/threading.py", lineno 865 self._target(*self._args, **self._kwargs) File "/usr/home/haypo/cpython/Lib/threading.py", lineno 917 self.run() So it seems like the socket was created in TestSMTPServer.serve_forever() of test_logging, which is used by SMTPHandlerTest.test_basic(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 18:07:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 22:07:50 +0000 Subject: [issue31235] test_logging: ResourceWarning: unclosed In-Reply-To: <1503092546.47.0.171395017879.issue31235@psf.upfronthosting.co.za> Message-ID: <1503094070.07.0.488730314599.issue31235@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3182 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 18:19:15 2017 From: report at bugs.python.org (drallensmith) Date: Fri, 18 Aug 2017 22:19:15 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1503094755.82.0.619125281892.issue5001@psf.upfronthosting.co.za> drallensmith added the comment: Sorry! I was starting to wonder if the PR had been overlooked somehow... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 18:34:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 22:34:02 +0000 Subject: [issue31235] test_logging: ResourceWarning: unclosed In-Reply-To: <1503092546.47.0.171395017879.issue31235@psf.upfronthosting.co.za> Message-ID: <1503095642.26.0.862114310824.issue31235@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset a7719e27b3cad0f2b86cb932a76cbe55c541b02e by Victor Stinner in branch 'master': bpo-31235: Fix ResourceWarning in test_logging (#3147) https://github.com/python/cpython/commit/a7719e27b3cad0f2b86cb932a76cbe55c541b02e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 18:34:57 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Aug 2017 22:34:57 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503095697.7.0.584178565605.issue31206@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset a32e40561a24de373d1c5a437a8aa329758ba8e4 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-31206: IDLE: Factor HighPage class from ConfigDialog (#3141) https://github.com/python/cpython/commit/a32e40561a24de373d1c5a437a8aa329758ba8e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 18:34:57 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Aug 2017 22:34:57 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1503095697.79.0.668663103425.issue31205@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset a32e40561a24de373d1c5a437a8aa329758ba8e4 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-31206: IDLE: Factor HighPage class from ConfigDialog (#3141) https://github.com/python/cpython/commit/a32e40561a24de373d1c5a437a8aa329758ba8e4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 18:49:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Aug 2017 22:49:15 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503096555.93.0.945325385574.issue31206@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I cannot do the backport at the moment, so at your convenience, please run cherry picker for PR3141 for 3.6. You can submit the 2nd PR for 3.7 without waiting for me to merge the backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 18:54:41 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 22:54:41 +0000 Subject: [issue31235] test_logging: ResourceWarning: unclosed In-Reply-To: <1503092546.47.0.171395017879.issue31235@psf.upfronthosting.co.za> Message-ID: <1503096881.96.0.512899118989.issue31235@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3183 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 18:57:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 22:57:48 +0000 Subject: [issue31235] test_logging: ResourceWarning: unclosed In-Reply-To: <1503092546.47.0.171395017879.issue31235@psf.upfronthosting.co.za> Message-ID: <1503097068.25.0.385738782453.issue31235@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 is not affected: it doesn't have SMTPHandlerTest. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:06:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:06:30 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1503097590.13.0.64357634147.issue30947@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 83e37e16f3065086d721d4e62a3788e01db3431c by Victor Stinner in branch '3.6': bpo-30947: Update libexpat from 2.2.1 to 2.2.3 (#3106) (#3143) https://github.com/python/cpython/commit/83e37e16f3065086d721d4e62a3788e01db3431c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:06:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:06:47 +0000 Subject: [issue30947] Update embeded copy of libexpat from 2.2.1 to 2.2.3 In-Reply-To: <1500301095.91.0.571865583049.issue30947@psf.upfronthosting.co.za> Message-ID: <1503097607.52.0.126690176306.issue30947@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset ec4ab09b7c0b5070bdb27351f979cbecc4636245 by Victor Stinner in branch '2.7': bpo-30947: Update libexpat from 2.2.1 to 2.2.3 (#3106) (#3145) https://github.com/python/cpython/commit/ec4ab09b7c0b5070bdb27351f979cbecc4636245 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:11:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:11:47 +0000 Subject: [issue31235] test_logging: ResourceWarning: unclosed In-Reply-To: <1503092546.47.0.171395017879.issue31235@psf.upfronthosting.co.za> Message-ID: <1503097907.0.0.207812542214.issue31235@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3e866dfaecaa4eb8f98c12782d2488f681225c37 by Victor Stinner in branch '3.6': bpo-31235: Fix ResourceWarning in test_logging (#3147) (#3149) https://github.com/python/cpython/commit/3e866dfaecaa4eb8f98c12782d2488f681225c37 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:11:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:11:56 +0000 Subject: [issue31235] test_logging: ResourceWarning: unclosed In-Reply-To: <1503092546.47.0.171395017879.issue31235@psf.upfronthosting.co.za> Message-ID: <1503097915.99.0.240649203727.issue31235@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:21:59 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:21:59 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6/3.x In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1503098519.99.0.0689834973824.issue30849@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6 -> test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6/3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:23:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:23:33 +0000 Subject: [issue30849] test_stress_delivery_dependent() of test_signal randomly fails on AMD64 Debian root 3.6/3.x In-Reply-To: <1499181411.1.0.541300647507.issue30849@psf.upfronthosting.co.za> Message-ID: <1503098613.48.0.230709297741.issue30849@psf.upfronthosting.co.za> STINNER Victor added the comment: test_stress_delivery_dependent() failed on AMD64 Debian root 3.x too, it's not specific to 3.6: http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/1192/steps/test/logs/stdio http://buildbot.python.org/all/builders/AMD64%20Debian%20root%203.x/builds/1191/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:25:10 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:25:10 +0000 Subject: [issue31151] socketserver.ForkingMixIn.server_close() leaks zombie processes In-Reply-To: <1502239239.94.0.0719119279673.issue31151@psf.upfronthosting.co.za> Message-ID: <1503098710.08.0.557469278427.issue31151@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_socketserver: Warning -- reap_children() reaped child process -> socketserver.ForkingMixIn.server_close() leaks zombie processes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:25:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:25:34 +0000 Subject: [issue30391] test_threading_handled() and test_threading_not_handled() of test_socketserver hangs randomly on AMD64 FreeBSD 10.x Shared 3.6 In-Reply-To: <1495048024.31.0.0717718671213.issue30391@psf.upfronthosting.co.za> Message-ID: <1503098734.48.0.278132488214.issue30391@psf.upfronthosting.co.za> STINNER Victor added the comment: I recently found two issues in socketserver: * bpo-31233: socketserver.ThreadingMixIn leaks running threads after server_close() * bpo-31151: socketserver.ForkingMixIn.server_close() leaks zombie processes Fixing these two issues is likely to help to fix this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:31:53 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 18 Aug 2017 23:31:53 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1503099113.66.0.660403856325.issue30983@psf.upfronthosting.co.za> ?ukasz Langa added the comment: The issue originally stems from the fact that a non-debug Python build with --enable-shared is inlining PyEval_EvalFrameEx into _PyEval_EvalFrameDefault. So, the patch should really become to *replace* discovering PyEval_EvalFrameEx with the discovery of _PyEval_EvalFrameDefault. This might be problematic in the future when there is an actual JIT but currently it's strictly better than the current situation where the gdb bindings simply don't work for shared builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:32:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:32:23 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503099143.41.0.130222667915.issue31234@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3184 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:32:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:32:40 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503099160.73.0.492707410264.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: test_threading: https://github.com/python/cpython/pull/3150 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:39:31 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 18 Aug 2017 23:39:31 +0000 Subject: [issue31237] test_gdb disables 25% of tests in optimized builds Message-ID: <1503099571.25.0.918465457775.issue31237@psf.upfronthosting.co.za> New submission from ?ukasz Langa: We are skipping a lot of tests when optimizations are enabled (which essentially means: compiled without `--with-pydebug`). This seems overly aggressive since most Python users are using the gdb bindings with a non-debug build. I think we should have tests for py-bt, py-up, printing globals, etc. that run on a non-debug build. ---------- components: Tests messages: 300554 nosy: benjamin.peterson, haypo, lukasz.langa, pitrou priority: normal severity: normal status: open title: test_gdb disables 25% of tests in optimized builds versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:47:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:47:12 +0000 Subject: [issue31237] test_gdb disables 25% of tests in optimized builds In-Reply-To: <1503099571.25.0.918465457775.issue31237@psf.upfronthosting.co.za> Message-ID: <1503100032.52.0.645928084583.issue31237@psf.upfronthosting.co.za> STINNER Victor added the comment: Sadly, python-gdb fails to get required data for some commands, so python-gdb doesn't work fully on optimized builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:50:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:50:45 +0000 Subject: [issue31238] pydoc: ServerThread.stop() leaves a dangling thread Message-ID: <1503100245.68.0.356327779955.issue31238@psf.upfronthosting.co.za> New submission from STINNER Victor: When using https://github.com/python/cpython/pull/3138 I see that test_pydoc leaves a dangling thread. The bug comes from test_server() which uses pydoc ServerThread. ServerThread.stop() and test_pydoc don't join the thread. Moreover, ServerThread.docserver has a reference cycle through the DocServer.callback attribute. Attached PR modifies ServerThread.stop() to join itself (the thread), to wait until the HTTP server completes, and then explicitly break the reference cycle. With the PR, pydoc may hang if a bad HTTP client. So another option is to only modify test_pydoc to join() + break the ref cycle. ---------- components: Library (Lib) messages: 300556 nosy: haypo priority: normal severity: normal status: open title: pydoc: ServerThread.stop() leaves a dangling thread type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:51:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:51:09 +0000 Subject: [issue31238] pydoc: ServerThread.stop() leaves a dangling thread In-Reply-To: <1503100245.68.0.356327779955.issue31238@psf.upfronthosting.co.za> Message-ID: <1503100269.5.0.126581469194.issue31238@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3185 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:52:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:52:39 +0000 Subject: [issue31238] pydoc: ServerThread.stop() leaves a dangling thread In-Reply-To: <1503100245.68.0.356327779955.issue31238@psf.upfronthosting.co.za> Message-ID: <1503100359.73.0.371988814329.issue31238@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is similar to bpo-31151: socketserver ForkingMixIn.server_close() leaks zombie processes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:53:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:53:09 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503100389.94.0.148601700479.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: test_pydoc: see bpo-31238. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:54:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:54:21 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503100461.45.0.658397467458.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: test_logging: see bpo-30830. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:54:44 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:54:44 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503100484.82.0.890343907507.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 3d284c081fc3042036adfe1bf2ce92c34d743b0b by Victor Stinner in branch 'master': bpo-31234: test_threading: fix ref cycle (#3150) https://github.com/python/cpython/commit/3d284c081fc3042036adfe1bf2ce92c34d743b0b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 19:55:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 18 Aug 2017 23:55:29 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503100529.15.0.955335991597.issue31234@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3186 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 20:11:39 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 19 Aug 2017 00:11:39 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1503101499.57.0.236561270717.issue30983@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- pull_requests: +3187 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 20:11:41 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 19 Aug 2017 00:11:41 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1503101501.73.0.771765215056.issue30983@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- pull_requests: +3187, 3188 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 20:32:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Sat, 19 Aug 2017 00:32:57 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503102777.22.0.778366155507.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset b50e7683acac36ff16e6c6c2c32d9a15e46b5174 by Victor Stinner in branch '3.6': bpo-31234: test_threading: fix ref cycle (#3150) (#3152) https://github.com/python/cpython/commit/b50e7683acac36ff16e6c6c2c32d9a15e46b5174 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 20:34:46 2017 From: report at bugs.python.org (Vlad Shcherbina) Date: Sat, 19 Aug 2017 00:34:46 +0000 Subject: [issue31239] namedtuple comparison ignores types Message-ID: <1503102886.22.0.684881922267.issue31239@psf.upfronthosting.co.za> New submission from Vlad Shcherbina: Toy example: >>> from collections import namedtuple >>> Rectangle = namedtuple('Rectangle', 'width height') >>> Ellipse = namedtuple('Ellipse', 'x_axis y_axis') >>> Rectangle(width=1, height=2) == Ellipse(x_axis=1, y_axis=2) True I understand this happens because namedtuple inherits comparisons and hash from the regular tuple. However, this seems like confusing and dangerous behavior. It is especially annoying to debug when these tuples are used as dict keys (repr() shows one thing and dict item access shows another). Why would anyone mix named tuples of different types? Here is a use case: typing.NamedTuple together with typing.Union would be a neat way to express algebraic data types. Haskell's data Shape = Rectangle Int Int | Ellipse Int Int deriving(Eq, Show) would become Shape = Union[Rectangle, Ellipse] except that it does not work as expected because of the flawed comparisons. ---------- components: Library (Lib) messages: 300562 nosy: vlad priority: normal severity: normal status: open title: namedtuple comparison ignores types type: behavior versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 20:37:23 2017 From: report at bugs.python.org (Vlad Shcherbina) Date: Sat, 19 Aug 2017 00:37:23 +0000 Subject: [issue31239] namedtuple comparison ignores types In-Reply-To: <1503102886.22.0.684881922267.issue31239@psf.upfronthosting.co.za> Message-ID: <1503103043.31.0.977324189856.issue31239@psf.upfronthosting.co.za> Vlad Shcherbina added the comment: While we are at it, namedtuple inherits other operations that make no sense for fixed-length tuples: >>> Rectangle(width=1, height=2) * 3 (1, 2, 1, 2, 1, 2) >>> Rectangle(width=1, height=2) + Ellipse(x_axis=3, y_axis=4) (1, 2, 3, 4) But those are not so problematic because they are less likely to occur in practice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 20:40:27 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 19 Aug 2017 00:40:27 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503103227.5.0.610102585155.issue31206@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3189 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 20:40:27 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 19 Aug 2017 00:40:27 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1503103227.67.0.537754219938.issue31205@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3190 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 18 23:56:58 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 03:56:58 +0000 Subject: [issue31230] Define a general "asynchronous operation introspection" protocol In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503115018.08.0.425937330303.issue31230@psf.upfronthosting.co.za> Nick Coghlan added the comment: I agree https://bugs.python.org/issue31197 is orthogonal - refactoring the current logic is useful regardless of what we do at the object attribute layer. Regarding __delegated_to__/__returns_to__, the reason I like *not* having "async" in the attribute names is that generators are actually used as a synchronous construct (via synchronous for loops and next() calls), even though they technically define an asynchronous operation from the interpreter's point of view. The reason I like omitting "call" (or "calls") from the name is that even though "yield from" and "await" are both sometimes described as providing syntax for asynchronous calls, that terminology is really only defensible for "await" - PEP 380 describes the "yield from" operation as delegating to a subgenerator, and I think that's a better way of framing the general concept. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 00:32:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 19 Aug 2017 04:32:41 +0000 Subject: [issue31236] improve some error messages of min() and max() In-Reply-To: <1503093079.31.0.160974520345.issue31236@psf.upfronthosting.co.za> Message-ID: <1503117161.68.0.930198698347.issue31236@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- components: +Interpreter Core -IO dependencies: +wrong error messages when too many kwargs are received nosy: +serhiy.storchaka stage: -> patch review type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 02:04:01 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 06:04:01 +0000 Subject: [issue31232] Backport the new custom "print >> sys.stderr" error message? In-Reply-To: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za> Message-ID: <1503122641.18.0.3192440718.issue31232@psf.upfronthosting.co.za> Nick Coghlan added the comment: The condition we (mostly Serhiy) came up with for the check is actually kinda neat, since it's based on the value of the LHS and is hard to trigger accidentally: ``` >>> printf = print >>> print = 10 >>> print >> 1 5 >>> printf >> 1 Traceback (most recent call last): File "", line 1, in TypeError: unsupported operand type(s) for >>: 'builtin_function_or_method' and 'int'. Did you mean "print(, file=)" ``` Anyway, I'll put together a PR that combines both the original patch and the follow up fix to add the missing question mark. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 02:16:59 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 06:16:59 +0000 Subject: [issue31232] Backport the new custom "print >> sys.stderr" error message? In-Reply-To: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za> Message-ID: <1503123419.81.0.205829910358.issue31232@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +3191 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 02:16:59 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 06:16:59 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1503123419.94.0.0740305096364.issue30721@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- pull_requests: +3192 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 02:46:07 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 06:46:07 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503125167.85.0.586983899276.issue14976@psf.upfronthosting.co.za> Nick Coghlan added the comment: +1 for treating Queue.put() specifically as the case to be handled, as that's the mechanism that can be used to *avoid* running complex operations directly in __del__ methods and weakref callbacks. For testing purposes, the current deadlock can be reliably reproduced with sys.settrace: ``` >>> import sys >>> import queue >>> the_queue=queue.Queue() >>> counter = 0 >>> def bad_trace(*args): ... global counter ... counter += 1 ... print(counter) ... the_queue.put(counter) ... return bad_trace ... >>> sys.settrace(bad_trace) >>> the_queue.put(None) 1 2 3 4 5 6 7 [and here we have a deadlock] ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 02:59:41 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 06:59:41 +0000 Subject: [issue31232] Backport the new custom "print >> sys.stderr" error message? In-Reply-To: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za> Message-ID: <1503125981.68.0.456709275946.issue31232@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 1a05e87ec75436d818f05a5dabcecaea67334cbd by Nick Coghlan in branch '3.6': [3.6] bpo-31232: Backport custom print rshift message (GH-3155) https://github.com/python/cpython/commit/1a05e87ec75436d818f05a5dabcecaea67334cbd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 02:59:41 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 06:59:41 +0000 Subject: [issue30721] Show expected input for right shift operator usage in custom "print" error message In-Reply-To: <1498022036.95.0.527028755561.issue30721@psf.upfronthosting.co.za> Message-ID: <1503125981.96.0.433738450877.issue30721@psf.upfronthosting.co.za> Nick Coghlan added the comment: New changeset 1a05e87ec75436d818f05a5dabcecaea67334cbd by Nick Coghlan in branch '3.6': [3.6] bpo-31232: Backport custom print rshift message (GH-3155) https://github.com/python/cpython/commit/1a05e87ec75436d818f05a5dabcecaea67334cbd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 03:00:45 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 07:00:45 +0000 Subject: [issue31232] Backport the new custom "print >> sys.stderr" error message? In-Reply-To: <1503054437.52.0.692993582451.issue31232@psf.upfronthosting.co.za> Message-ID: <1503126045.99.0.00614133417936.issue31232@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks all! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 04:13:58 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 19 Aug 2017 08:13:58 +0000 Subject: [issue31239] namedtuple comparison ignores types In-Reply-To: <1503102886.22.0.684881922267.issue31239@psf.upfronthosting.co.za> Message-ID: <1503130438.0.0.223674742053.issue31239@psf.upfronthosting.co.za> R. David Murray added the comment: This is by design: namedtuples are tuples in which you can access the elements by name. If you have a tuple with the same elements, but no name access, they should compare equal, because they are fundamentally tuples. The names are just a convenience. Even if this were not so, it is not something that could be changed, for backward compatibility reasons. If you want a different data types, make them :) ---------- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 04:15:23 2017 From: report at bugs.python.org (Ilya Kulakov) Date: Sat, 19 Aug 2017 08:15:23 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1503130523.05.0.902788955883.issue29302@psf.upfronthosting.co.za> Ilya Kulakov added the comment: I'm not sure about type() to get a class object and calling __aenter__, __aexit__ through it: that makes it hard to mock these classes as Mock's spec= relies on __class__ and type() seem to ignore it (learned it a hard way. Yury, I could take a second look and try to change this into a patch if that's OK. ---------- nosy: +Ilya.Kulakov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 04:39:35 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 19 Aug 2017 08:39:35 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1503131975.27.0.250744982215.issue29843@psf.upfronthosting.co.za> Oren Milman added the comment: I am not sure I understood your question, Igor. I compiled with https://github.com/python/cpython/pull/3006, and got: class T(ctypes.Array): _type_ = ctypes.c_int _length_ = 2 ** 1000 Traceback (most recent call last): File "", line 1, in OverflowError: Python int too large to convert to C ssize_t and also: class T(ctypes.Array): _type_ = ctypes.c_int _length_ = -1 Traceback (most recent call last): File "", line 1, in OverflowError: array too large ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 04:53:41 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Aug 2017 08:53:41 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1503091613.09.0.382886788001.issue14976@psf.upfronthosting.co.za> Message-ID: Antoine Pitrou added the comment: Le 18/08/2017 ? 23:26, Guido van Rossum a ?crit : > > IIUC the end result would be a Queue whose put() works from signal handlers, GC callbacks and __del__, as long as it's unbounded, right? Yes. > And when it *is* bounded, it will give a decent message if the queue is full and the lock is already taken, right? Currently it gives a decent message on any bounded queue, even if not full. That may be improved, I'd have to investigate how. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 04:54:37 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Aug 2017 08:54:37 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1503091613.09.0.382886788001.issue14976@psf.upfronthosting.co.za> Message-ID: <4ebdbe8d-beaf-ebc4-dbd8-1121d52094a0@free.fr> Antoine Pitrou added the comment: Oh and: Le 18/08/2017 ? 23:26, Guido van Rossum a ?crit : > > I can't say I understand all of Antoine's patch, but it's probably okay to do it this way; however I would rather see if we can add _is_owned() to Lock, assuming it can be implemented using any of the threading/locking libraries we still support (I presume that's basically posix and Windows). Regular Locks don't have the notion of an owning thread so, while we could add it, that would be a bizarre API. We can also detect reentrancy in get() and raise an error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 05:33:40 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 19 Aug 2017 09:33:40 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503135220.76.0.279699984062.issue31206@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3193 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 05:54:09 2017 From: report at bugs.python.org (Wonsup Yoon) Date: Sat, 19 Aug 2017 09:54:09 +0000 Subject: [issue29456] bugs in unicodedata.normalize: u1176, u11a7 and u11c3 In-Reply-To: <1486355272.29.0.0894514518656.issue29456@psf.upfronthosting.co.za> Message-ID: <1503136449.78.0.822454445733.issue29456@psf.upfronthosting.co.za> Wonsup Yoon added the comment: This patch fixes changes in Unicode 4.1.0. I think it well reviewed and it is time to merge. Who can commit this patch? @animalize says: Let me give a supplement: Before Unicode 4.1.0 (draft), here is: TBase <= code <= TBase+TCount see: http://www.unicode.org/reports/tr15/tr15-24.html#hangul_composition After Unicode 4.1.0, here is TBase < code < TBase+TCount, which in line with the latest version (Unicode 10.0) see: http://www.unicode.org/reports/tr15/tr15-25.html#hangul_composition This change happened in 2005. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 06:09:17 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 10:09:17 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503137357.75.0.0790236421215.issue14976@psf.upfronthosting.co.za> Nick Coghlan added the comment: Would it be feasible to change the behaviour of non-reentrant locks such that: 1. They *do* keep track of the owning thread 2. Trying to acquire them again when the current thread already has them locked raises RuntimeError instead of deadlocking the way it does now? Then they could sensibly expose the same "_is_locked()" API as RLock, while still disallowing reentrancy by default. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 07:01:20 2017 From: report at bugs.python.org (Hiren Vadalia) Date: Sat, 19 Aug 2017 11:01:20 +0000 Subject: [issue31120] [2.7] Python 64 bit _ssl compile fails due missing buildinf_amd64.h In-Reply-To: <1501851770.24.0.114310480088.issue31120@psf.upfronthosting.co.za> Message-ID: <1503140480.71.0.724017200029.issue31120@psf.upfronthosting.co.za> Hiren Vadalia added the comment: Hey Zach, Any update on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 07:07:30 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 11:07:30 +0000 Subject: [issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects In-Reply-To: <1502464891.48.0.226484247582.issue31183@psf.upfronthosting.co.za> Message-ID: <1503140850.56.0.35889769998.issue31183@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 07:09:37 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 11:09:37 +0000 Subject: [issue31183] `Dis` module doesn't know how to disassemble async generator or coroutine objects In-Reply-To: <1502464891.48.0.226484247582.issue31183@psf.upfronthosting.co.za> Message-ID: <1503140977.77.0.64262980335.issue31183@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks for the patch! Issue 31230 is a follow-up issue looking at whether or not we should define a general "__code__" attribute as a general purpose introspection protocol for disassembly support (amongst other generalisations of state introspection support for async operations). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 07:15:12 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 19 Aug 2017 11:15:12 +0000 Subject: [issue31230] Define a general "asynchronous operation introspection" protocol In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503141312.41.0.263499260177.issue31230@psf.upfronthosting.co.za> Nick Coghlan added the comment: I started a local PR at https://github.com/ncoghlan/cpython/pull/1/files to explore what this might look like in practice. I think that what I've done so far shows that generic __frame__ and __running__ attributes would be sufficient to extend the inspect module's state introspection support to also cover async generators, while also allowing for the soft (i.e. documentation only) deprecation of the generator and coroutine specific variants of those APIs. Issue 31183 already showed the potential value of a __code__ attribute, since it would allow all of the asynchronous operations to be handled by the same code path that already handles functions. I'm less sure about __delegated_to__/__returns_to__, since we don't have *any* code in the standard library that reads gi_yieldfrom, and the only code that reads cr_await is a Python 3.5 compatibility hack in asyncio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 08:05:56 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Aug 2017 12:05:56 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1503137357.75.0.0790236421215.issue14976@psf.upfronthosting.co.za> Message-ID: <7b84a937-674c-25bf-9655-108654d31cfb@free.fr> Antoine Pitrou added the comment: Le 19/08/2017 ? 12:09, Nick Coghlan a ?crit : > > Would it be feasible to change the behaviour of non-reentrant locks such that: > > 1. They *do* keep track of the owning thread Yes. > 2. Trying to acquire them again when the current thread already has them locked raises RuntimeError instead of deadlocking the way it does now? No. It's not a deadlock, since you can release a Lock from another thread. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 09:22:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Aug 2017 13:22:56 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503148976.83.0.230127221926.issue31206@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 764e282158df0d7d6d7e0c72f38756c979a36539 by Terry Jan Reedy (Cheryl Sabella) in branch '3.6': [3.6] bpo-31206: IDLE: Factor HighPage class from ConfigDialog (GH-3141) (#3154) https://github.com/python/cpython/commit/764e282158df0d7d6d7e0c72f38756c979a36539 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 09:22:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 19 Aug 2017 13:22:56 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1503148976.95.0.270288655977.issue31205@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 764e282158df0d7d6d7e0c72f38756c979a36539 by Terry Jan Reedy (Cheryl Sabella) in branch '3.6': [3.6] bpo-31206: IDLE: Factor HighPage class from ConfigDialog (GH-3141) (#3154) https://github.com/python/cpython/commit/764e282158df0d7d6d7e0c72f38756c979a36539 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 09:27:04 2017 From: report at bugs.python.org (drallensmith) Date: Sat, 19 Aug 2017 13:27:04 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1503149224.69.0.803323827862.issue5001@psf.upfronthosting.co.za> drallensmith added the comment: I've updated the PR to include all of the non-Windows-specific asserts; I am not sufficiently familiar with Windows multiprocessing to feel confident writing informative error messages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 11:39:06 2017 From: report at bugs.python.org (Stefan Krah) Date: Sat, 19 Aug 2017 15:39:06 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503157146.22.0.382412921896.issue30923@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- pull_requests: +3194 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 11:50:27 2017 From: report at bugs.python.org (Stefan Krah) Date: Sat, 19 Aug 2017 15:50:27 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503157827.42.0.685410774607.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: PR 3157 addresses everything apart from expat and https://github.com/python/cpython/blob/master/Modules/cjkcodecs/_codecs_iso2022.c#L816 I'm not sure about that one. It looks harmless but a bit odd. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 12:44:25 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 19 Aug 2017 16:44:25 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1503161065.49.0.574543529984.issue29302@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I'm not sure about type() to get a class object and calling __aenter__, __aexit__ through it: that makes it hard to mock these classes as Mock's spec= relies on __class__ and type() seem to ignore it (learned it a hard way. Looking up __dunder__ methods on the class is how it should be done as that's how the rest of Python works. And that's how ExitStack is currently implemented for synchronous "with" blocks. We won't be able to change this behaviour even if we wanted to, so it stays. Here's an example: class Foo: def __init__(self): self.__aenter__ = ... self.__aexit__ = ... If we implement AsyncExitStack to lookup __anter__ directly on the object, then the above Foo class would be supported by it, but at the same time rejected by the 'async with' statement. > Yury, I could take a second look and try to change this into a patch if that's OK. By all means you can submit a PR! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 12:47:44 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 19 Aug 2017 16:47:44 +0000 Subject: [issue31230] Define a general "asynchronous operation introspection" protocol In-Reply-To: <1503023130.32.0.241759623891.issue31230@psf.upfronthosting.co.za> Message-ID: <1503161264.05.0.64731281301.issue31230@psf.upfronthosting.co.za> Yury Selivanov added the comment: > I started a local PR at https://github.com/ncoghlan/cpython/pull/1/files to explore what this might look like in practice. Looks good to me. > I'm less sure about __delegated_to__/__returns_to__, since we don't have *any* code in the standard library that reads gi_yieldfrom, and the only code that reads cr_await is a Python 3.5 compatibility hack in asyncio. I'm -1 on this too. gi_yieldfrom and cr_await are very special and rarely used things. Refactoring or unifying them isn't trivial and ultimately not as useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 13:02:00 2017 From: report at bugs.python.org (Ilya Kulakov) Date: Sat, 19 Aug 2017 17:02:00 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1503162120.21.0.0774070243142.issue29302@psf.upfronthosting.co.za> Ilya Kulakov added the comment: > but at the same time rejected by the 'async with' statement. Perhaps unittest.mock (or type) needs to be adjusted to allow mocking via spec= without subclassing? > By all means you can submit a PR! I'll take a look then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 13:04:50 2017 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 19 Aug 2017 17:04:50 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1503162290.42.0.868154945404.issue29302@psf.upfronthosting.co.za> Yury Selivanov added the comment: >> but at the same time rejected by the 'async with' statement. > Perhaps unittest.mock (or type) needs to be adjusted to allow mocking via spec= without subclassing? Maybe. You should try to find discussions around this topic on python mailing lists and this tracker. If you find nothing then feel free to open an issue and add Michael Foord to nosy list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 13:09:39 2017 From: report at bugs.python.org (Brett Cannon) Date: Sat, 19 Aug 2017 17:09:39 +0000 Subject: [issue31109] zipimport argument clinic conversion In-Reply-To: <1501700724.15.0.635937814263.issue31109@psf.upfronthosting.co.za> Message-ID: <1503162579.93.0.960779732039.issue31109@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 19:17:48 2017 From: report at bugs.python.org (Igor) Date: Sat, 19 Aug 2017 23:17:48 +0000 Subject: [issue29843] errors raised by ctypes.Array for invalid _length_ attribute In-Reply-To: <1489830992.7.0.11223013414.issue29843@psf.upfronthosting.co.za> Message-ID: <1503184668.46.0.973928438111.issue29843@psf.upfronthosting.co.za> Igor added the comment: Oren, 1) I might be completely wrong, but, personally, I think about OverflowError vs ValueError difference like this: if the value couldn't be handled because method's logic cannot handle it - it's a ValueError; if it could not be handled because of a low-level platform-dependent limitation - it's an OverflowError. Before that PR, the _length_ maximum value was hard-coded in the method itself, thus one might say that it was "a part of logic". With this PR, you just need a system with a large enough size_t. (May be, after a thousand years, it would even handle 2**1000. But negative values would be still logically incorrect. Thus, I'm only talking about "too large" case.) 2) It would be much more difficult to run into this limitation in a daily practice (e.g. by passing a very long string). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 22:04:42 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 Aug 2017 02:04:42 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503194682.78.0.0527059952662.issue31206@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 8f7a798edbdbca9a400105e3225463e59b334666 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-31206: IDLE: Factor HighPage class from ConfigDialog (#3156) https://github.com/python/cpython/commit/8f7a798edbdbca9a400105e3225463e59b334666 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 22:15:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 Aug 2017 02:15:27 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503195327.09.0.104547798162.issue31206@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ditto last message for PR3156 and 3rd patch deleting old code now dead. In retrospect, we could have done first and second patches together. Deleting or commenting out a large existing block along with other changes triggers the nonsense diff. Let's see if a simple delete can be handled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 22:18:17 2017 From: report at bugs.python.org (devurandom) Date: Sun, 20 Aug 2017 02:18:17 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1503195497.87.0.330784548524.issue5004@psf.upfronthosting.co.za> Changes by devurandom : ---------- nosy: +devurandom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 22:22:32 2017 From: report at bugs.python.org (devurandom) Date: Sun, 20 Aug 2017 02:22:32 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1503195752.1.0.339622929609.issue5004@psf.upfronthosting.co.za> devurandom added the comment: In my case, /etc/hostname, /proc/sys/kernel/hostname, `uname -n`, `hostname -f` all show the same FQDN, but `python -c 'import socket ; print(socket.getfqdn())'` still prints the short hostname. /etc/hosts is empty except for localhost. /etc/nsswitch.conf contains: hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 19 23:30:05 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 20 Aug 2017 03:30:05 +0000 Subject: [issue31118] Make super() work with staticmethod by using __class__ for both arguments to super() In-Reply-To: <1501828975.1.0.737825658034.issue31118@psf.upfronthosting.co.za> Message-ID: <1503199805.7.0.752365761838.issue31118@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Do you have a use case? This seems doesn't seem like it would be helpful at all and would make super a little more confusing than it already is. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 00:07:37 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 Aug 2017 04:07:37 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1503202057.32.0.403402930402.issue29302@psf.upfronthosting.co.za> Nick Coghlan added the comment: While it *may* be possible to do something simpler for test purposes where performance isn't a major concern, fully supporting type() level mocking basically requires bringing the equivalent of wrapt object proxies into the standard library: https://wrapt.readthedocs.io/en/latest/wrappers.html#object-proxy I actually think we *should* do that, and occasionally bug Graham Dumpleton about it, but while he's not opposed to the idea, it's also something that would take quite a bit of work (since odd edge cases that are tolerable in an opt-in third party module would probably need to be addressed for a standard library version). For test cases like AsyncExitStack though, we instead just use custom type definitions, rather than the unittest.mock module. Autospec'ed mocks are most attractive when we're dealing with object interfaces that are subject to a high rate of churn (since they make the tests more self-adjusting), and that isn't the case here: Python's syntactic support protocols rarely change, and when they do, preserving backwards compatibility with existing classes is typically a key requirement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 01:14:06 2017 From: report at bugs.python.org (Jim Dennis) Date: Sun, 20 Aug 2017 05:14:06 +0000 Subject: [issue31240] Add lazy evaluation support for dict.setdefault() Message-ID: <1503206046.25.0.821679783552.issue31240@psf.upfronthosting.co.za> New submission from Jim Dennis: Code such as mydict.setdefault('eggs', []) will needlessly incur the cost of instantiating a list even when 'eggs' is already a valid key in mydict. collections.defaultdict will not do this. detecting and automatically calling "callable" and "type" objects (implicit laziness) would break cases where callables and types are used as first class values. Add keyword argument: lazy? Thus mydict.setdefault('eggs',list, lazy=True) would generate a new list only when necessary while the default would still be to append a reference to list (first class) objects). ---------- messages: 300596 nosy: jimd priority: normal severity: normal status: open title: Add lazy evaluation support for dict.setdefault() type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 01:14:09 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 20 Aug 2017 05:14:09 +0000 Subject: [issue31118] Make super() work with staticmethod by using __class__ for both arguments to super() In-Reply-To: <1501828975.1.0.737825658034.issue31118@psf.upfronthosting.co.za> Message-ID: <1503206049.0.0.113146350739.issue31118@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks for the suggestion, but I'm closing this RFE, as there are two strong arguments against it: one related to implementation feasibility, and one related to the nature of what super() *does*. The feasibility argument is that the compiler doesn't even have the necessary information to do this, since it doesn't know what kind of method it's dealing with (it has no idea what decorators actually do, it just compiles them as subexpressions). Instead, the compiler blindly translates "super()" into "super(__class__, )" when inside a function definition that's inside a class definition. As a result, there's no way for the compiler to special case static methods and pass __class__ as the second argument as well. Even without considering that technical limitation though, using __class__ for both arguments doesn't do anything particularly sensible, since super() is specifically about resolving name lookups using the *dynamic* method resolution order (MRO) of the class the method was retrieved from (which may be a subclass of the class defining the method). So in instance methods and class methods, type(self) or cls provides the dynamic MRO to use, while __class__ identifies *where* along that MRO the currently running method implementation sits. In a static method, there's no dynamic MRO available for super() to query. This means that if you want access to one, you need to convert the method to a classmethod first so that the interpreter will pass in a reference to the class the method was retrieved from (as opposed to the one where it was defined, which is what __class__ gives you). If folks actually do want to make a method implementation in a child class depend on a static method in a parent class, there are two ways to do that, but only one of them will work correctly in the face of multiple inheritance: 1. Make the child method a class method. This is the most readable approach, since you can then use zero-argument super() to call the staticmethod in the parent class in the usual way. As long as all child classes overriding the method adhere to this approach, that particular class hierarchy will also reliably respect Python's MRO linearisation rules in the case of multiple inheritance. 2. Make the child method a staticmethod, and then use "super(__class__, __class__)" to access the staticmethod in the parent class. This will work OK in cases where there aren't any diamonds in the inheritance hierarchy, but it completely bypasses the dynamic C3 linearisation algorithm, and hence may do weird things in the presence of such diamonds (i.e. cases where a subclass has multiple inheritance paths back to a given base class - see https://python-history.blogspot.com.au/2010/06/method-resolution-order.html for more detail on this). ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 02:08:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Aug 2017 06:08:27 +0000 Subject: [issue31240] Add lazy evaluation support for dict.setdefault() In-Reply-To: <1503206046.25.0.821679783552.issue31240@psf.upfronthosting.co.za> Message-ID: <1503209307.78.0.445636353302.issue31240@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The advantage of dict.setdefault() is its atomicity. With lazy evaluation of the value it can't be atomic anymore, and can be replaced with the following code: if key not in mydict: mydict[key] = value I'm -1 for this change. It increases complexity (both semantical and implementational) of dict.setdefault() and doesn't have significant benefit. ---------- nosy: +rhettinger, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 05:47:00 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 20 Aug 2017 09:47:00 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503222420.6.0.337818188833.issue31206@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3195 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 07:34:22 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 20 Aug 2017 11:34:22 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503228862.94.0.269657691604.issue31206@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3196 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 08:03:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 Aug 2017 12:03:07 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503230587.34.0.795194489062.issue31206@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 3d9c0d498de3245199ca95aba14ce260e7d33489 by Terry Jan Reedy (Cheryl Sabella) in branch '3.6': [3.6] bpo-31206: IDLE: Factor HighPage class from ConfigDialog (GH-3156) (#3159) https://github.com/python/cpython/commit/3d9c0d498de3245199ca95aba14ce260e7d33489 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 08:07:24 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 Aug 2017 12:07:24 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503230844.19.0.872656403634.issue31206@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 4bfebc63012f0f4e00f6a98c3d96e1c0ebe93408 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-31206: IDLE: Factor HighPage class from ConfigDialog (#3160) https://github.com/python/cpython/commit/4bfebc63012f0f4e00f6a98c3d96e1c0ebe93408 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 08:22:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 Aug 2017 12:22:07 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503231727.22.0.224014722893.issue31206@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ditto backport for pr3160. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 09:13:24 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Sun, 20 Aug 2017 13:13:24 +0000 Subject: [issue30159] gdb autoloading python-gdb.py In-Reply-To: <1493123460.02.0.558737612722.issue30159@psf.upfronthosting.co.za> Message-ID: <1503234804.35.0.0177730699067.issue30159@psf.upfronthosting.co.za> ????? ???????? added the comment: Alternatively install $(INSTSONAME)-gdb.py into ${LIBDIR} . ldconfig will complain, when called, but this is how gcc and libisl, glib do it . This is in anycase better than the current approach, as it lets gdb automatically load the -gdb.py file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 11:32:23 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 20 Aug 2017 15:32:23 +0000 Subject: [issue31240] Add lazy evaluation support for dict.setdefault() In-Reply-To: <1503206046.25.0.821679783552.issue31240@psf.upfronthosting.co.za> Message-ID: <1503243143.07.0.111984836448.issue31240@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 from me as well. The need has already been fulfilled in other ways (defaultdict and __missing__). I don't think we need yet another way to do it. Also, I suspect that the benefit of a lazy instantiation would be more than offset by cost of passing in the arguments (global variable lookup for the list builtin, a load constant for True, and the keyword argument processing). Lastly, I don't like making the signature more complex or further breaking the already loose symmetry with dict.get() and dict.pop(). Likewise, this isn't parallel with other tools that take a default argument such as min(), max(), getattr(), etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 11:35:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Aug 2017 15:35:38 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1503243338.51.0.864461353081.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 1d1d3e9db882d78433f5bc8dbe7df929f4b6b5e1 by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-28261: Fixed err msgs where PyArg_ParseTuple is used to parse normal tuples. (#3119) https://github.com/python/cpython/commit/1d1d3e9db882d78433f5bc8dbe7df929f4b6b5e1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 11:37:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 20 Aug 2017 15:37:46 +0000 Subject: [issue31240] Add lazy evaluation support for dict.setdefault() In-Reply-To: <1503206046.25.0.821679783552.issue31240@psf.upfronthosting.co.za> Message-ID: <1503243466.89.0.43880324905.issue31240@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 12:31:08 2017 From: report at bugs.python.org (=?utf-8?q?Florian_Hedtst=C3=BCck?=) Date: Sun, 20 Aug 2017 16:31:08 +0000 Subject: [issue31203] socket.IP_PKTINFO is missing from python In-Reply-To: <1502722784.42.0.622750235869.issue31203@psf.upfronthosting.co.za> Message-ID: <1503246668.78.0.590250471815.issue31203@psf.upfronthosting.co.za> Changes by Florian Hedtst?ck : ---------- pull_requests: +3197 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 14:28:40 2017 From: report at bugs.python.org (sping) Date: Sun, 20 Aug 2017 18:28:40 +0000 Subject: [issue31170] expat: utf8_toUtf8 cannot properly handle exhausting buffer In-Reply-To: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> Message-ID: <1503253720.52.0.0906702637565.issue31170@psf.upfronthosting.co.za> sping added the comment: Expat 2.2.4 with a fix has been released now: https://github.com/libexpat/libexpat/releases ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 15:03:54 2017 From: report at bugs.python.org (Samuel Colvin) Date: Sun, 20 Aug 2017 19:03:54 +0000 Subject: [issue31241] ast col_offset wrong for list comprehensions, generators and tuples Message-ID: <1503255834.0.0.745479367375.issue31241@psf.upfronthosting.co.za> New submission from Samuel Colvin: With Python 3.5 and 3.6 list comprehensions, generators and tuples have the col_offset for their ast nodes off by 1: ``` import ast ast.parse('{a for a in range(3)}').body[0].value.col_offset >> 0 # set comprehension correct ast.parse('{a: 1 for a in range(3)}').body[0].value.col_offset >> 0 # dict comprehension correct ast.parse('[a for a in range(3)]').body[0].value.col_offset >> 1 # list comprehension wrong! ast.parse('(a for a in range(3))').body[0].value.col_offset >> 1 # generator comprehension wrong! ast.parse('[1, 2, 3]').body[0].value.col_offset >> 0 # list correct ast.parse('{1, 2, 3}').body[0].value.col_offset >> 0 # set correct ast.parse('{1: 1, 2: 2, 3: 3}').body[0].value.col_offset >> 0 # dict correct ast.parse('(1, 2, 3)').body[0].value.col_offset >> 1 # tuple wrong! ``` I haven't tried 3.4, the issue could be there too. There are some other related issues #16806 and #21295 but they don't seem quite the same. ---------- components: Interpreter Core messages: 300606 nosy: samuelcolvin priority: normal severity: normal status: open title: ast col_offset wrong for list comprehensions, generators and tuples versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 16:03:30 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 20 Aug 2017 20:03:30 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503259410.5.0.959529278296.issue31206@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3198 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 17:48:27 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 20 Aug 2017 21:48:27 +0000 Subject: [issue29832] Don't refer to getsockaddrarg in error messages In-Reply-To: <1489732997.44.0.201686346308.issue29832@psf.upfronthosting.co.za> Message-ID: <1503265707.26.0.496401009933.issue29832@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3199 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 17:49:16 2017 From: report at bugs.python.org (Ryan Finnie) Date: Sun, 20 Aug 2017 21:49:16 +0000 Subject: [issue31242] Add SSLContext.set_verify_callback() Message-ID: <1503265756.53.0.967490588927.issue31242@psf.upfronthosting.co.za> New submission from Ryan Finnie: At the moment, SSLContext.verify_mode() allows for three modes when dealing with Purpose.CLIENT_AUTH / server_side=True: - CERT_NONE (server does not request client certificate, client does not provide it) - CERT_OPTIONAL (server requests client certificate, raises SSLError if provided but fails verification, continues if not provided) - CERT_REQUIRED (server requests client certificate, raises SSLError if provided but fails verification, raises SSLError if not provided) There is currently no way to request a client certificate and manually verify it (or ignore it) if it doesn't pass OpenSSL verification. OpenSSL provides SSL_CTX_set_cert_verify_callback for using a custom callback[0], but this is not exposed in Python. It would be nice to have a set_verify_callback() method, similar to how set_servername_callback() does it for SSL_CTX_set_tlsext_servername_callback. [0] https://www.openssl.org/docs/man1.0.2/ssl/SSL_CTX_set_verify.html ---------- assignee: christian.heimes components: SSL messages: 300607 nosy: christian.heimes, rfinnie priority: normal severity: normal status: open title: Add SSLContext.set_verify_callback() type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 17:55:41 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 20 Aug 2017 21:55:41 +0000 Subject: [issue29832] Don't refer to getsockaddrarg in error messages In-Reply-To: <1489732997.44.0.201686346308.issue29832@psf.upfronthosting.co.za> Message-ID: <1503266141.01.0.77222096021.issue29832@psf.upfronthosting.co.za> Oren Milman added the comment: here is a dirty script to test my PR. the script contains tests to anything I managed to test using my Windows 10 and Ubuntu 16.04 VM, i.e. all of the changes, except for the 'unsupported CAN protocol' message, and the changes of the code that handles the PF_SYSTEM family. ---------- Added file: http://bugs.python.org/file47093/testPatches.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 18:45:49 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Aug 2017 22:45:49 +0000 Subject: [issue9566] Compilation warnings under x64 Windows In-Reply-To: <1281484786.91.0.306555541292.issue9566@psf.upfronthosting.co.za> Message-ID: <1503269149.14.0.168729004143.issue9566@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 0267128aa4dc7c383c341c19833c5d506eae9c93 by Antoine Pitrou (Segev Finer) in branch 'master': bpo-9566 & bpo-30747: Silence warnings from pyatomic.h macros (#3140) https://github.com/python/cpython/commit/0267128aa4dc7c383c341c19833c5d506eae9c93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 18:45:48 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Aug 2017 22:45:48 +0000 Subject: [issue30747] _Py_atomic_* not actually atomic on Windows with MSVC In-Reply-To: <1498332959.93.0.572211672441.issue30747@psf.upfronthosting.co.za> Message-ID: <1503269148.82.0.793974251288.issue30747@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 0267128aa4dc7c383c341c19833c5d506eae9c93 by Antoine Pitrou (Segev Finer) in branch 'master': bpo-9566 & bpo-30747: Silence warnings from pyatomic.h macros (#3140) https://github.com/python/cpython/commit/0267128aa4dc7c383c341c19833c5d506eae9c93 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 18:46:23 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Aug 2017 22:46:23 +0000 Subject: [issue30747] _Py_atomic_* not actually atomic on Windows with MSVC In-Reply-To: <1498332959.93.0.572211672441.issue30747@psf.upfronthosting.co.za> Message-ID: <1503269183.6.0.399441262489.issue30747@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 18:47:44 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 20 Aug 2017 22:47:44 +0000 Subject: [issue30747] _Py_atomic_* not actually atomic on Windows with MSVC In-Reply-To: <1498332959.93.0.572211672441.issue30747@psf.upfronthosting.co.za> Message-ID: <1503269264.63.0.859873481245.issue30747@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks to Segev Finer for submitting the PR which fixed the warnings! ---------- nosy: +Segev Finer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 19:21:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 Aug 2017 23:21:53 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503271313.14.0.376286691988.issue31206@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 24c0c5b48cb996c3ec1800640edff2bfecc36275 by Terry Jan Reedy (Cheryl Sabella) in branch '3.6': [3.6] bpo-31206: IDLE: Factor HighPage class from ConfigDialog (GH-3160) (#3162) https://github.com/python/cpython/commit/24c0c5b48cb996c3ec1800640edff2bfecc36275 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 20 19:22:51 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 20 Aug 2017 23:22:51 +0000 Subject: [issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog In-Reply-To: <1502761737.83.0.0701165546864.issue31206@psf.upfronthosting.co.za> Message-ID: <1503271371.69.0.507044499133.issue31206@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 01:10:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Aug 2017 05:10:05 +0000 Subject: [issue31170] expat: utf8_toUtf8 cannot properly handle exhausting buffer In-Reply-To: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> Message-ID: <1503292205.47.0.141134801031.issue31170@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 04:33:09 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 21 Aug 2017 08:33:09 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int Message-ID: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> New submission from Oren Milman: according to the docs (https://docs.python.org/3.7/c-api/arg.html?highlight=pyarg_parsetuple#c.PyArg_ParseTuple), PyArg_ParseTuple returns true for success or false for failure. I also looked at the implementation in Python/getargs.c, and it seems that indeed PyArg_ParseTuple can return only 0 or 1. however, in some places in the codebase, there are checks whether PyArg_ParseTuple returned a negative int. I found a bunch in Modules/_testcapimodule.c, and one in Modules/_io/textio.c in textiowrapper_read_chunk. (hopefully i haven't missed other places.) this code crashes because of the check in textiowrapper_read_chunk: import codecs import _io class MyDec(): def getstate(self): return 420 class MyDecWrapper(): def __call__(self, blabla): return MyDec() quopri = codecs.lookup("quopri") quopri._is_text_encoding = True quopri.incrementaldecoder = MyDecWrapper() t = _io.TextIOWrapper(_io.BytesIO(b'aaaaaa'), newline='\n', encoding="quopri") t.read(42) I guess all of these checks should be changed to check whether PyArg_ParseTuple returned 0. also, before this specific call to PyArg_ParseTuple in textiowrapper_read_chunk, we should check whether 'state' is a tuple. Moreover, this call shouldn't produce a wrong error message, as explained in #28261. ---------- components: Interpreter Core messages: 300613 nosy: Oren Milman priority: normal severity: normal status: open title: checks whether PyArg_ParseTuple returned a negative int type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 04:38:12 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 21 Aug 2017 08:38:12 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1503304692.9.0.620153860883.issue28261@psf.upfronthosting.co.za> Oren Milman added the comment: it seems that I have missed some places which are part of this issue, at least in Modules/_io/textio.c (one of them is mentioned in #31243). also, when fixing these, we should also add a check before the call to PyArg_ParseTuple (in case such check doesn't already exist), to verify the object is indeed a tuple. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 05:00:21 2017 From: report at bugs.python.org (nvdv) Date: Mon, 21 Aug 2017 09:00:21 +0000 Subject: [issue31144] add initializer to concurrent.futures.ProcessPoolExecutor In-Reply-To: <1502200949.97.0.102357103627.issue31144@psf.upfronthosting.co.za> Message-ID: <1503306021.82.0.0528013671512.issue31144@psf.upfronthosting.co.za> nvdv added the comment: I can make a PR if it makes any sense for stdlib maintainer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 05:13:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Aug 2017 09:13:26 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1503306806.06.0.151572596196.issue31243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Do you want to provide a PR Oren? ---------- components: +Extension Modules -Interpreter Core nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 05:13:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Aug 2017 09:13:56 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1503306836.38.0.959862465297.issue31243@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka keywords: +easy (C) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 05:16:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Aug 2017 09:16:19 +0000 Subject: [issue31229] wrong error messages when too many kwargs are received In-Reply-To: <1502992936.21.0.653436354644.issue31229@psf.upfronthosting.co.za> Message-ID: <1503306979.89.0.360127562878.issue31229@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you please make a PR from your patch Oren? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 05:42:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 09:42:18 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1503308537.99.0.0332683001731.issue31217@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6 -> test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 05:42:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 09:42:22 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1503308542.65.0.152306122216.issue31217@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 06:12:45 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 21 Aug 2017 10:12:45 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1503310365.01.0.819471839386.issue31243@psf.upfronthosting.co.za> Oren Milman added the comment: yes, soon. (just wanted to hear your opinion before doing that.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 06:25:52 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 21 Aug 2017 10:25:52 +0000 Subject: [issue31229] wrong error messages when too many kwargs are received In-Reply-To: <1502992936.21.0.653436354644.issue31229@psf.upfronthosting.co.za> Message-ID: <1503311152.78.0.485830377445.issue31229@psf.upfronthosting.co.za> Oren Milman added the comment: I already wrote a patch, but I thought it would be better to wait until #31236 is resolved. this is because #31236 would change the error messages of min() and max(), and test_call tests exact error messages in CFunctionCallsErrorMessages, which is where I thought the tests of this issue should be added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 07:10:02 2017 From: report at bugs.python.org (Stefan Krah) Date: Mon, 21 Aug 2017 11:10:02 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503313802.85.0.573923994885.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: New changeset f432a3234f9f2ee09bd40be03e06bf72865ee375 by Stefan Krah in branch 'master': bpo-30923: Silence fall-through warnings included in -Wextra since gcc-7.0. (#3157) https://github.com/python/cpython/commit/f432a3234f9f2ee09bd40be03e06bf72865ee375 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 07:11:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 11:11:53 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503313913.45.0.0348801421911.issue31095@psf.upfronthosting.co.za> STINNER Victor added the comment: "like GH-2966, most types with Py_TPFLAGS_HAVE_GC should call PyObject_GC_UnTrack() at top of the tp_dealloc." Hum, I wasn't aware of that. Writing correctly code for the Python garbage collector is very complex :-/ Maybe it would help to have a short comment, maybe with a link to this issue, on each PyObject_GC_UnTrack(). At the first read, I saw the newly added PyObject_GC_UnTrack() calls as duplicate, and so useless. For example, PyObject_Del() already untracks the object, so it doesn't seem to be needed to explicitly call PyObject_GC_UnTrack() "just before". ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 07:24:20 2017 From: report at bugs.python.org (Stefan Krah) Date: Mon, 21 Aug 2017 11:24:20 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503314660.84.0.555417405183.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: Cherry picking has too many conflicts, I'm not backporting this myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 08:03:49 2017 From: report at bugs.python.org (Constantine Ketskalo) Date: Mon, 21 Aug 2017 12:03:49 +0000 Subject: [issue31244] Shortcuts bug in Python IDLE Message-ID: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> New submission from Constantine Ketskalo: Hi there. Thank you for Python, I love this programming language. I've found a bug with shortcuts. I'm from Ukraine, so I'm working with English, Ukrainian and Russian languages. But any shortcuts, where alphabet is involved (like Ctrl+Z, Ctrl+F, Ctrl+V and so on) work only when English is turned on. This is quite inconvenient. It's possible to work with it, but still confusing, because you can select something in IDLE, copy it with shortcut Ctrl+C, then try to paste it to another place and then you find out that it wasn't copied, because active language is Ukrainian. So you need to switch to English and repeat everything again. I'm currently working with Python 3.6.1, Windows 8.1 Embedded enterprize x64. Also I've noticed the same under Windows 7, Windows 10 in different versions of Python. I believe there where Python 2.7, 2.11, 3.4, 3.5. Not sure about all the versions exectly, but for sure shortcuts worked the same in all the versions I've ever tried to use. I hope this was helpful and I'm sure many developers, that work not only with English would be really happy if you would fix this. Thanks again for your time and effort. Best regards, Constantine. ---------- assignee: terry.reedy components: IDLE messages: 300623 nosy: Constantine Ketskalo, terry.reedy priority: normal severity: normal status: open title: Shortcuts bug in Python IDLE type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 09:43:37 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 21 Aug 2017 13:43:37 +0000 Subject: [issue31244] Shortcuts bug in Python IDLE In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503323017.35.0.270480714461.issue31244@psf.upfronthosting.co.za> Terry J. Reedy added the comment: IDLE and Python/tkinter have nothing to do with the handling of keystrokes and their direct interpretation. The behavior you describe, the Ctrl key being disabled in Ukranian mode, strikes me as a bug in either Windows or the Input Method you use, or, less likely, the tcl tk GUI framework. Someone who uses the Japanese IME with IDLE thinks Ctrl continues to work right in Japanese mode, but will check and report to me. IDLE offers menu entries for most shortcuts. Indeed, shortcuts are shortcuts relative to using the menu. Cut, copy, and paste are on the Edit menu. It should be accessible with Alt shortcuts. C, C, and P are also on the right-click context menu. ---------- resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 10:06:59 2017 From: report at bugs.python.org (Quentin Dawans) Date: Mon, 21 Aug 2017 14:06:59 +0000 Subject: [issue31245] Asyncio UNIX socket and SOCK_DGRAM Message-ID: <1503324419.78.0.551838104662.issue31245@psf.upfronthosting.co.za> New submission from Quentin Dawans: Following this discussion: https://groups.google.com/forum/#!searchin/python-tulip/datagram%7Csort:relevance/python-tulip/rpScueoGf1I/WBvEWf8vCgAJ I added the support for AF_UNIX SOCK_DGRAM is asyncio. Lots of code is coming from the other family/type of socket already implemented. ---------- components: asyncio messages: 300625 nosy: qdawans, yselivanov priority: normal severity: normal status: open title: Asyncio UNIX socket and SOCK_DGRAM type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 10:21:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 14:21:31 +0000 Subject: [issue31246] [2.7] test_signal.test_setitimer_tiny() fails randomly on x86-64 El Capitan 2.7 Message-ID: <1503325291.35.0.150944992826.issue31246@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86-64%20El%20Capitan%202.7/builds/161/steps/test/logs/stdio 0:04:49 [173/403/1] test_signal failed test test_signal failed -- Traceback (most recent call last): File "/Users/buildbot/buildarea/2.7.billenstein-elcapitan/build/Lib/test/test_signal.py", line 500, in test_setitimer_tiny self.assertEqual(self.hndl_called, True) AssertionError: False != True ---------- components: Tests messages: 300626 nosy: haypo priority: normal severity: normal status: open title: [2.7] test_signal.test_setitimer_tiny() fails randomly on x86-64 El Capitan 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 10:24:23 2017 From: report at bugs.python.org (Roundup Robot) Date: Mon, 21 Aug 2017 14:24:23 +0000 Subject: [issue31245] Asyncio UNIX socket and SOCK_DGRAM In-Reply-To: <1503324419.78.0.551838104662.issue31245@psf.upfronthosting.co.za> Message-ID: <1503325463.58.0.635663956702.issue31245@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3200 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 10:31:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 14:31:26 +0000 Subject: [issue31246] [2.7] test_signal.test_setitimer_tiny() fails randomly on x86-64 El Capitan 2.7 In-Reply-To: <1503325291.35.0.150944992826.issue31246@psf.upfronthosting.co.za> Message-ID: <1503325886.78.0.668081622637.issue31246@psf.upfronthosting.co.za> STINNER Victor added the comment: It's related to bpo-30807, "setitimer() can disable timer by mistake". Test code: def test_setitimer_tiny(self): # bpo-30807: C setitimer() takes a microsecond-resolution interval. # Check that float -> timeval conversion doesn't round # the interval down to zero, which would disable the timer. self.itimer = signal.ITIMER_REAL signal.setitimer(self.itimer, 1e-6) time.sleep(1) self.assertEqual(self.hndl_called, True) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 10:33:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 14:33:47 +0000 Subject: [issue31246] [2.7] test_signal.test_setitimer_tiny() fails randomly on x86-64 El Capitan 2.7 In-Reply-To: <1503325291.35.0.150944992826.issue31246@psf.upfronthosting.co.za> Message-ID: <1503326027.78.0.471235158748.issue31246@psf.upfronthosting.co.za> STINNER Victor added the comment: It seems like build 161 is the first since build 142 which failed. I don't see this failure in recent 3.6 and 3.x builds. So the failure seems very rare. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 11:14:55 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 15:14:55 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1503328495.85.0.619840261395.issue30263@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3201 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 11:16:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 15:16:52 +0000 Subject: [issue31246] [2.7] test_signal.test_setitimer_tiny() fails randomly on x86-64 El Capitan 2.7 In-Reply-To: <1503325291.35.0.150944992826.issue31246@psf.upfronthosting.co.za> Message-ID: <1503328612.29.0.79449974247.issue31246@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote https://github.com/python/cpython/pull/3165 "[2.7] bpo-30263: regrtest: add system load average", it might help to understand why test_signal fails randomly (check if there is a correlation with the system load). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 11:48:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 15:48:53 +0000 Subject: [issue31247] test_xmlrpc leaks dangling threads Message-ID: <1503330533.41.0.899332710232.issue31247@psf.upfronthosting.co.za> New submission from STINNER Victor: Using PR 3138 of bpo-31234, I noticed that test_xmlrpc leaks dangling threads. Example: haypo at selma$ ./python -m test -v test_xmlrpc --fail-env-changed -m test.test_xmlrpc.MultiPathServerTestCase.test_path1 == CPython 3.7.0a0 (heads/master:0267128, Aug 21 2017, 17:23:11) [GCC 6.4.1 20170727 (Red Hat 6.4.1-1)] (...) Warning -- threading_cleanup() detected 0 leaked threads (count: 0, dangling: 2) test_xmlrpc failed (env changed) (...) It seems like xmlrpc error handling creates reference leaks. Attached PR fixes the issue. ---------- components: Tests messages: 300630 nosy: haypo priority: normal severity: normal status: open title: test_xmlrpc leaks dangling threads type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 11:51:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 15:51:28 +0000 Subject: [issue31247] test_xmlrpc leaks dangling threads In-Reply-To: <1503330533.41.0.899332710232.issue31247@psf.upfronthosting.co.za> Message-ID: <1503330688.87.0.697878427224.issue31247@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3202 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 11:51:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 15:51:40 +0000 Subject: [issue31247] test_xmlrpc leaks dangling threads In-Reply-To: <1503330533.41.0.899332710232.issue31247@psf.upfronthosting.co.za> Message-ID: <1503330700.05.0.203342788957.issue31247@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 11:53:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 15:53:22 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503330802.78.0.771604244097.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: test_xmlrpc: bpo-31247, "test_xmlrpc leaks dangling threads". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 11:54:19 2017 From: report at bugs.python.org (Dan Snider) Date: Mon, 21 Aug 2017 15:54:19 +0000 Subject: [issue31248] method wrapper type has invalid __name__/__qualname__ 'method-wrapper' Message-ID: <1503330859.0.0.694490112113.issue31248@psf.upfronthosting.co.za> New submission from Dan Snider: Out of the 202 builtin/extension types easily accessible in sys.modules, that is the only one with a dash in its name. ---------- components: Library (Lib) messages: 300632 nosy: bup priority: normal severity: normal status: open title: method wrapper type has invalid __name__/__qualname__ 'method-wrapper' type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:01:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 16:01:14 +0000 Subject: [issue30263] regrtest: log the system load? In-Reply-To: <1493852971.75.0.704908002937.issue30263@psf.upfronthosting.co.za> Message-ID: <1503331274.48.0.152073729719.issue30263@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 02d4292df4bbd7a2cbf2716c9e6c22cae76e2093 by Victor Stinner in branch '2.7': bpo-30263: regrtest: add system load average (#3165) https://github.com/python/cpython/commit/02d4292df4bbd7a2cbf2716c9e6c22cae76e2093 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:04:13 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 16:04:13 +0000 Subject: [issue31249] test_concurrent_futures leaks dangling threads Message-ID: <1503331453.05.0.480625711508.issue31249@psf.upfronthosting.co.za> New submission from STINNER Victor: Using PR 3138 of bpo-31234, I noticed that test_concurrent_futures leaks dangling threads: haypo at selma$ ./python -u -m test --fail-env-changed test_concurrent_futures -v -m ThreadPoolWaitTests == CPython 3.7.0a0 (heads/master:0267128, Aug 21 2017, 17:23:11) [GCC 6.4.1 20170727 (Red Hat 6.4.1-1)] (...) test_all_completed (test.test_concurrent_futures.ThreadPoolWaitTests) ... Warning -- threading_cleanup() detected 0 leaked threads (count: 0, dangling: 6) 0.11s ok test_first_completed (test.test_concurrent_futures.ThreadPoolWaitTests) ... 1.60s ok test_first_completed_some_already_completed (test.test_concurrent_futures.ThreadPoolWaitTests) ... 1.60s ok test_first_exception (test.test_concurrent_futures.ThreadPoolWaitTests) ... Warning -- threading_cleanup() detected 0 leaked threads (count: 0, dangling: 6) 3.11s ok test_first_exception_one_already_failed (test.test_concurrent_futures.ThreadPoolWaitTests) ... 2.10s ok test_first_exception_some_already_complete (test.test_concurrent_futures.ThreadPoolWaitTests) ... Warning -- threading_cleanup() detected 0 leaked threads (count: 0, dangling: 6) 1.60s ok test_pending_calls_race (test.test_concurrent_futures.ThreadPoolWaitTests) ... 0.12s ok test_timeout (test.test_concurrent_futures.ThreadPoolWaitTests) ... 6.11s ok (...) ---------- messages: 300634 nosy: haypo priority: normal severity: normal status: open title: test_concurrent_futures leaks dangling threads versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:04:21 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 16:04:21 +0000 Subject: [issue31249] test_concurrent_futures leaks dangling threads In-Reply-To: <1503331453.05.0.480625711508.issue31249@psf.upfronthosting.co.za> Message-ID: <1503331461.39.0.622942570024.issue31249@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Tests type: -> resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:12:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 16:12:36 +0000 Subject: [issue31249] test_concurrent_futures leaks dangling threads In-Reply-To: <1503331453.05.0.480625711508.issue31249@psf.upfronthosting.co.za> Message-ID: <1503331956.88.0.772980474662.issue31249@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3203 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:13:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 16:13:00 +0000 Subject: [issue31247] test_xmlrpc leaks dangling threads In-Reply-To: <1503330533.41.0.899332710232.issue31247@psf.upfronthosting.co.za> Message-ID: <1503331980.19.0.603083629867.issue31247@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 84524454d0ba77d299741c47bd0f5841ac3f66ce by Victor Stinner in branch 'master': bpo-31247: xmlrpc.server: break reference cycle (#3166) https://github.com/python/cpython/commit/84524454d0ba77d299741c47bd0f5841ac3f66ce ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:14:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 16:14:15 +0000 Subject: [issue31247] test_xmlrpc leaks dangling threads In-Reply-To: <1503330533.41.0.899332710232.issue31247@psf.upfronthosting.co.za> Message-ID: <1503332055.26.0.0640133909807.issue31247@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3204 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:16:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 16:16:22 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503332182.33.0.474743907168.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: test_concurrent_futures: bpo-31249, test_concurrent_futures leaks dangling threads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:33:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 16:33:56 +0000 Subject: [issue31250] test_asyncio leaks dangling threads Message-ID: <1503333236.01.0.923722915126.issue31250@psf.upfronthosting.co.za> New submission from STINNER Victor: Using PR 3138 of bpo-31234, I noticed that test_asyncio leaks dangling threads. Tests which randomly leak threads: --- test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests.test_create_connection_no_inet_pton test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests.test_create_connection_service_name test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests.test_create_connection_bluetooth test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests.test_create_datagram_endpoint_no_addrinfo test.test_asyncio.test_futures.DuckTests.test_wrap_future test.test_asyncio.test_futures.CFutureTests.test_wrap_future test.test_asyncio.test_futures.CFutureTests.test_wrap_future_use_global_loop test.test_asyncio.test_futures.PyFutureTests.test_wrap_future test.test_asyncio.test_futures.PyFutureTests.test_wrap_future_use_global_loop test.test_asyncio.test_selector_events.BaseSelectorEventLoopTests.test_sock_connect_resolve_using_socket_params test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests.test_run_coroutine_threadsafe test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests.test_run_coroutine_threadsafe_with_timeout test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests.test_run_coroutine_threadsafe_task_cancelled test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests.test_run_coroutine_threadsafe_task_factory_exception --- Write this list into "tests" and run "python3 -m test --matchfile=tests". haypo at selma$ ./python -u -m test -v test_asyncio --matchfile=tests == CPython 3.7.0a0 (heads/concurrent_futures:f277fa3, Aug 21 2017, 18:11:41) [GCC 6.4.1 20170727 (Red Hat 6.4.1-1)] (...) test_create_connection_bluetooth (test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests) ... ok test_create_connection_no_inet_pton (test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests) ... Warning -- threading_cleanup() detected 4 leaked threads (count: 4, dangling: 5) ok test_create_connection_service_name (test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests) ... Warning -- threading_cleanup() detected 4 leaked threads (count: 4, dangling: 5) ok test_create_datagram_endpoint_no_addrinfo (test.test_asyncio.test_base_events.BaseEventLoopWithSelectorTests) ... Warning -- threading_cleanup() detected 1 leaked threads (count: 1, dangling: 2) ok test_wrap_future (test.test_asyncio.test_futures.CFutureTests) ... Warning -- threading_cleanup() detected 1 leaked threads (count: 1, dangling: 2) ok test_wrap_future_use_global_loop (test.test_asyncio.test_futures.CFutureTests) ... Warning -- threading_cleanup() detected 1 leaked threads (count: 1, dangling: 2) ok test_wrap_future (test.test_asyncio.test_futures.DuckTests) ... ok test_wrap_future (test.test_asyncio.test_futures.PyFutureTests) ... Warning -- threading_cleanup() detected 1 leaked threads (count: 1, dangling: 2) ok test_wrap_future_use_global_loop (test.test_asyncio.test_futures.PyFutureTests) ... Warning -- threading_cleanup() detected 1 leaked threads (count: 1, dangling: 2) ok test_sock_connect_resolve_using_socket_params (test.test_asyncio.test_selector_events.BaseSelectorEventLoopTests) ... Warning -- threading_cleanup() detected 1 leaked threads (count: 1, dangling: 2) ok test_run_coroutine_threadsafe (test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests) Test coroutine submission from a thread to an event loop. ... ok test_run_coroutine_threadsafe_task_cancelled (test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests) Test coroutine submission from a tread to an event loop ... ok test_run_coroutine_threadsafe_task_factory_exception (test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests) Test coroutine submission from a tread to an event loop ... Warning -- threading_cleanup() detected 1 leaked threads (count: 1, dangling: 2) ok test_run_coroutine_threadsafe_with_timeout (test.test_asyncio.test_tasks.RunCoroutineThreadsafeTests) Test coroutine submission from a thread to an event loop ... ok (...) ---------- components: Tests, asyncio messages: 300637 nosy: haypo, yselivanov priority: normal severity: normal status: open title: test_asyncio leaks dangling threads type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:34:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 16:34:16 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503333256.08.0.839396720724.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: test_asyncio: bpo-31250, "test_asyncio leaks dangling threads". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:35:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 16:35:06 +0000 Subject: [issue31247] test_xmlrpc leaks dangling threads In-Reply-To: <1503330533.41.0.899332710232.issue31247@psf.upfronthosting.co.za> Message-ID: <1503333306.11.0.878987048211.issue31247@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 12a3e343e1667f91c0095a9a7dc15048cb620e41 by Victor Stinner in branch '3.6': bpo-31247: xmlrpc.server: break reference cycle (#3166) (#3168) https://github.com/python/cpython/commit/12a3e343e1667f91c0095a9a7dc15048cb620e41 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:39:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 16:39:53 +0000 Subject: [issue31247] test_xmlrpc leaks dangling threads In-Reply-To: <1503330533.41.0.899332710232.issue31247@psf.upfronthosting.co.za> Message-ID: <1503333593.53.0.642587210137.issue31247@psf.upfronthosting.co.za> STINNER Victor added the comment: Bug fixed in Python 3.6 and 3.7 (master). Python 2.7 doesn't seem to be affected by the bug, since Exception.__traceback__ was only introduced in Python 3. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:44:10 2017 From: report at bugs.python.org (Ivan Chernov) Date: Mon, 21 Aug 2017 16:44:10 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear In-Reply-To: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> Message-ID: <1503333850.26.0.595073691635.issue31065@psf.upfronthosting.co.za> Changes by Ivan Chernov : ---------- pull_requests: +3205 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 12:45:27 2017 From: report at bugs.python.org (Ivan Chernov) Date: Mon, 21 Aug 2017 16:45:27 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear In-Reply-To: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> Message-ID: <1503333927.2.0.372470392987.issue31065@psf.upfronthosting.co.za> Ivan Chernov added the comment: Try to solve this issue, because it's pretty simple (: ---------- nosy: +vanadium23 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 13:09:22 2017 From: report at bugs.python.org (George Lane) Date: Mon, 21 Aug 2017 17:09:22 +0000 Subject: [issue31251] Diameter protocol in Python Message-ID: <1503335362.34.0.40856899205.issue31251@psf.upfronthosting.co.za> New submission from George Lane: Diameter protocol in Python ---------- components: Library (Lib) messages: 300643 nosy: George Lane priority: normal severity: normal status: open title: Diameter protocol in Python type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 13:19:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Aug 2017 17:19:10 +0000 Subject: [issue31236] improve some error messages of min() and max() In-Reply-To: <1503093079.31.0.160974520345.issue31236@psf.upfronthosting.co.za> Message-ID: <1503335950.57.0.860262381301.issue31236@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 58cf7488d5dcc8f47151d09fc1fa057b4dda563b by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31236: Improved some error messages of min() and max(). https://github.com/python/cpython/commit/58cf7488d5dcc8f47151d09fc1fa057b4dda563b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 13:19:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Aug 2017 17:19:59 +0000 Subject: [issue31236] improve some error messages of min() and max() In-Reply-To: <1503093079.31.0.160974520345.issue31236@psf.upfronthosting.co.za> Message-ID: <1503335999.07.0.349573178138.issue31236@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: -wrong error messages when too many kwargs are received resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 13:36:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Aug 2017 17:36:17 +0000 Subject: [issue31251] Diameter protocol in Python In-Reply-To: <1503335362.34.0.40856899205.issue31251@psf.upfronthosting.co.za> Message-ID: <1503336977.4.0.903514711821.issue31251@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Could you provide more information George? ---------- nosy: +serhiy.storchaka status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 13:37:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 21 Aug 2017 17:37:33 +0000 Subject: [issue31238] pydoc: ServerThread.stop() leaves a dangling thread In-Reply-To: <1503100245.68.0.356327779955.issue31238@psf.upfronthosting.co.za> Message-ID: <1503337053.63.0.113956906307.issue31238@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 13:39:26 2017 From: report at bugs.python.org (George Lane) Date: Mon, 21 Aug 2017 17:39:26 +0000 Subject: [issue31251] Diameter protocol in Python In-Reply-To: <1503336977.4.0.903514711821.issue31251@psf.upfronthosting.co.za> Message-ID: George Lane added the comment: Hi, ?can you tell me about Diameter protocol implemented by Python?, ?where can I found documentation and package for downloading? Best regards 2017-08-21 14:36 GMT-03:00 Serhiy Storchaka : > > Serhiy Storchaka added the comment: > > Could you provide more information George? > > ---------- > nosy: +serhiy.storchaka > status: open -> pending > > _______________________________________ > Python tracker > > _______________________________________ > ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 14:08:56 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 21 Aug 2017 18:08:56 +0000 Subject: [issue31251] Diameter protocol in Python In-Reply-To: <1503335362.34.0.40856899205.issue31251@psf.upfronthosting.co.za> Message-ID: <1503338936.58.0.226099098397.issue31251@psf.upfronthosting.co.za> R. David Murray added the comment: This isn't a help forum, it is a place for reporting bugs in Python. The kind of question you are asking is best asked on the python-list mailing list (see mail.python.org). ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed type: resource usage -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 14:44:28 2017 From: report at bugs.python.org (Samuel Naughton-Baldwin) Date: Mon, 21 Aug 2017 18:44:28 +0000 Subject: [issue21592] Make statistics.median run in linear time In-Reply-To: <1401279098.1.0.387904478686.issue21592@psf.upfronthosting.co.za> Message-ID: <1503341068.81.0.0148968764448.issue21592@psf.upfronthosting.co.za> Changes by Samuel Naughton-Baldwin : ---------- pull_requests: +3207 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 15:00:57 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 21 Aug 2017 19:00:57 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1503342057.27.0.11904636242.issue31243@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3208 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 15:02:17 2017 From: report at bugs.python.org (Ashish Nitin Patil) Date: Mon, 21 Aug 2017 19:02:17 +0000 Subject: [issue31252] Operator.itemgetter documentation should include dictionary keys example Message-ID: <1503342137.82.0.389505495838.issue31252@psf.upfronthosting.co.za> New submission from Ashish Nitin Patil: Current documentation lacks the example of usage with dictionary keys. e.g. `itemgetter('sample')({'sample': True, 'How about this': 'Nope'})` ---------- assignee: docs at python components: Documentation messages: 300648 nosy: ashishnitinpatil, docs at python priority: normal severity: normal status: open title: Operator.itemgetter documentation should include dictionary keys example type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 16:08:50 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 21 Aug 2017 20:08:50 +0000 Subject: [issue31237] test_gdb disables 25% of tests in optimized builds In-Reply-To: <1503099571.25.0.918465457775.issue31237@psf.upfronthosting.co.za> Message-ID: <1503346130.63.0.219092040673.issue31237@psf.upfronthosting.co.za> ?ukasz Langa added the comment: You're being vague, can you say which optimized builds and which data? As I mentioned, builds that actual users use are almost always compiled without --with-pydebug. That includes, say, the default RedHat python RPMs or the Debian DEBs that ship with those operating systems. It's not enough for us to run those tests only for --with-pydebug, as shown by bpo-30983, which wasn't discovered sooner because it only affects shared non-debug builds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 16:17:52 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 21 Aug 2017 20:17:52 +0000 Subject: [issue31237] test_gdb disables 25% of tests in optimized builds In-Reply-To: <1503099571.25.0.918465457775.issue31237@psf.upfronthosting.co.za> Message-ID: <1503346672.73.0.623772134053.issue31237@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think it's a surprise that reconstructing high-level program information from a debugger works less well on optimized builds. Perhaps Dave Malcolm has more precise information about what is supposed to to work and what is not. ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 17:18:44 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 21 Aug 2017 21:18:44 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1503350324.74.0.679905316064.issue23835@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- versions: -Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 17:24:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 21:24:26 +0000 Subject: [issue31249] test_concurrent_futures leaks dangling threads In-Reply-To: <1503331453.05.0.480625711508.issue31249@psf.upfronthosting.co.za> Message-ID: <1503350666.53.0.0834297583388.issue31249@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 489d91c61d02f401551966f1558ee2dc87fc0ad9 by Victor Stinner in branch 'master': bpo-31249: test_concurrent_futures checks dangling threads (#3167) https://github.com/python/cpython/commit/489d91c61d02f401551966f1558ee2dc87fc0ad9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 17:24:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 21:24:42 +0000 Subject: [issue31238] pydoc: ServerThread.stop() leaves a dangling thread In-Reply-To: <1503100245.68.0.356327779955.issue31238@psf.upfronthosting.co.za> Message-ID: <1503350682.64.0.968868803732.issue31238@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 4cab2cd0c05fcda5fcb128c9eb230253fff88c21 by Victor Stinner in branch 'master': bpo-31238: pydoc ServerThread.stop() now joins itself (#3151) https://github.com/python/cpython/commit/4cab2cd0c05fcda5fcb128c9eb230253fff88c21 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 17:38:57 2017 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 21 Aug 2017 21:38:57 +0000 Subject: [issue31237] test_gdb disables 25% of tests in optimized builds In-Reply-To: <1503099571.25.0.918465457775.issue31237@psf.upfronthosting.co.za> Message-ID: <1503351537.31.0.103489962134.issue31237@psf.upfronthosting.co.za> Dave Malcolm added the comment: The problem is that there are so many variables: * which version of which compiler * optimization flags * which version of gdb * which CPU architecture etc (and the compiler and/or gdb could be carrying patches from downstream distributors...) All of these can affect the debugging experience; as soon as optimizations are turned on it's very hard to predict exactly how well we can capture the frame information in the debugger. Hence it makes sense to skip these tests for optimized builds, to avoid creating noise in the buildbots. Downstream distributions might want to re-enable the tests, if they have sufficient control over the compiler and debugger versions that are in use, I guess. Or maybe there's a way to express some of the above sanely? Not sure. Hope this is constructive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 17:51:33 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 21:51:33 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1503352293.64.0.265328052744.issue30121@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 9a83f651f31b47b3f6c8b210f7807b26e8c373a5 by Victor Stinner in branch 'master': Add test_subprocess.test_nonexisting_with_pipes() (#3133) https://github.com/python/cpython/commit/9a83f651f31b47b3f6c8b210f7807b26e8c373a5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 17:53:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 21:53:14 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1503352394.01.0.842492869612.issue30121@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3209 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 17:55:14 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 21:55:14 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503352514.99.0.0811011142816.issue30871@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3210 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 17:55:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 21:55:15 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503352515.11.0.759871155811.issue31231@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3211 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 18:15:26 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 22:15:26 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1503353726.02.0.0270824354854.issue30121@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset e76cb435563cd14bb085942dfefbb469b8f40aa9 by Victor Stinner in branch '3.6': [3.6] bpo-30121: Fix debug assert in subprocess on Windows (#1224) (#3173) https://github.com/python/cpython/commit/e76cb435563cd14bb085942dfefbb469b8f40aa9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 18:17:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 22:17:17 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503353837.47.0.623443076758.issue31231@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 29d007bb670b486788f73c2d742b0ad0b679ff13 by Victor Stinner in branch '3.6': [3.6] bpo-30871: Add test.pythoninfo (#3174) https://github.com/python/cpython/commit/29d007bb670b486788f73c2d742b0ad0b679ff13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 18:17:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 22:17:17 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503353837.66.0.932498665092.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 29d007bb670b486788f73c2d742b0ad0b679ff13 by Victor Stinner in branch '3.6': [3.6] bpo-30871: Add test.pythoninfo (#3174) https://github.com/python/cpython/commit/29d007bb670b486788f73c2d742b0ad0b679ff13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 18:24:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 22:24:54 +0000 Subject: [issue30121] Windows: subprocess debug assertion on failure to execute the process In-Reply-To: <1492728235.69.0.898513798091.issue30121@psf.upfronthosting.co.za> Message-ID: <1503354294.06.0.000790666195616.issue30121@psf.upfronthosting.co.za> STINNER Victor added the comment: Python 2.7 doesn't seem to be affected by this issue. Extract of Popen.__init__: try: self._execute_child(args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, to_close, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite) except Exception: # Preserve original exception in case os.close raises. exc_type, exc_value, exc_trace = sys.exc_info() for fd in to_close: try: if mswindows: fd.Close() else: os.close(fd) except EnvironmentError: pass On Windows, fd.Close() is always used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 18:37:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 22:37:45 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503355065.42.0.876774243217.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, pythoninfo is now enabled on Python 3.6 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 18:46:36 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 21 Aug 2017 22:46:36 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1503355596.0.0.150045854888.issue23835@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset 44e6ad87340d50f48daf53b6a61138377d0d0d10 by ?ukasz Langa (James Tocknell) in branch 'master': bpo-23835: Enforce that configparser defaults are strings (#2558) https://github.com/python/cpython/commit/44e6ad87340d50f48daf53b6a61138377d0d0d10 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 18:56:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 22:56:05 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503356165.22.0.96160974018.issue30871@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3212 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 18:56:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 21 Aug 2017 22:56:05 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503356165.58.0.430061301907.issue31231@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3213 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 19:16:06 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 21 Aug 2017 23:16:06 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1503357366.2.0.318805937794.issue23835@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- pull_requests: +3214 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 19:23:40 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 21 Aug 2017 23:23:40 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1503357820.82.0.570324297542.issue23835@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset ea57923e89aa4a1bde1d4fa1de7d6eacff603683 by ?ukasz Langa in branch 'master': bpo-23835: [docs] configparser converts defaults to strings (#3176) https://github.com/python/cpython/commit/ea57923e89aa4a1bde1d4fa1de7d6eacff603683 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 19:40:31 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 21 Aug 2017 23:40:31 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1503358831.8.0.727861828848.issue30983@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset 5fe59f8e3a0a56a155c18f9d581205ec533764b6 by ?ukasz Langa in branch 'master': bpo-30983: [gdb] Fix py-bt, etc. for non-debug shared builds (#3153) https://github.com/python/cpython/commit/5fe59f8e3a0a56a155c18f9d581205ec533764b6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 21:40:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 01:40:30 +0000 Subject: [issue31231] Travis CI mac test broken: ./python: is a directory In-Reply-To: <1503038327.43.0.708294572666.issue31231@psf.upfronthosting.co.za> Message-ID: <1503366030.7.0.272803931658.issue31231@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cce1cb9180dd9143c5b2ce094a52c555b42c7aa8 by Victor Stinner in branch '2.7': bpo-30871: Add test.pythoninfo (#3174) (#3175) https://github.com/python/cpython/commit/cce1cb9180dd9143c5b2ce094a52c555b42c7aa8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 21:40:30 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 01:40:30 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503366030.9.0.853334025468.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cce1cb9180dd9143c5b2ce094a52c555b42c7aa8 by Victor Stinner in branch '2.7': bpo-30871: Add test.pythoninfo (#3174) (#3175) https://github.com/python/cpython/commit/cce1cb9180dd9143c5b2ce094a52c555b42c7aa8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 22:35:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 02:35:49 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503369349.01.0.481805191313.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: I also added pythoninfo to Python 2.7. I made minor adjustements for Python 2.7, like accept (int, long) for integers, remove info only available on Python 3, and add sys.maxint. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 23:32:07 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 Aug 2017 03:32:07 +0000 Subject: [issue31252] Operator.itemgetter documentation should include dictionary keys example In-Reply-To: <1503342137.82.0.389505495838.issue31252@psf.upfronthosting.co.za> Message-ID: <1503372727.48.0.0154407586467.issue31252@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Yes, we can add a dictionary example. I will likely split it into two lines for clarity. Perhaps something like: >>> soldier = dict(rank='captain', name='dotterbart') >>> itemgetter('rank')(soldier) 'captain' ---------- assignee: docs at python -> rhettinger nosy: +rhettinger versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 21 23:44:32 2017 From: report at bugs.python.org (Constantine Ketskalo) Date: Tue, 22 Aug 2017 03:44:32 +0000 Subject: [issue31244] Shortcuts bug in Python IDLE In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503373472.56.0.219256986688.issue31244@psf.upfronthosting.co.za> Constantine Ketskalo added the comment: You must be kidding me? I know that it's possible to use it via menu. And my speed of software development will be 3 times slower. Great! If this was a bug in Windows then why the heck it works perfectly in any other program including Python when I switch language to English? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 02:17:05 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 22 Aug 2017 06:17:05 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503382625.35.0.250654477008.issue31095@psf.upfronthosting.co.za> INADA Naoki added the comment: > Maybe it would help to have a short comment, maybe with a link to this issue, on each PyObject_GC_UnTrack(). Is this looks good to you? /* UnTrack is needed before calling any callbacks (bpo-31095) */ PyObject_GC_UnTrack(self); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 02:21:20 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 22 Aug 2017 06:21:20 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503382879.99.0.296459548292.issue31095@psf.upfronthosting.co.za> INADA Naoki added the comment: BTW, should this backported to Python 3.5? ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 03:26:57 2017 From: report at bugs.python.org (Andrew Wall) Date: Tue, 22 Aug 2017 07:26:57 +0000 Subject: [issue31253] Python fails to parse commented out code Message-ID: <1503386817.16.0.0892558869333.issue31253@psf.upfronthosting.co.za> New submission from Andrew Wall: Python can parse and run this code: log = list(r'..\Unknown\*.txt') but not this: ''' log = list(r'..\Unknown\*.txt') ''' ---------- components: Interpreter Core messages: 300670 nosy: quamrana priority: normal severity: normal status: open title: Python fails to parse commented out code type: compile error versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 03:31:12 2017 From: report at bugs.python.org (Antony Lee) Date: Tue, 22 Aug 2017 07:31:12 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ Message-ID: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> New submission from Antony Lee: The following example, which raises a KeyError, shows that in a WeakKeyDictionary subclass that defines __missing__, that method doesn't get called. from weakref import WeakKeyDictionary class WeakKeyDictionaryWithMissing(WeakKeyDictionary): __missing__ = lambda: print("hello") class C: pass d = WeakKeyDictionaryWithMissing() d[C()] This behavior is technically OK, as object.__missing__ is only documented in the datamodel to be called for dict subclasses, and WeakKeyDictionary is actually not a subclass of dict, but of MutableMapping. Still, it would seem preferable if either WeakKeyDictionary did use __missing__, or perhaps, more reasonably, Mapping.__getitem__ did so. (Or, at least, if the WeakKeyDictionary class clearly stated that it does not inherit from dict. Note that the docs start with "Mapping class that references keys weakly. Entries in the *dictionary* etc." (emphasis mine)) ---------- components: Library (Lib) messages: 300671 nosy: Antony.Lee priority: normal severity: normal status: open title: WeakKeyDictionary/Mapping doesn't call __missing__ versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 03:40:09 2017 From: report at bugs.python.org (=?utf-8?b?5p2O5piO5a6H?=) Date: Tue, 22 Aug 2017 07:40:09 +0000 Subject: [issue31255] Test getrandom before using it Message-ID: <1503387609.26.0.161780447873.issue31255@psf.upfronthosting.co.za> New submission from ???: If a GNU/Linux system has glibc-2.25 and Fatal Python error: getentropy() failed strace gives > syscall_318(0x7f369b1535d0, 0x18, 0, 0x13e, 0x7f369b1535d0, 0x7f369b1535e8) = -1 (errno 38) The glibc developers regard testing the usability of a syscall to be a task of python build system. Besides AC_TEST_FUNCS(... getentropy ...) which only test whether getentropy is defined in the system, runtime checks in configure is needed. ---------- messages: 300672 nosy: ??? priority: normal severity: normal status: open title: Test getrandom before using it type: compile error versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 04:01:08 2017 From: report at bugs.python.org (bastik) Date: Tue, 22 Aug 2017 08:01:08 +0000 Subject: [issue31256] xml.etree.ElementTree: add support for doctype in tostring method Message-ID: <1503388868.57.0.0239596264981.issue31256@psf.upfronthosting.co.za> New submission from bastik: When trying to generate an XML file with 'xml.etree.ElementTree', there is no way to specify a doctype (example below). The 'xml.etree.ElementTree.ElementTree.write' method has a 'xml_declaration' flag, which can be used as workaround, but there is no such flag for 'xml.etree.ElementTree.tostring' (and it is not always desirable to write the XML document directly to file). Please compare the corresponding flags in lxml. Here is an example for a document I would like to generate and convert to string: text ---------- components: XML messages: 300673 nosy: bastik priority: normal severity: normal status: open title: xml.etree.ElementTree: add support for doctype in tostring method type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 04:14:21 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Tue, 22 Aug 2017 08:14:21 +0000 Subject: [issue31253] Python fails to parse commented out code In-Reply-To: <1503386817.16.0.0892558869333.issue31253@psf.upfronthosting.co.za> Message-ID: <1503389661.04.0.0839067146181.issue31253@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: That's because it is not commented code, it is a multiline string literal. And it is not raw, so \Un... is just an error, since n is not a valid hexadecimal digit. In the first code, \Un... is inside a raw string so it is read literally. There is nothing to fix here. If you really want to continue confusing string literals and comments, you'll have to use r'''...''' to be a bit more general for this case. ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 04:24:07 2017 From: report at bugs.python.org (Andrew Wall) Date: Tue, 22 Aug 2017 08:24:07 +0000 Subject: [issue31253] Python fails to parse commented out code In-Reply-To: <1503386817.16.0.0892558869333.issue31253@psf.upfronthosting.co.za> Message-ID: <1503390247.98.0.205916541912.issue31253@psf.upfronthosting.co.za> Andrew Wall added the comment: My lazy way of programming is to piece together lines of code, going round and round commenting and uncommenting sections until I get something that works. My new lazy way of commenting out larger chunks of code will be: r''' ... several lines of code here ... ''' ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 04:33:54 2017 From: report at bugs.python.org (Benda Xu) Date: Tue, 22 Aug 2017 08:33:54 +0000 Subject: [issue31255] Test getrandom before using it In-Reply-To: <1503387609.26.0.161780447873.issue31255@psf.upfronthosting.co.za> Message-ID: <1503390834.0.0.815805019122.issue31255@psf.upfronthosting.co.za> Changes by Benda Xu : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 04:34:39 2017 From: report at bugs.python.org (Benda Xu) Date: Tue, 22 Aug 2017 08:34:39 +0000 Subject: [issue31255] Test getrandom before using it In-Reply-To: <1503387609.26.0.161780447873.issue31255@psf.upfronthosting.co.za> Message-ID: <1503390879.32.0.347985715697.issue31255@psf.upfronthosting.co.za> Changes by Benda Xu : ---------- components: +Build _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 04:41:13 2017 From: report at bugs.python.org (Benda Xu) Date: Tue, 22 Aug 2017 08:41:13 +0000 Subject: [issue31255] Test getrandom before using it In-Reply-To: <1503387609.26.0.161780447873.issue31255@psf.upfronthosting.co.za> Message-ID: <1503391273.14.0.573134897287.issue31255@psf.upfronthosting.co.za> Changes by Benda Xu : ---------- versions: -Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 04:59:26 2017 From: report at bugs.python.org (Benda Xu) Date: Tue, 22 Aug 2017 08:59:26 +0000 Subject: [issue31255] Test getrandom before using it In-Reply-To: <1503387609.26.0.161780447873.issue31255@psf.upfronthosting.co.za> Message-ID: <1503392366.14.0.693165528648.issue31255@psf.upfronthosting.co.za> Benda Xu added the comment: This is a continuation of http://bugs.python.org/issue29157#msg288291. ---------- nosy: +Vladim?r ?un?t, christian.heimes versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 05:14:06 2017 From: report at bugs.python.org (Christian Heimes) Date: Tue, 22 Aug 2017 09:14:06 +0000 Subject: [issue31255] Test getrandom before using it In-Reply-To: <1503387609.26.0.161780447873.issue31255@psf.upfronthosting.co.za> Message-ID: <1503393246.05.0.488864733712.issue31255@psf.upfronthosting.co.za> Christian Heimes added the comment: Does it only affect Python 3.4 and 3.5? Both versions are in security fix-only mode and no longer receive other fixes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 05:20:16 2017 From: report at bugs.python.org (Louie Lu) Date: Tue, 22 Aug 2017 09:20:16 +0000 Subject: [issue31244] Shortcuts bug in Python IDLE In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503393616.58.0.262035412.issue31244@psf.upfronthosting.co.za> Louie Lu added the comment: Hi, so you are using Windows built-in IEM with Ukrainian input method. And in this situation, you cannot use Ctrl+Z, Ctrl+V ..etc. right? ---------- nosy: +louielu _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 05:42:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 09:42:53 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503394973.05.0.295961457794.issue31095@psf.upfronthosting.co.za> STINNER Victor added the comment: > /* UnTrack is needed before calling any callbacks (bpo-31095) */ LGTM. I suggest /* bpo-31095: UnTrack is needed before calling any callbacks */ which is a little bit shorter, but it's up to you ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 05:57:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 09:57:15 +0000 Subject: [issue31238] pydoc: ServerThread.stop() leaves a dangling thread In-Reply-To: <1503100245.68.0.356327779955.issue31238@psf.upfronthosting.co.za> Message-ID: <1503395835.35.0.222521212479.issue31238@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3215 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 06:05:57 2017 From: report at bugs.python.org (Benda Xu) Date: Tue, 22 Aug 2017 10:05:57 +0000 Subject: [issue31255] Test getrandom before using it In-Reply-To: <1503387609.26.0.161780447873.issue31255@psf.upfronthosting.co.za> Message-ID: <1503396357.41.0.482731009317.issue31255@psf.upfronthosting.co.za> Benda Xu added the comment: > Does it only affect Python 3.4 and 3.5? Both versions are in security fix-only mode and no longer receive other fixes. Sorry I haven't noticed that there are two new releases this month Python 3.4.7 and 3.5.4. The test build results are: 3.4.7 fail 3.4.6 fail 3.5.4 success 3.5.3 fail 3.6.1 success I will remove the python 3.5 version tag. Looks like Python 3.5 got this compatibility fix in time before entering security update phase. But python 3.4 did not, making it incompatible with glibc-2.25 on old linux kernels. ---------- versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 06:21:32 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Aug 2017 10:21:32 +0000 Subject: [issue30159] gdb autoloading python-gdb.py In-Reply-To: <1493123460.02.0.558737612722.issue30159@psf.upfronthosting.co.za> Message-ID: <1503397292.31.0.290851148201.issue30159@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 06:41:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 10:41:00 +0000 Subject: [issue31249] test_concurrent_futures leaks dangling threads In-Reply-To: <1503331453.05.0.480625711508.issue31249@psf.upfronthosting.co.za> Message-ID: <1503398460.67.0.306087525057.issue31249@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3216 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 07:17:17 2017 From: report at bugs.python.org (Bienkowski Andrey) Date: Tue, 22 Aug 2017 11:17:17 +0000 Subject: [issue737999] minor codeop fixes Message-ID: <1503400637.36.0.980770827276.issue737999@psf.upfronthosting.co.za> Changes by Bienkowski Andrey : ---------- pull_requests: +3217 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 07:49:30 2017 From: report at bugs.python.org (Benda Xu) Date: Tue, 22 Aug 2017 11:49:30 +0000 Subject: [issue31255] Test getrandom before using it In-Reply-To: <1503387609.26.0.161780447873.issue31255@psf.upfronthosting.co.za> Message-ID: <1503402570.23.0.623808722005.issue31255@psf.upfronthosting.co.za> Changes by Benda Xu : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 07:50:23 2017 From: report at bugs.python.org (Constantine Ketskalo) Date: Tue, 22 Aug 2017 11:50:23 +0000 Subject: [issue31244] Shortcuts bug in Python IDLE In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503402623.56.0.799978717502.issue31244@psf.upfronthosting.co.za> Constantine Ketskalo added the comment: Louie Lu, yes, I'm using Windows. But, sorry, what is IEM? I'm currently using native Python IDLE. Right click to .py file and "Edit with IDLE". However I'm starting to think about switching to Visual Studio, even though it's huge and slower... Yes, I'm using both latin and cyrillic characters, and if just finished typing some string in Ukrainian, combinations Ctrl + Z/X/C/V/F/G/H/S, also Alt + G: they just don't work. Only if I switch back to English. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 08:26:54 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 12:26:54 +0000 Subject: [issue31257] importlib race condition Message-ID: <1503404814.17.0.5568940572.issue31257@psf.upfronthosting.co.za> New submission from STINNER Victor: While stressing the system to get system load of at least 5 (I have 4 logical CPUs), I got an import error whereas the module exists. See recent changes to fix race conditions in importlib: * bpo-30891: commit e72b1359f81d1dd42bd8a5c5cc2b3928b74f8023 * bpo-30891: commit 4f9a446f3fb42f800e73cd9414dd1eccb3ca4fa7 * bpo-31070: commit 9b0d1d647e3d2ec9d299e5c9f49b02fbbb810a5a * bpo-30814: commit b4baacee1adc06edbe30ac7574d17a8cd168e2e0 * ... I used my system_load.py script to stress my Linux: https://github.com/haypo/misc/blob/master/bin/system_load.py haypo at selma$ ./python -m test -r --randseed=7323369 -R 3:3 -j2 -m test.test_robotparser.PasswordProtectedSiteTestCase.testPasswordProtectedSite test_robotparser test_robotparser test_robotparser test_robotparsertest_robotparser test_robotparser test_robotparser test_robotparser Using random seed 7323369 Run tests in parallel using 2 child processes 0:00:01 load avg: 9.05 [1/7] test_robotparser passed beginning 6 repetitions 123456 ...... 0:00:01 load avg: 9.05 [2/7] test_robotparser passed beginning 6 repetitions 123456 ...... 0:00:02 load avg: 10.33 [3/7] test_robotparser passed beginning 6 repetitions 123456 ...... 0:00:02 load avg: 10.33 [4/7] test_robotparser passed beginning 6 repetitions 123456 ...... 0:00:03 load avg: 10.33 [5/7/1] test_robotparsertest_robotparser failed test test_robotparsertest_robotparser crashed -- Traceback (most recent call last): File "/home/haypo/prog/python/master/Lib/test/libregrtest/runtest.py", line 163, in runtest_inner the_module = importlib.import_module(abstest) File "/home/haypo/prog/python/master/Lib/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 994, in _gcd_import File "", line 971, in _find_and_load File "", line 953, in _find_and_load_unlocked ModuleNotFoundError: No module named 'test.test_robotparsertest_robotparser' 0:00:03 load avg: 10.33 [6/7/1] test_robotparser passed beginning 6 repetitions 123456 ...... 0:00:04 load avg: 10.33 [7/7/1] test_robotparser passed beginning 6 repetitions 123456 ...... 6 tests OK. 1 test failed: test_robotparsertest_robotparser Total duration: 4 sec Tests result: FAILURE ---------- messages: 300686 nosy: brett.cannon, eric.snow, haypo, ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: importlib race condition _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 08:27:14 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Aug 2017 12:27:14 +0000 Subject: [issue31244] Shortcuts bug in Python IDLE In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503404834.62.0.742615747095.issue31244@psf.upfronthosting.co.za> Terry J. Reedy added the comment: IDLE's involvement with cut, copy, and paste is to tell the tcl/tk GUI framework what keys to associate with the operations. The keys depend on the OS-specific defaults or the keyset chosen by the user. The actual operation on the Text widget is carried out by tk, in response to events it gets from the OS. IME = Input Method Editor. I just watched ^C and ^V work on Windows with Window's Japanese IME. I properly closed this as an IDLE issue. Serhiy, do you know anything about Windows' built-in Cyrillic IMEs and control key combinations? ---------- assignee: terry.reedy -> nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 08:27:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Aug 2017 12:27:29 +0000 Subject: [issue31244] Shortcuts bug in Python IDLE In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503404849.83.0.0174351599849.issue31244@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: -IDLE _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 08:29:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 12:29:57 +0000 Subject: [issue31257] importlib race condition In-Reply-To: <1503404814.17.0.5568940572.issue31257@psf.upfronthosting.co.za> Message-ID: <1503404997.51.0.942178792472.issue31257@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Interpreter Core versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 08:38:56 2017 From: report at bugs.python.org (Oren Milman) Date: Tue, 22 Aug 2017 12:38:56 +0000 Subject: [issue31229] wrong error messages when too many kwargs are received In-Reply-To: <1502992936.21.0.653436354644.issue31229@psf.upfronthosting.co.za> Message-ID: <1503405536.61.0.391311103628.issue31229@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3218 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 08:41:18 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 12:41:18 +0000 Subject: [issue31257] importlib race condition In-Reply-To: <1503404814.17.0.5568940572.issue31257@psf.upfronthosting.co.za> Message-ID: <1503405678.05.0.992036400651.issue31257@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, please ignore my issue. It's a typo in my command line, missing space ;-) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 09:06:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 13:06:50 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1503407210.25.0.53701100002.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: I succeeded to reproduce a leak on the x86 Gentoo Refleaks 3.x buildbot using the following command. I'm unable to reproduce the bug on my Fedora 25. pydev at stormageddon ~/cpython $ ./python -m test -R 3:3 -j1 -m test.test_code.CoExtra.test_free_different_thread test_code -F Run tests in parallel using 1 child processes 0:00:00 load avg: 2.26 [ 1/1] test_code failed beginning 6 repetitions 123456 ...... test_code leaked [1, 1, 1] memory blocks, sum=3 0:00:01 load avg: 2.26 [ 2/2] test_code failed beginning 6 repetitions 123456 ...... test_code leaked [1, 1, 1] memory blocks, sum=3 2 tests failed: test_code test_code Total duration: 2 sec Tests result: FAILURE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 09:17:19 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 22 Aug 2017 13:17:19 +0000 Subject: [issue31253] Python fails to parse triple quoted (commented out) code In-Reply-To: <1503386817.16.0.0892558869333.issue31253@psf.upfronthosting.co.za> Message-ID: <1503407839.4.0.37392915932.issue31253@psf.upfronthosting.co.za> R. David Murray added the comment: Just FYI, Vedran, almost everyone gets this one wrong :) I too once thought that triple quoted text used as comments was bad style, but in fact I learned they are an accepted way in Python to do multiline comments. Accepted by Guido, at least: https://sgillies.net/2017/05/30/python-multi-line-comments-and-triple-quoted-strings.html :) It is not a common practice, though, in my observation, since most code editors support automatically prefixing and unprefixing a block with '#' characters, and highlight such blocks as comments while they do not highlight strings used as comments as comments. It is an interesting observation that to use it to comment out a block of code one should use the raw string version. Hopefully the existence of this issue will make that slightly more discoverable. ---------- nosy: +r.david.murray title: Python fails to parse commented out code -> Python fails to parse triple quoted (commented out) code _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 09:19:59 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 22 Aug 2017 13:19:59 +0000 Subject: [issue31253] Python fails to parse triple quoted (commented out) code In-Reply-To: <1503386817.16.0.0892558869333.issue31253@psf.upfronthosting.co.za> Message-ID: <1503407999.41.0.910195410522.issue31253@psf.upfronthosting.co.za> R. David Murray added the comment: And being "accepted" does not change the fact that one needs to be aware of the fact that syntactically they are string literals and not syntactic comments. Which was your point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 09:58:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 13:58:19 +0000 Subject: [issue31249] test_concurrent_futures leaks dangling threads In-Reply-To: <1503331453.05.0.480625711508.issue31249@psf.upfronthosting.co.za> Message-ID: <1503410299.75.0.958770296937.issue31249@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:04:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:04:34 +0000 Subject: [issue31255] Test getrandom before using it In-Reply-To: <1503387609.26.0.161780447873.issue31255@psf.upfronthosting.co.za> Message-ID: <1503410674.74.0.426730547414.issue31255@psf.upfronthosting.co.za> STINNER Victor added the comment: If I understand correctly, Python 3.4 and 3.5 simply don't work on Linux < 3.17 with glibc >= 2.25. The question is which OS make such change. It seems like the issue is more with binary packages when the builder is older or newer than the OS used by end users. Since the bug prevents to start Python and cannot be worked again, maybe we need to fix Python 3.4... *but* this branch becomes old, Python 3.5 recently reached the security fixes only. The pratical issue is that my changes os Python/random.c are large. I refactored the code to fix different issues. I suggest to fix how binary packages are compiled, upgrade to Python 3.5 or newer, and more generally try to avoid the bad version combo (Linux < 3.17 with glibc >= 2.25) ;-) I wrote articles on my os.urandom() changes: * https://haypo.github.io/pep-524-os-urandom-blocking.html * https://haypo.github.io/contrib-cpython-2017q1.html ? os.urandom() and getrandom() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:06:54 2017 From: report at bugs.python.org (Constantine Ketskalo) Date: Tue, 22 Aug 2017 14:06:54 +0000 Subject: [issue31244] Shortcuts bug in Python IDLE In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503410814.67.0.889483442646.issue31244@psf.upfronthosting.co.za> Constantine Ketskalo added the comment: Terry J. Reedy, Japaneese has no cyrillic characters, it's alphabet consists of hieroglyphs and it has nothing to do with Ukrainian even if it looks the same for you. "about Windows' built-in Cyrillic IMEs and control key combinations?" In depth - no. I'm just using them and I know that Python is the only program I've ever met that doesn't exept same combinations with Ukrainian or Russian language on. If you want to test what I'm talking about - just temporary add to your languages on your PC Ukrainian language, open Python IDLE and try any shortcuts while input language is Ukrainian. Cyrillic characters can have sometimes problems with encoding, because they are not included to default ASCII table, only to extended versionis. Could that be a reason? Or I just don't understand something? If not, please explain or give me a link or tip where can I find out what's goind on and who can fix it. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:08:23 2017 From: report at bugs.python.org (Constantine Ketskalo) Date: Tue, 22 Aug 2017 14:08:23 +0000 Subject: [issue31244] Shortcuts bug in Python IDLE In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503410903.29.0.423853027289.issue31244@psf.upfronthosting.co.za> Constantine Ketskalo added the comment: *versionis = versions ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:23:34 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 22 Aug 2017 14:23:34 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1503411814.67.0.426510162555.issue31024@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3219 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:36:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:36:08 +0000 Subject: [issue31258] [2.7] Enhance support reap_children() and threading_cleanup() Message-ID: <1503412568.83.0.450478678857.issue31258@psf.upfronthosting.co.za> New submission from STINNER Victor: Backport reap_children() and threading_cleanup() enhancements from master to 2.7 to make tests more reliables, reduce random failures on Python CIs. ---------- components: Tests messages: 300695 nosy: haypo priority: normal severity: normal status: open title: [2.7] Enhance support reap_children() and threading_cleanup() versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:38:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:38:05 +0000 Subject: [issue31258] [2.7] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503412568.83.0.450478678857.issue31258@psf.upfronthosting.co.za> Message-ID: <1503412685.65.0.433890840058.issue31258@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3220 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:39:07 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:39:07 +0000 Subject: [issue31258] [2.7] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503412568.83.0.450478678857.issue31258@psf.upfronthosting.co.za> Message-ID: <1503412747.65.0.309437163213.issue31258@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3221 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:40:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:40:57 +0000 Subject: [issue31258] [2.7] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503412568.83.0.450478678857.issue31258@psf.upfronthosting.co.za> Message-ID: <1503412857.89.0.0972354918158.issue31258@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3222 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:46:20 2017 From: report at bugs.python.org (diana) Date: Tue, 22 Aug 2017 14:46:20 +0000 Subject: [issue2506] Add mechanism to disable optimizations In-Reply-To: <1206797921.05.0.258043023613.issue2506@psf.upfronthosting.co.za> Message-ID: <1503413180.71.0.243338934377.issue2506@psf.upfronthosting.co.za> Changes by diana : ---------- nosy: +diana _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:48:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:48:34 +0000 Subject: [issue31258] [2.7] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503412568.83.0.450478678857.issue31258@psf.upfronthosting.co.za> Message-ID: <1503413314.4.0.484557743252.issue31258@psf.upfronthosting.co.za> STINNER Victor added the comment: Using PR 3182, test_socketserver fails with --fail-env-changed because of bpo-31151 "socketserver.ForkingMixIn.server_close() leaks zombie processes". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:50:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:50:45 +0000 Subject: [issue31249] test_concurrent_futures leaks dangling threads In-Reply-To: <1503331453.05.0.480625711508.issue31249@psf.upfronthosting.co.za> Message-ID: <1503413445.61.0.807138130388.issue31249@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset bc61315377056fe362b744d9c44e17cd3178ce54 by Victor Stinner in branch 'master': bpo-31249: Fix ref cycle in ThreadPoolExecutor (#3178) https://github.com/python/cpython/commit/bc61315377056fe362b744d9c44e17cd3178ce54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:51:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:51:12 +0000 Subject: [issue31258] [2.7] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503412568.83.0.450478678857.issue31258@psf.upfronthosting.co.za> Message-ID: <1503413471.99.0.49158969921.issue31258@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 1460ce5a9325690d8a1913c296a9bba437ff0f39 by Victor Stinner in branch '2.7': bpo-31258: test_signal: call waitpid() to prevent zombie process (#3183) https://github.com/python/cpython/commit/1460ce5a9325690d8a1913c296a9bba437ff0f39 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:51:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:51:23 +0000 Subject: [issue31258] [2.7] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503412568.83.0.450478678857.issue31258@psf.upfronthosting.co.za> Message-ID: <1503413483.0.0.220263061102.issue31258@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 02e03672e6766b1da847b1635982a70346780744 by Victor Stinner in branch '2.7': bpo-31258: test_urllib2_localnet uses addCleanup(server.stop) (#3184) https://github.com/python/cpython/commit/02e03672e6766b1da847b1635982a70346780744 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:53:06 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:53:06 +0000 Subject: [issue31259] [3.6] Enhance support reap_children() and threading_cleanup() Message-ID: <1503413586.26.0.662095689215.issue31259@psf.upfronthosting.co.za> New submission from STINNER Victor: Backport reap_children() and threading_cleanup() enhancements from master to 3.6 to make tests more reliables, reduce random failures on Python CIs. See also bpo-31258 for Python 2.7 ---------- components: Tests messages: 300700 nosy: haypo priority: normal severity: normal status: open title: [3.6] Enhance support reap_children() and threading_cleanup() versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:53:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:53:47 +0000 Subject: [issue31259] [3.6] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503413586.26.0.662095689215.issue31259@psf.upfronthosting.co.za> Message-ID: <1503413627.19.0.956639393574.issue31259@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3223 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:55:52 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:55:52 +0000 Subject: [issue31238] pydoc: ServerThread.stop() leaves a dangling thread In-Reply-To: <1503100245.68.0.356327779955.issue31238@psf.upfronthosting.co.za> Message-ID: <1503413752.75.0.634096123263.issue31238@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:57:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:57:00 +0000 Subject: [issue31238] pydoc: ServerThread.stop() leaves a dangling thread In-Reply-To: <1503100245.68.0.356327779955.issue31238@psf.upfronthosting.co.za> Message-ID: <1503413820.77.0.963642191162.issue31238@psf.upfronthosting.co.za> STINNER Victor added the comment: I left Python 2.7 and 3.6 unchanged to focus on fixing dangling threads and other similar bugs in the master branch first. I will see later if we really need to backport the fix to stable branches. In the meanwhile, I close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 10:59:12 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 14:59:12 +0000 Subject: [issue31259] [3.6] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503413586.26.0.662095689215.issue31259@psf.upfronthosting.co.za> Message-ID: <1503413952.01.0.751249878475.issue31259@psf.upfronthosting.co.za> STINNER Victor added the comment: At this point, I'm not sure that I want to make threading_cleanup() stricter, since it's tricky to fix all dangling threads in all tests. At least, I opened an issue for 3.6 as a placeholder if we need to backport a few fixes. See also bpo-31234 where I already backported a few fixes to 3.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 11:05:25 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 15:05:25 +0000 Subject: [issue31258] [2.7] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503412568.83.0.450478678857.issue31258@psf.upfronthosting.co.za> Message-ID: <1503414325.0.0.215603551729.issue31258@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3224 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 11:06:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 15:06:28 +0000 Subject: [issue31259] [3.6] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503413586.26.0.662095689215.issue31259@psf.upfronthosting.co.za> Message-ID: <1503414388.38.0.865616208938.issue31259@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3225 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 11:07:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 15:07:03 +0000 Subject: [issue31258] [2.7] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503412568.83.0.450478678857.issue31258@psf.upfronthosting.co.za> Message-ID: <1503414423.91.0.345772740292.issue31258@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: -3224 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 11:17:27 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 15:17:27 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503415047.59.0.988408305316.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: Crap, everything is fine on all CIs... except of a single Windows buildbot using Visual Studio 2010 which doesn't produce the required python.bat: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%20VS9.0%202.7/builds/187/steps/pythoninfo/logs/stdio ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 11:18:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 15:18:17 +0000 Subject: [issue31260] [2.7] Enhance PC/VS9.0/ project to produce python.bat, as PCbuild/ Message-ID: <1503415097.55.0.681149951058.issue31260@psf.upfronthosting.co.za> New submission from STINNER Victor: It would be nice to have a python.bat script produced by the PC/VS9.0/ project, as done by the PCbuild/ project. It would fix the newly added buildbot step "pythoninfo": https://bugs.python.org/issue30871#msg300703 Without python.bat, it's not easy to get the path to the Python executable from the buildbot configuration. ---------- components: Build, Windows messages: 300704 nosy: haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: [2.7] Enhance PC/VS9.0/ project to produce python.bat, as PCbuild/ versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 11:35:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 15:35:50 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503416150.75.0.544199493056.issue31234@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3226 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 11:46:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 15:46:23 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503416783.99.0.331247728638.issue31234@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3227 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 11:50:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 15:50:36 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503417036.22.0.0607945423075.issue31234@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3228 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 11:52:57 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 15:52:57 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503417177.1.0.972104346799.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-31260: [2.7] Enhance PC/VS9.0/ project to produce python.bat, as PCbuild/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 12:03:08 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 16:03:08 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503417788.0.0.909902186683.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 5f20539ee5c6e3f1da23e8fc31ba519a3d078c79 by Victor Stinner in branch '3.6': bpo-31234: fork_wait tests now join threads (#3139) (#3187) https://github.com/python/cpython/commit/5f20539ee5c6e3f1da23e8fc31ba519a3d078c79 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 12:03:40 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 16:03:40 +0000 Subject: [issue31259] [3.6] Enhance support reap_children() and threading_cleanup() In-Reply-To: <1503413586.26.0.662095689215.issue31259@psf.upfronthosting.co.za> Message-ID: <1503417820.42.0.136533924139.issue31259@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 468534d92f6879e925c4cd8a228ea300abfb7e4d by Victor Stinner in branch '3.6': bpo-31259: test_urllib2_localnet uses addCleanup(server.stop) (#3186) https://github.com/python/cpython/commit/468534d92f6879e925c4cd8a228ea300abfb7e4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 12:05:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 16:05:09 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503417909.9.0.972489507204.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 830d7d2936434ace113822294acce82f62cde41b by Victor Stinner in branch 'master': bpo-31234: test_httpservers joins the server thread (#3188) https://github.com/python/cpython/commit/830d7d2936434ace113822294acce82f62cde41b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 12:05:34 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 16:05:34 +0000 Subject: [issue31234] Make support.threading_cleanup() stricter In-Reply-To: <1503076378.29.0.950087882836.issue31234@psf.upfronthosting.co.za> Message-ID: <1503417934.84.0.23670874492.issue31234@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 41bbd82b6b6a887e893974fa5cdaae7782ae6cac by Victor Stinner in branch 'master': bpo-31234: test_threaded_import: fix test_side_effect_import() (#3189) https://github.com/python/cpython/commit/41bbd82b6b6a887e893974fa5cdaae7782ae6cac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 12:09:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 16:09:03 +0000 Subject: [issue30871] Add test.pythoninfo In-Reply-To: <1499438915.55.0.904149842261.issue30871@psf.upfronthosting.co.za> Message-ID: <1503418143.73.0.491223529755.issue30871@psf.upfronthosting.co.za> STINNER Victor added the comment: I modified the buildbot configuration so a pythoninfo failure marks the build as WARNINGS instead of FAILED: https://github.com/python/buildmaster-config/commit/3866fac355b91d9d56507c345992fad2169759b4 But I'm not sure that it works :-/ I forced a build, but the build was marked as FAILED. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 12:35:28 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 16:35:28 +0000 Subject: [issue28667] FD_SETSIZE is unsigned on FreeBSD In-Reply-To: <1478872990.6.0.256289601446.issue28667@psf.upfronthosting.co.za> Message-ID: <1503419728.57.0.145463213177.issue28667@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3229 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 12:43:56 2017 From: report at bugs.python.org (Dmitry Kazakov) Date: Tue, 22 Aug 2017 16:43:56 +0000 Subject: [issue16217] Tracebacks are unnecessarily verbose when using 'python -m' In-Reply-To: <1350132701.04.0.542395484982.issue16217@psf.upfronthosting.co.za> Message-ID: <1503420236.05.0.892660993519.issue16217@psf.upfronthosting.co.za> Dmitry Kazakov added the comment: In order to load and compile the module code, runpy calls the loader's get_code method. Because that happens outside of the normal import process, and PyImport_ImportModuleLevelObject is currently the only place where remove_importlib_frames is being invoked, tracebacks of exceptions occurring in get_code are kept unmodified. Would it be wrong to drop all importlib frames from all unhandled exceptions, except when the -v flag is present? On the other hand, since the patch from #issue15486 seems to work fine in most scenarios, I propose removing both runpy and importlib traceback entries locally inside the runpy module. There may be better solutions, though... In any case, I'm willing to write a patch. ---------- nosy: +vaultah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 13:11:57 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 22 Aug 2017 17:11:57 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503421917.92.0.84245722651.issue31095@psf.upfronthosting.co.za> Larry Hastings added the comment: Victor, what do you think, does this need a 3.5 backport? I'm inclined to say yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 13:21:08 2017 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Aug 2017 17:21:08 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1503422468.41.0.251758060296.issue31024@psf.upfronthosting.co.za> Guido van Rossum added the comment: Before I spend more time reviewing your patch, can you please explain what you mean by "sphinx fails to find these"? Is there a particular dead link on docs.python.org or a specific query you typed in the search box that failed to find the definition of typing.Tuple? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 13:24:01 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 17:24:01 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503422641.77.0.731375951233.issue31095@psf.upfronthosting.co.za> STINNER Victor added the comment: Larry Hastings: "Victor, what do you think, does this need a 3.5 backport? I'm inclined to say yes." Naoki has to design an evil object which triggers explicitly the garbage collector to get a crash. He found the bug by reading the code. I don't remind anyone complaining about the bug. So I don't think that it's a major bug, as was bpo-21435 which was *easy* to trigger using asyncio. So no, I don't think that this issue desevers a backport. But it's just my opinion, feel free to backport to 3.5 if you consider that the bug is critical enough ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 13:31:52 2017 From: report at bugs.python.org (Larry Hastings) Date: Tue, 22 Aug 2017 17:31:52 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503423112.46.0.263038938802.issue31095@psf.upfronthosting.co.za> Larry Hastings added the comment: I thought crashing bugs were generally considered security bugs. With a reliable crashing bug exploiting a reasonable module (e.g. not ctypes) you can crash Python instances in hosting services. If those instances are shared with other users (e.g. Google App Engine) you can cause a temporary DOS. At least, that's the theory as I understood it...! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 13:37:03 2017 From: report at bugs.python.org (Steve Dower) Date: Tue, 22 Aug 2017 17:37:03 +0000 Subject: [issue31260] [2.7] Enhance PC/VS9.0/ project to produce python.bat, as PCbuild/ In-Reply-To: <1503415097.55.0.681149951058.issue31260@psf.upfronthosting.co.za> Message-ID: <1503423423.05.0.0823132744688.issue31260@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- nosy: -steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 13:58:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 22 Aug 2017 17:58:01 +0000 Subject: [issue31244] Shortcuts bug in Python IDLE In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503424681.38.0.48850904241.issue31244@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I confirm the issue. Seems this is a particularity of Tk implementation on Windows (it looks as a bug from user's point of view). There is a workaround, but it is too complex. For the particular keyboard layout and for every registered shortcut you need to find the character emitted by pressing the corresponding key, find its code in the current ANSI codepage, find the name for this code in the keysym table [1], and register additional shortcut for this name. For example for making Ctrl-O working with Ukrainian encoding you need to add open-window-from-file action. Cyrillic letter "?" is emitted when the key "o" is pressed in Ukrainian layout, it has the code 249 in CP-1251, which corresponds the name ugrave in the keysym table. All this is too complex for IDLE. I think that we should close this issue as "Won't fix" and hope that this will be fixed automatically in future versions of Tk. Firefox starved from similar issue for many years. It was fixed in recent versions. But Firefox is much more complex program than IDLE. [1] https://www.tcl.tk/man/tcl/TkCmd/keysyms.htm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 15:01:59 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 22 Aug 2017 19:01:59 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1503428519.88.0.123276369341.issue23835@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- pull_requests: +3230 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 15:06:09 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 22 Aug 2017 19:06:09 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1503428769.13.0.534116808815.issue23835@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I merged the original fix and documented it. I thought about it some more and remembered that RawConfigParser objects do in fact support non-string values by historical coincidence. It's unfortunately a popular idiom with old programs to load some configuration defaults using the `defaults=` keyword and later use the legacy get() and set() API which doesn't check types inside. A config file like this cannot be safely written back to a file, etc. I would very much like to get rid of RawConfigParser entirely but we're stuck with it due to backwards compatibility. So, to fix the regression, I created PR 3191. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 15:49:44 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 22 Aug 2017 19:49:44 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1503431384.09.0.135546883236.issue30983@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- pull_requests: +3231 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 16:11:11 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 22 Aug 2017 20:11:11 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1503432671.83.0.896136682102.issue31161@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset 680f04a926bce04e4320ba883068c345eba502a6 by ?ukasz Langa (Martijn Pieters) in branch '3.6': bpo-31161: only check for parens error for SyntaxError (#3083) https://github.com/python/cpython/commit/680f04a926bce04e4320ba883068c345eba502a6 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 16:16:25 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 22 Aug 2017 20:16:25 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1503432985.65.0.665634286393.issue31161@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset 772d809a63f40fd35679da3fb115cdf7fa81bd20 by ?ukasz Langa (Martijn Pieters) in branch 'master': bpo-31161: only check for parens error for SyntaxError (#3082) https://github.com/python/cpython/commit/772d809a63f40fd35679da3fb115cdf7fa81bd20 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 16:17:57 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 22 Aug 2017 20:17:57 +0000 Subject: [issue31161] Only check for print and exec parentheses cases for SyntaxError, not subclasses In-Reply-To: <1502285478.81.0.436457469881.issue31161@psf.upfronthosting.co.za> Message-ID: <1503433077.13.0.154716323954.issue31161@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 16:20:42 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 22 Aug 2017 20:20:42 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1503433242.59.0.364123075663.issue30983@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset 8e572491b59c2334723bfd7411ab2a9fbd100f70 by ?ukasz Langa in branch '3.6': [3.6] bpo-30983: [gdb] Fix py-bt, etc. for non-debug shared builds (GH-3153) (#3192) https://github.com/python/cpython/commit/8e572491b59c2334723bfd7411ab2a9fbd100f70 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 16:23:45 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 22 Aug 2017 20:23:45 +0000 Subject: [issue30983] eval frame rename in pep 0523 broke gdb's python extension In-Reply-To: <1500642155.57.0.151579575656.issue30983@psf.upfronthosting.co.za> Message-ID: <1503433425.67.0.191145161993.issue30983@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 16:27:55 2017 From: report at bugs.python.org (Preston Landers) Date: Tue, 22 Aug 2017 20:27:55 +0000 Subject: [issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6 In-Reply-To: <1482958160.11.0.32337159902.issue29097@psf.upfronthosting.co.za> Message-ID: <1503433675.9.0.202530051136.issue29097@psf.upfronthosting.co.za> Changes by Preston Landers : ---------- nosy: +planders _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 16:55:28 2017 From: report at bugs.python.org (=?utf-8?b?QmVybsOhdCBHw6Fib3I=?=) Date: Tue, 22 Aug 2017 20:55:28 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1503435328.89.0.653087763477.issue31024@psf.upfronthosting.co.za> Bern?t G?bor added the comment: so here's the problem in detail: Intersphinx (http://www.sphinx-doc.org/en/stable/ext/intersphinx.html) is a built in Sphinx plugin that allows to link to documentation of other projects in your own documentation. For example when specifying the argument of a function which can be either int or string you might specify the argument to be Union[int, str]. In this case Sphinx will generate the type of the argument as this object, where e.g. the Union word will be a link to https://docs.python.org/3/library/typing.html#typing.Union and so on. In order to know for which object/function/type what is the correct URL an intersphinx object (which is basically a mapping) needs to be generated. This maps each element to an URL. This intersphinx mapping storage object (available at https://docs.python.org/3/objects.inv and similarly under other version pattern for the according version) is generated from the Python documentation. Now there's one indirection as far as this objects.inv goes; it does not actually stores mappings of element to URL, but what instead does it stores a mapping of type to element to url. Where type is here defined as either data/class etc. In order to resolve from an element to an URL both keys need to be correct (the type and the key too). For Python 3.6+ the typing.Tuple mapping now fails because according to the documentation the Tuple is under the section data, but once intersphinx looks at the Tuple during documentation generation it deduces it actually is of type class, and tries to locate it there. In order for intersphinx to resolve the correct web page URL, the runtime information of an element need to coincide with it's documentation type. Hence, what this PR tries to fix, migrating the documentation type/section of data to class (as in the meantime under Python 3.6 the Tuple is now a class). For the end user the fact that this is a class is still hidden, but for the documentation generation tool to resolve the correct URL, the runtime information needs to coincide with the documentation one. We should probably add a unit test that makes sure all runtime "type" matches with documentation "type" in the future. Let's make that the scope of another PR; is now clear? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 17:15:57 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 22 Aug 2017 21:15:57 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1503436557.41.0.815861495696.issue31205@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I don't understand why GH-3097 was introduced to 3.6.2. This doesn't look like a bugfix? ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 18:05:09 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 22 Aug 2017 22:05:09 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503439509.06.0.137120149897.issue14976@psf.upfronthosting.co.za> Antoine Pitrou added the comment: After experimenting a bit more with this approach, I now realize that the case where a get() is waiting and gets interrupted by a put() call is not handled properly: there is no obvious way for the get() call to realize (when the interruption finishes) that the queue is now non-empty and can be popped from. So perhaps we need C code after all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 18:24:55 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 22 Aug 2017 22:24:55 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1503440695.66.0.250430714202.issue31024@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > For the end user the fact that this is a class is still hidden I am not sure what you mean by this, but with your PR the rendered docs will literally say ``class typing.Tuple``. > We should probably add a unit test that makes sure all runtime "type" matches with documentation "type" in the future I already mention, this was not an omission but a deliberate decision, see http://bugs.python.org/review/28644/diff/19105/Doc/library/typing.rst#newcode444 (and below the same for Callable) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 18:26:00 2017 From: report at bugs.python.org (Micah) Date: Tue, 22 Aug 2017 22:26:00 +0000 Subject: [issue31261] unittest fails to properly destruct objects created during setUp if a test fails Message-ID: <1503440760.72.0.06686224084.issue31261@psf.upfronthosting.co.za> New submission from Micah: When running the attached example test dummy objects are created during setUp and destructed at the end of a passing test but when a test fails the dummy object that was created in setUp fails to deconstruct. This leads to cascading errors when writing integration tests where having a "ghost" object sitting in the background and listening to messages is detrimental. This behavior became apparent when I was writing integration tests making use of a signalling package so I pulled everything that wasn't base python to see if the bug was reproduced and it was. The object that failed to deconstruct when the test failed(0x000001CA971F6208) deconstructs at the end of the entire testcase while the object declared within the test function itself(0x000001CA971F62B0) deconstructs as soon as the test fails out. The output of the test that I ran was this: > python -m unittest test_bug.py test_fail (test_bug.TestBug) Created Created local F deleting test_pass (test_bug.TestBug) Created . deleting test_passes (test_bug.TestBug) Created . deleting ====================================================================== FAIL: test_fail (test_bug.TestBug) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Code\test_bug.py", line 27, in test_fail self.assertTrue(False) AssertionError: False is not true ---------------------------------------------------------------------- Ran 3 tests in 0.004s FAILED (failures=1) deleting ---------- components: Windows files: test_bug.py messages: 300725 nosy: MCBama, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: unittest fails to properly destruct objects created during setUp if a test fails type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47094/test_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 18:27:47 2017 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 22 Aug 2017 22:27:47 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1503440867.52.0.968688407163.issue31024@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks, I am a little closer to understanding now. > once intersphinx looks at the Tuple during documentation generation it deduces it actually is of type class How does intersphinx deduce this? Also, does it run when we generate the Python docs, or when you generate the docs for your project (that references the Python docs)? Finally, are there other objects in the typing for which this is a problem? (I guess I could answer this myself once I understand how intersphinx decides whether something is a class or data.) I also think this is somewhat unfortunate, because it seems that whenever something is changed from "class" to "data" or vice versa, intersphinx will be confused, even though it's easy to give examples where such a change could be backwards compatible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 18:52:38 2017 From: report at bugs.python.org (Dipti Sherlekar) Date: Tue, 22 Aug 2017 22:52:38 +0000 Subject: [issue31262] Documentation Error Message-ID: <1503442357.91.0.706507107768.issue31262@psf.upfronthosting.co.za> New submission from Dipti Sherlekar: Documentation says : In C++ terminology, normally class members (including the data members) are public Solution: In C++ the class memebers are private not public by default. ---------- assignee: docs at python components: Documentation messages: 300727 nosy: Dipti Sherlekar, docs at python priority: normal severity: normal status: open title: Documentation Error versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 18:56:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 22:56:48 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503442608.51.0.499709006583.issue31095@psf.upfronthosting.co.za> STINNER Victor added the comment: In my experience, it's not that hard to crash CPython (without ctypes) if you know internals or just if you look into Lib/test/crashers/ :-) I agree that it's a good practice to fix crashes when there is a simple known script to crash Python. The question is more where is the limit between security and bug fixes. To be honest, the change is very safe and is very short. @Larry: It's up to you, you are the release manager :-) If we consider that the discussed bugs impact the security, I will ask for backports to 2.7, 3.3 and 3.4 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 18:58:49 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 22 Aug 2017 22:58:49 +0000 Subject: [issue28667] FD_SETSIZE is unsigned on FreeBSD In-Reply-To: <1478872990.6.0.256289601446.issue28667@psf.upfronthosting.co.za> Message-ID: <1503442729.41.0.719441949697.issue28667@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset cb7fdf69ec9235cb358580f189089eaf575fb9df by Victor Stinner in branch '3.6': bpo-28667: Fix a compile warning on FreeBSD when compare with FD_SETSIZE. (#501) (#3190) https://github.com/python/cpython/commit/cb7fdf69ec9235cb358580f189089eaf575fb9df ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 19:20:06 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 22 Aug 2017 23:20:06 +0000 Subject: [issue31261] unittest fails to properly destruct objects created during setUp if a test fails In-Reply-To: <1503440760.72.0.06686224084.issue31261@psf.upfronthosting.co.za> Message-ID: <1503444006.29.0.481549916153.issue31261@psf.upfronthosting.co.za> R. David Murray added the comment: GC cleanup is not guaranteed to be synchronous. You are observing normal Python behavior here. Cleanup does not happen until the TestCase instance is finalized (thus eliminating the self.dummy reference to your DummyClass). In the case of passing tests, that is after the '.' is printed. In the case of failing tests, that is after the failure is printed, which isn't until the failure summary is printed at after running all tests. If it is important to you that DummyClass be finalized, you need to add an addCleanup call to your setUp method that will do whatever finalization you need done. Including doing 'del self.dummy' (or self.dummy = None) if you need the reference to it gone...but depending on garbage collection is a bad idea, so if you are doing that there is probably something sub-optimal about your design. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 19:25:22 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 22 Aug 2017 23:25:22 +0000 Subject: [issue31262] Documentation Error In-Reply-To: <1503442357.91.0.706507107768.issue31262@psf.upfronthosting.co.za> Message-ID: <1503444322.64.0.462865267122.issue31262@psf.upfronthosting.co.za> R. David Murray added the comment: No, that sentence is telling you what the *Python*'s behavior is, using C++ terminology. Unlike C++, where class members are private by default, the Python equivalent of class members are public by default. If you can figure out a clearer way to phrase that you may reopen the issue with your suggestion. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 19:28:35 2017 From: report at bugs.python.org (Martin Panter) Date: Tue, 22 Aug 2017 23:28:35 +0000 Subject: [issue31262] Documentation Error In-Reply-To: <1503442357.91.0.706507107768.issue31262@psf.upfronthosting.co.za> Message-ID: <1503444515.54.0.861821782735.issue31262@psf.upfronthosting.co.za> Martin Panter added the comment: Assuming this is about the Classes section in the tutorial, you seem to be going down the same track as ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 19:31:39 2017 From: report at bugs.python.org (Dipti Sherlekar) Date: Tue, 22 Aug 2017 23:31:39 +0000 Subject: [issue31262] Documentation Error In-Reply-To: <1503444515.54.0.861821782735.issue31262@psf.upfronthosting.co.za> Message-ID: Dipti Sherlekar added the comment: Thanks all. Dipti On Tue, Aug 22, 2017 at 4:28 PM Martin Panter wrote: > > Martin Panter added the comment: > > Assuming this is about the Classes section in the tutorial, you seem to be > going down the same track as > > ---------- > nosy: +martin.panter > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 19:34:26 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 22 Aug 2017 23:34:26 +0000 Subject: [issue12887] Documenting all SO_* constants in socket module In-Reply-To: <1314987180.49.0.607596056761.issue12887@psf.upfronthosting.co.za> Message-ID: <1503444866.13.0.577795013487.issue12887@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: needs patch -> patch review versions: +Python 3.6, Python 3.7 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 19:47:02 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 22 Aug 2017 23:47:02 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1503445622.5.0.414480233815.issue31205@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Reading PEP 434, special rules for IDLE, should mostly answer your question. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 20:29:33 2017 From: report at bugs.python.org (Alex Hayes) Date: Wed, 23 Aug 2017 00:29:33 +0000 Subject: [issue31209] MappingProxyType can not be pickled In-Reply-To: <1502772551.88.0.290451219237.issue31209@psf.upfronthosting.co.za> Message-ID: <1503448173.23.0.41560800626.issue31209@psf.upfronthosting.co.za> Alex Hayes added the comment: Some background. I'm not actually trying to pickle MappingProxyType, I'm using the schematics [1] library and recently it broke support for pickle [2] and the cause of that is because they are using MappingProxyType [3] internally (when they used to use dict). The Python docs on MappingProxyType [4] provides an appropriate level of API documentation but what it doesn't cover is when you should or should not use MappingProxyType (understandably, it's most likely a complex answer). However, I imagine that it's being used in schematics because at the bottom of the Python dict documentation [5] it states; > See also types.MappingProxyType can be used to create a read-only view of a dict. To answer the question "What would be the point of pickling a MappingProxy?" I would probably have to ask, what is the intended use of MappingProxyType? If one was unfamiliar with the way in which pickle and MappingProxyType works I imagine they would think there would be no reason why a "read-only view of a dict" can't be pickled. So I guess my questions now are; 1. Should types.MappingProxyType be pickleable? 2. Should there be some documentation about the intended use of MappingProxyType? I imagine the answer to the first question is "no" given how `__setstate__` works. ---- [1] https://github.com/schematics/schematics [2] https://github.com/schematics/schematics/issues/510 [3] https://github.com/schematics/schematics/pull/511 [4] https://docs.python.org/3/library/types.html#types.MappingProxyType [5] https://docs.python.org/3/library/stdtypes.html#dict ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 20:53:12 2017 From: report at bugs.python.org (Benda Xu) Date: Wed, 23 Aug 2017 00:53:12 +0000 Subject: [issue31255] Test getrandom before using it In-Reply-To: <1503387609.26.0.161780447873.issue31255@psf.upfronthosting.co.za> Message-ID: <1503449592.38.0.898359958917.issue31255@psf.upfronthosting.co.za> Benda Xu added the comment: Thanks Victor. Python-3.5 has received your patches in time and 3.5.4 builds well with glibc-2.25 and _______________________________________ From report at bugs.python.org Tue Aug 22 21:12:12 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 23 Aug 2017 01:12:12 +0000 Subject: [issue31244] IDLE: work around shortcuts bug in Windows' IMEs and tk In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503450732.07.0.520749941138.issue31244@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Constantine: the point of checking the behavior of the Japanese IME was to determine whether there is a problem with all IMEs or just some. Since Ctrl + the 2nd key from the left on the bottom row (marked 'X') invokes 'Delete' in both American and Japanese entry modes, the behavior you want should be possible. I do not know where the bug is, and do not care, other than knowing that it is not in IDLE (or Python). I do care that anyone in the world, like you, with sufficient knowledge to use Python, be able to also use IDLE if they chose. Even if switching keyboards with alt-shift is a fast, habituated, motion, it is clearly a nuisance in this context So, even though IDLE is not Firefox, I am willing to consider somehow implementing what Serhiy described and supporting either adding workaround keyset(s) to IDLE or make it easier for users to create their own custom keysets that work. When I mentioned the menus, I assume that the alt menu shortcuts work, so alt-e, alt-c, for instance, would copy a selection. When we tried this with the Japanese keyboard, the alt shortcuts work for the top menu (F_ile, E_dit, S_hell, etc) but not for the drop-down submenus. After alt-e displays the edit menu, alt-c, etc, have no apparent effect. Another bug, and one which I doubt we can work around without language-specific menus. (This is a separate issue.) Step 1 for this issue: what is the scope of the problem. I presume it is not unique to Ukranian. Does it affect all Cyrillic IMEs? If so, do different cyrillic keyboards have the the alphabetic chars in different places, so that a separate workaround is needed for every IME, even for letter chars? ---------- assignee: -> terry.reedy components: +IDLE resolution: third party -> stage: resolved -> test needed title: Shortcuts bug in Python IDLE -> IDLE: work around shortcuts bug in Windows' IMEs and tk versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 22:43:39 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 Aug 2017 02:43:39 +0000 Subject: [issue31209] MappingProxyType can not be pickled In-Reply-To: <1502772551.88.0.290451219237.issue31209@psf.upfronthosting.co.za> Message-ID: <1503456219.89.0.68519487016.issue31209@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > So I guess my questions now are; > > 1. Should types.MappingProxyType be pickleable? > 2. Should there be some documentation about the intended use of > MappingProxyType? > > I imagine the answer to the first question is "no" given > how `__setstate__` works. For the second question, I don't think so. AFAICT the only intention was to support the actual mapping views for regular dicts. Its likely that not much thought was given to other uses, so it doesn't make sense to document intention when none really exists ;-) Given the answers above and that you have a PR solve your upstream issue with Schematics, can this bug report be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 22 23:31:28 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 Aug 2017 03:31:28 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503459088.26.0.118235896062.issue31254@psf.upfronthosting.co.za> Raymond Hettinger added the comment: For WeakKeyDictionary, I suspect that adding a __missing__() call would make the API more tricky and would likely cause more problems than it solves. Without a compelling use case, my recommendation would be to leave it alone. (FWIW, all of the weak reference data structures have a long history of bugs, it seems that this is difficult to get right). ---------- nosy: +rhettinger type: -> enhancement versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 01:02:36 2017 From: report at bugs.python.org (Isaac Elliott) Date: Wed, 23 Aug 2017 05:02:36 +0000 Subject: [issue31263] Assigning to subscript/slice of literal is permitted Message-ID: <1503464556.49.0.828859643321.issue31263@psf.upfronthosting.co.za> New submission from Isaac Elliott: In Python 3.5 and 3.6 (at least), the language reference presents a grammar that disallows assignment to literals. For example, `(a for 1 in [1,2,3])` is a syntax error, as is `(1, a) = (2, 3)`. However the grammar doesn't prevent assignment to subscripted or sliced literals. For example neither `(a for [1,2,3][0] in [1,2,3])` nor `([1,2,3][0], a) = (2, 3)` are considered syntax errors. Similar behavior is exhibited for slices. The problem is that the `target_list` production (https://docs.python.org/3.5/reference/simple_stmts.html#grammar-token-target_list) reuses the `subscription` and `slicing` productions which both use the `primary` production, allowing literals on their left side. ---------- messages: 300740 nosy: Isaac Elliott priority: normal severity: normal status: open title: Assigning to subscript/slice of literal is permitted type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 01:07:38 2017 From: report at bugs.python.org (=?utf-8?b?QmVybsOhdCBHw6Fib3I=?=) Date: Wed, 23 Aug 2017 05:07:38 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1503464858.28.0.393684130248.issue31024@psf.upfronthosting.co.za> Bern?t G?bor added the comment: I suppose when the python.org documentation is generated the objects.inv file gets generated with it (I did not found exactly this piece of code here though). When Sphinx runs, it's intersphinx plugin goes out to python.org, downloads the objects.inv, decodes it, and then tries to map the docstring param/return values/references to URLs. Actually intersphinx does not make the deduction of the type. It uses what the users entered in the docstring. In this case the user needs to know for each element to which bucket has been assigned to (e.g. class/data/function/method/exception/macro); and for compatibility reason that needs to stay stable, otherwise with a Python upgrade the user would need to update the code of its docstrings. That being said for the sake of automation, in my case there actually another sphinx plugin (https://github.com/agronholm/sphinx-autodoc-typehints/blob/master/sphinx_autodoc_typehints.py) which actually generates, on the fly, the type information. So I suppose as a fix for my problem the sphinx_autodoc_typehint could be altered to still give back data, even though this now is a class. I'm not sure though how confident I am on "lying" to users about the data/class; but I suppose it's a necessary evil at this point. So should we keep everything as it is? When I first identified why Tuple does not have the URL mapped to it, I thought the problem to be the fact that it goes to the wrong bucket (by just inspecting its type): data; but now I see that may not be such a bad thing after all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 01:26:26 2017 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 23 Aug 2017 05:26:26 +0000 Subject: [issue16217] Tracebacks are unnecessarily verbose when using 'python -m' In-Reply-To: <1350132701.04.0.542395484982.issue16217@psf.upfronthosting.co.za> Message-ID: <1503465986.7.0.633362758125.issue16217@psf.upfronthosting.co.za> Nick Coghlan added the comment: The reason we don't always drop the importlib frames in general is because we need them when we're debugging importlib itself, as well as when folks are calling into it directly. However, I think it would be reasonable to do it unconditionally for unhandled exceptions triggered via "-m": if we want the unfiltered exception in that case, we can either edit runpy to skip the filtering (when working on runpy), or else call the runpy API directly, rather than via -m. That means I like the idea of implementing the traceback filtering and display inside runpy._run_module_as_main itself, rather than relying on the default interpreter level traceback display. One potential approach to that would be to expand the current code that suppresses tracebacks entirely for runpy._Error exceptions to also handle the "except Exception as exc:" case and print out a traceback variants that omits any frames from runpy, importlib, or _frozen_importlib (KeyboardInterrupt and SystemExit would still escape unmodified) As far as the implementation goes, this could potentially be made a general feature of the new(ish) TracebackException https://docs.python.org/3/library/traceback.html#tracebackexception-objects class by accepting an "ignore_modules" iterable as a parameter to TracebackException.format() and then ignoring frames running code from those modules (conveniently, runpy, importlib, and _frozen_importlib between them will exercise the cases of a single-file module, a self-contained package, and a frozen module, so only namespace package support would end up relying entirely on synthetic test cases). ---------- versions: +Python 3.7 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 01:27:48 2017 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 23 Aug 2017 05:27:48 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1503466068.21.0.746268279745.issue31024@psf.upfronthosting.co.za> Guido van Rossum added the comment: OK, I think Sphinx is way too complicated for its own good, and it's arguably not the fault of Python's documentation that this doesn't work for you. I would like to close this issue as "won't fix", except... in a sense Tuple actually *is* a class, since you can subclass from e.g. Tuple[int, str]. @Levikvskyi, what do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 03:40:01 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 23 Aug 2017 07:40:01 +0000 Subject: [issue31024] typing.Tuple is class but is defined as data inside https://docs.python.org/3.6/objects.inv In-Reply-To: <1500981460.28.0.176331583304.issue31024@psf.upfronthosting.co.za> Message-ID: <1503474001.0.0.87282898053.issue31024@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: TBH, I think this is a Sphinx problem, not a Python problem. And concerning ``Tuple`` being an actual class I think this is an implementation detail, so that I am closing this as "won't fix". ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 03:54:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Aug 2017 07:54:53 +0000 Subject: [issue31244] IDLE: work around shortcuts bug in Windows' IMEs and tk In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503474893.1.0.596336022818.issue31244@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, it affects all Cyrillic layouts, as well as Greek and other alphabetical systems. It also affects layouts for Western-European languages with keys for accented characters. Different Cyrillic keyboards have different characters on the same key, but I don't know if they have different keys for the same character. Fortunately all Cyrillic languages use the same ANSI encoding. But I think there are conflicts between Cyrillic and non-Cyrillic layouts. Different keys on different keyboards can produce the same code (which means different characters in different codepages). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 04:10:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Aug 2017 08:10:16 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1503475816.51.0.0269000328783.issue31243@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +IO nosy: +benjamin.peterson, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 04:20:35 2017 From: report at bugs.python.org (Constantine Ketskalo) Date: Wed, 23 Aug 2017 08:20:35 +0000 Subject: [issue31244] IDLE: work around shortcuts bug in Windows' IMEs and tk In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503476435.52.0.576199074087.issue31244@psf.upfronthosting.co.za> Constantine Ketskalo added the comment: Bug is not in Python? Then where? Windows? - I assume that the alt menu shortcuts work... - NO! And I've written that before as well! Alt + combinations don't work neither with cyrillic! - Does it affect all Cyrillic IMEs? - Yes, I've written that before already - shortcuts don't work neither with Ukrainian, nor with Russian - If so, do different cyrillic keyboards have the the alphabetic chars in different places, so that a separate workaround is needed for every IME, even for letter chars? - Yes and no. Most letters in different cyrillic alphabets are the same, so they have the same place on the keyboard(as well as the same encoding), but some of them are different, so in different IMEs same key gives different letter. For instance English 's' in Ukrainian is '?' and in Russian is '?'. But English 'c' is in both Ukrainian and Russian '?' (looks the same, has different encoding then English, but has same encoding for Ukrainian and Russian). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 06:18:02 2017 From: report at bugs.python.org (John Torakis) Date: Wed, 23 Aug 2017 10:18:02 +0000 Subject: [issue31264] Import Package/Module through HTTP/S repository Message-ID: <1503483482.35.0.941565014416.issue31264@psf.upfronthosting.co.za> New submission from John Torakis: A module presented in "https://github.com/operatorequals/httpimport" which provides functionality for package/module loading through HTTP/S, like the golang's "import github.com/someusr/somepkg/subpkg", but for any directory served with HTTP/S. I believe that this module has to become a core feature, after, of course, the necessary scrutiny! ---------- components: Extension Modules hgrepos: 372 messages: 300747 nosy: operatorequals priority: normal severity: normal status: open title: Import Package/Module through HTTP/S repository type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 06:24:19 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 Aug 2017 10:24:19 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict Message-ID: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> New submission from INADA Naoki: Since dict preserves insertion order, doubly linked list in OrderedDict can be removed. There is small performance improvement for odict creation: $ curl https://api.github.com/orgs/python/repos > repos.json $ ./py-patched -m perf timeit --compare-to `pwd`/py-default -s 'from collections import OrderedDict as od; import json; data=open("repos.json").read()' -- 'json.loads(data, object_pairs_hook=od)' py-default: ..................... 1.53 ms +- 0.01 ms py-patched: ..................... 1.30 ms +- 0.01 ms Mean +- std dev: [py-default] 1.53 ms +- 0.01 ms -> [py-patched] 1.30 ms +- 0.01 ms: 1.18x faster (-15%) And more memory efficient: $ ./py-default -c 'from collections import OrderedDict; import sys; print(sys.getsizeof(OrderedDict.fromkeys(range(1000))))' 85416 $ ./py-patched -c 'from collections import OrderedDict; import sys; print(sys.getsizeof(OrderedDict.fromkeys(range(1000))))' 36992 But most important benefit is smaller code. It make easy to maintain. ---------- components: Interpreter Core messages: 300748 nosy: inada.naoki priority: normal severity: normal status: open title: Remove doubly-linked list from C OrderedDict versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 06:29:32 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 Aug 2017 10:29:32 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503484172.47.0.497668110393.issue31265@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +3232 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 06:45:31 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 Aug 2017 10:45:31 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503485131.2.0.263289319298.issue31265@psf.upfronthosting.co.za> INADA Naoki added the comment: There are some failing tests remaining, and I want to discuss about some of them here. Traceback (most recent call last): File "/home/inada-n/work/python/nodebug/Lib/test/test_ordered_dict.py", line 261, in test_pop self.assertEqual(m.pop('a', default=6), 6) TypeError: pop() takes no keyword arguments dict.pop doesn't take keyword argument. Since OrderedDict is pure Python at first, C implementation of OrderedDict.pop() takes keyword too. May I change `dict.pop()` to take keyword too. It reduce odict specific method. Some test expect KeyError in some edge cases. But new implementation behaves differently. For example, def test_dict_delitem(self): OrderedDict = self.OrderedDict od = OrderedDict() od['spam'] = 1 od['ham'] = 2 dict.__delitem__(od, 'spam') with self.assertRaises(KeyError): repr(od) Since current implementation uses linked list, it raises KeyError. But this is totally OK for new C implementation. --- Personally speaking, I want to stop keeping compatibility with pure Python implementation. Is it possible to make "builtin _collections.OrderedDict" as requirement for all Python 3.7 implementations and remove pure Python implementation stdlib? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 09:06:36 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Wed, 23 Aug 2017 13:06:36 +0000 Subject: [issue31263] Assigning to subscript/slice of literal is permitted In-Reply-To: <1503464556.49.0.828859643321.issue31263@psf.upfronthosting.co.za> Message-ID: <1503493596.83.0.137577273814.issue31263@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: There is no such thing as "sliced literal" per se. And [1,2,3] is in fact _not_ a literal (it's a _list display_, at least it was the last time I learned Python's vocabulary.) [1,2,3][0] is an expression, which is a slice. When you write [0] = 2, is evaluated, and the result's __setitem__ is called. It is perfectly well-defined if the result is a list. Python doesn't care if it is a fresh list, or an already known one. I guess it would be possible to change the grammar to disallow that, but do you really think it's worth it? And would you throw away also things such as [5,a][1][:]=[3]? ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 09:33:42 2017 From: report at bugs.python.org (Christian H) Date: Wed, 23 Aug 2017 13:33:42 +0000 Subject: [issue22536] subprocess should include filename in FileNotFoundError exception In-Reply-To: <1412210977.42.0.325510395327.issue22536@psf.upfronthosting.co.za> Message-ID: <1503495222.11.0.0852770720871.issue22536@psf.upfronthosting.co.za> Christian H added the comment: I was also bitten by this bug, and would like to see it merged. The patch 22536-subprocess-exception-filename-2.patch looks fine to me. ---------- nosy: +Christian H _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 09:42:05 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 Aug 2017 13:42:05 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503495725.41.0.858915330605.issue31265@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 10:22:13 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 Aug 2017 14:22:13 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503498133.91.0.859677980071.issue31265@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would be very careful going down this path. Regular dict ordering is not yet guaranteed and is subject to change. Its design was primarily about compaction and the ordering was a side-effect. In contrast, the data structure for collections.OrderedDict() was designed specifically for maintaining order. It is likely that there are some workloads where the regular dict would degrade significantly compared to ordered dicts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 10:25:57 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 23 Aug 2017 14:25:57 +0000 Subject: [issue26601] Use new madvise()'s MADV_FREE on the private heap In-Reply-To: <1458557514.95.0.774301964914.issue26601@psf.upfronthosting.co.za> Message-ID: <1503498357.02.0.740881164295.issue26601@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> needs patch versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 10:37:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Aug 2017 14:37:46 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503499066.49.0.615402161537.issue31265@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I like the idea. Actually I wanted to write such patch myself, but this is very delicate thing and needs to be very careful. The largest benefit is not just memory saving and performance, but robustness. Currently it is easy to went OrderedDict in incorrect state by using pure dict API. This can cause crashes, hangs or invalid bahavior (see issue24726 and issue25410). The new implementation should pass all existing tests and also fix the above issues. See also issue28239. lru_cache uses simplified version of ordered dict. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 10:52:38 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 23 Aug 2017 14:52:38 +0000 Subject: [issue31263] Assigning to subscript/slice of literal is permitted In-Reply-To: <1503464556.49.0.828859643321.issue31263@psf.upfronthosting.co.za> Message-ID: <1503499958.38.0.79549613796.issue31263@psf.upfronthosting.co.za> R. David Murray added the comment: I'm don't have a lot of experience with parsers, but I suspect that we consider the cost of making the grammar more complex to be more significant than the benefit we'd get from catching these at compile time. And as Vedran says, defining what can be caught without breaking legitimate things is distinctly non-trivial. I vote to just close this issue. If you come up with a proposal we can reopen. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 10:58:14 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 23 Aug 2017 14:58:14 +0000 Subject: [issue31264] Import Package/Module through HTTP/S repository In-Reply-To: <1503483482.35.0.941565014416.issue31264@psf.upfronthosting.co.za> Message-ID: <1503500294.35.0.922454151185.issue31264@psf.upfronthosting.co.za> R. David Murray added the comment: This kind of proposal should start with a discussion on the python-ideas mailing list. You can reopen the issue if there is a consensus for moving forward...but I wouldn't be surprised if this was considered to be a PEP level proposal. ---------- nosy: +brett.cannon, eric.snow, ncoghlan, r.david.murray resolution: -> later stage: -> resolved status: open -> closed versions: +Python 3.7 -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 11:11:54 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 Aug 2017 15:11:54 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503501114.99.0.170229113489.issue31265@psf.upfronthosting.co.za> INADA Naoki added the comment: I think typical usage is: get, set (incl, creating), and iterate. * get: there is no difference * set: inserting new key is little faster since no updating linked list * iterate: in typical case, new odict is faster because current odict iterator do lookup for each key. $ ./py-patched -m perf timeit --compare-to `pwd`/py-default \ -s 'from collections import OrderedDict as odict; od = odict.fromkeys(range(10000))' -- 'list(od)' py-default: ..................... 223 us +- 10 us py-patched: ..................... 93.7 us +- 3.3 us Mean +- std dev: [py-default] 223 us +- 10 us -> [py-patched] 93.7 us +- 3.3 us: 2.38x faster (-58%) On the other hand, there are some cases new odict is slower: * iterating sparse dict. (but same speed as normal dict) * comparing two odict, because new odict do `list(od1) == list(od2)` to compare keys. For now, new odict uses dict's iterator (with adding `reversed` order support) and it's weak against modify while iterating. That's why I used temporal list while comparing. And there is one failing test for modify-while-iterate case. So I'm thinking about implementing robust odict iterator which detect modify for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 11:27:01 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 Aug 2017 15:27:01 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503502021.16.0.384968153053.issue31265@psf.upfronthosting.co.za> INADA Naoki added the comment: od.move_to_end() is slower too: $ ./py-patched -m perf timeit --compare-to `pwd`/py-default -s 'from collections import OrderedDict as odict; od = odict.fromkeys("abcdefghijklmnopqrstuvwxyz")' -- 'od.move_to_end("a"); od.move_to_end("b")' py-default: ..................... 196 ns +- 4 ns py-patched: ..................... 227 ns +- 3 ns Mean +- std dev: [py-default] 196 ns +- 4 ns -> [py-patched] 227 ns +- 3 ns: 1.16x slower (+16%) $ ./py-patched -m perf timeit --compare-to `pwd`/py-default -s 'from collections import OrderedDict as odict; od = odict.fromkeys("abcdefghijklmnopqrstuvwxyz")' -- 'od.move_to_end("z")' py-default: ..................... 74.7 ns +- 0.4 ns py-patched: ..................... 91.1 ns +- 3.5 ns Mean +- std dev: [py-default] 74.7 ns +- 0.4 ns -> [py-patched] 91.1 ns +- 3.5 ns: 1.22x slower (+22%) $ ./py-patched -m perf timeit --compare-to `pwd`/py-default -s 'from collections import OrderedDict as odict; od1 = odict.fromkeys(range(10000)); od2=odict.fromkeys(range(10000))' -- 'od1==od2' py-default: ..................... 451 us +- 3 us py-patched: ..................... 632 us +- 6 us Mean +- std dev: [py-default] 451 us +- 3 us -> [py-patched] 632 us +- 6 us: 1.40x slower (+40%) # pros * 1000 less lines of code * 50% less memory usage * 15% faster creation * 100% (2x) faster iteration # cons * Some inconsistency against pure Python implementation * 20% slower move_to_end * 40% slower comparison ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 11:34:52 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 Aug 2017 15:34:52 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503502492.97.0.25223981076.issue31265@psf.upfronthosting.co.za> INADA Naoki added the comment: Another idea is making "dict preserves insertion order" as language spec. There are still some difference between dict and odict: .move_to_end() and __eq__. But most use cases of odict is just keep insertion order. For example, parsing config file, json, or csv. In such cases, people can get all benefits (less memory and faster creation, iteration and deallocation) of dict if it's guaranteed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 12:53:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Aug 2017 16:53:57 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503507237.97.0.398723402003.issue31265@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about move_to_end(last=False)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 13:30:30 2017 From: report at bugs.python.org (INADA Naoki) Date: Wed, 23 Aug 2017 17:30:30 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503509430.43.0.810603641347.issue31265@psf.upfronthosting.co.za> INADA Naoki added the comment: When no change happens: $ ./py-patched -m perf timeit --compare-to `pwd`/py-default -s 'from collections import Ordedict; od = odict.fromkeys("abcdefghijklmnopqrstuvwxyz")' -- 'od.move_to_end("a", 0)' py-default: ..................... 90.6 ns +- 1.0 ns py-patched: ..................... 107 ns +- 1 ns Mean +- std dev: [py-default] 90.6 ns +- 1.0 ns -> [py-patched] 107 ns +- 1 ns: 1.18x slower (+18%) When change happens: $ ./py-patched -m perf timeit --compare-to `pwd`/py-default -s 'from collections import OrderedDict as odict; od = odict.fromkeys("abcdefghijklmnopqrstuvwxyz")' -- 'od.move_to_end("y", 0); od.move_to_end("z", 0)' py-default: ..................... 233 ns +- 4 ns py-patched: ..................... 304 ns +- 2 ns Mean +- std dev: [py-default] 233 ns +- 4 ns -> [py-patched] 304 ns +- 2 ns: 1.30x slower (+30%) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 14:16:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Aug 2017 18:16:56 +0000 Subject: [issue31229] wrong error messages when too many kwargs are received In-Reply-To: <1502992936.21.0.653436354644.issue31229@psf.upfronthosting.co.za> Message-ID: <1503512216.12.0.635022081372.issue31229@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bf9075a0c55186d2f34df63e6c8512dd6414ff4b by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31229: Fixed wrong error messages when too many keyword arguments are received. (#3180) https://github.com/python/cpython/commit/bf9075a0c55186d2f34df63e6c8512dd6414ff4b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 14:19:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 23 Aug 2017 18:19:03 +0000 Subject: [issue31229] wrong error messages when too many kwargs are received In-Reply-To: <1502992936.21.0.653436354644.issue31229@psf.upfronthosting.co.za> Message-ID: <1503512343.33.0.366333966081.issue31229@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Oren for your contribution. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 15:38:33 2017 From: report at bugs.python.org (emin mamedov) Date: Wed, 23 Aug 2017 19:38:33 +0000 Subject: [issue31266] attribute error Message-ID: <1503517113.75.0.490210479447.issue31266@psf.upfronthosting.co.za> New submission from emin mamedov: Hello! I am just write some program with "string module", after starting my program python give me error about "re module". My program is a tutorial from DrapsTV from Youtube. Error -->> Traceback (most recent call last): File "temp1.py", line 1, in from string import Template File "/usr/lib64/python3.6/string.py", line 77, in class Template(metaclass=_TemplateMetaclass): File "/usr/lib64/python3.6/string.py", line 82, in Template flags = _re.IGNORECASE AttributeError: module 're' has no attribute 'IGNORECASE' ---------- components: Extension Modules files: temp1.py messages: 300763 nosy: emin mamedov priority: normal severity: normal status: open title: attribute error type: crash versions: Python 3.6 Added file: http://bugs.python.org/file47095/temp1.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 16:05:06 2017 From: report at bugs.python.org (Peter Otten) Date: Wed, 23 Aug 2017 20:05:06 +0000 Subject: [issue31266] attribute error In-Reply-To: <1503517113.75.0.490210479447.issue31266@psf.upfronthosting.co.za> Message-ID: <1503518706.1.0.0813649752325.issue31266@psf.upfronthosting.co.za> Peter Otten added the comment: You have probably written your own re.py file which shadows the one in the standard library. Once you remove or rename your re.py the error should go away. ---------- nosy: +peter.otten _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 16:47:36 2017 From: report at bugs.python.org (Thomas Keppler) Date: Wed, 23 Aug 2017 20:47:36 +0000 Subject: [issue31267] threading.Timer object is affected by changes to system time Message-ID: <1503521255.96.0.0977006158294.issue31267@psf.upfronthosting.co.za> New submission from Thomas Keppler: Hi, I have been playing around with threading.Timer objects as timeouts for a project and noticed that my timeouts are affected by system time changes. To test this, I have written a small demonstration script (timer_testcase.py) which you can find in the attachments. I would expect that after 120 seconds, a "Hello!" message will appear on the screen regardless of system time changes. If you run the script like you would normally, you will see that it will work properly and my expectations are met. Now, run it again and immediately use "date +%T -s "HH:MM:SS"" where the time is >= 2 mins in the future. You will notice that the timer will latch immediately instead of waiting those 120 seconds before latching. I have read Lib/threading.py to a certain extent and it seems like Timer objects are using monotonic time already because they use Events which use Conditions themselves, which references a "_timer" function that is just an alias for time.monotonic as one can see at the top of the file. Then I checked out if the monotonic time works as expected (test_monotonic.py) by just jumping back and forth "in time", everything seemed to be normal. Am I making a mistake and if so, where? Thanks for any of your answers. -- Best regards Thomas Environment: I'm using Python 3.5.3 on Debian 9.1 "Stretch" on x86_64. ---------- components: Library (Lib) files: timer_testcase.py messages: 300765 nosy: winfreak priority: normal severity: normal status: open title: threading.Timer object is affected by changes to system time type: behavior versions: Python 3.5 Added file: http://bugs.python.org/file47096/timer_testcase.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 16:47:45 2017 From: report at bugs.python.org (Thomas Keppler) Date: Wed, 23 Aug 2017 20:47:45 +0000 Subject: [issue31267] threading.Timer object is affected by changes to system time In-Reply-To: <1503521255.96.0.0977006158294.issue31267@psf.upfronthosting.co.za> Message-ID: <1503521265.35.0.127709046824.issue31267@psf.upfronthosting.co.za> Changes by Thomas Keppler : Added file: http://bugs.python.org/file47097/test_monotonic.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 16:55:49 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 23 Aug 2017 20:55:49 +0000 Subject: [issue22536] subprocess should include filename in FileNotFoundError exception In-Reply-To: <1412210977.42.0.325510395327.issue22536@psf.upfronthosting.co.za> Message-ID: <1503521749.58.0.846313271718.issue22536@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- pull_requests: +3233 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 17:11:32 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 23 Aug 2017 21:11:32 +0000 Subject: [issue22536] subprocess should include filename in FileNotFoundError exception In-Reply-To: <1412210977.42.0.325510395327.issue22536@psf.upfronthosting.co.za> Message-ID: <1503522692.85.0.0217554215327.issue22536@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 18:21:33 2017 From: report at bugs.python.org (Isaac Elliott) Date: Wed, 23 Aug 2017 22:21:33 +0000 Subject: [issue31263] Assigning to subscript/slice of literal is permitted In-Reply-To: <1503464556.49.0.828859643321.issue31263@psf.upfronthosting.co.za> Message-ID: <1503526893.98.0.105310159146.issue31263@psf.upfronthosting.co.za> Isaac Elliott added the comment: Yes I would disallow a script such as `a = [0]; [5, a][1][:] = [3]` (note: your example of just `[5, a][1][:] = [3]` does not run, so I assumed it must be used in a situation like this) Evaluating the target of an assignment is unnecessary, we can syntactically determine whether some left hand side can be assigned to: * Identifiers are assignable (`a = 2`) * Attribute accesses are assignable, provided that the left of the dot is assignable (`a.foo = 2`, `a.b.c.foo`, etc) * Subscripts are assignable, provided that the outer expression is assignable (`a[1] = 2`, `a.foo[b] = 2`, `a[1][2][3] = 2`, `a.b[1].c[2] = 2`) * Lists are assignable, provided that all their elements are assignable (`[a,b,c] = [1,2,3]`) * Expression lists/tuples are assignable, provided that all their elements are assignable (`a, b = (1, 2)`, `(a,b,c) = (1,2,3)`) * Unpackings are assignable, provided that their argument is assignable (`*a, = [1,2,3]`, `a, *b = [1,2,3]`) * Slices are assignable, provided that the outer expression is assignable (`a[:] = [1,2,3]`, `a.foo[1:2] = [1]` * Everything else is not assignable (did I forget anything?) This can definitely be encoded as a context-free grammar, although I don't know if it will present conflicts in the parser generator. I do think it's worth it. Python is one of the most widely used programming languages, and it's our responsibility to ensure it behaves correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 18:28:08 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 23 Aug 2017 22:28:08 +0000 Subject: [issue31263] Assigning to subscript/slice of literal is permitted In-Reply-To: <1503464556.49.0.828859643321.issue31263@psf.upfronthosting.co.za> Message-ID: <1503527288.23.0.459877760565.issue31263@psf.upfronthosting.co.za> R. David Murray added the comment: If you would disallow "a = [0]; [5, a][1][:] = [3]", then your proposal will not be accepted, for backward compatibility reasons if nothing else. ---------- versions: +Python 3.7 -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 18:34:27 2017 From: report at bugs.python.org (Isaac Elliott) Date: Wed, 23 Aug 2017 22:34:27 +0000 Subject: [issue31263] Assigning to subscript/slice of literal is permitted In-Reply-To: <1503464556.49.0.828859643321.issue31263@psf.upfronthosting.co.za> Message-ID: <1503527667.44.0.248753883869.issue31263@psf.upfronthosting.co.za> Isaac Elliott added the comment: Does backward compatibility take priority over correct behavior? What process is followed when fixing a bug causes a breaking change? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 18:39:11 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 23 Aug 2017 22:39:11 +0000 Subject: [issue26256] Fast decimalisation and conversion to other bases In-Reply-To: <1454322513.41.0.794136944555.issue26256@psf.upfronthosting.co.za> Message-ID: <1503527951.62.0.676644792182.issue26256@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Hello, I came across this issue and was wondering if the FAQ section of the doc might be a good place to mention the presence of FFT, or actually fast number theoretic transform, as Stefan pointed out. I was also wondering if the short code snippet for the Mersenne prime might be included in the recipes as an example of what decimal is capable of? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 20:43:30 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Aug 2017 00:43:30 +0000 Subject: [issue26256] Fast decimalisation and conversion to other bases In-Reply-To: <1454322513.41.0.794136944555.issue26256@psf.upfronthosting.co.za> Message-ID: <1503535410.05.0.90009535234.issue26256@psf.upfronthosting.co.za> Raymond Hettinger added the comment: A couple of thoughts: * It is okay to add a couple lines to the decimal module docs noting a Cpython specific implementation detail that it uses better than expected algorithms which can payoff nicely when used with very large numbers. * Mersenne prime examples and whatnot belong external to our docs. I usually put my recipes and examples on the ASPN Python Cookbook. http://code.activestate.com/recipes/langs/python/ ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 21:25:16 2017 From: report at bugs.python.org (emin mamedov) Date: Thu, 24 Aug 2017 01:25:16 +0000 Subject: [issue31266] attribute error In-Reply-To: <1503517113.75.0.490210479447.issue31266@psf.upfronthosting.co.za> Message-ID: <1503537916.31.0.945258726057.issue31266@psf.upfronthosting.co.za> emin mamedov added the comment: Thank you Peter, problem has fixed. I think, python interpreter must understand if a "temp1.py" will start in same directory with file "re.py", this is not a native module for python and interpreter can ignore re.py from user directory and etc. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 21:36:07 2017 From: report at bugs.python.org (Alexander Mohr) Date: Thu, 24 Aug 2017 01:36:07 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503538567.19.0.314773778014.issue31095@psf.upfronthosting.co.za> Alexander Mohr added the comment: my vote is yes due to the defaultdict issue. We were hitting this in our prod env ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 22:20:52 2017 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 24 Aug 2017 02:20:52 +0000 Subject: [issue31264] Import Package/Module through HTTP/S repository In-Reply-To: <1503483482.35.0.941565014416.issue31264@psf.upfronthosting.co.za> Message-ID: <1503541252.62.0.359499359809.issue31264@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note that we're highly unlikely to ever accept a PEP to provide this natively, as it couples the process of runtime module loading too tightly to what should be private organisational details of the software publication process (domain names, repository names, etc). We already know from experience with Java component naming that these kinds of approaches simply don't age well for widely adopted software in a distributed development context, as they turn things that shouldn't have any software compatibility implications (renaming a development repository, moving to a different repository hosting provider, selling a company) into major API compatibility management headaches. While there are some reasonable applications for the feature when it comes to private software modules that are used only within a single (relatively small) organisation, the existence of httpimport also shows that there aren't any further changes needed to the core import system to enable it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 23:21:15 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 24 Aug 2017 03:21:15 +0000 Subject: [issue31263] Assigning to subscript/slice of literal is permitted In-Reply-To: <1503464556.49.0.828859643321.issue31263@psf.upfronthosting.co.za> Message-ID: <1503544875.36.0.17237794929.issue31263@psf.upfronthosting.co.za> R. David Murray added the comment: Sometimes it does, sometimes we make the change in a feature release, often after a deprecation period. But in this case there is doubt that the behavior is incorrect in the first place. This discussion should move to the python-ideas mailing list. I'm going to close the issue, at least for now. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 23 23:30:18 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 24 Aug 2017 03:30:18 +0000 Subject: [issue31264] Import Package/Module through HTTP/S repository In-Reply-To: <1503483482.35.0.941565014416.issue31264@psf.upfronthosting.co.za> Message-ID: <1503545418.3.0.880455919641.issue31264@psf.upfronthosting.co.za> R. David Murray added the comment: Indeed, I personally can't imagine a circumstance in which I'd want to use this feature. Even inside an org. It also has security implications, which would also make it a harder sell. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 01:55:20 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 Aug 2017 05:55:20 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503554120.15.0.862147342976.issue31095@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset a6296d34a478b4f697ea9db798146195075d496c by INADA Naoki in branch 'master': bpo-31095: fix potential crash during GC (GH-2974) https://github.com/python/cpython/commit/a6296d34a478b4f697ea9db798146195075d496c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 02:03:09 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 Aug 2017 06:03:09 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503554589.53.0.322989029018.issue31095@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +3234 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 02:10:34 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 Aug 2017 06:10:34 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503555034.81.0.780374059011.issue31095@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +3235 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 02:57:28 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 24 Aug 2017 06:57:28 +0000 Subject: [issue31263] Assigning to subscript/slice of literal is permitted In-Reply-To: <1503464556.49.0.828859643321.issue31263@psf.upfronthosting.co.za> Message-ID: <1503557848.92.0.910163977314.issue31263@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: I'm really curious about why exactly do you think that behavior is _incorrect_? Unfortunate, maybe. Similar to a mutable default argument. But it is completely consistent with Python semantics. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 03:04:21 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 Aug 2017 07:04:21 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503558261.13.0.442947930191.issue31095@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- pull_requests: +3236 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 03:05:20 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 Aug 2017 07:05:20 +0000 Subject: [issue31095] Checking all tp_dealloc with Py_TPFLAGS_HAVE_GC In-Reply-To: <1501566589.91.0.719711304494.issue31095@psf.upfronthosting.co.za> Message-ID: <1503558320.14.0.191746782916.issue31095@psf.upfronthosting.co.za> INADA Naoki added the comment: I opened backport PR for 3.6, 2.7 and 3.5. ---------- versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 06:38:51 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Aug 2017 10:38:51 +0000 Subject: [issue31267] threading.Timer object is affected by changes to system time In-Reply-To: <1503521255.96.0.0977006158294.issue31267@psf.upfronthosting.co.za> Message-ID: <1503571131.57.0.103960271291.issue31267@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 06:53:17 2017 From: report at bugs.python.org (desbma) Date: Thu, 24 Aug 2017 10:53:17 +0000 Subject: [issue31268] Inconsistent socket timeout exception Message-ID: <1503571997.66.0.245487150024.issue31268@psf.upfronthosting.co.za> New submission from desbma: When trying to connect a classic TCP socket to a non reachable peer, the exception reported is inconsistent if the socket has a timeout set. See the attached program, on my system (Arch Linux with Linux 4.9 & Python 3.6.2) it outputs: timeout timed out timeout timed out timeout timed out OSError [Errno 113] No route to host timeout timed out timeout timed out timeout timed out OSError [Errno 113] No route to host timeout timed out timeout timed out timeout timed out OSError [Errno 113] No route to host timeout timed out timeout timed out timeout timed out OSError [Errno 113] No route to host timeout timed out timeout timed out timeout timed out OSError [Errno 113] No route to host I expect one of the two exceptions to be thrown every time, not a mix of both. Thank you ---------- components: Library (Lib) files: socket_timeout.py messages: 300779 nosy: desbma priority: normal severity: normal status: open title: Inconsistent socket timeout exception type: behavior versions: Python 3.6 Added file: http://bugs.python.org/file47098/socket_timeout.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 07:13:20 2017 From: report at bugs.python.org (Stefan Krah) Date: Thu, 24 Aug 2017 11:13:20 +0000 Subject: [issue26256] Fast decimalisation and conversion to other bases In-Reply-To: <1454322513.41.0.794136944555.issue26256@psf.upfronthosting.co.za> Message-ID: <1503573200.77.0.940148803844.issue26256@psf.upfronthosting.co.za> Stefan Krah added the comment: pypy-5.8.0-beta0 (Python 3.5.3) is using a very nicely written CFFI wrapper for libmpdec, so it also has the fast bignums. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 07:20:10 2017 From: report at bugs.python.org (Stefan Krah) Date: Thu, 24 Aug 2017 11:20:10 +0000 Subject: [issue26256] Fast decimalisation and conversion to other bases In-Reply-To: <1454322513.41.0.794136944555.issue26256@psf.upfronthosting.co.za> Message-ID: <1503573610.39.0.320844482847.issue26256@psf.upfronthosting.co.za> Stefan Krah added the comment: What needs to be mentioned though is that the context has to be set for unrounded calculations: c = getcontext() c.prec = MAX_PREC c.Emax = MAX_EMAX c.Emin = MIN_EMIN Otherwise some people believe that the bignums are just rounded floating point arithmetic that is expected to be fast (I've seen this misconception somewhere, perhaps on Stackoverflow). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 08:51:11 2017 From: report at bugs.python.org (INADA Naoki) Date: Thu, 24 Aug 2017 12:51:11 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503579071.65.0.534814028435.issue31265@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 09:23:52 2017 From: report at bugs.python.org (Karine) Date: Thu, 24 Aug 2017 13:23:52 +0000 Subject: [issue31269] bug in islink() and is_simlink() Message-ID: <1503581032.08.0.747369734546.issue31269@psf.upfronthosting.co.za> New submission from Karine: Hi, I found a problem which can be a bug and want to inform you. it seems os.islink() and PATH(mypath).is_symlink() functions doen't work correct when there is linked folder inside the path: For example I have the following path: a/b/c/test.txt if my c folder is link these 2 functions will not show that this path is link Only if i remove test.txt and use a/b/c path is shows that path is link. Seems these functions checks only last part of given path not full path and doesn't find if there is link in somewere inside path and shows not correct result. Interesting to know your opinion regarding it. ---------- messages: 300782 nosy: karaV priority: normal severity: normal status: open title: bug in islink() and is_simlink() type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 09:25:38 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 24 Aug 2017 13:25:38 +0000 Subject: [issue31268] Inconsistent socket timeout exception In-Reply-To: <1503571997.66.0.245487150024.issue31268@psf.upfronthosting.co.za> Message-ID: <1503581138.11.0.896385039882.issue31268@psf.upfronthosting.co.za> R. David Murray added the comment: Have you tried the equivalent C program? I'm guessing this is happening at the OS layer and Python is just reporting it. On my system a timeout of 5 will always report the OS error. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 09:27:59 2017 From: report at bugs.python.org (Karine) Date: Thu, 24 Aug 2017 13:27:59 +0000 Subject: [issue31269] bug in islink() and is_symlink() In-Reply-To: <1503581032.08.0.747369734546.issue31269@psf.upfronthosting.co.za> Message-ID: <1503581279.0.0.93495579302.issue31269@psf.upfronthosting.co.za> Changes by Karine : ---------- title: bug in islink() and is_simlink() -> bug in islink() and is_symlink() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 09:37:57 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 24 Aug 2017 13:37:57 +0000 Subject: [issue31269] bug in islink() and is_symlink() In-Reply-To: <1503581032.08.0.747369734546.issue31269@psf.upfronthosting.co.za> Message-ID: <1503581877.99.0.566410953518.issue31269@psf.upfronthosting.co.za> R. David Murray added the comment: The docs say, eg: "Return True if the path points to a symbolic link". The path points to a file system object, and it is the object that is being checked, not each component of the path used to get to that object. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 10:08:53 2017 From: report at bugs.python.org (Karine) Date: Thu, 24 Aug 2017 14:08:53 +0000 Subject: [issue31269] bug in islink() and is_symlink() In-Reply-To: <1503581877.99.0.566410953518.issue31269@psf.upfronthosting.co.za> Message-ID: <1503583730.350271802@f380.i.mail.ru> Karine added the comment: Hi David Thanks for support. one question. I couldn't find a function which will check full path is link or not. Is there any known function> >???????, 24 ??????? 2017, 17:38 +04:00 ?? "R. David Murray" : > > >R. David Murray added the comment: > >The docs say, eg: "Return True if the path points to a symbolic link". The path points to a file system object, and it is the object that is being checked, not each component of the path used to get to that object. > >---------- >nosy: +r.david.murray >resolution: -> not a bug >stage: -> resolved >status: open -> closed > >_______________________________________ >Python tracker < report at bugs.python.org > >< http://bugs.python.org/issue31269 > >_______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 10:31:18 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 24 Aug 2017 14:31:18 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1503585078.52.0.825712688068.issue28261@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3237 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 10:42:23 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 24 Aug 2017 14:42:23 +0000 Subject: [issue31269] bug in islink() and is_symlink() In-Reply-To: <1503581032.08.0.747369734546.issue31269@psf.upfronthosting.co.za> Message-ID: <1503585743.46.0.51805035877.issue31269@psf.upfronthosting.co.za> R. David Murray added the comment: I would phrase that as "check if any of the components of the path are links", at which point one "obvious"[*] answer is "any(x.is_symlink() for x in [*mypath.parents, mypath])". If the path is absolute, you could use "not (mypath.resolve() == mypath)". [*] I put that in quotes because it is only obvious once you have a non-trivial amount of experience with programming in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 11:15:57 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 24 Aug 2017 15:15:57 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1503587757.31.0.914984979954.issue12067@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3238 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 11:25:42 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 24 Aug 2017 15:25:42 +0000 Subject: [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1503588342.69.0.694128682875.issue12067@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I've created a PR for the changes to test_compare from v16 of the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 12:03:33 2017 From: report at bugs.python.org (Raphael Michel) Date: Thu, 24 Aug 2017 16:03:33 +0000 Subject: [issue31270] Simplify documentation of itertools.zip_longest Message-ID: <1503590613.37.0.607996999117.issue31270@psf.upfronthosting.co.za> New submission from Raphael Michel: The documentation given for itertools.zip_longest contains a "roughly equivalent" pure-python implementation of the function that is intended to help the user understand what zip_longest does on a functional level. However, the given implementation is very complicated to read for newcomers and experienced Python programmers alike, as it uses a custom-defined exception for control flow handling, a nested function, a condition that always is true if any arguments are passed ("while iterators"), as well as two other non-trivial functions from itertools (chain and repeat). For future reference, this is the currently given implementation: def zip_longest(*args, **kwds): # zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D- fillvalue = kwds.get('fillvalue') iterators = [iter(it) for it in args] while True: exhausted = 0 values = [] for it in iterators: try: values.append(next(it)) except StopIteration: values.append(fillvalue) exhausted += 1 if exhausted < len(args): yield tuple(values) else: break This is way more complex than necessary to teach the concept of zip_longest. With this issue, I will submit a pull request with a new example implementation that seems to be the same level of "roughly equivalent" but is much easier to read, since it only uses two loops and now complicated flow def zip_longest(*args, **kwds): # zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D- fillvalue = kwds.get('fillvalue') iterators = [iter(it) for it in args] while True: exhausted = 0 values = [] for it in iterators: try: values.append(next(it)) except StopIteration: values.append(fillvalue) exhausted += 1 if exhausted < len(args): yield tuple(values) else: break Looking at the C code of the actual implementation, I don't see that any one of the two implementations is obviously "more equivalent". I'm unsure about performance -- I haven't tried them on that but I don't think that's the point of this learning implementation. I ran all tests from Lib/test/test_itertools.py against both the old and the new implementation. The new implementation fails at 3 tests, while the old implementation failed at four. Two of the remaining failures are related to TypeErrors not being thrown on invalid input, one of them is related to pickling the resulting object. I believe all three of them are fine to ignore in this sample, as it is not relevant to the documentation purpose. Therefore, I believe the documentation should be changed like suggested. I'd be happy for any feedback or further ideas to improve its readability! ---------- assignee: docs at python components: Documentation messages: 300788 nosy: docs at python, rami priority: normal severity: normal status: open title: Simplify documentation of itertools.zip_longest type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 12:06:32 2017 From: report at bugs.python.org (Raphael Michel) Date: Thu, 24 Aug 2017 16:06:32 +0000 Subject: [issue31270] Simplify documentation of itertools.zip_longest In-Reply-To: <1503590613.37.0.607996999117.issue31270@psf.upfronthosting.co.za> Message-ID: <1503590792.62.0.669505384214.issue31270@psf.upfronthosting.co.za> Changes by Raphael Michel : ---------- pull_requests: +3239 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 12:15:04 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Aug 2017 16:15:04 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503591304.22.0.368990819292.issue31254@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If someone wants to submit a PR, it would help judge the complexity and fragility of adding support for this. I cannot think of any problem upfront myself, but you're right that weak containers have been very difficult to make robust against various conditions (and it's probably not over yet). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 12:19:31 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 24 Aug 2017 16:19:31 +0000 Subject: [issue31270] Simplify documentation of itertools.zip_longest In-Reply-To: <1503590613.37.0.607996999117.issue31270@psf.upfronthosting.co.za> Message-ID: <1503591571.05.0.432323065412.issue31270@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 12:30:23 2017 From: report at bugs.python.org (Raphael Michel) Date: Thu, 24 Aug 2017 16:30:23 +0000 Subject: [issue31270] Simplify documentation of itertools.zip_longest In-Reply-To: <1503590613.37.0.607996999117.issue31270@psf.upfronthosting.co.za> Message-ID: <1503592223.48.0.262016465806.issue31270@psf.upfronthosting.co.za> Raphael Michel added the comment: I just noticed that in my post I accidentally pasted MY implementation twice instead of the old one, sorry for that. Here's the old one for quick comparison: class ZipExhausted(Exception): pass def zip_longest(*args, **kwds): # zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D- fillvalue = kwds.get('fillvalue') counter = len(args) - 1 def sentinel(): nonlocal counter if not counter: raise ZipExhausted counter -= 1 yield fillvalue fillers = repeat(fillvalue) iterators = [chain(it, sentinel(), fillers) for it in args] try: while iterators: yield tuple(map(next, iterators)) except ZipExhausted: pass ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 12:43:58 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 24 Aug 2017 16:43:58 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1503593038.46.0.478737349043.issue23835@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New changeset a5fab17fc11433b2418f626dc51e8a3d07b198ca by ?ukasz Langa in branch 'master': bpo-23835: Restore legacy defaults= behavior for RawConfigParser (#3191) https://github.com/python/cpython/commit/a5fab17fc11433b2418f626dc51e8a3d07b198ca ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 12:51:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Aug 2017 16:51:26 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1503593486.49.0.702751876132.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 13614e375cc3637cf1311733d453df6107e964ea by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-28261: fix err msgs where PyArg_ParseTuple is used to parse normal tuples (leftovers) (#3198) https://github.com/python/cpython/commit/13614e375cc3637cf1311733d453df6107e964ea ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 13:45:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 Aug 2017 17:45:53 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1503596753.65.0.620218359161.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The main refactoring of ConfigDialog into multiple classes is done. Since you kept this patch up to date with the changes, I will review it next, before making further changing to individual tab pages. On problem with implementing some features as extensions is that associated keybindings are global to all keysets, instead of being specific to one keyset. This meant that the defaults were necessarily the same for Windows, *nix, and OSX. (Not necessarily bad, but inflexible.) This means that any change changes the supposedly fixed built-in keysets and that users cannot try out different bindings in different custom keysets. This strikes me a something of a bug, so I am looking more favorably at moving all keybindings (other than true, 3rd-party extensions) to config-keys.def/cfg. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 14:01:02 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Aug 2017 18:01:02 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503597662.11.0.36358839416.issue31254@psf.upfronthosting.co.za> Raymond Hettinger added the comment: We should still ask about use cases though. Without a motivating use case, why churn the code, complexify the API (possibly making it more tricky to use), and risk introducing bugs? AFAICT, the OP's sole motivation was "still, it would seem preferable ..." which is no more compelling than the usual "it might be nice if ...". The weak reference containers have been around for a long time and I don't think anyone has ever reported that they actually needed this functionality. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 14:01:39 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Aug 2017 18:01:39 +0000 Subject: [issue31270] Simplify documentation of itertools.zip_longest In-Reply-To: <1503590613.37.0.607996999117.issue31270@psf.upfronthosting.co.za> Message-ID: <1503597699.29.0.84295906045.issue31270@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 24 14:06:29 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 24 Aug 2017 18:06:29 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write Message-ID: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> New submission from Oren Milman: currently, the following causes an assertion in Modules/_io/textio.c in _io_TextIOWrapper_write_impl() to fail: import codecs import io class BadEncoder(): def encode(self, dummy): return 42 def _get_bad_encoder(dummy): return BadEncoder() quopri = codecs.lookup("quopri") quopri._is_text_encoding = True quopri.incrementalencoder = _get_bad_encoder t = io.TextIOWrapper(io.BytesIO(b'foo'), encoding="quopri") t.write('bar') this is because _io_TextIOWrapper_write_impl() doesn't check whether the value returned by encoder's encode() is a bytes object. (I would open a PR to fix that soon.) ---------- components: IO messages: 300795 nosy: Oren Milman priority: normal severity: normal status: open title: an assertion failure in io.TextIOWrapper.write type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 14:30:23 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 24 Aug 2017 18:30:23 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503599423.25.0.693356258834.issue31271@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 14:33:44 2017 From: report at bugs.python.org (Steve Dower) Date: Thu, 24 Aug 2017 18:33:44 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1503599624.95.0.880472405691.issue29741@psf.upfronthosting.co.za> Steve Dower added the comment: New changeset de50360ac2fec81dbf733f6c3c739b39a8822a39 by Steve Dower (Oren Milman) in branch 'master': bpo-29741: Update some methods in the _pyio module to also accept integer types. Patch by Oren Milman. (#560) https://github.com/python/cpython/commit/de50360ac2fec81dbf733f6c3c739b39a8822a39 ---------- nosy: +steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 14:34:24 2017 From: report at bugs.python.org (Ilia Korvigo) Date: Thu, 24 Aug 2017 18:34:24 +0000 Subject: [issue31272] typing module conflicts with __slots__-classes Message-ID: <1503599664.93.0.449415380288.issue31272@psf.upfronthosting.co.za> New submission from Ilia Korvigo: I've got conflicts between Python's typing system and `__slots__`. Here is a small reproducible example. from typing import TypeVar, Generic, Sequence T = TypeVar("T") class TestGeneric(Sequence, Generic[T]): __slots__ = ("test",) def __init__(self, test: T): self.test = [test] def __iter__(self): return iter(self.test) def __len__(self): return len(self.test) def __contains__(self, item): return item in self.test def __getitem__(self, _): return self.test[0] Now whenever I try to specify a content type, e.g. V = TestGeneric[int] I get ValueError: 'test' in __slots__ conflicts with class variable I use `Generics` in classes without slots a lot, hence I think this error has to be linked to `__slots__`. Moreover, the same class works fine, if you remove the `__slots__` ---------- components: Library (Lib) messages: 300797 nosy: grayfall priority: normal severity: normal status: open title: typing module conflicts with __slots__-classes type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 14:55:10 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Thu, 24 Aug 2017 18:55:10 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1503600910.39.0.248070728937.issue27099@psf.upfronthosting.co.za> Charles Wohlganger added the comment: I am not sure I understand your concern. As part of mainlining the extensions, all of their keybindings were moved to config-keys.def . There is nothing to prevent users from changing the keybindings or preventing us from making the defaults different across the different default key sets. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 15:08:54 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 24 Aug 2017 19:08:54 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503601734.15.0.104123158582.issue31271@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3240 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 15:32:34 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 24 Aug 2017 19:32:34 +0000 Subject: [issue31270] Simplify documentation of itertools.zip_longest In-Reply-To: <1503590613.37.0.607996999117.issue31270@psf.upfronthosting.co.za> Message-ID: <1503603154.36.0.9219785273.issue31270@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for wanting to improve the documentation. Raymond will address this definitively, but unless I'm mistaken part of the purpose of the examples is to show how the various itertools can be used. If that is true, then in the context of the overall itertools documentation I think the current example has more teaching value than your suggested revision. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 15:53:45 2017 From: report at bugs.python.org (Antony Lee) Date: Thu, 24 Aug 2017 19:53:45 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503604425.22.0.540161342623.issue31254@psf.upfronthosting.co.za> Antony Lee added the comment: The use case is to generate a mapping of weakly-held objects to unique ids, with something like id_map = WeakKeyDictionaryWithMissing(lambda *, _counter=itertools.count(): next(_counter)) Of course, as always when using defaultdict, it is easy enough to instead implement this by manually checking if the key is present and store a new id in this case -- but this is as well an argument for not having defaultdict in the first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 16:11:35 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Thu, 24 Aug 2017 20:11:35 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503605495.1.0.156596539564.issue31271@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: I can't reproduce this on 3.6.0. Is this on 3.7 only? ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 16:37:13 2017 From: report at bugs.python.org (Nathan Buckner) Date: Thu, 24 Aug 2017 20:37:13 +0000 Subject: [issue31273] Unicode support in TestCase.skip Message-ID: <1503607033.04.0.29955978966.issue31273@psf.upfronthosting.co.za> New submission from Nathan Buckner: Unicode support for TestCase.skip is broken because the caught SkipTest exception is passed through a str call. except SkipTest as e: self._addSkip(result, str(e)) Could be fixed with by changing to unicode(e) ---------- components: Tests, Unicode files: issue.txt messages: 300802 nosy: Nathan Buckner, ezio.melotti, haypo priority: normal severity: normal status: open title: Unicode support in TestCase.skip type: crash versions: Python 2.7 Added file: http://bugs.python.org/file47099/issue.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 17:11:56 2017 From: report at bugs.python.org (desbma) Date: Thu, 24 Aug 2017 21:11:56 +0000 Subject: [issue31268] Inconsistent socket timeout exception In-Reply-To: <1503571997.66.0.245487150024.issue31268@psf.upfronthosting.co.za> Message-ID: <1503609116.34.0.359429605658.issue31268@psf.upfronthosting.co.za> desbma added the comment: Yes, you are right: I tried with a small C program, and compared with strace log of the Python program. In both cases poll sometimes returns -1 (error), or sometimes 0 (timeout). This is a weird behavior (at least for me) of the TCP stack, but clearly Python is not the cause so I am closing this issue. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 17:19:41 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 Aug 2017 21:19:41 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1503609581.41.0.939712577225.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Before reading the patch, more thoughts on the features, options, and behavior: nothing is Shell only; codecontext, rstrip, and runscript are properly limited to editors; the others are enabled for both. I think paragraph could have been editor only, but I would not enforce that now. I want current enable defaults to be build-in, with needed disabling handled otherwise. autocomplete: popupwait is needed, a large value will disable. (In root.after(n, func), a negative delay is the same as no delay.) codecontext: has multiple bugs, including the usage of 'visible', which should no longer be used; see *22703. I think the actual number of lines should be variable, up to numlines. Implementing that would be another issue, but numlines = 0 should disable the feature. (This is interpreted the same as numlines=1 in current IDLE when codecontext is enabled.) The menu entry should continue to toggle code context for the current window, but should not set 'visible'. Some sort of distinct highlighting is needed. Adding new shortcuts, such as for code-context, is not part of this issue. There are other menu entries, such as 'Recent files' that need a shortcut just as much or more. This should be a separate issue. paragraph: max_width is needed. parenmatch: 'style' is needed. I presume some timer is. I am not sure why this particular instance of an audible signal for error (as opposed to SyntaxError, for instance) is needed. Add a new, distinct highlighting for paren matching should be a separate issue zoomheight: useful when it works right, but more or less useless on Windows as it zooms under the taskbar, obscuring the status bar. How about on other systems? On Windows 10, pulling the top of the window up to the top of the screen or the bottom down to (but not under) the taskbar zooms the opposite border. Pulling either border away pulls the opposite away also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 17:20:05 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 24 Aug 2017 21:20:05 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503609605.38.0.633187046961.issue31271@psf.upfronthosting.co.za> Oren Milman added the comment: Just checked on current 3.6 on my Windows 10. The assertion failes, and it is in line 1337. oh my. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 17:45:27 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 24 Aug 2017 21:45:27 +0000 Subject: [issue31268] Inconsistent socket timeout exception In-Reply-To: <1503571997.66.0.245487150024.issue31268@psf.upfronthosting.co.za> Message-ID: <1503611127.31.0.565505451622.issue31268@psf.upfronthosting.co.za> R. David Murray added the comment: I'm not a networking expert at this level, but I believe what is happening here is that the network stack does an arp, and has a timeout waiting for the arp response that is longer than your socket timeout. So at some point its arp timeout expires while the socket timeout hasn't, and it reports that there's no route to the host and resets its state. Then on the *next* socket request it sends another arp request (because the host may have appeared since the last time it checked), and the cycle repeats. I think this is a reasonable way for it to behave when the socket timeout is shorter than the arp response timeout, because otherwise you'd either lose the information that there's no route to the host, or you'd lose the association between "open the socket" and "send an arp". But like I said, I'm not an expert at the layer 2 stuff. I suppose in theory one could associate arp requests with socket operations one-for-one, but that would require more memory and I'm not surprised that the network stack doesn't go that route. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 17:56:24 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 Aug 2017 21:56:24 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1503611784.35.0.411948190235.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My 'concern' was in relation to the old situation and why I have become more willing to change default behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 17:58:27 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 24 Aug 2017 21:58:27 +0000 Subject: [issue22536] subprocess should include filename in FileNotFoundError exception In-Reply-To: <1412210977.42.0.325510395327.issue22536@psf.upfronthosting.co.za> Message-ID: <1503611907.53.0.0596663510504.issue22536@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 8621bb5d93239316f97281826461b85072ff6db7 by Gregory P. Smith in branch 'master': bpo-22536: Set the filename in FileNotFoundError. (#3194) https://github.com/python/cpython/commit/8621bb5d93239316f97281826461b85072ff6db7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 18:07:47 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Thu, 24 Aug 2017 22:07:47 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1503612467.08.0.821193941852.issue27099@psf.upfronthosting.co.za> Charles Wohlganger added the comment: ZoomHeight has been put back into being an extension. This was because configdialog assumes autoexpand was an extension, and the idleconf tests all need at least one extension to exist to be useful. Zoomheight is pointless in almost any modern desktop environment, but it's very useful as an example extension and as a model extension for tests. I'm going to fix autocomplete and paragraph options. I had their options in the general tab in an earlier build, but it looks like I accidentally reverted it. The rest of the options are in the highlights tab. The bell was in the extension before I got to it. Fixing that and whatever bugs are in codecontext seems outside the scope of this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 18:16:03 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 24 Aug 2017 22:16:03 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503612963.46.0.963905197789.issue31254@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Of course, as always when using defaultdict, it is easy enough to instead implement this by manually checking if the key is present and store a new id in this case Or, better, use setdefault(), since manually checking suffers from a race condition in the weak dictionary case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 18:24:14 2017 From: report at bugs.python.org (desbma) Date: Thu, 24 Aug 2017 22:24:14 +0000 Subject: [issue31268] Inconsistent socket timeout exception In-Reply-To: <1503571997.66.0.245487150024.issue31268@psf.upfronthosting.co.za> Message-ID: <1503613454.38.0.768230687129.issue31268@psf.upfronthosting.co.za> desbma added the comment: Thanks for the insight. Well the most logical thing for me for the OS to do, would have been: 1. Send an ARP request 2. At the first poll call, report a timeout if no response was received 3. Repeat to 2. until the destination is considered unreachable 4. At the next connect call, fire off another ARP request 5. At the next poll call, if the response to the ARP sent in 5 was not received, report "No route to host" immediately because it is the last cached result (from 3) 6. Always report "No route to host" for the following calls (even if new ARP requests are sent) With "ip -4 neigh" I can see that the neighbor is in FAILED state when the OSError error is reported, but immediately goes to INCOMPLETE state at the next connect call (because another ARP request is sent). The behavior is the same with an IPv6 socket. By re-reading the NDP RFC (https://tools.ietf.org/html/rfc4861) I can understand why implementations behave like that. The RFC does not define the "FAILED" neighbor cache state, so "resolution failed" means "neighbor is not in the cache". Linux has a delayed garbage collection for the neighbor cache, which is why we can sometimes see entries in FAILED state, but when a new socket tries to connect to the peer, the resolution starts again like nothing happened before. So it's weird, but it conforms to the standard :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 19:05:39 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 24 Aug 2017 23:05:39 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1503615939.11.0.930160462297.issue30781@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I rebased my PR and updated the tests so that they would pass. I knew 'bg' on the frame would be changed, but I was surprised by the 'state' changes. 'normal' only exists for compatibility and isn't one of the states to check in the tests; instead, 'disabled' and '!disabled' set the state and either 'disabled' appears in the tuple or it doesn't appear. I suppose I could have changed the tests to be assertNotIn. https://docs.python.org/3/library/tkinter.ttk.html#widget-states ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 19:15:07 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 24 Aug 2017 23:15:07 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1503616507.54.0.190905016444.issue27099@psf.upfronthosting.co.za> Cheryl Sabella added the comment: zoomheight is OK on Ubuntu. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 19:37:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 24 Aug 2017 23:37:19 +0000 Subject: [issue22536] subprocess should include filename in FileNotFoundError exception In-Reply-To: <1412210977.42.0.325510395327.issue22536@psf.upfronthosting.co.za> Message-ID: <1503617839.9.0.911718307638.issue22536@psf.upfronthosting.co.za> STINNER Victor added the comment: Your change makes test_subprocess f1iling on Windows. Example: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/891/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 20:06:48 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 25 Aug 2017 00:06:48 +0000 Subject: [issue22536] subprocess should include filename in FileNotFoundError exception In-Reply-To: <1412210977.42.0.325510395327.issue22536@psf.upfronthosting.co.za> Message-ID: <1503619608.15.0.582737484101.issue22536@psf.upfronthosting.co.za> Gregory P. Smith added the comment: right, the test needs to be excluded there. fixing... (bummer windows wasn't in the CI) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 20:12:42 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 25 Aug 2017 00:12:42 +0000 Subject: [issue22536] subprocess should include filename in FileNotFoundError exception In-Reply-To: <1412210977.42.0.325510395327.issue22536@psf.upfronthosting.co.za> Message-ID: <1503619962.14.0.757136398584.issue22536@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- pull_requests: +3241 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 20:31:23 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 25 Aug 2017 00:31:23 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503621083.66.0.735107460495.issue31254@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [Anthony Lee] > The use case is to generate a mapping of weakly-held objects > to unique ids, with something like > > id_map = WeakKeyDictionaryWithMissing(lambda *, _counter=itertools.count(): > next(_counter)) Where are you keeping hard references to the keys? ISTM, you only have a weak reference, so the object has no hard references. Entries in the dictionary are discarded when there is no longer a strong reference to the key. Why did you decide to use a dictionary? AFAICT, nothing external to the dictionary knows about the keys so there is no way to do lookups. Overall, it doesn't seem like a WeakKeyDictionary with a __missing__() method is the right approach for this problem. It makes me question where it makes any sense at all to auto-generate missing keys for a WeakKeyDictionary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 21:31:42 2017 From: report at bugs.python.org (Antony Lee) Date: Fri, 25 Aug 2017 01:31:42 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503624702.21.0.121421861142.issue31254@psf.upfronthosting.co.za> Antony Lee added the comment: The original example did not cover the use case and was only there to show the current behavior. The real use case is more something like obj = (get obj as argument to function, caller has a hard reference to it) uid = d[obj] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 23:04:22 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 25 Aug 2017 03:04:22 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503630262.78.0.372529242035.issue31254@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Just for comparison, what is your best solution without the proposed API change? It is helpful to see user code before-and-after to know whether there is an improvement that makes the change worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 23:21:17 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 25 Aug 2017 03:21:17 +0000 Subject: [issue31274] Support building against homebrew on macOS Message-ID: <1503631277.04.0.477315810224.issue31274@psf.upfronthosting.co.za> New submission from Barry A. Warsaw: The devguide does touch on how to build Python from source using homebrew installed libraries on macOS, although I found it to be 1) a bit incomplete; 2) not so easy to discover. It might make sense to modify configure to autodetect homebrew, or to have a switch to enable linking against homebrew libraries. Barring that, I'd like to at least update the devguide to include details on how to also build sqlite3 and zlib modules. ---------- assignee: docs at python components: Build, Documentation messages: 300819 nosy: barry, docs at python priority: normal severity: normal status: open title: Support building against homebrew on macOS versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 23:35:10 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 25 Aug 2017 03:35:10 +0000 Subject: [issue31274] Support building against homebrew on macOS In-Reply-To: <1503631277.04.0.477315810224.issue31274@psf.upfronthosting.co.za> Message-ID: <1503632110.22.0.799025925804.issue31274@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: If you're proposing changes to the devguide, then please file the issue at https://github.com/python/devguide :) ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 24 23:52:28 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 25 Aug 2017 03:52:28 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503633148.16.0.332850574969.issue31254@psf.upfronthosting.co.za> Raymond Hettinger added the comment: One way to do it: ----------------- diff --git a/Lib/weakref.py b/Lib/weakref.py index 1802f32a20..18f26ea8b2 100644 --- a/Lib/weakref.py +++ b/Lib/weakref.py @@ -136,6 +136,8 @@ class WeakValueDictionary(collections.abc.MutableMapping): self._commit_removals() o = self.data[key]() if o is None: + if hasattr(self, '__missing__'): + return self.__missing__(key) raise KeyError(key) else: return o Another way to do it: --------------------- diff --git a/Lib/weakref.py b/Lib/weakref.py index 1802f32a20..9951b0fb06 100644 --- a/Lib/weakref.py +++ b/Lib/weakref.py @@ -131,12 +131,15 @@ class WeakValueDictionary(collections.abc.MutableMapping): key = l.pop() _remove_dead_weakref(d, key) + def __missing__(self, key): + raise KeyError(key) + def __getitem__(self, key): if self._pending_removals: self._commit_removals() o = self.data[key]() if o is None: - raise KeyError(key) + return self.__missing__(key) else: return o ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 00:16:50 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Aug 2017 04:16:50 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1503634610.21.0.229226199132.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The transferred options belong on the General tab. I have already planned to condense what is there as part of #31051. I held off because I did not know if it would conflict with your patch. Since, as far as I can tell, your patch currently does not touch GenPage, I will change it tomorrow to make room for new stuff and think about what layout I would prefer at least for the present. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 00:49:55 2017 From: report at bugs.python.org (Kubilay Kocak) Date: Fri, 25 Aug 2017 04:49:55 +0000 Subject: [issue30188] test_nntplib: random EOFError in setUpClass() In-Reply-To: <1493305628.27.0.924756319794.issue30188@psf.upfronthosting.co.za> Message-ID: <1503636595.28.0.719249518112.issue30188@psf.upfronthosting.co.za> Kubilay Kocak added the comment: bpo-30188 (and bpo-30188 ?) need merging to 3.6/3.5, 3.6 just failed with: ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:748) Full build log attached ---------- nosy: +koobs resolution: fixed -> stage: resolved -> backport needed status: closed -> open Added file: http://bugs.python.org/file47100/koobs-freebsd-current-debug.py36.build.419.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 00:52:18 2017 From: report at bugs.python.org (Kubilay Kocak) Date: Fri, 25 Aug 2017 04:52:18 +0000 Subject: [issue30188] test_nntplib: random EOFError in setUpClass() In-Reply-To: <1493305628.27.0.924756319794.issue30188@psf.upfronthosting.co.za> Message-ID: <1503636738.03.0.218960185443.issue30188@psf.upfronthosting.co.za> Kubilay Kocak added the comment: Apologies I meant 5b4feb7e86 by haypo and 067931dd95d (also needs merge?) by inada.naoki ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 01:07:08 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 25 Aug 2017 05:07:08 +0000 Subject: [issue14976] queue.Queue() is not reentrant, so signals and GC can cause deadlocks In-Reply-To: <1338540186.86.0.989988943379.issue14976@psf.upfronthosting.co.za> Message-ID: <1503637628.61.0.960177042502.issue14976@psf.upfronthosting.co.za> Raymond Hettinger added the comment: [Antoine Pitrou] > So perhaps we need C code after all. This matches my experience with functools.lru_cache() where I used an RLock() to handle reentrancy. That by itself was insufficient. I also had to make otherwise unnecessary variable assignments to hang onto object references to avoid a decref triggering arbitrary Python code from reentering before the links were all in a consistent state. Further, I had to create a key wrapper to make sure a potentially reentrant __hash__() call wouldn't be made before the state was fully updated. Even then, a potentially reentrant __eq__() call couldn't be avoided, so I had to re-order the operations to make sure this was the last call after the other state updates. This defended against all normal code, but all these measures still could not defend against signals or a GC invocation of __del__, either of which can happen at any time. On the plus side, we now have a C version of functools.lru_cache() that is protected somewhat by the GIL. On the minus side, it was hard to get right. Even with the pure python code as a model, the person who wrote the C code didn't fully think through all sources of reentrancy and wrote buggy code that shipped in 3.5 and 3.6 (resulting in normal code code triggering hard-to-reproduce reentrancy bugs). The lesson here is that while the C code can be written correctly, it isn't easy to do and it is hard to notice when it is incorrect. One other thought: Given that __del__() can be invoked at almost any time and can potentially call any other piece of Python code, we should consider turning every lock into an rlock. Also, there should be some guidance on __del__() advising considerable restraint on what gets called. The world is likely full of pure Python code that can't defend itself against arbitrary re-entrancy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 01:35:20 2017 From: report at bugs.python.org (Antony Lee) Date: Fri, 25 Aug 2017 05:35:20 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503639320.56.0.307957119411.issue31254@psf.upfronthosting.co.za> Antony Lee added the comment: For my use case, it was easy enough to wrap the `uid = d[obj]` in a try... catch... plus locking. Using setdefault would cause the counter to be incremented every time. In truth, here I did not care about having consecutive uids, so that would have worked just as well. In real truth, it later turned out that I didn't really need numeric uids anyways; I could just use weakrefs to the object themselves instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 01:47:15 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Aug 2017 05:47:15 +0000 Subject: [issue30809] IDLE parenmatch - highlighting options In-Reply-To: <1498768567.92.0.13204753323.issue30809@psf.upfronthosting.co.za> Message-ID: <1503640035.09.0.600559880734.issue30809@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I said on #27099, please do not include new options with the transfer patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 02:39:09 2017 From: report at bugs.python.org (Karine) Date: Fri, 25 Aug 2017 06:39:09 +0000 Subject: [issue31269] bug in islink() and is_symlink() In-Reply-To: <1503585743.46.0.51805035877.issue31269@psf.upfronthosting.co.za> Message-ID: <1503643145.573260791@f418.i.mail.ru> Karine added the comment: Thanks a lot David >???????, 24 ??????? 2017, 18:42 +04:00 ?? "R. David Murray" : > > >R. David Murray added the comment: > >I would phrase that as "check if any of the components of the path are links", at which point one "obvious"[*] answer is "any(x.is_symlink() for x in [*mypath.parents, mypath])". If the path is absolute, you could use "not (mypath.resolve() == mypath)". > >[*] I put that in quotes because it is only obvious once you have a non-trivial amount of experience with programming in Python. > >---------- > >_______________________________________ >Python tracker < report at bugs.python.org > >< http://bugs.python.org/issue31269 > >_______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 03:48:40 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 25 Aug 2017 07:48:40 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503647320.69.0.582462591921.issue31271@psf.upfronthosting.co.za> Oren Milman added the comment: As Serhiy pointed out on github, the assertion failure can be easily reproduced by the following: import codecs import io rot13 = codecs.lookup("rot13") rot13._is_text_encoding = True t = io.TextIOWrapper(io.BytesIO(b'foo'), encoding="rot13") t.write('bar') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 05:33:42 2017 From: report at bugs.python.org (Raphael Michel) Date: Fri, 25 Aug 2017 09:33:42 +0000 Subject: [issue31270] Simplify documentation of itertools.zip_longest In-Reply-To: <1503590613.37.0.607996999117.issue31270@psf.upfronthosting.co.za> Message-ID: <1503653622.92.0.986650587072.issue31270@psf.upfronthosting.co.za> Raphael Michel added the comment: Well, I could think of a way to still use repeat() here that also is pretty clean except for the fact that it fails if all inputs to zip_longest are repeat() iterators themselves (which would here lead to an empty iterator while it would otherwise lead to an infinite one): def zip_longest(*args, **kwds): # zip_longest('ABCD', 'xy', fillvalue='-') --> Ax By C- D- fillvalue = kwds.get('fillvalue') iterators = [iter(it) for it in args] while True: values = [] for i, it in enumerate(iterators): try: values.append(next(it)) except StopIteration: values.append(fillvalue) iterators[i] = repeat(fillvalue) if all(isinstance(it, repeat) for it in iterators): break else: yield tuple(values) Keeping chain() in use here just for the sake of using it is not worth it, I believe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 06:13:02 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 25 Aug 2017 10:13:02 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503655982.87.0.943458420692.issue31254@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Antony, if you write (line numbers added for clarity): 1. try: 2. d[obj] 3. except KeyError: 4. d[obj] = some new value... 5. # expect d[obj] to exist at this point it is possible that d[obj] still exists at line 2 but not anymore at line 5 (because there would have been a garbage collection run in-between), at least if the original key is not `obj` but some other object equal to `obj`. Using setdefault() would ensure that doesn't happen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 06:52:13 2017 From: report at bugs.python.org (ale5000) Date: Fri, 25 Aug 2017 10:52:13 +0000 Subject: [issue30874] unittest execute tests twice in some conditions In-Reply-To: <1499483029.13.0.269254590088.issue30874@psf.upfronthosting.co.za> Message-ID: <1503658333.66.0.459831140361.issue30874@psf.upfronthosting.co.za> ale5000 added the comment: hi, is there any news? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 07:50:26 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Aug 2017 11:50:26 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503661826.38.0.336781100349.issue30923@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- pull_requests: +3242 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 08:07:52 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Aug 2017 12:07:52 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503662872.19.0.0189374116898.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: New changeset 9e1e6f528f3fec16b9bd99f5ee38048ffec04a81 by Stefan Krah in branch 'master': bpo-30923: Silence fall-through warnings in libexpat build. (#3205) https://github.com/python/cpython/commit/9e1e6f528f3fec16b9bd99f5ee38048ffec04a81 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 08:21:15 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Aug 2017 12:21:15 +0000 Subject: [issue31275] Check fall-through in _codecs_iso2022.c Message-ID: <1503663675.69.0.755105710638.issue31275@psf.upfronthosting.co.za> New submission from Stefan Krah: The last fall-through warning is in _codecs_iso2022.c. IMO the current code is equivalent to this, but I'm no codecs expert at all: diff --git a/Modules/cjkcodecs/_codecs_iso2022.c b/Modules/cjkcodecs/_codecs_iso2022.c index 1ce4218f30..abf214880f 100644 --- a/Modules/cjkcodecs/_codecs_iso2022.c +++ b/Modules/cjkcodecs/_codecs_iso2022.c @@ -807,15 +807,9 @@ jisx0213_encoder(const Py_UCS4 *data, Py_ssize_t *length, void *config) case 2: /* second character of unicode pair */ coded = find_pairencmap((ucs2_t)data[0], (ucs2_t)data[1], jisx0213_pair_encmap, JISX0213_ENCPAIRS); - if (coded == DBCINV) { - *length = 1; - coded = find_pairencmap((ucs2_t)data[0], 0, - jisx0213_pair_encmap, JISX0213_ENCPAIRS); - if (coded == DBCINV) - return MAP_UNMAPPABLE; - } - else + if (coded != DBCINV) { return coded; + /* fall through */ case -1: /* flush unterminated */ *length = 1; ---------- messages: 300834 nosy: haypo, serhiy.storchaka, skrah priority: normal severity: normal status: open title: Check fall-through in _codecs_iso2022.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 08:23:13 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Aug 2017 12:23:13 +0000 Subject: [issue30923] Add -Wimplicit-fallthrough=0 to Makefile ? In-Reply-To: <1499963760.78.0.849180274669.issue30923@psf.upfronthosting.co.za> Message-ID: <1503663793.26.0.702572735322.issue30923@psf.upfronthosting.co.za> Stefan Krah added the comment: All warnings except for #31275 are dealt with. ---------- resolution: -> fixed stage: -> resolved status: open -> closed type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 09:10:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Aug 2017 13:10:33 +0000 Subject: [issue31275] Check fall-through in _codecs_iso2022.c In-Reply-To: <1503663675.69.0.755105710638.issue31275@psf.upfronthosting.co.za> Message-ID: <1503666633.53.0.709616705338.issue31275@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This looks equivalent to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 09:20:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Aug 2017 13:20:52 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503667252.19.0.690565878747.issue31271@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Nick can be interested in this. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 09:29:45 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 25 Aug 2017 13:29:45 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503667785.62.0.341927926537.issue31271@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 09:36:54 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 25 Aug 2017 13:36:54 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503668214.82.0.0178289426871.issue31271@psf.upfronthosting.co.za> Nick Coghlan added the comment: The proposed fix looks good to me, but it did make me wonder if we might have a missing check in the other direction as well. However, it looks like that case is already fine: ``` >>> hex_codec = codecs.lookup("hex") >>> hex_codec._is_text_encoding = True >>> t = io.TextIOWrapper(io.BytesIO(b'foo'), encoding="hex") >>> t.buffer.write(b'abcd') 4 >>> t.read() Traceback (most recent call last): File "", line 1, in TypeError: decoder should return a string result, not 'bytes' ``` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 10:01:26 2017 From: report at bugs.python.org (Martin Richard) Date: Fri, 25 Aug 2017 14:01:26 +0000 Subject: [issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously In-Reply-To: <1474986403.83.0.165864194914.issue28287@psf.upfronthosting.co.za> Message-ID: <1503669686.67.0.938691819593.issue28287@psf.upfronthosting.co.za> Martin Richard added the comment: Yes, the goal is to isolate the blocking IO in __init__ into other methods so Popen can be subclassed in asyncio. The end goal is to ensure that when asyncio calls Popen(), it doesn't block the process. In the context of asyncio, there's no need to make Popen() IOs non-blocking as they will be performed with the asyncio API (rather than the IO methods provided by the Popen object). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 10:14:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Aug 2017 14:14:36 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503670476.39.0.255075748363.issue31271@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: May be make an error message more symmetric to the one in the decoder case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 10:26:38 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Aug 2017 14:26:38 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1503671198.0.0.441970202413.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oren, do you mind to backport the part of your changes that adds explicit checks for tuples to 3.6 and 2.7? Raising SystemError looks like a bug to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 10:26:48 2017 From: report at bugs.python.org (Pauli Virtanen) Date: Fri, 25 Aug 2017 14:26:48 +0000 Subject: [issue31276] PyObject_CallFinalizerFromDealloc is undocumented Message-ID: <1503671208.32.0.920107204017.issue31276@psf.upfronthosting.co.za> New submission from Pauli Virtanen: It's unclear if PyObject_CallFinalizerFromDealloc is a public function or not. It is not documented, but it seems there's no other way to ensure that tp_finalize runs, at least for objects without Py_TPFLAGS_HAVE_GC. In the documentation of tp_finalize (https://docs.python.org/3/c-api/typeobj.html?highlight=tp_finalize#c.PyTypeObject.tp_finalize) there is the sentence: """It is called either from the garbage collector (if the instance is part of an isolated reference cycle) or just before the object is deallocated.""" However, it appears it is necessary to call it explicitly from any user-provided tp_dealloc. Indeed, there are several calls to PyObject_CallFinalizerFromDealloc in cpython/Modules/* e.g. in posixmodule.c:ScandirIterator_dealloc ---------- assignee: docs at python components: Documentation messages: 300842 nosy: docs at python, pv priority: normal severity: normal status: open title: PyObject_CallFinalizerFromDealloc is undocumented versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 10:36:18 2017 From: report at bugs.python.org (Oren Milman) Date: Fri, 25 Aug 2017 14:36:18 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1503671778.92.0.941097098936.issue28261@psf.upfronthosting.co.za> Oren Milman added the comment: sure ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 12:09:26 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Aug 2017 16:09:26 +0000 Subject: [issue31275] Check fall-through in _codecs_iso2022.c In-Reply-To: <1503663675.69.0.755105710638.issue31275@psf.upfronthosting.co.za> Message-ID: <1503677366.79.0.495879127403.issue31275@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- pull_requests: +3243 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 12:31:26 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Aug 2017 16:31:26 +0000 Subject: [issue31275] Check fall-through in _codecs_iso2022.c In-Reply-To: <1503663675.69.0.755105710638.issue31275@psf.upfronthosting.co.za> Message-ID: <1503678686.12.0.657984582884.issue31275@psf.upfronthosting.co.za> Stefan Krah added the comment: New changeset 138753c1b96b5e06a5c5d409fa4cae5e2fe1108b by Stefan Krah in branch 'master': bpo-31275: Small refactoring to silence a fall-through warning. (#3206) https://github.com/python/cpython/commit/138753c1b96b5e06a5c5d409fa4cae5e2fe1108b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 12:31:42 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 25 Aug 2017 16:31:42 +0000 Subject: [issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog In-Reply-To: <1502759583.57.0.904846181932.issue31205@psf.upfronthosting.co.za> Message-ID: <1503678702.38.0.714904778607.issue31205@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Oh, forgot about this exception, sorry! Thanks for the clarification. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 12:32:52 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Aug 2017 16:32:52 +0000 Subject: [issue31275] Check fall-through in _codecs_iso2022.c In-Reply-To: <1503663675.69.0.755105710638.issue31275@psf.upfronthosting.co.za> Message-ID: <1503678772.1.0.704071628882.issue31275@psf.upfronthosting.co.za> Stefan Krah added the comment: Thanks, Serhiy! ---------- components: +Build resolution: -> fixed stage: -> resolved status: open -> closed type: -> compile error versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 12:33:22 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 25 Aug 2017 16:33:22 +0000 Subject: [issue31237] test_gdb disables 25% of tests in optimized builds In-Reply-To: <1503099571.25.0.918465457775.issue31237@psf.upfronthosting.co.za> Message-ID: <1503678802.77.0.579637926983.issue31237@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I guess it's wontfix then. Sad, since that leaves us partially blind to regressions like bpo-30983. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 12:33:33 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 25 Aug 2017 16:33:33 +0000 Subject: [issue31237] test_gdb disables 25% of tests in optimized builds In-Reply-To: <1503099571.25.0.918465457775.issue31237@psf.upfronthosting.co.za> Message-ID: <1503678813.34.0.166166887241.issue31237@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 13:19:19 2017 From: report at bugs.python.org (Antony Lee) Date: Fri, 25 Aug 2017 17:19:19 +0000 Subject: [issue31254] WeakKeyDictionary/Mapping doesn't call __missing__ In-Reply-To: <1503387072.25.0.0553627508053.issue31254@psf.upfronthosting.co.za> Message-ID: <1503681559.63.0.56936716761.issue31254@psf.upfronthosting.co.za> Antony Lee added the comment: Thanks for the clarification! "at least if the original key is not `obj` but some other object equal to `obj`" does not apply in my case so I'm fine, but the example shows that this is tricky to get right... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 13:38:57 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Aug 2017 17:38:57 +0000 Subject: [issue31279] Squash new gcc warning (-Wstringop-overflow) Message-ID: <1503682737.47.0.43054197609.issue31279@psf.upfronthosting.co.za> New submission from Stefan Krah: gcc-7.2 emits the following not-so-useful warning: Objects/bytearrayobject.c:226:9: warning: ?memcpy?: specified size between 9223372036854775808 and 18446744073709551615 exceeds maximum object size 9223372036854775807 ---------- messages: 300851 nosy: skrah priority: normal severity: normal status: open title: Squash new gcc warning (-Wstringop-overflow) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 13:44:08 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Aug 2017 17:44:08 +0000 Subject: [issue31279] Squash new gcc warning (-Wstringop-overflow) In-Reply-To: <1503682737.47.0.43054197609.issue31279@psf.upfronthosting.co.za> Message-ID: <1503683048.59.0.462473612485.issue31279@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- pull_requests: +3244 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 14:12:08 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Aug 2017 18:12:08 +0000 Subject: [issue31279] Squash new gcc warning (-Wstringop-overflow) In-Reply-To: <1503682737.47.0.43054197609.issue31279@psf.upfronthosting.co.za> Message-ID: <1503684728.45.0.743724314796.issue31279@psf.upfronthosting.co.za> Stefan Krah added the comment: New changeset dce6502059f46a04f90938b9d832394c8215397b by Stefan Krah in branch 'master': bpo-31279: Silence -Wstringop-overflow warning. (#3207) https://github.com/python/cpython/commit/dce6502059f46a04f90938b9d832394c8215397b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 14:14:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Aug 2017 18:14:56 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503684896.63.0.547673901271.issue31271@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a5b4ea15b61e3f3985f4f0748a18f8b888a63532 by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (#3201) https://github.com/python/cpython/commit/a5b4ea15b61e3f3985f4f0748a18f8b888a63532 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 14:33:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 25 Aug 2017 18:33:03 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503685983.27.0.528302470179.issue31271@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 14:43:36 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 25 Aug 2017 18:43:36 +0000 Subject: [issue31272] typing module conflicts with __slots__-classes In-Reply-To: <1503599664.93.0.449415380288.issue31272@psf.upfronthosting.co.za> Message-ID: <1503686616.03.0.128635152171.issue31272@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I think this is fixed in latest version. I thought it was also backported to Python 3.5.3. What is the version you are using? Could you please try updating to the latest bugfix release? (currently these are 3.5.4 and 3.6.2). ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 14:56:52 2017 From: report at bugs.python.org (Stefan Krah) Date: Fri, 25 Aug 2017 18:56:52 +0000 Subject: [issue31279] Squash new gcc warning (-Wstringop-overflow) In-Reply-To: <1503682737.47.0.43054197609.issue31279@psf.upfronthosting.co.za> Message-ID: <1503687412.49.0.457420080276.issue31279@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- components: +Build resolution: -> fixed stage: -> resolved status: open -> closed type: -> compile error versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 15:41:25 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Aug 2017 19:41:25 +0000 Subject: [issue31244] IDLE: work around shortcuts bug in Windows' IMEs and tk In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503690085.43.0.547278040657.issue31244@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I obtained more info on the Japanese IME. It has 2 modes of operation: 'romanji' and 'kana'. In romanji mode, one types the ascii transliteration of the syllabic chars. When one types type the syllable vowel , the program replaces the sequence of 1 to 3 ascii chars with a Japanese char. So while typing 'akitsu', the 'a', 'ki', and 'tsu' would become 3 chars, with the 'k' and 'ts' momentarily visible. Modifier combinations naturally work since the keyboard is being interpreted as outputting ascii chars. In kana mode, japanese chars appear directly, but Ctrl must, in effect, temporarily revert the keys to their ascii interpretations. A Chinese keyboard with a pinyan (romanization) input mode might do the same. But non-English keyboards having an ascii mode is likely exceptional. Given this and the two answers above, I conclude that delivering IDLE with a 'complete' set of IME-compatible keysets is an impossible problem. I definitely want to document the problem. I will stay open to the possibility of a 'customizer' that would prompt a user to hit all the character keys in a defined order and then augment an existing keyset using the method described in msg300716. The table at https://www.tcl.tk/man/tcl/TkCmd/keysyms.htm suggests that this could potentially cover accented latin, cyrillic, greek, hebrew, arabic, and japanese keyboards. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 17:29:13 2017 From: report at bugs.python.org (Ned Deily) Date: Fri, 25 Aug 2017 21:29:13 +0000 Subject: [issue27099] IDLE: turn builting extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1503696553.59.0.927440601737.issue27099@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: -ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 17:53:30 2017 From: report at bugs.python.org (Jim Fulton) Date: Fri, 25 Aug 2017 21:53:30 +0000 Subject: [issue31280] Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages Message-ID: <1503698010.91.0.4365749664.issue31280@psf.upfronthosting.co.za> New submission from Jim Fulton: I'm having an issue importing from namespaces packages whose directories are added to sys.path and have other packages from the same namespace in site-packages. To reproduce: - Create a virtualenv and install zc.buildout in it (``envdir/bin/pip install zc.buildout``). - Run the attached script with the virtual environment (``envdir/bin/python z.py``). Note that scenarios like https://www.python.org/dev/peps/pep-0420/#id3 work fine. This seems to related to having namespace packages in site-packages, or, presumably anywhere on the default path. I've verified this with Python 3.4, 3.5, and 3.6. If y'all agree that this is a bug, then I'll attempt debug it and come up with a PR. ---------- messages: 300856 nosy: j1m priority: normal severity: normal status: open title: Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 17:59:14 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 25 Aug 2017 21:59:14 +0000 Subject: [issue31280] Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages In-Reply-To: <1503698010.91.0.4365749664.issue31280@psf.upfronthosting.co.za> Message-ID: <1503698354.58.0.522009673695.issue31280@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 18:29:42 2017 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 25 Aug 2017 22:29:42 +0000 Subject: [issue31280] Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages In-Reply-To: <1503698010.91.0.4365749664.issue31280@psf.upfronthosting.co.za> Message-ID: <1503700182.42.0.890961053687.issue31280@psf.upfronthosting.co.za> Eric V. Smith added the comment: Jim: did you forget to attach the z.py script? ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 18:41:31 2017 From: report at bugs.python.org (Jim Fulton) Date: Fri, 25 Aug 2017 22:41:31 +0000 Subject: [issue31280] Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages In-Reply-To: <1503698010.91.0.4365749664.issue31280@psf.upfronthosting.co.za> Message-ID: <1503700891.52.0.246932991226.issue31280@psf.upfronthosting.co.za> Jim Fulton added the comment: No, but I managed to unattach it, because "Choose File" always feels like a submit button to me. Sorry. Attached. ---------- Added file: http://bugs.python.org/file47101/z.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 20:20:40 2017 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 26 Aug 2017 00:20:40 +0000 Subject: [issue31280] Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages In-Reply-To: <1503698010.91.0.4365749664.issue31280@psf.upfronthosting.co.za> Message-ID: <1503706840.23.0.66128644635.issue31280@psf.upfronthosting.co.za> Eric V. Smith added the comment: I think this is a function of the .pth file causing 'zc' to be in sys.modules. If I delete the .pth file, the first import of zc.m succeeds. Note that if the .pth file is in place, then: % bin/python3 Python 3.6.1 (default, Mar 24 2017, 12:50:34) [GCC 5.4.0] on cygwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> 'zc' in sys.modules True >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 21:50:52 2017 From: report at bugs.python.org (Zhiming Wang) Date: Sat, 26 Aug 2017 01:50:52 +0000 Subject: [issue31281] fileinput inplace does not work with pathlib.Path Message-ID: <1503712252.67.0.949610477917.issue31281@psf.upfronthosting.co.za> New submission from Zhiming Wang: Consider import fileinput import pathlib with fileinput.input(files=(pathlib.Path('in.txt'),), inplace=True) as fp: for line in fp: print(line, end='') which results in Traceback (most recent call last): File "./pathlib-fileinput.py", line 6, in for line in fp: File "/Users/zmwang/.pyenv/versions/3.6.1/lib/python3.6/fileinput.py", line 250, in __next__ line = self._readline() File "/Users/zmwang/.pyenv/versions/3.6.1/lib/python3.6/fileinput.py", line 331, in _readline self._filename + (self._backup or ".bak")) TypeError: unsupported operand type(s) for +: 'PosixPath' and 'str' A trivial fix is converting the specified filename to str when assigning to self._filename: - self._filename = self._files[0] + self._filename = str(self._files[0]) ---------- components: Library (Lib) messages: 300860 nosy: zmwangx priority: normal severity: normal status: open title: fileinput inplace does not work with pathlib.Path type: behavior versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 22:22:28 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 26 Aug 2017 02:22:28 +0000 Subject: [issue30987] Support for ISO-TP protocol in SocketCAN In-Reply-To: <1500696791.75.0.683510511028.issue30987@psf.upfronthosting.co.za> Message-ID: <1503714148.8.0.872862974.issue30987@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 22:23:00 2017 From: report at bugs.python.org (Zhiming Wang) Date: Sat, 26 Aug 2017 02:23:00 +0000 Subject: [issue31281] fileinput inplace does not work with pathlib.Path In-Reply-To: <1503712252.67.0.949610477917.issue31281@psf.upfronthosting.co.za> Message-ID: <1503714180.89.0.0864596428573.issue31281@psf.upfronthosting.co.za> Changes by Zhiming Wang : ---------- pull_requests: +3245 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 25 23:15:59 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Aug 2017 03:15:59 +0000 Subject: [issue30987] Support for ISO-TP protocol in SocketCAN In-Reply-To: <1500696791.75.0.683510511028.issue30987@psf.upfronthosting.co.za> Message-ID: <1503717359.83.0.557279125809.issue30987@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is no specific maintainer for socket modules, so this may or may not get attention anytime soon -- https://docs.python.org/devguide/experts.html. New features are not backported. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 00:51:13 2017 From: report at bugs.python.org (Xiang Zhang) Date: Sat, 26 Aug 2017 04:51:13 +0000 Subject: [issue31282] C APIs called without GIL in PyOS_Readline Message-ID: <1503723073.13.0.645165249007.issue31282@psf.upfronthosting.co.za> New submission from Xiang Zhang: When debugging our project I find something interesting. In PyOS_Readline it releases the GIL and delegate its job to PyOS_ReadlineFunctionPointer, which could be call_readline or PyOS_StdioReadline(I don't find where vms__StdioReadline is defined). But in the two functions, they use some C APIs like PyMem_Malloc/MALLOC, PyErr_SetString which need guarded by GIL. I don't understand why not doing find-grained lock control in call_readline or PyOS_StdioReadline since the code is ancient. :-( I find this because our project makes test_cmd_line fail with `echo "Timer\n" | python -i -m timeit -n 1`. ---------- components: Interpreter Core messages: 300862 nosy: xiang.zhang priority: normal severity: normal status: open title: C APIs called without GIL in PyOS_Readline type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 02:21:08 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Aug 2017 06:21:08 +0000 Subject: [issue31282] C APIs called without GIL in PyOS_Readline In-Reply-To: <1503723073.13.0.645165249007.issue31282@psf.upfronthosting.co.za> Message-ID: <1503728468.95.0.0979517152329.issue31282@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +haypo, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 04:09:28 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 26 Aug 2017 08:09:28 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503734968.19.0.875544407965.issue31271@psf.upfronthosting.co.za> Oren Milman added the comment: all three versions do 'self->pending_bytes_count += PyBytes_GET_SIZE(b);', while 'b' is the object the encoder returned. in 3.6 and 3.7, the implementation of PyBytes_GET_SIZE() includes 'assert(PyBytes_Check(op))', but in 2.7, the implementation is 'PyString_GET_SIZE', which is just 'Py_SIZE(op)'. and so, in 2.7 there isn't an assertion failure. Moreover, 'self->pending_bytes_count' is used only to determine whether a flush is needed. so ISTM that probably the bug's only risk is not flushing automatically after writing. note that whenever _textiowrapper_writeflush() is finally called (when the encoder returned a non-string object), it would raise a TypeError by calling string_join() on a non-string object. do you still think we should backport to 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 04:56:21 2017 From: report at bugs.python.org (Elena Oat) Date: Sat, 26 Aug 2017 08:56:21 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear In-Reply-To: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> Message-ID: <1503737781.16.0.421036364922.issue31065@psf.upfronthosting.co.za> Elena Oat added the comment: I've added a sentence saying about the explicit return value. ---------- keywords: +patch nosy: +Elena.Oat Added file: http://bugs.python.org/file47102/issue31065.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 05:00:40 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 26 Aug 2017 09:00:40 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503738040.87.0.247688170341.issue31271@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3247 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 05:03:20 2017 From: report at bugs.python.org (Jeremy Kloth) Date: Sat, 26 Aug 2017 09:03:20 +0000 Subject: [issue31260] [2.7] Enhance PC/VS9.0/ project to produce python.bat, as PCbuild/ In-Reply-To: <1503415097.55.0.681149951058.issue31260@psf.upfronthosting.co.za> Message-ID: <1503738200.15.0.524167039047.issue31260@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 05:14:23 2017 From: report at bugs.python.org (shadowadler) Date: Sat, 26 Aug 2017 09:14:23 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object Message-ID: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> New submission from shadowadler: I discovered this while messing about with an unrelated idea, but the issue is that if you inherit explicitly from object, you get different behaviour than when you inherit implicitly. This is duplicated from my SO answer here: https://stackoverflow.com/questions/1238606/is-it-necessary-or-useful-to-inherit-from-pythons-object-in-python-3-x/45893772#45893772 If you explicitly inherit from object, what you are actually doing is inheriting from builtins.object regardless of what that points to at the time. Therefore, I could have some (very wacky) module which overrides object for some reason. We'll call this first module "newobj.py": import builtins old_object = builtins.object # otherwise cyclic dependencies class new_object(old_object): def __init__(self, *args, **kwargs): super(new_object, self).__init__(*args, **kwargs) self.greeting = "Hello World!" builtins.object = new_object #overrides the default object Then in some other file ("klasses.py"): class Greeter(object): pass class NonGreeter: pass Then in a third file (which we can actually run): import newobj, klasses # This order matters! greeter = klasses.Greeter() print(greeter.greeting) # prints the greeting in the new __init__ non_greeter = NonGreeter() print(non_greeter.greeting) # throws an attribute error So you can see that, in the case where it is explicitly inheriting from object, we get a different behaviour than where you allow the implicit inheritance. ---------- messages: 300865 nosy: shadowadler priority: normal severity: normal status: open title: Inconsistent behaviours with explicit and implicit inheritance from object versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 05:51:40 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 26 Aug 2017 09:51:40 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1503741100.2.0.677664460756.issue28261@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3248 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 06:14:45 2017 From: report at bugs.python.org (shadowadler) Date: Sat, 26 Aug 2017 10:14:45 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503742485.89.0.154681755582.issue31283@psf.upfronthosting.co.za> Changes by shadowadler : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 06:30:57 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 26 Aug 2017 10:30:57 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503743457.81.0.274337903358.issue31283@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: To me, it seems like obvious behavior. What exactly do you think is inconsistent here? Of course, the default inherit-class is "what's usually known as builtins.object", and it's always the same class. You should not be able to change it just by rebinding builtins.object to something else. Just like you shouldn't be able to change the top of exception hierarchy by rebinding builtins.BaseException, for example. :-) ---------- nosy: +veky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 07:05:24 2017 From: report at bugs.python.org (shadowadler) Date: Sat, 26 Aug 2017 11:05:24 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503745524.05.0.686357058371.issue31283@psf.upfronthosting.co.za> shadowadler added the comment: I don't necessarily disagree with what you are saying- however, the received wisdom (as per my response to the SO question) is that class SomeClass(object): pass and class SomeClass: pass Should do the same thing. They evidently don't. It might be that the correct "solution" is that this is more properly documented that the two are not equivalent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 07:08:15 2017 From: report at bugs.python.org (shadowadler) Date: Sat, 26 Aug 2017 11:08:15 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503745695.97.0.838901297518.issue31283@psf.upfronthosting.co.za> shadowadler added the comment: Out of curiosity, given that you can change every other point in the hierarchy by changing the binding of modules, what is your philosophical objection to being able to change the top of the hierarchy? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 07:23:11 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 26 Aug 2017 11:23:11 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503746591.58.0.740156869438.issue31283@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Yes, they are obviously not equivalent if you execute object = int before that. :-D And (like I said) "received wisdom" is also that "except:" is equivalent to "except BaseException:", but of course it isn't equivalent if you execute BaseException = NameError before. Rebinding the names for fundamental objects in Python doesn't change the semantics of these objects. Python interpreter is an external thing: it doesn't exist "in-universe". It doesn't refer to these objects by names in some currently-executing-Python-instance namespace, it refers to them externally. And, mostly, so do we when explaining how Python works. Let me give you an analogy: In the old days, you could rebind True and False, for example by saying True, False = False, True But of course, you would trivially understand that after such rebinding, if 6 > 4: print(1) else: print(2) would print 1, not 2. Although we might say "(6>4) is True" while giving the semantics of "if" statement, we _don't_ mean "the object referred by the internal name 'True'". We mean the object _externally_ referred by the name 'True'. Same as with your "hierarchy question": if you _give_ the explicit list of bases, you give it as a list of names. Those names can be rebound and if the class definition is executed in such a changed namespace, the bases will differ. But you can't rebind anything if you haven't given any explicit base names in the first place. It doesn't matter whether a class is "at the top" or somewhere else; it matters whether its name is explicitly given. An illustration: Let's say you have executed class A: pass class B(A): pass so now A refers to some class, and B refers to another class, inherited from A. If you now execute class C(B): pass # * you will have a new class C, inherited from B. Of course, if you now change B somehow, and then execute (*) again, you will have another class C, inherited from changed B - because (*) refers to B explicitly. But if you change _A_ somehow, and then execute (*) again, you will have C inherited from the same old B - because (*) doesn't refer to A explicitly. As you see, it doesn't matter whether A is "on the top" (in fact object is on the top, above A), what matters is whether the statement (*) that you re-execute in the changed namespace refers to it by name or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 07:27:50 2017 From: report at bugs.python.org (Paul Moore) Date: Sat, 26 Aug 2017 11:27:50 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1503746870.55.0.226991006754.issue31072@psf.upfronthosting.co.za> Paul Moore added the comment: OK. There's been no further comments, and I think the differences with PyZipFile's filterfunc are sufficient to warrant using a different name. I'm going to go with "filter". It's short, and says what it means. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 07:41:18 2017 From: report at bugs.python.org (shadowadler) Date: Sat, 26 Aug 2017 11:41:18 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503747678.35.0.408268765305.issue31283@psf.upfronthosting.co.za> shadowadler added the comment: I accept what you are saying as consistent. Nevertheless, the documentation states that the two examples I gave should yield identical results. They do not, they perform different actions, albeit subtly. Ergo, this is unexpected behaviour from a documentation point of view, if nothing else. If we are to maintain the fiction that these two things are equivalent, then they should yield the same result. If they are not equivalent, then we should state that this is the case explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 07:44:04 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 26 Aug 2017 11:44:04 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503747844.1.0.103780316483.issue31283@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I don't think this is a bug, I think it is standard behaviour which should be expected if you think about Python's execution model. If you inherit from object implicitly: class Spam: ... then the interpreter gets to pick the base class, and it uses the genuine, builtin object base class. There's no name lookup, it is all built into the guts of the interpreter. But if you specify the name of a base class: class Spam(foo): ... then foo is looked up at runtime, regardless of whether you type "foo" or "int" or "str" or "object". If you have replaced or shadowed the builtin object with your own class, then you'll get *that* as the base for Spam, not the real built-in object base class. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 07:45:06 2017 From: report at bugs.python.org (shadowadler) Date: Sat, 26 Aug 2017 11:45:06 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503747906.95.0.681292331535.issue31283@psf.upfronthosting.co.za> shadowadler added the comment: Still not disagreeing with you- I just don't think that this is what the documentation implies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 07:50:35 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 26 Aug 2017 11:50:35 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503748235.54.0.628350856176.issue31283@psf.upfronthosting.co.za> Steven D'Aprano added the comment: > the documentation states that the two examples I gave should yield identical results. Got a link to the specific documentation that says this? And a suggested improvement? ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 08:27:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Aug 2017 12:27:55 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1503750475.58.0.343837128323.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 8e67981fc8e1bf3cb9774b5fbf4a39b8d65ba4ff by Serhiy Storchaka (Oren Milman) in branch '3.6': [3.6] bpo-28261: Prevent raising SystemError where PyArg_ParseTuple is used to parse non-args. (#3210) https://github.com/python/cpython/commit/8e67981fc8e1bf3cb9774b5fbf4a39b8d65ba4ff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 09:17:50 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 26 Aug 2017 13:17:50 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1503753470.36.0.104149629535.issue26656@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3249 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 09:18:55 2017 From: report at bugs.python.org (Jim Fulton) Date: Sat, 26 Aug 2017 13:18:55 +0000 Subject: [issue31280] Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages In-Reply-To: <1503698010.91.0.4365749664.issue31280@psf.upfronthosting.co.za> Message-ID: <1503753535.96.0.0945860891805.issue31280@psf.upfronthosting.co.za> Jim Fulton added the comment: Wow, OK. It didn't occur to me to look for .pth files. (Buildout doesn't use them.) I guess this is a pip bug or misfeature. I'll head over to pypa. Thanks! ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 09:25:06 2017 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 26 Aug 2017 13:25:06 +0000 Subject: [issue31280] Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages In-Reply-To: <1503698010.91.0.4365749664.issue31280@psf.upfronthosting.co.za> Message-ID: <1503753906.59.0.175444498969.issue31280@psf.upfronthosting.co.za> Eric V. Smith added the comment: No problem. If you open a pypa issue, can you post a link here? Thanks. ---------- resolution: -> not a bug type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 09:39:26 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 26 Aug 2017 13:39:26 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503754766.39.0.261487701146.issue31283@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: It's not hard to find a link. https://docs.python.org/3.7/reference/compound_stmts.html#class-definitions But trying to change that to incorporate what OP is asking is a wild goose chase. There are numerous instances when a documentation is referring to a builtin. E.g. (print): All non-keyword arguments are converted to strings like str() does (repr): this function makes an attempt to return a string that would yield an object with the same value when passed to eval() (type): The isinstance() built-in function is recommended for testing the type of an object Of course, all of these must be changed, since they don't work as advertised if you rebind str, eval or isinstance. I claim this is nonsense. If anything, we should educate people that when documentation refers to "the builtin X", it doesn't mean "whatever is current referrent of builtins.X". Never. Only "__import__" kinda works this way (though not in builtins, but in globals), and that's mostly a historic accident. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 10:34:22 2017 From: report at bugs.python.org (shadowadler) Date: Sat, 26 Aug 2017 14:34:22 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503758062.71.0.581737586609.issue31283@psf.upfronthosting.co.za> shadowadler added the comment: Not at all- what you are talking about is obviously absurd. I am merely asserting that the statement in the docs you point to - that the two statements are equivalent - is untrue, the two statements are not equivalent in their behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 10:52:50 2017 From: report at bugs.python.org (Steve Dower) Date: Sat, 26 Aug 2017 14:52:50 +0000 Subject: [issue29741] BytesIO methods don't accept integer types, while StringIO counterparts do In-Reply-To: <1488835645.34.0.376224338979.issue29741@psf.upfronthosting.co.za> Message-ID: <1503759170.08.0.439669154728.issue29741@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 10:57:54 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 26 Aug 2017 14:57:54 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503759474.75.0.671295418769.issue31283@psf.upfronthosting.co.za> R. David Murray added the comment: shadowadler, the documentation assumes *throughout* that you have not created any variable that shadows any standard Python entities. There is no other rational way to write the documentation. To change that policy would, as has been pointed out, require disclaimers in thousands of places in the documentation. That's not something that is going to be done :) ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 11:03:28 2017 From: report at bugs.python.org (shadowadler) Date: Sat, 26 Aug 2017 15:03:28 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503759808.88.0.216710357144.issue31283@psf.upfronthosting.co.za> shadowadler added the comment: I really don't see that as a logical extension of what I am saying at all. Sure, shadowing builtins changes what they do, but if you're saying the syntax is equivalent then te effect of the shadowing should be consistent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 11:30:00 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 26 Aug 2017 15:30:00 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503761400.63.0.156593000737.issue31283@psf.upfronthosting.co.za> R. David Murray added the comment: I see I didn't specifically address your counter argument ("that would obviously be absurd"). Having thought it it some more, your are right, there *is* a difference between the examples you think it would be absurd to disclaim and your example here. In python, an entity is identified by an id (which is a memory address in CPython, but that's an implementation detail). A name is just a convenience label used to refer to that id. When you rebind a name, you change what id it points to, but any other piece of python that is already using the original id is not affected. But anything using an indirect reference through another object (such as builtins) *will* see the change. Your argument, then, is that it is not documented that 'class x:' is using a direct reference to object rather than an indirect reference. Our argument is that this is obviously the way Python works (the interpreter itself refers directly to the fundamental entities such as the base of the exception hierarchy and object). The number of places that would need to be changed to make this explicit is much smaller than I was thinking when I closed the issue, but I'm still not convinced it is something that needs to be explicitly documented. It is just part of the way Python works at a fundamental level, and because it is a *statement* that does not refer to a variable, it is intuitive that it is going to reference the original object, not whatever builtins.object is referring to. We do say that explicit is better than implicit, but in this case we're talking about a fundamental part of the language, and the specification of how this works probably belongs in some overview section on statements. On the other hand, are there any examples *other* than class and except where this distinction matters? ---------- resolution: not a bug -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 11:34:56 2017 From: report at bugs.python.org (shadowadler) Date: Sat, 26 Aug 2017 15:34:56 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503761696.84.0.308851192138.issue31283@psf.upfronthosting.co.za> shadowadler added the comment: You have put that much more precisely than I could have. I'm not aware that it is an issie elsewhere, but given that I only ran into this today I may not the person best qualified to answer that question. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 11:47:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Aug 2017 15:47:24 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503762444.97.0.641883479173.issue31271@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > do you still think we should backport to 2.7? This is not trivial question. On one side, using PyString_GET_SIZE() with non-bytes object definitely is a bug. It is better to catch it earlier rather than hope on failing in the following code. On other side, adding a check for bytes can break existing user code that is passed now by accident. _PyBytes_Join() in 2.7 supports unicode objects. I think that the fix should be backported, and the proper fix should allow bytes and unicode objects. But I left the decision on Benjamin. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 12:55:38 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 26 Aug 2017 16:55:38 +0000 Subject: [issue31284] IDLE: Fix WindowList invalid command name error when running tests Message-ID: <1503766538.24.0.514954347408.issue31284@psf.upfronthosting.co.za> New submission from Cheryl Sabella: When running tests that use an EditorWindow, the following warning message occurs: warning: callback failed in WindowList : invalid command name ".!menu.windows" This warning comes from `call_callbacks` in WindowsList in windows.py when the callback is `postwindowsmenu()` from editor, which is set for the `windows` menu. The line `end = menu.index("end")` is the line that fails. ---------- assignee: terry.reedy components: IDLE messages: 300885 nosy: csabella, terry.reedy priority: normal severity: normal status: open title: IDLE: Fix WindowList invalid command name error when running tests type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 12:58:39 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 26 Aug 2017 16:58:39 +0000 Subject: [issue31284] IDLE: Fix WindowList invalid command name error when running tests In-Reply-To: <1503766538.24.0.514954347408.issue31284@psf.upfronthosting.co.za> Message-ID: <1503766719.35.0.632140782241.issue31284@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3250 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 13:04:14 2017 From: report at bugs.python.org (Paul Moore) Date: Sat, 26 Aug 2017 17:04:14 +0000 Subject: [issue31072] add filter to zipapp In-Reply-To: <1501260652.07.0.128699077658.issue31072@psf.upfronthosting.co.za> Message-ID: <1503767054.29.0.0614618830982.issue31072@psf.upfronthosting.co.za> Paul Moore added the comment: New changeset 0780bf7578dc4c9c3852dc5e869aba515a2c65b1 by Paul Moore in branch 'master': bpo-31072: Rename the new filter argument for zipapp.create_archive. (#3049) https://github.com/python/cpython/commit/0780bf7578dc4c9c3852dc5e869aba515a2c65b1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 13:29:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Aug 2017 17:29:42 +0000 Subject: [issue31271] an assertion failure in io.TextIOWrapper.write In-Reply-To: <1503597989.21.0.785820469546.issue31271@psf.upfronthosting.co.za> Message-ID: <1503768582.79.0.705045734983.issue31271@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 9bcbc6cba385a83cac8f1ff430cad7617184d2bc by Serhiy Storchaka (Oren Milman) in branch '3.6': [3.6] bpo-31271: Fix an assertion failure in io.TextIOWrapper.write. (GH-3201) (#3209) https://github.com/python/cpython/commit/9bcbc6cba385a83cac8f1ff430cad7617184d2bc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 13:32:30 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 26 Aug 2017 17:32:30 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503768750.47.0.747964716664.issue31283@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: Sorry, I fail to see the big difference. Let's take print as an example: All non-keyword arguments are converted to strings like str() does and written to the stream, separated by sep and followed by end. Both sep and end must be strings; they can also be None, which means to use the default values. If no objects are given, print() will just write end. The file argument must be an object with a write(string) method; if it is not present or None, sys.stdout will be used. Is the above so different than writing: print(*args, file=f, sep=s, end=e) is equivalent to f.write(s.join(map(str, args))+e) ? In my head, no. It's just that sometimes we use Python, and sometimes English, to describe the semantics. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 13:35:54 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 26 Aug 2017 17:35:54 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1503768954.67.0.959160069564.issue28261@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3251 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 14:04:55 2017 From: report at bugs.python.org (Jim Fulton) Date: Sat, 26 Aug 2017 18:04:55 +0000 Subject: [issue31280] Namespace packages in directories added to path aren't importable if packages from the same namespace are in site-packages In-Reply-To: <1503698010.91.0.4365749664.issue31280@psf.upfronthosting.co.za> Message-ID: <1503770695.17.0.116099922649.issue31280@psf.upfronthosting.co.za> Jim Fulton added the comment: See: https://github.com/pypa/pip/issues/4695 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 14:26:04 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Aug 2017 18:26:04 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1503771964.67.0.481308778676.issue30781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 7028e5986fceeeb73dffb5d5bf8f03d88f73b63d by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-30781: IDLE - use ttk widgets in configdialog (#2654) https://github.com/python/cpython/commit/7028e5986fceeeb73dffb5d5bf8f03d88f73b63d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 14:27:26 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Aug 2017 18:27:26 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1503772046.1.0.106767063249.issue30781@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3252 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 14:28:21 2017 From: report at bugs.python.org (shadowadler) Date: Sat, 26 Aug 2017 18:28:21 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503772101.73.0.482935756024.issue31283@psf.upfronthosting.co.za> shadowadler added the comment: The two phrases you present are significantly different- one draws an equivalence. The other does not. That in essence is what this is all about. The difference between an indirect and direct reference in the class inheritance syntax is neither implied nor mentioned in the documentation. It led me to expect one behaviour and find another. That is the extent of my issue, and the fix seems to be to be small. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 14:48:22 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 26 Aug 2017 18:48:22 +0000 Subject: [issue31285] a SystemError and an assertion failure in warnings.warn_explicit() Message-ID: <1503773302.07.0.816913451611.issue31285@psf.upfronthosting.co.za> New submission from Oren Milman: 1. the following causes an assertion failure in Python/_warnings.c in show_warning(): import warnings class BadLoader: def get_source(self, fullname): class BadSource: def splitlines(self): return [42] return BadSource() del warnings._showwarnmsg warnings.warn_explicit(message='foo', category=ArithmeticError, filename='bar', lineno=1, module_globals={'__loader__': BadLoader(), '__name__': 'foobar'}) in short, the assertion failure would happen in warnings.warn_explicit() in case module_globals['__loader__'].get_source(module_globals['__name__']).splitlines()[lineno-1] is not a str. 2. the following raises a SystemError: import warnings class BadLoader: def get_source(self, fullname): class BadSource: def splitlines(self): return 42 return BadSource() warnings.warn_explicit(message='foo', category=UserWarning, filename='bar', lineno=42, module_globals={'__loader__': BadLoader(), '__name__': 'foobar'}) in short, warnings.warn_explicit() raises the SystemError in case module_globals['__loader__'].get_source(module_globals['__name__']).splitlines() is not a list. ISTM that adding a check in warnings_warn_explicit() (in Python/_warnings.c), to check whether module_globals['__loader__'].get_source(module_globals['__name__']) is a str (after existing code found out that it isn't None) would prevent both the assertion failure and the SystemError. What do you think? Is it OK to permit get_source() to return only None or a str? ---------- components: Interpreter Core messages: 300892 nosy: Oren Milman priority: normal severity: normal status: open title: a SystemError and an assertion failure in warnings.warn_explicit() type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 14:56:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Aug 2017 18:56:33 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1503773793.3.0.124746583496.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset bc80fd1bd2e8b6817accbc101e7fe5e50ba8f768 by Serhiy Storchaka (Oren Milman) in branch '2.7': [2.7] bpo-28261: Prevent raising SystemError where PyArg_ParseTuple is used to parse non-args. (#3213) https://github.com/python/cpython/commit/bc80fd1bd2e8b6817accbc101e7fe5e50ba8f768 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 14:57:35 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 26 Aug 2017 18:57:35 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503773855.24.0.142757184076.issue31283@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: I don't know whether the fix is small, since there is no fix that I see yet. I'd just want to draw your attention to the fact that Python is extremely expressive language: almost nothing is "equivalent" to anything else, if you look hard enough. Surely, in the docs, in various places it is written that some code is equivalent to some other code, where it's obvious that those are not completely equivalent in your sense. E.g. "a_list += [1, 2, 3] is equivalent to a_list.extend([1, 2, 3])" (https://docs.python.org/3.5/faq/programming.html?highlight=equivalent#why-did-changing-list-y-also-change-list-x) where it's obvious that the second one is an expression, while the first one is not. Also, the docs are full of "equivalents" to various idioms from _other programming languages_, where again it's obvious that total behavioral equivalence is not what's intended. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 14:58:40 2017 From: report at bugs.python.org (Elena Oat) Date: Sat, 26 Aug 2017 18:58:40 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1503773920.76.0.662359056175.issue26656@psf.upfronthosting.co.za> Elena Oat added the comment: Added the link to the regular expression objects. ---------- keywords: +patch nosy: +Elena.Oat Added file: http://bugs.python.org/file47103/issue26656.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 15:01:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 26 Aug 2017 19:01:58 +0000 Subject: [issue28261] wrong error messages when using PyArg_ParseTuple to parse normal tuples In-Reply-To: <1474661815.38.0.12357433446.issue28261@psf.upfronthosting.co.za> Message-ID: <1503774118.47.0.536510609524.issue28261@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Oren! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 15:06:25 2017 From: report at bugs.python.org (=?utf-8?b?VmVkcmFuIMSMYcSNacSH?=) Date: Sat, 26 Aug 2017 19:06:25 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503774385.45.0.810022627128.issue31283@psf.upfronthosting.co.za> Vedran ?a?i? added the comment: > On the other hand, are there any examples *other* than class and except where this distinction matters? Of course. For example, "for" semantics mentions StopIteration. Of course it doesn't mean "whatever builtins.StopIteration currently refers to". [And in a lot of places it would be possible to say that some builtin is implicit in the statement itself: e.g. while t: is equivalent to while bool(t): for a in b: is equivalent to for a in iter(b): - of course, the docs _don't_ currently say so, so maybe this occurance too should just be deleted. But I still think there are lots of places where docs refer to builtins directly.] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 15:20:56 2017 From: report at bugs.python.org (Emily Morehouse) Date: Sat, 26 Aug 2017 19:20:56 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1503775256.42.0.887861733116.issue26656@psf.upfronthosting.co.za> Emily Morehouse added the comment: PR 3211 - LGTM, but is not CLA signed. Elena, a couple of notes on your patch. Using :ref:`regular expression object ` to link to the section of the documentation is preferred, as it does not rely on a consistent URL. Also, be mindful of line lengths, feel free to break lines to avoid this. If you would like to submit a PR on Github for these changes, it can more easily be merged in. (Check https://docs.python.org/devguide/pullrequest.html for more info). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 15:29:59 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 26 Aug 2017 19:29:59 +0000 Subject: [issue30761] pdb: Add step / next count arguments In-Reply-To: <1498471813.04.0.648864128078.issue30761@psf.upfronthosting.co.za> Message-ID: <1503775799.86.0.902843145591.issue30761@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 15:33:51 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 26 Aug 2017 19:33:51 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503776031.47.0.700489139049.issue31283@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I agree with the other commenters and recommend this be closed. There doesn't seem to be a a useful issue here. It seems more like a pedantic twisting of words that ignores how Python works (i.e. that you can specify a specific class to inherit from and that it is possible to either shadow or alter builtins). I don't see any magic here beyond changing a variable name to refer to a new object while previous references (or builtin references) to that name continue to refer to old object. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 15:35:53 2017 From: report at bugs.python.org (Oren Milman) Date: Sat, 26 Aug 2017 19:35:53 +0000 Subject: [issue31285] a SystemError and an assertion failure in warnings.warn_explicit() In-Reply-To: <1503773302.07.0.816913451611.issue31285@psf.upfronthosting.co.za> Message-ID: <1503776153.61.0.505858399695.issue31285@psf.upfronthosting.co.za> Oren Milman added the comment: on a second thought, BadSource could be a subclass of str, so maybe we should just check whether module_globals['__loader__'].get_source(module_globals['__name__']).splitlines()[lineno-1] is a str, and whether module_globals['__loader__'].get_source(module_globals['__name__']).splitlines() is a list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 15:49:09 2017 From: report at bugs.python.org (R. David Murray) Date: Sat, 26 Aug 2017 19:49:09 +0000 Subject: [issue31283] Inconsistent behaviours with explicit and implicit inheritance from object In-Reply-To: <1503738862.98.0.13501343613.issue31283@psf.upfronthosting.co.za> Message-ID: <1503776949.21.0.0489302223124.issue31283@psf.upfronthosting.co.za> R. David Murray added the comment: OK, agreed. The general principle is: if you reference the name, it is looked up in the the builtins namespace at runtime (effectively an indirect reference). If the syntax doesn't explicitly mention the name, then it is going to be (the equivalent of) a direct reference, and changing builtins won't change it. So this is really just a specific example of how python namespacing works in general. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 15:50:32 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 26 Aug 2017 19:50:32 +0000 Subject: [issue31265] Remove doubly-linked list from C OrderedDict In-Reply-To: <1503483859.09.0.0369181186057.issue31265@psf.upfronthosting.co.za> Message-ID: <1503777032.24.0.491875101407.issue31265@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll bring this up at the language sprints. Last year, there was an explicit decision to not go down this path. Here are a few thoughts for now: It is a big deal to change the API. We try hard not to do that (breaking code for no reason and making it more challenging for people to upgrade their python -- the standard library is intended to be standard rather than highly mutable). It is a big deal to rip-out the pure python version and impose obligations on other implementations. Over time, we've tried to move in the direction of more pure python code rather than less. The pure python code is easier to understand, easier to maintain, generally less buggy, and is more portable. People currently using OrderedDict are choosing it specifically because they want the ordering behavior. That is currently implemented in an algorithmically correct way that preserves the big-oh behavior in the face of deletions and updates. In contrast, the regular dict only happens to be ordered and internally is achieving order by maintaining a sequence of consecutive pointers. This doesn't have the same performance characteristics and would be a step backwards for some use cases. Lastly, if the ordering of regular dicts becomes guaranteed, then collections.OrderedDict() will mostly become irrelevant so there is no need to change it all. For now, this proposal is on hold because 1) it isn't clear that it should be done, 2) it needs a lot of serious discussion before proceeding, 3) it may be premature while the status of the regular dict is still in flux. ---------- assignee: -> rhettinger resolution: -> later _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 16:11:53 2017 From: report at bugs.python.org (Charles Wohlganger) Date: Sat, 26 Aug 2017 20:11:53 +0000 Subject: [issue20580] IDLE should support platform-specific default config defaults In-Reply-To: <1392027551.21.0.533992391985.issue20580@psf.upfronthosting.co.za> Message-ID: <1503778313.1.0.412969335339.issue20580@psf.upfronthosting.co.za> Changes by Charles Wohlganger : ---------- pull_requests: +3253 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 16:12:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Aug 2017 20:12:16 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1503778336.7.0.623902502954.issue30781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 7b556025ff7d663233e7fcb84785eb071f5e2ba7 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30781: IDLE - use ttk widgets in configdialog (GH-2654) (#3214) https://github.com/python/cpython/commit/7b556025ff7d663233e7fcb84785eb071f5e2ba7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 16:14:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Aug 2017 20:14:28 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1503778468.32.0.428174552333.issue30781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Main effects on Windows: * Label in LabelFrame is blue. * Widget frames turn blue when target by mouse. (This is especially nice for checkbuttons, where the visible 'frame' is the circle, while the mouse just needs to be inside the invisible actual frame that includes the circle and label.) * Button flat (I know that we could restore 'old-fashioned' relief with explicit styles) and sometimes larger. Font sample left-justified instead of centered. No necessarily bad. Overall, a slight improvement even on Windows. We can tweak details when revising individual pages. The dynamic option menus look out of place, and should be replaced. ---------- dependencies: -IDLE: configdialog - add tests for ConfigDialog GUI. resolution: -> fixed stage: test needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 16:15:49 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Aug 2017 20:15:49 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1503778549.81.0.84313721848.issue30780@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This issue is almost done. There are just a few things missed by the closed dependencies. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 16:32:18 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Aug 2017 20:32:18 +0000 Subject: [issue20580] IDLE should support platform-specific default config defaults In-Reply-To: <1392027551.21.0.533992391985.issue20580@psf.upfronthosting.co.za> Message-ID: <1503779538.93.0.896957924799.issue20580@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A. In 3.6+, the [Keys] section of config-main.def reads [Keys] default= 1 name= name2= # name2 set in user config-main.cfg for keys added after 2016 July 1 The name is no longer 'IDLE Classic Windows'. Instead, if default is left true, the actual default is selected in config.py with @staticmethod def default_keys(): if sys.platform[:3] == 'win': return 'IDLE Classic Windows' elif sys.platform == 'darwin': return 'IDLE Classic OSX' else: return 'IDLE Modern Unix' This change accompanied the addition of the Modern Unix keyset. If the makefile for 3.6+ still has the sed command to replace 'Windows' with 'OSX', you can remove it. B1. #27099 is moving all built-in user-configurable key defs in config-extensions.def to individual keysets in config-keys.def. These are: force-open-completions = expand-word = force-open-calltip = format-paragraph = flash-paren = run-module = check-module = zoom-height = According to my reading of https://hg.python.org/cpython/rev/13826ff147e4 the makefile changes each 'Alt-Key-' to 'Command-Key-', with an additional change for zoom-height. We can instead put the correct keys in the Mac and OSX keysets. B2. Serhiy: Are any of the above 'wrong' for Unix/Linux? Or should any alternatives be added? B3. Custom keysets will initially be missing the new defs. IdleConf currently replaces missing values with the windows values (hard-coded into the file). I think it should instead get replacements from the OS-specific default -- and perhaps check for conflicts. Then it should, if possible, write-back the complete keyset. C. There are various proposals to add new customizable key definitions for existing and new features. The issues in B, customizing default keysets and augmenting custom keysets, will come up repeatedly. When I decide to add a new key definition, I could nosy you two, Ned and Serhiy, or add a note to this issue. ---------- dependencies: +IDLE: turn builting extensions into regular modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 16:32:48 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Aug 2017 20:32:48 +0000 Subject: [issue20580] IDLE should support platform-specific default config defaults In-Reply-To: <1392027551.21.0.533992391985.issue20580@psf.upfronthosting.co.za> Message-ID: <1503779568.23.0.220828074531.issue20580@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +serhiy.storchaka -westley.martinez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 18:56:35 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 26 Aug 2017 22:56:35 +0000 Subject: [issue31284] IDLE: Fix WindowList invalid command name error when running tests In-Reply-To: <1503766538.24.0.514954347408.issue31284@psf.upfronthosting.co.za> Message-ID: <1503788195.24.0.73160193944.issue31284@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I don't remember ever seeing that message. Do you have code that reliably reproduces the problem? def postwindowsmenu(self): # Only called when Windows menu exists menu = self.menudict['windows'] end = menu.index("end") ... windows.add_windows_to_menu(menu) ".!menu.windows" is the tk Windows Menu name, generated by tkinter and saved in menudict. The function claims that it is only called when the menu exists, but the error is that it does not exist, even though it is still in the dict. This is a bug. It must result from a bug either in IDLE or the test teardown code, or maybe both. I would rather fix the bug than shoot the messenger ;-) Side note: the callback handling strikes me as slightly crazy. Creating a ListedTopLevel calls registry.add, which calls all the callbacks, each of which regenerates the menu. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 19:16:09 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 26 Aug 2017 23:16:09 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1503789369.4.0.782676108438.issue30781@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3254 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 19:33:13 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sat, 26 Aug 2017 23:33:13 +0000 Subject: [issue31284] IDLE: Fix WindowList invalid command name error when running tests In-Reply-To: <1503766538.24.0.514954347408.issue31284@psf.upfronthosting.co.za> Message-ID: <1503790393.73.0.845166108083.issue31284@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I saw it on my PR for the tests in outwin (issue30617) and I also found a comment from someone else in test_paragraph.py about it. I can reproduce it with this code: from idlelib import outwin from tkinter import Tk, Text root = Tk() w = outwin.OutputWindow(None, None, None, root) w.text = Text(root) root.mainloop() I agree that it would be best to fix the root of the problem. I thought maybe with the test, it's the way the OutputWindow is created I tried adding an flist, but that still didn't suppress the warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 21:01:05 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 27 Aug 2017 01:01:05 +0000 Subject: [issue1447222] tkinter Dialog fails when more than four buttons are used Message-ID: <1503795665.13.0.602510781439.issue1447222@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I tried the example code under 3.7 and it produced the correct the output. I think this issue can be closed. ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 22:15:42 2017 From: report at bugs.python.org (Ethan Smith) Date: Sun, 27 Aug 2017 02:15:42 +0000 Subject: [issue28638] Optimize namedtuple creation In-Reply-To: <1478578044.23.0.961493371476.issue28638@psf.upfronthosting.co.za> Message-ID: <1503800142.26.0.363341405816.issue28638@psf.upfronthosting.co.za> Changes by Ethan Smith : ---------- nosy: +Ethan Smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 22:38:08 2017 From: report at bugs.python.org (Thomas Caswell) Date: Sun, 27 Aug 2017 02:38:08 +0000 Subject: [issue31286] import in finally results in SystemError Message-ID: <1503801488.97.0.284675687907.issue31286@psf.upfronthosting.co.za> New submission from Thomas Caswell: Code to reproduce: def import_in_finally_fail(): try: print('yo') finally: import asyncio.queues as aq Results in: In [68]: import_in_finally_fail() yo --------------------------------------------------------------------------- SystemError Traceback (most recent call last) in () ----> 1 import_in_finally_fail() /tmp/py2661VBj in import_in_finally_fail() SystemError: 'finally' pops bad exception The exact import does matter, but it needs to be at least 2 modules deep and be aliased. By patching cpython to put what finally pops off the stack in the error message it looks like it is the parent module of the import. This was found via the Matplotlib test suite (ex https://travis-ci.org/matplotlib/matplotlib/jobs/262907186 ) and reported to pytest (https://github.com/pytest-dev/pytest/issues/2674) ---------- components: Interpreter Core messages: 300911 nosy: tcaswell priority: normal severity: normal status: open title: import in finally results in SystemError type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 26 22:40:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 02:40:08 +0000 Subject: [issue31284] IDLE: Fix WindowList invalid command name error when running tests In-Reply-To: <1503766538.24.0.514954347408.issue31284@psf.upfronthosting.co.za> Message-ID: <1503801608.88.0.223302182255.issue31284@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As you gave the code, the two windows just sit there with mainloop running. Replace it with root.update() #w.close() root.destroy() and run from IDLE editor and I see the ".!menu.windows" message. Uncomment the close and it goes away. Root.destroy recursively calls the .destroy methods of its children. Here, ListedTopLevel.destroy is called. It calls TopLevel.destroy and registry.delete. Its menubar child and its dropdown submenu are also destroyed. But LTL.destroy does *not* call the close method of the EditorWindow instance (which is *not* a widget). Without a reference, it cannot. Registry.delete, which is called for each ListedTopLevel *calls all the callbacks*, which it exactly should not do at shutdown. It does not unregister the associated callback. That is part of editor.close. In IDLE's normal operation, editor.close must somehow get called. In test setups and teardowns, I am careful to undo things in reverse order of creation. It is, in a sense, a bug, as things now stand, to create an OutputWindow(root) without calling its close method before destroying root. In configdialog, the callbacks are the Var tracers. The configdialog test teardown removes them all. Closing editorwindows should do the same. This is not to deny that making shutdown less fragile would be a good thing. I think having separate EditorWindow and EditorFrame classes that *are* widgets would help, as then better auxilliary shutdowns could be either part of or called from the destroy methods that get called when root.destroy is called. Aside from the ".!menu.windows" message in the idle shell, messages like the following appear in the command window if there is one, with or without the editor.close() call. invalid command name "96611576font_timer_event" while executing "96611576font_timer_event" ("after" script) "89887864font_timer_event" ("after" script) invalid command name "89718392timer_event" while executing Functions timer_event and font_timer_event are CodeContext methods. The messages don't appear if code_context is not enabled. I don't know how the messages are prevented (normally) when CondContext is enabled. The is no obvious graceful shutdown of the loops. They seem to end when self.text no longer exists so that self.text.after must fail. I already knew that this class needs work ;-). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 01:00:13 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Aug 2017 05:00:13 +0000 Subject: [issue31286] import in finally results in SystemError In-Reply-To: <1503801488.97.0.284675687907.issue31286@psf.upfronthosting.co.za> Message-ID: <1503810013.64.0.672952994381.issue31286@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Confirmed. The bug is 3.7 only. ---------- nosy: +brett.cannon, eric.snow, ncoghlan, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 02:04:40 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 27 Aug 2017 06:04:40 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1503813880.86.0.951603147974.issue30780@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3255 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 02:33:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Aug 2017 06:33:45 +0000 Subject: [issue31286] import in finally results in SystemError In-Reply-To: <1503801488.97.0.284675687907.issue31286@psf.upfronthosting.co.za> Message-ID: <1503815625.46.0.371966845029.issue31286@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The regression was introduced in issue30024. It was missed a difference between LOAD_ATTR and IMPORT_FROM. LOAD_ATTR replaces the object with the value of the attribute (do not changing the stack pointer). IMPORT_FROM keeps the original module on the stack and pushes the value of the attribute increasing the stack pointer. There are two ways of fixing this issue. 1. Add two instructions ROT_TWO and POP_TOP after every IMPORT_FROM in the bytecode generated from "import a.b.c as d". 2. Make IMPORT_FROM popping the original module from the stack. The explicit DUP_TOP instruction should be inserted before every IMPORT_FROM in the bytecode generated from "from a import b, c". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 03:16:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Aug 2017 07:16:45 +0000 Subject: [issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']` In-Reply-To: <1491736314.56.0.10945117979.issue30024@psf.upfronthosting.co.za> Message-ID: <1503818205.84.0.182281832525.issue30024@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3256 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 03:20:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Aug 2017 07:20:19 +0000 Subject: [issue31286] import in finally results in SystemError In-Reply-To: <1503801488.97.0.284675687907.issue31286@psf.upfronthosting.co.za> Message-ID: <1503818419.37.0.707000529736.issue31286@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3257 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 03:21:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 27 Aug 2017 07:21:48 +0000 Subject: [issue31286] import in finally results in SystemError In-Reply-To: <1503801488.97.0.284675687907.issue31286@psf.upfronthosting.co.za> Message-ID: <1503818508.97.0.638785213777.issue31286@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PR 3217 implements the first way. It also includes some refactoring. Remove all pyc-files before testing. ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 07:25:45 2017 From: report at bugs.python.org (Elena Oat) Date: Sun, 27 Aug 2017 11:25:45 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear In-Reply-To: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> Message-ID: <1503833145.62.0.486479108161.issue31065@psf.upfronthosting.co.za> Changes by Elena Oat : ---------- pull_requests: +3258 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 07:27:33 2017 From: report at bugs.python.org (Elena Oat) Date: Sun, 27 Aug 2017 11:27:33 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear In-Reply-To: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> Message-ID: <1503833253.63.0.771505699926.issue31065@psf.upfronthosting.co.za> Changes by Elena Oat : ---------- pull_requests: -3258 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 07:29:34 2017 From: report at bugs.python.org (Mike Hoy) Date: Sun, 27 Aug 2017 11:29:34 +0000 Subject: [issue31153] Update docstrings of itertools functions In-Reply-To: <1502264559.87.0.404253644107.issue31153@psf.upfronthosting.co.za> Message-ID: <1503833374.4.0.0157824948458.issue31153@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- nosy: +vexoxev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 09:46:09 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 27 Aug 2017 13:46:09 +0000 Subject: [issue18975] timeit: Use thousands separators and print number of loops per second In-Reply-To: <1378656031.3.0.527824204676.issue18975@psf.upfronthosting.co.za> Message-ID: <1503841569.65.0.241991893368.issue18975@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Reviewing this patch, it appears that the PEP8 changes to timeit.py are already in the source and the discussion of the thousands separator is no longer an issue with the underscore changes in 3.6 (meaning underscore now seems the way to separate digits in large numbers, although it seems the vote was to remove all separators from timeit anyway). That would leave the `loops per second` request the only one still needed from this patch. But, with the subsequent change of selecting the time unit in timeit, perhaps this patch would need to be modified to print 'loops per {timeunit}'? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 09:54:50 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 27 Aug 2017 13:54:50 +0000 Subject: [issue19431] Document PyFrame_FastToLocals() and PyFrame_FastToLocalsWithError() In-Reply-To: <1383040535.91.0.284405039579.issue19431@psf.upfronthosting.co.za> Message-ID: <1503842090.4.0.976068435671.issue19431@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Victor, Should there be a PR for this? ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 10:05:18 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 27 Aug 2017 14:05:18 +0000 Subject: [issue27181] Add geometric mean to `statistics` module In-Reply-To: <1464901494.08.0.0111988914026.issue27181@psf.upfronthosting.co.za> Message-ID: <1503842718.39.0.681939713586.issue27181@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I was wondering if this has been taken up again for 3.7? Thanks! ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 13:36:49 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 27 Aug 2017 17:36:49 +0000 Subject: [issue31284] IDLE: Fix WindowList invalid command name error when running tests In-Reply-To: <1503766538.24.0.514954347408.issue31284@psf.upfronthosting.co.za> Message-ID: <1503855409.62.0.919461523415.issue31284@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Thank you for taking the time to research and explain that. It's funny, but on my code example, I got it to happen every time and you said it didn't happen unless you made the change to use root.update() and root.destroy(). I tried it out again and realized that I was closing the tk window before OutputWindow every time, thus I was getting the warning using root.mainloop(). Of course, if I close OutputWindow first, I don't get the warning. That's running from the command line. I suppose this issue needs to be split into the real bugs that you mentioned. It seems to be at least 2 or 3 different things to look at (EditorWindow and EditorFrame and CodeContext). I'll delete the current PR for this issue. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 13:50:28 2017 From: report at bugs.python.org (Mike Thomas) Date: Sun, 27 Aug 2017 17:50:28 +0000 Subject: [issue2190] MozillaCookieJar ignore HttpOnly cookies In-Reply-To: <1203957546.34.0.123660895963.issue2190@psf.upfronthosting.co.za> Message-ID: <1503856228.33.0.240346602352.issue2190@psf.upfronthosting.co.za> Mike Thomas added the comment: Can this issue be reopened? As J?r?mie stated, curl uses this format and outputs cookie files using the #HttpOnly_ prefix. I also found at least one project that is working around lack of this support: https://code.google.com/archive/p/git-repo/ https://gerrit.googlesource.com/git-repo/+/master/subcmds/sync.py#995 # Python doesn't understand cookies with the #HttpOnly_ prefix # Since we're only using them for HTTP, copy the file temporarily, # stripping those prefixes away. One potential improvement for the proposed patch: instead of just stripping out #HttpOnly_, this attribute should be set on the Cookie that is created, within the 'rest' dict (rest={'HttpOnly': True}). The Morsel class is already aware of this attribute, as is the 'requests.cookies' module. ---------- nosy: +mt0321 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 14:33:38 2017 From: report at bugs.python.org (Oren Milman) Date: Sun, 27 Aug 2017 18:33:38 +0000 Subject: [issue31285] a SystemError and an assertion failure in warnings.warn_explicit() In-Reply-To: <1503773302.07.0.816913451611.issue31285@psf.upfronthosting.co.za> Message-ID: <1503858818.28.0.351654036706.issue31285@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3259 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 15:24:37 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 19:24:37 +0000 Subject: [issue31287] IDLE tests: don't modify tkinter.messagebox. Message-ID: <1503861877.04.0.798674063442.issue31287@psf.upfronthosting.co.za> New submission from Terry J. Reedy: test_configdialog twice patches tkinter.messagebox to mock askyesno without restoring it properly. As a consequence, the outwin test in #30617 failed because the messagebox module in editor lacked askyesno. First patch: fix configdialog and test_configdialog. Similar to what is done elsewhere, make askyesno an instance method so that it is masked by an instance attribute mock and unmasked by deleting the instance function. In the process, revise the messabebox import, Follow-on patch(es): check exiting tests and apply the same idea everywhere. In the process, end use of 'tkMessageBox'. ---------- assignee: terry.reedy components: IDLE messages: 300921 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE tests: don't modify tkinter.messagebox. type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 15:26:31 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 19:26:31 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1503861991.66.0.165958790356.issue30780@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- dependencies: +IDLE tests: don't modify tkinter.messagebox. nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 15:29:08 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 19:29:08 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1503862148.48.0.745870196971.issue30780@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #31001 and #31002 have notes on what not tested in HighPage and KeysPage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 15:38:54 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 19:38:54 +0000 Subject: [issue31287] IDLE tests: don't modify tkinter.messagebox. In-Reply-To: <1503861877.04.0.798674063442.issue31287@psf.upfronthosting.co.za> Message-ID: <1503862734.9.0.317896909935.issue31287@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3260 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 15:46:57 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 19:46:57 +0000 Subject: [issue31288] IDLE tests: don't modify tkinter.messagebox. Message-ID: <1503863217.0.0.440076905613.issue31288@psf.upfronthosting.co.za> New submission from Terry J. Reedy: Followup to #31287. Check existing tests for similar errors. Apply the idea of localizing access to messageboxes everywhere. In the process, end use of 'tkMessageBox'. ---------- assignee: terry.reedy components: IDLE messages: 300923 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE tests: don't modify tkinter.messagebox. type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 15:50:37 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 19:50:37 +0000 Subject: [issue31287] IDLE configdialog tests: don't modify tkinter.messagebox. In-Reply-To: <1503861877.04.0.798674063442.issue31287@psf.upfronthosting.co.za> Message-ID: <1503863437.25.0.198409174542.issue31287@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Additional patch or patches will be on generalized issue #31288. ---------- title: IDLE tests: don't modify tkinter.messagebox. -> IDLE configdialog tests: don't modify tkinter.messagebox. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 15:54:39 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 27 Aug 2017 19:54:39 +0000 Subject: [issue30617] IDLE: Add docstrings and unittests to outwin.py In-Reply-To: <1497045527.7.0.825782086323.issue30617@psf.upfronthosting.co.za> Message-ID: <1503863679.25.0.115108055046.issue30617@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3261 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 16:10:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 20:10:56 +0000 Subject: [issue31284] IDLE: Make GUI test teardown less fragile In-Reply-To: <1503766538.24.0.514954347408.issue31284@psf.upfronthosting.co.za> Message-ID: <1503864656.79.0.308392392918.issue31284@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I closed the patch; you can delete the branch. I changed the title to express the goal, though I am not sure how to get there yet. One thing is to be more aware of what callbacks and event loops are being set up and possibly not shut down gracefully. Your code as posted did not reproduce the error *without manual action*. Tests, including the one for #30617, has better run without user intervention. Once I made the modification to get the error, or not, just by running it, I was pretty sure of the fix for the test. ---------- stage: -> needs patch title: IDLE: Fix WindowList invalid command name error when running tests -> IDLE: Make GUI test teardown less fragile versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 16:17:56 2017 From: report at bugs.python.org (Paul Pinterits) Date: Sun, 27 Aug 2017 20:17:56 +0000 Subject: [issue31289] File paths in exception traceback resolve symlinks Message-ID: <1503865076.7.0.858933592926.issue31289@psf.upfronthosting.co.za> New submission from Paul Pinterits: The file paths displayed in exception tracebacks have their symlinks resolved. I would prefer if the "original" path could be displayed instead, because resolved symlinks result in unexpected paths in the traceback and can be quite confusing. An example: rawing at localhost ~> cat test_scripts/A.py import B B.throw() rawing at localhost ~> cat test_scripts/B.py def throw(): raise ValueError rawing at localhost ~> ln -s test_scripts test_symlink rawing at localhost ~> python3 test_symlink/A.py Traceback (most recent call last): File "test_symlink/A.py", line 2, in B.throw() File "/home/rawing/test_scripts/B.py", line 2, in throw raise ValueError ValueError As you can see, even though both scripts reside in the same directory, the file paths displayed in the traceback look very different. At first glance, it looks like B is in a completely different place than A. Furthermore, this behavior tends to trip up IDEs - PyCharm for example does not understand that test_scripts/B.py and test_symlink/B.py are the same file, so I end up having the same file opened in two different tabs. Would it be possible to change this behavior and have "/home/rawing/test_symlink/B.py" show up in the traceback instead? ---------- components: Interpreter Core messages: 300926 nosy: Paul Pinterits priority: normal severity: normal status: open title: File paths in exception traceback resolve symlinks type: behavior versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 16:39:42 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 20:39:42 +0000 Subject: [issue31287] IDLE configdialog tests: don't modify tkinter.messagebox. In-Reply-To: <1503861877.04.0.798674063442.issue31287@psf.upfronthosting.co.za> Message-ID: <1503866382.82.0.918123136104.issue31287@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 3457f428964d0fd6ab601272ead276a9bf8b1eaf by Terry Jan Reedy in branch 'master': bpo-31287: IDLE - do not alter tkinter.messagebox in configdialog tests. (#3220) https://github.com/python/cpython/commit/3457f428964d0fd6ab601272ead276a9bf8b1eaf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 16:40:49 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 20:40:49 +0000 Subject: [issue31287] IDLE configdialog tests: don't modify tkinter.messagebox. In-Reply-To: <1503861877.04.0.798674063442.issue31287@psf.upfronthosting.co.za> Message-ID: <1503866449.55.0.55465919902.issue31287@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3262 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 16:56:56 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 27 Aug 2017 20:56:56 +0000 Subject: [issue31287] IDLE configdialog tests: don't modify tkinter.messagebox. In-Reply-To: <1503861877.04.0.798674063442.issue31287@psf.upfronthosting.co.za> Message-ID: <1503867416.81.0.737275902958.issue31287@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3263 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 17:14:21 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 21:14:21 +0000 Subject: [issue31287] IDLE configdialog tests: don't modify tkinter.messagebox. In-Reply-To: <1503861877.04.0.798674063442.issue31287@psf.upfronthosting.co.za> Message-ID: <1503868461.53.0.602306742792.issue31287@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 7e248904cd5b3e658b1792deca1b82d873b2d120 by Terry Jan Reedy in branch '3.6': [3.6] bpo-31287: IDLE - do not alter tkinter.messagebox in configdialog tests. (GH-3220) (#3221) https://github.com/python/cpython/commit/7e248904cd5b3e658b1792deca1b82d873b2d120 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 17:33:41 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Sun, 27 Aug 2017 21:33:41 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1503869621.71.0.723343692925.issue30780@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3264 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 18:05:43 2017 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 27 Aug 2017 22:05:43 +0000 Subject: [issue23835] configparser does not convert defaults to strings In-Reply-To: <1427862188.44.0.00358189102447.issue23835@psf.upfronthosting.co.za> Message-ID: <1503871543.08.0.0620430440607.issue23835@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 18:06:03 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 22:06:03 +0000 Subject: [issue30617] IDLE: Add docstrings and unittests to outwin.py In-Reply-To: <1497045527.7.0.825782086323.issue30617@psf.upfronthosting.co.za> Message-ID: <1503871563.53.0.0199029988188.issue30617@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 998f4966bf0c591f3e8b3d07eccad7501f60f524 by Terry Jan Reedy (Cheryl Sabella) in branch 'master': bpo-30617: IDLE: docstrings and unittest for outwin.py (#2046) https://github.com/python/cpython/commit/998f4966bf0c591f3e8b3d07eccad7501f60f524 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 18:07:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 22:07:27 +0000 Subject: [issue30617] IDLE: Add docstrings and unittests to outwin.py In-Reply-To: <1497045527.7.0.825782086323.issue30617@psf.upfronthosting.co.za> Message-ID: <1503871647.24.0.110156494934.issue30617@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3265 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 18:10:50 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 22:10:50 +0000 Subject: [issue31287] IDLE configdialog tests: don't modify tkinter.messagebox. In-Reply-To: <1503861877.04.0.798674063442.issue31287@psf.upfronthosting.co.za> Message-ID: <1503871850.39.0.445488112186.issue31287@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 Sun Aug 27 18:12:44 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 27 Aug 2017 22:12:44 +0000 Subject: [issue31191] Fix grammar in threading.Barrier docs In-Reply-To: <1502736895.43.0.873183336096.issue31191@psf.upfronthosting.co.za> Message-ID: <1503871964.89.0.746171547044.issue31191@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +3266 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 18:19:11 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 27 Aug 2017 22:19:11 +0000 Subject: [issue31191] Fix grammar in threading.Barrier docs In-Reply-To: <1502736895.43.0.873183336096.issue31191@psf.upfronthosting.co.za> Message-ID: <1503872351.08.0.134393116578.issue31191@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 2dfafa3c565c0b51920269a891fa270848b378d5 by Mariatta in branch '3.6': bpo-31191: Improve grammar in threading.Barrier docs (GH-3080) (GH-3224) https://github.com/python/cpython/commit/2dfafa3c565c0b51920269a891fa270848b378d5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 18:19:32 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 27 Aug 2017 22:19:32 +0000 Subject: [issue31191] Fix grammar in threading.Barrier docs In-Reply-To: <1502736895.43.0.873183336096.issue31191@psf.upfronthosting.co.za> Message-ID: <1503872372.18.0.235945850587.issue31191@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 18:29:26 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 22:29:26 +0000 Subject: [issue30617] IDLE: Add docstrings and unittests to outwin.py In-Reply-To: <1497045527.7.0.825782086323.issue30617@psf.upfronthosting.co.za> Message-ID: <1503872966.67.0.930367033407.issue30617@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 5c89c2fd8a0be0ad2f89f084775c5f9f76687237 by Terry Jan Reedy in branch '3.6': [3.6] bpo-30617: IDLE: docstrings and unittest for outwin.py (GH-2046) (#3223) https://github.com/python/cpython/commit/5c89c2fd8a0be0ad2f89f084775c5f9f76687237 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 18:31:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 27 Aug 2017 22:31:38 +0000 Subject: [issue30617] IDLE: Add docstrings and unittests to outwin.py In-Reply-To: <1497045527.7.0.825782086323.issue30617@psf.upfronthosting.co.za> Message-ID: <1503873098.51.0.407196903578.issue30617@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 19:14:04 2017 From: report at bugs.python.org (Henk-Jaap Wagenaar) Date: Sun, 27 Aug 2017 23:14:04 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1503875644.82.0.182586271148.issue26656@psf.upfronthosting.co.za> Henk-Jaap Wagenaar added the comment: Emily: I've signed the CLA, just waiting for it to be checked. ---------- nosy: +Henk-Jaap Wagenaar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 20:23:28 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 28 Aug 2017 00:23:28 +0000 Subject: [issue27099] IDLE: turn built-in extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1503879808.06.0.539856648555.issue27099@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: IDLE: turn builting extensions into regular modules -> IDLE: turn built-in extensions into regular modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 22:28:22 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 28 Aug 2017 02:28:22 +0000 Subject: [issue31282] C APIs called without GIL in PyOS_Readline In-Reply-To: <1503723073.13.0.645165249007.issue31282@psf.upfronthosting.co.za> Message-ID: <1503887302.39.0.696479307276.issue31282@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- stage: -> needs patch versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 27 22:41:24 2017 From: report at bugs.python.org (Wonsup Yoon) Date: Mon, 28 Aug 2017 02:41:24 +0000 Subject: [issue29456] bugs in unicodedata.normalize: u1176, u11a7 and u11c3 In-Reply-To: <1486355272.29.0.0894514518656.issue29456@psf.upfronthosting.co.za> Message-ID: <1503888084.54.0.157738254853.issue29456@psf.upfronthosting.co.za> Wonsup Yoon added the comment: Hello? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 00:05:09 2017 From: report at bugs.python.org (Constantine Ketskalo) Date: Mon, 28 Aug 2017 04:05:09 +0000 Subject: [issue31244] IDLE: work around shortcuts bug in Windows' IMEs and tk In-Reply-To: <1503317029.77.0.700563383458.issue31244@psf.upfronthosting.co.za> Message-ID: <1503893109.13.0.797484919812.issue31244@psf.upfronthosting.co.za> Constantine Ketskalo added the comment: Impossible... Yea, right... Will documenting it help to solve it? If that's impossible, then how do other programs deal with it? What does make Python so special? I still don't see anything impossible. If other programs can do it but Python IDLE can't do it for now, then it's called either "hard" or "I don't want to do it", but not "impossible". First of all I would try to find out how does cyrillic work with other programs(sorry, I don't know that). Probably their approach to this situation could be just copied to Python IDLE behaviour. Japanese wan't help you with cyrillic. This ticket is about cyrillic!!! ascii is not the only encoding, that exists. Could it be as possible solution to use unicode incoding with Python when it comes down to hotkeys? If there is something that makes Japaneese and cyrillic languages incompatible with each other to use hotkeys, well, then you could just add option to choose which language is preferable to user (either in installed program, or during installatioin). Windows command prompt doesn't support cyrillic by default, but there is a code in C, that makes it work with cyrillic input and output. Python was written on C, so I'm sure it could be helpful even if it doesn't work directly. Here is this code for C/C++: ` SetConsoleCP(1251); SetConsoleOutputCP(1251); setlocale(0, "Ukrainian"); ` ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 00:50:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Aug 2017 04:50:22 +0000 Subject: [issue31282] C APIs called without GIL in PyOS_Readline In-Reply-To: <1503723073.13.0.645165249007.issue31282@psf.upfronthosting.co.za> Message-ID: <1503895822.64.0.45861501465.issue31282@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: AFAIK PyMem_Malloc/MALLOC can be used with released GIL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 01:01:36 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 28 Aug 2017 05:01:36 +0000 Subject: [issue31282] C APIs called without GIL in PyOS_Readline In-Reply-To: <1503723073.13.0.645165249007.issue31282@psf.upfronthosting.co.za> Message-ID: <1503896496.88.0.68083436989.issue31282@psf.upfronthosting.co.za> Xiang Zhang added the comment: In pymem.h, it's stated that "The GIL must be held when using these APIs". I think the reason is when PYMALLOC_DEBUG is defined, they finally delegate to PyObject_Malloc. Victor must be familiar with them since once he proposed to remote the restriction: https://mail.python.org/pipermail/python-dev/2013-June/126822.html. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 01:41:22 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 28 Aug 2017 05:41:22 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1503898882.51.0.451050874858.issue26656@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset ed94a8b2851914bcda3a77b28b25517b8baa91e6 by Mariatta (Henk-Jaap Wagenaar) in branch 'master': bpo-26656: Improve re.compile documentation (GH-3211) https://github.com/python/cpython/commit/ed94a8b2851914bcda3a77b28b25517b8baa91e6 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 01:43:38 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 28 Aug 2017 05:43:38 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1503899018.61.0.832022623917.issue26656@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: +3267 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 01:50:10 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 28 Aug 2017 05:50:10 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1503899410.21.0.389291437266.issue26656@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 83e5c888fff2bf3663952b2bfd3a3ee6c20386ef by Mariatta in branch '3.6': [3.6] bpo-26656: Improve re.compile documentation (GH-3211) (GH-3225) https://github.com/python/cpython/commit/83e5c888fff2bf3663952b2bfd3a3ee6c20386ef ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 01:52:11 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 28 Aug 2017 05:52:11 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1503899531.23.0.0265551899062.issue26656@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: There are two PRs for this issue. I accepted the earlier one, and it's been backported to 3.6. Thanks everyone. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 01:53:50 2017 From: report at bugs.python.org (Roundup Robot) Date: Mon, 28 Aug 2017 05:53:50 +0000 Subject: [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1503899630.92.0.871147936624.issue26656@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3268 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 02:42:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Aug 2017 06:42:58 +0000 Subject: [issue31285] a SystemError and an assertion failure in warnings.warn_explicit() In-Reply-To: <1503773302.07.0.816913451611.issue31285@psf.upfronthosting.co.za> Message-ID: <1503902578.19.0.292474755081.issue31285@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: An alternative solution is using str.splitlines(source) instead of source.splitlines(). It raises a TypeError if the argument is not a text string and always returns a list of strings. According to the documentation get_source() must return a text string or None. https://docs.python.org/3/library/importlib.html?highlight=get_source#importlib.abc.InspectLoader.get_source ---------- nosy: +brett.cannon, eric.snow, ncoghlan, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 02:57:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Aug 2017 06:57:16 +0000 Subject: [issue19431] Document PyFrame_FastToLocals() and PyFrame_FastToLocalsWithError() In-Reply-To: <1383040535.91.0.284405039579.issue19431@psf.upfronthosting.co.za> Message-ID: <1503903436.58.0.178006838579.issue19431@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: PyFrameObject already is documented in Doc/c-api/veryhigh.rst. PyFrame_GetLineNumber() already is documented in Doc/c-api/reflection.rst. PyFrame_FastToLocals() and PyFrame_LocalsToFast() are not documented and have weird interface. I think the use of them should be discouraged. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 03:28:43 2017 From: report at bugs.python.org (Richard) Date: Mon, 28 Aug 2017 07:28:43 +0000 Subject: [issue31290] segfault on missing library symbol Message-ID: <1503905323.73.0.492729138939.issue31290@psf.upfronthosting.co.za> New submission from Richard: I'm building a Python library with a C++ component composed of a number of source .cpp files. After some changes today, compiling and loading in Python3 resulted in a segfault: Python 3.5.3 (default, Jan 19 2017, 14:11:04) [GCC 6.3.0 20170118] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import mymodule Segmentation fault (core dumped) As you might imagine, this is not the funnest thing ever to debug. Thankfully, when I compiled the module for Python2 and tried to load, a much more helpful and informative error message was displayed. Python 2.7.13 (default, Jan 19 2017, 14:48:08) [GCC 6.3.0 20170118] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mymodule Traceback (most recent call last): File "", line 1, in File "mymodule/__init__.py", line 1, in import _mymodule ImportError: ./_mymodule.so: undefined symbol: DBFGetRecordCount >>> And indeed, it seems that in my setup.py file where I had setuptools.Extension( "_mymodule", glob.glob('src/*.cpp') + glob.glob('lib/mylib/*.cpp') + glob.glob('lib/mylib/sublib/*.c'), I should have had 'lib/mylib/sublib/*.cpp'. I think the current behaviour can be improved: 1. Python3 should provide a helpful error message, like Python2 does. 2. setup.py should fail or at least provide a warning if there are missing symbols. (Perhaps this suggestion should be aimed at one of the setup utilities, but I'm not sure where to send it.) ---------- messages: 300942 nosy: immortalplants priority: normal severity: normal status: open title: segfault on missing library symbol versions: Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 04:32:48 2017 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Aug 2017 08:32:48 +0000 Subject: [issue30987] Support for ISO-TP protocol in SocketCAN In-Reply-To: <1500696791.75.0.683510511028.issue30987@psf.upfronthosting.co.za> Message-ID: <1503909168.76.0.712874229236.issue30987@psf.upfronthosting.co.za> Christian Heimes added the comment: New changeset a30f6d45ac3e72761b96a8df0527182029eaee24 by Christian Heimes (Pier-Yves Lessard) in branch 'master': bpo-30987 - Support for ISO-TP protocol in SocketCAN (#2956) https://github.com/python/cpython/commit/a30f6d45ac3e72761b96a8df0527182029eaee24 ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 04:44:17 2017 From: report at bugs.python.org (Christian Heimes) Date: Mon, 28 Aug 2017 08:44:17 +0000 Subject: [issue30987] Support for ISO-TP protocol in SocketCAN In-Reply-To: <1500696791.75.0.683510511028.issue30987@psf.upfronthosting.co.za> Message-ID: <1503909857.37.0.204686116073.issue30987@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 04:44:26 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 28 Aug 2017 08:44:26 +0000 Subject: [issue31291] an assertion failure in zipimport.zipimporter.get_data() Message-ID: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> New submission from Oren Milman: on Windows, assuming the file 'foo.zip' exists, the following would cause an assertion failure in Modules/zipimport.c in zipimport_zipimporter_get_data_impl(): import zipimport class BadStr(str): def replace(self, old, new): return 42 zipimport.zipimporter('foo.zip').get_data(BadStr('bar')) this is because zipimport_zipimporter_get_data_impl() assumes that BadStr('bar').replace('/', '\\') is a string. ---------- components: Interpreter Core messages: 300944 nosy: Oren Milman priority: normal severity: normal status: open title: an assertion failure in zipimport.zipimporter.get_data() type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 05:22:17 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 28 Aug 2017 09:22:17 +0000 Subject: [issue31291] an assertion failure in zipimport.zipimporter.get_data() In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1503912137.91.0.0657207233868.issue31291@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3269 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 05:32:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 28 Aug 2017 09:32:53 +0000 Subject: [issue31282] C APIs called without GIL in PyOS_Readline In-Reply-To: <1503896496.88.0.68083436989.issue31282@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: You must hold the GIL to call PyMem_Malloc(). A debug assert should be raised if you don't hold the GIL since Python 3.6 with PYTHONMALLOC=debug. Call PyMem_RawMalloc(). I fixed Python 3, no? For Python 2, in practice you can call PyMem_Malloc() without holding the GIL, it's just malloc() which is thread safe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 05:38:40 2017 From: report at bugs.python.org (Ilia Korvigo) Date: Mon, 28 Aug 2017 09:38:40 +0000 Subject: [issue31272] typing module conflicts with __slots__-classes In-Reply-To: <1503686616.03.0.128635152171.issue31272@psf.upfronthosting.co.za> Message-ID: Ilia Korvigo added the comment: Indeed, this issue has been fixed. Anyway, it is not mentioned in any release notes. Perhaps, this should be mentioned somewhere. > On 25 Aug 2017, at 21:43, Ivan Levkivskyi wrote: > > > Ivan Levkivskyi added the comment: > > I think this is fixed in latest version. I thought it was also backported to Python 3.5.3. What is the version you are using? Could you please try updating to the latest bugfix release? (currently these are 3.5.4 and 3.6.2). > > ---------- > nosy: +levkivskyi > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 05:56:42 2017 From: report at bugs.python.org (Alex Hayes) Date: Mon, 28 Aug 2017 09:56:42 +0000 Subject: [issue31209] MappingProxyType can not be pickled In-Reply-To: <1502772551.88.0.290451219237.issue31209@psf.upfronthosting.co.za> Message-ID: <1503914202.12.0.769078786189.issue31209@psf.upfronthosting.co.za> Alex Hayes added the comment: Closing issue - thanks rhettinger ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 06:28:41 2017 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 28 Aug 2017 10:28:41 +0000 Subject: [issue31282] C APIs called without GIL in PyOS_Readline In-Reply-To: <1503723073.13.0.645165249007.issue31282@psf.upfronthosting.co.za> Message-ID: <1503916121.06.0.180130167862.issue31282@psf.upfronthosting.co.za> Xiang Zhang added the comment: >>> I fixed Python 3, no? Yes. In Python3 they are replaced by PyMem_RawMalloc. But it's not only PyMem_Malloc, there are also PyErr_SetString, PyErr_NoMemory, even in Python3. BTW, even in Python3, when memory allocators are in debug mode, it finally calls bumpserialno, which IIUC, is not thread safe. But of course it's another issue. >>> For Python 2, in practice you can call PyMem_Malloc() without holding the GIL, it's just malloc() which is thread safe. Hmm, I know it. But it's not stated in the doc they are thread safe, I am not sure assuming this is suitable. An example is https://github.com/psycopg/psycopg2/issues/110. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 06:41:52 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 28 Aug 2017 10:41:52 +0000 Subject: [issue31272] typing module conflicts with __slots__-classes In-Reply-To: <1503599664.93.0.449415380288.issue31272@psf.upfronthosting.co.za> Message-ID: <1503916912.75.0.809571741373.issue31272@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: It is listed in Misc/NEWS as "minor bug fixes" in typing module, I don't think this is something that deserves a separate line in release notes. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 06:54:33 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 28 Aug 2017 10:54:33 +0000 Subject: [issue31285] a SystemError and an assertion failure in warnings.warn_explicit() In-Reply-To: <1503773302.07.0.816913451611.issue31285@psf.upfronthosting.co.za> Message-ID: <1503917673.05.0.314812938289.issue31285@psf.upfronthosting.co.za> Oren Milman added the comment: ISTM that your solution is better than mine, Serhiy, so I updated the PR. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 08:08:53 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Aug 2017 12:08:53 +0000 Subject: [issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes In-Reply-To: <1292888248.06.0.197043159654.issue10746@psf.upfronthosting.co.za> Message-ID: <1503922133.73.0.629756920776.issue10746@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 07f1658aa09f6798793c473c72b2951b7fefe220 by Antoine Pitrou (Pauli Virtanen) in branch 'master': bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (#31) https://github.com/python/cpython/commit/07f1658aa09f6798793c473c72b2951b7fefe220 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 08:13:12 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Aug 2017 12:13:12 +0000 Subject: [issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes In-Reply-To: <1292888248.06.0.197043159654.issue10746@psf.upfronthosting.co.za> Message-ID: <1503922392.56.0.508728959412.issue10746@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Pauli, do you want to submit backport PRs? This can be done using the cherry_picker script: https://devguide.python.org/committing/?highlight=cherry_picker#backporting-changes-to-an-older-version ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 09:57:45 2017 From: report at bugs.python.org (flying sheep) Date: Mon, 28 Aug 2017 13:57:45 +0000 Subject: [issue31292] `python setup.py check --restructuredtext` fails when a include directive is present. Message-ID: <1503928665.81.0.590770692205.issue31292@psf.upfronthosting.co.za> New submission from flying sheep: If I have a setup.py containing a include directive, and use the command in the title, I get Traceback (most recent call last): [...] File "/usr/lib/python3.6/site-packages/docutils/parsers/rst/directives/misc.py", line 59, in run source_dir = os.path.dirname(os.path.abspath(source)) File "/usr/lib/python3.6/posixpath.py", line 369, in abspath path = os.fspath(path) TypeError: expected str, bytes or os.PathLike object, not _io.StringIO The bug is in this method: distutils.command.check.check._check_rst_data The first line already hints at it: `source_path = StringIO()` StringIO instances aren?t paths, but at least the include directive (docutils.parsers.rst.directives.misc.Include) expects one. ---------- components: Distutils files: check-test.py messages: 300953 nosy: dstufft, flying sheep, merwok priority: normal severity: normal status: open title: `python setup.py check --restructuredtext` fails when a include directive is present. type: crash versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file47104/check-test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 10:36:40 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 28 Aug 2017 14:36:40 +0000 Subject: [issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float() Message-ID: <1503931000.21.0.764494766764.issue31293@psf.upfronthosting.co.za> New submission from Oren Milman: both of the following true division and multiplication operations crash the interpreter: import datetime class BadFloat(float): def as_integer_ratio(self): return (1 << 1000) - 1 datetime.timedelta() / BadFloat() datetime.timedelta() * BadFloat() this is because both multiply_float_timedelta() and truedivide_timedelta_float() (in Modules/_datetimemodule.c) assume as_integer_ratio() returns tuple. ---------- components: Interpreter Core messages: 300954 nosy: Oren Milman priority: normal severity: normal status: open title: crashes in multiply_float_timedelta() and in truedivide_timedelta_float() type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 10:41:55 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Aug 2017 14:41:55 +0000 Subject: [issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float() In-Reply-To: <1503931000.21.0.764494766764.issue31293@psf.upfronthosting.co.za> Message-ID: <1503931315.25.0.504413643083.issue31293@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +belopolsky, serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 10:42:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Aug 2017 14:42:04 +0000 Subject: [issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float() In-Reply-To: <1503931000.21.0.764494766764.issue31293@psf.upfronthosting.co.za> Message-ID: <1503931324.27.0.858763638396.issue31293@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Extension Modules -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 10:43:56 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 28 Aug 2017 14:43:56 +0000 Subject: [issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float() In-Reply-To: <1503931000.21.0.764494766764.issue31293@psf.upfronthosting.co.za> Message-ID: <1503931436.17.0.844469573166.issue31293@psf.upfronthosting.co.za> Oren Milman added the comment: i am working on a patch. BTW, is there anywhere a list of what counts as an extension module, and what counts as the interpreter core? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 11:24:47 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Aug 2017 15:24:47 +0000 Subject: [issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float() In-Reply-To: <1503931000.21.0.764494766764.issue31293@psf.upfronthosting.co.za> Message-ID: <1503933887.28.0.550227177115.issue31293@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't know if there is a list, but definitely the parser, the compiler, the evaluation loop, builtin types and few builtin modules (like builtins and sys) are interpreter core. The _datetime module is an accelerator of the datetime module. It is optional and definitely is not in the core. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 11:35:57 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 28 Aug 2017 15:35:57 +0000 Subject: [issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float() In-Reply-To: <1503931000.21.0.764494766764.issue31293@psf.upfronthosting.co.za> Message-ID: <1503934557.75.0.776937687614.issue31293@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3270 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 12:27:07 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 28 Aug 2017 16:27:07 +0000 Subject: [issue30421] argparse: relative include of config files In-Reply-To: <1495354542.35.0.729762114821.issue30421@psf.upfronthosting.co.za> Message-ID: <1503937627.35.0.676853863872.issue30421@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +bethard versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 12:48:33 2017 From: report at bugs.python.org (Lisa Hewus) Date: Mon, 28 Aug 2017 16:48:33 +0000 Subject: [issue3037] in output In-Reply-To: <1212609019.75.0.807560443614.issue3037@psf.upfronthosting.co.za> Message-ID: <1503938913.8.0.0793187222724.issue3037@psf.upfronthosting.co.za> Changes by Lisa Hewus : ---------- pull_requests: +3271 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 13:22:39 2017 From: report at bugs.python.org (Lisa Hewus) Date: Mon, 28 Aug 2017 17:22:39 +0000 Subject: [issue30737] Update devguide link to the new URL In-Reply-To: <1498151147.34.0.638989883605.issue30737@psf.upfronthosting.co.za> Message-ID: <1503940959.87.0.0828078160599.issue30737@psf.upfronthosting.co.za> Changes by Lisa Hewus : ---------- pull_requests: +3272 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 13:23:46 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 28 Aug 2017 17:23:46 +0000 Subject: [issue3037] in output In-Reply-To: <1212609019.75.0.807560443614.issue3037@psf.upfronthosting.co.za> Message-ID: <1503941026.7.0.912114835395.issue3037@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- pull_requests: -3271 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 13:24:08 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 28 Aug 2017 17:24:08 +0000 Subject: [issue30737] Update devguide link to the new URL In-Reply-To: <1498151147.34.0.638989883605.issue30737@psf.upfronthosting.co.za> Message-ID: <1503941048.52.0.141998585213.issue30737@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: needs patch -> patch review versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 13:57:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 28 Aug 2017 17:57:52 +0000 Subject: [issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float() In-Reply-To: <1503931000.21.0.764494766764.issue31293@psf.upfronthosting.co.za> Message-ID: <1503943072.51.0.885511537432.issue31293@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please check if there is similar issue with Decimal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 14:23:30 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 28 Aug 2017 18:23:30 +0000 Subject: [issue31293] crashes in multiply_float_timedelta() and in truedivide_timedelta_float() In-Reply-To: <1503931000.21.0.764494766764.issue31293@psf.upfronthosting.co.za> Message-ID: <1503944610.97.0.775813417201.issue31293@psf.upfronthosting.co.za> Oren Milman added the comment: I guess you meant for me to check whether the following has any problem: import decimal class BadFloat(float): def as_integer_ratio(self): return 1 << 1000 decimal.Decimal.from_float(BadFloat()) so it doesn't crash. if IIUC, this is because the C implementation of Decimal.from_float() is PyDecType_FromFloat(), while the relevant part of it is a call to PyDecType_FromFloatExact(). But PyDecType_FromFloatExact() uses float.as_integer_ratio(), and thus ISTM that the issue doesn't exist there. (also, the following doesn't raise an exception, as expected: import decimal class BadFloat(float): def as_integer_ratio(self): raise RuntimeError decimal.Decimal.from_float(BadFloat()) ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 14:25:21 2017 From: report at bugs.python.org (Dmitry Kazakov) Date: Mon, 28 Aug 2017 18:25:21 +0000 Subject: [issue16217] Tracebacks are unnecessarily verbose when using 'python -m' In-Reply-To: <1350132701.04.0.542395484982.issue16217@psf.upfronthosting.co.za> Message-ID: <1503944721.91.0.26418626305.issue16217@psf.upfronthosting.co.za> Dmitry Kazakov added the comment: Since runpy also handles the execution of directories and zip files, I think it would be reasonable to clean up tracebacks in these cases, too. The ignore_modules argument would be a great addition to the traceback module. Should I create a separate issue/pull request for its implementation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 14:55:35 2017 From: report at bugs.python.org (Pablo) Date: Mon, 28 Aug 2017 18:55:35 +0000 Subject: [issue31294] ZeroMQSocketListener and ZeroMQSocketHandler examples in the Logging Cookbook not working Message-ID: <1503946535.18.0.843983247211.issue31294@psf.upfronthosting.co.za> New submission from Pablo: There are two documentation issues regarding the ZeroMQSocketListener and ZeroMQSocketHandler examples in the Logging Cookbook: The first issue is that in the 'init' method for the 'ZeroMQSocketListener' the base class 'init' is never called and therefore the internal variables are not correctly initialized. This leads to an empty 'handlers' attribute and a undefined 'queue' attribute. The second issue is that zmq.Socket.send and zmq.Socket.setsockopt only admits bytecode variables and therefore it fails in Python3 when using plain strings. ---------- assignee: docs at python components: Documentation messages: 300960 nosy: docs at python, pablogsal priority: normal pull_requests: 3273 severity: normal status: open title: ZeroMQSocketListener and ZeroMQSocketHandler examples in the Logging Cookbook not working _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 15:42:50 2017 From: report at bugs.python.org (Antony Lee) Date: Mon, 28 Aug 2017 19:42:50 +0000 Subject: [issue31295] typo in __hash__ docs Message-ID: <1503949370.09.0.113747018634.issue31295@psf.upfronthosting.co.za> New submission from Antony Lee: In https://docs.python.org/3.7/reference/datamodel.html#object.__hash__ I think x.__hash__() returns an appropriate value such that x == y implies both that x is y and hash(x) == hash(y). should be x.__hash__() returns an appropriate value such that x == y and x is y both imply that hash(x) == hash(y). right? ---------- assignee: docs at python components: Documentation messages: 300961 nosy: Antony.Lee, docs at python priority: normal severity: normal status: open title: typo in __hash__ docs versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 15:45:48 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 28 Aug 2017 19:45:48 +0000 Subject: [issue31291] an assertion failure in zipimport.zipimporter.get_data() In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1503949548.08.0.470892160181.issue31291@psf.upfronthosting.co.za> Brett Cannon added the comment: I don't think this is a bad thing. This is duck-typing at work to be flexible where the type doesn't really matter, just the provided interface. If someone happens to provide an object that doesn't do the right thing then that's their fault for using the wrong object and the resulting exception that will occur from a bad path is acceptable. I appreciate the work to do a PR, Oren, but I'm closing this issue as "rejected". (And if it makes you feel any better, you helped find a bug in the Bedevere bot. :) . ---------- nosy: +brett.cannon, twouters resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 15:57:03 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 28 Aug 2017 19:57:03 +0000 Subject: [issue31291] an assertion failure in zipimport.zipimporter.get_data() In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1503950223.36.0.503426938812.issue31291@psf.upfronthosting.co.za> Oren Milman added the comment: I understand that our goal is to make Python better, not to make me happier :) anyway, I haven't checked, but I am quite sure that similar code might crash the interpreter on a release build of Python. (just wanted to clarify that, as you used the term 'exception'.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 16:00:57 2017 From: report at bugs.python.org (R. David Murray) Date: Mon, 28 Aug 2017 20:00:57 +0000 Subject: [issue31295] typo in __hash__ docs In-Reply-To: <1503949370.09.0.113747018634.issue31295@psf.upfronthosting.co.za> Message-ID: <1503950457.22.0.870985929417.issue31295@psf.upfronthosting.co.za> R. David Murray added the comment: No, it is correct as worded. It is talking about the default methods. With the default methods, x == y implies that x is y. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 16:38:29 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 28 Aug 2017 20:38:29 +0000 Subject: [issue31291] an assertion failure in zipimport.zipimporter.get_data() In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1503952709.97.0.36755407721.issue31291@psf.upfronthosting.co.za> Brett Cannon added the comment: If it will crash the interpreter then that's different. If that turns out to be the case then please come back here and we can rework the issue and PR to prevent that by being better about checking return values or resulting exception cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 16:58:15 2017 From: report at bugs.python.org (Oren Milman) Date: Mon, 28 Aug 2017 20:58:15 +0000 Subject: [issue31291] an assertion failure in zipimport.zipimporter.get_data() In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1503953895.86.0.688836581995.issue31291@psf.upfronthosting.co.za> Oren Milman added the comment: just checked, and indeed on my Windows 10 the original code I posted here crashes the interpreter. The patch in the PR undermines duck-typing, and that's why I added a comment there, stating I wasn't sure about the patch. an alternate solution would be to simply check whether the return value of pathname.replace('/', '\') is a str. do you think I would update the PR to do that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 18:00:14 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 28 Aug 2017 22:00:14 +0000 Subject: [issue31291] an assertion failure in zipimport.zipimporter.get_data() In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1503957614.27.0.660305113121.issue31291@psf.upfronthosting.co.za> Brett Cannon added the comment: Could you paste in what the crash looks like? E.g. is it a segfault, SystemError, etc.? And you can tweak the PR or just open a new one if you would rather that fixes the crash itself without taking away duck typing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 18:00:24 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 28 Aug 2017 22:00:24 +0000 Subject: [issue31291] an assertion failure in zipimport.zipimporter.get_data() In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1503957624.9.0.728177822461.issue31291@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: rejected -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 18:00:49 2017 From: report at bugs.python.org (Brett Cannon) Date: Mon, 28 Aug 2017 22:00:49 +0000 Subject: [issue31291] zipimport.zipimporter.get_data() crashes when path.replace() returns a non-str In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1503957649.09.0.110060460436.issue31291@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: an assertion failure in zipimport.zipimporter.get_data() -> zipimport.zipimporter.get_data() crashes when path.replace() returns a non-str _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 19:01:53 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 28 Aug 2017 23:01:53 +0000 Subject: [issue31296] support pty.fork and os.forkpty actions in posix subprocess module Message-ID: <1503961313.68.0.46157569619.issue31296@psf.upfronthosting.co.za> New submission from Gregory P. Smith: The PyPI pexpect.spawn API is incompatible with multithreaded code thanks to its dependency on pty.fork() and running non async signal safe code between fork() and exec(). https://github.com/pexpect/ptyprocess/issues/43 https://github.com/pexpect/pexpect/issues/369 If subprocess supported pty.fork() and pexpect.pty_spawn.spawn like actions, pexpect could use that by default instead of the threading incompatible pty.fork(). (this is a brainstorm, see what the pexpect maintainers want in the above github issues) ---------- components: Library (Lib) messages: 300968 nosy: gregory.p.smith priority: normal severity: normal status: open title: support pty.fork and os.forkpty actions in posix subprocess module versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 19:53:15 2017 From: report at bugs.python.org (Rachel Tobin) Date: Mon, 28 Aug 2017 23:53:15 +0000 Subject: [issue31297] Unpickleable ModuleImportError in unittest patch not backported to 2.7 Message-ID: <1503964395.2.0.931089155502.issue31297@psf.upfronthosting.co.za> New submission from Rachel Tobin: When running the unittest runner in parallel with an module import error present in your code, this exception is raised: _pickle.PicklingError: Can't pickle : attribute lookup ModuleImportFailure on unittest.loader failed unittest should be raising standard exceptions instead. This was fixed in Python 3.4 with this patch: https://bugs.python.org/issue22903 Given that 2.7 is still supported, this patch should be backported. ---------- components: Library (Lib) messages: 300969 nosy: Rachel Tobin priority: normal severity: normal status: open title: Unpickleable ModuleImportError in unittest patch not backported to 2.7 type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 22:10:29 2017 From: report at bugs.python.org (Daniel) Date: Tue, 29 Aug 2017 02:10:29 +0000 Subject: [issue31298] Error when calling numpy.astype Message-ID: <1503972629.82.0.848961693934.issue31298@psf.upfronthosting.co.za> New submission from Daniel: Ubuntu 16.04.3 Python 3.5.2 Numpy version 1.11.0 Running the following two commands causes Python to crash: import numpy as np np.array([[1, 2],[3,4]]).astype(np.dtype([("a", np.float), ("b", np.str_)])) The error occurs when running in an interactive session and when running those two commands as a script. The error I get is: *** Error in `python3': free(): invalid next size (normal): 0x0000000001a088f0 *** A memory map printed after the error is attached. The backtrace is ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f55ac35e7e5] /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7f55ac36737a] /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f55ac36b53c] /usr/lib/python3/dist-packages/numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so(+0x6d35e)[0x7f55ab0fa35e] /usr/lib/python3/dist-packages/numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so(+0x45a29)[0x7f55ab0d2a29] /usr/lib/python3/dist-packages/numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so(+0x461a2)[0x7f55ab0d31a2] /usr/lib/python3/dist-packages/numpy/core/multiarray.cpython-35m-x86_64-linux-gnu.so(+0xcf828)[0x7f55ab15c828] python3(PyCFunction_Call+0x77)[0x4e9bc7] python3(PyEval_EvalFrameEx+0x614)[0x524414] python3[0x52d2e3] python3(PyEval_EvalCode+0x1f)[0x52dfdf] python3[0x5fd2c2] python3(PyRun_FileExFlags+0x9a)[0x5ff76a] python3(PyRun_SimpleFileExFlags+0x1bc)[0x5ff95c] python3(Py_Main+0x456)[0x63e7d6] python3(main+0xe1)[0x4cfe41] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f55ac307830] python3(_start+0x29)[0x5d5f29] ---------- components: Interpreter Core files: memdump.txt messages: 300970 nosy: droth priority: normal severity: normal status: open title: Error when calling numpy.astype type: crash versions: Python 3.5 Added file: http://bugs.python.org/file47105/memdump.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 28 22:57:26 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 29 Aug 2017 02:57:26 +0000 Subject: [issue22707] Idle: changed options should take effect immediately In-Reply-To: <1414023493.97.0.227461422456.issue22707@psf.upfronthosting.co.za> Message-ID: <1503975446.97.0.770920649131.issue22707@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To expand on the initial statement, changes can take effect a) when IDLE start (the initial window option), b) when a new editor window is created (the initial size option), c) immediately for all editors (indent size and most others), and d) immediately for the active editor (code context toggle). They should take effect as soon as sensible. Allowing more individual customization of editors (font, theme, keys, etc) is out of scope for this issue. I will just note that the values that apply to all editors should have been module or class attributes rather than instance attributes. This would make updating the attributes easier and faster and would allow instance attributes to be used for instance customization. The prime violators of 'when' are most of the non-key options that occur in 4 of the built-in extensions. These are mostly class attributes read just once when the module is imported and the class created, which happens when the first EditorWindow is created. One exception is Paragraph, where the attribute is an instance attribute, but really should be a Paragraph class or even module attribute. (I expect the class to be eliminated some day.) The other is the buggy CodeContext().visible. What is needed is a mechanism to reload the class attributes after they are changed. I believe the easiest way would be to wrap the current idleConf load statements in a 'reload' classmethod that is called immediately after the class definition, but which can also be called by configdialog when applying changes. The class attributes should not be turned into instance attributes that have to be updated in each instance. I don't remember if I ever checked when changes to user-configurable extension keys takes effect. It does not matter now. As part of #27099, converting built-in extensions to features, all key shortcuts will be handled together, so those for former extensions will take effect immediately along with the others. Most of configdialog been reviewed and tested. The main exceptions are the button functions, in particular the one for Apply, and the two deactivate and activate methods for themes and keys. The former extension options will become general options (as will indent spaces). The update of indent spaces and autosave, which are active when the dialog is closed (I am not currently sure how), might be used as a guide for the new general options. Testing that changes for general options take effect right away, as intended, is part of this issue, and perhaps the hardest part. ---------- dependencies: +IDLE: turn built-in extensions into regular modules nosy: +wohlganger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 00:10:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 04:10:45 +0000 Subject: [issue31291] zipimport.zipimporter.get_data() crashes when path.replace() returns a non-str In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1503979845.59.0.276994392198.issue31291@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oren already fixed several similar problems and he is aware of difference between a crash and an exception. The problem is Windows specific. The current code uses Unicode C API with the result of calling the replace method. This can cause a segfault (or may be an assertion failure in debug build). The proposed solution LGTM. It undermines duck-typing, but I think this doesn't break any existing code. The duck-typing was not intentional and is Windows-only. ---------- components: +Extension Modules -Interpreter Core nosy: +serhiy.storchaka stage: -> patch review versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 00:11:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 04:11:22 +0000 Subject: [issue31297] Unpickleable ModuleImportError in unittest patch not backported to 2.7 In-Reply-To: <1503964395.2.0.931089155502.issue31297@psf.upfronthosting.co.za> Message-ID: <1503979882.45.0.0916604085287.issue31297@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 01:57:22 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 29 Aug 2017 05:57:22 +0000 Subject: [issue22707] Idle: changed options should take effect immediately In-Reply-To: <1414023493.97.0.227461422456.issue22707@psf.upfronthosting.co.za> Message-ID: <1503986242.82.0.0598679646463.issue22707@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I looked at the how the num_spaces and current General options are defined, set, and updated. editor-on-startup: local name in pyshell.main. width, height: used in text_options, passed to MultiCallCreator(Text). (Width is EW() attribute, initialized in EW.__init__, but only used immediately in text_options.) autosave: local name in runscript.ScriptBinding.getfilename, called each time one runs a module. This a runscript extension option already put on General tab and saved in config-main. num_spaces: EditorWindow() attribute, set in EW.set_notabs_indentwidth, called in EW.__init__ and ConfigDialog.activate_config_changes for each window. help_list: local name in EW.reset_help_menu_entries, called in EW.__init__ and CD.a_c_changes, like num_spaces. For new General options, add EW.reload_general(), which calls class reload methods. In CD.a_c_w, add at the end, after the loop, 'win_instances.pop().reload_general()'. This will avoid importing the feature modules into configdialog. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 03:45:45 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 Aug 2017 07:45:45 +0000 Subject: [issue31299] Add "ignore_modules" option to TracebackException.format() Message-ID: <1503992745.47.0.33675937395.issue31299@psf.upfronthosting.co.za> New submission from Nick Coghlan: This is a proposed traceback module enhancement deriving from the "python -m" traceback verbosity discussion in issue 16217. Specifically, I'm thinking a good way of cleaning up those tracebacks would be to use `TracebackException.format()` to get the formatted exception output, but designate particular modules to be *skipped* during the iteration (specifically `runpy`, `_frozen_importlib`, `importlib`). I'm filing this as a separate issue so the discussion of the public API for the capability in the traceback module can be separated from the discussion of applying that API in runpy. ---------- components: Library (Lib) messages: 300974 nosy: ncoghlan, rbcollins, vaultah priority: normal severity: normal stage: needs patch status: open title: Add "ignore_modules" option to TracebackException.format() type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 03:46:41 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 Aug 2017 07:46:41 +0000 Subject: [issue16217] Tracebacks are unnecessarily verbose when using 'python -m' In-Reply-To: <1350132701.04.0.542395484982.issue16217@psf.upfronthosting.co.za> Message-ID: <1503992801.58.0.618805382952.issue16217@psf.upfronthosting.co.za> Nick Coghlan added the comment: Aye, separating the two discussions is a good idea. I've filed https://bugs.python.org/issue31299 for the traceback RFE, and added it as a dependency here. ---------- dependencies: +Add "ignore_modules" option to TracebackException.format() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 04:48:02 2017 From: report at bugs.python.org (era) Date: Tue, 29 Aug 2017 08:48:02 +0000 Subject: [issue854511] Thai encoding alias for 'cp874' Message-ID: <1503996482.58.0.220200856131.issue854511@psf.upfronthosting.co.za> era added the comment: Closing the entire enhancement request just because one detail is off seems insane. Anyway, until the day in the distant future when Python can support encoding names in common circulation, http://stackoverflow.com/a/1064191/874188 offers a crude workaround. import encodings if 'windows_874' not in encodings.aliases.aliases: encodings.aliases.aliases['windows_874'] = 'cp874' This is tricky in a number of ways; in practice, this snippet needs to be at the very start of your source file. Also, the underscore is correct even for email encoding names like =?windows-874?Q?hello=3F?= which use a dash (the dash gets remapped to underscore internally when looking up the encoding alias). ---------- nosy: +era _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 04:58:33 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 08:58:33 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1503997113.28.0.61180829067.issue31243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset ba7d7365215d791025d1efd25393c91404f2cfc8 by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31243: Fixed PyArg_ParseTuple failure checks. (#3171) https://github.com/python/cpython/commit/ba7d7365215d791025d1efd25393c91404f2cfc8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 04:59:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 08:59:37 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1503997177.23.0.0082358430171.issue31243@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 05:18:20 2017 From: report at bugs.python.org (Dmitry Kazakov) Date: Tue, 29 Aug 2017 09:18:20 +0000 Subject: [issue31299] Add "ignore_modules" option to TracebackException.format() In-Reply-To: <1503992745.47.0.33675937395.issue31299@psf.upfronthosting.co.za> Message-ID: <1503998300.24.0.198351453787.issue31299@psf.upfronthosting.co.za> Changes by Dmitry Kazakov : ---------- pull_requests: +3274 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 05:27:06 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 29 Aug 2017 09:27:06 +0000 Subject: [issue16217] Tracebacks are unnecessarily verbose when using 'python -m' In-Reply-To: <1350132701.04.0.542395484982.issue16217@psf.upfronthosting.co.za> Message-ID: <1503998826.53.0.907873794346.issue16217@psf.upfronthosting.co.za> Nick Coghlan added the comment: Regarding directories and zipfiles, runpy._run_module_as_main also handles those - the CLI effectively transforms directory and zipfile execution into a "python -m __main__" call with a suitably adjusted sys.path[0] entry (i.e. the given directory or zip archive, rather than the current directory). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 05:54:20 2017 From: report at bugs.python.org (Petr Viktorin) Date: Tue, 29 Aug 2017 09:54:20 +0000 Subject: [issue31132] test_prlimit from test_resource fails when building python3 inside systemd-nspawn environment In-Reply-To: <1502124202.05.0.637493609291.issue31132@psf.upfronthosting.co.za> Message-ID: <1504000460.34.0.589980580871.issue31132@psf.upfronthosting.co.za> Petr Viktorin added the comment: The test is already skipped if the user is root. It verifies that process 1 can't be touched by non-root users. The problem is an assumption that process with PID 1 belongs to root. That assumption isn't true in containers: PID 1 is whatever the container was started with -- in this case, likely a test runner or build system. On Linux, we could check if `/proc/1` actually belongs to root. I don't know about other systems, though. Would that change be acceptable? ---------- nosy: +encukou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 06:54:58 2017 From: report at bugs.python.org (Oren Milman) Date: Tue, 29 Aug 2017 10:54:58 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1504004098.17.0.319787264057.issue31243@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3275 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 07:03:31 2017 From: report at bugs.python.org (Aigars Mahinovs) Date: Tue, 29 Aug 2017 11:03:31 +0000 Subject: [issue31300] Traceback prints different code than the running module Message-ID: <1504004611.56.0.361089712755.issue31300@psf.upfronthosting.co.za> New submission from Aigars Mahinovs: If you run a longer running Python program, then change the Python module that it loaded on disk and then cause a traceback to happen in the code in that module, then the traceback may be nonsensical as it will reference line numbers from the module in memory, but print code from the same line numbers from the file on disk, even if they are different. In any case there should be a prominent warning on traceback if the module in memory does not match the module on disk, but ideally the traceback print should show the code in memory - the actual code that caused the problem. ---------- components: Library (Lib) messages: 300980 nosy: Aigars Mahinovs priority: normal severity: normal status: open title: Traceback prints different code than the running module type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 07:20:31 2017 From: report at bugs.python.org (Cody Sixteen) Date: Tue, 29 Aug 2017 11:20:31 +0000 Subject: [issue31301] Python 2.7 SIGSEGV Message-ID: <1504005631.03.0.301240495014.issue31301@psf.upfronthosting.co.za> New submission from Cody Sixteen: During one fuzzing session I found that python2.7 will crash when parsing the file (attached). Maybe you will find it useful. ---------- components: Build files: py27-sigsegv.zip messages: 300981 nosy: cody priority: normal severity: normal status: open title: Python 2.7 SIGSEGV type: crash versions: Python 2.7 Added file: http://bugs.python.org/file47106/py27-sigsegv.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 08:43:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 12:43:34 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1504010614.7.0.656760025661.issue31243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset c7750c2a3af014a5b742d0159d8957ea95b6c221 by Serhiy Storchaka (Oren Milman) in branch '3.6': [3.6] bpo-31243: Fixed PyArg_ParseTuple failure checks. (GH-3171) (#3233) https://github.com/python/cpython/commit/c7750c2a3af014a5b742d0159d8957ea95b6c221 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 08:47:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 12:47:46 +0000 Subject: [issue30024] Treat `import a.b.c as m` as `m = sys.modules['a.b.c']` In-Reply-To: <1491736314.56.0.10945117979.issue30024@psf.upfronthosting.co.za> Message-ID: <1504010866.55.0.862282507764.issue30024@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 265fcc5fc25d65afb33fda480c603f1e974e374e by Serhiy Storchaka in branch 'master': bpo-31286, bpo-30024: Fixed stack usage in absolute imports with (#3217) https://github.com/python/cpython/commit/265fcc5fc25d65afb33fda480c603f1e974e374e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 08:47:46 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 12:47:46 +0000 Subject: [issue31286] import in finally results in SystemError In-Reply-To: <1503801488.97.0.284675687907.issue31286@psf.upfronthosting.co.za> Message-ID: <1504010866.86.0.0627489917168.issue31286@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 265fcc5fc25d65afb33fda480c603f1e974e374e by Serhiy Storchaka in branch 'master': bpo-31286, bpo-30024: Fixed stack usage in absolute imports with (#3217) https://github.com/python/cpython/commit/265fcc5fc25d65afb33fda480c603f1e974e374e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 08:50:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 12:50:01 +0000 Subject: [issue31286] import in finally results in SystemError In-Reply-To: <1503801488.97.0.284675687907.issue31286@psf.upfronthosting.co.za> Message-ID: <1504011001.86.0.0527995975466.issue31286@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report Thomas! Don't forget to remove pyc-files before re-running the Matplotlib test suite. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 08:56:45 2017 From: report at bugs.python.org (murphdasurf) Date: Tue, 29 Aug 2017 12:56:45 +0000 Subject: [issue31302] smtplib on linux fails to log in correctly Message-ID: <1504011405.04.0.710938867076.issue31302@psf.upfronthosting.co.za> New submission from murphdasurf: The protocol should run like this: send: 'ehlo XXXXXXXXXXXXX\r\n' reply: b'250-XXXXXXXXXXXXXXXXXX.com\r\n' reply: b'250-PIPELINING\r\n' reply: b'250-SIZE 100480000\r\n' reply: b'250-VRFY\r\n' reply: b'250-ETRN\r\n' reply: b'250-STARTTLS\r\n' reply: b'250-ENHANCEDSTATUSCODES\r\n' reply: b'250-8BITMIME\r\n' reply: b'250 DSN\r\n' reply: retcode (250); Msg: b'XXXXXXXXXXXXXXXX.com\nPIPELINING\nSIZE 100480000\nVRFY\nETRN\nSTARTTLS\nENHANCEDSTATUSCODES\n8BITMIME\nDSN' send: 'STARTTLS\r\n' reply: b'220 2.0.0 Ready to start TLS\r\n' reply: retcode (220); Msg: b'2.0.0 Ready to start TLS' send: 'ehlo XXXXXXXXXXXXXXXXXXXXX\r\n' reply: b'250-XXXXXXXXXXXXXXXXXX.com\r\n' reply: b'250-PIPELINING\r\n' reply: b'250-SIZE 100480000\r\n' reply: b'250-VRFY\r\n' reply: b'250-ETRN\r\n' reply: b'250-AUTH LOGIN\r\n' reply: b'250-AUTH=LOGIN\r\n' reply: b'250-ENHANCEDSTATUSCODES\r\n' reply: b'250-8BITMIME\r\n' reply: b'250 DSN\r\n' reply: retcode (250); Msg: b'XXXXXXXXXXXXXXXXXXXXXX.com\nPIPELINING\nSIZE 100480000\nVRFY\nETRN\nAUTH LOGIN\nAUTH=LOGIN\nENHANCEDSTATUSCODES\n8BITMIME\nDSN' send: 'AUTH LOGIN XXXXXXXXXXXXXXX\r\n' reply: b'334 RRRRRRRRRRR\r\n' reply: retcode (334); Msg: b'RRRRRRRRR' send: 'TTTTTTTTTTTT=\r\n' reply: b'235 2.7.0 Authentication successful\r\n' reply: retcode (235); Msg: b'2.7.0 Authentication successful' And in fact it does so on Windows. However, on Linux it runs like this: send: 'ehlo XXXXXXXXXXXXX\r\n' reply: b'250-XXXXXXXXXXXXX.com\r\n' reply: b'250-PIPELINING\r\n' reply: b'250-SIZE 100480000\r\n' reply: b'250-VRFY\r\n' reply: b'250-ETRN\r\n' reply: b'250-STARTTLS\r\n' reply: b'250-ENHANCEDSTATUSCODES\r\n' reply: b'250-8BITMIME\r\n' reply: b'250 DSN\r\n' reply: retcode (250); Msg: b'XXXXXXXXXXXXX.com\nPIPELINING\nSIZE 100480000\nVRFY\nETRN\nSTARTTLS\nENHANCEDSTATUSCODES\n8BITMIME\nDSN' send: 'STARTTLS\r\n' reply: b'220 2.0.0 Ready to start TLS\r\n' reply: retcode (220); Msg: b'2.0.0 Ready to start TLS' send: 'ehlo XXXXXXXXXXXXX\r\n' reply: b'250-XXXXXXXXXXXXX.com\r\n' reply: b'250-PIPELINING\r\n' reply: b'250-SIZE 100480000\r\n' reply: b'250-VRFY\r\n' reply: b'250-ETRN\r\n' reply: b'250-AUTH LOGIN\r\n' reply: b'250-AUTH=LOGIN\r\n' reply: b'250-ENHANCEDSTATUSCODES\r\n' reply: b'250-8BITMIME\r\n' reply: b'250 DSN\r\n' reply: retcode (250); Msg: b'XXXXXXXXXXXXX.com\nPIPELINING\nSIZE 100480000\nVRFY\nETRN\nAUTH LOGIN\nAUTH=LOGIN\nENHANCEDSTATUSCODES\n8BITMIME\nDSN' send: 'AUTH LOGIN XXXXXXXXXXXXXXX\r\n' reply: b'334 RRRRRRRRRRR\r\n' reply: retcode (334); Msg: b'RRRRRRRRRRR' send: "b''\r\n" reply: b'535 5.7.8 Error: authentication failed: another step is needed in authentication\r\n' reply: retcode (535); Msg: b'5.7.8 Error: authentication failed: another step is needed in authentication' The last sent message is an empty string and then the authentication fails. All other tokens which are replaced by XXXXXX, RRRRR or TTTTT are exactly the same. This way the login fails and I can not use smtplib to send my mail. ---------- components: Library (Lib) messages: 300986 nosy: murphdasurf priority: normal severity: normal status: open title: smtplib on linux fails to log in correctly type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 09:18:18 2017 From: report at bugs.python.org (murphdasurf) Date: Tue, 29 Aug 2017 13:18:18 +0000 Subject: [issue31302] smtplib on linux fails to log in correctly In-Reply-To: <1504011405.04.0.710938867076.issue31302@psf.upfronthosting.co.za> Message-ID: <1504012698.8.0.188001107347.issue31302@psf.upfronthosting.co.za> murphdasurf added the comment: PS: The corresponding code is: server_ssl = smtplib.SMTP(SERVER, PORT) server_ssl.set_debuglevel(True) server_ssl.ehlo() server_ssl.starttls() server_ssl.login(USER_FOR_AUTHENTICATION, XXXXXX) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 09:18:53 2017 From: report at bugs.python.org (Thomas Caswell) Date: Tue, 29 Aug 2017 13:18:53 +0000 Subject: [issue31286] import in finally results in SystemError In-Reply-To: <1504011001.86.0.0527995975466.issue31286@psf.upfronthosting.co.za> Message-ID: Thomas Caswell added the comment: Your welcome! Matplotlib ended up just moving the import out of the finally block once we understood the issue. Tom On Tue, Aug 29, 2017 at 8:50 AM Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Thank you for your report Thomas! > > Don't forget to remove pyc-files before re-running the Matplotlib test > suite. > > ---------- > resolution: -> fixed > stage: patch review -> resolved > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 09:42:20 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 Aug 2017 13:42:20 +0000 Subject: [issue31300] Traceback prints different code than the running module In-Reply-To: <1504004611.56.0.361089712755.issue31300@psf.upfronthosting.co.za> Message-ID: <1504014140.69.0.217654639094.issue31300@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of issue 8087, which contains quite a bit of discussion of the subtleties of the issue. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Unupdated source file in traceback _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 10:03:54 2017 From: report at bugs.python.org (Aigars Mahinovs) Date: Tue, 29 Aug 2017 14:03:54 +0000 Subject: [issue8087] Unupdated source file in traceback In-Reply-To: <1267990809.73.0.116039880896.issue8087@psf.upfronthosting.co.za> Message-ID: <1504015434.95.0.165316285796.issue8087@psf.upfronthosting.co.za> Aigars Mahinovs added the comment: As a point of update - this is a problem that can make debugging more difficult for people running web services or other server processes that are expected to stay alive for a long time. It is often undesirable to force a server restart or reload every time a new code base is deployed, so you can get into situations where code running does not match the code on disk. If you get a crash and a traceback in such situation, you will be very confused. As discussed already, this could be solved by taking a hash of the source code at module import time and then comparing that to the code on disk during traceback printing time - if there is a difference, then print a big fat warning that the traceback may be unreliable. I just lost two days tracking down weird issues that in the end were caused by server failing to reload code when it should have done so. Having such warning on the first traceback would have alerted me to the problem much earlier. ---------- nosy: +Aigars Mahinovs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 10:46:26 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 29 Aug 2017 14:46:26 +0000 Subject: [issue31065] Documentation for Popen.poll is unclear In-Reply-To: <1501237857.05.0.15004204926.issue31065@psf.upfronthosting.co.za> Message-ID: <1504017986.17.0.654605426245.issue31065@psf.upfronthosting.co.za> Gregory P. Smith added the comment: New changeset 006617ff7d6df3fdedcfe53e94ee2c52cc796437 by Gregory P. Smith (Ivan Chernoff) in branch 'master': bpo-31065: Add doc about Popen.poll returning None. (#3169) https://github.com/python/cpython/commit/006617ff7d6df3fdedcfe53e94ee2c52cc796437 ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 11:05:36 2017 From: report at bugs.python.org (Oren Milman) Date: Tue, 29 Aug 2017 15:05:36 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1504019136.81.0.283517977224.issue31243@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3276 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 11:40:55 2017 From: report at bugs.python.org (George King) Date: Tue, 29 Aug 2017 15:40:55 +0000 Subject: [issue24900] Raising an exception that cannot be unpickled causes hang in ProcessPoolExecutor In-Reply-To: <1440055310.02.0.542767582293.issue24900@psf.upfronthosting.co.za> Message-ID: <1504021255.02.0.0917798445114.issue24900@psf.upfronthosting.co.za> Changes by George King : ---------- pull_requests: +3277 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 11:48:28 2017 From: report at bugs.python.org (George King) Date: Tue, 29 Aug 2017 15:48:28 +0000 Subject: [issue29400] Add instruction level tracing via sys.settrace In-Reply-To: <1485886852.16.0.854514177291.issue29400@psf.upfronthosting.co.za> Message-ID: <1504021708.35.0.729307176149.issue29400@psf.upfronthosting.co.za> George King added the comment: Attached updated demo script. ---------- Added file: http://bugs.python.org/file47107/settracestate-demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 11:49:27 2017 From: report at bugs.python.org (George King) Date: Tue, 29 Aug 2017 15:49:27 +0000 Subject: [issue29400] Add instruction level tracing via sys.settrace In-Reply-To: <1485886852.16.0.854514177291.issue29400@psf.upfronthosting.co.za> Message-ID: <1504021767.13.0.480127437379.issue29400@psf.upfronthosting.co.za> Changes by George King : ---------- pull_requests: +3278 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 12:16:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 16:16:17 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1504023377.18.0.514888793395.issue31243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 20958e6d91d11a80d6c664ce6346791259b1d193 by Serhiy Storchaka (Oren Milman) in branch '2.7': [2.7] bpo-31243: Fixed PyArg_ParseTuple failure checks. (GH-3171) (#3235) https://github.com/python/cpython/commit/20958e6d91d11a80d6c664ce6346791259b1d193 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 12:18:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 16:18:10 +0000 Subject: [issue31243] checks whether PyArg_ParseTuple returned a negative int In-Reply-To: <1503304389.01.0.083549043961.issue31243@psf.upfronthosting.co.za> Message-ID: <1504023490.12.0.1463216025.issue31243@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Oren! ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 13:40:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 17:40:17 +0000 Subject: [issue31291] zipimport.zipimporter.get_data() crashes when path.replace() returns a non-str In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1504028417.45.0.474961642426.issue31291@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 631fdee6e61b4ba8ce800f827fecdd536bfb04f3 by Serhiy Storchaka (Oren Milman) in branch 'master': bpo-31291: Fixed an assertion failure in zipimport.zipimporter.get_data() (#3226) https://github.com/python/cpython/commit/631fdee6e61b4ba8ce800f827fecdd536bfb04f3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 13:45:53 2017 From: report at bugs.python.org (Vyacheslav Rafalskiy) Date: Tue, 29 Aug 2017 17:45:53 +0000 Subject: [issue31303] xml.etree.ElementTree fails to parse a document (regression) Message-ID: <1504028753.39.0.976845207061.issue31303@psf.upfronthosting.co.za> New submission from Vyacheslav Rafalskiy: In Python 3.5.4 and 3.6.2, both on Windows and Linux, parsing a manifestly correct xml file like: xml.etree.ElementTree.parse('bad_file.xml') raises: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 1023: invalid continuation byte Any other Python version I tried works fine, including 2.7.13, 3.5.2 ... ---------- components: XML files: bad_file.xml messages: 300996 nosy: Vyacheslav.Rafalskiy priority: normal severity: normal status: open title: xml.etree.ElementTree fails to parse a document (regression) type: crash versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file47108/bad_file.xml _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 13:50:24 2017 From: report at bugs.python.org (Vyacheslav Rafalskiy) Date: Tue, 29 Aug 2017 17:50:24 +0000 Subject: [issue31303] xml.etree.ElementTree fails to parse a document (regression) In-Reply-To: <1504028753.39.0.976845207061.issue31303@psf.upfronthosting.co.za> Message-ID: <1504029024.65.0.971996895892.issue31303@psf.upfronthosting.co.za> Changes by Vyacheslav Rafalskiy : Added file: http://bugs.python.org/file47109/bad_file.xml _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 13:58:31 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 29 Aug 2017 17:58:31 +0000 Subject: [issue31303] xml.etree.ElementTree fails to parse a document (regression) In-Reply-To: <1504028753.39.0.976845207061.issue31303@psf.upfronthosting.co.za> Message-ID: <1504029511.21.0.0194497143112.issue31303@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 14:12:16 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 18:12:16 +0000 Subject: [issue31303] xml.etree.ElementTree fails to parse a document (regression) In-Reply-To: <1504028753.39.0.976845207061.issue31303@psf.upfronthosting.co.za> Message-ID: <1504030336.38.0.558050278834.issue31303@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka type: crash -> behavior versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 14:19:35 2017 From: report at bugs.python.org (Elias Zamaria) Date: Tue, 29 Aug 2017 18:19:35 +0000 Subject: [issue27923] PEP 467 -- Minor API improvements for binary sequences In-Reply-To: <1472691379.75.0.669592694643.issue27923@psf.upfronthosting.co.za> Message-ID: <1504030775.18.0.148249248795.issue27923@psf.upfronthosting.co.za> Changes by Elias Zamaria : ---------- pull_requests: +3279 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 14:44:26 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Tue, 29 Aug 2017 18:44:26 +0000 Subject: [issue30781] IDLE: configdialog -- switch to ttk widgets. In-Reply-To: <1498517235.92.0.120194527847.issue30781@psf.upfronthosting.co.za> Message-ID: <1504032266.07.0.497099359827.issue30781@psf.upfronthosting.co.za> Changes by Cheryl Sabella : ---------- pull_requests: +3280 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 14:58:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 29 Aug 2017 18:58:10 +0000 Subject: [issue31303] xml.etree.ElementTree fails to parse a document (regression) In-Reply-To: <1504028753.39.0.976845207061.issue31303@psf.upfronthosting.co.za> Message-ID: <1504033090.01.0.0289178744717.issue31303@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Simpler reproducer: >>> import xml.etree.ElementTree >>> xml.etree.ElementTree.XML(b'') Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/xml/etree/ElementTree.py", line 1315, in XML parser.feed(text) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 1023: invalid continuation byte Seems this is a regression in the Expat library. ---------- nosy: +haypo priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 15:41:05 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 Aug 2017 19:41:05 +0000 Subject: [issue31297] Unpickleable ModuleImportError in unittest patch not backported to 2.7 In-Reply-To: <1503964395.2.0.931089155502.issue31297@psf.upfronthosting.co.za> Message-ID: <1504035665.57.0.485938956733.issue31297@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm guessing the backport may end up non-trivial. Do you want to try submitting a PR for it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 16:13:31 2017 From: report at bugs.python.org (tamas) Date: Tue, 29 Aug 2017 20:13:31 +0000 Subject: [issue31304] Update doc for starmap_async error_back kwarg Message-ID: <1504037611.28.0.102125644209.issue31304@psf.upfronthosting.co.za> New submission from tamas: The documentation suggests that multiprocessing.pool.Pool. starmap_async has a kwarg called 'error_back', but it actually has a kwarg called 'error_callback' to handle errors, just like map_async. Link: https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.pool.Pool.starmap_async ---------- assignee: docs at python components: Documentation messages: 300999 nosy: docs at python, tamas priority: normal severity: normal status: open title: Update doc for starmap_async error_back kwarg type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 17:39:59 2017 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Tue, 29 Aug 2017 21:39:59 +0000 Subject: [issue30637] Syntax error reported on compile(...), but not on compile(..., ast.PyCF_ONLY_AST) In-Reply-To: <1497271056.08.0.482498543523.issue30637@psf.upfronthosting.co.za> Message-ID: <1504042799.86.0.125756064491.issue30637@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: > Can you suggest a couple of sentences you would have like to have > seen, and where? Thanks, I would suggest to add something like this to the documentation of ast.parse: """ ``parse`` raises ``SyntaxError`` if the compiled source is invalid, and ``ValueError`` if the source contains null bytes. Note that a successful parse does not guarantee correct syntax of ``source``. Further syntax errors can be detected, and ``SyntaxError`` raised, when the source is compiled to a code object using ``compile`` without the ``ast.PyCF_ONLY_AST`` flag, or executed with ``exec``. For example, a lone ``break`` statement can be parsed, but not converted into a code object or executed. """ I don't think the ``compile`` docs need to be changed, partly because they're already sizable, and partly because they don't document individual flags at all. (A reference to the ``ast`` module regarding the flags, like the one for AST objects in the first paragraph, might be a useful addition.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 18:52:22 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 Aug 2017 22:52:22 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1504047142.95.0.471329452501.issue5001@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset bd73e72b4a9f019be514954b1d40e64dc3a5e81c by Antoine Pitrou (Allen W. Smith, Ph.D) in branch 'master': bpo-5001: More-informative multiprocessing error messages (#3079) https://github.com/python/cpython/commit/bd73e72b4a9f019be514954b1d40e64dc3a5e81c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 18:53:00 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 29 Aug 2017 22:53:00 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1504047180.44.0.580419887885.issue5001@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I suppose this can be closed now. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 20:05:04 2017 From: report at bugs.python.org (Alexander Mohr) Date: Wed, 30 Aug 2017 00:05:04 +0000 Subject: [issue29302] add contextlib.AsyncExitStack In-Reply-To: <1484693382.32.0.211448130443.issue29302@psf.upfronthosting.co.za> Message-ID: <1504051504.53.0.326350712015.issue29302@psf.upfronthosting.co.za> Alexander Mohr added the comment: let me know if I need to do anything ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 22:19:09 2017 From: report at bugs.python.org (Morris Li) Date: Wed, 30 Aug 2017 02:19:09 +0000 Subject: [issue31305] 'pydoc -w import' report "no Python documentation found for 'import'" Message-ID: <1504059549.17.0.252572867036.issue31305@psf.upfronthosting.co.za> Changes by Morris Li : ---------- assignee: docs at python components: Documentation nosy: docs at python, limuyuan priority: normal severity: normal status: open title: 'pydoc -w import' report "no Python documentation found for 'import'" type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 29 22:22:41 2017 From: report at bugs.python.org (Morris Li) Date: Wed, 30 Aug 2017 02:22:41 +0000 Subject: [issue31305] 'pydoc -w import' report "no Python documentation found for 'import'" Message-ID: <1504059761.5.0.168301267663.issue31305@psf.upfronthosting.co.za> Changes by Morris Li : ---------- versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 00:00:32 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Aug 2017 04:00:32 +0000 Subject: [issue31306] IDLE, configdialog, General tab: validate user entries Message-ID: <1504065632.2.0.53368716596.issue31306@psf.upfronthosting.co.za> New submission from Terry J. Reedy: This was initially part of #31051. See 2nd have of msg299262 and all of msg299263. ---------- assignee: terry.reedy components: IDLE messages: 301005 nosy: terry.reedy priority: normal severity: normal stage: test needed status: open title: IDLE, configdialog, General tab: validate user entries type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 00:05:56 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Aug 2017 04:05:56 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1504065956.27.0.266720018346.issue31051@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3282 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 00:12:44 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Aug 2017 04:12:44 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1504066364.67.0.970610639518.issue31051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It does not matter for users what we call the class. MainPage reads a bit smoother than GenPage. I have also considered renaming HighPage as ColorPage and relabeling the tab 'Colors'. The above covers at least 2 issues. #31306 covers changing Vars and testing user entries. PR3239 Splits the General tab into 3 sections: (shell and editor) window preferences, editor preferences, and the help sources. Charles: the autocomple and parenmatch options go in window preferences, as they apply to Shell also. The reformat and context options are editor only and go in that section. ---------- nosy: +wohlganger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 00:12:53 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Aug 2017 04:12:53 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1504066373.72.0.414693197308.issue31051@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 00:14:38 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Aug 2017 04:14:38 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1504066478.1.0.110518688609.issue31051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'autocomplete and parenmatch' (in that order). Code context should be last in the editor section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 00:27:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Aug 2017 04:27:27 +0000 Subject: [issue27099] IDLE: turn built-in extensions into regular modules In-Reply-To: <1464055360.13.0.626532918919.issue27099@psf.upfronthosting.co.za> Message-ID: <1504067247.85.0.631241394397.issue27099@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Configdialog does not import EditorWindow and should not need to with the change. It should also not import the separate modules. I outlined how I plan to update the current extension values in #22707, msg300973. PR3239 for #31051 prepares GenPage for the transferred options. msg300973 specifies which goes where on the page. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 00:59:16 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Aug 2017 04:59:16 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1504069156.5.0.963615312486.issue31051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 390eadd6d041611511dc761bc7d4581530dbd287 by Terry Jan Reedy in branch 'master': bpo-31051: Rearrange IDLE condigdialog GenPage into Window, Editor, and Help sections. (#3239) https://github.com/python/cpython/commit/390eadd6d041611511dc761bc7d4581530dbd287 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 01:00:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Aug 2017 05:00:29 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1504069229.75.0.238037108999.issue31051@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- pull_requests: +3283 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 01:15:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 05:15:12 +0000 Subject: [issue31303] xml.etree.ElementTree fails to parse a document (regression) In-Reply-To: <1504028753.39.0.976845207061.issue31303@psf.upfronthosting.co.za> Message-ID: <1504070112.63.0.924387257256.issue31303@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a duplicate of issue31170. Updating expat to 2.2.4 fixes this issue. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> expat: utf8_toUtf8 cannot properly handle exhausting buffer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 01:25:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 05:25:44 +0000 Subject: [issue31170] expat: utf8_toUtf8 cannot properly handle exhausting buffer In-Reply-To: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> Message-ID: <1504070744.94.0.250470462491.issue31170@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I confirm the regression (see issue31303 for reproducer). Victor, do you mind to update expat to 2.2.4? This issue can be classified as a security issue, since a regression was added in security update. ---------- nosy: +benjamin.peterson, georg.brandl, larry, ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 01:41:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 05:41:03 +0000 Subject: [issue31170] expat: utf8_toUtf8 cannot properly handle exhausting buffer In-Reply-To: <1502340505.45.0.797067466934.issue31170@psf.upfronthosting.co.za> Message-ID: <1504071663.24.0.945402042249.issue31170@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Corresponding Expat issue: https://github.com/libexpat/libexpat/issues/115. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 02:47:29 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Aug 2017 06:47:29 +0000 Subject: [issue31051] IDLE, configdialog, General tab: re-arrange, test user entries In-Reply-To: <1501100798.06.0.368470665591.issue31051@psf.upfronthosting.co.za> Message-ID: <1504075649.65.0.337326425944.issue31051@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New changeset 87c50245b1ba21469cc2e4e84cd5e5cd54ff954d by Terry Jan Reedy in branch '3.6': [3.6] bpo-31051: Rearrange IDLE condigdialog GenPage into Window, Editor, and Help sections. (GH-3239) (#3240) https://github.com/python/cpython/commit/87c50245b1ba21469cc2e4e84cd5e5cd54ff954d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 04:14:35 2017 From: report at bugs.python.org (Pauli Virtanen) Date: Wed, 30 Aug 2017 08:14:35 +0000 Subject: [issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes In-Reply-To: <1292888248.06.0.197043159654.issue10746@psf.upfronthosting.co.za> Message-ID: <1504080875.11.0.731386079873.issue10746@psf.upfronthosting.co.za> Changes by Pauli Virtanen : ---------- pull_requests: +3284 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 04:16:23 2017 From: report at bugs.python.org (Pauli Virtanen) Date: Wed, 30 Aug 2017 08:16:23 +0000 Subject: [issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes In-Reply-To: <1292888248.06.0.197043159654.issue10746@psf.upfronthosting.co.za> Message-ID: <1504080983.32.0.365249767205.issue10746@psf.upfronthosting.co.za> Pauli Virtanen added the comment: Created backport PR for 3.6: https://github.com/python/cpython/pull/3241 Which versions take backports? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 04:17:05 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 08:17:05 +0000 Subject: [issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes In-Reply-To: <1292888248.06.0.197043159654.issue10746@psf.upfronthosting.co.za> Message-ID: <1504081025.29.0.211649637677.issue10746@psf.upfronthosting.co.za> Antoine Pitrou added the comment: At this point, 2.7 and 3.6 do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 04:32:48 2017 From: report at bugs.python.org (Pauli Virtanen) Date: Wed, 30 Aug 2017 08:32:48 +0000 Subject: [issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes In-Reply-To: <1292888248.06.0.197043159654.issue10746@psf.upfronthosting.co.za> Message-ID: <1504081968.42.0.328409361955.issue10746@psf.upfronthosting.co.za> Changes by Pauli Virtanen : ---------- pull_requests: +3286 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 05:01:13 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 09:01:13 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1504083673.13.0.376284247136.issue30581@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset c67bae04780f9d7590f9f91b4ee5f31c5d75b3c3 by Antoine Pitrou (Christopher Wilcox) in branch 'master': bpo-30581: Windows: os.cpu_count() returns wrong number of processors (#2934) https://github.com/python/cpython/commit/c67bae04780f9d7590f9f91b4ee5f31c5d75b3c3 ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 05:01:56 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 09:01:56 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1504083716.6.0.951242637197.issue30581@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Fixed. Someone might backport this to 3.6 if they want. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 05:40:08 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 09:40:08 +0000 Subject: [issue10746] ctypes c_long & c_bool have incorrect PEP-3118 type codes In-Reply-To: <1292888248.06.0.197043159654.issue10746@psf.upfronthosting.co.za> Message-ID: <1504086008.3.0.40823547383.issue10746@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 2d1653aa43cf02e6b74f9d4f178fac9969a293e2 by Antoine Pitrou (Pauli Virtanen) in branch '3.6': [3.6] bpo-10746: Fix ctypes PEP 3118 type codes for c_long, c_bool, c_int (GH-31) (#3241) https://github.com/python/cpython/commit/2d1653aa43cf02e6b74f9d4f178fac9969a293e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 05:51:23 2017 From: report at bugs.python.org (Antti Haapala) Date: Wed, 30 Aug 2017 09:51:23 +0000 Subject: [issue29753] Ctypes Packing Bitfields Incorrectly - Linux In-Reply-To: <1488933400.56.0.160685455632.issue29753@psf.upfronthosting.co.za> Message-ID: <1504086683.96.0.0483527848957.issue29753@psf.upfronthosting.co.za> Antti Haapala added the comment: To Charles first: "Gives back a sizeof of 8 on Windows and 10 on Linux. The inconsistency makes it difficult to have code work cross-platform." The bitfields in particular and ctypes in general have *never* been meant to be cross-platform - instead they just must need to match the particular C compiler behaviour of the platform, thus the use of these for cross platform work is ill-advised - perhaps you should just use the struct module instead. However, that said, on Linux, sizeof these structures - packed or not - do not match the output from GCC; unpacked one has sizeof 12 and packed 10 on my Python 3.5, but they're both 8 bytes on GCC. This is a real bug. GCC says that the bitfield behaviour is: https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/Structures-unions-enumerations-and-bit-fields-implementation.html Whether a bit-field can straddle a storage-unit boundary (C90 6.5.2.1, C99 and C11 6.7.2.1). Determined by ABI. The order of allocation of bit-fields within a unit (C90 6.5.2.1, C99 and C11 6.7.2.1). Determined by ABI. The alignment of non-bit-field members of structures (C90 6.5.2.1, C99 and C11 6.7.2.1). Determined by ABI. Thus, the actual behaviour need to be checked from the API documentation of the relevant platform. However - at least for unpacked structs - the x86-64 behaviour is that a bitfield may not cross an addressable unit. ---------- nosy: +ztane title: Ctypes Packing Incorrectly - Linux -> Ctypes Packing Bitfields Incorrectly - Linux _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 06:29:45 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 30 Aug 2017 10:29:45 +0000 Subject: [issue31291] zipimport.zipimporter.get_data() crashes when path.replace() returns a non-str In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1504088985.13.0.727949727439.issue31291@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3287 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 07:08:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 11:08:45 +0000 Subject: [issue31291] zipimport.zipimporter.get_data() crashes when path.replace() returns a non-str In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1504091325.05.0.608177174453.issue31291@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 095a421b1606ee27e00a5d9d253b05a9f0cfadb8 by Serhiy Storchaka (Oren Milman) in branch '3.6': [3.6] bpo-31291: Fixed an assertion failure in zipimport.zipimporter.get_data() (GH-3226) (#3243) https://github.com/python/cpython/commit/095a421b1606ee27e00a5d9d253b05a9f0cfadb8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 07:09:04 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 11:09:04 +0000 Subject: [issue31291] zipimport.zipimporter.get_data() crashes when path.replace() returns a non-str In-Reply-To: <1503909866.45.0.325412617055.issue31291@psf.upfronthosting.co.za> Message-ID: <1504091344.86.0.497946515873.issue31291@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 07:46:50 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 11:46:50 +0000 Subject: [issue31108] add __contains__ for list_iterator (and others) for better performance In-Reply-To: <1501700026.5.0.776654640231.issue31108@psf.upfronthosting.co.za> Message-ID: <1504093610.89.0.181025041321.issue31108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think I've ever used `in` on an iterator. I didn't even expect it to work, and would not consider its use a good practice. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 07:48:06 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 11:48:06 +0000 Subject: [issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously In-Reply-To: <1474986403.83.0.165864194914.issue28287@psf.upfronthosting.co.za> Message-ID: <1504093686.4.0.907723723656.issue28287@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 08:18:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 12:18:41 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1504095521.79.0.782836400184.issue17611@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3288 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 08:18:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 12:18:41 +0000 Subject: [issue24340] co_stacksize estimate can be highly off In-Reply-To: <1433096994.94.0.20833461119.issue24340@psf.upfronthosting.co.za> Message-ID: <1504095521.94.0.573689528771.issue24340@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3289 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 08:26:17 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 12:26:17 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1504095977.88.0.336766557688.issue31113@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ned, Benjamin, what do you think about backporting this change to 3.6 and 2.7? On one hand, the change is not trivial and looks like a new feature. On other hand, this can be considered as a platform specific bug, the compiler works with a large generated code on Linux, but crashes on Windows. I don't know how to increase the stack size on Windows, but if it is an option, it looks preferable to me on 2.7 and 3.6. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 08:26:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 12:26:52 +0000 Subject: [issue24340] co_stacksize estimate can be highly off In-Reply-To: <1433096994.94.0.20833461119.issue24340@psf.upfronthosting.co.za> Message-ID: <1504096012.34.0.428522068193.issue24340@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -3289 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 08:27:05 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 12:27:05 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1504096025.57.0.478268019853.issue17611@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -3288 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 08:32:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 12:32:26 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1504096346.3.0.831287081324.issue17611@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: +3290 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 08:34:23 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 12:34:23 +0000 Subject: [issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously In-Reply-To: <1474986403.83.0.165864194914.issue28287@psf.upfronthosting.co.za> Message-ID: <1504096463.85.0.0353959919647.issue28287@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 08:35:13 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 12:35:13 +0000 Subject: [issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously In-Reply-To: <1474986403.83.0.165864194914.issue28287@psf.upfronthosting.co.za> Message-ID: <1504096513.26.0.238582053515.issue28287@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, we're using GitHub PRs now for development, though you can still submit patch files if you prefer that. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 08:36:10 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 12:36:10 +0000 Subject: [issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler. In-Reply-To: <1364833880.2.0.617388686213.issue17611@psf.upfronthosting.co.za> Message-ID: <1504096570.65.0.301411225131.issue17611@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- pull_requests: -3290 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 08:53:22 2017 From: report at bugs.python.org (Ned Deily) Date: Wed, 30 Aug 2017 12:53:22 +0000 Subject: [issue31113] Stack overflow with large program In-Reply-To: <1501747851.67.0.0193426592051.issue31113@psf.upfronthosting.co.za> Message-ID: <1504097602.19.0.0961272069363.issue31113@psf.upfronthosting.co.za> Ned Deily added the comment: I agree with Antoine's comment on the PR: this seems like this should only go into 3.7. From the description here, it sounds like this is an edge-case problem that hasn't come up before as an issue. Let's do the right thing in master (for 3.7) and try to come up with a workaround for 3.6.x (like increasing the stack size). And doing that does not prevent us from deciding later to backport to 3.6.x once we have some experience with the changes in master. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 10:15:47 2017 From: report at bugs.python.org (Vincent Michel) Date: Wed, 30 Aug 2017 14:15:47 +0000 Subject: [issue31307] ConfigParser.read silently fails if filenames argument is a byte string Message-ID: <1504102547.11.0.362577067596.issue31307@psf.upfronthosting.co.za> New submission from Vincent Michel: Calling `config_parser.read` with `'test'` is equivalent to: config_parser.read(['test']) while calling `config_parser.read` with `b'test'` is treated as: config_parser.read([116, 101, 115, 116]) which means python will try to open the file descriptors 101, 115 and 116. I don't know if byte path should be supported, but this is probably not the expected behavior. The method code: https://github.com/python/cpython/blob/master/Lib/configparser.py#L678-L702 ---------- components: Library (Lib) messages: 301026 nosy: vxgmichel priority: normal severity: normal status: open title: ConfigParser.read silently fails if filenames argument is a byte string type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 10:27:15 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 14:27:15 +0000 Subject: [issue31308] forkserver process isn't re-launched if it died Message-ID: <1504103235.79.0.43802074293.issue31308@psf.upfronthosting.co.za> New submission from Antoine Pitrou: It may happen that the forkserver process dies (for example if SIGINT is received because the user pressed Ctrl-C) while the parent process is still alive. In that case, if the parent tries to create a new Process instance, an exception is received. The exception looks like this: File "/xxx/lib/python3.5/multiprocessing/popen_forkserver.py", line 52, in _launch self.sentinel, w = forkserver.connect_to_new_process(self._fds) File "/xxx/lib/python3.5/multiprocessing/forkserver.py", line 66, in connect_to_new_process client.connect(self._forkserver_address) ConnectionRefusedError: [Errno 111] Connection refused ---------- components: Library (Lib) messages: 301027 nosy: pitrou priority: normal severity: normal stage: needs patch status: open title: forkserver process isn't re-launched if it died type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 10:27:24 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 14:27:24 +0000 Subject: [issue31308] forkserver process isn't re-launched if it died In-Reply-To: <1504103235.79.0.43802074293.issue31308@psf.upfronthosting.co.za> Message-ID: <1504103244.51.0.506288056106.issue31308@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +davin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 11:25:40 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 15:25:40 +0000 Subject: [issue31308] forkserver process isn't re-launched if it died In-Reply-To: <1504103235.79.0.43802074293.issue31308@psf.upfronthosting.co.za> Message-ID: <1504106740.9.0.442186510523.issue31308@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +3291 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 11:32:59 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 30 Aug 2017 15:32:59 +0000 Subject: [issue31307] ConfigParser.read silently fails if filenames argument is a byte string In-Reply-To: <1504102547.11.0.362577067596.issue31307@psf.upfronthosting.co.za> Message-ID: <1504107179.6.0.194306874543.issue31307@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 11:34:35 2017 From: report at bugs.python.org (Philipp) Date: Wed, 30 Aug 2017 15:34:35 +0000 Subject: [issue31309] Tkinter root window does not close if used with matplotlib.pyplot Message-ID: <1504107275.3.0.972371734588.issue31309@psf.upfronthosting.co.za> New submission from Philipp: Today I ran into a problem when using both tkinter and matplotlib.pyplot at the same time. I thought it would be best to let you know, in case it is an issue. The problem is/was that the root window did not close itself, when just using `askopenfilename()`. A complete description of the problem, including a minimal working example, screenshots and a "solution" can be found on StackOverflow: https://stackoverflow.com/q/45960815/7414040 I think that the function `askopenfilename()` does not ensure that the tkinter root window, that has been opened, is destroyed after the function call ended. ---------- assignee: terry.reedy components: IDLE, Tkinter, Windows messages: 301028 nosy: paul.moore, psiehr, steve.dower, terry.reedy, tim.golden, zach.ware priority: normal severity: normal status: open title: Tkinter root window does not close if used with matplotlib.pyplot type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 11:52:32 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 15:52:32 +0000 Subject: [issue31310] semaphore tracker isn't protected against crashes Message-ID: <1504108352.86.0.17423028145.issue31310@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Similar to bpo-31308, but pertaining to multiprocessing's semaphore tracker process. ---------- components: Library (Lib) messages: 301029 nosy: davin, pitrou priority: normal severity: normal stage: needs patch status: open title: semaphore tracker isn't protected against crashes type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 11:56:16 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 15:56:16 +0000 Subject: [issue31310] semaphore tracker isn't protected against crashes In-Reply-To: <1504108352.86.0.17423028145.issue31310@psf.upfronthosting.co.za> Message-ID: <1504108576.33.0.553052676297.issue31310@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: +3292 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 12:37:46 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 30 Aug 2017 16:37:46 +0000 Subject: [issue30737] Update devguide link to the new URL In-Reply-To: <1498151147.34.0.638989883605.issue30737@psf.upfronthosting.co.za> Message-ID: <1504111066.03.0.104888447159.issue30737@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 384899dfaeb83db38a6d3846d3cbc2f58a6605cd by Mariatta (Lisa Hewus Fresh) in branch 'master': bpo-30737: Update DevGuide links to new URL (GH-3228) https://github.com/python/cpython/commit/384899dfaeb83db38a6d3846d3cbc2f58a6605cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 12:37:58 2017 From: report at bugs.python.org (flying sheep) Date: Wed, 30 Aug 2017 16:37:58 +0000 Subject: [issue31292] `python setup.py check --restructuredtext` fails when a include directive is present. In-Reply-To: <1503928665.81.0.590770692205.issue31292@psf.upfronthosting.co.za> Message-ID: <1504111078.24.0.278728158495.issue31292@psf.upfronthosting.co.za> flying sheep added the comment: I should have linked the file: distutils/command/check.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 12:43:21 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 30 Aug 2017 16:43:21 +0000 Subject: [issue30737] Update devguide link to the new URL In-Reply-To: <1498151147.34.0.638989883605.issue30737@psf.upfronthosting.co.za> Message-ID: <1504111401.36.0.597759311828.issue30737@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 12:52:57 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 30 Aug 2017 16:52:57 +0000 Subject: [issue31309] Tkinter root window does not close if used with matplotlib.pyplot In-Reply-To: <1504107275.3.0.972371734588.issue31309@psf.upfronthosting.co.za> Message-ID: <1504111977.75.0.247855049184.issue31309@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is purely a tkinter issue. Windows people can ignore this. Your problem was a result of your program error, of not keeping a reference to Tk(), combined with tkinter's _default_root 'feature'. The solution you report in your answer, 'root = tkinter.Tk()', later followed by an explicit 'root.destroy()' is *the* correct way to do what you want. I explained further in my answer. There is no way for askopenfilename to know that you are done with root or tkinter._default_root. ---------- assignee: terry.reedy -> components: -IDLE, Windows nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 13:41:36 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Aug 2017 17:41:36 +0000 Subject: [issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors In-Reply-To: <1496753379.54.0.823104830335.issue30581@psf.upfronthosting.co.za> Message-ID: <1504114896.6.0.342242246193.issue30581@psf.upfronthosting.co.za> STINNER Victor added the comment: I reopen the issue to backport the bugfix to 3.6. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 13:45:43 2017 From: report at bugs.python.org (flying sheep) Date: Wed, 30 Aug 2017 17:45:43 +0000 Subject: [issue31292] `python setup.py check --restructuredtext` fails when a include directive is present. In-Reply-To: <1503928665.81.0.590770692205.issue31292@psf.upfronthosting.co.za> Message-ID: <1504115143.55.0.12503545298.issue31292@psf.upfronthosting.co.za> Changes by flying sheep : ---------- pull_requests: +3293 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 15:17:13 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 19:17:13 +0000 Subject: [issue31308] forkserver process isn't re-launched if it died In-Reply-To: <1504103235.79.0.43802074293.issue31308@psf.upfronthosting.co.za> Message-ID: <1504120633.93.0.245105376444.issue31308@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 15:17:28 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 19:17:28 +0000 Subject: [issue31310] semaphore tracker isn't protected against crashes In-Reply-To: <1504108352.86.0.17423028145.issue31310@psf.upfronthosting.co.za> Message-ID: <1504120648.23.0.729896922857.issue31310@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 15:29:41 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 30 Aug 2017 19:29:41 +0000 Subject: [issue31311] SystemError raised by PyCData_setstate() in case __dict__ is not a dict Message-ID: <1504121381.44.0.97838192699.issue31311@psf.upfronthosting.co.za> New submission from Oren Milman: The following code causes PyCData_setstate() (in Modules/_ctypes/_ctypes.c) to raise a SystemError: import ctypes class BadStruct(ctypes.Structure): def __dict__(self): pass BadStruct().__setstate__({}, b'foo') this is because PyCData_setstate() assumes that the __dict__ attribute is a dict. while we are here, I wonder whether we should change the format given to PyArg_ParseTuple() to "!Os#", so that the following would raise a TypeError: import ctypes class MyStruct(ctypes.Structure): pass MyStruct().__setstate__(42, b'foo') AttributeError: 'int' object has no attribute 'keys' what do you think? ---------- components: Extension Modules messages: 301034 nosy: Oren Milman priority: normal severity: normal status: open title: SystemError raised by PyCData_setstate() in case __dict__ is not a dict type: behavior versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 15:31:55 2017 From: report at bugs.python.org (Oren Milman) Date: Wed, 30 Aug 2017 19:31:55 +0000 Subject: [issue31311] SystemError raised by PyCData_setstate() in case __dict__ is not a dict In-Reply-To: <1504121381.44.0.97838192699.issue31311@psf.upfronthosting.co.za> Message-ID: <1504121515.41.0.664540300296.issue31311@psf.upfronthosting.co.za> Oren Milman added the comment: typo - change the format to "O!s#" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 16:58:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 30 Aug 2017 20:58:44 +0000 Subject: [issue31311] SystemError raised by PyCData_setstate() in case __dict__ is not a dict In-Reply-To: <1504121381.44.0.97838192699.issue31311@psf.upfronthosting.co.za> Message-ID: <1504126724.03.0.278381614311.issue31311@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: And the following example results in segmentation fault. import ctypes class BadStruct(ctypes.Structure): @property def __dict__(self): raise AttributeError BadStruct().__setstate__({}, b'') As for change the format given to PyArg_ParseTuple(), I think it can be done only in master. It is better to make a separate PR for this. ---------- nosy: +serhiy.storchaka type: behavior -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 17:09:21 2017 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 30 Aug 2017 21:09:21 +0000 Subject: [issue28287] Refactor subprocess.Popen to let a subclass handle IO asynchronously In-Reply-To: <1474986403.83.0.165864194914.issue28287@psf.upfronthosting.co.za> Message-ID: <1504127361.93.0.684292508891.issue28287@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: -> gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 17:57:48 2017 From: report at bugs.python.org (Roundup Robot) Date: Wed, 30 Aug 2017 21:57:48 +0000 Subject: [issue26175] Fully implement IOBase abstract on SpooledTemporaryFile In-Reply-To: <1453413274.25.0.536987988375.issue26175@psf.upfronthosting.co.za> Message-ID: <1504130268.91.0.426761780953.issue26175@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3295 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 18:30:11 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 30 Aug 2017 22:30:11 +0000 Subject: [issue30780] IDLE: configdialog - add tests for ConfigDialog GUI. In-Reply-To: <1498516711.25.0.892352273971.issue30780@psf.upfronthosting.co.za> Message-ID: <1504132211.17.0.887913324474.issue30780@psf.upfronthosting.co.za> Cheryl Sabella added the comment: I've started working on the missing tests for HighPage and KeysPage and also test for the functions and buttons in ConfigDialog. That led to PR3238 because the 'help' button wasn't working. Anyway, I found the following on http://effbot.org/tkinterbook/tkinter-events-and-bindings.htm: "An easier solution is to prevent Tkinter from propagating the event to other handlers; just return the string ?break? from your event handler: def ignore(event): return "break" text.bind("", ignore) or text.bind("", lambda e: "break")" So, it seems that the 'Double-Button-1' and 'B1-Motion' bindings are to prevent those events from propagating outside of the widget. Although, I didn't notice a difference when I commented them out, so maybe they don't have a higher level binding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 18:47:57 2017 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 30 Aug 2017 22:47:57 +0000 Subject: [issue30096] Update examples in abc documentation to use abc.ABC In-Reply-To: <1492545098.58.0.705598301268.issue30096@psf.upfronthosting.co.za> Message-ID: <1504133277.16.0.0842571754719.issue30096@psf.upfronthosting.co.za> ?ric Araujo added the comment: New changeset 122e88a8354e3f75aeaf6211232dac88ac296d54 by ?ric Araujo (Eric Appelt) in branch 'master': bpo-30096: Use ABC in abc reference examples (#1220) https://github.com/python/cpython/commit/122e88a8354e3f75aeaf6211232dac88ac296d54 ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 18:50:00 2017 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 30 Aug 2017 22:50:00 +0000 Subject: [issue30096] Update examples in abc documentation to use abc.ABC In-Reply-To: <1492545098.58.0.705598301268.issue30096@psf.upfronthosting.co.za> Message-ID: <1504133400.34.0.0683486651531.issue30096@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch! Raymond approved it and I merged it after a minor change. Now let me read the doc again about backports :) ---------- stage: needs patch -> backport needed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 30 19:21:02 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 30 Aug 2017 23:21:02 +0000 Subject: [issue24900] Raising an exception that cannot be unpickled causes hang in ProcessPoolExecutor In-Reply-To: <1440055310.02.0.542767582293.issue24900@psf.upfronthosting.co.za> Message-ID: <1504135261.99.0.23993351573.issue24900@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- pull_requests: -3277 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 03:03:58 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 31 Aug 2017 07:03:58 +0000 Subject: [issue31108] add __contains__ for list_iterator (and others) for better performance In-Reply-To: <1501700026.5.0.776654640231.issue31108@psf.upfronthosting.co.za> Message-ID: <1504163038.87.0.910414048341.issue31108@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I recommend rejecting this proposal ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 03:07:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Aug 2017 07:07:26 +0000 Subject: [issue31108] add __contains__ for list_iterator (and others) for better performance In-Reply-To: <1501700026.5.0.776654640231.issue31108@psf.upfronthosting.co.za> Message-ID: <1504163246.72.0.111976057582.issue31108@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 03:35:51 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 07:35:51 +0000 Subject: [issue26669] time.localtime(float("NaN")) does not raise a ValueError on all platforms In-Reply-To: <1459322243.53.0.921219428076.issue26669@psf.upfronthosting.co.za> Message-ID: <1504164951.3.0.264888916954.issue26669@psf.upfronthosting.co.za> STINNER Victor added the comment: I like PR 3085 to raise explicitly a ValueError with an helpful error message. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 04:15:49 2017 From: report at bugs.python.org (Wayland Zhong) Date: Thu, 31 Aug 2017 08:15:49 +0000 Subject: [issue31312] Build differences caused by the time stamps Message-ID: <1504167349.56.0.0314062412353.issue31312@psf.upfronthosting.co.za> New submission from Wayland Zhong: When I build python (version 2.7.13), I find the build results are different every time. It seems to be caused by some times tamps, and they may be generated by the code below: Lib/py_compile.py:106: with open(file, 'U') as f: Lib/py_compile.py:107: try: Lib/py_compile.py:108: timestamp = long(os.fstat(f.fileno()).st_mtime) Lib/py_compile.py:109: except AttributeError: Lib/py_compile.py:110: timestamp = long(os.stat(file).st_mtime) Lib/py_compile.py:111: codestring = f.read() As we know, reproducible build is a good way to counter malicious attacks that generate malicious executables, by making it easy to recreate the executable to determine if the result is correct. How can I eliminate the differences caused by the time stamps? Just remove some code? Or is there any configuration? If we can't eliminate the difference now, can lsof support it in future versions? Thank you. ---------- components: Library (Lib) messages: 301042 nosy: WaylandZ priority: normal severity: normal status: open title: Build differences caused by the time stamps type: security versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 05:55:01 2017 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Thu, 31 Aug 2017 09:55:01 +0000 Subject: [issue31313] Feature Add support of os.chflags() on Linux platform Message-ID: <1504173301.11.0.484917875166.issue31313@psf.upfronthosting.co.za> New submission from ???? ?????????: Yes, chflags() is not supported by linux directly. But actually, Linux supports chflags functionality: https://stackoverflow.com/questions/34176464/why-os-chflags-doesnt-work-under-linux through ioctl (fd, EXT2_IOC_SETFLAGS, ) ---------- components: Library (Lib) messages: 301043 nosy: socketpair priority: normal severity: normal status: open title: Feature Add support of os.chflags() on Linux platform type: enhancement versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 06:29:52 2017 From: report at bugs.python.org (Matthias Klose) Date: Thu, 31 Aug 2017 10:29:52 +0000 Subject: [issue31314] email throws exception with oversized header input Message-ID: <1504175392.51.0.871887341171.issue31314@psf.upfronthosting.co.za> New submission from Matthias Klose: [forwarded from https://bugs.debian.org/854001] $ cat tst.py #!/usr/bin/env python import sys import email mail = email.message_from_string( """From: To: Subject: demo X-Overlong-Header-Name-causes-python-mail-to-crash-in-re-serialization-example: Hello """) message = mail.as_string() sys.stdout.write(message) $ python tst.py Traceback (most recent call last): File "tst.py", line 13, in message = mail.as_string() File "/usr/lib/python2.7/email/message.py", line 137, in as_string g.flatten(self, unixfrom=unixfrom) File "/usr/lib/python2.7/email/generator.py", line 83, in flatten self._write(msg) File "/usr/lib/python2.7/email/generator.py", line 115, in _write self._write_headers(msg) File "/usr/lib/python2.7/email/generator.py", line 164, in _write_headers v, maxlinelen=self._maxheaderlen, header_name=h).encode() File "/usr/lib/python2.7/email/header.py", line 408, in encode lastchunk, lastcharset = newchunks[-1] IndexError: list index out of range ---------- components: email messages: 301044 nosy: barry, doko, r.david.murray priority: normal severity: normal status: open title: email throws exception with oversized header input versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 06:45:19 2017 From: report at bugs.python.org (Muhammad Alkarouri) Date: Thu, 31 Aug 2017 10:45:19 +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: <1504176319.46.0.974981615087.issue27794@psf.upfronthosting.co.za> Muhammad Alkarouri added the comment: Now that the descriptor protocol has `__set_name__`, does this make any difference to this issue? The property can know its name, subject to a suitable patch. ---------- nosy: +Muhammad Alkarouri _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 07:00:11 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 Aug 2017 11:00:11 +0000 Subject: [issue31313] Feature Add support of os.chflags() on Linux platform In-Reply-To: <1504173301.11.0.484917875166.issue31313@psf.upfronthosting.co.za> Message-ID: <1504177211.66.0.365944462553.issue31313@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Judging by the ioctl name, this is ext2/ext3/ext4 specific? ---------- nosy: +larry, neologix, pitrou versions: -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 08:01:28 2017 From: report at bugs.python.org (Henk-Jaap Wagenaar) Date: Thu, 31 Aug 2017 12:01:28 +0000 Subject: [issue31307] ConfigParser.read silently fails if filenames argument is a byte string In-Reply-To: <1504102547.11.0.362577067596.issue31307@psf.upfronthosting.co.za> Message-ID: <1504180888.28.0.197659571068.issue31307@psf.upfronthosting.co.za> Changes by Henk-Jaap Wagenaar : ---------- nosy: +Henk-Jaap Wagenaar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 08:40:30 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 31 Aug 2017 12:40:30 +0000 Subject: [issue31312] Build differences caused by the time stamps In-Reply-To: <1504167349.56.0.0314062412353.issue31312@psf.upfronthosting.co.za> Message-ID: <1504183230.87.0.72185173243.issue31312@psf.upfronthosting.co.za> R. David Murray added the comment: Duplicate of issue 29708. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> support reproducible Python builds type: security -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 08:43:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 12:43:58 +0000 Subject: [issue29708] support reproducible Python builds In-Reply-To: <1488540966.18.0.904677570473.issue29708@psf.upfronthosting.co.za> Message-ID: <1504183438.66.0.345577752581.issue29708@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 09:04:55 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 31 Aug 2017 13:04:55 +0000 Subject: [issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad In-Reply-To: <1504121381.44.0.97838192699.issue31311@psf.upfronthosting.co.za> Message-ID: <1504184695.59.0.606135487924.issue31311@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- title: SystemError raised by PyCData_setstate() in case __dict__ is not a dict -> a SystemError and a crash in PyCData_setstate() when __dict__ is bad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 09:21:15 2017 From: report at bugs.python.org (desbma) Date: Thu, 31 Aug 2017 13:21:15 +0000 Subject: [issue26826] Expose new copy_file_range() syscall in os module. In-Reply-To: <1461325239.41.0.30054024313.issue26826@psf.upfronthosting.co.za> Message-ID: <1504185675.24.0.583798583545.issue26826@psf.upfronthosting.co.za> Changes by desbma : ---------- nosy: +desbma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 09:39:56 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 13:39:56 +0000 Subject: [issue31250] test_asyncio leaks dangling threads In-Reply-To: <1503333236.01.0.923722915126.issue31250@psf.upfronthosting.co.za> Message-ID: <1504186796.5.0.893509470253.issue31250@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 09:42:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 13:42:00 +0000 Subject: [issue31250] test_asyncio leaks dangling threads In-Reply-To: <1503333236.01.0.923722915126.issue31250@psf.upfronthosting.co.za> Message-ID: <1504186920.64.0.291663905595.issue31250@psf.upfronthosting.co.za> STINNER Victor added the comment: I proposed PR 3252 to only fix unit tests, but not asyncio. An alternative is to modify BaseEventLoop.close() to replace executor.shutdown(wait=False) with executor.shutdown(wait=True), but it would change the behaviour. I'm not sure if we want to wait until all threads complete on close()? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 09:54:53 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 13:54:53 +0000 Subject: [issue31249] test_concurrent_futures leaks dangling threads In-Reply-To: <1503331453.05.0.480625711508.issue31249@psf.upfronthosting.co.za> Message-ID: <1504187693.55.0.355459108619.issue31249@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3297 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 10:30:09 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 14:30:09 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504189809.27.0.874256553587.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: Another command to reproduce a leak: ./python -m test -R 3:3 -j1 test_sys -F -m test.test_sys.SysModuleTest.test_current_frames ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 11:14:06 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 31 Aug 2017 15:14:06 +0000 Subject: [issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad In-Reply-To: <1504121381.44.0.97838192699.issue31311@psf.upfronthosting.co.za> Message-ID: <1504192446.1.0.833349501731.issue31311@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3298 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 11:57:38 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 31 Aug 2017 15:57:38 +0000 Subject: [issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad In-Reply-To: <1504121381.44.0.97838192699.issue31311@psf.upfronthosting.co.za> Message-ID: <1504195058.99.0.861834054894.issue31311@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3299 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 12:23:30 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 31 Aug 2017 16:23:30 +0000 Subject: [issue31311] a SystemError and a crash in PyCData_setstate() when __dict__ is bad In-Reply-To: <1504121381.44.0.97838192699.issue31311@psf.upfronthosting.co.za> Message-ID: <1504196610.85.0.940068830667.issue31311@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- components: +ctypes -Extension Modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 12:25:55 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 31 Aug 2017 16:25:55 +0000 Subject: [issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string Message-ID: <1504196755.68.0.337811894425.issue31315@psf.upfronthosting.co.za> New submission from Oren Milman: The following code causes an assertion failure in get_encoded_name(), which is called by _PyImport_LoadDynamicModuleWithSpec() (in Python/importdl.c): import imp class BadSpec: name = 42 origin = 'foo' imp.create_dynamic(BadSpec()) this is because _PyImport_LoadDynamicModuleWithSpec() assumes that spec.name is a string. should we fix this (even though imp is deprecated)? ---------- components: Extension Modules messages: 301050 nosy: Oren Milman priority: normal severity: normal status: open title: assertion failure in imp.create_dynamic(), when spec.name is not a string type: crash versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 12:56:19 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 16:56:19 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504198579.15.0.519448055701.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: Current status of my analysis. I'm able to reproduce the bug using this modified Lib/test/test_sys.py: --- import unittest, test.support from test.support.script_helper import assert_python_ok import threading def f123(): pass class SysModuleTest(unittest.TestCase): def test_current_frames(self): t = threading.Thread(target=f123) t.start() t.join() --- And this shell script: --- set -x while true; do PYTHONHASHSEED=$RANDOM ./python -m test -R 3:3 -j1 test_sys -m test_current_frames || break; done --- With this command, when the test fail, it's possible to reproduce the bug 100% of times using the written PYTHONHASHSEED. Example: --- pydev at stormageddon ~/cpython $ ./bug.sh ++ true ++ PYTHONHASHSEED=23016 ++ ./python -m test -R 3:3 -j1 test_sys -m test_current_frames Run tests in parallel using 1 child processes 0:00:00 load avg: 0.15 [1/1] test_sys passed beginning 6 repetitions 123456 ...... 1 test OK. Total duration: 982 ms Tests result: SUCCESS ++ true ++ PYTHONHASHSEED=9197 ++ ./python -m test -R 3:3 -j1 test_sys -m test_current_frames Run tests in parallel using 1 child processes 0:00:00 load avg: 0.22 [1/1/1] test_sys failed beginning 6 repetitions 123456 ...... test_sys leaked [1, 1, 1] memory blocks, sum=3 1 test failed: test_sys Total duration: 1000 ms Tests result: FAILURE ++ break pydev at stormageddon ~/cpython $ PYTHONHASHSEED=9197 ./python -m test -R 3:3 -j1 test_sys -m test_current_frames Run tests in parallel using 1 child processes 0:00:00 load avg: 0.20 [1/1/1] test_sys failed beginning 6 repetitions 123456 ...... test_sys leaked [1, 1, 1] memory blocks, sum=3 1 test failed: test_sys Total duration: 987 ms Tests result: FAILURE --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 13:01:27 2017 From: report at bugs.python.org (Andreas Jung) Date: Thu, 31 Aug 2017 17:01:27 +0000 Subject: [issue31316] Frequent *** stack smashing detected *** with Python 3.6.2/meinheld WSGI server Message-ID: <1504198887.45.0.0502110179306.issue31316@psf.upfronthosting.co.za> New submission from Andreas Jung: We are currently testing Python 3.6.2 with a BottlePY based with "meinheld" WSGI server and we see frequently these crashes....is this related to Python or meinheld in particular? Linux unknown-device 4.7.0-1-amd64 #1 SMP Debian 4.7.2-1 (2016-08-28) x86_64 GNU/Linux 2017-08-31 17:40:55,434] WARNING JWK verification disabled [2017-08-31 17:40:55,435] INFO pimservice version 0.2.0.dev0 [2017-08-31 17:40:55,435] INFO Importing data from /home/nils/src/festool/coa-pim-service/SCPortal_de-DE_20170418.xml.zip [2017-08-31 17:40:55,435] INFO Locales in ZIP file: de-DE Loading SCPortal_de-DE_20170418.xml (1/1) ? done. Bottle v0.12.12 server starting up (using MeinheldServer())... Listening on http://localhost:8080/ Hit Ctrl-C to quit. "0.0.0.0 - - [31/Aug/2017:17:41:27 +0000] "GET /Search/de-DE HTTP/1.1" 200 105256 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36" *** stack smashing detected ***: /home/nils/src/festool/coa-pim-service/bin/python terminated ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x70bcb)[0x7fdcddbabbcb] /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7fdcddc34227] /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x0)[0x7fdcddc341f0] /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/meinheld-0.6.1-py3.6-linux-x86_64.egg/meinheld/server.cpython-36m-x86_64-linux-gnu.so(+0xebdf)[0x7fdcd49c8bdf] /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/meinheld-0.6.1-py3.6-linux-x86_64.egg/meinheld/server.cpython-36m-x86_64-linux-gnu.so(picoev_poll_once_internal+0x95)[0x7fdcd49ce1c5] /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/meinheld-0.6.1-py3.6-linux-x86_64.egg/meinheld/server.cpython-36m-x86_64-linux-gnu.so(+0xfc87)[0x7fdcd49c9c87] /home/nils/src/festool/coa-pim-service/bin/python(_PyCFunction_FastCallKeywords+0x1a7)[0x4bdcb7] /home/nils/src/festool/coa-pim-service/bin/python[0x54d47e] /home/nils/src/festool/coa-pim-service/bin/python(_PyEval_EvalFrameDefault+0x2e63)[0x5512d3] /home/nils/src/festool/coa-pim-service/bin/python[0x54c681] /home/nils/src/festool/coa-pim-service/bin/python[0x54d5f5] /home/nils/src/festool/coa-pim-service/bin/python(_PyEval_EvalFrameDefault+0x2e63)[0x5512d3] /home/nils/src/festool/coa-pim-service/bin/python[0x54d0d5] /home/nils/src/festool/coa-pim-service/bin/python(PyEval_EvalCodeEx+0x2f)[0x54dfaf] /home/nils/src/festool/coa-pim-service/bin/python[0x488cf6] /home/nils/src/festool/coa-pim-service/bin/python(PyObject_Call+0x3a)[0x4562fa] /home/nils/src/festool/coa-pim-service/bin/python(_PyEval_EvalFrameDefault+0x32b6)[0x551726] /home/nils/src/festool/coa-pim-service/bin/python[0x54d0d5] /home/nils/src/festool/coa-pim-service/bin/python[0x54d394] /home/nils/src/festool/coa-pim-service/bin/python(_PyEval_EvalFrameDefault+0x3178)[0x5515e8] /home/nils/src/festool/coa-pim-service/bin/python[0x54c681] /home/nils/src/festool/coa-pim-service/bin/python[0x54d5f5] /home/nils/src/festool/coa-pim-service/bin/python(_PyEval_EvalFrameDefault+0x2e63)[0x5512d3] /home/nils/src/festool/coa-pim-service/bin/python[0x54d0d5] /home/nils/src/festool/coa-pim-service/bin/python(PyEval_EvalCode+0x23)[0x54df43] /home/nils/src/festool/coa-pim-service/bin/python(PyRun_FileExFlags+0x167)[0x42ac17] /home/nils/src/festool/coa-pim-service/bin/python(PyRun_SimpleFileExFlags+0xeb)[0x42ae4b] /home/nils/src/festool/coa-pim-service/bin/python(Py_Main+0xd8f)[0x43f12f] /home/nils/src/festool/coa-pim-service/bin/python(main+0x167)[0x421337] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7fdcddb5b2b1] /home/nils/src/festool/coa-pim-service/bin/python(_start+0x2a)[0x42140a] ======= Memory map: ======== 00400000-007aa000 r-xp 00000000 fe:01 18486295 /usr/bin/python3.6 009a9000-009aa000 r--p 003a9000 fe:01 18486295 /usr/bin/python3.6 009aa000-00a45000 rw-p 003aa000 fe:01 18486295 /usr/bin/python3.6 00a45000-00a77000 rw-p 00000000 00:00 0 00fa0000-15978000 rw-p 00000000 00:00 0 [heap] 7fdcd4533000-7fdcd4673000 rw-p 00000000 00:00 0 7fdcd4673000-7fdcd4679000 r-xp 00000000 fe:01 14027603 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/greenlet-0.4.12-py3.6-linux-x86_64.egg/greenlet.cpython-36m-x86_64-linux-gnu.so 7fdcd4679000-7fdcd4878000 ---p 00006000 fe:01 14027603 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/greenlet-0.4.12-py3.6-linux-x86_64.egg/greenlet.cpython-36m-x86_64-linux-gnu.so 7fdcd4878000-7fdcd4879000 r--p 00005000 fe:01 14027603 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/greenlet-0.4.12-py3.6-linux-x86_64.egg/greenlet.cpython-36m-x86_64-linux-gnu.so 7fdcd4879000-7fdcd487a000 rw-p 00006000 fe:01 14027603 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/greenlet-0.4.12-py3.6-linux-x86_64.egg/greenlet.cpython-36m-x86_64-linux-gnu.so 7fdcd487a000-7fdcd49ba000 rw-p 00000000 00:00 0 7fdcd49ba000-7fdcd49d3000 r-xp 00000000 fe:01 29107634 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/meinheld-0.6.1-py3.6-linux-x86_64.egg/meinheld/server.cpython-36m-x86_64-linux-gnu.so 7fdcd49d3000-7fdcd4bd2000 ---p 00019000 fe:01 29107634 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/meinheld-0.6.1-py3.6-linux-x86_64.egg/meinheld/server.cpython-36m-x86_64-linux-gnu.so 7fdcd4bd2000-7fdcd4bd3000 r--p 00018000 fe:01 29107634 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/meinheld-0.6.1-py3.6-linux-x86_64.egg/meinheld/server.cpython-36m-x86_64-linux-gnu.so 7fdcd4bd3000-7fdcd4bd5000 rw-p 00019000 fe:01 29107634 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/meinheld-0.6.1-py3.6-linux-x86_64.egg/meinheld/server.cpython-36m-x86_64-linux-gnu.so 7fdcd4bd5000-7fdcd5ee1000 rw-p 00000000 00:00 0 7fdcd5ee1000-7fdcd5eeb000 r-xp 00000000 fe:01 6422899 /lib/x86_64-linux-gnu/libnss_files-2.24.so 7fdcd5eeb000-7fdcd60eb000 ---p 0000a000 fe:01 6422899 /lib/x86_64-linux-gnu/libnss_files-2.24.so 7fdcd60eb000-7fdcd60ec000 r--p 0000a000 fe:01 6422899 /lib/x86_64-linux-gnu/libnss_files-2.24.so 7fdcd60ec000-7fdcd60ed000 rw-p 0000b000 fe:01 6422899 /lib/x86_64-linux-gnu/libnss_files-2.24.so 7fdcd60ed000-7fdcd6234000 rw-p 00000000 00:00 0 7fdcd6234000-7fdcd626c000 r-xp 00000000 fe:01 18491635 /usr/lib/x86_64-linux-gnu/libmpdec.so.2.4.2 7fdcd626c000-7fdcd646b000 ---p 00038000 fe:01 18491635 /usr/lib/x86_64-linux-gnu/libmpdec.so.2.4.2 7fdcd646b000-7fdcd646c000 r--p 00037000 fe:01 18491635 /usr/lib/x86_64-linux-gnu/libmpdec.so.2.4.2 7fdcd646c000-7fdcd646d000 rw-p 00038000 fe:01 18491635 /usr/lib/x86_64-linux-gnu/libmpdec.so.2.4.2 7fdcd646d000-7fdcd648d000 r-xp 00000000 fe:01 18757840 /usr/lib/python3.6/lib-dynload/_decimal.cpython-36m-x86_64-linux-gnu.so 7fdcd648d000-7fdcd668c000 ---p 00020000 fe:01 18757840 /usr/lib/python3.6/lib-dynload/_decimal.cpython-36m-x86_64-linux-gnu.so 7fdcd668c000-7fdcd668d000 r--p 0001f000 fe:01 18757840 /usr/lib/python3.6/lib-dynload/_decimal.cpython-36m-x86_64-linux-gnu.so 7fdcd668d000-7fdcd6696000 rw-p 00020000 fe:01 18757840 /usr/lib/python3.6/lib-dynload/_decimal.cpython-36m-x86_64-linux-gnu.so 7fdcd6696000-7fdcd66ac000 r-xp 00000000 fe:01 6422603 /lib/x86_64-linux-gnu/libgcc_s.so.1 7fdcd66ac000-7fdcd68ab000 ---p 00016000 fe:01 6422603 /lib/x86_64-linux-gnu/libgcc_s.so.1 7fdcd68ab000-7fdcd68ac000 r--p 00015000 fe:01 6422603 /lib/x86_64-linux-gnu/libgcc_s.so.1 7fdcd68ac000-7fdcd68ad000 rw-p 00016000 fe:01 6422603 /lib/x86_64-linux-gnu/libgcc_s.so.1 7fdcd68ad000-7fdcd6a1f000 r-xp 00000000 fe:01 18481948 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7fdcd6a1f000-7fdcd6c1f000 ---p 00172000 fe:01 18481948 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7fdcd6c1f000-7fdcd6c29000 r--p 00172000 fe:01 18481948 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7fdcd6c29000-7fdcd6c2b000 rw-p 0017c000 fe:01 18481948 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22 7fdcd6c2b000-7fdcd6c2f000 rw-p 00000000 00:00 0 7fdcd6c2f000-7fdcd6c42000 r-xp 00000000 fe:01 6422643 /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0 7fdcd6c42000-7fdcd6e41000 ---p 00013000 fe:01 6422643 /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0 7fdcd6e41000-7fdcd6e42000 r--p 00012000 fe:01 6422643 /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0 7fdcd6e42000-7fdcd6e43000 rw-p 00013000 fe:01 6422643 /lib/x86_64-linux-gnu/libgpg-error.so.0.21.0 7fdcd6e43000-7fdcd86bf000 r-xp 00000000 fe:01 18486226 /usr/lib/x86_64-linux-gnu/libicudata.so.57.1 7fdcd86bf000-7fdcd88be000 ---p 0187c000 fe:01 18486226 /usr/lib/x86_64-linux-gnu/libicudata.so.57.1 7fdcd88be000-7fdcd88bf000 r--p 0187b000 fe:01 18486226 /usr/lib/x86_64-linux-gnu/libicudata.so.57.1 7fdcd88bf000-7fdcd88c0000 rw-p 0187c000 fe:01 18486226 /usr/lib/x86_64-linux-gnu/libicudata.so.57.1 7fdcd88c0000-7fdcd8a54000 r-xp 00000000 fe:01 18488734 /usr/lib/x86_64-linux-gnu/libicuuc.so.57.1 7fdcd8a54000-7fdcd8c53000 ---p 00194000 fe:01 18488734 /usr/lib/x86_64-linux-gnu/libicuuc.so.57.1 7fdcd8c53000-7fdcd8c65000 r--p 00193000 fe:01 18488734 /usr/lib/x86_64-linux-gnu/libicuuc.so.57.1 7fdcd8c65000-7fdcd8c66000 rw-p 001a5000 fe:01 18488734 /usr/lib/x86_64-linux-gnu/libicuuc.so.57.1 7fdcd8c66000-7fdcd8c68000 rw-p 00000000 00:00 0 7fdcd8c68000-7fdcd8ed3000 r-xp 00000000 fe:01 18486229 /usr/lib/x86_64-linux-gnu/libicui18n.so.57.1 7fdcd8ed3000-7fdcd90d2000 ---p 0026b000 fe:01 18486229 /usr/lib/x86_64-linux-gnu/libicui18n.so.57.1 7fdcd90d2000-7fdcd90df000 r--p 0026a000 fe:01 18486229 /usr/lib/x86_64-linux-gnu/libicui18n.so.57.1 7fdcd90df000-7fdcd90e1000 rw-p 00277000 fe:01 18486229 /usr/lib/x86_64-linux-gnu/libicui18n.so.57.1 7fdcd90e1000-7fdcd90e2000 rw-p 00000000 00:00 0 7fdcd90e2000-7fdcd91e9000 r-xp 00000000 fe:01 6422553 /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6 7fdcd91e9000-7fdcd93e8000 ---p 00107000 fe:01 6422553 /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6 7fdcd93e8000-7fdcd93ea000 r--p 00106000 fe:01 6422553 /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6 7fdcd93ea000-7fdcd93f1000 rw-p 00108000 fe:01 6422553 /lib/x86_64-linux-gnu/libgcrypt.so.20.1.6 7fdcd93f1000-7fdcd93f8000 r-xp 00000000 fe:01 6422916 /lib/x86_64-linux-gnu/librt-2.24.so 7fdcd93f8000-7fdcd95f7000 ---p 00007000 fe:01 6422916 /lib/x86_64-linux-gnu/librt-2.24.so 7fdcd95f7000-7fdcd95f8000 r--p 00006000 fe:01 6422916 /lib/x86_64-linux-gnu/librt-2.24.so 7fdcd95f8000-7fdcd95f9000 rw-p 00007000 fe:01 6422916 /lib/x86_64-linux-gnu/librt-2.24.so 7fdcd95f9000-7fdcd97a9000 r-xp 00000000 fe:01 18489412 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4 7fdcd97a9000-7fdcd99a9000 ---p 001b0000 fe:01 18489412 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4 7fdcd99a9000-7fdcd99b1000 r--p 001b0000 fe:01 18489412 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4 7fdcd99b1000-7fdcd99b3000 rw-p 001b8000 fe:01 18489412 /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.4 7fdcd99b3000-7fdcd99b4000 rw-p 00000000 00:00 0 7fdcd99b4000-7fdcd99c8000 r-xp 00000000 fe:01 18485011 /usr/lib/x86_64-linux-gnu/libexslt.so.0.8.17 7fdcd99c8000-7fdcd9bc8000 ---p 00014000 fe:01 18485011 /usr/lib/x86_64-linux-gnu/libexslt.so.0.8.17 7fdcd9bc8000-7fdcd9bc9000 r--p 00014000 fe:01 18485011 /usr/lib/x86_64-linux-gnu/libexslt.so.0.8.17 7fdcd9bc9000-7fdcd9bca000 rw-p 00015000 fe:01 18485011 /usr/lib/x86_64-linux-gnu/libexslt.so.0.8.17 7fdcd9bca000-7fdcd9c07000 r-xp 00000000 fe:01 18485012 /usr/lib/x86_64-linux-gnu/libxslt.so.1.1.29 7fdcd9c07000-7fdcd9e06000 ---p 0003d000 fe:01 18485012 /usr/lib/x86_64-linux-gnu/libxslt.so.1.1.29 7fdcd9e06000-7fdcd9e08000 r--p 0003c000 fe:01 18485012 /usr/lib/x86_64-linux-gnu/libxslt.so.1.1.29 7fdcd9e08000-7fdcd9e09000 rw-p 0003e000 fe:01 18485012 /usr/lib/x86_64-linux-gnu/libxslt.so.1.1.29 7fdcd9e09000-7fdcd9ff0000 r-xp 00000000 fe:01 12868319 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/lxml-3.8.0-py3.6-linux-x86_64.egg/lxml/etree.cpython-36m-x86_64-linux-gnu.so 7fdcd9ff0000-7fdcda1ef000 ---p 001e7000 fe:01 12868319 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/lxml-3.8.0-py3.6-linux-x86_64.egg/lxml/etree.cpython-36m-x86_64-linux-gnu.so 7fdcda1ef000-7fdcda1f0000 r--p 001e6000 fe:01 12868319 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/lxml-3.8.0-py3.6-linux-x86_64.egg/lxml/etree.cpython-36m-x86_64-linux-gnu.so 7fdcda1f0000-7fdcda220000 rw-p 001e7000 fe:01 12868319 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/lxml-3.8.0-py3.6-linux-x86_64.egg/lxml/etree.cpython-36m-x86_64-linux-gnu.so 7fdcda220000-7fdcda227000 rw-p 00000000 00:00 0 7fdcda227000-7fdcda229000 r-xp 00000000 fe:01 13635416 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cryptography-2.0.3-py3.6-linux-x86_64.egg/cryptography/hazmat/bindings/_padding.abi3.so 7fdcda229000-7fdcda428000 ---p 00002000 fe:01 13635416 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cryptography-2.0.3-py3.6-linux-x86_64.egg/cryptography/hazmat/bindings/_padding.abi3.so 7fdcda428000-7fdcda429000 r--p 00001000 fe:01 13635416 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cryptography-2.0.3-py3.6-linux-x86_64.egg/cryptography/hazmat/bindings/_padding.abi3.so 7fdcda429000-7fdcda42a000 rw-p 00002000 fe:01 13635416 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cryptography-2.0.3-py3.6-linux-x86_64.egg/cryptography/hazmat/bindings/_padding.abi3.so 7fdcda42a000-7fdcda7aa000 rw-p 00000000 00:00 0 7fdcda7aa000-7fdcda7cd000 r-xp 00000000 fe:01 13896898 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cffi-1.10.0-py3.6-linux-x86_64.egg/_cffi_backend.cpython-36m-x86_64-linux-gnu.so 7fdcda7cd000-7fdcda9cd000 ---p 00023000 fe:01 13896898 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cffi-1.10.0-py3.6-linux-x86_64.egg/_cffi_backend.cpython-36m-x86_64-linux-gnu.so 7fdcda9cd000-7fdcda9ce000 r--p 00023000 fe:01 13896898 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cffi-1.10.0-py3.6-linux-x86_64.egg/_cffi_backend.cpython-36m-x86_64-linux-gnu.so 7fdcda9ce000-7fdcda9d3000 rw-p 00024000 fe:01 13896898 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cffi-1.10.0-py3.6-linux-x86_64.egg/_cffi_backend.cpython-36m-x86_64-linux-gnu.so 7fdcda9d3000-7fdcda9d6000 rw-p 00000000 00:00 0 7fdcda9d6000-7fdcda9d7000 r-xp 00000000 fe:01 13635417 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cryptography-2.0.3-py3.6-linux-x86_64.egg/cryptography/hazmat/bindings/_constant_time.abi3.so 7fdcda9d7000-7fdcdabd7000 ---p 00001000 fe:01 13635417 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cryptography-2.0.3-py3.6-linux-x86_64.egg/cryptography/hazmat/bindings/_constant_time.abi3.so 7fdcdabd7000-7fdcdabd8000 r--p 00001000 fe:01 13635417 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cryptography-2.0.3-py3.6-linux-x86_64.egg/cryptography/hazmat/bindings/_constant_time.abi3.so 7fdcdabd8000-7fdcdabd9000 rw-p 00002000 fe:01 13635417 /home/nils/src/festool/coa-pim-service/lib/python3.6/site-packages/cryptography-2.0.3-py3.6-linux-x86_64.egg/cryptography/hazmat/bindings/_constant_time.abi3.so 7fdcdabd9000-7fdcdac19000 rw-p 00000000 00:00 0 7fdcdac3a000-7fdcdb03a000 rw-p 00000000 00:00 0 7fdcdb03a000-7fdcdb03e000 r-xp 00000000 fe:01 6422544 /lib/x86_64-linux-gnu/libuuid.so.1.3.0 7fdcdb03e000-7fdcdb23d000 ---p 00004000 fe:01 6422544 /lib/x86_64-linux-gnu/libuuid.so.1.3.0 7fdcdb23d000-7fdcdb23e000 r--p 00003000 fe:01 6422544 /lib/x86_64-linux-gnu/libuuid.so.1.3.0 7fdcdb23e000-7fdcdb23f000 rw-p 00004000 fe:01 6422544 /lib/x86_64-linux-gnu/libuuid.so.1.3.0 7fdcdb23f000-7fdcdb246000 r-xp 00000000 fe:01 18490384 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 7fdcdb246000-7fdcdb446000 ---p 00007000 fe:01 18490384 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 7fdcdb446000-7fdcdb447000 r--p 00007000 fe:01 18490384 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 7fdcdb447000-7fdcdb448000 rw-p 00008000 fe:01 18490384 /usr/lib/x86_64-linux-gnu/libffi.so.6.0.4 7fdcdb448000-7fdcdb463000 r-xp 00000000 fe:01 18757835 /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so 7fdcdb463000-7fdcdb662000 ---p 0001b000 fe:01 18757835 /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so 7fdcdb662000-7fdcdb663000 r--p 0001a000 fe:01 18757835 /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so 7fdcdb663000-7fdcdb667000 rw-p 0001b000 fe:01 18757835 /usr/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so 7fdcdb667000-7fdcdb727000 rw-p 00000000 00:00 0 7fdcdb727000-7fdcdb73f000 r-xp 00000000 fe:01 18753773 /usr/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so 7fdcdb73f000-7fdcdb93e000 ---p 00018000 fe:01 18753773 /usr/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so 7fdcdb93e000-7fdcdb93f000 r--p 00017000 fe:01 18753773 /usr/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so 7fdcdb93f000-7fdcdb944000 rw-p 00018000 fe:01 18753773 /usr/lib/python3.6/lib-dynload/_ssl.cpython-36m-x86_64-linux-gnu.so 7fdcdb944000-7fdcdba04000 rw-p 00000000 00:00 0 7fdcdba37000-7fdcdba41000 r-xp 00000000 fe:01 18757841 /usr/lib/python3.6/lib-dynload/_json.cpython-36m-x86_64-linux-gnu.so 7fdcdba41000-7fdcdbc40000 ---p 0000a000 fe:01 18757841 /usr/lib/python3.6/lib-dynload/_json.cpython-36m-x86_64-linux-gnu.so 7fdcdbc40000-7fdcdbc41000 r--p 00009000 fe:01 18757841 /usr/lib/python3.6/lib-dynload/_json.cpython-36m-x86_64-linux-gnu.so 7fdcdbc41000-7fdcdbc42000 rw-p 0000a000 fe:01 18757841 /usr/lib/python3.6/lib-dynload/_json.cpython-36m-x86_64-linux-gnu.so 7fdcdbc42000-7fdcdbc43000 r-xp 00000000 fe:01 18753771 /usr/lib/python3.6/lib-dynload/_opcode.cpython-36m-x86_64-linux-gnu.so 7fdcdbc43000-7fdcdbe42000 ---p 00001000 fe:01 18753771 /usr/lib/python3.6/lib-dynload/_opcode.cpython-36m-x86_64-linux-gnu.so 7fdcdbe42000-7fdcdbe43000 r--p 00000000 fe:01 18753771 /usr/lib/python3.6/lib-dynload/_opcode.cpython-36m-x86_64-linux-gnu.so 7fdcdbe43000-7fdcdbe44000 rw-p 00001000 fe:01 18753771 /usr/lib/python3.6/lib-dynload/_opcode.cpython-36m-x86_64-linux-gnu.so 7fdcdbe44000-7fdcdbf84000 rw-p 00000000 00:00 0 7fdcdbf95000-7fdcdc355000 rw-p 00000000 00:00 0 7fdcdc355000-7fdcdc367000 r-xp 00000000 fe:01 18753772 /usr/lib/python3.6/lib-dynload/_sha3.cpython-36m-x86_64-linux-gnu.so 7fdcdc367000-7fdcdc566000 ---p 00012000 fe:01 18753772 /usr/lib/python3.6/lib-dynload/_sha3.cpython-36m-x86_64-linux-gnu.so 7fdcdc566000-7fdcdc567000 r--p 00011000 fe:01 18753772 /usr/lib/python3.6/lib-dynload/_sha3.cpython-36m-x86_64-linux-gnu.so 7fdcdc567000-7fdcdc569000 rw-p 00012000 fe:01 18753772 /usr/lib/python3.6/lib-dynload/_sha3.cpython-36m-x86_64-linux-gnu.so 7fdcdc569000-7fdcdc7ce000 r-xp 00000000 fe:01 18490325 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 7fdcdc7ce000-7fdcdc9cd000 ---p 00265000 fe:01 18490325 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 7fdcdc9cd000-7fdcdc9eb000 r--p 00264000 fe:01 18490325 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 7fdcdc9eb000-7fdcdc9f9000 rw-p 00282000 fe:01 18490325 /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 7fdcdc9f9000-7fdcdc9fc000 rw-p 00000000 00:00 0 7fdcdc9fc000-7fdcdca5e000 r-xp 00000000 fe:01 18490326 /usr/lib/x86_64-linux-gnu/libssl.so.1.1 7fdcdca5e000-7fdcdcc5e000 ---p 00062000 fe:01 18490326 /usr/lib/x86_64-linux-gnu/libssl.so.1.1 7fdcdcc5e000-7fdcdcc62000 r--p 00062000 fe:01 18490326 /usr/lib/x86_64-linux-gnu/libssl.so.1.1 7fdcdcc62000-7fdcdcc68000 rw-p 00066000 fe:01 18490326 /usr/lib/x86_64-linux-gnu/libssl.so.1.1 7fdcdcc68000-7fdcdcc6d000 r-xp 00000000 fe:01 18753770 /usr/lib/python3.6/lib-dynload/_hashlib.cpython-36m-x86_64-linux-gnu.so 7fdcdcc6d000-7fdcdce6c000 ---p 00005000 fe:01 18753770 /usr/lib/python3.6/lib-dynload/_hashlib.cpython-36m-x86_64-linux-gnu.so 7fdcdce6c000-7fdcdce6d000 r--p 00004000 fe:01 18753770 /usr/lib/python3.6/lib-dynload/_hashlib.cpython-36m-x86_64-linux-gnu.so 7fdcdce6d000-7fdcdce6e000 rw-p 00005000 fe:01 18753770 /usr/lib/python3.6/lib-dynload/_hashlib.cpython-36m-x86_64-linux-gnu.so 7fdcdce6e000-7fdcdcf2e000 rw-p 00000000 00:00 0 7fdcdcf2e000-7fdcdcf53000 r-xp 00000000 fe:01 6422594 /lib/x86_64-linux-gnu/liblzma.so.5.2.2 7fdcdcf53000-7fdcdd152000 ---p 00025000 fe:01 6422594 /lib/x86_64-linux-gnu/liblzma.so.5.2.2 7fdcdd152000-7fdcdd153000 r--p 00024000 fe:01 6422594 /lib/x86_64-linux-gnu/liblzma.so.5.2.2 7fdcdd153000-7fdcdd154000 rw-p 00025000 fe:01 6422594 /lib/x86_64-linux-gnu/liblzma.so.5.2.2 7fdcdd154000-7fdcdd15b000 r-xp 00000000 fe:01 18757843 /usr/lib/python3.6/lib-dynload/_lzma.cpython-36m-x86_64-linux-gnu.so 7fdcdd15b000-7fdcdd35a000 ---p 00007000 fe:01 18757843 /usr/lib/python3.6/lib-dynload/_lzma.cpython-36m-x86_64-linux-gnu.so 7fdcdd35a000-7fdcdd35b000 r--p 00006000 fe:01 18757843 /usr/lib/python3.6/lib-dynload/_lzma.cpython-36m-x86_64-linux-gnu.so 7fdcdd35b000-7fdcdd35d000 rw-p 00007000 fe:01 18757843 /usr/lib/python3.6/lib-dynload/_lzma.cpython-36m-x86_64-linux-gnu.so 7fdcdd35d000-7fdcdd36c000 r-xp 00000000 fe:01 6422712 /lib/x86_64-linux-gnu/libbz2.so.1.0.4 7fdcdd36c000-7fdcdd56b000 ---p 0000f000 fe:01 6422712 /lib/x86_64-linux-gnu/libbz2.so.1.0.4 7fdcdd56b000-7fdcdd56c000 r--p 0000e000 fe:01 6422712 /lib/x86_64-linux-gnu/libbz2.so.1.0.4 7fdcdd56c000-7fdcdd56d000 rw-p 0000f000 fe:01 6422712 /lib/x86_64-linux-gnu/libbz2.so.1.0.4 7fdcdd56d000-7fdcdd571000 r-xp 00000000 fe:01 18757826 /usr/lib/python3.6/lib-dynload/_bz2.cpython-36m-x86_64-linux-gnu.so 7fdcdd571000-7fdcdd770000 ---p 00004000 fe:01 18757826 /usr/lib/python3.6/lib-dynload/_bz2.cpython-36m-x86_64-linux-gnu.so 7fdcdd770000-7fdcdd771000 r--p 00003000 fe:01 18757826 /usr/lib/python3.6/lib-dynload/_bz2.cpython-36m-x86_64-linux-gnu.so 7fdcdd771000-7fdcdd772000 rw-p 00004000 fe:01 18757826 /usr/lib/python3.6/lib-dynload/_bz2.cpython-36m-x86_64-linux-gnu.so 7fdcdd772000-7fdcdd7f2000 rw-p 00000000 00:00 0 7fdcdd7fb000-7fdcddb3b000 rw-p 00000000 00:00 0 7fdcddb3b000-7fdcddcd0000 r-xp 00000000 fe:01 6422647 /lib/x86_64-linux-gnu/libc-2.24.so 7fdcddcd0000-7fdcdded0000 ---p 00195000 fe:01 6422647 /lib/x86_64-linux-gnu/libc-2.24.so 7fdcdded0000-7fdcdded4000 r--p 00195000 fe:01 6422647 /lib/x86_64-linux-gnu/libc-2.24.so 7fdcdded4000-7fdcdded6000 rw-p 00199000 fe:01 6422647 /lib/x86_64-linux-gnu/libc-2.24.so 7fdcdded6000-7fdcddeda000 rw-p 00000000 00:00 0 7fdcddeda000-7fdcddfdd000 r-xp 00000000 fe:01 6422717 /lib/x86_64-linux-gnu/libm-2.24.so 7fdcddfdd000-7fdcde1dc000 ---p 00103000 fe:01 6422717 /lib/x86_64-linux-gnu/libm-2.24.so 7fdcde1dc000-7fdcde1dd000 r--p 00102000 fe:01 6422717 /lib/x86_64-linux-gnu/libm-2.24.so 7fdcde1dd000-7fdcde1de000 rw-p 00103000 fe:01 6422717 /lib/x86_64-linux-gnu/libm-2.24.so 7fdcde1de000-7fdcde1f7000 r-xp 00000000 fe:01 6425773 /lib/x86_64-linux-gnu/libz.so.1.2.8 7fdcde1f7000-7fdcde3f6000 ---p 00019000 fe:01 6425773 /lib/x86_64-linux-gnu/libz.so.1.2.8 7fdcde3f6000-7fdcde3f7000 r--p 00018000 fe:01 6425773 /lib/x86_64-linux-gnu/libz.so.1.2.8 7fdcde3f7000-7fdcde3f8000 rw-p 00019000 fe:01 6425773 /lib/x86_64-linux-gnu/libz.so.1.2.8 7fdcde3f8000-7fdcde41f000 r-xp 00000000 fe:01 6423096 /lib/x86_64-linux-gnu/libexpat.so.1.6.2 7fdcde41f000-7fdcde61f000 ---p 00027000 fe:01 6423096 /lib/x86_64-linux-gnu/libexpat.so.1.6.2 7fdcde61f000-7fdcde621000 r--p 00027000 fe:01 6423096 /lib/x86_64-linux-gnu/libexpat.so.1.6.2 7fdcde621000-7fdcde622000 rw-p 00029000 fe:01 6423096 /lib/x86_64-linux-gnu/libexpat.so.1.6.2 7fdcde622000-7fdcde624000 r-xp 00000000 fe:01 6422935 /lib/x86_64-linux-gnu/libutil-2.24.so 7fdcde624000-7fdcde823000 ---p 00002000 fe:01 6422935 /lib/x86_64-linux-gnu/libutil-2.24.so 7fdcde823000-7fdcde824000 r--p 00001000 fe:01 6422935 /lib/x86_64-linux-gnu/libutil-2.24.so 7fdcde824000-7fdcde825000 rw-p 00002000 fe:01 6422935 /lib/x86_64-linux-gnu/libutil-2.24.so 7fdcde825000-7fdcde828000 r-xp 00000000 fe:01 6422674 /lib/x86_64-linux-gnu/libdl-2.24.so 7fdcde828000-7fdcdea27000 ---p 00003000 fe:01 6422674 /lib/x86_64-linux-gnu/libdl-2.24.so 7fdcdea27000-7fdcdea28000 r--p 00002000 fe:01 6422674 /lib/x86_64-linux-gnu/libdl-2.24.so 7fdcdea28000-7fdcdea29000 rw-p 00003000 fe:01 6422674 /lib/x86_64-linux-gnu/libdl-2.24.so 7fdcdea29000-7fdcdea41000 r-xp 00000000 fe:01 6422911 /lib/x86_64-linux-gnu/libpthread-2.24.so 7fdcdea41000-7fdcdec40000 ---p 00018000 fe:01 6422911 /lib/x86_64-linux-gnu/libpthread-2.24.so 7fdcdec40000-7fdcdec41000 r--p 00017000 fe:01 6422911 /lib/x86_64-linux-gnu/libpthread-2.24.so 7fdcdec41000-7fdcdec42000 rw-p 00018000 fe:01 6422911 /lib/x86_64-linux-gnu/libpthread-2.24.so 7fdcdec42000-7fdcdec46000 rw-p 00000000 00:00 0 7fdcdec46000-7fdcdec69000 r-xp 00000000 fe:01 6422587 /lib/x86_64-linux-gnu/ld-2.24.so 7fdcdec9d000-7fdcdee38000 r--p 00000000 fe:01 18502511 /usr/lib/locale/locale-archive 7fdcdee38000-7fdcdee3c000 rw-p 00000000 00:00 0 7fdcdee5d000-7fdcdee5e000 rw-p 00000000 00:00 0 7fdcdee5e000-7fdcdee5f000 rwxp 00000000 00:00 0 7fdcdee5f000-7fdcdee66000 r--s 00000000 fe:01 18513329 /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache 7fdcdee66000-7fdcdee69000 rw-p 00000000 00:00 0 7fdcdee69000-7fdcdee6a000 r--p 00023000 fe:01 6422587 /lib/x86_64-linux-gnu/ld-2.24.so 7fdcdee6a000-7fdcdee6b000 rw-p 00024000 fe:01 6422587 /lib/x86_64-linux-gnu/ld-2.24.so 7fdcdee6b000-7fdcdee6c000 rw-p 00000000 00:00 0 7ffd8f160000-7ffd8f182000 rw-p 00000000 00:00 0 [stack] 7ffd8f1fb000-7ffd8f1fd000 r--p 00000000 00:00 0 [vvar] 7ffd8f1fd000-7ffd8f1ff000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] Abgebrochen (coa-pim-service) nils at unknown-device:~/src/festool/coa-pim-service$ ---------- messages: 301052 nosy: zopyx priority: normal severity: normal status: open title: Frequent *** stack smashing detected *** with Python 3.6.2/meinheld WSGI server type: crash versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 13:30:18 2017 From: report at bugs.python.org (Alex Richman) Date: Thu, 31 Aug 2017 17:30:18 +0000 Subject: [issue29707] os.path.ismount() always returns false for mount --bind on same filesystem In-Reply-To: <1488524974.65.0.103028894103.issue29707@psf.upfronthosting.co.za> Message-ID: <1504200618.59.0.101086392574.issue29707@psf.upfronthosting.co.za> Alex Richman added the comment: Can confirm, ran into this issue. It's because os.path.ismount() works by checking if the path's parent is on a different device (e.g. st_dev is the same for 'path/' and 'path/..'), which obviously it is for a bind mount on the same filesystem. It is actually documented that this is how it works (https://docs.python.org/2/library/os.path.html#os.path.ismount) but it's more of a passing comment than a warning, and who reads the docs for such an apparently simple function anyway? ;) Agree that it should be fixed by parsing /proc/mounts instead of the current mess, perhaps using getmntent(3) and friends. ---------- nosy: +Alex Richman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 13:31:42 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 31 Aug 2017 17:31:42 +0000 Subject: [issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string In-Reply-To: <1504196755.68.0.337811894425.issue31315@psf.upfronthosting.co.za> Message-ID: <1504200702.04.0.686408780534.issue31315@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +brett.cannon, eric.snow, ncoghlan, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 14:32:43 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 31 Aug 2017 18:32:43 +0000 Subject: [issue30940] Documentation for round() is incorrect. In-Reply-To: <1500223918.38.0.72996478594.issue30940@psf.upfronthosting.co.za> Message-ID: <1504204363.16.0.136889819813.issue30940@psf.upfronthosting.co.za> Changes by Roundup Robot : ---------- pull_requests: +3300 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 15:01:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 19:01:17 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504206077.59.0.790456091824.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I succeeded to reproduce the issue on my amd64 laptop using gcc -m32. I'm now sure that the issue can be reproduced on 32-bit. Maybe the issue can be reproduced on 64-bit but is more unlikely? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 15:02:02 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 19:02:02 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504206122.93.0.897521857754.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: Copy attached test_leak.py to Lib/test/ and run: set -x while true; do PYTHONHASHSEED=$RANDOM ./python -m test -R 3:30 -j1 test_leak || break; done ---------- Added file: http://bugs.python.org/file47110/test_leak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 15:03:21 2017 From: report at bugs.python.org (Zachary Ware) Date: Thu, 31 Aug 2017 19:03:21 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504206201.76.0.872520642486.issue31217@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 15:32:58 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 31 Aug 2017 19:32:58 +0000 Subject: [issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string In-Reply-To: <1504196755.68.0.337811894425.issue31315@psf.upfronthosting.co.za> Message-ID: <1504207978.72.0.836682730626.issue31315@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm about to go on vacation so I might not be right of mind to comment, but I think throwing a TypeError is valid if it's triggering an assertion error that is already there. P.S. Thanks for all the fuzz testing you're doing, Oren! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 15:40:44 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 31 Aug 2017 19:40:44 +0000 Subject: [issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string In-Reply-To: <1504196755.68.0.337811894425.issue31315@psf.upfronthosting.co.za> Message-ID: <1504208444.11.0.21078181774.issue31315@psf.upfronthosting.co.za> Oren Milman added the comment: do you mean that we should fix it to raise a TypeError? the assertion is there, but not explicitly. get_encoded_name() calls PyUnicode_FindChar(), which calls PyUnicode_READY(), which does assert(_PyUnicode_CHECK). so i get: >>> import imp >>> >>> class BadSpec: ... name = 42 ... origin = 'foo' ... >>> imp.create_dynamic(BadSpec()) Assertion failed: PyUnicode_Check(op), file ..\Objects\unicodeobject.c, line 380 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 16:18:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 20:18:11 +0000 Subject: [issue31317] Memory leak in dict with shared keys Message-ID: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za> New submission from STINNER Victor: Copy attached test_leak.py to Lib/test/ and run: haypo at selma$ ./python -m test -R 3:30 test_leak Run tests in parallel using 1 child processes 0:00:00 load avg: 0.67 [1/1/1] test_leak failed beginning 33 repetitions 123456789012345678901234567890123 ................................. test_leak leaked [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] memory blocks, sum=30 1 test failed: test_leak Total duration: 682 ms Tests result: FAILURE It seems like Thread2 constructor creates a dictionary on "self.hashvalue = (...)". It's a dictionary sharing keys, but it seems like the dict table memory is not released whne the bug occurs. Sadly, I'm only able to reproduce the bug on a 32-bit build. Since the bug depends on exact hash values, maybe the bug exists in 64-bit builds, but is less likely? I'm not 100% sure if the bug is related to dict or set. The bug comes from bpo-31217. ---------- messages: 301058 nosy: haypo, inada.naoki, rhettinger, xiang.zhang priority: normal severity: normal status: open title: Memory leak in dict with shared keys type: resource usage versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 16:18:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 20:18:39 +0000 Subject: [issue31317] Memory leak in dict with shared keys In-Reply-To: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za> Message-ID: <1504210719.89.0.130409236885.issue31317@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file47111/test_leak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 16:19:31 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 20:19:31 +0000 Subject: [issue31317] Memory leak in dict with shared keys In-Reply-To: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za> Message-ID: <1504210771.71.0.364572427485.issue31317@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 16:19:48 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 20:19:48 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504210788.1.0.177852109731.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: I created bpo-31317: Memory leak in dict with shared keys. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 16:22:38 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 20:22:38 +0000 Subject: [issue31317] Memory leak in dict with shared keys In-Reply-To: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za> Message-ID: <1504210958.19.0.661499338635.issue31317@psf.upfronthosting.co.za> STINNER Victor added the comment: If you cannot reproduce the bug on 32-bit build, try to set "FIXED_HASH = 0" in test_leak.py, run "./python -m test -R 3:10 test_leak" multiple times until it fails, then copy the last value of the printed list into hash_values in test_leak.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 16:45:09 2017 From: report at bugs.python.org (Brett Cannon) Date: Thu, 31 Aug 2017 20:45:09 +0000 Subject: [issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string In-Reply-To: <1504196755.68.0.337811894425.issue31315@psf.upfronthosting.co.za> Message-ID: <1504212309.72.0.733757655756.issue31315@psf.upfronthosting.co.za> Brett Cannon added the comment: Yes, I'm saying that instead of hitting the C-level assertion error an explicit TypeError should be raised (or some other change like calling str() on the object). Either way, a C-level assertion from valid Python code is bad. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 17:25:15 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 21:25:15 +0000 Subject: [issue31317] Memory leak in dict with shared keys In-Reply-To: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za> Message-ID: <1504214715.31.0.0922464865767.issue31317@psf.upfronthosting.co.za> STINNER Victor added the comment: I spent a lot of time in gdb, but I'm not sure anymore that the issue is related to dict shared keys. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 18:02:03 2017 From: report at bugs.python.org (Oren Milman) Date: Thu, 31 Aug 2017 22:02:03 +0000 Subject: [issue31315] assertion failure in imp.create_dynamic(), when spec.name is not a string In-Reply-To: <1504196755.68.0.337811894425.issue31315@psf.upfronthosting.co.za> Message-ID: <1504216923.63.0.970777809771.issue31315@psf.upfronthosting.co.za> Changes by Oren Milman : ---------- pull_requests: +3301 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 18:03:22 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 Aug 2017 22:03:22 +0000 Subject: [issue31317] Memory leak in dict with shared keys In-Reply-To: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za> Message-ID: <1504217002.72.0.761781766185.issue31317@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It's a really weird bug you found. It depends on the exact values passed to -R: $ ./python -m test -R 3:6 test_haypoleak Run tests sequentially 0:00:00 load avg: 0.39 [1/1] test_haypoleak beginning 9 repetitions 123456789 ......... test_haypoleak leaked [1, 1, 1, 1, 1, 1] memory blocks, sum=6 test_haypoleak failed $ ./python -m test -R 2:6 test_haypoleak Run tests sequentially 0:00:00 load avg: 0.36 [1/1] test_haypoleak beginning 8 repetitions 12345678 ........ 1 test OK. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 18:04:23 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 Aug 2017 22:04:23 +0000 Subject: [issue31317] Memory leak in dict with shared keys In-Reply-To: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za> Message-ID: <1504217063.36.0.631751194822.issue31317@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, it's not the bug that is weird, but the heuristics in -R seem completely weird now. If I print the alloc and rc deltas: $ ./python -m test -R 3:6 test_haypoleak Run tests sequentially 0:00:00 load avg: 0.09 [1/1] test_haypoleak beginning 9 repetitions 123456789 ......... alloc: [0, 0, 0, 1, 1, 1, 1, 1, 1], rc: [0, 0, 0, 0, 0, 0, 0, 0, 0] test_haypoleak leaked [1, 1, 1, 1, 1, 1] memory blocks, sum=6 test_haypoleak failed $ ./python -m test -R 2:6 test_haypoleak Run tests sequentially 0:00:00 load avg: 0.10 [1/1] test_haypoleak beginning 8 repetitions 12345678 ........ alloc: [0, 0, 0, 1, 1, 1, 1, 1], rc: [0, 0, 0, 0, 0, 0, 0, 0] 1 test OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 18:05:23 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 Aug 2017 22:05:23 +0000 Subject: [issue31317] Memory leak in dict with shared keys In-Reply-To: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za> Message-ID: <1504217123.12.0.721426431629.issue31317@psf.upfronthosting.co.za> Antoine Pitrou added the comment: s/completely weird/broken/ $ ./python -m test -R 2:20 test_haypoleak Run tests sequentially 0:00:00 load avg: 0.10 [1/1] test_haypoleak beginning 22 repetitions 1234567890123456789012 ...................... alloc: [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], rc: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 1 test OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 18:08:30 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 Aug 2017 22:08:30 +0000 Subject: [issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks references In-Reply-To: <1498513763.26.0.144257056209.issue30776@psf.upfronthosting.co.za> Message-ID: <1504217310.86.0.916465993992.issue30776@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This change suddenly made detection of reference leaks a lot less effective. Now if you have a single 0 in the deltas list, it will consider there is no reference leak, even though all other values might be > 0. See https://bugs.python.org/issue31317#msg301064 for an example. Victor, it would be nice if you could find a less brutal heuristic. ---------- assignee: -> haypo nosy: +pitrou, serhiy.storchaka resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 18:11:31 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 Aug 2017 22:11:31 +0000 Subject: [issue31317] Memory leak in dict with shared keys In-Reply-To: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za> Message-ID: <1504217491.45.0.85281670772.issue31317@psf.upfronthosting.co.za> Antoine Pitrou added the comment: To come back to this bug, it still fails if add a __slots__, so I don't think it's related to shared key dictionaries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 18:23:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 22:23:00 +0000 Subject: [issue31317] Memory leak in dict with shared keys In-Reply-To: <1504210691.95.0.17825455702.issue31317@psf.upfronthosting.co.za> Message-ID: <1504218180.07.0.408340927541.issue31317@psf.upfronthosting.co.za> STINNER Victor added the comment: Antoine: "Actually, it's not the bug that is weird, but the heuristics in -R seem completely weird now. If I print the alloc and rc deltas:" I changed it recently to reduce false alarms: see bpo-30776. Antoine: "To come back to this bug, it still fails if add a __slots__, so I don't think it's related to shared key dictionaries." Oh ok, in that case, I will move back to bpo-31217. I close this issue as a duplicate. ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 18:26:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 22:26:35 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504218395.91.0.647259346739.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm still able to reproduce the bug using attached leak.py script which is now 100 lines long, but has to import logging, socket and pickle. Without these imports, the bug hides (maybe the hardcoded hash values must be recomputed, but I failed to find hash values in that case). ---------- nosy: +pitrou Added file: http://bugs.python.org/file47112/leak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 18:35:51 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 Aug 2017 22:35:51 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504218951.74.0.0686869333091.issue31217@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Attached test script still fails even though the objects are pre-allocated, and without setting a hash seed. $ ./python -m test -R 3:6 test_haypoleak Run tests sequentially 0:00:00 load avg: 0.23 [1/1] test_haypoleak beginning 9 repetitions 123456789 ......... test_haypoleak leaked [1, 1, 1, 1, 1, 1] memory blocks, sum=6 test_haypoleak failed ---------- Added file: http://bugs.python.org/file47113/test_haypoleak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 18:38:45 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 22:38:45 +0000 Subject: [issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks references In-Reply-To: <1498513763.26.0.144257056209.issue30776@psf.upfronthosting.co.za> Message-ID: <1504219125.54.0.83278427796.issue30776@psf.upfronthosting.co.za> STINNER Victor added the comment: Antoine Pitrou: "Victor, it would be nice if you could find a less brutal heuristic." My current goal is to get green buildbots. If a buildbot is always red, it's hard to notify easily regressions. Since I rejected "false alarms" from refleak, the refleak buildbot already helped to identify a reference leak regression. I am talking about the Windows Refleak buildbot: http://buildbot.python.org/all/builders/AMD64%20Windows8.1%20Refleaks%203.x I'm now working on the x86 Gentoo Refleaks 3.x which raised strange issues like bpo-31217. I am already making regrtest stricter, but slowly, without breaking buildbots. It's a slow process. That's why I'm to "fix" dangling threads for example. By the way, I'm not done with dangling threads in master yet. I'm happy if anyone is interested to help me to work on buildbots, which means in practice fixing a new different bug everyday :-) Slowly, the remaining bugs are the most complex ones. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 18:55:11 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 22:55:11 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504220111.72.0.576106250537.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: leak2.py: script based on my leak.py and Antoine's test_haypoleak.py. If you replace "if 0:" with "if 1:", it seems like the test doesn't anymore. It seems like the "leak" is the call to sys.getallocatedblocks() which creates a new integer, and the integer is kept alive between two loop iterations. Maybe I missed something. ---------- Added file: http://bugs.python.org/file47114/leak2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 19:22:33 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 Aug 2017 23:22:33 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504221753.87.0.668097147167.issue31217@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > It seems like the "leak" is the call to sys.getallocatedblocks() which creates a new integer, and the integer is kept alive between two loop iterations. I doubt it. If that was the case, the reference count would increase as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 19:33:00 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 Aug 2017 23:33:00 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504222380.46.0.861824515584.issue31217@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, leak2.py doesn't attempt to cleanup anything between runs, so it can't be reliable for detecting leaks. You lack dash_R_cleanup() somewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 19:48:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Thu, 31 Aug 2017 23:48:23 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504223303.13.0.241300965127.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: Antoine: "I doubt it. If that was the case, the reference count would increase as well." The bug is really weird :-) Antoine: "Actually, leak2.py doesn't attempt to cleanup anything between runs, so it can't be reliable for detecting leaks. You lack dash_R_cleanup() somewhere." I simplified dash_R_cleanup() and at the end, it was empty :-) I don't see how the test_current_frames() would need to clear any kind of cache. Maybe: * sys._clear_type_cache() * gc.collect() * C function clear_freelists() of gcmodule.c But I tried to call these functions, and it doesn't change anything. I don't see how calling set.add() and set.discard() would impact any cache, except of maybe of a free list? The strange thing is that calling dangling.clear() explicitly in test_current_frames() "fixes the leak" (hides the bug?). But any tiny change on this file also hides the bug. The script is very fragile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 19:58:13 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 31 Aug 2017 23:58:13 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504223893.4.0.531740410801.issue31217@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ahah. Actually, it's quite simple :-) On 64-bit Python: >>> id(82914 - 82913) == id(1) True On 32-bit Python: >>> id(82914 - 82913) == id(1) False So the first non-zero alloc_delta really has a snowball effect, as it creates new memory block which will produce a non-zero alloc_delta on the next run, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 20:03:58 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 00:03:58 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504224238.36.0.35214655531.issue31217@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This patch does the trick: diff --git a/Lib/test/libregrtest/refleak.py b/Lib/test/libregrtest/refleak.py index efe5210..68e490a 100644 --- a/Lib/test/libregrtest/refleak.py +++ b/Lib/test/libregrtest/refleak.py @@ -48,6 +48,11 @@ def dash_R(the_module, test, indirect_test, huntrleaks): print("beginning", repcount, "repetitions", file=sys.stderr) print(("1234567890"*(repcount//10 + 1))[:repcount], file=sys.stderr, flush=True) + + int_pool = {i: i for i in range(-1000, 1000)} + def get_pooled_int(v): + return int_pool.setdefault(v, v) + # initialize variables to make pyflakes quiet rc_before = alloc_before = fd_before = 0 for i in range(repcount): @@ -56,9 +61,9 @@ def dash_R(the_module, test, indirect_test, huntrleaks): abcs) print('.', end='', file=sys.stderr, flush=True) if i >= nwarmup: - rc_deltas[i] = rc_after - rc_before - alloc_deltas[i] = alloc_after - alloc_before - fd_deltas[i] = fd_after - fd_before + rc_deltas[i] = get_pooled_int(rc_after - rc_before) + alloc_deltas[i] = get_pooled_int(alloc_after - alloc_before) + fd_deltas[i] = get_pooled_int(fd_after - fd_before) alloc_before = alloc_after rc_before = rc_after fd_before = fd_after ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 20:18:30 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Sep 2017 00:18:30 +0000 Subject: [issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks references In-Reply-To: <1498513763.26.0.144257056209.issue30776@psf.upfronthosting.co.za> Message-ID: <1504225110.56.0.473447325458.issue30776@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Since I rejected "false alarms" from refleak, the refleak buildbot already helped to identify a reference leak regression. Except that now it may hide actual regressions... False negatives are not better than false positives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 20:32:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 00:32:20 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504225940.94.0.287896503006.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: > So the first non-zero alloc_delta really has a snowball effect, as it creates new memory block which will produce a non-zero alloc_delta on the next run, etc. Oh, I suspected an issue around this code but I was unable to explain it. I focused strongly on test_current_frames(), whereas this function is just fine... It's really strange that the bug only triggers on very specific conditions. """ Actually, it's quite simple :-) On 64-bit Python: >>> id(82914 - 82913) == id(1) True On 32-bit Python: >>> id(82914 - 82913) == id(1) False """ That's very strange. Another workaround: diff --git a/Lib/test/libregrtest/refleak.py b/Lib/test/libregrtest/refleak.py index efe52107cb..35d3f8e42d 100644 --- a/Lib/test/libregrtest/refleak.py +++ b/Lib/test/libregrtest/refleak.py @@ -56,9 +56,10 @@ def dash_R(the_module, test, indirect_test, huntrleaks): abcs) print('.', end='', file=sys.stderr, flush=True) if i >= nwarmup: - rc_deltas[i] = rc_after - rc_before - alloc_deltas[i] = alloc_after - alloc_before - fd_deltas[i] = fd_after - fd_before + def maybe_small_long(x): return int(str(x)) + rc_deltas[i] = maybe_small_long(rc_after - rc_before) + alloc_deltas[i] = maybe_small_long(alloc_after - alloc_before) + fd_deltas[i] = maybe_small_long(fd_after - fd_before) alloc_before = alloc_after rc_before = rc_after fd_before = fd_after ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 20:35:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 00:35:42 +0000 Subject: [issue30776] regrtest: change -R/--huntrleaks rule to decide if a test leaks references In-Reply-To: <1498513763.26.0.144257056209.issue30776@psf.upfronthosting.co.za> Message-ID: <1504226142.82.0.724799416167.issue30776@psf.upfronthosting.co.za> STINNER Victor added the comment: > Except that now it may hide actual regressions... False negatives are not better than false positives. Please put this issue in its context. 6 months ago, there was no more Refleak buildbot and everything was broken. If you want to make regrtest -R stricer, go ahead. But if a buildbot breaks, you will have to fix it. I would prefer to first fix the Gentoo Refleak buildbot, since most previous builds failed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 20:41:47 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 00:41:47 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504226507.23.0.562173283974.issue31217@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- pull_requests: +3302 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 20:50:05 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 00:50:05 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504227005.35.0.92789034274.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: Ok, I wrote a PR for my str(int(x)) workaround: https://github.com/python/cpython/pull/3258 I tested manually on the buildbot that it fixes all bugs listed on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 31 20:58:58 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Sep 2017 00:58:58 +0000 Subject: [issue31217] test_code leaked [1, 1, 1] memory blocks on x86 Gentoo Refleaks 3.6/3.x In-Reply-To: <1502876500.53.0.298130981343.issue31217@psf.upfronthosting.co.za> Message-ID: <1504227538.45.0.559234534715.issue31217@psf.upfronthosting.co.za> STINNER Victor added the comment: + int_pool = {i: i for i in range(-1000, 1000)} + def get_pooled_int(v): + return int_pool.setdefault(v, v) I'm not sure that I understand this code. It makes sure that you get a single object in memory for the same integer, and not only for Python "small integer singletons"? About the -1000..1000 range: if a function leaks more than 1 memory block or more than 1 reference, there is already something wrong no? Maybe it's ok to only care of values -1, 0 and 1 :-) My code only cares of Python small integer singletons. I have no strong preference between my code or yours. I only care of fixing the buildbot :-) What do you prefer, Antoine? ---------- _______________________________________ Python tracker _______________________________________