From report at bugs.python.org Sat Oct 1 09:29:12 2016 From: report at bugs.python.org (INADA Naoki) Date: Sat, 01 Oct 2016 13:29:12 +0000 Subject: [docs] [issue28331] "CPython implementation detail:" is removed when contents is translated Message-ID: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> New submission from INADA Naoki: "CPython implementation detail:" label is removed when contents of impl-detail directive is translated. This is very bad for people reading translated documents. Attached patch fixes this, with enabling translating the label, like versionchanged directive. ---------- assignee: docs at python components: Documentation files: impl-detail.patch keywords: patch messages: 277817 nosy: docs at python, inada.naoki priority: normal severity: normal stage: patch review status: open title: "CPython implementation detail:" is removed when contents is translated type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file44910/impl-detail.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 13:21:28 2016 From: report at bugs.python.org (Ned Deily) Date: Sat, 01 Oct 2016 17:21:28 +0000 Subject: [docs] [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475342488.69.0.757280727608.issue28331@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 14:17:48 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 01 Oct 2016 18:17:48 +0000 Subject: [docs] [issue22392] Clarify documentation of __getinitargs__ In-Reply-To: <1410461552.96.0.589396040073.issue22392@psf.upfronthosting.co.za> Message-ID: <1475345868.22.0.80821306553.issue22392@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 17:39:05 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 01 Oct 2016 21:39:05 +0000 Subject: [docs] [issue28088] Document Transport.set_protocol and get_protocol Message-ID: <1475357945.82.0.877224976238.issue28088@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 17:39:21 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 01 Oct 2016 21:39:21 +0000 Subject: [docs] [issue28089] Document TCP_NODELAY by default Message-ID: <1475357961.84.0.737151487768.issue28089@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 1 20:46:13 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 02 Oct 2016 00:46:13 +0000 Subject: [docs] [issue28088] Document Transport.set_protocol and get_protocol Message-ID: <1475369173.63.0.247466795846.issue28088@psf.upfronthosting.co.za> New submission from Mariatta Wijaya: Added the documentation for set_protocol and get_protocol. ---------- keywords: +patch Added file: http://bugs.python.org/file44918/issue28088.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 11:16:57 2016 From: report at bugs.python.org (=?utf-8?q?Micha=C5=82_Klich?=) Date: Sun, 02 Oct 2016 15:16:57 +0000 Subject: [docs] [issue16399] argparse: append action with default list adds to list instead of overriding In-Reply-To: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> Message-ID: <1475421417.38.0.443474097267.issue16399@psf.upfronthosting.co.za> Micha? Klich added the comment: The documentation for argparse still does not mention this behaviour. I decided to make a patch based no the optparse issue. Hopefully it is good enough to be merged. ---------- keywords: +patch nosy: +michal.klich Added file: http://bugs.python.org/file44934/append_to_default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 18:57:36 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 02 Oct 2016 22:57:36 +0000 Subject: [docs] [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1475449056.35.0.335807791219.issue8145@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 19:05:19 2016 From: report at bugs.python.org (paul j3) Date: Sun, 02 Oct 2016 23:05:19 +0000 Subject: [docs] [issue16399] argparse: append action with default list adds to list instead of overriding In-Reply-To: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> Message-ID: <1475449519.43.0.914153568745.issue16399@psf.upfronthosting.co.za> paul j3 added the comment: It may help to know something about how defaults are handled - in general. `add_argument` and `set_defaults` set the `default` attribute of the Action (the object created by `add_argument` to hold all of its information). The default `default` is `None`. At the start of `parse_args`, a fresh Namespace is created, and all defaults are loaded into it (I'm ignoring some details). The argument strings are then parsed, and individual Actions update the Namespace with their values, via their `__call__` method. At the end of parsing it reviews the Namespace. Any remaining defaults that are strings are evaluated (passed through `type` function that converts a commandline string). The handling of defaults threads a fine line between giving you maximum power, and keeping things simple and predictable. The important thing for this issue is that the defaults are loaded into the Namespace at the start of parsing. The `append` call fetches the value from the Namespace, replaces it with `[]` if it is None, appends the new value(s), and puts it back on the Namespace. The first `--foo` append is handled in just the same way as the 2nd and third (fetch, append, and put back). The first can't tell that the list it fetches from the namespace came from the `default` as opposed to a previous `append`. The `__call__` for `append` was intentionally kept simple, and predictable. As I demonstrated earlier it is possible to write an `append` that checks the namespace value against some default, and does something different. But that is more complicated. The simplest alternative to this behavior is to leave the default as None. If after parsing the value is still None, put the desired list (or any other object) there. The primary purpose of the parser is to parse the commandline - to figure out what the user wants to tell you. There's nothing wrong with tweaking (and checking) the `args` Namespace after parsing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 2 20:31:40 2016 From: report at bugs.python.org (paul j3) Date: Mon, 03 Oct 2016 00:31:40 +0000 Subject: [docs] [issue16399] argparse: append action with default list adds to list instead of overriding In-Reply-To: <1351992623.71.0.851432414607.issue16399@psf.upfronthosting.co.za> Message-ID: <1475454700.32.0.885180578725.issue16399@psf.upfronthosting.co.za> paul j3 added the comment: One thing that this default behavior does is allow us to append values to any object, just so long as it has the `append` method. The default does not have to be a standard list. For example, in another bug/issue someone asked for an `extend` action. I could provide that with `append` and a custom list class class MyList(list): def append(self,arg): if isinstance(arg,list): self.extend(arg) else: super(MyList, self).append(arg) This just modifies `append` so that it behaves like `extend` when given a list argument. parser = argparse.ArgumentParser() a = parser.add_argument('-f', action='append', nargs='*',default=[]) args = parser.parse_args('-f 1 2 3 -f 4 5'.split()) produces a nested list: In [155]: args Out[155]: Namespace(f=[['1', '2', '3'], ['4', '5']]) but if I change the `default`: a.default = MyList([]) args = parser.parse_args('-f 1 2 3 -f 4 5'.split()) produces a flat list: In [159]: args Out[159]: Namespace(f=['1', '2', '3', '4', '5']) I've tested this idea with an `array.array` and `set` subclass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 02:05:23 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 03 Oct 2016 06:05:23 +0000 Subject: [docs] [issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation) In-Reply-To: <1445194189.09.0.0973348556564.issue25435@psf.upfronthosting.co.za> Message-ID: <1475474723.12.0.533302252249.issue25435@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 07:44:50 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 03 Oct 2016 11:44:50 +0000 Subject: [docs] [issue28088] Document Transport.set_protocol and get_protocol In-Reply-To: <1475369173.63.0.247466795846.issue28088@psf.upfronthosting.co.za> Message-ID: <1475495090.28.0.607582996614.issue28088@psf.upfronthosting.co.za> INADA Naoki added the comment: lgtm. But I think adding note like following may be helpful to avoid users try switching protocols which protocol author doesn't expect. (I'm not good English writer. I hope someone polish my sentence). .. note:: Generally speaking, switching protocols requires special knowledge about two protocols. For example, old protocol may have inner receive buffer and new protocol should take over it. Transport doesn't take care about such issues. Protocols should support switching protocol using this API. ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 11:59:10 2016 From: report at bugs.python.org (Poren Chiang) Date: Mon, 03 Oct 2016 15:59:10 +0000 Subject: [docs] [issue28348] Doc typo in asyncio.Task Message-ID: <1475510350.17.0.416323283403.issue28348@psf.upfronthosting.co.za> New submission from Poren Chiang: Version: Latest (v3.5.2) Affected module: asyncio (section 18.5) Problem: Under section 18.5.3.5. "Task", The word "completion" is misspelled "completition". > A task is responsible for executing a coroutine object in an event loop. If the wrapped coroutine yields from a future, the task suspends the execution of the wrapped coroutine and waits for the **completition** of the future. When the future is done, the execution of the wrapped coroutine restarts with the result or the exception of the future. Possible fixes: Replace "completition" with "completion". Reference: [1] https://docs.python.org/3/library/asyncio-task.html#task ---------- assignee: docs at python components: Documentation messages: 277962 nosy: RSChiang, docs at python priority: normal severity: normal status: open title: Doc typo in asyncio.Task versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 12:34:18 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 03 Oct 2016 16:34:18 +0000 Subject: [docs] [issue28348] Doc typo in asyncio.Task In-Reply-To: <1475510350.17.0.416323283403.issue28348@psf.upfronthosting.co.za> Message-ID: <1475512458.17.0.0870361285503.issue28348@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks for the report. Seems like easy fix :) I'll work on a patch for this today. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:07:59 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 18:07:59 +0000 Subject: [docs] [issue28349] Issues with PyMemberDef flags Message-ID: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: As documented in Doc/extending/newtypes.rst, the flags field of PyMemberDef must be bitwise-or-ed combination of flag constants READONLY, READ_RESTRICTED, WRITE_RESTRICTED and RESTRICTED. There are problems with this: 1. Actually WRITE_RESTRICTED was renamed to PY_WRITE_RESTRICTED in 2.6 (a8dd8874ff2d). I didn't find mention of this backward incompatible change in Misc/NEWS and whatsnew files. 2. Since the support of restricted mode was removed in 3.x, only READONLY flag has effect. Other flags are still documented and used in CPython sources. I think we should get rid of using these flags and undocument them or document as outdated. 3. As noted by Skip Montanaro on the Python-Dev mailing list, these flags (as well as T_* type tags in Include/structmember.h) should have the PY_ prefix. ---------- assignee: docs at python components: Documentation messages: 277972 nosy: christian.heimes, docs at python, serhiy.storchaka, skip.montanaro priority: normal severity: normal status: open title: Issues with PyMemberDef flags versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:14:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 18:14:17 +0000 Subject: [docs] [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475518457.05.0.330233469266.issue28349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The latter issue is a duplicate of issue2897. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:20:01 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:20:01 +0000 Subject: [docs] [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475518801.55.0.867199987258.issue28349@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> include structmember.h in Python.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:22:39 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 18:22:39 +0000 Subject: [docs] [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475518959.48.0.339333820592.issue28349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: We still should correct the documentation in 2.7 and 3.x. ---------- resolution: duplicate -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:24:50 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:24:50 +0000 Subject: [docs] [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475519090.46.0.693979278806.issue28349@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Serhiy, while I see that you've raised some additional issues here, let's keep the discussion related to Include/structmember.h in one place. I would not mind adding additional affected versions there. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:30:50 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:30:50 +0000 Subject: [docs] [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475519449.99.0.463759159697.issue28349@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: There is also #24065 ("Outdated *_RESTRICTED flags in structmember.h") which I think should be folded into #2897. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:35:06 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Oct 2016 18:35:06 +0000 Subject: [docs] [issue28349] Issues with PyMemberDef flags In-Reply-To: <1475518079.81.0.844864411163.issue28349@psf.upfronthosting.co.za> Message-ID: <1475519706.79.0.468782369043.issue28349@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah this is a duplicate of issue24065! ---------- resolution: -> duplicate stage: needs patch -> resolved status: open -> closed superseder: include structmember.h in Python.h -> Outdated *_RESTRICTED flags in structmember.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 14:50:13 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 03 Oct 2016 18:50:13 +0000 Subject: [docs] [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475520613.26.0.696000687879.issue2897@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Changed the title to reflect the way forward and added affected versions to remember to update the documentation. See #28349 and #24065 for details. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python title: include structmember.h in Python.h -> Deprecate structmember.h versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 17:28:32 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 03 Oct 2016 21:28:32 +0000 Subject: [docs] [issue28130] Document that time.tzset updates time module globals In-Reply-To: <1473782506.71.0.242774514927.issue28130@psf.upfronthosting.co.za> Message-ID: <1475530112.2.0.276774147575.issue28130@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 17:51:04 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 03 Oct 2016 21:51:04 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1475531464.64.0.618027352314.issue26240@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 20:16:34 2016 From: report at bugs.python.org (karl) Date: Tue, 04 Oct 2016 00:16:34 +0000 Subject: [docs] [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. In-Reply-To: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> Message-ID: <1475540192.39.0.946624925438.issue24712@psf.upfronthosting.co.za> karl added the comment: @ezio.melotti What is the next step for getting the patch accepted. ---------- nosy: +karlcow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 23:23:35 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 03:23:35 +0000 Subject: [docs] [issue28348] Doc typo in asyncio.Task In-Reply-To: <1475510350.17.0.416323283403.issue28348@psf.upfronthosting.co.za> Message-ID: <1475551415.83.0.74912244534.issue28348@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: fixed the typo as reported. ---------- keywords: +patch Added file: http://bugs.python.org/file44948/issue28348.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 3 23:48:25 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 03:48:25 +0000 Subject: [docs] [issue26149] Suggest PyCharm Community as an editor for Unix platforms In-Reply-To: <1453153728.95.0.733172914649.issue26149@psf.upfronthosting.co.za> Message-ID: <1475552905.07.0.0809229456682.issue26149@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: ping :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 01:47:43 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 05:47:43 +0000 Subject: [docs] [issue26149] Suggest PyCharm Community as an editor for Unix platforms In-Reply-To: <1453153728.95.0.733172914649.issue26149@psf.upfronthosting.co.za> Message-ID: <1475560062.94.0.508158501964.issue26149@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks for the feedback, Berker. I updated the patch as suggested. ---------- Added file: http://bugs.python.org/file44949/issue26149.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 04:55:53 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 08:55:53 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571353.64.0.612205610249.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- nosy: +jaysinh.shukla _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:00:41 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:00:41 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571641.87.0.0771519060925.issue28315@psf.upfronthosting.co.za> Jaysinh shukla added the comment: According to this email, conversation with Terry, https://mail.python.org/mailman/private/core-mentorship/2016-October/003662.html adding patch for `Doc/library/ctypes.rst` ---------- hgrepos: +357 Added file: http://bugs.python.org/file44951/Doc_library_ctypes_rst_default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:01:53 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:01:53 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571713.46.0.0157075356516.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- hgrepos: +358 Added file: http://bugs.python.org/file44952/Doc_library_ctypes_rst_version_2_7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:02:01 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:02:01 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571721.4.0.513016697974.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- hgrepos: -358 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:02:05 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:02:05 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571725.34.0.39464076111.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : ---------- hgrepos: -357 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:02:22 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:02:22 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571742.04.0.497361263561.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44953/Doc_library_ctypes_rst_version_3_5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:03:03 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:03:03 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571783.67.0.365795909765.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44954/Doc_library_ctypes_rst_version_3_6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:03:39 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:03:39 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571819.92.0.316958846582.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44955/other_rst_default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:03:54 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:03:54 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571834.8.0.40142063162.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44956/other_rst_version_2_7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:04:01 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:04:01 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571841.55.0.356476295962.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44957/other_rst_version_3_5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:04:09 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:04:09 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571849.95.0.738354305925.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44958/other_rst_version_3_6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 05:06:16 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Tue, 04 Oct 2016 09:06:16 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475571976.65.0.883814342608.issue28315@psf.upfronthosting.co.za> Jaysinh shukla added the comment: @Treyy: I have uploaded patches according to your comment at Core mentorship here (https://mail.python.org/mailman/private/core-mentorship/2016-October/003662.html) `Since I applied the patch, I can say in in this particular case, re-open, preferably with one or more patches. I intended to include all changes needed, at least for .rst files, and grepped with IDLE's re-based grep, but missed most of what you listed. I probably started in the wrong directory. But exclude 1. the .rej files, which are not tracked, and which you should delete. 2. the old 'What's New' files, where 'in ?' is likely correct. 3. the includes/text/py files, for reasons given in the issue. 4. the other .py files, like test_generators.py, at least initially, until it is determined why they are not failing if incorrect. Left are *.rst. At least some of the code should be run to verify that the proposed changes are correct. I would not mind a separate patch for ctypes.rst, which has half the hits. If you only reopen and do not do a patch, please copy these comments into the issue.` Please change the status of issue to `open` from `close`. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 08:05:23 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 12:05:23 +0000 Subject: [docs] [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475582723.59.0.597251655926.issue2897@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 11:25:32 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Oct 2016 15:25:32 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475594732.99.0.421332497346.issue28315@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:44:20 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Oct 2016 17:44:20 +0000 Subject: [docs] [issue28348] Doc typo in asyncio.Task In-Reply-To: <1475510350.17.0.416323283403.issue28348@psf.upfronthosting.co.za> Message-ID: <20161004174416.85846.38709.89A81B62@psf.io> Roundup Robot added the comment: New changeset 8c8692da071a by Berker Peksag in branch '3.5': Issue #28348: Fix typo in asyncio.Task() documentation https://hg.python.org/cpython/rev/8c8692da071a New changeset 99c37fa72b66 by Berker Peksag in branch '3.6': Issue #28348: Merge from 3.5 https://hg.python.org/cpython/rev/99c37fa72b66 New changeset 76591498aab7 by Berker Peksag in branch 'default': Issue #28348: Merge from 3.6 https://hg.python.org/cpython/rev/76591498aab7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 13:44:55 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 04 Oct 2016 17:44:55 +0000 Subject: [docs] [issue28348] Doc typo in asyncio.Task In-Reply-To: <1475510350.17.0.416323283403.issue28348@psf.upfronthosting.co.za> Message-ID: <1475603095.01.0.355211810698.issue28348@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From mariatta.wijaya at gmail.com Tue Oct 4 14:52:21 2016 From: mariatta.wijaya at gmail.com (mariatta.wijaya at gmail.com) Date: Tue, 04 Oct 2016 18:52:21 -0000 Subject: [docs] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial (issue 28315) Message-ID: <20161004185221.1740.51566@psf.upfronthosting.co.za> Thanks for the patches, Jaysinh. In some of these patches, the word 'in' is missing. For example, it should have been ... line 1, in instead, I'm seeing ... line 1, Thanks :) http://bugs.python.org/review/28315/diff/18761/Doc/library/ctypes.rst File Doc/library/ctypes.rst (right): http://bugs.python.org/review/28315/diff/18761/Doc/library/ctypes.rst#newcode100 Doc/library/ctypes.rst:100: File "", line 1, The word 'in' is missing, eg File "", line 1, in http://bugs.python.org/review/28315/diff/18762/Doc/library/ctypes.rst File Doc/library/ctypes.rst (right): http://bugs.python.org/review/28315/diff/18762/Doc/library/ctypes.rst#newcode90 Doc/library/ctypes.rst:90: File "", line 1, Should be in http://bugs.python.org/review/28315/diff/18763/Doc/library/ctypes.rst File Doc/library/ctypes.rst (right): http://bugs.python.org/review/28315/diff/18763/Doc/library/ctypes.rst#newcode100 Doc/library/ctypes.rst:100: File "", line 1, It should say ", in " http://bugs.python.org/review/28315/ From report at bugs.python.org Tue Oct 4 15:58:20 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 04 Oct 2016 19:58:20 +0000 Subject: [docs] [issue17188] Document 'from None' in raise statement doc. In-Reply-To: <1360631999.8.0.76627095073.issue17188@psf.upfronthosting.co.za> Message-ID: <1475611100.54.0.213412209104.issue17188@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 4 19:13:29 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Oct 2016 23:13:29 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475622809.33.0.265465194558.issue28315@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Jaysinh, unless a patch for 3.5 does not cleanly apply to 3.6, or the patch must be different in 3.6*, no 3.6 patch is needed. Ditto for 3.7/default. Mariatta's patch merged forward without problem. *In this case, 'must be different' would be because there are different code examples. The same is true for 2.7 if the 3.x patch applies cleanly there (though this is less common there). Mariatta's patch also applied to 2.7, though as I reported, I found one more change for 2.7. So when you revise in response to comments, one of each patch is enough unless you know more are needed, in which case say so. If there are problems forward-merging the other_rst patch, please report first before preparing a 3.6 patch. If there were a problem with just one of the files, I would prpbably want a 3.6 patch just for the one file. I discovered a deeper problem. In spite of the doctest annotations, the doctests is not run on the ctypes doc and at least one of the tracebacks is wrong. >>> windll.kernel32.GetModuleHandleA() # doctest: +WINDOWS Traceback (most recent call last): File "", line 1, in ? ValueError: Procedure probably called with not enough arguments (4 bytes missing) >>> windll.kernel32.GetModuleHandleA(0, 0) # doctest: +WINDOWS Traceback (most recent call last): File "", line 1, in ? ValueError: Procedure probably called with too many arguments (4 bytes in excess) whereas, on Win10, 3.5 >>> from ctypes import * >>> windll.kernel32.GetModuleHandleA() 0 >>> windll.kernel32.GetModuleHandleA(0, 0) 480968704 However, when I ran make doctest, these did not show up, but they were not run. I will worry about this as a separate issue. >>> windll.kernel32.GetModuleHandleA() 477822976 >>> windll.kernel32.GetModuleHandleA(0, 0) 477822976 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 00:20:52 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 05 Oct 2016 04:20:52 +0000 Subject: [docs] [issue26869] unittest longMessage docs In-Reply-To: <1461743267.94.0.620093650485.issue26869@psf.upfronthosting.co.za> Message-ID: <1475641252.52.0.189478661118.issue26869@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, please review the updated documentation. Thanks. ---------- keywords: +patch Added file: http://bugs.python.org/file44965/issue26869.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 01:56:10 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 05 Oct 2016 05:56:10 +0000 Subject: [docs] [issue28362] Deprecation warning doesn't stand out enough Message-ID: <1475646970.65.0.933224265007.issue28362@psf.upfronthosting.co.za> New submission from Mariatta Wijaya: In documentation for python 3.3, the deprecation warning is rendered in a red box which is more eye-catching. eg https://docs.python.org/3.3/library/imp.html?highlight=imp#module-imp But since python 3.4 onwards, seems like the red box disappears and the deprecation warning message no longer stands out. for example https://docs.python.org/3.4/library/imp.html?highlight=imp#module-imp I kinda prefer like the older style (with the red box). ---------- assignee: docs at python components: Documentation messages: 278103 nosy: Mariatta, docs at python priority: normal severity: normal status: open title: Deprecation warning doesn't stand out enough versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From mariatta.wijaya at gmail.com Wed Oct 5 01:58:24 2016 From: mariatta.wijaya at gmail.com (mariatta.wijaya at gmail.com) Date: Wed, 05 Oct 2016 05:58:24 -0000 Subject: [docs] "CPython implementation detail:" is removed when contents is translated (issue 28331) Message-ID: <20161005055824.11329.90153@psf.upfronthosting.co.za> http://bugs.python.org/review/28331/diff/18722/Doc/tools/extensions/pyspecific.py File Doc/tools/extensions/pyspecific.py (right): http://bugs.python.org/review/28331/diff/18722/Doc/tools/extensions/pyspecific.py#newcode24 Doc/tools/extensions/pyspecific.py:24: import sphinx.locale seems like it's more of a common pattern to do: from sphinx.locale import translators and then line 112 can become: label = translators['sphinx'].gettext(self.label_text) but maybe I'm too nitpicky :) http://bugs.python.org/review/28331/diff/18722/Doc/tools/extensions/pyspecific.py#newcode124 Doc/tools/extensions/pyspecific.py:124: pnode[0].replace_self(nodes.paragraph('', '', content, translatable=False)) The line is kinda long. Do you think it could be broken using continuation line? Thanks. http://bugs.python.org/review/28331/ From report at bugs.python.org Wed Oct 5 02:29:25 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 05 Oct 2016 06:29:25 +0000 Subject: [docs] [issue28362] Deprecation warning doesn't stand out enough In-Reply-To: <1475646970.65.0.933224265007.issue28362@psf.upfronthosting.co.za> Message-ID: <1475648965.28.0.980201878311.issue28362@psf.upfronthosting.co.za> INADA Naoki added the comment: default.css was changed? https://docs.python.org/3.3/_static/default.css https://docs.python.org/3.4/_static/default.css ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 02:32:33 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 06:32:33 +0000 Subject: [docs] [issue28362] Deprecation warning doesn't stand out enough In-Reply-To: <1475646970.65.0.933224265007.issue28362@psf.upfronthosting.co.za> Message-ID: <1475649153.82.0.40044662292.issue28362@psf.upfronthosting.co.za> Berker Peksag added the comment: It was rendered in a red box, because we were using an old Sphinx CSS file (Doc/tools/static/basic.css) [1] We are using Sphinx defaults now and Python specific tweaks are located at Doc/tools/pydoctheme/static/pydoctheme.css. We usually prefer to use less disruptive visual elements (including using less gray note directives) in Python documentation. The exception to this is security warnings. See https://docs.python.org/3.5/library/xml.html and https://docs.python.org/3.5/library/ssl.html for example. I recommend to close this as "wont fix". [1] Removed in https://github.com/python/cpython/commit/7c366a72ac56814edaf3fb2718b08441aff31d3a ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 02:43:11 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 06:43:11 +0000 Subject: [docs] [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475649791.56.0.162942909495.issue28331@psf.upfronthosting.co.za> Berker Peksag added the comment: Does Sphinx use a dummy HTML file like you did in the patch? ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 02:50:42 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 05 Oct 2016 06:50:42 +0000 Subject: [docs] [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475650242.69.0.854774835236.issue28331@psf.upfronthosting.co.za> INADA Naoki added the comment: Yes. Actually speaking, this patch is almost copy from VersionChanged directive. See here: https://github.com/sphinx-doc/sphinx/blob/master/sphinx/directives/other.py#L216-L221 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:01:26 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 07:01:26 +0000 Subject: [docs] [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475650886.24.0.512613101867.issue28331@psf.upfronthosting.co.za> Berker Peksag added the comment: I couldn't find any dummy HTML in the Sphinx codebase. Wouldn't something like work without a dummy HTML? from sphinx.locale import versionlabels, l_ versionlabels['cpythonimpldetail'] = l_('CPython implementation detail') Then use it in ImplementationDetail.run() method like https://github.com/sphinx-doc/sphinx/blob/master/sphinx/directives/other.py#L204 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:11:58 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 05 Oct 2016 07:11:58 +0000 Subject: [docs] [issue17188] Document 'from None' in raise statement doc. In-Reply-To: <1360631999.8.0.76627095073.issue17188@psf.upfronthosting.co.za> Message-ID: <1475651518.11.0.212315899784.issue17188@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: reuploaded thomir's patch issue17188_3.4.patch as is. I take no credit for this. ---------- Added file: http://bugs.python.org/file44967/issue17188_by_thomir.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:14:34 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 05 Oct 2016 07:14:34 +0000 Subject: [docs] [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475651674.76.0.0638184058689.issue28331@psf.upfronthosting.co.za> INADA Naoki added the comment: Ah, I misunderstood your comment is about Sphinx's internal DOM. Sphinx has own pot and po files. In case of custom extension, `sphinx-build -b gettext` doesn't extract messages from Python code. That's why I used dummy html template. Another way is adding custom make target, which runs `sphinx-build -b gettext` and custom command to generate another pot from pyspecific extension. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 03:50:38 2016 From: report at bugs.python.org (INADA Naoki) Date: Wed, 05 Oct 2016 07:50:38 +0000 Subject: [docs] [issue28331] "CPython implementation detail:" is removed when contents is translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475653838.75.0.314981846178.issue28331@psf.upfronthosting.co.za> Changes by INADA Naoki : Added file: http://bugs.python.org/file44969/impl-detail2.patch _______________________________________ Python tracker _______________________________________ From songofacandy at gmail.com Wed Oct 5 03:51:09 2016 From: songofacandy at gmail.com (songofacandy at gmail.com) Date: Wed, 05 Oct 2016 07:51:09 -0000 Subject: [docs] "CPython implementation detail:" is removed when contents is translated (issue 28331) Message-ID: <20161005075109.8070.84959@psf.upfronthosting.co.za> Reviewers: Mariatta, Message: Thanks. http://bugs.python.org/review/28331/diff/18722/Doc/tools/extensions/pyspecific.py File Doc/tools/extensions/pyspecific.py (right): http://bugs.python.org/review/28331/diff/18722/Doc/tools/extensions/pyspecific.py#newcode24 Doc/tools/extensions/pyspecific.py:24: import sphinx.locale On 2016/10/05 07:58:24, Mariatta wrote: > seems like it's more of a common pattern to do: > > from sphinx.locale import translators > > and then line 112 can become: > > label = translators['sphinx'].gettext(self.label_text) > > but maybe I'm too nitpicky :) Done. http://bugs.python.org/review/28331/diff/18722/Doc/tools/extensions/pyspecific.py#newcode124 Doc/tools/extensions/pyspecific.py:124: pnode[0].replace_self(nodes.paragraph('', '', content, translatable=False)) On 2016/10/05 07:58:24, Mariatta wrote: > The line is kinda long. > Do you think it could be broken using continuation line? > > Thanks. Done. Please review this at http://bugs.python.org/review/28331/ Affected files: Doc/tools/extensions/pyspecific.py Doc/tools/templates/dummy.html diff -r 02eb35b79af0 Doc/tools/extensions/pyspecific.py --- a/Doc/tools/extensions/pyspecific.py Wed Sep 28 21:57:25 2016 -0400 +++ b/Doc/tools/extensions/pyspecific.py Sat Oct 01 22:25:22 2016 +0900 @@ -21,6 +21,7 @@ from sphinx import addnodes from sphinx.builders import Builder +import sphinx.locale from sphinx.util.nodes import split_explicit_title from sphinx.util.compat import Directive from sphinx.writers.html import HTMLTranslator @@ -103,16 +104,24 @@ optional_arguments = 1 final_argument_whitespace = True + # This text is copied to templates/dummy.html + label_text = 'CPython implementation detail:' + def run(self): pnode = nodes.compound(classes=['impl-detail']) + label = sphinx.locale.translators['sphinx'].gettext(self.label_text) content = self.content - add_text = nodes.strong('CPython implementation detail:', - 'CPython implementation detail:') + add_text = nodes.strong(label, label) if self.arguments: n, m = self.state.inline_text(self.arguments[0], self.lineno) pnode.append(nodes.paragraph('', '', *(n + m))) self.state.nested_parse(content, self.content_offset, pnode) if pnode.children and isinstance(pnode[0], nodes.paragraph): + content = nodes.inline(pnode[0].rawsource, translatable=True) + content.source = pnode[0].source + content.line = pnode[0].line + content += pnode[0].children + pnode[0].replace_self(nodes.paragraph('', '', content, translatable=False)) pnode[0].insert(0, add_text) pnode[0].insert(1, nodes.Text(' ')) else: diff -r 02eb35b79af0 Doc/tools/templates/dummy.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Doc/tools/templates/dummy.html Sat Oct 01 22:25:22 2016 +0900 @@ -0,0 +1,6 @@ +This file is not an actual template, but used to add some +texts in extensions to sphinx.pot file. + +In extensions/pyspecific.py: + +{% trans %}CPython implementation detail:{% endtrans %} From berker.peksag at gmail.com Tue Oct 4 01:31:24 2016 From: berker.peksag at gmail.com (berker.peksag at gmail.com) Date: Tue, 04 Oct 2016 05:31:24 -0000 Subject: [docs] Suggest PyCharm Community as an editor for Unix platforms (issue 26149) Message-ID: <20161004053124.6857.36884@psf.upfronthosting.co.za> http://bugs.python.org/review/26149/diff/18598/Doc/using/unix.rst File Doc/using/unix.rst (right): http://bugs.python.org/review/26149/diff/18598/Doc/using/unix.rst#newcode141 Doc/using/unix.rst:141: Please go to https://wiki.python.org/moin/PythonEditors and We don't usually add raw URLs to prose in Python documentation. It would be nice to convert them to named URLs: Spam `eggs `_ instead of Spam https://www.python.org/eggs/ http://bugs.python.org/review/26149/ From darksidegirl at gmail.com Wed Oct 5 04:50:29 2016 From: darksidegirl at gmail.com (Lidia Martinez) Date: Wed, 5 Oct 2016 10:50:29 +0200 Subject: [docs] Bug on Import statement Message-ID: The link to the article on the import statement: "From a file system perspective, packages are directories and modules are files. The original specification for packages " Does not work. Thanks -- Lidia -------------- next part -------------- An HTML attachment was scrubbed... URL: From darksidegirl at gmail.com Wed Oct 5 04:52:02 2016 From: darksidegirl at gmail.com (Lidia Martinez) Date: Wed, 5 Oct 2016 10:52:02 +0200 Subject: [docs] Bug on Import statement In-Reply-To: References: Message-ID: It is not here anymore: https://www.python.org/doc/essays/ I guess it is part of one of the PEP's now. -- Lidia 2016-10-05 10:50 GMT+02:00 Lidia Martinez : > The link to the article on the import statement: > > "From a file system perspective, packages are directories and modules are > files. The original specification for packages > " Does not work. > > > Thanks > > > > -- > Lidia > -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Wed Oct 5 06:06:39 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Oct 2016 10:06:39 +0000 Subject: [docs] [issue12706] timeout sentinel in ftplib and poplib documentation In-Reply-To: <1312705981.24.0.601234287082.issue12706@psf.upfronthosting.co.za> Message-ID: <1475661999.37.0.400284539476.issue12706@psf.upfronthosting.co.za> Berker Peksag added the comment: Documentation changes look good to me. However, I'd prefer using socket._GLOBAL_DEFAULT_TIMEOUT in the timeout parameter of FTP.connect(). ---------- keywords: +easy nosy: +berker.peksag versions: +Python 3.5, Python 3.6, Python 3.7 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:04:46 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:04:46 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669086.74.0.541857357087.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44970/all_rst_patch_default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:05:54 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:05:54 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669154.82.0.347868718733.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Added file: http://bugs.python.org/file44971/v_2_7_conflict_files.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:07:56 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:07:56 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669276.1.0.533224098995.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44951/Doc_library_ctypes_rst_default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:08:02 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:08:02 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669282.69.0.763504520792.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44952/Doc_library_ctypes_rst_version_2_7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:08:07 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:08:07 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669287.73.0.193092663333.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44953/Doc_library_ctypes_rst_version_3_5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:08:12 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:08:12 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669292.41.0.694270013085.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44954/Doc_library_ctypes_rst_version_3_6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:08:48 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:08:48 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669328.94.0.328133493988.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44955/other_rst_default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:08:54 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:08:54 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669334.26.0.0805122204496.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44956/other_rst_version_2_7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:09:01 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:09:01 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669341.92.0.425034161692.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44957/other_rst_version_3_5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:09:06 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:09:06 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669346.95.0.960713481346.issue28315@psf.upfronthosting.co.za> Changes by Jaysinh shukla : Removed file: http://bugs.python.org/file44958/other_rst_version_3_6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:17:19 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Wed, 05 Oct 2016 12:17:19 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475669839.41.0.097757884942.issue28315@psf.upfronthosting.co.za> Jaysinh shukla added the comment: Hello Terry, According to your instructions I had uploaded two patch files. The file named `all_rst_patch_default.diff` is applicable for version `default`, `3.5`, `3.6` and for most files of `2.7`. The file named `v_2_7_conflict_files.diff` is a correct patch of all rejected files. I have unlinked previous patch files. Please guide me if I had done mistake at any stage. Many Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 08:59:28 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Oct 2016 12:59:28 +0000 Subject: [docs] [issue28362] Deprecation warning doesn't stand out enough In-Reply-To: <1475646970.65.0.933224265007.issue28362@psf.upfronthosting.co.za> Message-ID: <1475672368.13.0.167233151155.issue28362@psf.upfronthosting.co.za> R. David Murray added the comment: Agreed. The removal of the red was a conscious choice. As I remember it, that choice got reflected into the Sphinx defaults, rather than the other way around :) ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 09:38:13 2016 From: report at bugs.python.org (Dima Tisnek) Date: Wed, 05 Oct 2016 13:38:13 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1475674693.83.0.746497619501.issue24632@psf.upfronthosting.co.za> Dima Tisnek added the comment: +1, I too would like to see this documented ---------- nosy: +Dima.Tisnek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 10:33:50 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 05 Oct 2016 14:33:50 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1475678030.21.0.22472804977.issue24632@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 11:18:31 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 05 Oct 2016 15:18:31 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1475680711.29.0.236377599263.issue24632@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yeah, I never found a good place to document this, hence the relatively sparse references in the "using" docs. The most complete official docs for these features are actually in runpy: * https://docs.python.org/3/library/runpy.html#runpy.run_module * https://docs.python.org/3/library/runpy.html#runpy.run_path run_module is a thin wrapper around the same core code that actually implements the -m switch run_path is a Python level reimplementation of the __main__ execution logic There's also http://www.curiousefficiency.org/posts/2011/03/what-is-python-script.html on my blog and the explanation of the options that need to be supported in PEP 432: https://www.python.org/dev/peps/pep-0432/#preparing-the-main-module A lot of the confusion stems from the fact that directory & zipfile execution was added without a PEP back in 2.6 (it was just a normal tracker issue) and we forgot to add it to the What's New document. We hoped the inclusion of the zipapp module in Python 3.5 via PEP 441 might help resolve that lack of awareness, but it doesn't seem to have had much impact. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 11:25:52 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 05 Oct 2016 15:25:52 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1475681152.17.0.451212925956.issue24632@psf.upfronthosting.co.za> Nick Coghlan added the comment: In the same vein of "I never worked out a good offical home for it", a couple of the "Traps for the Unwary" I describe for Python's import system are closely related to __main__ module execution and the impact that has on sys.path and sys.modules: * http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#the-double-import-trap * http://python-notes.curiousefficiency.org/en/latest/python_concepts/import_traps.html#executing-the-main-module-twice ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 12:23:31 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 05 Oct 2016 16:23:31 +0000 Subject: [docs] [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1475684611.78.0.550164542674.issue2897@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a proposed doc patch for Python 3.5+. For 2.7 we should probably just add a versionchanged note explaining "restricted mode" has been deprecated in Python 2.3. ---------- Added file: http://bugs.python.org/file44976/issue2897-docs-3x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 5 17:06:15 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Oct 2016 21:06:15 +0000 Subject: [docs] [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475701575.36.0.272219619848.issue27998@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Tests are passed on Windows. Now we need to document that bytes paths are supported in os.scandir() on Windows since 3.6. ---------- assignee: serhiy.storchaka -> docs at python components: +Documentation -Extension Modules nosy: +docs at python stage: patch review -> needs patch versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 00:17:36 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 04:17:36 +0000 Subject: [docs] [issue27825] Make the documentation for statistics' data argument clearer. In-Reply-To: <1471813007.76.0.49945343113.issue27825@psf.upfronthosting.co.za> Message-ID: <1475727456.74.0.631687424855.issue27825@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Updated the docs and updated the example codes as well. Please review :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file44979/issue27825.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 01:24:06 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 05:24:06 +0000 Subject: [docs] [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1475731446.51.0.84834316483.issue24459@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi Joshua, Seems like your latest patch doesn't apply cleanly to the default branch. Can you rebase and upload a new patch? Thanks. ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 06:54:46 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 06 Oct 2016 10:54:46 +0000 Subject: [docs] [issue26964] Incorrect documentation for `-u`-flag In-Reply-To: <1462467997.8.0.490878249706.issue26964@psf.upfronthosting.co.za> Message-ID: <1475751286.89.0.630875662476.issue26964@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> patch review type: -> behavior versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From storchaka+cpython at gmail.com Wed Oct 5 14:45:26 2016 From: storchaka+cpython at gmail.com (storchaka+cpython at gmail.com) Date: Wed, 05 Oct 2016 18:45:26 -0000 Subject: [docs] include structmember.h in Python.h (issue 2897) Message-ID: <20161005184526.15286.49135@psf.upfronthosting.co.za> http://bugs.python.org/review/2897/diff/18779/Doc/extending/newtypes.rst File Doc/extending/newtypes.rst (right): http://bugs.python.org/review/2897/diff/18779/Doc/extending/newtypes.rst#newcode1155 Doc/extending/newtypes.rst:1155: (defined in the :file:`structmember.h` header), the attribute is read-only; otherwise Too long line. http://bugs.python.org/review/2897/diff/18779/Doc/extending/newtypes.rst#newcode1156 Doc/extending/newtypes.rst:1156: it should be set to `0`. ``0`` http://bugs.python.org/review/2897/ From report at bugs.python.org Thu Oct 6 15:34:45 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 19:34:45 +0000 Subject: [docs] [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <1475782485.14.0.322416887174.issue18789@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 15:36:18 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 19:36:18 +0000 Subject: [docs] [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <1475782578.11.0.044791713067.issue18789@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: I'll work on this :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 18:47:01 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Thu, 06 Oct 2016 22:47:01 +0000 Subject: [docs] [issue28206] signal.Signals not documented In-Reply-To: <1474297204.47.0.613989661481.issue28206@psf.upfronthosting.co.za> Message-ID: <1475794021.83.0.880796866081.issue28206@psf.upfronthosting.co.za> Changes by Mariatta Wijaya : ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 6 23:33:09 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 07 Oct 2016 03:33:09 +0000 Subject: [docs] [issue21443] asyncio logging documentation clarifications In-Reply-To: <1399321197.68.0.955361534546.issue21443@psf.upfronthosting.co.za> Message-ID: <1475811189.75.0.166543249211.issue21443@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, I added the paragraph explaining how to change the log level for asyncio. Please check it out. Thanks :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file44992/issue21443.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 00:37:23 2016 From: report at bugs.python.org (Kevin Norris) Date: Fri, 07 Oct 2016 04:37:23 +0000 Subject: [docs] [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal Message-ID: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> New submission from Kevin Norris: The documentation for __hash__ contains this text: "The only required property is that objects which compare equal have the same hash value; it is advised to somehow mix together (e.g. using exclusive or) the hash values for the components of the object that also play a part in comparison of objects." The recommendation of "using exclusive or" is likely to result in programmers naively doing this: def __hash__(self): return hash(self.thing1) ^ hash(self.thing2) ^ hash(self.thing3) In the event that (say) self.thing1 and self.thing2 have almost or exactly the same hash (with "almost" referring to bitwise differences rather than integral distance), this wipes out most or all of the entropy from both values and greatly increases the likelihood of hash collisions. Indeed, Python's own tuple type does not do this (while it does use XOR, it also does some other math to ensure the bits are as mixed up as is practical).[1] Because the correct algorithm is both nontrivial to implement and already exists in the tuple type's __hash__, I propose that the documentation be updated to recommend something like the following: def __hash__(self): return hash((self.thing1, self.thing2, self.thing3)) One possible wording: "The only required property is that objects which compare equal have the same hash value; it is advised to mix together the hash values of the components of the object that also play a part in comparison of objects by packing them into a tuple and hashing the tuple: [code example]" [1]: https://hg.python.org/cpython/file/fca5c4a63251/Objects/tupleobject.c#l348 ---------- assignee: docs at python components: Documentation messages: 278229 nosy: Kevin.Norris, docs at python priority: normal severity: normal status: open title: __hash__ documentation recommends naive XOR to combine but this is suboptimal type: performance versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 00:48:39 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 07 Oct 2016 04:48:39 +0000 Subject: [docs] [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <1475815719.26.0.919631451406.issue18789@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi, here is the patch. I followed Raymond's suggestion to use 'vulnerable' or 'safe' instead of the original 'True' or 'False'. Please check it out. Thanks :) ---------- keywords: +patch Added file: http://bugs.python.org/file44994/issue18789.patch _______________________________________ Python tracker _______________________________________ From jaysinhp at gmail.com Fri Oct 7 03:14:27 2016 From: jaysinhp at gmail.com (jaysinhp at gmail.com) Date: Fri, 07 Oct 2016 07:14:27 -0000 Subject: [docs] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial (issue 28315) Message-ID: <20161007071427.10512.20213@psf.upfronthosting.co.za> On 2016/10/04 20:52:21, Mariatta wrote: > Thanks for the patches, Jaysinh. > > In some of these patches, the word 'in' is missing. > > For example, it should have been > ... line 1, in > > instead, I'm seeing > ... line 1, > > Thanks :) > > http://bugs.python.org/review/28315/diff/18761/Doc/library/ctypes.rst > File Doc/library/ctypes.rst (right): > > http://bugs.python.org/review/28315/diff/18761/Doc/library/ctypes.rst#newcode100 > Doc/library/ctypes.rst:100: File "", line 1, > The word 'in' is missing, > eg > File "", line 1, in > > http://bugs.python.org/review/28315/diff/18762/Doc/library/ctypes.rst > File Doc/library/ctypes.rst (right): > > http://bugs.python.org/review/28315/diff/18762/Doc/library/ctypes.rst#newcode90 > Doc/library/ctypes.rst:90: File "", line 1, > Should be > in > > http://bugs.python.org/review/28315/diff/18763/Doc/library/ctypes.rst > File Doc/library/ctypes.rst (right): > > http://bugs.python.org/review/28315/diff/18763/Doc/library/ctypes.rst#newcode100 > Doc/library/ctypes.rst:100: File "", line 1, > It should say ", in " Hello Maroatta, Thanks for reviewing my patches. I have uploaded the new patches. Could you please review them again? Many thanks! http://bugs.python.org/review/28315/ From report at bugs.python.org Fri Oct 7 12:29:00 2016 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 07 Oct 2016 16:29:00 +0000 Subject: [docs] [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal In-Reply-To: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> Message-ID: <1475857740.69.0.539495868773.issue28383@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 12:30:07 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 07 Oct 2016 16:30:07 +0000 Subject: [docs] [issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial In-Reply-To: <1475194645.41.0.947079052008.issue28315@psf.upfronthosting.co.za> Message-ID: <1475857807.66.0.590186376559.issue28315@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hi Jaysinh, I reviewed your changes, they look good to me. I can't approve it, so it would still be good for a core dev here to take another pass. Thanks :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 12:38:45 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 07 Oct 2016 16:38:45 +0000 Subject: [docs] [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal In-Reply-To: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> Message-ID: <1475858324.98.0.165462113525.issue28383@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This makes sense. Note that this is the way hashes are implemented for the datetime objects: . ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 12:50:32 2016 From: report at bugs.python.org (Daniel Moisset) Date: Fri, 07 Oct 2016 16:50:32 +0000 Subject: [docs] [issue28386] Improve documentation about tzinfo.dst(None) Message-ID: <1475859032.48.0.21993169144.issue28386@psf.upfronthosting.co.za> New submission from Daniel Moisset: The datetime module documentation[1] describes the tzinfo.dst method with a single "dt" argument without being too explicit about possible values for it. The implication is that dt should be a datetime object, but the implementation of time.dst() [2] actually calls tz.dst(None) (where tz is an instance of some tzinfo subclass), so this should clarify that None is an allowed value. Also, some of the examples given below in the same document (like LocalTimezone, GMT1, GMT2) actually have a related bug (it doesn't handle a None value correctly). So running >>> ... # copy the example from the documentation >>> t = time(tzinfo=LocalTimeZone()) >>> t.dst() crashes with an AttributeError: 'NoneType' object has no attribute 'year'. This kind of bugs have propagated to some other projects already [2]. Some of the other examples (like USTimeZone) seem to be OK What I think would be desirable here is: * A clarification on https://docs.python.org/3.5/library/datetime.html#datetime.tzinfo.dst indicating that dt is either a datetime or a None, in which situations it can be None, and what is the method supposed to return in this case. * Fixes in the code examples that reflect this I would offer a patch, but I'm not quite sure of what the desired behaviour is so I wouldn't know what to document :) [1] https://docs.python.org/3.5/library/datetime.html [2] https://github.com/python/cpython/blob/master/Modules/_datetimemodule.c#L3623 [3] https://github.com/django/django/blob/1.10.2/django/utils/timezone.py#L111 ---------- assignee: docs at python components: Documentation messages: 278256 nosy: Daniel Moisset, docs at python priority: normal severity: normal status: open title: Improve documentation about tzinfo.dst(None) _______________________________________ Python tracker _______________________________________ From efm-pythonbugs at tummy.com Fri Oct 7 13:18:33 2016 From: efm-pythonbugs at tummy.com (efm-pythonbugs at tummy.com) Date: Fri, 07 Oct 2016 17:18:33 -0000 Subject: [docs] Make the documentation for statistics' data argument clearer. (issue 27825) Message-ID: <20161007171833.10737.92182@psf.upfronthosting.co.za> New examples using Fraction look good. Sequence or iterator change also good. Modifying numeric to become real-valued is a significant change in meaning. It's more specific than is needed. http://bugs.python.org/review/27825/diff/18782/Doc/library/statistics.rst File Doc/library/statistics.rst (right): http://bugs.python.org/review/27825/diff/18782/Doc/library/statistics.rst#newcode151 Doc/library/statistics.rst:151: *data* can be a sequence or iterator of real-valued numbers. Adding 'sequence or iterator' is the wanted change, changing 'numeric' to 'real-valued' changes the meaning. Real-valued is more specific than numeric. For example, does median work with complex numbers? with integers? http://bugs.python.org/review/27825/diff/18782/Doc/library/statistics.rst#newcode163 Doc/library/statistics.rst:163: >>> median([F(3, 7), F(1, 21), F(5, 3), F(1, 3)]) This is a nice choice of an example. http://bugs.python.org/review/27825/diff/18782/Doc/library/statistics.rst#newcode183 Doc/library/statistics.rst:183: :exc:`StatisticsError` is raised. *data* can be a sequence or iterator See my comment above. Real-valued may be too specific. http://bugs.python.org/review/27825/ From mariatta.wijaya at gmail.com Fri Oct 7 13:29:06 2016 From: mariatta.wijaya at gmail.com (mariatta.wijaya at gmail.com) Date: Fri, 07 Oct 2016 17:29:06 -0000 Subject: [docs] Make the documentation for statistics' data argument clearer. (issue 27825) Message-ID: <20161007172906.25945.84804@psf.upfronthosting.co.za> Thanks for the feedback. I will update based on your suggestion. http://bugs.python.org/review/27825/diff/18782/Doc/library/statistics.rst File Doc/library/statistics.rst (right): http://bugs.python.org/review/27825/diff/18782/Doc/library/statistics.rst#newcode151 Doc/library/statistics.rst:151: *data* can be a sequence or iterator of real-valued numbers. On 2016/10/07 19:18:33, efm wrote: > Adding 'sequence or iterator' is the wanted change, changing 'numeric' to > 'real-valued' changes the meaning. > Real-valued is more specific than numeric. > For example, does median work with complex numbers? with integers? Thanks for the feedback! I think you are right on this. I will make the change :) http://bugs.python.org/review/27825/ From report at bugs.python.org Fri Oct 7 13:37:41 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Oct 2016 17:37:41 +0000 Subject: [docs] [issue28386] Improve documentation about tzinfo.dst(None) In-Reply-To: <1475859032.48.0.21993169144.issue28386@psf.upfronthosting.co.za> Message-ID: <1475861861.4.0.546794852272.issue28386@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 13:55:11 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 07 Oct 2016 17:55:11 +0000 Subject: [docs] [issue28386] Improve documentation about tzinfo.dst(None) In-Reply-To: <1475859032.48.0.21993169144.issue28386@psf.upfronthosting.co.za> Message-ID: <1475862911.11.0.464319402428.issue28386@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: None is passed to tzinfo.dst() when it is called from time.dst() method. This is documented in the relevant section: . I am not sure whether if it is worth repeating in the abstract tzinfo class documentation, but if we do, the same should be done for the utcoffset() and tzname() methods which also get None when called from namesake time methods. While we are at it, we should also do something about "If utcoffset() does not return None, dst() should not return None either." mandate in the tzinfo.utcoffset() documentation. See . This mandate is violated by the datetime.timezone class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 7 17:47:44 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Oct 2016 21:47:44 +0000 Subject: [docs] [issue28331] "CPython implementation detail:" removed when content translated In-Reply-To: <1475328552.4.0.631332821236.issue28331@psf.upfronthosting.co.za> Message-ID: <1475876864.68.0.507427484651.issue28331@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I abbreviated title to make most of it visible in listings. ---------- nosy: +terry.reedy title: "CPython implementation detail:" is removed when contents is translated -> "CPython implementation detail:" removed when content translated _______________________________________ Python tracker _______________________________________ From steve+python at pearwood.info Fri Oct 7 19:50:48 2016 From: steve+python at pearwood.info (steve+python at pearwood.info) Date: Fri, 07 Oct 2016 23:50:48 -0000 Subject: [docs] Make the documentation for statistics' data argument clearer. (issue 27825) Message-ID: <20161007235048.17857.28824@psf.upfronthosting.co.za> > Adding 'sequence or iterator' is the wanted change, changing 'numeric' to > 'real-valued' changes the meaning. > Real-valued is more specific than numeric. > For example, does median work with complex numbers? with integers? Median requires that the data is sorted, which is undefined for complex numbers, so median won't work with complex numbers. Mathematically "real-valued" is correct and includes integers. Unfortunately Decimal is not fully part of the numeric tower in Python, a Decimal is a numbers.Number but not numbers.Real. I think it best if the median* functions refer to "non-complex numeric data". http://bugs.python.org/review/27825/ From report at bugs.python.org Fri Oct 7 19:56:54 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 07 Oct 2016 23:56:54 +0000 Subject: [docs] [issue28388] Update documentation for typing module Message-ID: <1475884610.88.0.342172022706.issue28388@psf.upfronthosting.co.za> New submission from Ivan Levkivskyi: Here is the patch with updates according to recent changes in typing module and PEP 484: - most things are not classes now - outcome of parameterizing generics is cached - Union does not unify everything with Any - few minor fixes This patch also fixes http://bugs.python.org/issue27588 The attached patch is generated for 3.5 ---------- assignee: docs at python components: Documentation files: doc-typing-patch.diff keywords: patch messages: 278283 nosy: docs at python, gvanrossum, levkivskyi priority: normal severity: normal status: open title: Update documentation for typing module versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file45007/doc-typing-patch.diff _______________________________________ Python tracker _______________________________________ From steve+python at pearwood.info Fri Oct 7 20:20:06 2016 From: steve+python at pearwood.info (steve+python at pearwood.info) Date: Sat, 08 Oct 2016 00:20:06 -0000 Subject: [docs] Make the documentation for statistics' data argument clearer. (issue 27825) Message-ID: <20161008002006.25945.62921@psf.upfronthosting.co.za> Thanks for the patch Mariatta. The addition of "a sequence or iterator" is good. I dislike the median_grouped() example and would like to see one which uses more plausible data values. http://bugs.python.org/review/27825/diff/18782/Doc/library/statistics.rst File Doc/library/statistics.rst (right): http://bugs.python.org/review/27825/diff/18782/Doc/library/statistics.rst#newcode241 Doc/library/statistics.rst:241: >>> median_grouped([F(55, 7), F(52, 3), F(53, 3), F(5, 3)]) I dislike this example as it is misleading. median_grouped() will work with arbitrary numbers, as in this example, but the intention is that the numbers are the mid-point of data classes, often called "class marks". So you should expect that the data are equally-spaced values (median_grouped assumes a class interval of 1 by default, but it can be changed). Examples should be equally-spaced (possibly with gaps -- it is okay if a class has no values). Although median_grouped() will work with Fractions, I think it is unlikely that anyone would give it actual data in Fractions. I'd prefer to see more realistic examples: ints, floats or Decimals. Perhaps the documentation needs to define the relevant statistics terminology? "Class interval", "class mark", "class limits". See: http://mathworld.wolfram.com/ClassMark.html http://bugs.python.org/review/27825/ From report at bugs.python.org Sat Oct 8 03:23:24 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 07:23:24 +0000 Subject: [docs] [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475911404.35.0.345034906028.issue27998@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Hmm, tests are passed on some Windows buildbots, but failed on others. http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/1631/steps/test/logs/stdio ====================================================================== ERROR: test_walk_topdown (test.test_os.BytesWalkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_os.py", line 890, in test_walk_topdown all = list(self.walk(self.walk_path)) File "D:\buildarea\3.x.bolen-windows10\build\lib\test\test_os.py", line 1055, in walk for broot, bdirs, bfiles in os.walk(os.fsencode(top), **kwargs): File "D:\buildarea\3.x.bolen-windows10\build\lib\os.py", line 409, in walk yield from walk(new_path, topdown, onerror, followlinks) File "D:\buildarea\3.x.bolen-windows10\build\lib\os.py", line 367, in walk is_dir = entry.is_dir() TypeError: bad argument type for built-in operation ---------------------------------------------------------------------- The error message is not very informative. Seems like some C API function takes an argument of wrong type (e.g. bytes instead of unicode). ---------- nosy: +ned.deily priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 03:53:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 07:53:17 +0000 Subject: [docs] [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475913197.92.0.109867672445.issue27998@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I suppose the following patch should fix the issue. Could anybody please test it on Windows? ---------- assignee: docs at python -> serhiy.storchaka stage: needs patch -> patch review Added file: http://bugs.python.org/file45009/direntry_bytes_path.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 07:53:34 2016 From: report at bugs.python.org (Attila Vangel) Date: Sat, 08 Oct 2016 11:53:34 +0000 Subject: [docs] [issue28389] xmlrpc.client HTTP proxy example code does not work Message-ID: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> New submission from Attila Vangel: Go to https://docs.python.org/3/library/xmlrpc.client.html Under '21.26.8. Example of Client Usage' -> 'To access an XML-RPC server through a HTTP proxy, you need to define a custom transport. The following example shows how:' copy the example code to a .py file (for me it is easier than REPL), e.g. xmlrpc_client_http_proxy_test.py This is the example code: import xmlrpc.client, http.client class ProxiedTransport(xmlrpc.client.Transport): def set_proxy(self, proxy): self.proxy = proxy def make_connection(self, host): self.realhost = host h = http.client.HTTPConnection(self.proxy) return h def send_request(self, connection, handler, request_body, debug): connection.putrequest("POST", 'http://%s%s' % (self.realhost, handler)) def send_host(self, connection, host): connection.putheader('Host', self.realhost) p = ProxiedTransport() p.set_proxy('proxy-server:8080') server = xmlrpc.client.ServerProxy('http://time.xmlrpc.com/RPC2', transport=p) print(server.currentTime.getCurrentTime()) I changed the 'proxy-server:8080' to '10.144.1.11:8080' which is a valid HTTP/HTTPS proxy in company I work for. Try to run this code: $ python3 xmlrpc_client_http_proxy_test.py Traceback (most recent call last): File "xmlrpc_client_http_proxy_test.py", line 21, in print(server.currentTime.getCurrentTime()) File "/usr/lib/python3.5/xmlrpc/client.py", line 1092, in __call__ return self.__send(self.__name, args) File "/usr/lib/python3.5/xmlrpc/client.py", line 1432, in __request verbose=self.__verbose File "/usr/lib/python3.5/xmlrpc/client.py", line 1134, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib/python3.5/xmlrpc/client.py", line 1146, in single_request http_conn = self.send_request(host, handler, request_body, verbose) File "xmlrpc_client_http_proxy_test.py", line 13, in send_request connection.putrequest("POST", 'http://%s%s' % (self.realhost, handler)) AttributeError: 'str' object has no attribute 'putrequest' Personally I don't like the idea of putting this amount of code to documentation: - as it seems, without automated tests running it, the code seems to rot, and gets outdated - I need to paste this boilerplate code to my application if I want this functionality. IMHO it would be much better to move this ProxiedTransport example code (after fixing it) to e.g. xmlrpc.client.HttpProxyTransport (or similar name) class. Details about python3: $ python3 Python 3.5.2 (default, Sep 10 2016, 08:21:44) [GCC 5.4.0 20160609] on linux Type "help", "copyright", "credits" or "license" for more information. >>> ---------- assignee: docs at python components: Documentation files: xmlrpc_client_http_proxy_test.py messages: 278291 nosy: avangel, docs at python priority: normal severity: normal status: open title: xmlrpc.client HTTP proxy example code does not work type: crash versions: Python 3.5 Added file: http://bugs.python.org/file45010/xmlrpc_client_http_proxy_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 08:02:18 2016 From: report at bugs.python.org (Attila Vangel) Date: Sat, 08 Oct 2016 12:02:18 +0000 Subject: [docs] [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475928138.86.0.766199801505.issue28389@psf.upfronthosting.co.za> Attila Vangel added the comment: I tested it also on Python 3.4.3. I got the same error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 08:02:47 2016 From: report at bugs.python.org (Attila Vangel) Date: Sat, 08 Oct 2016 12:02:47 +0000 Subject: [docs] [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475928167.59.0.471210594437.issue28389@psf.upfronthosting.co.za> Changes by Attila Vangel : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 08:59:15 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 08 Oct 2016 12:59:15 +0000 Subject: [docs] [issue28390] Wrong heading levels in whatsnew/3.6 Message-ID: <1475931554.95.0.299802036089.issue28390@psf.upfronthosting.co.za> New submission from SilentGhost: Couple of headings in whatsnew/3.6.rst have wrong level. The patch fixes this. ---------- assignee: docs at python components: Documentation files: headings.diff keywords: patch messages: 278296 nosy: SilentGhost, docs at python priority: normal severity: normal stage: patch review status: open title: Wrong heading levels in whatsnew/3.6 type: behavior versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45013/headings.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 09:04:59 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 08 Oct 2016 13:04:59 +0000 Subject: [docs] [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475931899.62.0.274969497406.issue28389@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. Can you try the attached script? ---------- nosy: +berker.peksag Added file: http://bugs.python.org/file45014/proxy.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 09:15:48 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Oct 2016 13:15:48 +0000 Subject: [docs] [issue28390] Wrong heading levels in whatsnew/3.6 In-Reply-To: <1475931554.95.0.299802036089.issue28390@psf.upfronthosting.co.za> Message-ID: <20161008131543.79751.77805.082269CF@psf.io> Roundup Robot added the comment: New changeset 3ee15bd35902 by Berker Peksag in branch '3.6': Issue #28390: Fix header levels in whatsnew/3.6.rst https://hg.python.org/cpython/rev/3ee15bd35902 New changeset 43b1b3c883ff by Berker Peksag in branch 'default': Issue #28390: Merge from 3.6 https://hg.python.org/cpython/rev/43b1b3c883ff ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 09:16:17 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 08 Oct 2016 13:16:17 +0000 Subject: [docs] [issue28390] Wrong heading levels in whatsnew/3.6 In-Reply-To: <1475931554.95.0.299802036089.issue28390@psf.upfronthosting.co.za> Message-ID: <1475932577.81.0.092573838328.issue28390@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 09:33:00 2016 From: report at bugs.python.org (Attila Vangel) Date: Sat, 08 Oct 2016 13:33:00 +0000 Subject: [docs] [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475933580.85.0.235195143592.issue28389@psf.upfronthosting.co.za> Attila Vangel added the comment: Hi, thx for the quick turnaround. I tried the proxy.py (on python 3.5) of course replacing 'YOUR_PROXY' with '10.144.1.11:8080' according to my environment. python3 proxy.py Traceback (most recent call last): File "proxy.py", line 27, in print(server.examples.getStateName(41)) File "/usr/lib/python3.5/xmlrpc/client.py", line 1092, in __call__ return self.__send(self.__name, args) File "/usr/lib/python3.5/xmlrpc/client.py", line 1432, in __request verbose=self.__verbose File "/usr/lib/python3.5/xmlrpc/client.py", line 1134, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib/python3.5/xmlrpc/client.py", line 1147, in single_request resp = http_conn.getresponse() File "/usr/lib/python3.5/http/client.py", line 1197, in getresponse response.begin() File "/usr/lib/python3.5/http/client.py", line 297, in begin version, status, reason = self._read_status() File "/usr/lib/python3.5/http/client.py", line 258, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/usr/lib/python3.5/socket.py", line 575, in readinto return self._sock.recv_into(b) ConnectionResetError: [Errno 104] Connection reset by peer However, meanwhile I studied a bit the http.client API on how to use HTTP proxy, and I found set_tunnel() can do it. I had success by only overriding make_connection() in ProxiedTransport: - copy current code of make_connection() from xmlrpc.client.Transport to ProxiedTransport (NOTE, this itself violates the DRY principle, but there is no better way to do it), change it slightly: - create HTTPSConnection to the proxy (as I wanted to access a https URL) - use .set_tunnel(chost) on this connection I did not want to paste the code here, because - I did not want to fill the 'PSF Contributor Agreement', at least yet - it may be Python version specific solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 11:14:39 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 08 Oct 2016 15:14:39 +0000 Subject: [docs] [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475939679.81.0.071180837558.issue28389@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks. I guess your solution was similar to the attached patch? ---------- keywords: +patch stage: -> patch review type: crash -> behavior versions: +Python 3.6, Python 3.7 -Python 3.4 Added file: http://bugs.python.org/file45016/issue28389.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 11:29:44 2016 From: report at bugs.python.org (Attila Vangel) Date: Sat, 08 Oct 2016 15:29:44 +0000 Subject: [docs] [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475940584.2.0.904238671288.issue28389@psf.upfronthosting.co.za> Attila Vangel added the comment: It's my pleasure. It was somewhat similar: - the set_proxy() is the same - for the make_connection() I gave the necessary clues, so one can create the code and you can use that in a way that I don't have to spend time on the PSF Contributor Agreement - overriding send_request() is not necessary at all, because the HTTP proxying is done in http.client level ---------- type: behavior -> crash versions: +Python 3.4 -Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 11:37:03 2016 From: report at bugs.python.org (Berker Peksag) Date: Sat, 08 Oct 2016 15:37:03 +0000 Subject: [docs] [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1475941023.02.0.410049634781.issue28389@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- type: crash -> behavior versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 12:19:26 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 08 Oct 2016 16:19:26 +0000 Subject: [docs] [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475943566.78.0.230283886952.issue27998@psf.upfronthosting.co.za> Eryk Sun added the comment: Here's an alternative patch, using PyUnicode_FSDecoder. It also adds path_object_error and path_object_error2 helper functions. ---------- Added file: http://bugs.python.org/file45017/issue_27998_01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 12:31:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 16:31:27 +0000 Subject: [docs] [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475944287.69.0.794495901899.issue27998@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Eryk. The patch LGTM. Did you tested that it fixes tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 12:48:30 2016 From: report at bugs.python.org (Eryk Sun) Date: Sat, 08 Oct 2016 16:48:30 +0000 Subject: [docs] [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475945310.53.0.0956793986908.issue27998@psf.upfronthosting.co.za> Eryk Sun added the comment: With the patch I uploaded, test_glob and test_os BytesWalkTests both pass, in both Windows 10 and Linux. Without it those tests fail for me in Windows 10. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 13:17:51 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Oct 2016 17:17:51 +0000 Subject: [docs] [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <20161008171744.5537.27232.60E6F8BA@psf.io> Roundup Robot added the comment: New changeset 4ed634870a9a by Serhiy Storchaka in branch '3.6': Issue #27998: Fixed bytes path support in os.scandir() on Windows. https://hg.python.org/cpython/rev/4ed634870a9a New changeset 837114dea493 by Serhiy Storchaka in branch 'default': Issue #27998: Fixed bytes path support in os.scandir() on Windows. https://hg.python.org/cpython/rev/837114dea493 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 13:20:04 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Oct 2016 17:20:04 +0000 Subject: [docs] [issue27998] Bytes paths now are supported in os.scandir() on Windows In-Reply-To: <1473236470.81.0.837469962495.issue27998@psf.upfronthosting.co.za> Message-ID: <1475947204.15.0.739108743187.issue27998@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Now it is documentation issue again. ---------- keywords: -patch priority: release blocker -> normal stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:05:31 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Oct 2016 03:05:31 +0000 Subject: [docs] [issue28388] Update documentation for typing module In-Reply-To: <1475884610.88.0.342172022706.issue28388@psf.upfronthosting.co.za> Message-ID: <1475982331.37.0.716905106657.issue28388@psf.upfronthosting.co.za> Guido van Rossum added the comment: LGTM. I have a small number of nits that I will apply when merging this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:10:38 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 03:10:38 +0000 Subject: [docs] [issue28388] Update documentation for typing module In-Reply-To: <1475884610.88.0.342172022706.issue28388@psf.upfronthosting.co.za> Message-ID: <20161009031035.20553.54885.F0A81DD8@psf.io> Roundup Robot added the comment: New changeset 9953efbb4974 by Guido van Rossum in branch '3.5': Issue #28388: update typing module documentation. https://hg.python.org/cpython/rev/9953efbb4974 New changeset 589e11c3489e by Guido van Rossum in branch '3.6': Issue #28388: update typing module documentation. (merge 3.5->3.6) https://hg.python.org/cpython/rev/589e11c3489e New changeset 6cb9dfe4cbeb by Guido van Rossum in branch 'default': Issue #28388: update typing module documentation. (merge 3.6->3.7) https://hg.python.org/cpython/rev/6cb9dfe4cbeb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:10:59 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Oct 2016 03:10:59 +0000 Subject: [docs] [issue28388] Update documentation for typing module In-Reply-To: <1475884610.88.0.342172022706.issue28388@psf.upfronthosting.co.za> Message-ID: <1475982659.31.0.459079649036.issue28388@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:14:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 03:14:13 +0000 Subject: [docs] [issue28388] Update documentation for typing module In-Reply-To: <1475884610.88.0.342172022706.issue28388@psf.upfronthosting.co.za> Message-ID: <20161009031410.15775.29338.012CCC61@psf.io> Roundup Robot added the comment: New changeset d7f2b0332343 by Guido van Rossum in branch '3.5': Adjust ClassVar example to use pre-PEP-526 syntax. (Issue #28388) https://hg.python.org/cpython/rev/d7f2b0332343 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 8 23:18:21 2016 From: report at bugs.python.org (Guido van Rossum) Date: Sun, 09 Oct 2016 03:18:21 +0000 Subject: [docs] [issue27588] Type (typing) objects are hashable and comparable for equality but this is not documented In-Reply-To: <1469181051.15.0.925508125369.issue27588@psf.upfronthosting.co.za> Message-ID: <1475983101.24.0.662671869123.issue27588@psf.upfronthosting.co.za> Guido van Rossum added the comment: Fixed by the changes for issue #28388. ---------- nosy: +gvanrossum resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 07:39:09 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 09 Oct 2016 11:39:09 +0000 Subject: [docs] [issue28393] Update encoding lookup docs wrt #27938 Message-ID: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> New submission from Ville Skytt?: The attached patch brings codecs docs up to date with respect to changes in #27938. ---------- assignee: docs at python components: Documentation files: codecs-doc.patch keywords: patch messages: 278354 nosy: docs at python, haypo, scop priority: normal severity: normal status: open title: Update encoding lookup docs wrt #27938 type: enhancement Added file: http://bugs.python.org/file45030/codecs-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 07:46:33 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 09 Oct 2016 11:46:33 +0000 Subject: [docs] [issue28394] Spelling fixes Message-ID: <1476013593.7.0.53262398445.issue28394@psf.upfronthosting.co.za> Changes by Ville Skytt? : ---------- assignee: docs at python components: Documentation files: spelling.patch keywords: patch nosy: docs at python, scop priority: normal severity: normal status: open title: Spelling fixes type: enhancement Added file: http://bugs.python.org/file45031/spelling.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 07:50:43 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Sun, 09 Oct 2016 11:50:43 +0000 Subject: [docs] [issue28396] Remove *.pyo references from man page Message-ID: <1476013843.64.0.909698067494.issue28396@psf.upfronthosting.co.za> Changes by Ville Skytt? : ---------- assignee: docs at python components: Documentation files: man-pyo.patch keywords: patch nosy: docs at python, scop priority: normal severity: normal status: open title: Remove *.pyo references from man page type: enhancement Added file: http://bugs.python.org/file45033/man-pyo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 07:54:47 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Oct 2016 11:54:47 +0000 Subject: [docs] [issue28394] Spelling fixes Message-ID: <1476014087.03.0.503671565941.issue28394@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 11:19:17 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Oct 2016 15:19:17 +0000 Subject: [docs] [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <20161009151913.79751.29237.78146A01@psf.io> Roundup Robot added the comment: New changeset 94c9c314f5d9 by Berker Peksag in branch '3.5': Issue #28389: Fix ProxiedTransport example in xmlrpc.client documentation https://hg.python.org/cpython/rev/94c9c314f5d9 New changeset 60c5c77c0190 by Berker Peksag in branch '3.6': Issue #28389: Merge from 3.5 https://hg.python.org/cpython/rev/60c5c77c0190 New changeset 5f9351bc317e by Berker Peksag in branch 'default': Issue #28389: Merge from 3.6 https://hg.python.org/cpython/rev/5f9351bc317e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 11:19:45 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 09 Oct 2016 15:19:45 +0000 Subject: [docs] [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1476026385.8.0.458361824653.issue28389@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:27:34 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 09 Oct 2016 17:27:34 +0000 Subject: [docs] [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1476034054.35.0.646612609153.issue25152@psf.upfronthosting.co.za> R. David Murray added the comment: Issue 25154 has deprecated pyvenv in 3.6. The docs, however, still need updating. The updated docs should mention pyvenv only to say that it is deprecated, I think. This change could be applied to 3.5 if we get it in before 3.5 final. ---------- stage: -> needs patch type: -> behavior versions: +Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 13:47:26 2016 From: report at bugs.python.org (Attila Vangel) Date: Sun, 09 Oct 2016 17:47:26 +0000 Subject: [docs] [issue28389] xmlrpc.client HTTP proxy example code does not work In-Reply-To: <1475927614.18.0.277920882449.issue28389@psf.upfronthosting.co.za> Message-ID: <1476035245.94.0.399035090149.issue28389@psf.upfronthosting.co.za> Attila Vangel added the comment: Thanks for fixing this issue. I checked the changed documentation online, and I came up with a very similar solution. One difference is that although this example overrides the make_connection() method, but omits the following lines which are present in the xmlrpc.client.Transport code (I checked that in python 3.5.3): # return an existing connection if possible. This allows # HTTP/1.1 keep-alive. if self._connection and host == self._connection[0]: return self._connection[1] # create a HTTP connection object from a host descriptor chost, self._extra_headers, x509 = self.get_host_info(host) Please check xmlrpc.client.Transport.make_connection(). I am not sure about the what kind of effect this may have. I used chost as the parameter of set_tunnel(), rather than host (after briefly checking the code how it is calculated I felt that it's better to use chost than host, but I don't have a deep understanding of the http.client code). The proxy_headers is a new thing, I guess it's a good thing if someone needs that. I don't understand why the '*' character is needed in connection = http.client.HTTPConnection(*self.proxy) However I'm quite new to python. I will try this new code tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 20:33:51 2016 From: report at bugs.python.org (Joshua Jay Herman) Date: Mon, 10 Oct 2016 00:33:51 +0000 Subject: [docs] [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1476059630.9.0.259033302037.issue24459@psf.upfronthosting.co.za> Joshua Jay Herman added the comment: Hi I performed the rebase on the default branch. ---------- Added file: http://bugs.python.org/file45041/rebased_addMissingEnvironmentalVariables.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 21:34:49 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Oct 2016 01:34:49 +0000 Subject: [docs] [issue28394] Spelling fixes Message-ID: <20161010013445.20766.86546.B8433476@psf.io> New submission from Roundup Robot: New changeset 6b1df8905012 by Martin Panter in branch '3.5': Issue #28394: Spelling and typo fixes in code comments and changelog https://hg.python.org/cpython/rev/6b1df8905012 New changeset bd113af10005 by Martin Panter in branch '3.6': Issue #28394: Merge typo fixes from 3.5 into 3.6 https://hg.python.org/cpython/rev/bd113af10005 New changeset 004d1809db41 by Martin Panter in branch '3.6': Issue #28394: More typo fixes for 3.6+ https://hg.python.org/cpython/rev/004d1809db41 New changeset 678fe178da0d by Martin Panter in branch 'default': Issue #28394: Merge typo fixes from 3.6 https://hg.python.org/cpython/rev/678fe178da0d New changeset de13f5a0f4d5 by Martin Panter in branch '2.7': Issue #28394: Typo fixes in code comments and changelog https://hg.python.org/cpython/rev/de13f5a0f4d5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 9 22:45:28 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Oct 2016 02:45:28 +0000 Subject: [docs] [issue28394] Spelling fixes In-Reply-To: <20161010013445.20766.86546.B8433476@psf.io> Message-ID: <1476067528.97.0.260343942441.issue28394@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks Ville. I added some more fixes of my own I had been saving up. ---------- resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From mariatta.wijaya at gmail.com Mon Oct 10 02:11:09 2016 From: mariatta.wijaya at gmail.com (mariatta.wijaya at gmail.com) Date: Mon, 10 Oct 2016 06:11:09 -0000 Subject: [docs] Mention PYTHONFAULTHANDLER in the man page (issue 24459) Message-ID: <20161010061109.28191.63011@psf.upfronthosting.co.za> Thanks for the updated patch, Joshua! I noticed a couple typos but otherwise seems good to me. I can confirm that the previous comments from Berker have been addressed, and that the patch can be applied cleanly to 3.5 and 3.6. Perhaps Berker or other maintainers could take another pass. Thanks :) http://bugs.python.org/review/24459/diff/18826/Misc/python.man File Misc/python.man (right): http://bugs.python.org/review/24459/diff/18826/Misc/python.man#newcode435 Misc/python.man:435: These are theavailable memory allocators are "malloc" and "pymalloc". I think it should say "The available memory allocators are .." http://bugs.python.org/review/24459/diff/18826/Misc/python.man#newcode436 Misc/python.man:436: These are the available debug hooks are "debug","malloc_debug", "The available debug hooks are .." http://bugs.python.org/review/24459/ From report at bugs.python.org Mon Oct 10 08:17:08 2016 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 10 Oct 2016 12:17:08 +0000 Subject: [docs] [issue28403] Porting guide: disabling & warning on implicit unicode conversions In-Reply-To: <1476071532.35.0.73217429855.issue28403@psf.upfronthosting.co.za> Message-ID: <1476101828.33.0.521500725925.issue28403@psf.upfronthosting.co.za> Nick Coghlan added the comment: Adding Petr to the nosy list, as I'd like to get his perspective on this once I have a draft docs patch to review. I also realised it made more sense to just repurpose this issue to cover the proposed docs updates. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, encukou stage: -> needs patch title: Migration RFE: optional warning for implicit unicode conversions -> Porting guide: disabling & warning on implicit unicode conversions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 09:08:10 2016 From: report at bugs.python.org (Petr Viktorin) Date: Mon, 10 Oct 2016 13:08:10 +0000 Subject: [docs] [issue28403] Porting guide: disabling & warning on implicit unicode conversions In-Reply-To: <1476071532.35.0.73217429855.issue28403@psf.upfronthosting.co.za> Message-ID: <1476104890.3.0.560027179107.issue28403@psf.upfronthosting.co.za> Petr Viktorin added the comment: In portingguide [0] I could only recommend sitecustomize with a (possibly third-party) codec that emits warnings; not 'undefined'. The things that aren't ported yet are generally either Non-Python applications with Python bindings or plugins (Gimp, Samba, ...), projects that are very large relative to the count of available maintainers (VCSs, Sugar, wxPython, ...), or code that depends on those. If sys.setdefaultencoding('undefined') breaks parts of the standard library, it might be OK for smaller scripts but I fear it won't help big projects much. [0] http://portingguide.readthedocs.io/en/latest/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 11:02:10 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 10 Oct 2016 15:02:10 +0000 Subject: [docs] [issue28403] Porting guide: disabling & warning on implicit unicode conversions In-Reply-To: <1476104890.3.0.560027179107.issue28403@psf.upfronthosting.co.za> Message-ID: <57FBAD6D.3000203@egenix.com> Marc-Andre Lemburg added the comment: On 10.10.2016 15:08, Petr Viktorin wrote: > If sys.setdefaultencoding('undefined') breaks parts of the standard library, it might be OK for smaller scripts but I fear it won't help big projects much. That's true. It does break the stdlib (the codec was originally added in order to test exactly this scenario). A new codec "ascii-warn" could easily be added, based on the code used for "undefined". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 12:00:48 2016 From: report at bugs.python.org (Joshua Jay Herman) Date: Mon, 10 Oct 2016 16:00:48 +0000 Subject: [docs] [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1476115248.71.0.829837043383.issue24459@psf.upfronthosting.co.za> Joshua Jay Herman added the comment: Thanks for reviewing Mariatta I have made a new patch that has those typos corrected. ---------- Added file: http://bugs.python.org/file45045/correctedRebasedAddMissingEnvironmentalVariables.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 15:16:00 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 10 Oct 2016 19:16:00 +0000 Subject: [docs] [issue2897] Deprecate structmember.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1476126960.34.0.894303633064.issue2897@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: docs at python -> belopolsky stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 15:52:47 2016 From: report at bugs.python.org (Thomas Guettler) Date: Mon, 10 Oct 2016 19:52:47 +0000 Subject: [docs] [issue26869] unittest longMessage docs In-Reply-To: <1461743267.94.0.620093650485.issue26869@psf.upfronthosting.co.za> Message-ID: <1476129167.35.0.501849242437.issue26869@psf.upfronthosting.co.za> Thomas Guettler added the comment: @Mariatta thank you very much. This update makes the docs easy to read and understand. Thank you :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 18:57:46 2016 From: report at bugs.python.org (Michael Partridge) Date: Mon, 10 Oct 2016 22:57:46 +0000 Subject: [docs] [issue28412] os.path.splitdrive documentation out of date Message-ID: <1476140266.77.0.441294579348.issue28412@psf.upfronthosting.co.za> New submission from Michael Partridge: ntpath.splitdrive was updated in patch 26ec6248ee8b. (I think this was released in 2.7.8.) This changes the behaviour of splitdrive for UNC style paths. Previously: >>> ntpath.splitdrive(r'\\nancy\foo\bar') ('', '\\\\nancy\\foo\\bar') >>> Now: >>> ntpath.splitdrive(r'\\nancy\foo\bar') ('\\\\nancy\\foo', '\\bar') >>> The documentation should be updated to say the same. ---------- assignee: docs at python components: Documentation messages: 278446 nosy: docs at python, snooter priority: normal severity: normal status: open title: os.path.splitdrive documentation out of date type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 10 19:25:47 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Oct 2016 23:25:47 +0000 Subject: [docs] [issue28412] os.path.splitdrive documentation out of date In-Reply-To: <1476140266.77.0.441294579348.issue28412@psf.upfronthosting.co.za> Message-ID: <1476141947.67.0.549100052215.issue28412@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From vnc9 at mail.com Thu Oct 6 09:14:20 2016 From: vnc9 at mail.com (Vincent Carlos) Date: Thu, 6 Oct 2016 22:14:20 +0900 Subject: [docs] Cant Access Python 3.6 Documentation Message-ID: <6E58BA82-3EA0-4EEF-B772-EA5D75EBBD59@mail.com> I want to download python 3.6 documentation but it shows ?404 Not Found nginx?. I hope it will be fixed soon. Thanks From eryksun+pybugs at gmail.com Sat Oct 8 10:08:04 2016 From: eryksun+pybugs at gmail.com (eryksun+pybugs at gmail.com) Date: Sat, 08 Oct 2016 14:08:04 -0000 Subject: [docs] Remove support of bytes paths in os.scandir() (issue 27998) Message-ID: <20161008140804.10737.46345@psf.upfronthosting.co.za> http://bugs.python.org/review/27998/diff/18802/Modules/posixmodule.c File Modules/posixmodule.c (right): http://bugs.python.org/review/27998/diff/18802/Modules/posixmodule.c#newcode11159 Modules/posixmodule.c:11159: PyObject *unicode = self->path; How about consolidating this function as follows? static PyObject * path_object_error(PyObject *path) { #ifdef MS_WINDOWS return PyErr_SetExcFromWindowsErrWithFilenameObject( PyExc_OSError, 0, path); #else return PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, path); #endif } static PyObject * DirEntry_fetch_stat(DirEntry *self, int follow_symlinks) { int result; STRUCT_STAT st; PyObject *ub; #ifdef MS_WINDOWS if (PyUnicode_FSDecoder(self->path, &ub)) { const wchar_t *path = PyUnicode_AsUnicode(ub); #else /* POSIX */ if (PyUnicode_FSConverter(self->path, &ub)) { const char *path = PyBytes_AS_STRING(ub); #endif if (follow_symlinks) result = STAT(path, &st); else result = LSTAT(path, &st); Py_DECREF(ub); } else return NULL; if (result != 0) return path_object_error(self->path); return _pystat_fromstructstat(&st); } http://bugs.python.org/review/27998/ From eryksun+pybugs at gmail.com Sat Oct 8 11:59:16 2016 From: eryksun+pybugs at gmail.com (eryksun+pybugs at gmail.com) Date: Sat, 08 Oct 2016 15:59:16 -0000 Subject: [docs] Remove support of bytes paths in os.scandir() (issue 27998) Message-ID: <20161008155916.17857.32352@psf.upfronthosting.co.za> http://bugs.python.org/review/27998/diff/18802/Modules/posixmodule.c File Modules/posixmodule.c (right): http://bugs.python.org/review/27998/diff/18802/Modules/posixmodule.c#newcode11368 Modules/posixmodule.c:11368: static PyObject * For consistency, here's this function using PyUnicode_FSDecoder as well: static PyObject * DirEntry_inode(DirEntry *self) { #ifdef MS_WINDOWS if (!self->got_file_index) { PyObject *unicode; const wchar_t *path; STRUCT_STAT stat; int result; if (!PyUnicode_FSDecoder(self->path, &unicode)) return NULL; path = PyUnicode_AsUnicode(unicode); result = LSTAT(path, &stat); Py_DECREF(unicode); if (result != 0) return path_object_error(self->path); self->win32_file_index = stat.st_ino; self->got_file_index = 1; } return PyLong_FromLongLong((long long)self->win32_file_index); #else /* POSIX */ #ifdef HAVE_LARGEFILE_SUPPORT return PyLong_FromLongLong((long long)self->d_ino); #else return PyLong_FromLong((long)self->d_ino); #endif #endif } http://bugs.python.org/review/27998/ From pinku.surana at symbiont.io Mon Oct 10 13:58:33 2016 From: pinku.surana at symbiont.io (Pinku Surana) Date: Mon, 10 Oct 2016 13:58:33 -0400 Subject: [docs] Doc for filterfalse is incorrect. Message-ID: Here: https://docs.python.org/3/library/itertools.html In the table, the row for describing filterfalse. The Results column says "elements of seq where pred(elem) is false". And here, for the full documentation: https://docs.python.org/3/library/itertools.html#itertools.filterfalse In both cases, it says the result contains the elements where the predicate returns false. That's not true. It returns the elements where the predicate returns True. It's the opposite of filter. -------------- next part -------------- An HTML attachment was scrubbed... URL: From cuthbert at mit.edu Tue Oct 11 09:54:33 2016 From: cuthbert at mit.edu (Michael Scott Cuthbert) Date: Tue, 11 Oct 2016 13:54:33 +0000 Subject: [docs] random.choices() should be marked as New in 3.6 Message-ID: <5589C5C7-90D9-47DF-A0D4-E67FA8BABF65@mit.edu> Since the Python docs for 3.6 are beginning to come up first on google searches for Python Docs, it?s important to add the note that random.choices() is a new function in 3.6 Thanks! M --- --- Michael Scott Cuthbert Associate Professor of Music, MIT +1 (413) 575-6024 cuthbert at mit.edu http://www.trecento.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From storchaka+cpython at gmail.com Sat Oct 8 12:10:50 2016 From: storchaka+cpython at gmail.com (storchaka+cpython at gmail.com) Date: Sat, 08 Oct 2016 16:10:50 -0000 Subject: [docs] Remove support of bytes paths in os.scandir() (issue 27998) Message-ID: <20161008161050.25945.67551@psf.upfronthosting.co.za> Reviewers: eryksun, http://bugs.python.org/review/27998/diff/18802/Modules/posixmodule.c File Modules/posixmodule.c (right): http://bugs.python.org/review/27998/diff/18802/Modules/posixmodule.c#newcode11159 Modules/posixmodule.c:11159: PyObject *unicode = self->path; On 2016/10/08 16:08:04, eryksun wrote: > How about consolidating this function as follows? > > static PyObject * > path_object_error(PyObject *path) > { > #ifdef MS_WINDOWS > return PyErr_SetExcFromWindowsErrWithFilenameObject( > PyExc_OSError, 0, path); > #else > return PyErr_SetFromErrnoWithFilenameObject(PyExc_OSError, path); > #endif > } > > static PyObject * > DirEntry_fetch_stat(DirEntry *self, int follow_symlinks) > { > int result; > STRUCT_STAT st; > PyObject *ub; > > #ifdef MS_WINDOWS > if (PyUnicode_FSDecoder(self->path, &ub)) { > const wchar_t *path = PyUnicode_AsUnicode(ub); > #else /* POSIX */ > if (PyUnicode_FSConverter(self->path, &ub)) { > const char *path = PyBytes_AS_STRING(ub); > #endif > if (follow_symlinks) > result = STAT(path, &st); > else > result = LSTAT(path, &st); > Py_DECREF(ub); > } else > return NULL; > > if (result != 0) > return path_object_error(self->path); > > return _pystat_fromstructstat(&st); > } This looks interesting. Could you provide a patch? Please review this at http://bugs.python.org/review/27998/ Affected files: Modules/posixmodule.c diff -r 4646b64139c9 Modules/posixmodule.c --- a/Modules/posixmodule.c Fri Oct 07 23:46:22 2016 +0300 +++ b/Modules/posixmodule.c Sat Oct 08 10:51:28 2016 +0300 @@ -11156,15 +11156,29 @@ DirEntry_fetch_stat(DirEntry *self, int #ifdef MS_WINDOWS const wchar_t *path; - - path = PyUnicode_AsUnicode(self->path); - if (!path) - return NULL; + PyObject *unicode = self->path; + + if (PyBytes_Check(unicode)) { + unicode = PyUnicode_DecodeFSDefaultAndSize( + PyBytes_AS_STRING(unicode), + PyBytes_GET_SIZE(unicode)); + if (unicode == NULL) + return NULL; + } + else { + Py_INCREF(unicode); + } + path = PyUnicode_AsUnicode(unicode) + if (!path) { + Py_DECREF(unicode); + return NULL; + } if (follow_symlinks) result = win32_stat(path, &st); else result = win32_lstat(path, &st); + Py_DECREF(unicode); if (result != 0) { return PyErr_SetExcFromWindowsErrWithFilenameObject(PyExc_OSError, @@ -11358,15 +11372,30 @@ DirEntry_inode(DirEntry *self) if (!self->got_file_index) { const wchar_t *path; struct _Py_stat_struct stat; - - path = PyUnicode_AsUnicode(self->path); - if (!path) + PyObject *unicode = self->path; + + if (PyBytes_Check(unicode)) { + unicode = PyUnicode_DecodeFSDefaultAndSize( + PyBytes_AS_STRING(unicode), + PyBytes_GET_SIZE(unicode)); + if (unicode == NULL) + return NULL; + } + else { + Py_INCREF(unicode); + } + path = PyUnicode_AsUnicode(unicode) + if (!path) { + Py_DECREF(unicode); return NULL; + } if (win32_lstat(path, &stat) != 0) { + Py_DECREF(unicode); return PyErr_SetExcFromWindowsErrWithFilenameObject(PyExc_OSError, 0, self->path); } + Py_DECREF(unicode); self->win32_file_index = stat.st_ino; self->got_file_index = 1; From storchaka+cpython at gmail.com Sat Oct 8 13:18:01 2016 From: storchaka+cpython at gmail.com (storchaka+cpython at gmail.com) Date: Sat, 08 Oct 2016 17:18:01 -0000 Subject: [docs] Remove support of bytes paths in os.scandir() (issue 27998) Message-ID: <20161008171801.32477.86967@psf.upfronthosting.co.za> http://bugs.python.org/review/27998/diff/18808/Modules/posixmodule.c File Modules/posixmodule.c (right): http://bugs.python.org/review/27998/diff/18808/Modules/posixmodule.c#newcode11182 Modules/posixmodule.c:11182: Trailing whitespaces. http://bugs.python.org/review/27998/ From report at bugs.python.org Tue Oct 11 15:04:57 2016 From: report at bugs.python.org (Matthias Bussonnier) Date: Tue, 11 Oct 2016 19:04:57 +0000 Subject: [docs] [issue28418] Raise Deprecation warning for tokenize.generate_tokens Message-ID: <1476212697.92.0.408666384378.issue28418@psf.upfronthosting.co.za> New submission from Matthias Bussonnier: the Tokenize module has the following code: # An undocumented, backwards compatible, API for all the places in the standard # library that expect to be able to use tokenize with strings def generate_tokens(readline): return _tokenize(readline, None) So I'm going to assume it is Deprecated... (since 3.0 AFAICT). If it is expected from Python developers to not use it, may I suggest: 1) Marking it as deprecated in the docstring/ 2) Raise a deprecation warning. Indeed not everyone code by looking at the documentation and it is relatively easy to have your IDE/editor/REPL to complete it. Even tools that grab the source (IPython double question mark for example) will not show the comment above which make it kinda pointless. ---------- assignee: docs at python components: Documentation messages: 278500 nosy: docs at python, mbussonn priority: normal severity: normal status: open title: Raise Deprecation warning for tokenize.generate_tokens versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 15:58:24 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 11 Oct 2016 19:58:24 +0000 Subject: [docs] [issue28393] Update encoding lookup docs wrt #27938 In-Reply-To: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> Message-ID: <1476215904.33.0.403593897349.issue28393@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch! Do we still need to keep the last sentence? Is there any other alternatives that can be used? Perhaps the word "spellings" can be changed with "aliases" to make the sentence a little bit clearer. ---------- nosy: +berker.peksag stage: -> patch review type: enhancement -> behavior versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 16:07:23 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 11 Oct 2016 20:07:23 +0000 Subject: [docs] [issue28393] Update encoding lookup docs wrt #27938 In-Reply-To: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> Message-ID: <1476216443.29.0.0485930426488.issue28393@psf.upfronthosting.co.za> Ville Skytt? added the comment: I believe (but haven't checked) that additionally, encoding names are case insensitive with respect to the fast-path behavior. But then again I also suppose that's the way it was before #27938 as well, which is why I didn't change that in this patch. But why not add it while at it, if I'm correct. Something like this revised patch? ---------- Added file: http://bugs.python.org/file45061/codecs-doc-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 11 16:26:46 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 11 Oct 2016 20:26:46 +0000 Subject: [docs] [issue28418] Raise Deprecation warning for tokenize.generate_tokens In-Reply-To: <1476212697.92.0.408666384378.issue28418@psf.upfronthosting.co.za> Message-ID: <1476217606.58.0.219994412112.issue28418@psf.upfronthosting.co.za> Martin Panter added the comment: There is related discussion in Issue 12486 about supporting unencoded text input. The current patch there actually already raises a warning and removes call sites from the Python library, though it does not add a doc string. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 06:38:50 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 12 Oct 2016 10:38:50 +0000 Subject: [docs] [issue28393] Update encoding lookup docs wrt #27938 In-Reply-To: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> Message-ID: <1476268730.05.0.0877052235324.issue28393@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: The names are indeed case-insensitive. However, something important is missing: the implementation details changed between Python 3.5 and 3.6. Please check the implementation for details and update the documentation with versionadded flags. Thanks. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 14:25:07 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 12 Oct 2016 18:25:07 +0000 Subject: [docs] [issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented In-Reply-To: <1462743548.86.0.976035936413.issue26980@psf.upfronthosting.co.za> Message-ID: <1476296707.29.0.79524027027.issue26980@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. I'm marking this as an easy documentation issue. BaseEventLoop is now AbstractEventLoop (87e3a58ed3c3) and the documentation of AbstractEventLoop.create_unix_connection() can be found in Doc/library/asyncio-eventloop.rst. Guido already explained what it means in msg266111 so what we need is to convert Guido's answer to a proper patch. ---------- keywords: +easy nosy: +berker.peksag stage: -> needs patch type: -> enhancement versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 12 15:35:23 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Wed, 12 Oct 2016 19:35:23 +0000 Subject: [docs] [issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented In-Reply-To: <1462743548.86.0.976035936413.issue26980@psf.upfronthosting.co.za> Message-ID: <1476300923.03.0.266705445597.issue26980@psf.upfronthosting.co.za> ???? ????????? added the comment: It will be nice if someone also adds if abstract UNIX sockets are supported. And also about bytes/str path support. ---------- nosy: +mmarkk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:12:50 2016 From: report at bugs.python.org (Harmandeep Singh) Date: Thu, 13 Oct 2016 11:12:50 +0000 Subject: [docs] [issue13927] Extra spaces in the output of time.ctime In-Reply-To: <1328215776.48.0.974828105123.issue13927@psf.upfronthosting.co.za> Message-ID: <1476357170.09.0.0429518884282.issue13927@psf.upfronthosting.co.za> Harmandeep Singh added the comment: I was bored, I generated a patch for this. Hope this helps :) ---------- hgrepos: +360 keywords: +patch nosy: +harman786 Added file: http://bugs.python.org/file45073/ctime-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:16:02 2016 From: report at bugs.python.org (Harmandeep Singh) Date: Thu, 13 Oct 2016 11:16:02 +0000 Subject: [docs] [issue13927] Extra spaces in the output of time.ctime In-Reply-To: <1328215776.48.0.974828105123.issue13927@psf.upfronthosting.co.za> Message-ID: <1476357362.87.0.776798602223.issue13927@psf.upfronthosting.co.za> Changes by Harmandeep Singh : ---------- hgrepos: -360 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 07:46:05 2016 From: report at bugs.python.org (Cassaigne) Date: Thu, 13 Oct 2016 11:46:05 +0000 Subject: [docs] [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476359165.55.0.655876359059.issue22635@psf.upfronthosting.co.za> Cassaigne added the comment: I correct the doc concerning subprocess.getstatusoutput(cmd) function. More specifically the part on examples and I add a quick explanation about how are manage the return code. ---------- keywords: +patch nosy: +acassaigne versions: +Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45075/issue22635.diff _______________________________________ Python tracker _______________________________________ From victor.stinner at gmail.com Thu Oct 13 08:28:30 2016 From: victor.stinner at gmail.com (victor.stinner at gmail.com) Date: Thu, 13 Oct 2016 12:28:30 -0000 Subject: [docs] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) (issue 22635) Message-ID: <20161013122830.32403.87569@psf.upfronthosting.co.za> http://bugs.python.org/review/22635/diff/18850/Doc/library/subprocess.rst File Doc/library/subprocess.rst (right): http://bugs.python.org/review/22635/diff/18850/Doc/library/subprocess.rst#newcode1165 Doc/library/subprocess.rst:1165: Return ``(status, output)`` of executing *cmd* in a shell. The documentation is wrong: it now returns (exitcode, output), not (status, output). http://bugs.python.org/review/22635/diff/18850/Doc/library/subprocess.rst#newcode1187 Doc/library/subprocess.rst:1187: Now the return code matches the exit value of subprocess. Hum, it's not exactly that. I would say: The function now returns (exitcode, output) instead of (status, output). http://bugs.python.org/review/22635/ From report at bugs.python.org Thu Oct 13 08:50:21 2016 From: report at bugs.python.org (Cassaigne) Date: Thu, 13 Oct 2016 12:50:21 +0000 Subject: [docs] [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476363021.07.0.185212160448.issue22635@psf.upfronthosting.co.za> Cassaigne added the comment: I improve the patch a little bit, following the recommendations of the Stinner's review. I replace "status" mention by "exit code". ---------- Added file: http://bugs.python.org/file45077/issue22635-2.diff _______________________________________ Python tracker _______________________________________ From victor.stinner at gmail.com Thu Oct 13 08:54:40 2016 From: victor.stinner at gmail.com (victor.stinner at gmail.com) Date: Thu, 13 Oct 2016 12:54:40 -0000 Subject: [docs] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) (issue 22635) Message-ID: <20161013125440.355.70857@psf.upfronthosting.co.za> http://bugs.python.org/review/22635/diff/18852/Doc/library/subprocess.rst File Doc/library/subprocess.rst (right): http://bugs.python.org/review/22635/diff/18852/Doc/library/subprocess.rst#newcode1173 Doc/library/subprocess.rst:1173: according to the rules for the C function :c:func:`wait`. Example:: Sorry, this is wrong as well. Again, it's no more a status but an exit code. I suggest to remove this sentence. http://bugs.python.org/review/22635/diff/18852/Doc/library/subprocess.rst#newcode1186 Doc/library/subprocess.rst:1186: Pay attention the behavior has changed the function now returns I would suggest to avoid "Pay attention", we don't use this in the Python doc. "the behaviour has changed" is redundant: we are already in a "versionchanged" section. I suggest to remove "Pay attention the behavior has changed". http://bugs.python.org/review/22635/ From report at bugs.python.org Thu Oct 13 09:13:03 2016 From: report at bugs.python.org (Cassaigne) Date: Thu, 13 Oct 2016 13:13:03 +0000 Subject: [docs] [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476364383.09.0.0756058050256.issue22635@psf.upfronthosting.co.za> Cassaigne added the comment: According to the Victor's review, I remove "Pay attention" words and change exit code by returncode. ---------- Added file: http://bugs.python.org/file45078/issue22635-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 09:15:09 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Oct 2016 13:15:09 +0000 Subject: [docs] [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476364509.66.0.450429355688.issue22635@psf.upfronthosting.co.za> R. David Murray added the comment: I disagree with Victor. The name of the function is "getstatusoutput". I think the docs should continue to use (status, output) as the names for the return values. The clarification is that 'status' is now the raw return code, not the shifted return code that it formerly returned. Also, the patch should include a new test that checks the actual return code value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 09:21:51 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 13 Oct 2016 13:21:51 +0000 Subject: [docs] [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476364911.04.0.385256201407.issue22635@psf.upfronthosting.co.za> STINNER Victor added the comment: issue22635-3.diff: LGTM. R. David Murray: "I disagree with Victor. The name of the function is "getstatusoutput". I think the docs should continue to use (status, output) as the names for the return values." In Python, we use "exitcode" or "returncode" names for the exit code, but "status" for the thing that should be parsed with os.WEXITSTATUS(status). Just to contradict me, the manual page of the exit() function uses the "status" term: "void _exit(int status);", not "code". "The clarification is that 'status' is now the raw return code, not the shifted return code that it formerly returned." Sorry, I'm confused by this sentence :-) getstatusoutput() returns an exit code, the parameter of exit(), no more the annoying "status" thing that should be passed to os.WEXITSTATUS(status) to get a regular exit code. "Also, the patch should include a new test that checks the actual return code value." FYI acassaigne is a newcomer currently in a sprint and this issue is tagged as Documentation. I suggest to first push a doc change and then add an unit test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 09:32:20 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Oct 2016 13:32:20 +0000 Subject: [docs] [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476365540.34.0.851935201688.issue22635@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I see. So the function's name is wrong now, too :(. OK, I guess using exitcode is more accurate then. Surprising that the original docs did not link to os.WEXITSTATUS. Maybe we could make a crosslink in the versionchanged entry to os.WEXITSTATUS in the way of explanation of what the difference between 'status' and 'exitcode' is? Otherwise the versionchanged sentence doesn't seem to tell the reader anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 11:06:29 2016 From: report at bugs.python.org (Cassaigne) Date: Thu, 13 Oct 2016 15:06:29 +0000 Subject: [docs] [issue22635] subprocess.getstatusoutput changed behavior in 3.4 (maybe 3.3.4?) In-Reply-To: <1413320958.05.0.462062330084.issue22635@psf.upfronthosting.co.za> Message-ID: <1476371189.88.0.760313600957.issue22635@psf.upfronthosting.co.za> Cassaigne added the comment: I add a crosslink to WEXITSTATUS function. According David Murray advices. ---------- Added file: http://bugs.python.org/file45079/issue22635-4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 13:03:18 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 13 Oct 2016 17:03:18 +0000 Subject: [docs] [issue28432] Fix doc of PyUnicode_EncodeLocale Message-ID: <1476378197.99.0.847074605857.issue28432@psf.upfronthosting.co.za> New submission from Xiang Zhang: The doc of PyUnicode_EncodeLocale conflicts between signature and content. In content, it should be *unicode* not *str*. ---------- assignee: docs at python components: Documentation files: PyUnicode_EncodeLocale_doc.patch keywords: patch messages: 278583 nosy: docs at python, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Fix doc of PyUnicode_EncodeLocale versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45081/PyUnicode_EncodeLocale_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:47:40 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Thu, 13 Oct 2016 20:47:40 +0000 Subject: [docs] [issue28393] Update encoding lookup docs wrt #27938 In-Reply-To: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> Message-ID: <1476391660.83.0.531466923874.issue28393@psf.upfronthosting.co.za> Ville Skytt? added the comment: codecs-doc-3 contains a versionadded note about us-ascii. I think that's the only end user visible change in the new implementation. ---------- Added file: http://bugs.python.org/file45085/codecs-doc-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:48:50 2016 From: report at bugs.python.org (=?utf-8?q?Maciej_Urba=C5=84ski?=) Date: Thu, 13 Oct 2016 20:48:50 +0000 Subject: [docs] [issue15013] smtplib: add low-level APIs to doc? In-Reply-To: <1338968663.18.0.754320203153.issue15013@psf.upfronthosting.co.za> Message-ID: <1476391730.37.0.903263581561.issue15013@psf.upfronthosting.co.za> Maciej Urba?ski added the comment: I guess documenting `data` method may still be needed after all. For now I followed the suggestions from comments to best of my ability. Please see attached patch. ---------- keywords: +patch nosy: +rooter Added file: http://bugs.python.org/file45086/issue15013.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:57:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Oct 2016 20:57:56 +0000 Subject: [docs] [issue21443] asyncio logging documentation clarifications In-Reply-To: <1399321197.68.0.955361534546.issue21443@psf.upfronthosting.co.za> Message-ID: <20161013205752.43839.1821.5BD24754@psf.io> Roundup Robot added the comment: New changeset e68b1b2515e9 by Guido van Rossum in branch '3.5': Issue #21443: Show how to change log level for asyncio. https://hg.python.org/cpython/rev/e68b1b2515e9 New changeset 660058d76788 by Guido van Rossum in branch '3.6': Issue #21443: Show how to change log level for asyncio. (Merge 3.5->3.6) https://hg.python.org/cpython/rev/660058d76788 New changeset 861d22bd852d by Guido van Rossum in branch 'default': Issue #21443: Show how to change log level for asyncio. (Merge 3.6->3.7) https://hg.python.org/cpython/rev/861d22bd852d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 16:58:53 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Oct 2016 20:58:53 +0000 Subject: [docs] [issue21443] asyncio logging documentation clarifications In-Reply-To: <1399321197.68.0.955361534546.issue21443@psf.upfronthosting.co.za> Message-ID: <1476392333.7.0.96887174842.issue21443@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks! Applied to 3.5, 3.6, 3.7. (We don't change 3.4 any more except for security fixes.) ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:07:14 2016 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 13 Oct 2016 21:07:14 +0000 Subject: [docs] [issue28393] Update encoding lookup docs wrt #27938 In-Reply-To: <1476013149.31.0.17921258936.issue28393@psf.upfronthosting.co.za> Message-ID: <1476392834.72.0.0468034392001.issue28393@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Thanks, Ville. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:24:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Oct 2016 21:24:56 +0000 Subject: [docs] [issue26869] unittest longMessage docs In-Reply-To: <1461743267.94.0.620093650485.issue26869@psf.upfronthosting.co.za> Message-ID: <20161013212453.82506.28966.DFCF3836@psf.io> Roundup Robot added the comment: New changeset 7eb4fe57492f by Guido van Rossum in branch '3.5': Issue #26869: Document unittest.TestCase.longMessage. (Mariatta) https://hg.python.org/cpython/rev/7eb4fe57492f New changeset d7279d803d1d by Guido van Rossum in branch '3.6': Issue #26869: Document unittest.TestCase.longMessage. (Mariatta) (3.5->3.6) https://hg.python.org/cpython/rev/d7279d803d1d New changeset c7c428350578 by Guido van Rossum in branch 'default': Issue #26869: Document unittest.TestCase.longMessage. (Mariatta) (3.6->3.7) https://hg.python.org/cpython/rev/c7c428350578 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:25:38 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Oct 2016 21:25:38 +0000 Subject: [docs] [issue26869] unittest longMessage docs In-Reply-To: <1461743267.94.0.620093650485.issue26869@psf.upfronthosting.co.za> Message-ID: <1476393938.38.0.830982219064.issue26869@psf.upfronthosting.co.za> Guido van Rossum added the comment: Done. Thanks! ---------- nosy: +gvanrossum resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:33:04 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Oct 2016 21:33:04 +0000 Subject: [docs] [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <20161013213300.1758.85765.1B9C41B8@psf.io> Roundup Robot added the comment: New changeset e05c546062a1 by Guido van Rossum in branch '3.5': Issue #18789: Update XML vulnerability table to use Safe/Vulnerable instead of No/Yes. https://hg.python.org/cpython/rev/e05c546062a1 New changeset beed43d7dc46 by Guido van Rossum in branch '3.6': Issue #18789: Update XML vulnerability table to use Safe/Vulnerable instead of No/Yes. (3.5->3.6) https://hg.python.org/cpython/rev/beed43d7dc46 New changeset 9513fac97ddd by Guido van Rossum in branch 'default': Issue #18789: Update XML vulnerability table to use Safe/Vulnerable instead of No/Yes. (3.6->3.7) https://hg.python.org/cpython/rev/9513fac97ddd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:33:31 2016 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 13 Oct 2016 21:33:31 +0000 Subject: [docs] [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <1476394411.21.0.972778004458.issue18789@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks again! ---------- nosy: +gvanrossum resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 17:35:36 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Oct 2016 21:35:36 +0000 Subject: [docs] [issue18789] XML Vunerability Table Unclear In-Reply-To: <1377008574.91.0.12100936862.issue18789@psf.upfronthosting.co.za> Message-ID: <20161013213533.5114.44488.B2F8D6EF@psf.io> Roundup Robot added the comment: New changeset 760403522d6b by Guido van Rossum in branch '2.7': Issue #18789: Update XML vulnerability table to use Safe/Vulnerable instead of No/Yes. (backport to 2.7) https://hg.python.org/cpython/rev/760403522d6b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 19:50:59 2016 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 13 Oct 2016 23:50:59 +0000 Subject: [docs] [issue28437] Class definition is not consistent with types.new_class Message-ID: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> New submission from Neil Girdhar: Minimum working example: class MyMetaclass(type): pass class OtherMetaclass(type): pass def metaclass_callable(name, bases, namespace): return OtherMetaclass(name, bases, namespace) class MyClass(metaclass=MyMetaclass): pass try: class MyDerived(MyClass, metaclass=metaclass_callable): pass except: print("Gotcha!") from types import new_class MyDerived = new_class("MyDerived", (), dict(metaclass=metaclass_callable)) print(type(MyDerived)) This is because something happened along the way and Objects/typeobject.c:type_new no longer coincides with Lib/types.py:new_class. The Python version conditionally calls _calculate_meta whereas the C version calls it unconditionally. I consider the C implementation to be the "correct" version. I suggest that * the Python version be made to coincide with the C version. * the documentation be made to coincide with the C version. Specifically, section 3.3.3.2 should read: "The metaclass of a class definition is selected from the explicitly specified metaclass (if any) and the metaclasses (i.e. type(cls)) of all specified base classes. The selected metaclass is the one which is a subtype of all of these candidate metaclasses. If none of the candidate metaclasses meets that criterion, then the class definition will fail with TypeError. If provided, the explicit metaclass must be a callable accepting the positional arguments (name, bases, _dict) as in the three argument form of the built-in type function." ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 278625 nosy: docs at python, neil.g priority: normal severity: normal status: open title: Class definition is not consistent with types.new_class type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 13 22:22:57 2016 From: report at bugs.python.org (Neil Girdhar) Date: Fri, 14 Oct 2016 02:22:57 +0000 Subject: [docs] [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476411777.06.0.509767865029.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: Oops, I meant: MyDerived = new_class("MyDerived", (MyClass,), dict(metaclass=metaclass_callable)) Nevertheless, the exception line number is totally off because it's tripping in the C code rather than in the Python code of the types library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 00:14:26 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 14 Oct 2016 04:14:26 +0000 Subject: [docs] [issue28438] Wrong link in pkgutil.get_data doc Message-ID: <1476418466.2.0.122595119446.issue28438@psf.upfronthosting.co.za> New submission from Xiang Zhang: The get_data link in pkgutil.get_data doc refers to itself which does not help reading. I think it's better for it to refer to importlib.abc.ResourceLoader.get_data. ---------- assignee: docs at python components: Documentation files: pkgutil.get_data_doc.patch keywords: patch messages: 278631 nosy: docs at python, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Wrong link in pkgutil.get_data doc versions: Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45087/pkgutil.get_data_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 01:53:28 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 14 Oct 2016 05:53:28 +0000 Subject: [docs] [issue28438] Wrong link in pkgutil.get_data doc In-Reply-To: <1476418466.2.0.122595119446.issue28438@psf.upfronthosting.co.za> Message-ID: <1476424408.24.0.71765661583.issue28438@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The patch looks good to me. Thank you, Xiang. I will apply it. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 02:00:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Oct 2016 06:00:56 +0000 Subject: [docs] [issue28438] Wrong link in pkgutil.get_data doc In-Reply-To: <1476418466.2.0.122595119446.issue28438@psf.upfronthosting.co.za> Message-ID: <20161014060044.15383.54650.1DD29F1D@psf.io> Roundup Robot added the comment: New changeset 7fb90c4ae643 by Senthil Kumaran in branch '3.5': Issue28438 - Fix the link for pkgutil.get_data doc. Patch contributed by Xiang Zhang. https://hg.python.org/cpython/rev/7fb90c4ae643 New changeset f2110f41012e by Senthil Kumaran in branch '3.6': [merge from 3.5] Issue28438 - Fix the link for pkgutil.get_data doc. https://hg.python.org/cpython/rev/f2110f41012e New changeset 897fe8fa14b5 by Senthil Kumaran in branch 'default': [merge from 3.6] Issue28438 - Fix the link for pkgutil.get_data doc. https://hg.python.org/cpython/rev/897fe8fa14b5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 02:01:17 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 14 Oct 2016 06:01:17 +0000 Subject: [docs] [issue28438] Wrong link in pkgutil.get_data doc In-Reply-To: <1476418466.2.0.122595119446.issue28438@psf.upfronthosting.co.za> Message-ID: <1476424877.68.0.209999469159.issue28438@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 02:02:17 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 14 Oct 2016 06:02:17 +0000 Subject: [docs] [issue28438] Wrong link in pkgutil.get_data doc In-Reply-To: <1476418466.2.0.122595119446.issue28438@psf.upfronthosting.co.za> Message-ID: <1476424937.75.0.436174436199.issue28438@psf.upfronthosting.co.za> Xiang Zhang added the comment: Thanks Senthil. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 02:50:50 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 14 Oct 2016 06:50:50 +0000 Subject: [docs] [issue28432] Fix doc of PyUnicode_EncodeLocale In-Reply-To: <1476378197.99.0.847074605857.issue28432@psf.upfronthosting.co.za> Message-ID: <1476427850.91.0.318393789325.issue28432@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 10:35:11 2016 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 14 Oct 2016 14:35:11 +0000 Subject: [docs] [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476455711.2.0.653660617677.issue28437@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 11:37:08 2016 From: report at bugs.python.org (Evgeny Kapun) Date: Fri, 14 Oct 2016 15:37:08 +0000 Subject: [docs] [issue13322] buffered read() and write() does not raise BlockingIOError In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1476459428.64.0.287651759742.issue13322@psf.upfronthosting.co.za> Changes by Evgeny Kapun : ---------- nosy: +abacabadabacaba _______________________________________ Python tracker _______________________________________ From mariatta.wijaya at gmail.com Fri Oct 14 12:18:30 2016 From: mariatta.wijaya at gmail.com (mariatta.wijaya at gmail.com) Date: Fri, 14 Oct 2016 16:18:30 -0000 Subject: [docs] Make the documentation for statistics' data argument clearer. (issue 27825) Message-ID: <20161014161830.2919.30093@psf.upfronthosting.co.za> http://bugs.python.org/review/27825/diff/18782/Doc/library/statistics.rst File Doc/library/statistics.rst (right): http://bugs.python.org/review/27825/diff/18782/Doc/library/statistics.rst#newcode241 Doc/library/statistics.rst:241: >>> median_grouped([F(55, 7), F(52, 3), F(53, 3), F(5, 3)]) On 2016/10/08 02:20:06, stevenjd wrote: > I dislike this example as it is misleading. > > median_grouped() will work with arbitrary numbers, as in this example, but the > intention is that the numbers are the mid-point of data classes, often called > "class marks". So you should expect that the data are equally-spaced values > (median_grouped assumes a class interval of 1 by default, but it can be > changed). Examples should be equally-spaced (possibly with gaps -- it is okay if > a class has no values). > > Although median_grouped() will work with Fractions, I think it is unlikely that > anyone would give it actual data in Fractions. I'd prefer to see more realistic > examples: ints, floats or Decimals. > > Perhaps the documentation needs to define the relevant statistics terminology? > "Class interval", "class mark", "class limits". See: > > http://mathworld.wolfram.com/ClassMark.html > Steven, thank you very much for the feedback. I've been working on another patch that will address other comments above. But since I'm not a statistician, I'm a bit stumped on how to improve this particular example about median_grouped(). http://bugs.python.org/review/27825/ From report at bugs.python.org Fri Oct 14 12:53:42 2016 From: report at bugs.python.org (Evgeny Kapun) Date: Fri, 14 Oct 2016 16:53:42 +0000 Subject: [docs] [issue28445] Wrong documentation for GzipFile.peek Message-ID: <1476464022.39.0.651124050997.issue28445@psf.upfronthosting.co.za> New submission from Evgeny Kapun: >From the documentation for GzipFile.peek(): At most one single read on the compressed stream is done to satisfy the call. If "compressed stream" means the underlying file object, then this is not true. The method tries to return at least one byte, unless the stream is at EOF. It is possible to create arbitrarily long compressed stream that would decompress to nothing, and the implementation would read the entire stream in this case. Because the length of the stream is not known in advance, several reads may be required for this. Perhaps the documentation for GzipFile.peek() should be made the same as that for BZ2File.peek() and LZMAFile.peek(). ---------- assignee: docs at python components: Documentation messages: 278656 nosy: abacabadabacaba, docs at python priority: normal severity: normal status: open title: Wrong documentation for GzipFile.peek versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 13:24:04 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Oct 2016 17:24:04 +0000 Subject: [docs] [issue28445] Wrong documentation for GzipFile.peek In-Reply-To: <1476464022.39.0.651124050997.issue28445@psf.upfronthosting.co.za> Message-ID: <1476465844.3.0.198327055913.issue28445@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 13:46:47 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 14 Oct 2016 17:46:47 +0000 Subject: [docs] [issue28445] Wrong documentation for GzipFile.peek In-Reply-To: <1476464022.39.0.651124050997.issue28445@psf.upfronthosting.co.za> Message-ID: <1476467207.41.0.346252286194.issue28445@psf.upfronthosting.co.za> Xiang Zhang added the comment: The "compressed stream" is not the underlying file object but _GzipReader. And actually the "at most one single reader" is the characteristic of io.BufferedReader.peek, you can see it in the doc. Maybe it needs multiple reads on the file object in a single peek, but they are all encapsulated in the _GzipReader.read. So at the point of GzipFile.peek, it's still a single read. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 15:54:49 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Oct 2016 19:54:49 +0000 Subject: [docs] [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1476474889.15.0.6341012476.issue25152@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: docs at python -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 16:00:31 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Oct 2016 20:00:31 +0000 Subject: [docs] [issue28424] pkgutil.get_data() doesn't work with namespace packages In-Reply-To: <1476315360.41.0.557766587306.issue28424@psf.upfronthosting.co.za> Message-ID: <1476475231.93.0.278965713816.issue28424@psf.upfronthosting.co.za> Brett Cannon added the comment: Xiang is right about why this doesn't work. If you would like to propose a patch to update the wording of the docs, Douglas, we could then consider applying it. It could be as simple as just adding "(e.g. the load for namespace packages does not implement get_data())". And there is no equivalent feature in importlib (yet; it's on my todo list). ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 17:06:22 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Oct 2016 21:06:22 +0000 Subject: [docs] [issue28403] Porting guide: disabling & warning on implicit unicode conversions In-Reply-To: <1476071532.35.0.73217429855.issue28403@psf.upfronthosting.co.za> Message-ID: <1476479182.65.0.597518716661.issue28403@psf.upfronthosting.co.za> Brett Cannon added the comment: If a new codec gets added to 2.7 then I'm fine with the proposed change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 17:21:57 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Oct 2016 21:21:57 +0000 Subject: [docs] [issue28415] PyUnicode_FromFromat interger format handling different from printf about zeropad In-Reply-To: <1476176180.11.0.398413685253.issue28415@psf.upfronthosting.co.za> Message-ID: <1476480117.21.0.0894749103572.issue28415@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I presume that PyUnicode_FromFormat is responsible for the first of the following: >>> '%010.5d' % 100 '0000000100' >>> b'%010.5d' % 100 b'0000000100' I am strongly of the opinion that the behavior should be left alone and the C-API doc changed by either 1) replacing 'exactly' with 'nearly' or 2) adding the following: "except that a 0 conversion flag is not ignored when a precision is given for d, i, o, u, x and X conversion types" (and other exceptions as discovered). I took the terms 'conversion flag' and 'conversion type' from https://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting https://docs.python.org/3/library/stdtypes.html#printf-style-bytes-formatting I consider the Python behavior to be superior. The '0' conversion flag, the '.' precision indicator, and the int conversion types are literal characters. If one does not want the '0' conversion, one should omit it and not write it to be ignored. >>> '%10.5d' % 100 ' 00100' And I consider the abolition of int 'precision', inr {} formatting even better. >>> '{:010.5d}'.format(100) Traceback (most recent call last): File "", line 1, in '{:010.5d}'.format(100) ValueError: Precision not allowed in integer format specifier It has always been a source of confusion, and there is hardly any real-world use case for a partial 0 fill. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, eric.smith, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 17:34:58 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 14 Oct 2016 21:34:58 +0000 Subject: [docs] [issue28436] GzipFile doesn't properly handle short reads and writes on the underlying stream In-Reply-To: <1476390564.38.0.787956404388.issue28436@psf.upfronthosting.co.za> Message-ID: <1476480898.19.0.084113970308.issue28436@psf.upfronthosting.co.za> Martin Panter added the comment: I would fix the documentation to say the underlying stream should do ?exact? reads and writes, e.g. one that implements io.BufferedIOBase.read(size) or write(). In my experience, most APIs in Python?s library assume or require this, rather than the ?raw? behaviour. Is it likely that people are passing raw FileIO or similar objects to GzipFile, or is this just a theoretical problem? Also related: In Issue 24291 and Issue 26721, we realized that all the servers based on socketserver could unexpectedly do short writes, which was a practical bug (not just theoretical). I changed socketserver over to doing exact writes, and added a workaround in the wsgiref module to handle partial writes. See for the altered documentation. Other APIs that come to mind are shutil.copyfileobj() (documentation proposed in Issue 24291), and io.TextIOWrapper (documented as requiring BufferedIOBase). Also, the bzip and LZMA modules seem equally affected as gzip. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python stage: -> needs patch versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 17:37:27 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 14 Oct 2016 21:37:27 +0000 Subject: [docs] [issue28396] Remove *.pyo references from man page Message-ID: <1476481047.43.0.417931922217.issue28396@psf.upfronthosting.co.za> New submission from Brett Cannon: The patch LGTM. ---------- assignee: docs at python -> brett.cannon nosy: +brett.cannon versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 14 18:20:07 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 14 Oct 2016 22:20:07 +0000 Subject: [docs] [issue28445] Wrong documentation for GzipFile.peek In-Reply-To: <1476464022.39.0.651124050997.issue28445@psf.upfronthosting.co.za> Message-ID: <1476483607.81.0.253601012195.issue28445@psf.upfronthosting.co.za> Martin Panter added the comment: The peek() method was originally added by Issue 9962, where Antoine was trying to imitate the BufferedReader.peek() API. However because ?the number of bytes returned may be more or less than requested?, I never understood what this methods were good for; see also Issue 5811. I think we could at least remove the claim about ?at most one single read?. That is just describing an internal detail. The documentation for bzip and LZMA is slightly more useful IMO because it says ?at least one byte of data will be returned, unless EOF has been reached?. This guarantee is actually missing from the underlying BufferedReader.peek() documentation, though I think both io and _pyio implement it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 00:44:37 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 15 Oct 2016 04:44:37 +0000 Subject: [docs] [issue27825] Make the documentation for statistics' data argument clearer. In-Reply-To: <1471813007.76.0.49945343113.issue27825@psf.upfronthosting.co.za> Message-ID: <1476506677.42.0.2296845996.issue27825@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Updated patch based on feedback. Steven, I removed the example of median_grouped using Fractions. Would you be able to suggest better examples to be added in the docs? I also noticed that there are more examples of median_grouped in the paragraph below. Thanks. ---------- Added file: http://bugs.python.org/file45097/issue27825v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 02:55:16 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Oct 2016 06:55:16 +0000 Subject: [docs] [issue28424] pkgutil.get_data() doesn't work with namespace packages In-Reply-To: <1476315360.41.0.557766587306.issue28424@psf.upfronthosting.co.za> Message-ID: <1476514515.95.0.137073552812.issue28424@psf.upfronthosting.co.za> Nick Coghlan added the comment: For 3.4/5/6, I agree this is a documentation issue, where the data files need to be given a *non*-namespaced directory to live in. However, it's worth explicitly noting that subpackages of namespace packages can themselves be regular packages, so one possible solution is to do: pkg_util.get_data('my_namespace.my_package_data', 'resourcename') rather than storing the data directly at the namespace level. ---------- versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 03:49:01 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Oct 2016 07:49:01 +0000 Subject: [docs] [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476517741.09.0.266317624806.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm not clear on what discrepancy you're referring to, as I get the same (expected) exception for both the class statement and the dynamic type creation: >>> class MyDerived(MyClass, metaclass=metaclass_callable): ... pass ... Traceback (most recent call last): File "", line 1, in File "", line 2, in metaclass_callable TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases >>> MyDerivedDynamic = new_class("MyDerivedDynamic", (MyClass,), dict(metaclass=metaclass_callable)) Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.5/types.py", line 57, in new_class return meta(name, bases, ns, **kwds) File "", line 2, in metaclass_callable TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases This is due to the fact that your custom metaclass function returns an instance of a subclass of type, so we end up in type_new to actually create the type, which fails the metaclass consistency check. One of the subtle intricacies here is that, for class statements, the logic that corresponds to types.prepare_class in the Python implementation is actually in the __build_class__ builtin for the C implementation - when there's a custom metaclass that *doesn't* return a subclass of type, we don't end up running type_new at all. As a result of this, *both* implementations include a conditional check for a more derived metaclass in their namespace preparation logic, as well as an unconditional call to that metaclass derivation logic from type_new if the calculated metaclass is either type itself, or a subclass that calls up to super().__new__. Most relevant issues and commit history: - last update to C implementation - http://bugs.python.org/issue1294232 - https://hg.python.org/cpython/rev/c2a89b509be4 - addition of pure Python implementation - http://bugs.python.org/issue14588 - https://hg.python.org/cpython/rev/befd56673c80 The test cases in those commits (particularly the first one) should help make it clear what is and isn't supported behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 03:50:19 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Oct 2016 07:50:19 +0000 Subject: [docs] [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476517819.18.0.814950024101.issue28437@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 03:53:12 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Oct 2016 07:53:12 +0000 Subject: [docs] [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476517992.47.0.408249549224.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note: I'd be open to suggestions for comments in the pure Python implementation that would have helped you find its CPython counterpart in bltinmodule.c - it isn't immediately obvious from the current code that the actual __build_class__ code invoked by CPython's class statement is somewhere else entirely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 04:01:29 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 15 Oct 2016 08:01:29 +0000 Subject: [docs] [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476518489.44.0.425203542437.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: (I'll also note that my final comment there is rather different from my first draft, as I almost forgot myself that the namespace preparation logic lives in __build_class__ rather than type_new. Class definitions can actually bypass type entirely, even in Python 3: >>> def the_one_class(*args): ... return 1 ... >>> class TheOne(metaclass=the_one_class): pass ... >>> TheOne 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 07:00:13 2016 From: report at bugs.python.org (Lele Gaifax) Date: Sat, 15 Oct 2016 11:00:13 +0000 Subject: [docs] [issue28450] Misleading/inaccurate documentation about unknown escape sequences Message-ID: <1476529213.17.0.132534478532.issue28450@psf.upfronthosting.co.za> New submission from Lele Gaifax: Python 3.6+ is stricter about escaped sequences in string literals. The documentation need some improvement to clarify the change: for example https://docs.python.org/3.6/library/re.html#re.sub first says that ?Unknown escapes such as \& are left alone? then, in the ?Changed in? section below, states that ?[in Py3.6] Unknown escapes consisting of '\' and an ASCII letter now are errors?. When such changes are made, usually the documentation reports the ?new?/?current? behaviour, and the history section mention when and how some detail changed. See this thread for details: https://mail.python.org/pipermail/python-list/2016-October/715462.html ---------- assignee: docs at python components: Documentation messages: 278716 nosy: docs at python, lelit priority: normal severity: normal status: open title: Misleading/inaccurate documentation about unknown escape sequences versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 13:49:51 2016 From: report at bugs.python.org (Neil Girdhar) Date: Sat, 15 Oct 2016 17:49:51 +0000 Subject: [docs] [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476553791.06.0.388958262018.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: The documentation suggests that you can have a metaclass that does is not the "most derived metaclass" provided you specify one that is not an instance of type. This doesn't work in CPython, so I would suggest fixing the documentation using the text I provided. After that, it should be clear that there's no reason for "if isinstance(meta, type):" in the code, and the Python code should be restructured. The point is that these two functions drifted apart somewhere around Python 3, and they need to be brought back together. I only discovered this because it was possible in Python 2 to have a non-type metaclass that is not the most derived metaclass. That has disappeared in CPython 3, except from the documentation and Lib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 13:52:56 2016 From: report at bugs.python.org (Neil Girdhar) Date: Sat, 15 Oct 2016 17:52:56 +0000 Subject: [docs] [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476553976.83.0.816177933831.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: >From your comment: >>> MyDerivedDynamic = new_class("MyDerivedDynamic", (MyClass,), dict(metaclass=metaclass_callable)) Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python3.5/types.py", line 57, in new_class return meta(name, bases, ns, **kwds) File "", line 2, in metaclass_callable TypeError: metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases This is in the wrong place. It should be tripping the exception you defined in Lib/types.py. (It will do that if you replace metaclass_callable with OtherMetaclass.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 15 13:56:05 2016 From: report at bugs.python.org (Neil Girdhar) Date: Sat, 15 Oct 2016 17:56:05 +0000 Subject: [docs] [issue28437] Class definition is not consistent with types.new_class In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476554165.54.0.318433844064.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: "As a result of this, *both* implementations include a conditional check for a more derived metaclass in their namespace preparation logic, as well as an unconditional call to that metaclass derivation logic from type_new if the calculated metaclass is either type itself, or a subclass that calls up to super().__new__." I don't see why that's necessary. Either you should have the check in one place, or else have two equivalent checks. Right now, the Python library is confusingly checking a subset of cases (when isinstance(meta, type)). I suggest that you have the Python library check the entire set of cases so that the raised exception shows up in the right place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:04:33 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 16 Oct 2016 07:04:33 +0000 Subject: [docs] [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476601473.07.0.598731213956.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: Why should it trip the PEP 3115 namespace preparation exception? We only check for __prepare__ (and hence need to do an early most-derived metaclass resolution) on instances of "type", not on arbitrary callables used as a metaclass hint The checks are different in the two places because the rules are different in the two places. (One case that *can* be made is that we should be throwing different exceptions or chaining them to show which metaclass resolution failed, rather than re-using the same message in both places). This means that when you define a non-type metaclass hint, you're bypassing *all* of the PEP 3115 machinery, including the early metaclass resolution. However, if your metaclass hint still creates a type instance, you're not bypassing tp_new. If you're asking "Where is the bug in the presented example code?", it's here, in the definition of your metaclass hint: def metaclass_callable(name, bases, namespace): return OtherMetaclass(name, bases, namespace) Instantiating instances of "type" directly in Python 3 bypasses the PEP 3115 machinery - that's the entire reason that types.new_class was added. So if you want that metaclass hint to be PEP 3115 compliant, you need to explicitly write it that way: def metaclass_callable(name, bases, namespace): return types.new_class(name, bases, dict(metaclass=OtherMetaclass) ---------- resolution: not a bug -> stage: resolved -> status: closed -> open title: Class definition is not consistent with types.new_class -> Documentation for handling of non-type metaclass hints is unclear _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:22:48 2016 From: report at bugs.python.org (Neil Girdhar) Date: Sun, 16 Oct 2016 07:22:48 +0000 Subject: [docs] [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476602568.15.0.740217518653.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: Thanks for taking the time to explain, but it's still not working for me: from types import new_class class MyMetaclass(type): pass class OtherMetaclass(type): pass def metaclass_callable(name, bases, namespace): return new_class(name, bases, dict(metaclass=OtherMetaclass)) class MyClass(metaclass=MyMetaclass): pass try: class MyDerived(MyClass, metaclass=metaclass_callable): pass except: print("Gotcha!") try: MyDerived = new_class("MyDerived", (MyClass,), dict(metaclass=metaclass_callable)) except: print("Gotcha again!") So my questions are: 1. Why shouldn't Lib/types:new_class behave in exactly the same way as declaring a class using "class?" notation? 2. What's the point of checking if the metaclass is an instance of type? It seems to me that in Python 2, non-type metaclasses did not have to be the "most derived class" (that's what the documentation seems to suggest with the second rule). However, we no longer accept that in CPython 3 ??neither in the Lib/types, nor in a regular declaration. In fact, the exception is: "metaclass conflict: " "the metaclass of a derived class " "must be a (non-strict) subclass " "of the metaclasses of all its bases"); So why not just check that unconditionally in Lib/types.py? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:37:12 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 16 Oct 2016 07:37:12 +0000 Subject: [docs] [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476603432.33.0.261832836777.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: Because they're checking for different things: - types.prepare_class is only checking "How do I call __prepare__?". It only triggers type resolution at that point if the metaclass hint is an instance of type, otherwise it skips that process entirely and queries the metaclass hint directly. - type.__new__ is checking "Can I actually create a new instance of this metaclass with these bases?". It can only do that if either the metaclass being instantiated is a subclass of all the bases of the type being defined, or else such a metaclass exists amongst the bases. To be clear, your example isn't failing due to the way MyDerived is defined - it's failing because OtherMetaclass is itself an instance of type, and you're declaring it (directly or indirectly) as the metaclass of MyDerived, while inheriting from MyClass, which is an instance of MyMetaclass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:40:37 2016 From: report at bugs.python.org (Neil Girdhar) Date: Sun, 16 Oct 2016 07:40:37 +0000 Subject: [docs] [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476603637.87.0.528236304614.issue28437@psf.upfronthosting.co.za> Neil Girdhar added the comment: Okay, I understand what you're saying, but I it says in the documentation that "if an explicit metaclass is given and it is not an instance of type(), then it is used directly as the metaclass". My recent updated "metaclass_callable" is not an instance of type. Why should it raise an exception? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:45:35 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 16 Oct 2016 07:45:35 +0000 Subject: [docs] [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476603935.75.0.438679158092.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: Oops, couple of typos: "... only triggers metaclass resolution at that point ..." "... if either the metaclass being instantiated is a subclass of all the metaclasses of all of the bases ..." But the only way to bypass the "most derived metaclass" rule is for the the metaclass hint to be a callable that creates something that *isn't* a subclass of type. If you look at the tracebacks you're getting, you should see that the failure *isn't* in the class statement or the outer dynamic type, it's in "metaclass_callable", where the *inner* dynamic type creation is failing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 03:49:51 2016 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 16 Oct 2016 07:49:51 +0000 Subject: [docs] [issue28437] Documentation for handling of non-type metaclass hints is unclear In-Reply-To: <1476402659.83.0.311331660228.issue28437@psf.upfronthosting.co.za> Message-ID: <1476604191.94.0.290809803734.issue28437@psf.upfronthosting.co.za> Nick Coghlan added the comment: The "used directly as the metaclass" is a reference to https://docs.python.org/3/reference/datamodel.html#creating-the-class-object further down, and specifically the "metaclass(name, bases, namespace, **kwds)" call. It's not saying Python has a way to bypass that instantiation process. As a result, your code is consistently getting to that step just fine, but *that call* is throwing an exception. Hence my comment earlier that there's a case to be made that we should be better indicating where we were in the type creation process when the metaclass resolution failed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:04:15 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:04:15 +0000 Subject: [docs] [issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions In-Reply-To: <1476529213.17.0.132534478532.issue28450@psf.upfronthosting.co.za> Message-ID: <1476605054.96.0.78187728881.issue28450@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your report Lele. Agreed, the documentation looks misleading. Do you want to provide more clear wording? ---------- nosy: +Rosuav, mrabarnett, nedbat, serhiy.storchaka stage: -> needs patch title: Misleading/inaccurate documentation about unknown escape sequences -> Misleading/inaccurate documentation about unknown escape sequences in regular expressions type: -> enhancement versions: +Python 3.5, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:12:09 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:12:09 +0000 Subject: [docs] [issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions In-Reply-To: <1476529213.17.0.132534478532.issue28450@psf.upfronthosting.co.za> Message-ID: <1476605529.45.0.593165985574.issue28450@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Regular Expressions nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:12:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:12:20 +0000 Subject: [docs] [issue24896] It is undocumented that re.UNICODE affects re.IGNORECASE In-Reply-To: <1439987891.31.0.547960058443.issue24896@psf.upfronthosting.co.za> Message-ID: <1476605540.41.0.584667161892.issue24896@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 04:52:58 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 08:52:58 +0000 Subject: [docs] [issue22949] fnmatch.translate doesn't add ^ at the beginning In-Reply-To: <1417012488.81.0.131238508635.issue22949@psf.upfronthosting.co.za> Message-ID: <1476607978.34.0.430034480421.issue22949@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since issue22493 fnmatch.translate() uses scoped modifiers: r'(?s:%s)\Z' % res. Here is a patch that updates the documentation for fnmatch.translate(). ---------- stage: needs patch -> patch review versions: +Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 08:52:36 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 12:52:36 +0000 Subject: [docs] [issue22949] fnmatch.translate doesn't add ^ at the beginning In-Reply-To: <1417012488.81.0.131238508635.issue22949@psf.upfronthosting.co.za> Message-ID: <1476622355.99.0.0868880546975.issue22949@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +patch Added file: http://bugs.python.org/file45116/doc_fnmatch_translate.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 12:19:41 2016 From: report at bugs.python.org (siccegge) Date: Sun, 16 Oct 2016 16:19:41 +0000 Subject: [docs] [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument Message-ID: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> New submission from siccegge: Hi! Both the 3.4 version and the current version of python documentation wrt the argparse module imply convert_arg_line_to_args replacements needs to accept two arguments while it acutally only works with one. (Not completely sure about details but documentation really could be clearer!) https://docs.python.org/3.4/library/argparse.html#argparse.ArgumentParser.convert_arg_line_to_args Example from documentation def convert_arg_line_to_args(self, arg_line): return arg_line.split() If codeparser = argparse.ArgumentParser actually does def convert_arg_line_to_args(self, arg_line): return arg_line.split() parser = argparse.ArgumentParser() parser.convert_arg_line_to_args = convert_arg_line_to_args The code fails File "/usr/lib/python3.5/argparse.py", line 1735, in parse_args args, argv = self.parse_known_args(args, namespace) File "/usr/lib/python3.5/argparse.py", line 1767, in parse_known_args namespace, args = self._parse_known_args(args, namespace) File "/usr/lib/python3.5/argparse.py", line 1779, in _parse_known_args arg_strings = self._read_args_from_files(arg_strings) File "/usr/lib/python3.5/argparse.py", line 2037, in _read_args_from_files for arg in self.convert_arg_line_to_args(arg_line): TypeError: convert_arg_line_to_args() missing 1 required positional argument: 'arg_line' ---------- assignee: docs at python components: Documentation messages: 278771 nosy: docs at python, siccegge priority: normal severity: normal status: open title: argparse: convert_arg_line_to_args does not actually expect self argument type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 13:15:54 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Oct 2016 17:15:54 +0000 Subject: [docs] [issue27896] Allow passing sphinx options to Doc/Makefile In-Reply-To: <1472573019.01.0.777773652271.issue27896@psf.upfronthosting.co.za> Message-ID: <20161016171538.15637.87183.202B344E@psf.io> Roundup Robot added the comment: New changeset 3884a7e3df1c by Victor Stinner in branch 'default': Issue #27896: Allow passing sphinx options to Doc/Makefile https://hg.python.org/cpython/rev/3884a7e3df1c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 13:17:08 2016 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Oct 2016 17:17:08 +0000 Subject: [docs] [issue27896] Allow passing sphinx options to Doc/Makefile In-Reply-To: <1472573019.01.0.777773652271.issue27896@psf.upfronthosting.co.za> Message-ID: <1476638228.16.0.749167247519.issue27896@psf.upfronthosting.co.za> STINNER Victor added the comment: I pushed your patch to the default branch (Python 3.7). Thanks Julien. ---------- nosy: +haypo resolution: -> fixed status: open -> closed type: -> enhancement versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 14:47:39 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 16 Oct 2016 18:47:39 +0000 Subject: [docs] [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument In-Reply-To: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> Message-ID: <1476643659.36.0.306604781692.issue28455@psf.upfronthosting.co.za> R. David Murray added the comment: The documentation assumes you know how python class methods work, but I agree that the wording is not entirely obvious even then and could be improved. In particular it should make clear that the example shows how to define the function for subclassing or assignment to the class object. If you assign it to the instance, as in your example, then indeed self does not get passed and you want a true single argument function. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 17:46:33 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Oct 2016 21:46:33 +0000 Subject: [docs] [issue28432] Fix doc of PyUnicode_EncodeLocale In-Reply-To: <1476378197.99.0.847074605857.issue28432@psf.upfronthosting.co.za> Message-ID: <20161016214630.32911.94125.19A716F2@psf.io> Roundup Robot added the comment: New changeset a4889719e3c2 by Berker Peksag in branch '3.5': Issue #28432: Fix first parameter name in PyUnicode_EncodeLocale documentation https://hg.python.org/cpython/rev/a4889719e3c2 New changeset 1fc08c283f8f by Berker Peksag in branch '3.6': Issue #28432: Merge from 3.5 https://hg.python.org/cpython/rev/1fc08c283f8f New changeset 767a78aacd29 by Berker Peksag in branch 'default': Issue #28432: Merge from 3.6 https://hg.python.org/cpython/rev/767a78aacd29 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 17:47:21 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 16 Oct 2016 21:47:21 +0000 Subject: [docs] [issue28432] Fix doc of PyUnicode_EncodeLocale In-Reply-To: <1476378197.99.0.847074605857.issue28432@psf.upfronthosting.co.za> Message-ID: <1476654441.82.0.617490801172.issue28432@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks. ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:30:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 22:30:20 +0000 Subject: [docs] [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1476657020.11.0.120927803515.issue26656@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett type: behavior -> enhancement versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 18:32:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Oct 2016 22:32:17 +0000 Subject: [docs] [issue23532] add example of 'first match wins' to regex "|" documentation? In-Reply-To: <1424991623.26.0.907615110662.issue23532@psf.upfronthosting.co.za> Message-ID: <1476657138.0.0.431148034039.issue23532@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Regular Expressions type: behavior -> enhancement versions: +Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 22:50:28 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 17 Oct 2016 02:50:28 +0000 Subject: [docs] [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument In-Reply-To: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> Message-ID: <1476672628.91.0.847510946093.issue28455@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Hello, I updated the documentation with an example of how to override ArgumentParser class. Hope this is a clearer than before. Please review. Thanks :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45121/issue28455.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 23:14:51 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Oct 2016 03:14:51 +0000 Subject: [docs] [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument In-Reply-To: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> Message-ID: <20161017031448.17195.88324.8E6D2080@psf.io> Roundup Robot added the comment: New changeset 4f8f7403881f by Berker Peksag in branch '3.5': Issue #28455: Clarify example of overriding the convert_arg_line_to_args method https://hg.python.org/cpython/rev/4f8f7403881f New changeset 0b29adb5c804 by Berker Peksag in branch '3.6': Issue #28455: Merge from 3.5 https://hg.python.org/cpython/rev/0b29adb5c804 New changeset a293e5db9083 by Berker Peksag in branch 'default': Issue #28455: Merge from 3.6 https://hg.python.org/cpython/rev/a293e5db9083 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 16 23:17:26 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 17 Oct 2016 03:17:26 +0000 Subject: [docs] [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument In-Reply-To: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> Message-ID: <1476674246.82.0.0597229460589.issue28455@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! I removed the import statement and simplified the last sentence a bit. ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 00:38:36 2016 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 17 Oct 2016 04:38:36 +0000 Subject: [docs] [issue13322] buffered read() and write() does not raise BlockingIOError In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1476679116.57.0.206468847927.issue13322@psf.upfronthosting.co.za> Changes by Petri Lehtinen : ---------- nosy: -petri.lehtinen _______________________________________ Python tracker _______________________________________ From sam.lunt at transmarketgroup.com Fri Oct 14 14:05:55 2016 From: sam.lunt at transmarketgroup.com (Sam Lunt) Date: Fri, 14 Oct 2016 13:05:55 -0500 Subject: [docs] Type in Documentaiton for asyncio.StreamReader.readuntil Message-ID: Hello, For the documentation on the member function readuntil of asyncio.StreamReader, the default separator is listed as b'n', when it is actually b'\n'. The code in the python library is correct, this is just an issue in the documentation. Thanks, Sam -------------- next part -------------- An HTML attachment was scrubbed... URL: From steve at pearwood.info Sat Oct 15 21:17:16 2016 From: steve at pearwood.info (Steven D'Aprano) Date: Sun, 16 Oct 2016 12:17:16 +1100 Subject: [docs] Make the documentation for statistics' data argument clearer. (issue 27825) In-Reply-To: <20161014161830.2919.30093@psf.upfronthosting.co.za> References: <20161014161830.2919.30093@psf.upfronthosting.co.za> Message-ID: <20161016011716.GW22471@ando.pearwood.info> On Fri, Oct 14, 2016 at 04:18:30PM -0000, mariatta.wijaya at gmail.com wrote: [...] > I've been working on another patch that will address other comments > above. But since I'm not a statistician, I'm a bit stumped on how to > improve this particular example about median_grouped(). Okay, I'll work on that particular example. Thanks for your help and I look forward to the revised patch! -- Steve From report at bugs.python.org Mon Oct 17 12:21:08 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Oct 2016 16:21:08 +0000 Subject: [docs] [issue27778] PEP 524: Add os.getrandom() In-Reply-To: <1471368341.7.0.188364803995.issue27778@psf.upfronthosting.co.za> Message-ID: <1476721268.3.0.590285992788.issue27778@psf.upfronthosting.co.za> STINNER Victor added the comment: Because of the lack of interest for getrandom_errno.patch, and Christian saying that it's not good to document specific errors, I now close the bug. Thank you all for your help on this nice security enhancement in Python 3.6! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 12:24:00 2016 From: report at bugs.python.org (Lisa Roach) Date: Mon, 17 Oct 2016 16:24:00 +0000 Subject: [docs] [issue27779] Sync-up docstrings in C version of the the decimal module In-Reply-To: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> Message-ID: <1476721440.73.0.599335977799.issue27779@psf.upfronthosting.co.za> Lisa Roach added the comment: Anyone get the chance to look over this yet? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 17 12:48:55 2016 From: report at bugs.python.org (siccegge) Date: Mon, 17 Oct 2016 16:48:55 +0000 Subject: [docs] [issue28455] argparse: convert_arg_line_to_args does not actually expect self argument In-Reply-To: <1476634780.92.0.551674237036.issue28455@psf.upfronthosting.co.za> Message-ID: <1476722935.56.0.584184569811.issue28455@psf.upfronthosting.co.za> siccegge added the comment: Looks quite helpfull indeed to me! Thanks! ---------- _______________________________________ Python tracker _______________________________________ From berker.peksag at gmail.com Mon Oct 17 17:36:05 2016 From: berker.peksag at gmail.com (=?UTF-8?Q?Berker_Peksa=C4=9F?=) Date: Tue, 18 Oct 2016 00:36:05 +0300 Subject: [docs] Type in Documentaiton for asyncio.StreamReader.readuntil In-Reply-To: References: Message-ID: On Fri, Oct 14, 2016 at 9:05 PM, Sam Lunt wrote: > Hello, > > For the documentation on the member function readuntil of > asyncio.StreamReader, the default separator is listed as b'n', when it is > actually b'\n'. The code in the python library is correct, this is just an > issue in the documentation. Thanks for the report, Sam. I've fixed in https://hg.python.org/cpython/rev/14363cf42e15 --Berker From report at bugs.python.org Mon Oct 17 23:58:21 2016 From: report at bugs.python.org (Tim Mitchell) Date: Tue, 18 Oct 2016 03:58:21 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476763101.5.0.375481638844.issue26240@psf.upfronthosting.co.za> Tim Mitchell added the comment: Have stripped down the module __doc__ to a list of contents. I chose to indent the descriptions of each argument to Popen. I know this is non-standard but it is such a long ramble otherwise. Changed true -> :const:`True` in subprocess.rst. ---------- keywords: +patch nosy: +tim.mitchell Added file: http://bugs.python.org/file45126/subprocess-docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 00:59:55 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 18 Oct 2016 04:59:55 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476766795.11.0.129674432913.issue26240@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: needs patch -> patch review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 01:20:00 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 18 Oct 2016 05:20:00 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476768000.43.0.180830356198.issue26240@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch, Tim. > Changed true -> :const:`True` in subprocess.rst. This is out of scope for this issue and I actually prefer the current form. Having method and class signatures in subprocess.__doc__ would make it less maintainable. I'd prefer having a short docstring that describes what the modules does, and what its modern API look like. I don't think we should duplicate documentation of CalledProcessError, TimeoutExpired and Popen in their docstrings. Perhaps it would be better to just document which parameters are POSIX only. Also, did you use the GitHub mirror to create the patch? If so, please use the official Mercurial repository: https://docs.python.org/devguide/setup.html#checkout Rietveld doesn't like patches created from the git repository so it was a bit hard to review the patch without using Rietveld. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 01:25:36 2016 From: report at bugs.python.org (Antony Lee) Date: Tue, 18 Oct 2016 05:25:36 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476768336.91.0.664763049475.issue26240@psf.upfronthosting.co.za> Changes by Antony Lee : ---------- nosy: -Antony.Lee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 07:53:36 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 11:53:36 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476791616.54.0.669328514211.issue19795@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45130/doc_none3-3.6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 07:54:09 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Oct 2016 11:54:09 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476791646.87.0.663721503488.issue19795@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file45131/doc_none3-3.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:49:03 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Oct 2016 13:49:03 +0000 Subject: [docs] [issue27896] Allow passing sphinx options to Doc/Makefile In-Reply-To: <1472573019.01.0.777773652271.issue27896@psf.upfronthosting.co.za> Message-ID: <20161018134859.16906.7474.0C1476D5@psf.io> Roundup Robot added the comment: New changeset 87aced4a9cf5 by Victor Stinner in branch '3.5': Issue #27896: Allow passing sphinx options to Doc/Makefile https://hg.python.org/cpython/rev/87aced4a9cf5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 09:49:23 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Oct 2016 13:49:23 +0000 Subject: [docs] [issue27896] Allow passing sphinx options to Doc/Makefile In-Reply-To: <1472573019.01.0.777773652271.issue27896@psf.upfronthosting.co.za> Message-ID: <20161018134920.38659.18509.E4860829@psf.io> Roundup Robot added the comment: New changeset 3b22c99535d0 by Victor Stinner in branch '2.7': Issue #27896: Allow passing sphinx options to Doc/Makefile https://hg.python.org/cpython/rev/3b22c99535d0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 10:49:02 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 14:49:02 +0000 Subject: [docs] [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal In-Reply-To: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> Message-ID: <1476802142.21.0.548332753687.issue28383@psf.upfronthosting.co.za> STINNER Victor added the comment: hash(tuple of attributes) is what I'm using in all my projects. Here is a patch for the doc. ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file45133/hash_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 10:50:27 2016 From: report at bugs.python.org (Christian Heimes) Date: Tue, 18 Oct 2016 14:50:27 +0000 Subject: [docs] [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal In-Reply-To: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> Message-ID: <1476802227.33.0.38477954177.issue28383@psf.upfronthosting.co.za> Christian Heimes added the comment: ACK! ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From stephane at wirtel.be Tue Oct 18 10:53:53 2016 From: stephane at wirtel.be (stephane at wirtel.be) Date: Tue, 18 Oct 2016 14:53:53 -0000 Subject: [docs] __hash__ documentation recommends naive XOR to combine but this is suboptimal (issue 28383) Message-ID: <20161018145353.19036.654@psf.upfronthosting.co.za> ok for me. http://bugs.python.org/review/28383/ From report at bugs.python.org Tue Oct 18 11:00:16 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 15:00:16 +0000 Subject: [docs] [issue15369] pybench and test.pystone poorly documented In-Reply-To: <1342446105.53.0.956340794171.issue15369@psf.upfronthosting.co.za> Message-ID: <1476802816.36.0.414219269379.issue15369@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm closing the issue again. Again, pybench moved to http://github.com/python/performance : please continue the discussion there if you consider that we still need to do something on pybench. FYI I reworked deeply pybench recently using the new perf 0.8 API. perf 0.8 now supports running multiple benchmarks per script, so pybench was written as only a benchmark runner. Comparison between benchmarks can be done using performance, or directly using perf (python3 -m perf compare a.json b.json). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:05:06 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 16:05:06 +0000 Subject: [docs] [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476806706.62.0.551796058378.issue26010@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I have reviewed your patch, but could you add the doc for CO_ASYNC_GENERATOR ? Thank you ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From Larry.Seltzer at VerizonWireless.com Tue Oct 18 08:27:16 2016 From: Larry.Seltzer at VerizonWireless.com (Seltzer, Larry J) Date: Tue, 18 Oct 2016 12:27:16 +0000 Subject: [docs] quotes Message-ID: <02726bb2f3bb4d3aacbe889d0b7d8ae3@OMZP1LUMXCA13.uswin.ad.vzwcorp.com> I was writing a test crawling program and using the docs (https://docs.python.org/3.6/) as my test. The program died in https://docs.python.org/3.6/faq/index.html at: "Why is Python Installed on my Computer?" FAQ The quotes are “ and ”. I know this is one of those UTF-8 problems and it's my bug (it crashed when I tried to print the string as a BeautifulSoup .string), but wouldn't it be better for you just to use " ? The page header says "charset=utf-8" [Verizon] Larry Seltzer NNO Planning Design O: 908.203.5804 | M: 973.378.8728 Larry.Seltzer at verizonwireless.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 3152 bytes Desc: image001.png URL: From stephane at wirtel.be Tue Oct 18 12:04:16 2016 From: stephane at wirtel.be (stephane at wirtel.be) Date: Tue, 18 Oct 2016 16:04:16 -0000 Subject: [docs] document CO_* constants (issue 26010) Message-ID: <20161018160416.27142.57441@psf.upfronthosting.co.za> http://bugs.python.org/review/26010/diff/16282/Doc/library/inspect.rst File Doc/library/inspect.rst (right): http://bugs.python.org/review/26010/diff/16282/Doc/library/inspect.rst#newcode1232 Doc/library/inspect.rst:1232: I don't see the documentation of CO_ASYNC_GENERATOR, could you add it ? thank you http://bugs.python.org/review/26010/ From report at bugs.python.org Tue Oct 18 12:17:08 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Tue, 18 Oct 2016 16:17:08 +0000 Subject: [docs] [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476807428.72.0.266935665331.issue26010@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 12:58:40 2016 From: report at bugs.python.org (Lisa Roach) Date: Tue, 18 Oct 2016 16:58:40 +0000 Subject: [docs] [issue28130] Document that time.tzset updates time module globals In-Reply-To: <1473782506.71.0.242774514927.issue28130@psf.upfronthosting.co.za> Message-ID: <1476809920.93.0.172431101521.issue28130@psf.upfronthosting.co.za> Lisa Roach added the comment: Will this simple update be enough? Or should more documentation be added for clarification? ---------- keywords: +patch nosy: +lisroach Added file: http://bugs.python.org/file45135/tzset_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 13:00:12 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 18 Oct 2016 17:00:12 +0000 Subject: [docs] [issue28383] __hash__ documentation recommends naive XOR to combine but this is suboptimal In-Reply-To: <1475815043.27.0.00299962010674.issue28383@psf.upfronthosting.co.za> Message-ID: <1476810012.08.0.839296948615.issue28383@psf.upfronthosting.co.za> STINNER Victor added the comment: Christian Heimes: > ACK! Does it mean that my patch LGTY? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:19:11 2016 From: report at bugs.python.org (Stefan Krah) Date: Tue, 18 Oct 2016 19:19:11 +0000 Subject: [docs] [issue27779] Sync-up docstrings in C version of the the decimal module In-Reply-To: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> Message-ID: <1476818351.88.0.23672140977.issue27779@psf.upfronthosting.co.za> Stefan Krah added the comment: Raymond: "code area" meant literally that -- all code under Modules/_decimal/* is by myself. It is well understood that you and many people (e.g. Mark Dickinson) have a stake in Decimal. This however does not warrant reassigning an issue in which I had already indicated to be cooperative. I want to know what is going into that code area. Lisa: I think I can take a look in the weekend. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 15:26:42 2016 From: report at bugs.python.org (Tim Mitchell) Date: Tue, 18 Oct 2016 19:26:42 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476818802.86.0.219818149247.issue26240@psf.upfronthosting.co.za> Tim Mitchell added the comment: hg patch with changes forthcoming ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 17:45:50 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 18 Oct 2016 21:45:50 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476827150.72.0.571866738641.issue26240@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks for tackling this one Tim. I agree with Berker that the :const:`True` changes are out of scope (some introduce errors and inaccuracies). class CalledProcessError(SubprocessError): - """Raised when a check_call() or check_output() process returns non-zero. + """Raised when a process run by check_call() or check_output() process + returns a non-zero exit status. New text has stray ?process? noun. The old text was good enough IMO. + output: Output of the child process if it was captured by run() or + check_output(). Otherwise, None. check_output() will also store the output in the output attribute. I think that last paragraph is redundant and strange now that you already described the ?output? attribute. class TimeoutExpired(SubprocessError): + Attributes: The ?cmd? attribute is missing from the list. class Popen(object): Your patch seems to be based on 3.6 or 3.7, but you have omitted the new ?encoding? etc parameters from the signature (and list of constructor parameters). What about just relying on the automatic signature for __init__()? + """ [. . .] + universal_newlines: + If universal_newlines is True, the file objects stdout and stderr are + opened as a text file, but lines may be terminated by any of '\n', ?opened as text files? would read better I think. The escape codes will be translated to literal newlines etc in the doc string. The best solution is probably to make it a raw string: r""". . .""". This universal_newlines entry has lots of details about newline translation of stdout and stderr, but fails to mention the translation of stdin. And I think the details about the child decoding its input should be added to the RST documentation before we consider adding it to the doc string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 18:14:47 2016 From: report at bugs.python.org (Roman Podoliaka) Date: Tue, 18 Oct 2016 22:14:47 +0000 Subject: [docs] [issue28472] SystemTap usage examples in docs are incorrect Message-ID: <1476828887.13.0.166885706979.issue28472@psf.upfronthosting.co.za> New submission from Roman Podoliaka: There are a couple of errors in SystemTap examples from "Instrumenting CPython with DTrace and SystemTap" page (https://docs.python.org/dev/howto/instrumentation.html): 1) in SystemTap double quotes are used to denote string literals. As is examples fail with: parse error: expected literal string or number saw: operator ''' at show_call.stp:1:15 source: probe process('python').mark("function__entry") { 2) stap -c option expects a command as a single string argument, not as a list of strings. As is the following example: $ stap \ show-call-hierarchy.stp \ -c ./python test.py will not run a test.py script, but instead ./python without any args, thus it will print a prompt (i.e. >>>) and wait for user input. ---------- assignee: docs at python components: Documentation files: patch.diff keywords: patch messages: 278944 nosy: docs at python, rpodolyaka priority: normal severity: normal status: open title: SystemTap usage examples in docs are incorrect versions: Python 3.6 Added file: http://bugs.python.org/file45138/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 21:25:24 2016 From: report at bugs.python.org (Tim Mitchell) Date: Wed, 19 Oct 2016 01:25:24 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476840322.59.0.626111918646.issue26240@psf.upfronthosting.co.za> Tim Mitchell added the comment: Am now working from tip of default in mercurial (Python 3.6). * Removed all changes to subprocess.rst. subprocess.__doc__ * Trimmed down even further - removed function signatures. * added note to see Python docs for complete description. Exception docs * just list attributes rather than describing them - they are pretty self-explanatory. Popen.__doc__ * Trimmed down to just list arguments with 1 or 2 liner descriptions. * Added note to see Python docs for complete description. * added encoding and errors arguments ---------- Added file: http://bugs.python.org/file45140/subprocess2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 21:44:26 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 19 Oct 2016 01:44:26 +0000 Subject: [docs] [issue28472] SystemTap usage examples in docs are incorrect In-Reply-To: <1476828887.13.0.166885706979.issue28472@psf.upfronthosting.co.za> Message-ID: <1476841466.2.0.961966576603.issue28472@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +lukasz.langa versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 18 22:57:10 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 19 Oct 2016 02:57:10 +0000 Subject: [docs] [issue28415] PyUnicode_FromFormat integer format handling different from printf about zeropad In-Reply-To: <1476176180.11.0.398413685253.issue28415@psf.upfronthosting.co.za> Message-ID: <1476845830.55.0.933643078979.issue28415@psf.upfronthosting.co.za> Changes by Josh Rosenberg : ---------- title: PyUnicode_FromFromat interger format handling different from printf about zeropad -> PyUnicode_FromFormat integer format handling different from printf about zeropad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 02:33:32 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 06:33:32 +0000 Subject: [docs] [issue28472] SystemTap usage examples in docs are incorrect In-Reply-To: <1476828887.13.0.166885706979.issue28472@psf.upfronthosting.co.za> Message-ID: <20161019063329.16646.80298.28E4E6A8@psf.io> Roundup Robot added the comment: New changeset 5c21df505684 by Benjamin Peterson in branch '3.6': always use double quotes for SystemTap string literals (closes #28472) https://hg.python.org/cpython/rev/5c21df505684 New changeset dc10bd89473b by Benjamin Peterson in branch 'default': merge 3.6 (#28472) https://hg.python.org/cpython/rev/dc10bd89473b ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 03:43:28 2016 From: report at bugs.python.org (Francisco Couzo) Date: Wed, 19 Oct 2016 07:43:28 +0000 Subject: [docs] [issue28475] Misleading error on random.sample when k < 0 Message-ID: <1476863008.28.0.194554202317.issue28475@psf.upfronthosting.co.za> New submission from Francisco Couzo: Improved a bit the error message when k < 0, and also added a comment about it on the documentation and an additional test case. ---------- assignee: docs at python components: Documentation, Library (Lib), Tests files: random_sample.patch keywords: patch messages: 278964 nosy: docs at python, franciscouzo priority: normal severity: normal status: open title: Misleading error on random.sample when k < 0 Added file: http://bugs.python.org/file45141/random_sample.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 03:58:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Oct 2016 07:58:19 +0000 Subject: [docs] [issue28475] Misleading error on random.sample when k < 0 In-Reply-To: <1476863008.28.0.194554202317.issue28475@psf.upfronthosting.co.za> Message-ID: <1476863899.79.0.686085945253.issue28475@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> rhettinger components: -Tests nosy: +mark.dickinson, rhettinger stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 09:46:14 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 13:46:14 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <20161019134606.16687.78618.4B02B5FF@psf.io> Roundup Robot added the comment: New changeset cef2373f31bb by Serhiy Storchaka in branch '2.7': Issue #19795: Mark up None as literal text. https://hg.python.org/cpython/rev/cef2373f31bb New changeset a8d5b433bb36 by Serhiy Storchaka in branch '3.5': Issue #19795: Mark up None as literal text. https://hg.python.org/cpython/rev/a8d5b433bb36 New changeset 2e97ed8e7e3c by Serhiy Storchaka in branch '3.6': Issue #19795: Mark up None as literal text. https://hg.python.org/cpython/rev/2e97ed8e7e3c New changeset 5f997b3cb59c by Serhiy Storchaka in branch 'default': Issue #19795: Mark up None as literal text. https://hg.python.org/cpython/rev/5f997b3cb59c New changeset b7df6c09ddf9 by Serhiy Storchaka in branch '2.7': Issue #19795: Mark up True and False as literal text instead of bold. https://hg.python.org/cpython/rev/b7df6c09ddf9 New changeset 477a82ec81fc by Serhiy Storchaka in branch '3.5': Issue #19795: Mark up True and False as literal text instead of bold. https://hg.python.org/cpython/rev/477a82ec81fc New changeset 91992ea3c6b1 by Serhiy Storchaka in branch '3.6': Issue #19795: Mark up True and False as literal text instead of bold. https://hg.python.org/cpython/rev/91992ea3c6b1 New changeset 8cc9ad294ea9 by Serhiy Storchaka in branch 'default': Issue #19795: Mark up True and False as literal text instead of bold. https://hg.python.org/cpython/rev/8cc9ad294ea9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 10:30:09 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Oct 2016 14:30:09 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476887408.96.0.0642533812647.issue19795@psf.upfronthosting.co.za> STINNER Victor added the comment: The "Docs" bot doesn't like your change: http://buildbot.python.org/all/builders/Docs%203.x/builds/2673/steps/suspicious/logs/stdio WARNING: [whatsnew/3.1:549] "`" found in "``False``" WARNING: [whatsnew/3.4:163] "`" found in "to ``None`" WARNING: [whatsnew/3.4:163] "`" found in " during finalization ` (" /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:163: WARNING: undefined label: module globals are no longer set to ``none` (if the link has no caption the label must precede a section header) Extract of the change: - protocol 3. Another solution is to set the *fix_imports* option to **False**. + protocol 3. Another solution is to set the *fix_imports* option to *``False``*. I guess that it should ``False`` without star? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:13:14 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 15:13:14 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <20161019151239.12110.61211.0E8D89D4@psf.io> Roundup Robot added the comment: New changeset 9ef78351d2e9 by Serhiy Storchaka in branch '3.5': Issue #19795: Fixed markup errors. https://hg.python.org/cpython/rev/9ef78351d2e9 New changeset 6c8a26e60728 by Serhiy Storchaka in branch '3.6': Issue #19795: Fixed markup errors. https://hg.python.org/cpython/rev/6c8a26e60728 New changeset 2127ef3b7660 by Serhiy Storchaka in branch 'default': Issue #19795: Fixed markup errors. https://hg.python.org/cpython/rev/2127ef3b7660 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:13:37 2016 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 19 Oct 2016 15:13:37 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476890017.85.0.328108702201.issue19795@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Without the star would be right. ReST does not support nested markup, and in this case, I don't think it would make sense anyway. ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:28:44 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Oct 2016 15:28:44 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476890924.8.0.793165122343.issue19795@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks, "build #1563 of Docs 3.5 is complete: Success [build successful]": the bot is happy again ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:38:10 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 15:38:10 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <20161019153734.12009.90342.1A9B0C41@psf.io> Roundup Robot added the comment: New changeset e4aa34a7ca53 by Serhiy Storchaka in branch '3.5': Issue #19795: Improved more markups of True/False. https://hg.python.org/cpython/rev/e4aa34a7ca53 New changeset dd7e48e3e5b0 by Serhiy Storchaka in branch '2.7': Issue #19795: Improved more markups of True/False. https://hg.python.org/cpython/rev/dd7e48e3e5b0 New changeset 7b143d6834cf by Serhiy Storchaka in branch '3.6': Issue #19795: Improved more markups of True/False. https://hg.python.org/cpython/rev/7b143d6834cf New changeset 9fc0f20ea7de by Serhiy Storchaka in branch 'default': Issue #19795: Improved more markups of True/False. https://hg.python.org/cpython/rev/9fc0f20ea7de ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:38:47 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Oct 2016 15:38:47 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476891526.91.0.678820080691.issue19795@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for noticing this Victor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 11:46:44 2016 From: report at bugs.python.org (Zachary Ware) Date: Wed, 19 Oct 2016 15:46:44 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476892004.47.0.167590840315.issue19795@psf.upfronthosting.co.za> Zachary Ware added the comment: There's also an issue with a table in Doc/library/logging.rst, see http://buildbot.python.org/all/builders/Docs%203.x/builds/2675/steps/docbuild/logs/stdio I'm not sure why that doesn't cause the build to fail, though, it's marked as an error. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 12:40:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 16:40:11 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <20161019164003.38659.7974.FBED9E44@psf.io> Roundup Robot added the comment: New changeset c445746d0846 by Serhiy Storchaka in branch '3.5': Issue #19795: Fixed formatting a table. https://hg.python.org/cpython/rev/c445746d0846 New changeset 3b554c9ea1c4 by Serhiy Storchaka in branch '3.6': Issue #19795: Fixed formatting a table. https://hg.python.org/cpython/rev/3b554c9ea1c4 New changeset 884c9d9159dc by Serhiy Storchaka in branch 'default': Issue #19795: Fixed formatting a table. https://hg.python.org/cpython/rev/884c9d9159dc New changeset ddf32a646457 by Serhiy Storchaka in branch '2.7': Issue #19795: Fixed formatting a table. https://hg.python.org/cpython/rev/ddf32a646457 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 12:52:50 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Oct 2016 16:52:50 +0000 Subject: [docs] [issue19795] Formatting of True/False/None in docs In-Reply-To: <1385457525.93.0.980812903017.issue19795@psf.upfronthosting.co.za> Message-ID: <1476895970.52.0.886790287855.issue19795@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Zachary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 16:49:02 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 19 Oct 2016 20:49:02 +0000 Subject: [docs] [issue28475] Misleading error on random.sample when k < 0 In-Reply-To: <1476863008.28.0.194554202317.issue28475@psf.upfronthosting.co.za> Message-ID: <1476910142.14.0.0362622507161.issue28475@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would rather revise the existing message to say that it cannot be negative or larger that population. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 16:55:25 2016 From: report at bugs.python.org (Francisco Couzo) Date: Wed, 19 Oct 2016 20:55:25 +0000 Subject: [docs] [issue28475] Misleading error on random.sample when k < 0 In-Reply-To: <1476863008.28.0.194554202317.issue28475@psf.upfronthosting.co.za> Message-ID: <1476910525.91.0.27477227119.issue28475@psf.upfronthosting.co.za> Changes by Francisco Couzo : Added file: http://bugs.python.org/file45144/random_sample2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 18:37:18 2016 From: report at bugs.python.org (Julien) Date: Wed, 19 Oct 2016 22:37:18 +0000 Subject: [docs] [issue28479] Missing indentation in using/windows.rst Message-ID: <1476916638.92.0.768484757965.issue28479@psf.upfronthosting.co.za> New submission from Julien: Hi, In https://docs.python.org/3.7/using/windows.html, right before https://docs.python.org/3.7/using/windows.html#additional-modules, the "Changed in version 3.6:" content lacks an indentation. It look like it's nothing, but it breaks the PDF generation, by generating invalid latex. I attached the simple patch to fix this, and tested it, it's now rendered with the correct indentation and the PDF builds successfully. A grep -A10 -r 'versionchanged::$' show no other problems of indentation on those blocks (and shows this is the right way to fix it). ---------- assignee: docs at python components: Documentation files: using_windows_versionchanged.patch keywords: patch messages: 278996 nosy: docs at python, sizeof priority: normal severity: normal status: open title: Missing indentation in using/windows.rst type: enhancement versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45145/using_windows_versionchanged.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 18:46:55 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Oct 2016 22:46:55 +0000 Subject: [docs] [issue28479] Missing indentation in using/windows.rst In-Reply-To: <1476916638.92.0.768484757965.issue28479@psf.upfronthosting.co.za> Message-ID: <20161019224644.27644.24827.DBC60AFF@psf.io> Roundup Robot added the comment: New changeset 39ac5093bdbb by Victor Stinner in branch '3.6': Close #28479: Fix reST syntax in windows.rst https://hg.python.org/cpython/rev/39ac5093bdbb ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 19 18:47:25 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Oct 2016 22:47:25 +0000 Subject: [docs] [issue28479] Missing indentation in using/windows.rst In-Reply-To: <1476916638.92.0.768484757965.issue28479@psf.upfronthosting.co.za> Message-ID: <1476917245.42.0.738675960522.issue28479@psf.upfronthosting.co.za> STINNER Victor added the comment: Thanks for your contribution Julien. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From vadmium+py at gmail.com Wed Oct 19 23:31:07 2016 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Thu, 20 Oct 2016 03:31:07 -0000 Subject: [docs] Docstring of the subprocess module should be cleaned up (issue 26240) Message-ID: <20161020033107.31190.37805@psf.upfronthosting.co.za> https://bugs.python.org/review/26240/diff/18897/Lib/subprocess.py File Lib/subprocess.py (left): https://bugs.python.org/review/26240/diff/18897/Lib/subprocess.py#oldcode220 Lib/subprocess.py:220: Check if child process has terminated. Returns returncode This could be moved a docstring for the actual poll() method https://bugs.python.org/review/26240/diff/18897/Lib/subprocess.py#oldcode239 Lib/subprocess.py:239: The following attributes are also available: Maybe these should be mentioned in the Popen docstring https://bugs.python.org/review/26240/diff/18897/Lib/subprocess.py File Lib/subprocess.py (right): https://bugs.python.org/review/26240/diff/18897/Lib/subprocess.py#newcode37 Lib/subprocess.py:37: check_output(...): Same as check_call but returns the contents of Round brackets for check_call(), for consistency with above? https://bugs.python.org/review/26240/diff/18897/Lib/subprocess.py#newcode550 Lib/subprocess.py:550: bufsize: negative io buffer size. 0 for unbuffered, 1 for line buffered I don?t understand this. Perhaps you mean a negative value is translated to the default io module buffer size? Or clarify this buffer size is specifically for pipes? https://bugs.python.org/review/26240/diff/18897/Lib/subprocess.py#newcode555 Lib/subprocess.py:555: input, standard output and standard error file handles, respectively. Might be worth listing PIPE, DEVNULL, STDOUT https://bugs.python.org/review/26240/diff/18897/Lib/subprocess.py#newcode571 Lib/subprocess.py:571: startupinfo and creationflags: (Windows only) These colons should be dropped I think, i.e. startupinfo and creationflags (Windows only) restore_signals (POSIX only) etc https://bugs.python.org/review/26240/diff/18897/Lib/subprocess.py#newcode580 Lib/subprocess.py:580: file objects stdin, stdout and stderr. inconsistent indentation https://bugs.python.org/review/26240/ From report at bugs.python.org Wed Oct 19 23:35:02 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 20 Oct 2016 03:35:02 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476934502.25.0.221705477378.issue26240@psf.upfronthosting.co.za> Martin Panter added the comment: . I left some comments on the code review. Also, I?m not sure about the links to the online documentation. We don?t do this for other modules as far as I know. The pydoc module and help() commands already add their own links, which can be configured via PYTHONDOCS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 10:01:48 2016 From: report at bugs.python.org (Petr Viktorin) Date: Thu, 20 Oct 2016 14:01:48 +0000 Subject: [docs] =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_?= =?utf-8?q?=E2=80=94_references_to_tuples_should_be_replaced_with_new_Fram?= =?utf-8?q?eSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1476972108.09.0.122358713727.issue27910@psf.upfronthosting.co.za> Petr Viktorin added the comment: ping Anything I can do to move this forward? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 10:18:11 2016 From: report at bugs.python.org (Emanuel Barry) Date: Thu, 20 Oct 2016 14:18:11 +0000 Subject: [docs] =?utf-8?q?=5Bissue27910=5D_Doc/library/traceback=2Erst_?= =?utf-8?q?=E2=80=94_references_to_tuples_should_be_replaced_with_new_Fram?= =?utf-8?q?eSummary_object?= In-Reply-To: <1472637889.08.0.384463773035.issue27910@psf.upfronthosting.co.za> Message-ID: <1476973091.85.0.257485295611.issue27910@psf.upfronthosting.co.za> Emanuel Barry added the comment: This is not a regression, the documentation was just not fully updated when the new feature was added. Patch looks good. This should probably be applied to the 3.5 branch as well. ---------- nosy: +ebarry stage: patch review -> commit review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 12:57:28 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 16:57:28 +0000 Subject: [docs] [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476982648.19.0.352603735737.issue26010@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hello Yury, I have updated your patch, with a small description for CO_ASYNC_GENERATOR. I need a review for the description. Stephane ---------- Added file: http://bugs.python.org/file45155/issue26010-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 12:58:10 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 16:58:10 +0000 Subject: [docs] [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476982690.76.0.271344698063.issue26010@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:12:07 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 17:12:07 +0000 Subject: [docs] [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <20161020171154.12110.26610.32854EEF@psf.io> Roundup Robot added the comment: New changeset 681924a9eefd by Yury Selivanov in branch '3.5': Issue #26010: Document CO_* constants https://hg.python.org/cpython/rev/681924a9eefd New changeset 5023c182a8a4 by Yury Selivanov in branch '3.6': Merge 3.5 + document CO_ASYNC_GENERATOR; issue #26010 https://hg.python.org/cpython/rev/5023c182a8a4 New changeset 3c4833d2fdbe by Yury Selivanov in branch 'default': Merge 3.6 (issue #26010) https://hg.python.org/cpython/rev/3c4833d2fdbe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:13:04 2016 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Oct 2016 17:13:04 +0000 Subject: [docs] [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476983583.98.0.485305637459.issue26010@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you Stephane for bumping this issue up. I've committed the patch. I've documented CO_ASYNC_GENERATOR in more detail, and I also added "versionadded" tags to CO_COROUTINE and CO_ITERABLE_COROUTINE. ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:14:15 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 17:14:15 +0000 Subject: [docs] [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476983655.76.0.90562483845.issue26010@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Nice Yury, sorry for the missing versionadded directive. And now, I have a description for CO_ASYNC_GENERATOR ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:14:28 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 17:14:28 +0000 Subject: [docs] [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <1476983668.19.0.409720690439.issue26010@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:23:36 2016 From: report at bugs.python.org (Ryan Gonzalez) Date: Thu, 20 Oct 2016 17:23:36 +0000 Subject: [docs] [issue28489] Fix comment in tokenizer.c Message-ID: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> New submission from Ryan Gonzalez: Attached is a little fix for a comment in tokenizer.c. I noticed that it was never updated for the inclusion of f-strings. ---------- assignee: docs at python components: Documentation files: 0001-Fix-comment-in-tokenizer.c.patch keywords: patch messages: 279056 nosy: Ryan.Gonzalez, docs at python priority: normal severity: normal status: open title: Fix comment in tokenizer.c versions: Python 3.6 Added file: http://bugs.python.org/file45156/0001-Fix-comment-in-tokenizer.c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:25:14 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Thu, 20 Oct 2016 17:25:14 +0000 Subject: [docs] [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1476984314.84.0.105958838263.issue28489@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Thank you for this patch. ---------- nosy: +matrixise versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:47:49 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 20 Oct 2016 17:47:49 +0000 Subject: [docs] [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1476985669.7.0.64508727665.issue28489@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'd actually change this to be something like: Process b"", r"", u"", and the various legal combinations. There are 24 total combinations when you add upper case. I actually wrote a script in Lib/tokenize.py to generate them all. And when I add binary f-strings, that number climbs to 80. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 13:55:12 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 20 Oct 2016 17:55:12 +0000 Subject: [docs] [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1476986112.88.0.443685620514.issue28489@psf.upfronthosting.co.za> Eric V. Smith added the comment: FWIW, in Lib/tokenize.py, it's _all_string_prefixes(): >>> _all_string_prefixes() set(['', 'FR', 'rB', 'rF', 'BR', 'Fr', 'RF', 'rf', 'RB', 'fr', 'B', 'rb', 'F', 'Br', 'R', 'U', 'br', 'fR', 'b', 'f', 'Rb', 'Rf', 'r', 'u', 'bR']) My basic point is that trying to list them all is hard and a maintenance problem. So as long as we're not being exhaustive, the comment should just state the gist of what the code does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:01:40 2016 From: report at bugs.python.org (Tim Mitchell) Date: Thu, 20 Oct 2016 20:01:40 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1476993699.71.0.749481171959.issue26240@psf.upfronthosting.co.za> Tim Mitchell added the comment: Changes as per Martins review. ---------- Added file: http://bugs.python.org/file45159/subprocess3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:13:30 2016 From: report at bugs.python.org (Ryan Gonzalez) Date: Thu, 20 Oct 2016 20:13:30 +0000 Subject: [docs] [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1476994410.2.0.300699906253.issue28489@psf.upfronthosting.co.za> Ryan Gonzalez added the comment: @eric.smith How's this instead? ---------- Added file: http://bugs.python.org/file45160/0001-Fix-comment-in-tokenizer.c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:14:13 2016 From: report at bugs.python.org (Ryan Gonzalez) Date: Thu, 20 Oct 2016 20:14:13 +0000 Subject: [docs] [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1476994453.04.0.811110533479.issue28489@psf.upfronthosting.co.za> Ryan Gonzalez added the comment: Ugh, hit Submit too soon. I meant to say the patch that has 20:13 as the date (I should've probably given them different names...). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 16:31:37 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Oct 2016 20:31:37 +0000 Subject: [docs] [issue26010] document CO_* constants In-Reply-To: <1451944023.51.0.951612152691.issue26010@psf.upfronthosting.co.za> Message-ID: <20161020203119.110716.45408.C02F0E0B@psf.io> Roundup Robot added the comment: New changeset 761414979de5 by Yury Selivanov in branch '3.6': Issue #26010: fix typos; rewording https://hg.python.org/cpython/rev/761414979de5 New changeset 3821599fc74d by Yury Selivanov in branch 'default': Merge 3.6 (issue #26010) https://hg.python.org/cpython/rev/3821599fc74d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 17:51:50 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 20 Oct 2016 21:51:50 +0000 Subject: [docs] [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1477000310.29.0.153890372965.issue28489@psf.upfronthosting.co.za> Eric V. Smith added the comment: That's great. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 19:21:57 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 20 Oct 2016 23:21:57 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1477005717.75.0.313919352736.issue26240@psf.upfronthosting.co.za> Martin Panter added the comment: V3 looks good to me ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 20 19:32:26 2016 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 20 Oct 2016 23:32:26 +0000 Subject: [docs] [issue28489] Fix comment in tokenizer.c In-Reply-To: <1476984216.11.0.150131580141.issue28489@psf.upfronthosting.co.za> Message-ID: <1477006346.33.0.924365600474.issue28489@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 15:54:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 19:54:41 +0000 Subject: [docs] [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <20161021195438.16719.78423.D0050D59@psf.io> Roundup Robot added the comment: New changeset 9feff7ba89b2 by Brett Cannon in branch '3.5': Issue #25152: Mention the deprecation of pyvenv https://hg.python.org/cpython/rev/9feff7ba89b2 New changeset 126ff1f3b6cd by Brett Cannon in branch '3.6': Merge (issue #25152) https://hg.python.org/cpython/rev/126ff1f3b6cd New changeset 53bee4ef1d0a by Brett Cannon in branch 'default': Merge (issue #25152) https://hg.python.org/cpython/rev/53bee4ef1d0a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 15:16:57 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 21 Oct 2016 19:16:57 +0000 Subject: [docs] [issue28396] Remove *.pyo references from man page In-Reply-To: <1476481047.43.0.417931922217.issue28396@psf.upfronthosting.co.za> Message-ID: <1477077417.35.0.301236951282.issue28396@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the patch, Ville! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 15:55:29 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 21 Oct 2016 19:55:29 +0000 Subject: [docs] [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477079729.84.0.851049286934.issue25152@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 15:16:40 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Oct 2016 19:16:40 +0000 Subject: [docs] [issue28396] Remove *.pyo references from man page In-Reply-To: <1476481047.43.0.417931922217.issue28396@psf.upfronthosting.co.za> Message-ID: <20161021191620.25236.30273.5AF5DC58@psf.io> Roundup Robot added the comment: New changeset 0c298486d879 by Brett Cannon in branch '3.5': Issue #28396: Remove any mention of .pyo files from the man page. https://hg.python.org/cpython/rev/0c298486d879 New changeset b33c7055220e by Brett Cannon in branch '3.6': Merge (issue #28396) https://hg.python.org/cpython/rev/b33c7055220e New changeset ef6c4e76f110 by Brett Cannon in branch 'default': Merge (issue #28396) https://hg.python.org/cpython/rev/ef6c4e76f110 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 13:19:17 2016 From: report at bugs.python.org (Pierre Bousquie) Date: Fri, 21 Oct 2016 17:19:17 +0000 Subject: [docs] [issue28499] Logging module documentation needs a rework. Message-ID: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> New submission from Pierre Bousquie: At pyconf-fr 2016 Florian Strzelecki (@Exirel) made a great talk on how to make good documentation. At one time he asked "python logging doc?, did you realy found it clear and helpfull?" clear answer from the crowd: not at all. Stephane Wirtel ask us (the unhappy folks) : Hey send a bug request, then the pull request and... i'll be there to help :). So i'm here for first step: fill the bug issue. I'm willing to fix this doc! ---------- assignee: docs at python components: Documentation messages: 279141 nosy: Pierre Bousquie, docs at python priority: normal severity: normal status: open title: Logging module documentation needs a rework. type: enhancement versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 13:22:21 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 21 Oct 2016 17:22:21 +0000 Subject: [docs] [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1477070541.66.0.606094607391.issue28499@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Hi Pierre, Thank you for your issue and mainly for me ;-) Now, I am really interested by your feedback or the feedback of Florian Strzelecki because he can give us the organization of the sections and maybe we can try to improve the current documentation of the logging module with his recommendations. Have you receive some recommendations from Florian ? ---------- nosy: +matrixise stage: -> needs patch versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 17:06:03 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 21 Oct 2016 21:06:03 +0000 Subject: [docs] [issue28212] Closing server in asyncio is not efficient In-Reply-To: <1474362608.68.0.912694843367.issue28212@psf.upfronthosting.co.za> Message-ID: <1477083963.36.0.225811429641.issue28212@psf.upfronthosting.co.za> Yury Selivanov added the comment: > Seems that its not so hard - in loop.remove_reader add If you have a patch in mind, please create a PR on github.com/python/asyncio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 18:12:41 2016 From: report at bugs.python.org (Ned Deily) Date: Fri, 21 Oct 2016 22:12:41 +0000 Subject: [docs] [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1477087961.63.0.869119942103.issue28499@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 20:55:45 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 22 Oct 2016 00:55:45 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1477097744.33.0.0691257181393.issue26240@psf.upfronthosting.co.za> Martin Panter added the comment: Here are corresponding patches for 3.5 and 2.7. ---------- stage: patch review -> commit review Added file: http://bugs.python.org/file45179/subprocess3-3.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 21 20:56:01 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 22 Oct 2016 00:56:01 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1477097760.81.0.839822122733.issue26240@psf.upfronthosting.co.za> Changes by Martin Panter : Added file: http://bugs.python.org/file45180/subprocess3-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 22 05:23:17 2016 From: report at bugs.python.org (Pierre Bousquie) Date: Sat, 22 Oct 2016 09:23:17 +0000 Subject: [docs] [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1477128197.84.0.181145852831.issue28499@psf.upfronthosting.co.za> Pierre Bousquie added the comment: Hi stephane, I have tweeted Florian and he is still interested. I think the doc has a lot of information but does not organize it efficiently. My notes from the conference: - Logging reccord attribute is at 16.6.7 (middle of the doc) and that's a must to fine tune the message. - Configuration: the "interesting" (read: must read for use in production) is in advanced tutorial: configuration... https://docs.python.org/3.7/howto/logging.html#configuring-logging aaaandd in : https://docs.python.org/3.7/library/logging.config.html#module-logging.config - Lots of information are also in the "See also" section. and I had a personal fail time with logrotate... wich will work with python logging only if it used with WatchFileHandler. https://docs.python.org/3.7/library/logging.handlers.html#logging.handlers.WatchedFileHandler This is in the doc but only in handles section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 06:36:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 10:36:17 +0000 Subject: [docs] [issue28513] Documment zipfile CLI Message-ID: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Command-line interface of the zipfile module is supported long time, but it is not documented. Proposed patch documents it. It is based on the documentation of tarfile CLI. ---------- assignee: docs at python components: Documentation files: zipfile_cli_docs.patch keywords: patch messages: 279250 nosy: alanmcintyre, berker.peksag, docs at python, serhiy.storchaka, twouters priority: normal severity: normal stage: patch review status: open title: Documment zipfile CLI type: enhancement versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45195/zipfile_cli_docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 07:05:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 11:05:52 +0000 Subject: [docs] [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477220752.86.0.331901194158.issue28513@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Documment zipfile CLI -> Document zipfile CLI _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:24:16 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 23 Oct 2016 12:24:16 +0000 Subject: [docs] [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477225456.35.0.296531874343.issue28513@psf.upfronthosting.co.za> St?phane Wirtel added the comment: Serhiy, your patch seems to be good, you can merge it, I have tested it with sphinx and the documentation is fine. Thanks ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 08:24:21 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 23 Oct 2016 12:24:21 +0000 Subject: [docs] [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477225461.27.0.354698265862.issue28513@psf.upfronthosting.co.za> Changes by St?phane Wirtel : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 09:05:39 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 23 Oct 2016 13:05:39 +0000 Subject: [docs] [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1477227939.02.0.328765984658.issue26656@psf.upfronthosting.co.za> St?phane Wirtel added the comment: What do you propose for the doc of re.compile ? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 10:42:10 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Oct 2016 14:42:10 +0000 Subject: [docs] [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477233730.81.0.519456693441.issue25152@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: http://buildbot.python.org/all/builders/Docs%203.x/builds/2710/steps/lint/logs/stdio python3 tools/rstlint.py -i tools -i venv [2] library/venv.rst:27: default role used 1 problem with severity 2 found. Makefile:156: recipe for target 'check' failed ---------- nosy: +serhiy.storchaka status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 11:42:04 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 23 Oct 2016 15:42:04 +0000 Subject: [docs] [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477237323.99.0.17339450285.issue25152@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: > [2] library/venv.rst:27: default role used > 1 problem with severity 2 found. I made a patch to address it. Please review. Thanks :) ---------- keywords: +patch nosy: +Mariatta Added file: http://bugs.python.org/file45196/issue25152.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 12:01:25 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Sun, 23 Oct 2016 16:01:25 +0000 Subject: [docs] [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477238484.98.0.148612156819.issue25152@psf.upfronthosting.co.za> St?phane Wirtel added the comment: we can merge the patch of Mariatta ---------- nosy: +matrixise stage: resolved -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 14:40:50 2016 From: report at bugs.python.org (Sworddragon) Date: Sun, 23 Oct 2016 18:40:50 +0000 Subject: [docs] [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1477248050.65.0.435533741684.issue26656@psf.upfronthosting.co.za> Sworddragon added the comment: The proposal is in the startpost. ---------- _______________________________________ Python tracker _______________________________________ From stefan at bytereef.org Sun Oct 23 15:39:46 2016 From: stefan at bytereef.org (stefan at bytereef.org) Date: Sun, 23 Oct 2016 19:39:46 -0000 Subject: [docs] Sync-up docstrings in C version of the the decimal module (issue 27779) Message-ID: <20161023193946.26444.12536@psf.upfronthosting.co.za> http://bugs.python.org/review/27779/diff/18450/Modules/_decimal/docstrings.h File Modules/_decimal/docstrings.h (left): http://bugs.python.org/review/27779/diff/18450/Modules/_decimal/docstrings.h#oldcode34 Modules/_decimal/docstrings.h:34: Return a context manager that will set the default context to a copy of ctx\n\ This is actually important in the age of asyncio. It returns *and sets* the thread's default context. I prefer the existing wording here. http://bugs.python.org/review/27779/diff/18450/Modules/_decimal/docstrings.h#oldcode109 Modules/_decimal/docstrings.h:109: the same numeric value but different representations compare unequal\n\ I'd leave this in. I tried to give examples only when something unexpected happens. This is one of the cases. http://bugs.python.org/review/27779/diff/18450/Modules/_decimal/docstrings.h File Modules/_decimal/docstrings.h (right): http://bugs.python.org/review/27779/diff/18450/Modules/_decimal/docstrings.h#newcode244 Modules/_decimal/docstrings.h:244: Represents the number as a triple tuple, to show the internals exactly as\n\ This is outdated for the Python version and wrong for the C version. http://bugs.python.org/review/27779/diff/18450/Modules/_decimal/docstrings.h#newcode351 Modules/_decimal/docstrings.h:351: Compares two operands using their abstract representation rather than\n\ Everyone has a preferred form. I think Guido prefers the imperative "Compare" (it may be in a PEP somewhere). http://bugs.python.org/review/27779/diff/18450/Modules/_decimal/docstrings.h#newcode432 Modules/_decimal/docstrings.h:432: Copies the second operand's sign to the first one.\n\ That sounds as if it is a destructive update. http://bugs.python.org/review/27779/diff/18450/Modules/_decimal/docstrings.h#newcode739 Modules/_decimal/docstrings.h:739: value of that digit and without limiting the resulting exponent).\n\ Personally, I have a hard time understanding this explanation. http://bugs.python.org/review/27779/ From stephane at wirtel.be Sun Oct 23 12:00:45 2016 From: stephane at wirtel.be (stephane at wirtel.be) Date: Sun, 23 Oct 2016 16:00:45 -0000 Subject: [docs] venv documentation doesn't tell you how to specify a particular version of python (issue 25152) Message-ID: <20161023160045.26480.82471@psf.upfronthosting.co.za> nice, we can merge it http://bugs.python.org/review/25152/ From report at bugs.python.org Sun Oct 23 15:47:36 2016 From: report at bugs.python.org (Stefan Krah) Date: Sun, 23 Oct 2016 19:47:36 +0000 Subject: [docs] [issue27779] Sync-up docstrings in C version of the the decimal module In-Reply-To: <1471375735.77.0.977501297817.issue27779@psf.upfronthosting.co.za> Message-ID: <1477252056.32.0.422623056768.issue27779@psf.upfronthosting.co.za> Stefan Krah added the comment: Lisa, thanks for the patch. I've left some comments -- some docstrings in the Python version are outdated, some not quite correct, some are not very clear (to me). I don't know how to proceed. Initially I thought it would be as easy as just taking over all Python docstrings verbatim, but looks like there's more work involved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 23 16:28:22 2016 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 23 Oct 2016 20:28:22 +0000 Subject: [docs] [issue26656] Documentation for re.compile is a bit outdated In-Reply-To: <1459178484.74.0.770971045402.issue26656@psf.upfronthosting.co.za> Message-ID: <1477254502.69.0.203745167297.issue26656@psf.upfronthosting.co.za> Matthew Barnett added the comment: @Sworddragon: Your post says that it should be more generic or complete the list, but it doesn't make a suggestion as to what it should _actually_ say. Example: "Compile a regular expression pattern into a regular expression object, which can be used for matching and replacing using the methods described below." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 08:03:04 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Mon, 24 Oct 2016 12:03:04 +0000 Subject: [docs] [issue28519] Update pydoc tool to support generic types Message-ID: <1477310584.34.0.261643270956.issue28519@psf.upfronthosting.co.za> New submission from Ivan Levkivskyi: It was proposed in the discussion of #27989 to update pydoc rendering of documentation of classes supporting generic types. Currently there are two ideas: 1. Keep the class header intact (i.e. listing actual runtime __bases__) and adding a separate section describing generic info using __orig_bases__ and __parameters__. For example: """ class MyClass(typing.List, typing.Mapping): ... (usual info) ... This is a generic class consistent with List[~T], Mapping[str, +VT_co] Type parameters: invariant T, covariant VT_co """ 2. Do not add a separate section, but modify the header to display __orig_bases__. For example: """ class MyClass(List[~T], Mapping[str, +VT_co]): ... (usual info) ... """ Guido prefers the second option. I am a bit afraid that this will cause people to use issubclass() with parameterized generics, but now issubclass(cls, List[T]) is a TypeError, only issubclass(cls, List) is allowed. So that I am more inclined towards first option. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 279304 nosy: docs at python, gvanrossum, levkivskyi priority: normal severity: normal status: open title: Update pydoc tool to support generic types type: enhancement versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From stefan at bytereef.org Sun Oct 23 15:59:26 2016 From: stefan at bytereef.org (stefan at bytereef.org) Date: Sun, 23 Oct 2016 19:59:26 -0000 Subject: [docs] Sync-up docstrings in C version of the the decimal module (issue 27779) Message-ID: <20161023195926.26444.96228@psf.upfronthosting.co.za> http://bugs.python.org/review/27779/diff/18450/Modules/_decimal/docstrings.h File Modules/_decimal/docstrings.h (right): http://bugs.python.org/review/27779/diff/18450/Modules/_decimal/docstrings.h#newcode405 Modules/_decimal/docstrings.h:405: Returns a copy of the operand with the sign set to 0. This operation is unaffected by\n\ I think "sign set to zero" is a bit confusing for the C version. "absolute value" sounds fine to me. http://bugs.python.org/review/27779/ From wangqiang at zwenyu.com Mon Oct 24 04:30:34 2016 From: wangqiang at zwenyu.com (=?utf-8?B?546L5by6?=) Date: Mon, 24 Oct 2016 16:30:34 +0800 Subject: [docs] Python doc bug Message-ID: In the Python tutorial doc missing part of the code -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: E5104820 at 8D4C496A.AAC60D58.png Type: application/octet-stream Size: 62084 bytes Desc: not available URL: From report at bugs.python.org Mon Oct 24 12:31:50 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 24 Oct 2016 16:31:50 +0000 Subject: [docs] [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477326710.33.0.357307914668.issue25152@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks, St?phane :) Perhaps this can be updated into patch review stage? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 14:25:24 2016 From: report at bugs.python.org (Walker Hale IV) Date: Mon, 24 Oct 2016 18:25:24 +0000 Subject: [docs] [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1477333524.24.0.568170273948.issue28516@psf.upfronthosting.co.za> Changes by Walker Hale IV : ---------- assignee: -> docs at python components: +Documentation keywords: +patch nosy: +docs at python Added file: http://bugs.python.org/file45206/issue28516.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 14:36:57 2016 From: report at bugs.python.org (Walker Hale IV) Date: Mon, 24 Oct 2016 18:36:57 +0000 Subject: [docs] [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1477334217.26.0.29571853037.issue28516@psf.upfronthosting.co.za> Walker Hale IV added the comment: This one-line patch should clarify the point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 15:59:17 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Oct 2016 19:59:17 +0000 Subject: [docs] [issue26085] Tkinter spoils the input text In-Reply-To: <1452546756.92.0.853539899898.issue26085@psf.upfronthosting.co.za> Message-ID: <1477339157.75.0.546813215452.issue26085@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Does anybody want to provide documentation patch? Otherwise this issue will be closed as "not a bug". ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 24 19:58:54 2016 From: report at bugs.python.org (Javier Rey) Date: Mon, 24 Oct 2016 23:58:54 +0000 Subject: [docs] [issue28525] Incorrect documented parameter for gc.collect Message-ID: <1477353534.94.0.534678825928.issue28525@psf.upfronthosting.co.za> Changes by Javier Rey : ---------- assignee: docs at python components: Documentation files: gc_collect_doc_fix.patch keywords: patch nosy: docs at python, vierja priority: normal severity: normal status: open title: Incorrect documented parameter for gc.collect versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45209/gc_collect_doc_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:00:39 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 06:00:39 +0000 Subject: [docs] [issue28525] Incorrect documented parameter for gc.collect Message-ID: <20161025060035.110784.85203.D891A2C9@psf.io> New submission from Roundup Robot: New changeset 05b5e1aaedc5 by Benjamin Peterson in branch '3.5': fix name of keyword parameter to gc.collect() (closes #28525) https://hg.python.org/cpython/rev/05b5e1aaedc5 New changeset f9a04afaeece by Benjamin Peterson in branch '3.6': merge 3.5 (#28525) https://hg.python.org/cpython/rev/f9a04afaeece New changeset ffaf02ec9d8b by Benjamin Peterson in branch 'default': merge 3.6 (#28525) https://hg.python.org/cpython/rev/ffaf02ec9d8b ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 02:59:21 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Oct 2016 06:59:21 +0000 Subject: [docs] [issue26085] Document default tk Text class bindings for tkinter and IDLE In-Reply-To: <1452546756.92.0.853539899898.issue26085@psf.upfronthosting.co.za> Message-ID: <1477378761.32.0.840219497835.issue26085@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I want to recast this as a doc issue. The BINDINGS section of http://www.tcl.tk/man/tcl8.6/TkCmd/text.htm, near the bottom, has a list with 33 numbered items. The main categories of action include selection modification, cursor movement, and text deletion. Minor categories include insertion, transposition, undo/redo. However, the items are not neatly grouped this way. Some of these actions are IDLE menu items and are listed in the IDLE menu doc. Many more are documented in https://docs.python.org/3/library/idle.html#editing-and-navigation. Some useful actions, such as ^t Tranposition Right, are omitted. Some of this IDLE doc is wrong, at least for IDLE, at least on Windows. For instance, at least on Windows, ^a in IDLE is Select All, not Move Beginning of Line. For working on IDLE, it would be very helpful to have a *categorized* listing of class-bound actions that are verified to work for tkinter Text, with notes on any OS differences. I can then check what works on IDLE and how it changes the bindings on either some or all systems. I can and someday will do this for Windows, but I currently would need help for other OSes. To help people avoid clashes such as Nick ran into, the tkinter doc should also have a sorted and abbreviated list of bound event sequences. "Text comes with bindings for the following event sequences for keys: Control-a, ..., z; Control-Shift-?, ...,z, Meta-...(Unix), Command-...(Mac). For mice, ..." Follow with a note on what can or cannot be unbound and the need to use 'break' when overriding. A function to produce for IDLE a similar list that includes IDLE's system-specific add-ons and a user's customizations, would be a separate but very useful issue. Not knowing current bindings makes customization hard. Another spinoff issue would be making actions available via the IDLE menu system. ---------- assignee: docs at python -> terry.reedy stage: -> needs patch title: Tkinter spoils the input text -> Document default tk Text class bindings for tkinter and IDLE versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 04:14:34 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Tue, 25 Oct 2016 08:14:34 +0000 Subject: [docs] [issue28107] Update typing module dicumentation for NamedTuple In-Reply-To: <1473707242.23.0.095655840586.issue28107@psf.upfronthosting.co.za> Message-ID: <1477383274.03.0.625416067166.issue28107@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Guido, > Honestly I think it's better if this remains a "hidden" feature until we have support for it in mypy. So let's wait for that. This patch now could be applied (since the mypy PR for this is merged). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 04:43:24 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Oct 2016 08:43:24 +0000 Subject: [docs] [issue28107] Update typing module documentation for NamedTuple In-Reply-To: <1473707242.23.0.095655840586.issue28107@psf.upfronthosting.co.za> Message-ID: <1477385004.22.0.595332257152.issue28107@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: Update typing module dicumentation for NamedTuple -> Update typing module documentation for NamedTuple _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 12:54:43 2016 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 25 Oct 2016 16:54:43 +0000 Subject: [docs] [issue28107] Update typing module documentation for NamedTuple In-Reply-To: <1473707242.23.0.095655840586.issue28107@psf.upfronthosting.co.za> Message-ID: <1477414483.49.0.46855274075.issue28107@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks, applied! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 12:54:52 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Oct 2016 16:54:52 +0000 Subject: [docs] [issue28107] Update typing module documentation for NamedTuple In-Reply-To: <1473707242.23.0.095655840586.issue28107@psf.upfronthosting.co.za> Message-ID: <20161025165422.25214.40102.9FE0FECE@psf.io> Roundup Robot added the comment: New changeset 78c0487562d9 by Guido van Rossum in branch '3.6': Issue #28107: Update typing module documentation for NamedTuple (Ivan) https://hg.python.org/cpython/rev/78c0487562d9 New changeset 709b19b9d6ea by Guido van Rossum in branch 'default': Issue #28107: Update typing module documentation for NamedTuple (Ivan) (3.6->3.7) https://hg.python.org/cpython/rev/709b19b9d6ea ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 18:48:56 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 25 Oct 2016 22:48:56 +0000 Subject: [docs] [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1477435736.8.0.842493797259.issue28516@psf.upfronthosting.co.za> Martin Panter added the comment: I agree it is good to explicitly document the __enter__() result, rather than relying on assumptions and example code. The patch looks good to me. I don?t understand the problem with pop_all() though. Is there still a problem if we apply your patch? ---------- nosy: +martin.panter stage: -> patch review versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 20:15:32 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Oct 2016 00:15:32 +0000 Subject: [docs] [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1477440932.09.0.569235921712.issue28516@psf.upfronthosting.co.za> R. David Murray added the comment: Actually, the __enter__ method is looked up on the class, so saying "the __enter__ method of the instance" could be a bit confusing. Also, many context managers return self, so 'trivially' isn't really necessary as a modifier. What if we added a sentence to the first paragraph that said "ExitStack instances return themselves when used in a with statement." Since that is immediately followed by an example of doing that, it seems like the best place to put it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 21:17:28 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Oct 2016 01:17:28 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <20161026011723.49821.23996.E083E010@psf.io> Roundup Robot added the comment: New changeset 720865fa61a4 by Martin Panter in branch '3.5': Issue #26240: Clean up the subprocess module doc string https://hg.python.org/cpython/rev/720865fa61a4 New changeset 8358c68579e9 by Martin Panter in branch '3.6': Issue #26240: Merge subprocess doc string from 3.5 into 3.6 https://hg.python.org/cpython/rev/8358c68579e9 New changeset 0dd8b3f133f9 by Martin Panter in branch 'default': Issue #26240: Merge subprocess doc string from 3.6 https://hg.python.org/cpython/rev/0dd8b3f133f9 New changeset 5a1edf5701f1 by Martin Panter in branch '2.7': Issue #26240: Clean up the subprocess module doc string https://hg.python.org/cpython/rev/5a1edf5701f1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 25 23:13:38 2016 From: report at bugs.python.org (Walker Hale IV) Date: Wed, 26 Oct 2016 03:13:38 +0000 Subject: [docs] [issue28516] contextlib.ExitStack.__enter__ has trivial but undocumented behavior In-Reply-To: <1477276611.77.0.31268131141.issue28516@psf.upfronthosting.co.za> Message-ID: <1477451618.59.0.307331692098.issue28516@psf.upfronthosting.co.za> Walker Hale IV added the comment: Clarifying the documentation regarding the __enter__ method eliminates the need for further discussion on this point regarding pop_all(), which was really just the motivating use case. That leaves the question of the most readable documentation change that accomplishes the result ? some point between verbose and terse that minimizes the time required to comprehend the material. My problem with the language "ExitStack instances return themselves when used in a with statement" is that it only specifies the return value of the __enter__ method but leaves open the question of whether the __enter__ method is doing anything else, particularly in the case of an ExitStack that is already loaded with context managers. How does a reader know that the __enter__ method of a loaded ExitStack doesn't call the __enter__ method of the the context managers inside? The documentation elsewhere provides strong evidence against this, but nothing that makes the point explicit. The reader is left with an exercise in deduction. How about replacing my previous wording with: "The __enter__ method has no behavior besides returning the ExitStack instance?" (I feel a little dirty using that language, since it might tie the hands of future developers. The truly correct wording would be "The __enter__ method is idempotent and behaves as if the only thing it does is return the ExitStack instance." That more verbose description gives future developers the freedom to do weird JIT optimizations and caching as needed, but who has the patience for such legally exhaustive specification?) Placing the wording where I did ? at the end of the class discussion and prior to the new methods ? prevents this point from obscuring the main purpose of ExitStack while still leaving a place for such messy but important details. (Amazing the thought that goes into documenting a two-line method.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 00:55:26 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 26 Oct 2016 04:55:26 +0000 Subject: [docs] [issue26240] Docstring of the subprocess module should be cleaned up In-Reply-To: <1454131083.41.0.870668221205.issue26240@psf.upfronthosting.co.za> Message-ID: <1477457726.19.0.548427455099.issue26240@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 26 10:10:35 2016 From: report at bugs.python.org (=?utf-8?b?0JrQvtC90YHRgtCw0L3RgtC40L0g0JLQvtC70LrQvtCy?=) Date: Wed, 26 Oct 2016 14:10:35 +0000 Subject: [docs] [issue28212] Closing server in asyncio is not efficient In-Reply-To: <1474362608.68.0.912694843367.issue28212@psf.upfronthosting.co.za> Message-ID: <1477491035.32.0.294923033695.issue28212@psf.upfronthosting.co.za> ?????????? ?????? added the comment: Seems that my example wasn`t good. Real reason in it was that closing server is not closing already established connections, and seems that it is not expected to do. Andrew, can you provide your example? I catched some problems but now I think it was because of asyncio internal logic misunderstanding. May be if you provide your example there will be some ideas. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 10:20:00 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 27 Oct 2016 14:20:00 +0000 Subject: [docs] [issue28543] Incomplete fast path codecs aliases in codecs doc Message-ID: <1477578000.23.0.835433953777.issue28543@psf.upfronthosting.co.za> New submission from Xiang Zhang: The fast path codec aliases in codecs doc is complete especially after 99818330b4c0. ---------- assignee: docs at python components: Documentation files: codecs_doc.patch keywords: patch messages: 279538 nosy: docs at python, haypo, xiang.zhang priority: normal severity: normal stage: patch review status: open title: Incomplete fast path codecs aliases in codecs doc type: enhancement versions: Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45241/codecs_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 15:32:57 2016 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 27 Oct 2016 19:32:57 +0000 Subject: [docs] [issue28212] Closing server in asyncio is not efficient In-Reply-To: <1474362608.68.0.912694843367.issue28212@psf.upfronthosting.co.za> Message-ID: <1477596777.17.0.576831471398.issue28212@psf.upfronthosting.co.za> Andrew Svetlov added the comment: >From my perspective the problem is: many asyncio calls schedules a delayed activity internally. E.g. `task.cancel()` doesn't cancels immediately but requires at least one extra loop iteration. The same is true for `transport.close()` -- it doesn't close socket in the call. This behavior is encouraged by asyncio design and many third-party libraries just call `transp.close()` without waiting for upcoming `protocol.connection_lost()` callback. I don't think it's a big problem, especially for server code. But when users write small client tool they need to do extra no-op loop iterations before `loop.close()` call. Waiting for no scheduled by `loop.call_soon()` callbacks makes no sense I believe. I could open a can of worms by introducing another weird side effects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 15:50:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Oct 2016 19:50:50 +0000 Subject: [docs] [issue22949] fnmatch.translate doesn't add ^ at the beginning In-Reply-To: <1417012488.81.0.131238508635.issue22949@psf.upfronthosting.co.za> Message-ID: <20161027195046.25155.43686.04508CE2@psf.io> Roundup Robot added the comment: New changeset a1aef5f84142 by Serhiy Storchaka in branch '3.5': Issue #22949: Documented that fnmatch.translate() is for use with re.match(). https://hg.python.org/cpython/rev/a1aef5f84142 New changeset 8a564ab1d208 by Serhiy Storchaka in branch '2.7': Issue #22949: Documented that fnmatch.translate() is for use with re.match(). https://hg.python.org/cpython/rev/8a564ab1d208 New changeset dfda2f33fd08 by Serhiy Storchaka in branch '3.6': Issue #22949: Documented that fnmatch.translate() is for use with re.match(). https://hg.python.org/cpython/rev/dfda2f33fd08 New changeset d103ee917342 by Serhiy Storchaka in branch 'default': Issue #22949: Documented that fnmatch.translate() is for use with re.match(). https://hg.python.org/cpython/rev/d103ee917342 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 27 15:51:16 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Oct 2016 19:51:16 +0000 Subject: [docs] [issue22949] fnmatch.translate doesn't add ^ at the beginning In-Reply-To: <1417012488.81.0.131238508635.issue22949@psf.upfronthosting.co.za> Message-ID: <1477597876.69.0.584992611269.issue22949@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 00:02:02 2016 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 28 Oct 2016 04:02:02 +0000 Subject: [docs] [issue28088] Document Transport.set_protocol and get_protocol In-Reply-To: <1475369173.63.0.247466795846.issue28088@psf.upfronthosting.co.za> Message-ID: <1477627322.55.0.0229036811114.issue28088@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: I added a note like this. .. note:: Switching protocol should only be done when both protocols are documented to support the switch. Would this work? Would appreciate any feedback of how to properly document this behavior. Thanks. ---------- Added file: http://bugs.python.org/file45247/issue28088v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 00:06:45 2016 From: report at bugs.python.org (INADA Naoki) Date: Fri, 28 Oct 2016 04:06:45 +0000 Subject: [docs] [issue28088] Document Transport.set_protocol and get_protocol In-Reply-To: <1475369173.63.0.247466795846.issue28088@psf.upfronthosting.co.za> Message-ID: <1477627605.08.0.205504007719.issue28088@psf.upfronthosting.co.za> INADA Naoki added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 08:55:42 2016 From: report at bugs.python.org (Ian Kelling) Date: Fri, 28 Oct 2016 12:55:42 +0000 Subject: [docs] [issue28546] Better explain setting pdb breakpoints Message-ID: <1477659342.78.0.0469891681289.issue28546@psf.upfronthosting.co.za> New submission from Ian Kelling: https://docs.python.org/3.7/library/pdb.html: "The typical usage to break into the debugger from a running program is to insert import pdb; pdb.set_trace() at the location you want to break into the debugger." A plain read of this says: insert code into a running program. I can do this just fine in gdb, so when reading this, I wonder if attaching is explained elsewhere, or what. Patch to improve this. ---------- assignee: docs at python components: Documentation files: iank-v1.patch keywords: patch messages: 279601 nosy: docs at python, iank priority: normal severity: normal status: open title: Better explain setting pdb breakpoints versions: Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 Added file: http://bugs.python.org/file45253/iank-v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 13:26:33 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 28 Oct 2016 17:26:33 +0000 Subject: [docs] [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477675593.09.0.889499305027.issue25152@psf.upfronthosting.co.za> Brett Cannon added the comment: It looks like Zachary beat me to fixing this: https://hg.python.org/cpython/rev/5d1934c27137. Thanks for the patch, Mariatta, even if Zachary didn't use it. ---------- stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 13:57:44 2016 From: report at bugs.python.org (Zachary Ware) Date: Fri, 28 Oct 2016 17:57:44 +0000 Subject: [docs] [issue25152] venv documentation doesn't tell you how to specify a particular version of python In-Reply-To: <1442499212.73.0.745656543772.issue25152@psf.upfronthosting.co.za> Message-ID: <1477677464.38.0.930260947448.issue25152@psf.upfronthosting.co.za> Zachary Ware added the comment: Ah ha, I thought I'd seen it mentioned in an issue somewhere, but I didn't go looking when I noticed my Docs bots were all red. Thanks for the patch anyway, Mariatta! ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 14:04:44 2016 From: report at bugs.python.org (Xavier de Gaye) Date: Fri, 28 Oct 2016 18:04:44 +0000 Subject: [docs] [issue28546] Better explain setting pdb breakpoints In-Reply-To: <1477659342.78.0.0469891681289.issue28546@psf.upfronthosting.co.za> Message-ID: <1477677884.55.0.118827312186.issue28546@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 28 20:08:04 2016 From: report at bugs.python.org (Ofek Lev) Date: Sat, 29 Oct 2016 00:08:04 +0000 Subject: [docs] [issue28553] int.to_bytes docs logic error Message-ID: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> New submission from Ofek Lev: https://docs.python.org/3/library/stdtypes.html#int.to_bytes To convert an int to the exact number of bytes required, the docs recommend "x.to_bytes((x.bit_length() // 8) + 1, ...)". This is incorrect when length is a multiple of 8, e.g. 296. The correct way is "x.to_bytes((x.bit_length() + 7) // 8, ...)". ---------- assignee: docs at python components: Documentation messages: 279641 nosy: Ofekmeister, docs at python priority: normal severity: normal status: open title: int.to_bytes docs logic error type: enhancement versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 29 10:44:07 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 29 Oct 2016 14:44:07 +0000 Subject: [docs] [issue26638] Avoid warnings about missing CLI options when building documentation In-Reply-To: <1458881380.09.0.599104229044.issue26638@psf.upfronthosting.co.za> Message-ID: <1477752246.98.0.447585026381.issue26638@psf.upfronthosting.co.za> SilentGhost added the comment: Patch (v3) is fine, except it no longer applies cleanly. I have a patch against the tip which I could upload if needed. I would also be in favour of disabling the unittest options directly, currently no link is generated and it doesn't seem like there is a straightforward solution in sight. ---------- nosy: +SilentGhost stage: patch review -> commit review versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 01:16:50 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 30 Oct 2016 05:16:50 +0000 Subject: [docs] [issue11681] -b option undocumented In-Reply-To: <1301100825.87.0.69977993755.issue11681@psf.upfronthosting.co.za> Message-ID: <1477804609.97.0.49955483778.issue11681@psf.upfronthosting.co.za> Martin Panter added the comment: As well as the usage string, it is missing from the list of options in the main documentation at Doc/using/cmdline.rst. There are a couple of places (sys.rst and warnings.rst) that reference :option:`-b`, and newer versions of Sphinx complain about this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 01:50:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Oct 2016 05:50:18 +0000 Subject: [docs] [issue26638] Avoid warnings about missing CLI options when building documentation In-Reply-To: <1458881380.09.0.599104229044.issue26638@psf.upfronthosting.co.za> Message-ID: <20161030055015.17076.48477.FEAD6ABC@psf.io> Roundup Robot added the comment: New changeset 307d7568b6ae by Martin Panter in branch '3.5': Issue #26638: Mask undefined CLI options to defeat new Sphinx warnings https://hg.python.org/cpython/rev/307d7568b6ae New changeset 57f4ba6b29bf by Martin Panter in branch '3.5': Issue #26638: Work around more CLI options that can?t be linked https://hg.python.org/cpython/rev/57f4ba6b29bf New changeset a0d272fbc7de by Martin Panter in branch '3.6': Issue #26638: Merge option warning fixes from 3.5 into 3.6 https://hg.python.org/cpython/rev/a0d272fbc7de New changeset 85e2cfe5b12d by Martin Panter in branch 'default': Issue #26638: Merge option warning fixes from 3.6 https://hg.python.org/cpython/rev/85e2cfe5b12d New changeset c4b934a77a08 by Martin Panter in branch '2.7': Issue #26638: Disable inappropriate links to Python interpreter options https://hg.python.org/cpython/rev/c4b934a77a08 New changeset 0ff00d53d6a9 by Martin Panter in branch '2.7': Issue #26638: Mask undefined CLI options to defeat new Sphinx warnings https://hg.python.org/cpython/rev/0ff00d53d6a9 New changeset cf91d48aa353 by Martin Panter in branch '2.7': Issue #26638: Cannot directly link to main option from the ?timeit? module https://hg.python.org/cpython/rev/cf91d48aa353 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 02:34:21 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 30 Oct 2016 06:34:21 +0000 Subject: [docs] [issue26638] Avoid warnings about missing CLI options when building documentation In-Reply-To: <1458881380.09.0.599104229044.issue26638@psf.upfronthosting.co.za> Message-ID: <1477809261.82.0.451548122352.issue26638@psf.upfronthosting.co.za> Martin Panter added the comment: For the ?unittest? module, I added separate text with a link: (see Warning control). Similarly for ?timeit? in 2.7. Now the only Sphinx warnings I get are a handful about syntax highlighting, and two genuine ones relating to the missing -b documentation (Issue 11681). ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 10:48:07 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 30 Oct 2016 14:48:07 +0000 Subject: [docs] [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1477838887.59.0.665025827506.issue28499@psf.upfronthosting.co.za> Vinay Sajip added the comment: The current documentation makes it very simple for naive users, with the main section being a reference and leaving the details to the basic and advanced tutorials and the cookbook. This was deliberately done in response to earlier feedback that the documentation provided too much detail for simple usage, and numerous people at the time responded positively to that set of changes. I'm happy to look at any proposals to improve the layout of the logging documentation, but remember that it must satisfy a lot of different audiences at different levels. Is there a link to Florian's talk somewhere? I couldn't find anything on the PyCon-fr 2016 website. Is it in English, and if not, is there a translation / transcript in English available? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 10:49:19 2016 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 30 Oct 2016 14:49:19 +0000 Subject: [docs] [issue28499] Logging module documentation needs a rework. In-Reply-To: <1477070357.17.0.711656351025.issue28499@psf.upfronthosting.co.za> Message-ID: <1477838959.04.0.649220649713.issue28499@psf.upfronthosting.co.za> Vinay Sajip added the comment: s/leaving the details/leaving the more narrative aspects/ ---------- _______________________________________ Python tracker _______________________________________ From dify.ltd at gmail.com Thu Oct 27 04:14:27 2016 From: dify.ltd at gmail.com (Attila-Mihaly Balazs) Date: Thu, 27 Oct 2016 11:14:27 +0300 Subject: [docs] Clarify that list.insert / list.pop works with negative indexes Message-ID: Both list.insert and list.pop support negative indexes and they behave just like list[negative index]. IMHO this should be called out explicitly in the documentation - ie: https://docs.python.org/3.7/tutorial/datastructures.html# Something like: "a.insert(-1, x) inserts before the last element" Regards, Attila -------------- next part -------------- An HTML attachment was scrubbed... URL: From hendrym73 at gmail.com Wed Oct 26 13:44:02 2016 From: hendrym73 at gmail.com (Hendry Moronta) Date: Wed, 26 Oct 2016 13:44:02 -0400 Subject: [docs] docs in spanish Message-ID: hello I would like to receive documentation in spa?ol language if available, thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rad at nowitworks.eu Thu Oct 27 06:09:14 2016 From: rad at nowitworks.eu (Rad) Date: Thu, 27 Oct 2016 23:09:14 +1300 Subject: [docs] super() definition Message-ID: Hi there! the definition goes "Return a proxy object that delegates method calls to a parent or sibling class of type." ( https://docs.python.org/3/library/functions.html#super) it is misleading since can read as a parent class of type OR a sibling class of type while actually what it mean is "a parent or its sibling class ..." or perhaps even more explicitly "a parent or a sibling of the parent ...". The same problem with the last sentence of 5th paragraph: "(because the order of calls is determined at runtime, because that order adapts to changes in the class hierarchy, and because that order can include sibling classes that are unknown prior to runtime)". It is not clear whose sibling it refers to. Cheers! Rad Radomirs Cirskis MCDBA, MCAD C#, MCSD .NET C#, ZCE PHP5, MCSD VB6 ... M: +64 221 221 442 | E: RAD at nowITworks.eu [image: View my profile on LinkedIn] -------------- next part -------------- An HTML attachment was scrubbed... URL: From sophie.hunt at ctechemail.com Fri Oct 28 04:48:19 2016 From: sophie.hunt at ctechemail.com (Sophie Hunt) Date: Fri, 28 Oct 2016 08:48:19 +0000 Subject: [docs] Broken Link Message-ID: <4245457.or_mail@ctechemail.com> Hi, I recently came across a link on your site which appears to be broken. Here's the link http://csrc.nist.gov/encryption/tkhash.html, found on this page of your site http://davis.lbl.gov/Manuals/PYTHON-2.5.1/lib/module-sha.html. I thought that you may wish to check out our guide [https://www.comparitech.com/blog/information-security/cryptography-guide/] as it may make a suitable replacement. I hope this helps! SophieDon't want emails from us anymore? Reply to this email with the word "UNSUBSCRIBE" in the subject line. Comparitech, Kings Lodge, London Road, Sevenoaks Kent, TM15 6AR, United Kingdom -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sun Oct 30 13:01:02 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 17:01:02 +0000 Subject: [docs] [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477846862.68.0.105585374889.issue28513@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From hikerman2005-general2 at yahoo.com Sun Oct 30 13:27:35 2016 From: hikerman2005-general2 at yahoo.com (Robert Donovan) Date: Sun, 30 Oct 2016 17:27:35 +0000 Subject: [docs] Python 3.5.2 tutorial, section 6.4.1 Message-ID: <58162D87.4080301@yahoo.com> This really needs some work. It's much lower quality than the rest of the tutorial so far. Different author? Details follow... 1. Quote "If |__all__| is not defined, the statement |from sound.effects import *| does /not/ import all submodules from the package |sound.effects| into the current namespace; it only ensures that the package |sound.effects| has been imported (possibly running any initialization code in |__init__.py|) and then imports whatever names are defined in the package. This includes any names defined (and submodules explicitly loaded) by |__init__.py|. " This needs to be reworded. What does it mean to import a package if not to import its modules? If you are telling us, then /tell us/: ;it only ensures that the package |sound.effects| has been imported, WHICH MEANS running any initialization code in |__init__.py| ... /and/... and then imports whatever names are defined in the package (DEFINED WHERE? IN THE __init__.py FILE? IF SO HOW IS THIS DIFFERENT FROM JUST RUNNING THAT FILE? CAN NAMES BE DEFINED ANYWHERE ELSE? WHAT ABOUT THE MODULE NAMES? ARE THEY DEFINED? WHAT DO YOU MEAN BY DEFINED? THEY ARE ON THE DISK, IS THAT DEFINED? WHAT DO YOU MEAN BY "the package"?) This includes any names defined (and submodules explicitly loaded) by |__init__.py|. ("this includes" IMPLIES THERE ARE OTHERS. LIKE WHAT?) 2. Quote " It also includes any submodules of the package that were explicitly loaded by previous |import| statements. Consider this code: import sound.effects.echo import sound.effects.surround from sound.effects import * In this example, the |echo| and |surround| modules are imported in the current namespace because they are defined in the |sound.effects| package when the |from...import| statement is executed. (This also works when |__all__| is defined.)" I can't figure out what this means at all. They are "defined in the |sound.effects| package when the |from...import| statement is executed"? Surely they are defined all the time, sitting there on disk. Surely they were imported when we asked them to be with the initial import statements. Why would we ask them to be imported again with the * form? 3. Quote "Although certain modules are designed to export only names that follow certain patterns when you use |import *|, it is still considered bad practise in production code." What!? 4. Quote "Now what happens when the user writes |from sound.effects import *|? Ideally, one would hope that this somehow goes out to the filesystem, finds which submodules are present in the package, and imports them all. This could take a long time and importing sub-modules might have unwanted side-effects that should only happen when the sub-module is explicitly imported. The only solution is... " This one is nit-picking, but a "However, this could take a long time..." would aid comprehension and make it a little less self-contradictory. -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sun Oct 30 14:59:41 2016 From: report at bugs.python.org (INADA Naoki) Date: Sun, 30 Oct 2016 18:59:41 +0000 Subject: [docs] [issue28553] int.to_bytes docs logic error In-Reply-To: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> Message-ID: <1477853981.04.0.963559026757.issue28553@psf.upfronthosting.co.za> INADA Naoki added the comment: Make sense. ---------- keywords: +easy, patch nosy: +inada.naoki stage: -> commit review versions: -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file45280/28553.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 15:14:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Oct 2016 19:14:38 +0000 Subject: [docs] [issue28553] int.to_bytes docs logic error In-Reply-To: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> Message-ID: <1477854878.61.0.253116289805.issue28553@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 30 22:58:06 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 31 Oct 2016 02:58:06 +0000 Subject: [docs] [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477882686.11.0.406664228245.issue28513@psf.upfronthosting.co.za> Xiang Zhang added the comment: LGTM. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 04:05:08 2016 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 31 Oct 2016 08:05:08 +0000 Subject: [docs] [issue28553] int.to_bytes docs logic error In-Reply-To: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> Message-ID: <1477901108.17.0.658543104698.issue28553@psf.upfronthosting.co.za> Mark Dickinson added the comment: Patch LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 04:42:32 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Oct 2016 08:42:32 +0000 Subject: [docs] [issue28553] int.to_bytes docs logic error In-Reply-To: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> Message-ID: <20161031084229.34734.17335.6DDA6D55@psf.io> Roundup Robot added the comment: New changeset 32d8c89e90d1 by INADA Naoki in branch '3.5': Issue #28553: Fix logic error in example code of int.to_bytes doc. https://hg.python.org/cpython/rev/32d8c89e90d1 New changeset 2ae3f1599c34 by INADA Naoki in branch '3.6': Issue #28553: Fix logic error in example code of int.to_bytes doc. https://hg.python.org/cpython/rev/2ae3f1599c34 New changeset 66f255754ce9 by INADA Naoki in branch 'default': Issue #28553: Fix logic error in example code of int.to_bytes doc. https://hg.python.org/cpython/rev/66f255754ce9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 04:43:15 2016 From: report at bugs.python.org (INADA Naoki) Date: Mon, 31 Oct 2016 08:43:15 +0000 Subject: [docs] [issue28553] int.to_bytes docs logic error In-Reply-To: <1477699684.07.0.61979939957.issue28553@psf.upfronthosting.co.za> Message-ID: <1477903395.28.0.711213862609.issue28553@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 13:04:35 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 31 Oct 2016 17:04:35 +0000 Subject: [docs] [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477933475.52.0.581590298716.issue28513@psf.upfronthosting.co.za> SilentGhost added the comment: Serhiy, this needs .. program:: zipfile directive specified before cmdoption. Without it :option:`-c` links to python's -c, rather than zipfile's. The -l and -e are linked correctly, but the option links would have be be changed for all three, i.e. to :option:`-c ` ---------- nosy: +SilentGhost stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 14:34:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Oct 2016 18:34:38 +0000 Subject: [docs] [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477938878.15.0.525247710537.issue28513@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks SilentGhost! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 31 17:59:40 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 31 Oct 2016 21:59:40 +0000 Subject: [docs] [issue28513] Document zipfile CLI In-Reply-To: <1477218977.25.0.95260452294.issue28513@psf.upfronthosting.co.za> Message-ID: <1477951180.49.0.801253170391.issue28513@psf.upfronthosting.co.za> Martin Panter added the comment: Apparently (haven?t tried myself) if you put ?.. program:: zipfile? before the :option: invocations, it changes the default context and you don?t need the bit. The text in general looks fine. One very minor thing: I would use a hyphen when ?command line? is a modifier on another noun, i.e. command-line interface, command-line options. ---------- _______________________________________ Python tracker _______________________________________