From report at bugs.python.org Sun May 1 00:32:17 2016 From: report at bugs.python.org (Yclept Nemo) Date: Sun, 01 May 2016 04:32:17 +0000 Subject: [docs] [issue26897] Clarify Popen stdin, stdout, stderr Message-ID: <1462077137.11.0.0338937138998.issue26897@psf.upfronthosting.co.za> New submission from Yclept Nemo: From: https://docs.python.org/dev/library/subprocess.html#popen-constructor "..., an existing file descriptor (a positive integer), an existing file object, and None." It should be made clear that the file object must be backed by an operating system file, i.e. must have a valid file descriptor. As it stands, the documentation suggests implicit concurrency: that any file object can be used, and on read/write from the subprocess/OS arbitrary python code will be executed, i.e. the python interpreter is pre-empted or python spawns a hidden I/O thread. Anyway, I'm pretty sure subprocess.Popen() just redirects the forked process' stdout/stdin/stderr to the file descriptors from the provided file object. ---------- assignee: docs at python components: Documentation messages: 264579 nosy: Yclept.Nemo, docs at python priority: normal severity: normal status: open title: Clarify Popen stdin, stdout, stderr versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 04:06:18 2016 From: report at bugs.python.org (Marco Buttu) Date: Sun, 01 May 2016 08:06:18 +0000 Subject: [docs] [issue26898] Error in the Message-ID: <1462089977.93.0.233622268862.issue26898@psf.upfronthosting.co.za> New submission from Marco Buttu: The math.isclose() documentation reports is_close() as function name, instead of isclose(): >>> import math >>> math.isclose.__doc__[:45] 'is_close(a, b, *, rel_tol=1e-09, abs_tol=0.0)' ---------- assignee: docs at python components: Documentation files: isclose.patch keywords: patch messages: 264585 nosy: docs at python, marco.buttu priority: normal severity: normal status: open title: Error in the versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file42669/isclose.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 04:12:06 2016 From: report at bugs.python.org (SilentGhost) Date: Sun, 01 May 2016 08:12:06 +0000 Subject: [docs] [issue26898] Error in the In-Reply-To: <1462089977.93.0.233622268862.issue26898@psf.upfronthosting.co.za> Message-ID: <1462090326.69.0.246729700834.issue26898@psf.upfronthosting.co.za> SilentGhost added the comment: LGTM ---------- nosy: +SilentGhost stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 04:27:56 2016 From: report at bugs.python.org (Marco Buttu) Date: Sun, 01 May 2016 08:27:56 +0000 Subject: [docs] [issue26898] Typo in the documentation of math.isclose() In-Reply-To: <1462089977.93.0.233622268862.issue26898@psf.upfronthosting.co.za> Message-ID: <1462091276.93.0.908216354325.issue26898@psf.upfronthosting.co.za> Changes by Marco Buttu : ---------- title: Error in the -> Typo in the documentation of math.isclose() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 04:28:43 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 May 2016 08:28:43 +0000 Subject: [docs] [issue26898] Typo in the documentation of math.isclose() In-Reply-To: <1462089977.93.0.233622268862.issue26898@psf.upfronthosting.co.za> Message-ID: <20160501082840.21665.49432.C2902BFB@psf.io> Roundup Robot added the comment: New changeset 469bc90e8922 by Berker Peksag in branch '3.5': Issue #26898: Fix typo in math.isclose() docstring https://hg.python.org/cpython/rev/469bc90e8922 New changeset 634764b4675c by Berker Peksag in branch 'default': Issue #26898: Fix typo in math.isclose() docstring https://hg.python.org/cpython/rev/634764b4675c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 04:29:55 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 01 May 2016 08:29:55 +0000 Subject: [docs] [issue26898] Typo in the documentation of math.isclose() In-Reply-To: <1462089977.93.0.233622268862.issue26898@psf.upfronthosting.co.za> Message-ID: <1462091395.36.0.181804017555.issue26898@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- nosy: +berker.peksag resolution: -> fixed stage: commit review -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 06:09:35 2016 From: report at bugs.python.org (Paul Sokolovsky) Date: Sun, 01 May 2016 10:09:35 +0000 Subject: [docs] [issue26899] struct.pack_into(), struct.unpack_from() don't document support for negative offsets Message-ID: <1462097375.63.0.546095370218.issue26899@psf.upfronthosting.co.za> New submission from Paul Sokolovsky: See https://docs.python.org/3/library/struct.html#struct.pack_into https://docs.python.org/3/library/struct.html#struct.unpack_from Actual source contains code like: if (offset < 0) offset += vbuf.len; to allow specify offsets from the end of a buffer. ---------- assignee: docs at python components: Documentation messages: 264590 nosy: docs at python, pfalcon priority: normal severity: normal status: open title: struct.pack_into(), struct.unpack_from() don't document support for negative offsets versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 13:34:26 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 May 2016 17:34:26 +0000 Subject: [docs] [issue26874] Docstring error in divmod function In-Reply-To: <1461859730.5.0.461826994455.issue26874@psf.upfronthosting.co.za> Message-ID: <20160501173422.10030.40759.61A1DCB7@psf.io> Roundup Robot added the comment: New changeset 84ff79cce41e by Serhiy Storchaka in branch '3.5': Regenerate Argument Clinic code for issue #26874. https://hg.python.org/cpython/rev/84ff79cce41e New changeset 98678738b7e9 by Serhiy Storchaka in branch 'default': Regenerate Argument Clinic code for issue #26874. https://hg.python.org/cpython/rev/98678738b7e9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 1 15:33:26 2016 From: report at bugs.python.org (Zachary Ware) Date: Sun, 01 May 2016 19:33:26 +0000 Subject: [docs] [issue26874] Docstring error in divmod function In-Reply-To: <1461859730.5.0.461826994455.issue26874@psf.upfronthosting.co.za> Message-ID: <1462131206.15.0.317706889775.issue26874@psf.upfronthosting.co.za> Zachary Ware added the comment: Forgot that step, thanks Serhiy! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 05:26:51 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 02 May 2016 09:26:51 +0000 Subject: [docs] [issue18916] Various out-of-date Lock text in 3.2+ In-Reply-To: <1378255145.39.0.17069692986.issue18916@psf.upfronthosting.co.za> Message-ID: <1462181211.94.0.00871687476381.issue18916@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the path, Christopher. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +berker.peksag, docs at python resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 18:57:25 2016 From: report at bugs.python.org (Ned Batchelder) Date: Mon, 02 May 2016 22:57:25 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 Message-ID: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> New submission from Ned Batchelder: The numbered and bulletted lists are indented from the body text, which looks good in the .rst, but causes the lists themselves to be blockquotes. This leads to confusing formatting on python.org: https://www.python.org/dev/peps/pep-0420/ BTW: this formatting error is rampant among the PEPs... :( ---------- assignee: docs at python components: Documentation files: pep-0420.patch keywords: patch messages: 264677 nosy: docs at python, nedbat priority: normal severity: normal status: open title: Fix formatting of lists in PEP 420 Added file: http://bugs.python.org/file42686/pep-0420.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 2 19:41:07 2016 From: report at bugs.python.org (Ned Batchelder) Date: Mon, 02 May 2016 23:41:07 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <1462232467.17.0.435750471316.issue26914@psf.upfronthosting.co.za> Ned Batchelder added the comment: OK, "rampant" was overly dramatic... :) These PEPs seem to have the same issue: pep-0302.html pep-0327.html pep-0339.html pep-0362.html pep-0364.html pep-0372.html pep-0380.html pep-0382.html pep-0393.html pep-0400.html pep-0403.html pep-0404.html pep-0410.html pep-0416.html pep-0418.html pep-0426.html pep-0432.html pep-0433.html pep-0437.html pep-0446.html pep-0457.html pep-0461.html pep-0472.html pep-0488.html pep-0498.html pep-0628.html pep-3103.html pep-3104.html pep-3108.html pep-3121.html pep-3127.html pep-3131.html pep-3137.html pep-3141.html pep-3147.html pep-3149.html pep-3150.html pep-3156.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 00:26:57 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 May 2016 04:26:57 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <1462249616.99.0.655980031932.issue26914@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For references: PEP 0302: New Import Hooks PEP 0327: Decimal Data Type PEP 0339: Design of the CPython Compiler PEP 0362: Function Signature Object PEP 0364: Transitioning to the Py3K Standard Library PEP 0372: Adding an ordered dictionary to collections PEP 0380: Syntax for Delegating to a Subgenerator PEP 0382: Namespace Packages PEP 0393: Flexible String Representation PEP 0400: Deprecate codecs.StreamReader and codecs.StreamWriter PEP 0403: General purpose decorator clause (aka "@in" clause) PEP 0404: Python 2.8 Un-release Schedule PEP 0410: Use decimal.Decimal type for timestamps PEP 0416: Add a frozendict builtin type PEP 0418: Add monotonic time, performance counter, and process time functions PEP 0420: Implicit Namespace Packages PEP 0426: Metadata for Python Software Packages 2.0 PEP 0432: Simplifying the CPython startup sequence PEP 0433: Easier suppression of file descriptor inheritance PEP 0437: A DSL for specifying signatures, annotations and argument converters PEP 0446: Make newly created file descriptors non-inheritable PEP 0457: Syntax For Positional-Only Parameters PEP 0461: Adding % formatting to bytes and bytearray PEP 0472: Support for indexing with keyword arguments PEP 0488: Elimination of PYO files PEP 0498: Literal String Interpolation PEP 0628: Add ``math.tau`` PEP 3103: A Switch/Case Statement PEP 3104: Access to Names in Outer Scopes PEP 3108: Standard Library Reorganization PEP 3121: Extension Module Initialization and Finalization PEP 3127: Integer Literal Support and Syntax PEP 3131: Supporting Non-ASCII Identifiers PEP 3137: Immutable Bytes and Mutable Buffer PEP 3141: A Type Hierarchy for Numbers PEP 3147: PYC Repository Directories PEP 3149: ABI version tagged .so files PEP 3150: Statement local namespaces (aka "given" clause) PEP 3156: Asynchronous IO Support Rebooted: the "asyncio" Module ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 00:27:41 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 May 2016 04:27:41 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <1462249661.98.0.729044324077.issue26914@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 00:35:18 2016 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 May 2016 04:35:18 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <1462250118.75.0.639534162385.issue26914@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks pretty rampant to me :) Anyway, +1 for fixing, you can just do it without review if you have the time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 03:36:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 May 2016 07:36:41 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <20160503073637.21667.45381.41DC1C55@psf.io> Roundup Robot added the comment: New changeset 03a4c21ca991 by Berker Peksag in branch 'default': Issue #26914: Fix formatting of lists in PEP 420 https://hg.python.org/peps/rev/03a4c21ca991 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 03:38:31 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 03 May 2016 07:38:31 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <1462261111.33.0.13284587079.issue26914@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks, I pushed pep-0420.patch. ---------- keywords: +easy nosy: +berker.peksag stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 03:52:30 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 May 2016 07:52:30 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <20160503075226.8860.42104.6DA06531@psf.io> Roundup Robot added the comment: New changeset d420d6fe349f by Georg Brandl in branch 'default': Fix lists-in-blockquotes in 3xxx PEPs. Ref: #26914 https://hg.python.org/peps/rev/d420d6fe349f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 04:35:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 May 2016 08:35:18 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <20160503083514.16687.66468.8809BB14@psf.io> Roundup Robot added the comment: New changeset d34c698f63a3 by Georg Brandl in branch 'default': Fix lists-in-blockquotes in 0xxx PEPs. Ref: #26914 https://hg.python.org/peps/rev/d34c698f63a3 New changeset e7200e32b220 by Georg Brandl in branch 'default': Fixup some more lists-in-blockquotes. Fixes #26914. https://hg.python.org/peps/rev/e7200e32b220 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 04:36:47 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 May 2016 08:36:47 +0000 Subject: [docs] [issue26916] Word duplications in PEPs Message-ID: <1462264605.88.0.73387048167.issue26916@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch fixes typos in PEPs that cause words duplications. ---------- assignee: docs at python components: Documentation files: pep_duplicates.patch keywords: patch messages: 264695 nosy: docs at python, martin.panter, serhiy.storchaka priority: normal severity: normal status: open title: Word duplications in PEPs Added file: http://bugs.python.org/file42689/pep_duplicates.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 04:39:03 2016 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 May 2016 08:39:03 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <1462264743.36.0.307188907611.issue26914@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 04:40:47 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 03 May 2016 08:40:47 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <1462264847.41.0.712811333325.issue26914@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 04:44:50 2016 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 May 2016 08:44:50 +0000 Subject: [docs] [issue26916] Word duplications in PEPs In-Reply-To: <1462264605.88.0.73387048167.issue26916@psf.upfronthosting.co.za> Message-ID: <1462265090.44.0.776688447365.issue26916@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 05:07:10 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 May 2016 09:07:10 +0000 Subject: [docs] [issue26916] Word duplications in PEPs In-Reply-To: <1462264605.88.0.73387048167.issue26916@psf.upfronthosting.co.za> Message-ID: <20160503090705.100786.38829.1B52C6E9@psf.io> Roundup Robot added the comment: New changeset d0b969132758 by Serhiy Storchaka in branch 'default': Issue #26916: Fixed words duplications. https://hg.python.org/peps/rev/d0b969132758 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 06:22:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 May 2016 10:22:20 +0000 Subject: [docs] [issue26921] Incorrect usage of a/an articles in PEPs Message-ID: <1462270938.38.0.294058819503.issue26921@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Proposed patch fixes the usage of a/an articles in PEPs. ---------- assignee: docs at python components: Documentation files: pep_articles.patch keywords: patch messages: 264710 nosy: docs at python, georg.brandl, martin.panter, serhiy.storchaka priority: normal severity: normal status: open title: Incorrect usage of a/an articles in PEPs Added file: http://bugs.python.org/file42693/pep_articles.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 06:42:45 2016 From: report at bugs.python.org (Ned Batchelder) Date: Tue, 03 May 2016 10:42:45 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <1462272165.7.0.865567591099.issue26914@psf.upfronthosting.co.za> Ned Batchelder added the comment: Unless I have permissions I've never used, I don't think I can just push fixes to the peps repo. Also, it looks like Georg is working away at it! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 06:46:03 2016 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 May 2016 10:46:03 +0000 Subject: [docs] [issue26921] Incorrect usage of a/an articles in PEPs In-Reply-To: <1462270938.38.0.294058819503.issue26921@psf.upfronthosting.co.za> Message-ID: <1462272363.33.0.584579591795.issue26921@psf.upfronthosting.co.za> Georg Brandl added the comment: Also LGTM. It's easy to spot PEPs written by French people :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 06:47:42 2016 From: report at bugs.python.org (Georg Brandl) Date: Tue, 03 May 2016 10:47:42 +0000 Subject: [docs] [issue26914] Fix formatting of lists in PEP 420 In-Reply-To: <1462229844.3.0.0802177041097.issue26914@psf.upfronthosting.co.za> Message-ID: <1462272461.95.0.598068728657.issue26914@psf.upfronthosting.co.za> Georg Brandl added the comment: Yep, they should all be gone. I tried to make sure by running the sources through docutils and finding nested
nodes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 06:52:39 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 May 2016 10:52:39 +0000 Subject: [docs] [issue26921] Incorrect usage of a/an articles in PEPs In-Reply-To: <1462270938.38.0.294058819503.issue26921@psf.upfronthosting.co.za> Message-ID: <20160503105234.100806.1068.0E7E1C4C@psf.io> Roundup Robot added the comment: New changeset d617c7ba4e14 by Serhiy Storchaka in branch 'default': Issue #26921: Fixed a/an articles. https://hg.python.org/peps/rev/d617c7ba4e14 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 06:53:07 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 May 2016 10:53:07 +0000 Subject: [docs] [issue26916] Word duplications in PEPs In-Reply-To: <1462264605.88.0.73387048167.issue26916@psf.upfronthosting.co.za> Message-ID: <1462272787.28.0.247771910336.issue26916@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 06:53:51 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 03 May 2016 10:53:51 +0000 Subject: [docs] [issue26921] Incorrect usage of a/an articles in PEPs In-Reply-To: <1462270938.38.0.294058819503.issue26921@psf.upfronthosting.co.za> Message-ID: <1462272831.78.0.249519892873.issue26921@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for reviews Georg. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 3 12:59:32 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 03 May 2016 16:59:32 +0000 Subject: [docs] [issue26696] Document collections.abc.ByteString In-Reply-To: <1459881544.79.0.834895685887.issue26696@psf.upfronthosting.co.za> Message-ID: <1462294772.53.0.211492045273.issue26696@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From christianyeganeh at gmail.com Tue May 3 19:51:04 2016 From: christianyeganeh at gmail.com (Christian Yeganeh) Date: Tue, 3 May 2016 19:51:04 -0400 Subject: [docs] Bug report Message-ID: <096F4829-3F30-4113-B189-3FDBC8B120CD@gmail.com> I have found a bug. Its small and not harmful. But its still there. If you take the string of a tuple, it will not always return the correct string. If you have a tuple with only one element and cast it using str() it will put the comma at the end of the string before the ) as if there was a second element. sample code: >>> class testclass: ... def __repr__(s): return 'a' ... >>> (1,2)[1:] (2,) >>> tuple([1]) (1,) >>> tuple(['a']) ('a',) >>> tuple(tuple([1])) (1,) >>> tuple([testclass(),1,'a'])[1:2] (1,) >>> (1,2,testclass())[2:] (a,) >>> #no matter what way you get it as lon as its a single element it includes the , after the element ... >>> #however with multiple elements ... >>> tuple([1,2]) (1, 2) >>> (1,2) (1, 2) >>> (1,2,3)[1:] (2, 3) Christian Yeganeh From georg at python.org Wed May 4 01:21:18 2016 From: georg at python.org (Georg Brandl) Date: Wed, 4 May 2016 07:21:18 +0200 Subject: [docs] Bug report In-Reply-To: <096F4829-3F30-4113-B189-3FDBC8B120CD@gmail.com> References: <096F4829-3F30-4113-B189-3FDBC8B120CD@gmail.com> Message-ID: <7f843161-c7cc-30c9-2605-7d788da358f3@python.org> On 05/04/2016 01:51 AM, Christian Yeganeh wrote: > I have found a bug. Its small and not harmful. But its still there. If you take the string of a tuple, it will not always return the correct string. > If you have a tuple with only one element and cast it using str() it will put the comma at the end of the string before the ) as if there was a second element. > > sample code: >>>> class testclass: > ... def __repr__(s): return 'a' > ... >>>> (1,2)[1:] > (2,) >>>> tuple([1]) > (1,) ... Hi Christian, this is not a bug, but expected behavior: since 1-tuples are a valid type, we have to distinguish them from simply parenthesized expressions by the trailing comma. You can see that when trying to write a 1-tuple literal: >>> (1) 1 >>> (1,) (1,) And the repr output just mirrors the input syntax. cheers, Georg BTW, trailing commas are also allowed whenever you have a comma-separated list in Python. Always using a trailing comma for line-by-line lists helps in reducing diff churn and not forgetting the comma when adding elements. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 181 bytes Desc: OpenPGP digital signature URL: From report at bugs.python.org Wed May 4 07:08:46 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 04 May 2016 11:08:46 +0000 Subject: [docs] [issue26696] Document collections.abc.ByteString In-Reply-To: <1459881544.79.0.834895685887.issue26696@psf.upfronthosting.co.za> Message-ID: <1462360126.11.0.767145593759.issue26696@psf.upfronthosting.co.za> Xiang Zhang added the comment: Add collections.abc.ByteString's document. ---------- keywords: +patch Added file: http://bugs.python.org/file42711/ByteString_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 08:21:35 2016 From: report at bugs.python.org (mPython) Date: Wed, 04 May 2016 12:21:35 +0000 Subject: [docs] [issue26947] Documentation improvement needed Message-ID: <1462364495.31.0.190726094652.issue26947@psf.upfronthosting.co.za> New submission from mPython: On following page: https://docs.python.org/3/glossary.html#term-hashable sentence "All of Python?s immutable built-in objects are hashable, while no mutable containers (such as lists or dictionaries) are." is not complete - probably a word "not" is needed on the end. ---------- assignee: docs at python components: Documentation messages: 264805 nosy: docs at python, mPython priority: normal severity: normal status: open title: Documentation improvement needed versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 09:15:53 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 04 May 2016 13:15:53 +0000 Subject: [docs] [issue26947] Documentation improvement needed In-Reply-To: <1462364495.31.0.190726094652.issue26947@psf.upfronthosting.co.za> Message-ID: <1462367753.34.0.203744385669.issue26947@psf.upfronthosting.co.za> Xiang Zhang added the comment: I think the original is OK. Adding "not" means the opposite. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 09:45:42 2016 From: report at bugs.python.org (Joni Bekenstein) Date: Wed, 04 May 2016 13:45:42 +0000 Subject: [docs] [issue26950] Typo in unittest.mock > Autospeccing documentation Message-ID: <1462369542.26.0.815413375703.issue26950@psf.upfronthosting.co.za> New submission from Joni Bekenstein: In several code examples from unittest.mock > Autospeccing documentation you will find "assret_called_with" instead of "assert_called_with". ---------- assignee: docs at python components: Documentation messages: 264815 nosy: Joni Bekenstein, docs at python priority: normal severity: normal status: open title: Typo in unittest.mock > Autospeccing documentation type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 09:51:54 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 04 May 2016 13:51:54 +0000 Subject: [docs] [issue26950] Typo in unittest.mock > Autospeccing documentation In-Reply-To: <1462369542.26.0.815413375703.issue26950@psf.upfronthosting.co.za> Message-ID: <1462369914.73.0.757541518714.issue26950@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report, but the typos are intentional. Quoting from the documentation: [...] if you misspell one of these assert methods then your assertion is gone: >>> mock = Mock(name='Thing', return_value=None) >>> mock(1, 2, 3) >>> mock.assret_called_once_with(4, 5, 6) Your tests can pass silently and incorrectly because of the typo. ---------- nosy: +berker.peksag resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 09:55:41 2016 From: report at bugs.python.org (Joni Bekenstein) Date: Wed, 04 May 2016 13:55:41 +0000 Subject: [docs] [issue26950] Typo in unittest.mock > Autospeccing documentation In-Reply-To: <1462369542.26.0.815413375703.issue26950@psf.upfronthosting.co.za> Message-ID: <1462370141.84.0.440532600622.issue26950@psf.upfronthosting.co.za> Joni Bekenstein added the comment: My bad, didn't see the notice! Makes sense though. Sorry for opening an issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 10:36:13 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 04 May 2016 14:36:13 +0000 Subject: [docs] [issue26947] Documentation improvement needed In-Reply-To: <1462364495.31.0.190726094652.issue26947@psf.upfronthosting.co.za> Message-ID: <1462372573.27.0.293655183299.issue26947@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Xiang Zhang is correct: the original is technically correct. If you read it like this: "All of Python?s immutable built-in objects are hashable, while no mutable containers (such as lists or dictionaries) are [hashable]." it should be clear. But if you have a suggestion for wording which is easier to understand (especially for those whose English is not so good) please say so. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 11:14:20 2016 From: report at bugs.python.org (Eric V. Smith) Date: Wed, 04 May 2016 15:14:20 +0000 Subject: [docs] [issue26947] Documentation improvement needed In-Reply-To: <1462364495.31.0.190726094652.issue26947@psf.upfronthosting.co.za> Message-ID: <1462374860.54.0.117451696041.issue26947@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'm a native speaker, and it's not the greatest sentence. How about: All of Python?s immutable built-in objects (such as numbers, strings and tuples) are hashable. None of its mutable containers (such as lists or dictionaries) are hashable. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 12:08:02 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Wed, 04 May 2016 16:08:02 +0000 Subject: [docs] [issue26954] Add Guido's rejection notice to the "with" FAQ Message-ID: <1462378082.17.0.472643239372.issue26954@psf.upfronthosting.co.za> New submission from Steven D'Aprano: The FAQs include a discussion of the rejected Pascal "with" statement (different from the Python `with`). From time to time people propose variants of it, such as using a leading dot to make it unambiguous. Guido has just firmly rejected the latest such proposal. The FAQ should be updated to make it clear that even with a leading dot the proposal is dead, with a link to Guido's pronouncement. https://mail.python.org/pipermail/python-ideas/2016-May/040070.html ---------- assignee: docs at python components: Documentation messages: 264832 nosy: docs at python, steven.daprano priority: normal severity: normal status: open title: Add Guido's rejection notice to the "with" FAQ versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 13:00:04 2016 From: report at bugs.python.org (Brett Cannon) Date: Wed, 04 May 2016 17:00:04 +0000 Subject: [docs] [issue26696] Document collections.abc.ByteString In-Reply-To: <1459881544.79.0.834895685887.issue26696@psf.upfronthosting.co.za> Message-ID: <1462381204.47.0.961860169861.issue26696@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: docs at python -> brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 14:31:35 2016 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 04 May 2016 18:31:35 +0000 Subject: [docs] [issue26951] Unintuitive error when using generator expression in class property In-Reply-To: <1462372473.02.0.946073615941.issue26951@psf.upfronthosting.co.za> Message-ID: <1462386695.01.0.276122412792.issue26951@psf.upfronthosting.co.za> Mark Dickinson added the comment: The outer for loop in a generator expression is evaluated immediately; everything after that is evaluated lazily. This was a deliberate design choice: see https://www.python.org/dev/peps/pep-0289/#early-binding-versus-late-binding for some rationale. This explains why you're able to access "B". The inability to access "C" is due to the usual rule for Python scope resolution: class scopes are skipped when examining nested scopes. The early evaluation of the outermost for is covered in the docs, here: https://docs.python.org/2/reference/expressions.html#generator-expressions """ However, the leftmost for clause is immediately evaluated, so that an error produced by it can be seen before any other possible error in the code that handles the generator expression. """ So this behaviour is by design, though there may be a doc issue here. Changing components and versions accordingly. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, mark.dickinson versions: +Python 3.6 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 15:03:30 2016 From: report at bugs.python.org (Alex Chan) Date: Wed, 04 May 2016 19:03:30 +0000 Subject: [docs] [issue26957] Docs: remove duplicate "the" in description of `%z` in datetime docs Message-ID: <1462388610.21.0.688244618598.issue26957@psf.upfronthosting.co.za> New submission from Alex Chan: The description of the `%z` format code in the datetime docs reads: > UTC offset in the form +HHMM or -HHMM (empty string if the the object is naive). This tiny patch removes the second "the". The current wording goes at least as far back as Python 2.6; see https://docs.python.org/2.6/library/datetime.html?highlight=datetime#strftime-and-strptime-behavior. ---------- assignee: docs at python components: Documentation files: oneword.patch keywords: patch messages: 264848 nosy: alexwlchan, docs at python priority: normal severity: normal status: open title: Docs: remove duplicate "the" in description of `%z` in datetime docs type: enhancement Added file: http://bugs.python.org/file42719/oneword.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 16:25:52 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 May 2016 20:25:52 +0000 Subject: [docs] [issue26957] Docs: remove duplicate "the" in description of `%z` in datetime docs In-Reply-To: <1462388610.21.0.688244618598.issue26957@psf.upfronthosting.co.za> Message-ID: <20160504202549.15727.16652.525839EC@psf.io> Roundup Robot added the comment: New changeset 580ddeccd689 by Berker Peksag in branch '3.5': Issue #26957: Remove duplicate 'the' from datetime documentation https://hg.python.org/cpython/rev/580ddeccd689 New changeset 3a069e5593ef by Berker Peksag in branch 'default': Issue #26957: Remove duplicate 'the' from datetime documentation https://hg.python.org/cpython/rev/3a069e5593ef ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 4 16:26:27 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 04 May 2016 20:26:27 +0000 Subject: [docs] [issue26957] Docs: remove duplicate "the" in description of `%z` in datetime docs In-Reply-To: <1462388610.21.0.688244618598.issue26957@psf.upfronthosting.co.za> Message-ID: <1462393587.69.0.891330296544.issue26957@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> behavior versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 01:31:52 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 05 May 2016 05:31:52 +0000 Subject: [docs] [issue26947] Documentation improvement needed In-Reply-To: <1462364495.31.0.190726094652.issue26947@psf.upfronthosting.co.za> Message-ID: <1462426312.42.0.130728377821.issue26947@psf.upfronthosting.co.za> Xiang Zhang added the comment: As a non-native speaker, actually I prefer the original one. But both versions lead to no confusion for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 03:53:26 2016 From: report at bugs.python.org (Nathan Kerr) Date: Thu, 05 May 2016 07:53:26 +0000 Subject: [docs] [issue26962] curses documenation- keys for Page Up and Page Down are reversed Message-ID: <1462434806.76.0.440361178857.issue26962@psf.upfronthosting.co.za> New submission from Nathan Kerr: In the documentation for the curses module- 15.11 in Python 2.7 (https://docs.python.org/2.7/library/curses.html), the given key values for Page Up and Page Down are "KEY_NPAGE" and "KEY_PPAGE" respectively. These should be reversed. This has been fixed in the documentation for 3.5 and 3.6 but not in the previous versions. See this bug report: http://bugs.python.org/issue26679 ---------- assignee: docs at python components: Documentation messages: 264884 nosy: docs at python, nkerr priority: normal severity: normal status: open title: curses documenation- keys for Page Up and Page Down are reversed type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 03:56:14 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 05 May 2016 07:56:14 +0000 Subject: [docs] [issue26962] curses documenation- keys for Page Up and Page Down are reversed In-Reply-To: <1462434806.76.0.440361178857.issue26962@psf.upfronthosting.co.za> Message-ID: <1462434974.12.0.451048008512.issue26962@psf.upfronthosting.co.za> Berker Peksag added the comment: Good catch, I forgot to update 2.7 (3.2, 3.3 and 3.4 are in security-fix-only mode so they don't get documentation updates anymore). ---------- nosy: +berker.peksag versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 04:05:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 May 2016 08:05:41 +0000 Subject: [docs] [issue26962] curses documenation- keys for Page Up and Page Down are reversed In-Reply-To: <1462434806.76.0.440361178857.issue26962@psf.upfronthosting.co.za> Message-ID: <20160505080532.21003.90248.D74AFC09@psf.io> Roundup Robot added the comment: New changeset 4462e193f089 by Berker Peksag in branch '2.7': Issue #26962: Backport 23d986228c6b to 2.7 https://hg.python.org/cpython/rev/4462e193f089 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 04:06:10 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 05 May 2016 08:06:10 +0000 Subject: [docs] [issue26962] curses documenation- keys for Page Up and Page Down are reversed In-Reply-To: <1462434806.76.0.440361178857.issue26962@psf.upfronthosting.co.za> Message-ID: <1462435570.12.0.919244233774.issue26962@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 06:08:06 2016 From: report at bugs.python.org (mPython) Date: Thu, 05 May 2016 10:08:06 +0000 Subject: [docs] [issue26947] Documentation improvement needed In-Reply-To: <1462364495.31.0.190726094652.issue26947@psf.upfronthosting.co.za> Message-ID: <1462442886.91.0.753919377535.issue26947@psf.upfronthosting.co.za> mPython added the comment: Just to mention that I'm not native speaker, and I'm Django (Python) beginner. I'm very good in C++, Java and in last 12 years read a lot IT documentation. Mentioned sentence was not clear enough for me so I created this ticket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 13:06:37 2016 From: report at bugs.python.org (Olav Morken) Date: Thu, 05 May 2016 17:06:37 +0000 Subject: [docs] [issue26964] Incorrect documentation for `-u`-flag Message-ID: <1462467997.8.0.490878249706.issue26964@psf.upfronthosting.co.za> New submission from Olav Morken: The documentation for the `-u`-flag (https://docs.python.org/3/using/cmdline.html#cmdoption-u) contains: > The text I/O layer will still be line-buffered if writing to the console, or block-buffered if redirected to a non-interactive file. This does not appear to be the case -- instead it is always line-buffered: https://hg.python.org/cpython/file/v3.5.1/Python/pylifecycle.c#l1041 Attached is a trivial patch that simply removes everything after "line-buffered". ---------- assignee: docs at python components: Documentation files: fix-doc-unbuffered.patch keywords: patch messages: 264910 nosy: docs at python, olavmrk priority: normal severity: normal status: open title: Incorrect documentation for `-u`-flag Added file: http://bugs.python.org/file42736/fix-doc-unbuffered.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 17:47:44 2016 From: report at bugs.python.org (Robert Jordens) Date: Thu, 05 May 2016 21:47:44 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462484864.19.0.115802555056.issue26156@psf.upfronthosting.co.za> Robert Jordens added the comment: The original bug report is (apart from spelling) correct. This is a bug and it should be closed. Please reopen. This patch reverts the erroneous change in: changeset: 96185:548d5704fcb3 user: Yury Selivanov date: Thu May 21 11:50:30 2015 -0400 summary: Issue 24180: Documentation for PEP 492 changes. ---------- keywords: +patch nosy: +Robert.Jordens Added file: http://bugs.python.org/file42740/issue26156_power.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 17:51:43 2016 From: report at bugs.python.org (Robert Jordens) Date: Thu, 05 May 2016 21:51:43 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462485103.43.0.723251234855.issue26156@psf.upfronthosting.co.za> Robert Jordens added the comment: That should have read "... should _not_ be closed." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 5 17:59:14 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 05 May 2016 21:59:14 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462485554.98.0.227346114413.issue26156@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: not a bug -> stage: resolved -> commit review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 00:30:30 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 May 2016 04:30:30 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462509030.66.0.59703116191.issue26156@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The docs looks correct to me. It reflects the fact that the "await" keyword has higher priority than the power operator. "await a ** b" is identical to "(await a) ** b", not "await (a ** b)". ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 00:32:13 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 06 May 2016 04:32:13 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1462509030.66.0.59703116191.issue26156@psf.upfronthosting.co.za> Message-ID: Yury Selivanov added the comment: Fwiw, I'm -1 on changing this. I think that the current names are correct. ---------- nosy: +Yury.Selivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 00:41:23 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 May 2016 04:41:23 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462509683.44.0.312262232847.issue26156@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But to avoid confusion I propose following patch. This may be more correct, since it is strange to name the expression without "await" "await expression". ---------- Added file: http://bugs.python.org/file42741/issue26156_await_power.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 00:45:44 2016 From: report at bugs.python.org (Zachary Ware) Date: Fri, 06 May 2016 04:45:44 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462509944.3.0.95226144861.issue26156@psf.upfronthosting.co.za> Zachary Ware added the comment: I agree that what is currently in the docs is technically correct. The section on the power operator: power ::= await ["**" u_expr] should be read as: power ::= (["await"] primary) ["**" u_expr] just as the definition of 'u_expr' below should be read as: u_expr ::= (await ["**" u_expr]) | "-" u_expr | "+" u_expr | "~" u_expr and 'await' should be read as: await ::= ["await"] (atom | attributeref | subscription | slicing | call) Each definition builds upon previous ones. However, it is confusing. Could a name other than "await" be used, since "await" is easily confused with the keyword await? ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 00:49:04 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 May 2016 04:49:04 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462510143.93.0.0778430480049.issue26156@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: May be "w_expr"? ("a_expr" is already used for addition level). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 00:50:30 2016 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 06 May 2016 04:50:30 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462510230.05.0.705361872637.issue26156@psf.upfronthosting.co.za> Yury Selivanov added the comment: Let's call it "await_expr" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 00:59:55 2016 From: report at bugs.python.org (Zachary Ware) Date: Fri, 06 May 2016 04:59:55 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1462510230.05.0.705361872637.issue26156@psf.upfronthosting.co.za> Message-ID: Zachary Ware added the comment: +1 for await_expr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 02:10:41 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 May 2016 06:10:41 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462515041.44.0.881249064933.issue26156@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The confusion is in the definition of await expression with optional "await". Without "await" the expression doesn't suspend the execution of coroutine. And await expression can only be used inside a coroutine function, but the power operator can be used outside. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 03:40:09 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 May 2016 07:40:09 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462520409.09.0.437184323867.issue18531@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yet one difference is that kwargs can be NULL in C function if no keyword arguments are supplied. Here is a patch that adds tests for exact types of args and kwargs arguments in C functions. I think that we should keep passing NULL as kwargs for performance reasons. But shouldn't we convert dict subclass to exact dict? I think there are good reasons to do this. Some functions can save kwargs for latter use. And this makes the implementation more consistent with PyPy. If defaultdict behavior is needed for formatting, there is format_map(). ---------- keywords: +patch nosy: +serhiy.storchaka type: -> behavior versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file42742/test_args_kwargs_types.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 03:51:07 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 May 2016 07:51:07 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462521067.44.0.709005115434.issue18531@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file42742/test_args_kwargs_types.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 03:51:20 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 May 2016 07:51:20 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462521080.79.0.125417501603.issue18531@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file42743/test_args_kwargs_types.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 04:30:46 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 May 2016 08:30:46 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462523446.15.0.323221716366.issue18531@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Proposed patch converts var-keyword arguments to exact dict. Since it changes the behavior of str.format() it can be pushed only in 3.6. ---------- Added file: http://bugs.python.org/file42746/ceval_kwargs_exact_dict.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 06:31:22 2016 From: report at bugs.python.org (Robert Jordens) Date: Fri, 06 May 2016 10:31:22 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462530682.4.0.378788589104.issue26156@psf.upfronthosting.co.za> Robert Jordens added the comment: Ack to the new patch. It is semantically confusing that the await expression also served as the power base without any await. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 07:50:41 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 06 May 2016 11:50:41 +0000 Subject: [docs] [issue17888] docs: more information on documentation team In-Reply-To: <1367412914.06.0.588625037016.issue17888@psf.upfronthosting.co.za> Message-ID: <1462535441.78.0.699078646026.issue17888@psf.upfronthosting.co.za> Berker Peksag added the comment: issue17888.patch looks good to me. I'd probably remove the "necessary skills" part. ---------- nosy: +berker.peksag stage: needs patch -> patch review versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 08:35:27 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 06 May 2016 12:35:27 +0000 Subject: [docs] [issue18841] math.isfinite fails with Decimal sNAN In-Reply-To: <1377531520.63.0.106544243675.issue18841@psf.upfronthosting.co.za> Message-ID: <1462538127.14.0.308638172903.issue18841@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> wont fix stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 08:40:01 2016 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 06 May 2016 12:40:01 +0000 Subject: [docs] [issue17888] docs: more information on documentation team In-Reply-To: <1367412914.06.0.588625037016.issue17888@psf.upfronthosting.co.za> Message-ID: <1462538401.13.0.509963869788.issue17888@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 09:04:57 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 06 May 2016 13:04:57 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462539897.75.0.406419074119.issue26156@psf.upfronthosting.co.za> R. David Murray added the comment: Sounds like it is a bit more than just confusion: given that power can be used outside a coroutine but await can't, Serhiy's formulation would seem to me to be more semantically correct, even if syntactically it is the same as the current. I think it would regardless be better to replace 'await' with 'await_expr', so +1 on that from me as well. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 11:20:45 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 06 May 2016 15:20:45 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462548045.4.0.778833803664.issue18531@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 11:21:26 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 06 May 2016 15:21:26 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462548086.3.0.93761099268.issue18531@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Eric should chime in on the str.format() implications. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 11:41:16 2016 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 06 May 2016 15:41:16 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462549276.26.0.577648619085.issue18531@psf.upfronthosting.co.za> Eric V. Smith added the comment: I think it's okay to change this as far as str.format() goes. Interestingly enough, the motivating case to add str.format_map() in issue 6081 was exactly this kind of code. Although I notice that the example in that issue, which it shows as failing, works in both 2.7 and 3.4 (the only versions I have handy). So I'm not sure what changed after 2009 to cause that code to start working, but I'd be okay with it breaking again. But maybe we should track it down, in case it was deliberately changed and is important to someone. In any event, since str.format_map() is well-known (to me, at least!), and is the approved way of getting the behavior of passing a specific map in to the format machinery, I'm okay with changing **dict to create an exact new dict, at least as far as str.format() goes. I can't speak to the overall implications (such as other APIs and performance). I agree it would be a 3.6 only change (and I've change the versions to reflect that). ---------- versions: -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 11:46:32 2016 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 06 May 2016 15:46:32 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1462549276.26.0.577648619085.issue18531@psf.upfronthosting.co.za> Message-ID: <20160506104627.1e7e1ddc@python.org> Barry A. Warsaw added the comment: On May 06, 2016, at 03:41 PM, Eric V. Smith wrote: >I agree it would be a 3.6 only change (and I've change the versions to >reflect that). The reason the other versions were included was because this was originally reported as a documentation bug. It should probably still be documented in those older releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 12:45:22 2016 From: report at bugs.python.org (Guido Treutwein) Date: Fri, 06 May 2016 16:45:22 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1462539897.75.0.406419074119.issue26156@psf.upfronthosting.co.za> Message-ID: Guido Treutwein added the comment: I'm with David here, in that a change would improve ease of comprehension: I still find it strange, that the grammar symbol has the same name as the keyword (or in the proposed version keyword+'expr'), which is never done on more widely used levels. I would have expected something like 'coroutine_suspension', which reflects what it is and not which keyword is required to state it. 2016-05-06 15:04 GMT+02:00 R. David Murray : > > R. David Murray added the comment: > > Sounds like it is a bit more than just confusion: given that power can be > used outside a coroutine but await can't, Serhiy's formulation would seem > to me to be more semantically correct, even if syntactically it is the same > as the current. > > I think it would regardless be better to replace 'await' with > 'await_expr', so +1 on that from me as well. > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 12:52:37 2016 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 06 May 2016 16:52:37 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462553557.33.0.190050847831.issue18531@psf.upfronthosting.co.za> Eric V. Smith added the comment: Okay. Adding back 3.5 and 2.7, in case someone wants to document the behavior there. I'm not sure if we fix docs in 3.4 still. ---------- versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 14:43:09 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 May 2016 18:43:09 +0000 Subject: [docs] [issue26889] Improve Doc/library/xmlrpc.client.rst In-Reply-To: <1461965955.82.0.756722302068.issue26889@psf.upfronthosting.co.za> Message-ID: <1462560189.4.0.317009490977.issue26889@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is my first reading of this doc. The formatting improvements look good. A definite enhancement. Review contains a few comments. My main difficulty is separating creation of a proxy instance from use of a proxy instance. Some of the creation parameters govern the use, and hence do not make must sense until one reads the instance description a few paragraphs further on. Perhaps the initial sentence "A :class:`ServerProxy` instance is an object that manages communication with aremote XML-RPC server." should be expanded into a paragraph with some of the description given later. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From storchaka at gmail.com Fri May 6 15:29:47 2016 From: storchaka at gmail.com (storchaka at gmail.com) Date: Fri, 06 May 2016 19:29:47 -0000 Subject: [docs] Improve Doc/library/xmlrpc.client.rst (issue 26889) Message-ID: <20160506192947.27605.52600@psf.upfronthosting.co.za> https://bugs.python.org/review/26889/diff/17111/Doc/library/xmlrpc.client.rst File Doc/library/xmlrpc.client.rst (right): https://bugs.python.org/review/26889/diff/17111/Doc/library/xmlrpc.client.rst#newcode17 Doc/library/xmlrpc.client.rst:17: XML-RPC is a Remote Procedure Call method that uses XML passed via HTTP as a On 2016/05/06 20:36:41, terry.reedy wrote: > HTTP(S) better? Done. Or may be HTTP/HTTPS? https://bugs.python.org/review/26889/diff/17111/Doc/library/xmlrpc.client.rst#newcode49 Doc/library/xmlrpc.client.rst:49: On 2016/05/06 20:36:41, terry.reedy wrote: > New blank line separates instance construction parameters above from instance > use parameters. Good. I think you could even something like "The following > parameters govern the use of the returned proxy instance." Done. https://bugs.python.org/review/26889/diff/17111/Doc/library/xmlrpc.client.rst#newcode53 Doc/library/xmlrpc.client.rst:53: all clients and servers; see http://ontosys.com/xml-rpc/extensions.php for a On 2016/05/06 20:36:41, terry.reedy wrote: > New link displays page with "Wayback Machine doesn't have that page archived." > Is any more description really needed? Can you just incorporate it? > Rietveld included closing parenthesis in the link. Correct link: https://web.archive.org/web/20130120074804/http://ontosys.com/xml-rpc/extensions.php All resources (including Wikipedia) refer to this link. There is no more "official" document. Apache provided longer list of extension types (see issue26885), but this project is half-dead too. https://bugs.python.org/review/26889/diff/17111/Doc/library/xmlrpc.client.rst#newcode76 Doc/library/xmlrpc.client.rst:76: On 2016/05/06 20:36:41, terry.reedy wrote: > Not sure that deletion of sentence is an improvement. See tracker post. This sentence just looks tautological or wrong to me. In Python 3 there is no difference between types and classes (I suppose user-defined classic classes were meant here). ServerProxy instance methods can't take or return types. They work with instances of specific types. And if we left just "Python objects", what other this can be? In Python everything is an object, and every value is a Python object. I was unable to reformulate this sentence correctly and preferred to remove it. https://bugs.python.org/review/26889/ From report at bugs.python.org Fri May 6 15:46:53 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 06 May 2016 19:46:53 +0000 Subject: [docs] [issue26889] Improve Doc/library/xmlrpc.client.rst In-Reply-To: <1461965955.82.0.756722302068.issue26889@psf.upfronthosting.co.za> Message-ID: <1462564012.74.0.0678017319739.issue26889@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review Terry. Updated patch addresses most of your comments. But I'm unable to expand ServerProxy description as you suggest. May you can do this? My purpose was modest. Just fix some incorrect and outdated sentences. Then I fixed some formatting. I was not going and is not able to do anything besides this. I will take all that you offer. ---------- Added file: http://bugs.python.org/file42763/docs_xmlrpc_client_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri May 6 18:26:39 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 May 2016 22:26:39 +0000 Subject: [docs] [issue26889] Improve Doc/library/xmlrpc.client.rst In-Reply-To: <1461965955.82.0.756722302068.issue26889@psf.upfronthosting.co.za> Message-ID: <1462573599.42.0.414436803477.issue26889@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The corrected link works. I agree with deleting a bad sentence if you cannot fix it. I think you can go ahead and apply as is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 01:45:36 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 07 May 2016 05:45:36 +0000 Subject: [docs] [issue26889] Improve Doc/library/xmlrpc.client.rst In-Reply-To: <1461965955.82.0.756722302068.issue26889@psf.upfronthosting.co.za> Message-ID: <20160507054533.22581.4847.2516F85C@psf.io> Roundup Robot added the comment: New changeset 04250fc723e6 by Serhiy Storchaka in branch '3.5': Issue #26889: Tweaked xmlrpc.client documentation. https://hg.python.org/cpython/rev/04250fc723e6 New changeset 9bdec549bad3 by Serhiy Storchaka in branch 'default': Issue #26889: Tweaked xmlrpc.client documentation. https://hg.python.org/cpython/rev/9bdec549bad3 New changeset fb5bd513751f by Serhiy Storchaka in branch '2.7': Issue #26889: Tweaked xmlrpclib documentation. https://hg.python.org/cpython/rev/fb5bd513751f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 01:46:29 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 May 2016 05:46:29 +0000 Subject: [docs] [issue26889] Improve Doc/library/xmlrpc.client.rst In-Reply-To: <1461965955.82.0.756722302068.issue26889@psf.upfronthosting.co.za> Message-ID: <1462599989.44.0.475062525149.issue26889@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Terry. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 03:07:28 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 07 May 2016 07:07:28 +0000 Subject: [docs] [issue26889] Improve Doc/library/xmlrpc.client.rst In-Reply-To: <1461965955.82.0.756722302068.issue26889@psf.upfronthosting.co.za> Message-ID: <20160507070724.15120.42780.9D9D3727@psf.io> Roundup Robot added the comment: New changeset 52924d962027 by Serhiy Storchaka in branch '3.5': Issue #26889: Fixed hyperlinks formatting. https://hg.python.org/cpython/rev/52924d962027 New changeset ea9d69a4d0fe by Serhiy Storchaka in branch 'default': Issue #26889: Fixed hyperlinks formatting. https://hg.python.org/cpython/rev/ea9d69a4d0fe New changeset 29a927c524cb by Serhiy Storchaka in branch '2.7': Issue #26889: Fixed hyperlinks formatting. https://hg.python.org/cpython/rev/29a927c524cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 03:19:32 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 May 2016 07:19:32 +0000 Subject: [docs] [issue26736] Use HTTPS protocol in links In-Reply-To: <1460399300.6.0.985736947814.issue26736@psf.upfronthosting.co.za> Message-ID: <1462605571.99.0.747513280445.issue26736@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 03:50:43 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 07 May 2016 07:50:43 +0000 Subject: [docs] [issue26736] Use HTTPS protocol in links In-Reply-To: <1460399300.6.0.985736947814.issue26736@psf.upfronthosting.co.za> Message-ID: <20160507075040.15124.39200.5C34A6C2@psf.io> Roundup Robot added the comment: New changeset 211a9f32dfb9 by Serhiy Storchaka in branch '3.5': Issue #26736: Used HTTPS for external links in the documentation if possible. https://hg.python.org/cpython/rev/211a9f32dfb9 New changeset 3ceb54a49387 by Serhiy Storchaka in branch 'default': Issue #26736: Used HTTPS for external links in the documentation if possible. https://hg.python.org/cpython/rev/3ceb54a49387 New changeset e3af25d70976 by Serhiy Storchaka in branch '2.7': Issue #26736: Used HTTPS for external links in the documentation if possible. https://hg.python.org/cpython/rev/e3af25d70976 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 04:06:05 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 May 2016 08:06:05 +0000 Subject: [docs] [issue26736] Use HTTPS protocol in links In-Reply-To: <1460399300.6.0.985736947814.issue26736@psf.upfronthosting.co.za> Message-ID: <1462608365.59.0.360114844167.issue26736@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The :rfc: and :pep: roles are defined in Sphinx. I don't know if they can be configured to use HTTPS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 04:13:57 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 07 May 2016 08:13:57 +0000 Subject: [docs] [issue19444] mmap.mmap() allocates a file descriptor that isn't CLOEXEC In-Reply-To: <1383110349.25.0.857290073089.issue19444@psf.upfronthosting.co.za> Message-ID: <1462608837.09.0.666868297286.issue19444@psf.upfronthosting.co.za> Martin Panter added the comment: Closing because Victor has proposed a patch in Issue 26769. ---------- nosy: +martin.panter resolution: -> duplicate status: open -> closed superseder: -> Python 2.7: make private file descriptors non inheritable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 04:51:45 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 07 May 2016 08:51:45 +0000 Subject: [docs] [issue26897] Clarify Popen stdin, stdout, stderr In-Reply-To: <1462077137.11.0.0338937138998.issue26897@psf.upfronthosting.co.za> Message-ID: <1462611105.44.0.128884284231.issue26897@psf.upfronthosting.co.za> Martin Panter added the comment: Yes, in all cases I understand it is just the file descriptor that matters. Perhaps any documentation update could also take Issue 24358 into account, which points out that compressed and buffered file object wrappers also cause inconsistencies in the data at the high-level file object and the OS-level file descriptor. ---------- nosy: +martin.panter stage: -> needs patch versions: +Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 05:27:18 2016 From: report at bugs.python.org (Georg Brandl) Date: Sat, 07 May 2016 09:27:18 +0000 Subject: [docs] [issue26736] Use HTTPS protocol in links In-Reply-To: <1460399300.6.0.985736947814.issue26736@psf.upfronthosting.co.za> Message-ID: <1462613238.02.0.956363092039.issue26736@psf.upfronthosting.co.za> Georg Brandl added the comment: Newer Sphinx versions already redefine docutils' RFC and PEP URLs to use https. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 10:25:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 May 2016 14:25:21 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1462631120.89.0.0216256185406.issue11643@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Agree with ?ric. ---------- nosy: +serhiy.storchaka resolution: -> rejected stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 10:47:01 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 May 2016 14:47:01 +0000 Subject: [docs] [issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period In-Reply-To: <1376427240.14.0.584954211651.issue18730@psf.upfronthosting.co.za> Message-ID: <1462632421.03.0.392339426315.issue18730@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python stage: needs patch -> patch review type: behavior -> enhancement versions: +Python 3.5, Python 3.6 -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 15:02:41 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 May 2016 19:02:41 +0000 Subject: [docs] [issue12290] __setstate__ is called for false values In-Reply-To: <1307586060.34.0.652262251036.issue12290@psf.upfronthosting.co.za> Message-ID: <1462647761.59.0.692613008726.issue12290@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually this wording is not quite correct. __setstate__() is called for any pickled state. It is not called only if the state is not pickled. The state is not pickled if reducing method (__reduce_ex__ or __reduce__) doesn't return state or returns None as a state. Default reducing method for protocol 0 and 1 doesn't return a state if __getstate__() returns false value. There are many other details of pickle protocol that are not correctly documented in the documentation of the pickle module. PEP 307 documents pickle protocol more correctly. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 18:44:46 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 07 May 2016 22:44:46 +0000 Subject: [docs] [issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period In-Reply-To: <1376427240.14.0.584954211651.issue18730@psf.upfronthosting.co.za> Message-ID: <1462661086.29.0.382611825108.issue18730@psf.upfronthosting.co.za> Martin Panter added the comment: I think Terry may have had the mkstemp() doc string in mind. The NamedTemporaryFile() doc string already points to that function, and it doesn?t make sense to single NamedTemporaryFile() out above other functions. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 7 19:37:16 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 07 May 2016 23:37:16 +0000 Subject: [docs] [issue18730] suffix parameter in NamedTemporaryFile silently fails when not prepending with a period In-Reply-To: <1376427240.14.0.584954211651.issue18730@psf.upfronthosting.co.za> Message-ID: <1462664235.99.0.962404915598.issue18730@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Correct. The doc I quoted was for the unlying mkstemp function. I should have said so even though this fact was easily discovered. So by docstring, I meant the one for mkstemp also, which is currently 27 lines. The docstring for the high level functions should not change. I proposed to shorten the docstring by combining the sentences for prefix and suffix, while adding a bit of info. I decided to withdraw this suggestion and close this issue. ---------- assignee: docs at python -> terry.reedy resolution: -> rejected stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 07:59:32 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 08 May 2016 11:59:32 +0000 Subject: [docs] [issue26512] Vocabulary: Using "integral" in library/stdtypes.html In-Reply-To: <1457472244.72.0.113699245831.issue26512@psf.upfronthosting.co.za> Message-ID: <20160508115928.5176.5708.FF7D1360@psf.io> Roundup Robot added the comment: New changeset 9e29034a41fa by Martin Panter in branch '3.5': Issue #26512: Clarify Integral; tidy up table of rounding functions https://hg.python.org/cpython/rev/9e29034a41fa New changeset a8883951b2ff by Martin Panter in branch 'default': Issue #26512: Merge rounding doc from 3.5 https://hg.python.org/cpython/rev/a8883951b2ff New changeset a69805edfadd by Martin Panter in branch '2.7': Issue #26512: Clarify Integral; tidy up table of rounding functions https://hg.python.org/cpython/rev/a69805edfadd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From tjreedy at udel.edu Fri May 6 14:36:41 2016 From: tjreedy at udel.edu (tjreedy at udel.edu) Date: Fri, 06 May 2016 18:36:41 -0000 Subject: [docs] Improve Doc/library/xmlrpc.client.rst (issue 26889) Message-ID: <20160506183641.27605.34651@psf.upfronthosting.co.za> https://bugs.python.org/review/26889/diff/17111/Doc/library/xmlrpc.client.rst File Doc/library/xmlrpc.client.rst (right): https://bugs.python.org/review/26889/diff/17111/Doc/library/xmlrpc.client.rst#newcode17 Doc/library/xmlrpc.client.rst:17: XML-RPC is a Remote Procedure Call method that uses XML passed via HTTP as a HTTP(S) better? https://bugs.python.org/review/26889/diff/17111/Doc/library/xmlrpc.client.rst#newcode49 Doc/library/xmlrpc.client.rst:49: New blank line separates instance construction parameters above from instance use parameters. Good. I think you could even something like "The following parameters govern the use of the returned proxy instance." https://bugs.python.org/review/26889/diff/17111/Doc/library/xmlrpc.client.rst#newcode53 Doc/library/xmlrpc.client.rst:53: all clients and servers; see http://ontosys.com/xml-rpc/extensions.php for a New link displays page with "Wayback Machine doesn't have that page archived." Is any more description really needed? Can you just incorporate it? https://bugs.python.org/review/26889/diff/17111/Doc/library/xmlrpc.client.rst#newcode76 Doc/library/xmlrpc.client.rst:76: Not sure that deletion of sentence is an improvement. See tracker post. https://bugs.python.org/review/26889/ From report at bugs.python.org Sun May 8 14:24:38 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 May 2016 18:24:38 +0000 Subject: [docs] [issue26979] The danger of PyType_FromSpec() Message-ID: <1462731878.82.0.9073654009.issue26979@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: There is a catch when convert static types to dynamic types using PyType_FromSpec(). tp_new is not inherited for static types whose base class is 'object' (see a comment in inherit_special() in Objects/typeobject.c:4569 for explanation). Such types left not callable and not pickleable unless tp_new is explicitly specified. But since PyType_FromSpec() creates heap types, tp_new is inherited from the base 'object' class. Converted types unexpectedly becomes callable and pickleable. Since object.__new__ wouldn't insure the invariants that the extension type's own factory function ensures, instantiated object can be in inconsistent state. Using it can lead to a crash. We already fallen two time in this catch with _tkinter (issue15721) and curses.panel (issue14936) modules (fixed in issue23815). We should document this catch and a way to avoid it (explicitly set tp_new to NULL for the result of PyType_FromSpec()). Both the C API documentation and PEP 384 should be updated. Would be great if standard examples include a case of non-callable heap type. As option we can introduce more handy way to set tp_new to NULL by adding {Py_tp_new, NULL} to slots array (currently this doesn't have any effect). But this is new feature. ---------- assignee: docs at python components: Documentation messages: 265152 nosy: docs at python, loewis, serhiy.storchaka priority: high severity: normal status: open title: The danger of PyType_FromSpec() type: security versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 14:50:47 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 May 2016 18:50:47 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462733447.36.0.100146659124.issue26156@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think "await_expr" is good. It is not new that the keyword is a part of the grammar symbol name (yield_expression, comp_for, and_expr, or_test, lambda_expr). ---------- assignee: docs at python -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 15:00:33 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 08 May 2016 19:00:33 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <20160508190025.42555.10022.6A197E19@psf.io> Roundup Robot added the comment: New changeset e876ff4e9e95 by Serhiy Storchaka in branch '3.5': Issue #26156: Make expressions grammar description more semantically correct. https://hg.python.org/cpython/rev/e876ff4e9e95 New changeset 61e3160310ae by Serhiy Storchaka in branch 'default': Issue #26156: Make expressions grammar description more semantically correct. https://hg.python.org/cpython/rev/61e3160310ae ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 15:01:01 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 May 2016 19:01:01 +0000 Subject: [docs] [issue26156] Bad name into power operator syntax In-Reply-To: <1453214486.32.0.13836493656.issue26156@psf.upfronthosting.co.za> Message-ID: <1462734061.07.0.426163081254.issue26156@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 15:44:43 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 May 2016 19:44:43 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462736683.58.0.818607854714.issue18531@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: str.format() uses PyDict_GetItem() in 2.7, but PyObject_GetItem() in 3.x. A comment before: /* Use PyObject_GetItem instead of PyDict_GetItem because this code is no longer just used with kwargs. It might be passed a non-dict when called through format_map. */ Thus the behavior of str.format() was changed by accident. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 16:37:07 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 08 May 2016 20:37:07 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <20160508203704.22565.70437.B34AF344@psf.io> Roundup Robot added the comment: New changeset e4835b1ed7b1 by Serhiy Storchaka in branch 'default': Issue #18531: Single var-keyword argument of dict subtype was passed https://hg.python.org/cpython/rev/e4835b1ed7b1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 17:06:13 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 08 May 2016 21:06:13 +0000 Subject: [docs] [issue26736] Use HTTPS protocol in links In-Reply-To: <1460399300.6.0.985736947814.issue26736@psf.upfronthosting.co.za> Message-ID: <1462741573.94.0.0995072717948.issue26736@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 17:39:08 2016 From: report at bugs.python.org (texttheater) Date: Sun, 08 May 2016 21:39:08 +0000 Subject: [docs] [issue26980] The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented Message-ID: <1462743548.86.0.976035936413.issue26980@psf.upfronthosting.co.za> New submission from texttheater: The documentation does not say what this argument is for. It says "See the BaseEventLoop.create_connection() method for parameters", but that method does not have a path argument. The argument seems to be required unless the keyword argument sock is given. ---------- assignee: docs at python components: Documentation messages: 265170 nosy: docs at python, texttheater priority: normal severity: normal status: open title: The path argument of asyncio.BaseEventLoop.create_unix_connection is not documented versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 18:45:51 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 08 May 2016 22:45:51 +0000 Subject: [docs] [issue26512] Vocabulary: Using "integral" in library/stdtypes.html In-Reply-To: <1457472244.72.0.113699245831.issue26512@psf.upfronthosting.co.za> Message-ID: <1462747551.46.0.906347744573.issue26512@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 18:59:31 2016 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 08 May 2016 22:59:31 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462748371.54.0.509713333656.issue18531@psf.upfronthosting.co.za> Eric V. Smith added the comment: I'm not sure PyObject_GetItem instead of PyDict_GetItem in 3.x completely explains things, because the code in issue 6081 also works in 2.7. But I don't think it's terribly important in any event, as long as we understand the 3.x difference. Thanks for researching! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 21:11:51 2016 From: report at bugs.python.org (James Tatum) Date: Mon, 09 May 2016 01:11:51 +0000 Subject: [docs] [issue26982] Clarify forward annotations in PEP 484 Message-ID: <1462756311.8.0.304204398387.issue26982@psf.upfronthosting.co.za> New submission from James Tatum: In https://github.com/python/typeshed/issues/180, we discussed a slight ambiguity with PEP 484's mention of forward references. It wasn't entirely clear that they don't apply unless using function annotations. This patch attempts to clear up the ambiguity. ---------- assignee: docs at python components: Documentation files: forward_references.patch keywords: patch messages: 265177 nosy: James.Tatum, docs at python priority: normal severity: normal status: open title: Clarify forward annotations in PEP 484 Added file: http://bugs.python.org/file42785/forward_references.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 21:15:37 2016 From: report at bugs.python.org (James Tatum) Date: Mon, 09 May 2016 01:15:37 +0000 Subject: [docs] [issue26982] Clarify forward annotations in PEP 484 In-Reply-To: <1462756311.8.0.304204398387.issue26982@psf.upfronthosting.co.za> Message-ID: <1462756537.69.0.204453290124.issue26982@psf.upfronthosting.co.za> Changes by James Tatum : Removed file: http://bugs.python.org/file42785/forward_references.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 21:15:53 2016 From: report at bugs.python.org (James Tatum) Date: Mon, 09 May 2016 01:15:53 +0000 Subject: [docs] [issue26982] Clarify forward annotations in PEP 484 In-Reply-To: <1462756311.8.0.304204398387.issue26982@psf.upfronthosting.co.za> Message-ID: <1462756553.3.0.278790192275.issue26982@psf.upfronthosting.co.za> Changes by James Tatum : Added file: http://bugs.python.org/file42786/forward_references.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 21:26:15 2016 From: report at bugs.python.org (James Tatum) Date: Mon, 09 May 2016 01:26:15 +0000 Subject: [docs] [issue26982] Clarify forward annotations in PEP 484 In-Reply-To: <1462756311.8.0.304204398387.issue26982@psf.upfronthosting.co.za> Message-ID: <1462757175.51.0.141656682756.issue26982@psf.upfronthosting.co.za> Changes by James Tatum : Removed file: http://bugs.python.org/file42786/forward_references.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 21:26:23 2016 From: report at bugs.python.org (James Tatum) Date: Mon, 09 May 2016 01:26:23 +0000 Subject: [docs] [issue26982] Clarify forward annotations in PEP 484 In-Reply-To: <1462756311.8.0.304204398387.issue26982@psf.upfronthosting.co.za> Message-ID: <1462757183.17.0.423818974285.issue26982@psf.upfronthosting.co.za> Changes by James Tatum : Added file: http://bugs.python.org/file42787/forward_references.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 8 23:53:21 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 May 2016 03:53:21 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1462748371.54.0.509713333656.issue18531@psf.upfronthosting.co.za> Message-ID: <2274620.McyHzD0X0O@raxxla> Serhiy Storchaka added the comment: > I'm not sure PyObject_GetItem instead of PyDict_GetItem in 3.x completely > explains things, because the code in issue 6081 also works in 2.7. It doesn't work to me in current develop 2.7.11+. What version did you test? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 00:07:03 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 09 May 2016 04:07:03 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462766823.45.0.0918771119535.issue18531@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Now this is just the documentation issue. I think the change of the behavior in 3.6 should be documented too, but I even don't know where. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 00:08:37 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 09 May 2016 04:08:37 +0000 Subject: [docs] [issue26982] Clarify forward annotations in PEP 484 In-Reply-To: <1462756311.8.0.304204398387.issue26982@psf.upfronthosting.co.za> Message-ID: <1462766917.25.0.555491503731.issue26982@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- assignee: docs at python -> gvanrossum nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 08:13:23 2016 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 09 May 2016 12:13:23 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <1462796003.77.0.508131021362.issue18531@psf.upfronthosting.co.za> Eric V. Smith added the comment: Oops, sorry. I'm an idiot. I was running in a venv where python was python3. Checking with my installed 2.7.10, I see the expected error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 10:11:42 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 09 May 2016 14:11:42 +0000 Subject: [docs] [issue26985] Information about CodeType in inspect documentation is outdated Message-ID: <1462803102.24.0.542356144335.issue26985@psf.upfronthosting.co.za> New submission from Xiang Zhang: Information about CodeType in inspect documentation is outdated. It lacks attributes: co_kwonlyargcount, co_freevars, co_cellvars. And co_flags lacks many more options. These also apply to the comments of inspect.iscode source code. ---------- assignee: docs at python components: Documentation messages: 265197 nosy: docs at python, xiang.zhang priority: normal severity: normal status: open title: Information about CodeType in inspect documentation is outdated versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 11:49:09 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 09 May 2016 15:49:09 +0000 Subject: [docs] [issue26986] Enhance PyFunction_New documentation In-Reply-To: <1462808942.73.0.503495552069.issue26986@psf.upfronthosting.co.za> Message-ID: <1462808949.24.0.192887020258.issue26986@psf.upfronthosting.co.za> Changes by Xiang Zhang : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 9 23:09:39 2016 From: report at bugs.python.org (Xiang Zhang) Date: Tue, 10 May 2016 03:09:39 +0000 Subject: [docs] [issue26985] Information about CodeType in inspect documentation is outdated In-Reply-To: <1462803102.24.0.542356144335.issue26985@psf.upfronthosting.co.za> Message-ID: <1462849779.21.0.0352104427385.issue26985@psf.upfronthosting.co.za> Xiang Zhang added the comment: Attach patch. ---------- keywords: +patch Added file: http://bugs.python.org/file42793/inspect_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 10 02:44:41 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 10 May 2016 06:44:41 +0000 Subject: [docs] [issue26986] Enhance PyFunction_New documentation In-Reply-To: <1462808942.73.0.503495552069.issue26986@psf.upfronthosting.co.za> Message-ID: <20160510064435.89099.82323.6AB40599@psf.io> Roundup Robot added the comment: New changeset bfc4c57a0986 by Benjamin Peterson in branch '3.5': improve PyFunction_New docs (closes #26986) https://hg.python.org/cpython/rev/bfc4c57a0986 New changeset 71afeb15f617 by Benjamin Peterson in branch 'default': merge 3.5 (#26986) https://hg.python.org/cpython/rev/71afeb15f617 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 10 04:37:27 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 May 2016 08:37:27 +0000 Subject: [docs] [issue23921] Standardize documentation whitespace, formatting In-Reply-To: <1428814739.03.0.523944029114.issue23921@psf.upfronthosting.co.za> Message-ID: <1462869447.85.0.66685802088.issue23921@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From storchaka at gmail.com Tue May 10 04:37:40 2016 From: storchaka at gmail.com (storchaka at gmail.com) Date: Tue, 10 May 2016 08:37:40 -0000 Subject: [docs] Standardize documentation whitespace, formatting (issue 23921) Message-ID: <20160510083740.14733.26926@psf.upfronthosting.co.za> http://bugs.python.org/review/23921/diff/14579/Doc/faq/library.rst File Doc/faq/library.rst (right): http://bugs.python.org/review/23921/diff/14579/Doc/faq/library.rst#newcode747 Doc/faq/library.rst:747: On 2016/01/07 02:41:26, vadmium wrote: > Could probably drop this new blank line Done. http://bugs.python.org/review/23921/diff/14579/Doc/faq/programming.rst File Doc/faq/programming.rst (right): http://bugs.python.org/review/23921/diff/14579/Doc/faq/programming.rst#newcode668 Doc/faq/programming.rst:668: >>> print(b) On 2016/03/02 08:04:04, Georg wrote: > On 2016/01/07 02:41:26, vadmium wrote: > > Why not add prompts to the lines above as well? > > Yes, link this it's a bit inconsistent. Done. http://bugs.python.org/review/23921/diff/14579/Doc/howto/logging-cookbook.rst File Doc/howto/logging-cookbook.rst (right): http://bugs.python.org/review/23921/diff/14579/Doc/howto/logging-cookbook.rst#newcode742 Doc/howto/logging-cookbook.rst:742: root.setLevel(logging.DEBUG) # send all messages, for demo; no other level or filter logic applied. On 2016/03/02 08:04:04, Georg wrote: > this is probably too long a line (e.g. for PDF output), better move the comment > above the code Done. http://bugs.python.org/review/23921/diff/14579/Doc/howto/urllib2.rst File Doc/howto/urllib2.rst (right): http://bugs.python.org/review/23921/diff/14579/Doc/howto/urllib2.rst#newcode178 Doc/howto/urllib2.rst:178: values = {'name' : 'Michael Foord', On 2016/03/02 08:04:04, Georg wrote: > could also remove the spaces before ':' as well. Done. http://bugs.python.org/review/23921/diff/14579/Doc/library/abc.rst File Doc/library/abc.rst (right): http://bugs.python.org/review/23921/diff/14579/Doc/library/abc.rst#newcode92 Doc/library/abc.rst:92: On 2016/01/07 02:41:26, vadmium wrote: > FWIW I think the existing compact form is fine. The methods don?t have any > substance, so separating them doesn?t buy much. But if you want to make the > style consistent with MyIterable, you need a blank line above __getitem__() as > well. Done. Removed empty lines. http://bugs.python.org/review/23921/diff/14579/Doc/library/locale.rst File Doc/library/locale.rst (right): http://bugs.python.org/review/23921/diff/14579/Doc/library/locale.rst#newcode473 Doc/library/locale.rst:473: >>> locale.strcoll('f\xe4n', 'foo') # compare a string containing an umlaut On 2016/03/02 08:04:04, Georg wrote: > keep only 2 spaces, the line is already long Done. http://bugs.python.org/review/23921/diff/14579/Doc/library/multiprocessing.rst File Doc/library/multiprocessing.rst (right): http://bugs.python.org/review/23921/diff/14579/Doc/library/multiprocessing.rst#newcode2071 Doc/library/multiprocessing.rst:2071: print(result.get(timeout=1)) # prints "100" unless your computer is *very* slow On 2016/03/02 08:04:04, Georg wrote: > these lines are also too long. Will be addressed in separate issue. Changes for this example are reverted. http://bugs.python.org/review/23921/diff/14579/Doc/library/optparse.rst File Doc/library/optparse.rst (right): http://bugs.python.org/review/23921/diff/14579/Doc/library/optparse.rst#newcode1827 Doc/library/optparse.rst:1827: [...] On 2016/03/02 08:04:04, Georg wrote: > replace by a single ellipsis, I don't think we're using that style anywhere else Done. http://bugs.python.org/review/23921/diff/14579/Doc/library/tokenize.rst File Doc/library/tokenize.rst (right): http://bugs.python.org/review/23921/diff/14579/Doc/library/tokenize.rst#newcode216 Doc/library/tokenize.rst:216: if toknum == NUMBER and '.' in tokval: # replace NUMBER tokens On 2016/03/02 08:04:04, Georg wrote: > no, keep shorter line Done. http://bugs.python.org/review/23921/diff/14579/Doc/library/urllib.request.rst File Doc/library/urllib.request.rst (right): http://bugs.python.org/review/23921/diff/14579/Doc/library/urllib.request.rst#newcode1105 Doc/library/urllib.request.rst:1105: ... data=b'This data is passed to stdin of the CGI') On 2016/03/02 08:04:04, Georg wrote: > this is also a case where the longer line may hurt Done. http://bugs.python.org/review/23921/diff/14579/Doc/whatsnew/3.2.rst File Doc/whatsnew/3.2.rst (left): http://bugs.python.org/review/23921/diff/14579/Doc/whatsnew/3.2.rst#oldcode502 Doc/whatsnew/3.2.rst:502: On 2016/01/07 02:41:26, vadmium wrote: > You could keep the blank line here to mirror the interactive interpreter better Done. http://bugs.python.org/review/23921/diff/14579/Doc/whatsnew/3.2.rst File Doc/whatsnew/3.2.rst (right): http://bugs.python.org/review/23921/diff/14579/Doc/whatsnew/3.2.rst#newcode1107 Doc/whatsnew/3.2.rst:1107: ... b'G3805 storeroom Main chassis ' On 2016/01/07 02:41:26, vadmium wrote: > Why not a four-space indent? Done. http://bugs.python.org/review/23921/diff/14579/Doc/whatsnew/3.2.rst#newcode1540 Doc/whatsnew/3.2.rst:1540: >>> os.chdir('mydata') # change to the source directory On 2016/03/02 08:04:04, Georg wrote: > again, too long lines here. Done. http://bugs.python.org/review/23921/diff/14579/Doc/whatsnew/3.2.rst#newcode1555 Doc/whatsnew/3.2.rst:1555: ... name = 'xz', On 2016/01/07 02:41:26, vadmium wrote: > I think you could drop the space around the equal signs and make it name='xz', > etc. Done. http://bugs.python.org/review/23921/diff/14579/Doc/whatsnew/3.2.rst#newcode1882 Doc/whatsnew/3.2.rst:1882: On 2016/01/07 02:41:26, vadmium wrote: > Add an extra ellipsis to imitate the interpreter better Done. http://bugs.python.org/review/23921/ From report at bugs.python.org Tue May 10 05:02:53 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 10 May 2016 09:02:53 +0000 Subject: [docs] [issue23921] Standardize documentation whitespace, formatting In-Reply-To: <1428814739.03.0.523944029114.issue23921@psf.upfronthosting.co.za> Message-ID: <20160510090248.15110.38801.0264ABCC@psf.io> Roundup Robot added the comment: New changeset 2b492ea961c1 by Serhiy Storchaka in branch '3.5': Issue #23921: Standardized documentation whitespace formatting. https://hg.python.org/cpython/rev/2b492ea961c1 New changeset 909099686e6e by Serhiy Storchaka in branch 'default': Issue #23921: Standardized documentation whitespace formatting. https://hg.python.org/cpython/rev/909099686e6e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 10 06:46:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 10 May 2016 10:46:11 +0000 Subject: [docs] [issue23921] Standardize documentation whitespace, formatting In-Reply-To: <1428814739.03.0.523944029114.issue23921@psf.upfronthosting.co.za> Message-ID: <20160510104607.42351.78213.756095A0@psf.io> Roundup Robot added the comment: New changeset be85897e6d58 by Serhiy Storchaka in branch '2.7': Issue #23921: Standardized documentation whitespace formatting. https://hg.python.org/cpython/rev/be85897e6d58 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue May 10 06:48:40 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 May 2016 10:48:40 +0000 Subject: [docs] [issue23921] Standardize documentation whitespace, formatting In-Reply-To: <1428814739.03.0.523944029114.issue23921@psf.upfronthosting.co.za> Message-ID: <1462877320.03.0.486377811718.issue23921@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Addressed Martin's Georg's and my comments, resolved conflicts, stripped trailing spaces, backported to 2.7. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 06:40:33 2016 From: report at bugs.python.org (Martin Jones) Date: Wed, 11 May 2016 10:40:33 +0000 Subject: [docs] [issue26997] Docs for pdb should note that __future__ magic doesn't work Message-ID: <1462963233.92.0.988524057924.issue26997@psf.upfronthosting.co.za> New submission from Martin Jones: when debugging a program at the pdb prompt, attempting to import from the __future__ module appears successful, but actually doesn't work: (Pdb) from __future__ import division (Pdb) 2/3 0 This leads to inconsistencies between statements evaluated on the pdb prompt and those evaluated in the program, which can hamper debugging. It would be good to have a note added to the 2.7 documentation for pdb along the lines of: Note: importing from the __future__ module does not work under pdb. ---------- assignee: docs at python components: Documentation messages: 265300 nosy: Martin Jones, docs at python priority: normal severity: normal status: open title: Docs for pdb should note that __future__ magic doesn't work type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 12:45:55 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 11 May 2016 16:45:55 +0000 Subject: [docs] [issue27000] improve document of filter Message-ID: <1462985155.22.0.859825042381.issue27000@psf.upfronthosting.co.za> New submission from Xiang Zhang: I think filter's doc can be improved[1]: 1. It doesn't mention ``bool``. ``bool`` is treated the same way as ``None``. It is not called. But this is not mentioned. 2. 'the identity function is assumed' is confusing, at least for me. It looks like when ``None`` is passed, *function* is set to a default func, lambda x: x. Then *function* is called and we identify the return value True or False. But this is not the truth. There is no default value and no function is applied. I think this should be deleted. [1] https://docs.python.org/3/library/functions.html#filter ---------- assignee: docs at python components: Documentation files: filter_doc.patch keywords: patch messages: 265325 nosy: docs at python, xiang.zhang priority: normal severity: normal status: open title: improve document of filter versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file42818/filter_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 13:08:05 2016 From: report at bugs.python.org (Franklin? Lee) Date: Wed, 11 May 2016 17:08:05 +0000 Subject: [docs] [issue27000] improve document of filter In-Reply-To: <1462985155.22.0.859825042381.issue27000@psf.upfronthosting.co.za> Message-ID: <1462986485.4.0.93386714188.issue27000@psf.upfronthosting.co.za> Franklin? Lee added the comment: Aren't these both implementation details? As in, they only affect efficiency, not effect, right? ---------- nosy: +leewz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 13:08:31 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 11 May 2016 17:08:31 +0000 Subject: [docs] [issue27000] improve document of filter In-Reply-To: <1462985155.22.0.859825042381.issue27000@psf.upfronthosting.co.za> Message-ID: <1462986511.07.0.416278707361.issue27000@psf.upfronthosting.co.za> Josh Rosenberg added the comment: bool is not enough of a special case to call it out without confusing the issue. No, the bool constructor is not actually called. But it will still behave as if it was called for all intents and purpose, it just skips the reference counting shenanigans for the actual True/False singleton objects. Drawing a distinction might make people worry that it wouldn't invoke __len__ or __bool__ as normal. Similarly, for all intents and purposes, your mental model of the identity function is mostly correct (I suspect the wording meant to use "function" in the mathematical sense, but it works either way). Yes, it never actually calls a function, but that's irrelevant to observed behavior. Your only mistake is in assuming the function actually returns the specific values True or False; no filter function needs to return True or False, they simply evaluate for truth or falsehood (that's why filter's docs use "true" and "false" to describe it, not "True" and "False"). filter(str.strip, list_of_strings) is perfectly legal, and yields those strings that contain non-whitespace characters. ---------- nosy: +josh.r _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 13:10:26 2016 From: report at bugs.python.org (Josh Rosenberg) Date: Wed, 11 May 2016 17:10:26 +0000 Subject: [docs] [issue27000] improve document of filter In-Reply-To: <1462985155.22.0.859825042381.issue27000@psf.upfronthosting.co.za> Message-ID: <1462986626.04.0.268877561641.issue27000@psf.upfronthosting.co.za> Josh Rosenberg added the comment: Franklin said it better: The only difference between documentation and behavior is invisible implementation details, which have no business being documented in any event (since they needlessly tie the hands of maintainers of CPython and other Python interpreters, while providing no useful benefit). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 13:33:10 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 11 May 2016 17:33:10 +0000 Subject: [docs] [issue27000] improve document of filter In-Reply-To: <1462985155.22.0.859825042381.issue27000@psf.upfronthosting.co.za> Message-ID: <1462987990.03.0.688601316815.issue27000@psf.upfronthosting.co.za> Xiang Zhang added the comment: First I have to clarify that my mistake is not in understanding but in writing. What I mean by 'identify the return value True or False' is actually what you say, 'evaluate for truth or falsehood'. I also notice the lowercase false and true in the doc. I know they are deliberate. Sorry about this. For ``bool``, I almost agree with you now. Although I still think it's telling readers incorrect info in the second part. For ``bool``, it is not equivalent to ``(item for item in iterable if function(item))`` but ``(item for item in iterable if item)``. For CPython, you are not telling the truth. And for identity function, I insist. I don't see any advantage with this sentence other than confusion. I don't think this will affect other implementation either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 15:14:19 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 11 May 2016 19:14:19 +0000 Subject: [docs] [issue27000] improve document of filter In-Reply-To: <1462985155.22.0.859825042381.issue27000@psf.upfronthosting.co.za> Message-ID: <1462994059.82.0.184362502326.issue27000@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > bool is not enough of a special case to call it out without > confusing the issue. I concur. It would be easy to make the docs less usable by elaborating on this special case. For the most part, a user should use None if they just want to test the truth value of the input. The docs for filter() have been through a number of revisions and much discussion. Let's not undo previous efforts. For the most part, these docs have been successful in communicating what filter() does. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 15:55:27 2016 From: report at bugs.python.org (Franklin? Lee) Date: Wed, 11 May 2016 19:55:27 +0000 Subject: [docs] [issue27000] improve document of filter In-Reply-To: <1462985155.22.0.859825042381.issue27000@psf.upfronthosting.co.za> Message-ID: <1462996527.39.0.0667398545983.issue27000@psf.upfronthosting.co.za> Franklin? Lee added the comment: > Although I still think it's telling readers incorrect info in the second part. For ``bool``, it is not equivalent to ``(item for item in iterable if function(item))`` but ``(item for item in iterable if item)``. For CPython, you are not telling the truth. What do you mean by, "it is not equivalent"? Are you saying that the first one will give a different result from the second? In general, when interpreting an object in a boolean context, Python will do the "equivalent" of calling ``bool`` on it, where "equivalent" in the docs means "has the same result as". See, for example, the ``itertools`` docs: https://docs.python.org/3/library/itertools.html#itertools.accumulate -------- In this case: If ``filter`` is passed ``None`` or ``bool``, it will call "PyObject_IsTrue" on the object. (https://github.com/python/cpython/blob/c750281ef5d8fa89d13990792163605302e972d4/Python/bltinmodule.c#L481) "PyObject_IsTrue" is defined here: https://github.com/python/cpython/blob/6aea3c26a22c5d7e3ffa3d725d8d75dac0e1b83b/Objects/object.c#L1223 On the other hand, ``bool`` is defined here, as "PyBool_Type": https://github.com/python/cpython/blob/c750281ef5d8fa89d13990792163605302e972d4/Python/bltinmodule.c#L2686 "PyBool_Type" is defined here, with the ``bool.__new__`` function defined as "bool_new": https://github.com/python/cpython/blob/2d264235f6e066611b412f7c2e1603866e0f7f1b/Objects/boolobject.c#L133 "bool_new" is defined here, using "PyObject_IsTrue": https://github.com/python/cpython/blob/2d264235f6e066611b412f7c2e1603866e0f7f1b/Objects/boolobject.c#L43 Both "filter_next" and "bool_new" call "PyObject_IsTrue" and take 0 as False, positive as True, and negative as an error. So it's equivalent to calling ``bool``, but the "bool_new" call is sort of inlined. Does that clear things up? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 20:07:12 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 12 May 2016 00:07:12 +0000 Subject: [docs] [issue27000] improve document of filter In-Reply-To: <1462985155.22.0.859825042381.issue27000@psf.upfronthosting.co.za> Message-ID: <1463011632.32.0.275473578239.issue27000@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for wanting to improve the docs, but the docs are a specification of syntax and behavior, not of implementation. So, the existing docs are correct, and changing them would over-specify the function. Since Raymond has also voted for rejection, I'm closing this. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 22:07:54 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 12 May 2016 02:07:54 +0000 Subject: [docs] [issue27000] improve document of filter In-Reply-To: <1462985155.22.0.859825042381.issue27000@psf.upfronthosting.co.za> Message-ID: <1463018873.92.0.285402152037.issue27000@psf.upfronthosting.co.za> Xiang Zhang added the comment: It's OK. Thanks for all your info and do learn. BTW, Franklin, I knew what will happen when ``bool`` is passed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 22:10:52 2016 From: report at bugs.python.org (Franklin? Lee) Date: Thu, 12 May 2016 02:10:52 +0000 Subject: [docs] [issue27000] improve document of filter In-Reply-To: <1462985155.22.0.859825042381.issue27000@psf.upfronthosting.co.za> Message-ID: <1463019052.25.0.651545656144.issue27000@psf.upfronthosting.co.za> Franklin? Lee added the comment: In that case, I'm still wondering what you mean by "not equivalent". Are you saying there is code which will work only if the ``bool`` function is really called? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed May 11 22:24:00 2016 From: report at bugs.python.org (Xiang Zhang) Date: Thu, 12 May 2016 02:24:00 +0000 Subject: [docs] [issue27000] improve document of filter In-Reply-To: <1462985155.22.0.859825042381.issue27000@psf.upfronthosting.co.za> Message-ID: <1463019840.6.0.959335987152.issue27000@psf.upfronthosting.co.za> Xiang Zhang added the comment: Not about code, just the doc. In my opinion, if ``bool`` is not called it is definitely not equivalent to ``(item for item in iterable if function(item))``, which actually calls the function, even there is nothing different in the result. But, this is a rather subjective and not important now. I am OK with all your opinions. And considering other interpreters, leaving it untouched is a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 06:14:07 2016 From: report at bugs.python.org (Ben Spiller) Date: Thu, 12 May 2016 10:14:07 +0000 Subject: [docs] [issue26369] unicode.decode and str.encode are unnecessarily confusing for non-ascii In-Reply-To: <1455623938.04.0.928922751587.issue26369@psf.upfronthosting.co.za> Message-ID: <1463048047.49.0.297094367952.issue26369@psf.upfronthosting.co.za> Ben Spiller added the comment: Thanks that's really helpful Having thought about it some more, I think if possible it'd be really so much better to actually 'fix' the behaviour for the unicode<->str standard codecs (i.e. not base64) rather than just documenting around it. The current behaviour is not only confusing but leads to bugs that are very easy to miss since the methods work correctly when given 7-bit ascii characters. I had a poke around in the python source but couldn't quite identify where it's happening - presumably there is somewhere in the str.encode('utf-8') implementation that first "decodes" the string and does so using the ascii codec. If it could be made to use the same encoding that was passed in (e.g. utf8) then this would end up being a no-op and there would be no unpleasant bugs that only appear when the input includes non-ascii characters. It would also allow X.encode('utf-8') to be called successfully whether X is already a str or is a unicode object, which would save callers having to explicitly check what kind of string they've been passed. Is anyone able to look into the code to see where this would need to be fixed and how difficult it would be to do? I have a feeling that once the line is located it might be quite a straightforward fix Many thanks ---------- components: +Interpreter Core -Documentation title: doc for unicode.decode and str.encode is unnecessarily confusing -> unicode.decode and str.encode are unnecessarily confusing for non-ascii _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 06:25:51 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 May 2016 10:25:51 +0000 Subject: [docs] [issue26369] unicode.decode and str.encode are unnecessarily confusing for non-ascii In-Reply-To: <1455623938.04.0.928922751587.issue26369@psf.upfronthosting.co.za> Message-ID: <1463048750.98.0.485648980524.issue26369@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Note that with the -3 option Python 2.7 already warns about incompatibilities. >>> 'abc'.encode('base64') __main__:1: DeprecationWarning: 'base64' is not a text encoding; use codecs.encode() to handle arbitrary codecs 'YWJj\n' >>> 'YWJj\n'.decode('base64') __main__:1: DeprecationWarning: 'base64' is not a text encoding; use codecs.decode() to handle arbitrary codecs 'abc' >>> u'abc'.decode('ascii') __main__:1: DeprecationWarning: decoding Unicode is not supported in 3.x u'abc' ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 07:02:53 2016 From: report at bugs.python.org (Ben Spiller) Date: Thu, 12 May 2016 11:02:53 +0000 Subject: [docs] [issue26369] unicode.decode and str.encode are unnecessarily confusing for non-ascii In-Reply-To: <1455623938.04.0.928922751587.issue26369@psf.upfronthosting.co.za> Message-ID: <1463050973.56.0.441119212211.issue26369@psf.upfronthosting.co.za> Ben Spiller added the comment: yes the situation is loads better in python 3, this issue is specific to 2.x, but like many people sadly we're not able to move to 3 for the time being. Since making this mistake is quite common and there's some sensible behaviour that would make it disappear (resulting in ascii and non-ascii strings being treated the same way by these methods) I'd much prefer if we could actually fix it for python 2.7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 07:20:01 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 May 2016 11:20:01 +0000 Subject: [docs] [issue26369] unicode.decode and str.encode are unnecessarily confusing for non-ascii In-Reply-To: <1455623938.04.0.928922751587.issue26369@psf.upfronthosting.co.za> Message-ID: <1463052001.0.0.315580653394.issue26369@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What do you propose? Note that str.encode() doesn't raise an exception. Ascii unicode and 8-bit strings are interchangeable. Ascii unicode strings can be packed in str for less memory consumption (see xmlrpclib or ElementTree), a lot of str constant are used in unicode context (like os.sep or empty string). Breaking str.encode() will break valid existing code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 07:42:07 2016 From: report at bugs.python.org (Ben Spiller) Date: Thu, 12 May 2016 11:42:07 +0000 Subject: [docs] [issue26369] unicode.decode and str.encode are unnecessarily confusing for non-ascii In-Reply-To: <1455623938.04.0.928922751587.issue26369@psf.upfronthosting.co.za> Message-ID: <1463053326.97.0.0990348505488.issue26369@psf.upfronthosting.co.za> Ben Spiller added the comment: I'm proposing that str.encode() should _not_ throw a 'decode' exception for non-ascii characters and be effectively a no-op, to match what it already does for ascii characters - which therefore shouldn't break behavior anyone will be depending on. This could be achieved by passing the encoding parameter through to the implicit decode() call (which is where the exception is coming from it appears), rather than (arbitrarily and surprisingly) using "ascii" (which of course sometimes works and sometimes doesn't depending on the input string) Does that make sense? If someone can find the place in the code (sorry I tried and failed!) where str.encode('utf-8') is resulting in an implicit call to the equivalent of decode('ascii') (as suggested by the exception message) I think it'll be easier to discuss the details ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu May 12 08:31:44 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 May 2016 12:31:44 +0000 Subject: [docs] [issue26369] unicode.decode and str.encode are unnecessarily confusing for non-ascii In-Reply-To: <1455623938.04.0.928922751587.issue26369@psf.upfronthosting.co.za> Message-ID: <1463056303.99.0.690781462111.issue26369@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If str.encode() raises a decoding exception, this is a programming bug. It would be bad to hide it. FYI, the default encoding is not hardcoded 'ascii'. Google "Changing default encoding in Python". Maybe this will help in your program. ---------- _______________________________________ Python tracker _______________________________________ From SlaterJ at sharpsec.com Thu May 12 15:46:07 2016 From: SlaterJ at sharpsec.com (Slater, John) Date: Thu, 12 May 2016 19:46:07 +0000 Subject: [docs] How do I install an interpreter? Message-ID: Hello, I'm in a bit of a pickle, so this is both a request and a doc bug report (possibly). Full disclosure: I can't code my way out of a wet paper bag. I've been given a somewhat critical python script to run on my windows box. I found this: https://docs.python.org/2/faq/windows.html And I got to the step where it says: You should then see something like: Python 2.7.3 (default, Apr 10 2012, 22.71:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> Well, I don't see that. So I'm guessing an interpreter isn't installed. Where do I get one? Additionally: I would suggest your documentation needs a fork there that says: "Don't see something like this? Click here" Just a helpful suggestion from a lost n00b. Also, if you could get me some help on where to get an interpreter, that would be great too. Thanks! John -------------- next part -------------- An HTML attachment was scrubbed... URL: From mail at timgolden.me.uk Thu May 12 16:16:16 2016 From: mail at timgolden.me.uk (Tim Golden) Date: Thu, 12 May 2016 21:16:16 +0100 Subject: [docs] How do I install an interpreter? In-Reply-To: References: Message-ID: <5734E490.1010009@timgolden.me.uk> On 12/05/2016 20:46, Slater, John wrote: > Hello, > > I?m in a bit of a pickle, so this is both a request and a doc bug report > (possibly). Full disclosure: I can?t code my way out of a wet paper bag. > I?ve been given a somewhat critical python script to run on my windows > box. I found this: > > https://docs.python.org/2/faq/windows.html > > And I got to the step where it says: > > You should then see something like: > > Python 2.7.3 (default, Apr 10 2012, 22.71:26) [MSC v.1500 32 bit > (Intel)] on win32 > > Type "help", "copyright", "credits" or "license" for more information. > >>>> > > Well, I don?t see that. So I?m guessing an interpreter isn?t installed. > Where do I get one? > > Additionally: I would suggest your documentation needs a fork there that > says: ?Don?t see something like this? Click here? > > Just a helpful suggestion from a lost n00b. > > Also, if you could get me some help on where to get an interpreter, that > would be great too. John, You need to go to the Python downloads page: https://www.python.org/downloads/ Select either 2.7.11 or 3.5.1 depending on whether you need Python 2 or Python 3. (They're very similar but there are differences and the chances are that any significant script will run with only one of them). You'll then download get a typical installation package from which you can install Python. Having done that you can go back to the docs you were working from and you should see the interpreter. If things don't work, can I suggest you head over to the Python tutor list: https://mail.python.org/mailman/listinfo/tutor and ask there. This particular list (the docs@ address) is more for discussion about the documentation itself. If you don't know which version to use (and if whoever gave you the script can't tell you) then post all or part of it here to the Tutor list and we can probably tell you which one you want. TJG From report at bugs.python.org Fri May 13 07:42:31 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 13 May 2016 11:42:31 +0000 Subject: [docs] [issue19992] subprocess documentation not explicit about fileno() In-Reply-To: <1387158760.79.0.499761911724.issue19992@psf.upfronthosting.co.za> Message-ID: <1463139751.91.0.624175242404.issue19992@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 06:24:37 2016 From: report at bugs.python.org (=?utf-8?q?Salvo_=E2=80=9CLtWorf=E2=80=9D_Tomaselli?=) Date: Sat, 14 May 2016 10:24:37 +0000 Subject: [docs] [issue27018] Incorrect documentation of select module Message-ID: <1463221477.58.0.675652051466.issue27018@psf.upfronthosting.co.za> New submission from Salvo ?LtWorf? Tomaselli: import select help(select.epoll) It mentions that the default mask is EPOLL_IN | EPOLL_OUT | EPOLL_PRI. However there are no such constants. They are called EPOLLIN EPOLLOUT and EPOLLPRI. Please fix. ---------- assignee: docs at python components: Documentation messages: 265513 nosy: Salvo ?LtWorf? Tomaselli, docs at python priority: normal severity: normal status: open title: Incorrect documentation of select module versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 06:55:31 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 14 May 2016 10:55:31 +0000 Subject: [docs] [issue27018] Incorrect documentation of select module In-Reply-To: <1463221477.58.0.675652051466.issue27018@psf.upfronthosting.co.za> Message-ID: <1463223331.53.0.0694721636347.issue27018@psf.upfronthosting.co.za> SilentGhost added the comment: Here is the patch. ---------- keywords: +patch nosy: +SilentGhost stage: -> patch review type: -> behavior versions: +Python 3.6 Added file: http://bugs.python.org/file42846/issue27018.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 07:14:55 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 14 May 2016 11:14:55 +0000 Subject: [docs] [issue25841] In FancyURLopener error in example with http address. In-Reply-To: <1449848545.54.0.701964592914.issue25841@psf.upfronthosting.co.za> Message-ID: <1463224495.66.0.967880580342.issue25841@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 07:51:49 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 14 May 2016 11:51:49 +0000 Subject: [docs] [issue1705393] Document select() failure with buffered file Message-ID: <1463226709.83.0.749244888699.issue1705393@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- title: Select() failure (race condition) -> Document select() failure with buffered file versions: +Python 3.5, Python 3.6 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 13:34:06 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Sat, 14 May 2016 17:34:06 +0000 Subject: [docs] [issue27021] It is not documented that os.writev() suffer from SC_IOV_MAX Message-ID: <1463247246.11.0.121733863987.issue27021@psf.upfronthosting.co.za> New submission from ???? ?????????: Really, os.writev() suffer from SC_IOV_MAX. This is documented for socket.sendmsg(), but not for os.writev(): The operating system may set a limit (sysconf() value SC_IOV_MAX) on the number of buffers that can be used. ---------- assignee: docs at python components: Documentation messages: 265537 nosy: docs at python, mmarkk priority: normal severity: normal status: open title: It is not documented that os.writev() suffer from SC_IOV_MAX type: enhancement versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 13:39:43 2016 From: report at bugs.python.org (ProgVal) Date: Sat, 14 May 2016 17:39:43 +0000 Subject: [docs] [issue27023] Documentation of tempfile.gettempdir() does not mention it only supports existing directories Message-ID: <1463247583.74.0.311593159637.issue27023@psf.upfronthosting.co.za> New submission from ProgVal: Documentation of tempfile.gettempdir() does not mention it only supports existing directories. This led to this question on Stackoverflow: http://stackoverflow.com/q/37229398/539465 ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 265539 nosy: Valentin.Lorentz, docs at python priority: normal severity: normal status: open title: Documentation of tempfile.gettempdir() does not mention it only supports existing directories versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 21:05:47 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 15 May 2016 01:05:47 +0000 Subject: [docs] [issue2675] Curses terminal resize problems when Python is in interactive mode In-Reply-To: <1208965300.42.0.575050740888.issue2675@psf.upfronthosting.co.za> Message-ID: <1463274347.82.0.497968921144.issue2675@psf.upfronthosting.co.za> Martin Panter added the comment: For the record, this is my interpretation of Pavel?s demo: If you press a key (other than lowercase ?q?) or resize the terminal, it displays the terminal dimensions in the top-left corner. Without Readline, the dimensions are updated when the terminal resizes. When Readline is used (interactive mode, or simply ?import readline?), the reported dimensions are static, which I understand is the bug. Documentating this quirk may be a good start. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, martin.panter stage: test needed -> needs patch versions: +Python 2.7, Python 3.5, Python 3.6 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat May 14 22:38:54 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Sun, 15 May 2016 02:38:54 +0000 Subject: [docs] [issue27023] Documentation of tempfile.gettempdir() does not mention it only supports existing directories In-Reply-To: <1463247583.74.0.311593159637.issue27023@psf.upfronthosting.co.za> Message-ID: <1463279934.29.0.936557286201.issue27023@psf.upfronthosting.co.za> Steven D'Aprano added the comment: I don't understand. The documentation clearly states: "Python searches a standard list of directories to find one which the calling user can create files in." How do you expect to be able to write files to a directory that doesn't exist? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 15 00:29:12 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 15 May 2016 04:29:12 +0000 Subject: [docs] [issue27018] Incorrect documentation of select module In-Reply-To: <1463221477.58.0.675652051466.issue27018@psf.upfronthosting.co.za> Message-ID: <20160515042909.19082.24603.86C70BC6@psf.io> Roundup Robot added the comment: New changeset 37c95a4b979a by Senthil Kumaran in branch '3.5': issue27018 - Fix the documentation of select.epoll.register method. https://hg.python.org/cpython/rev/37c95a4b979a New changeset eca161a355d4 by Senthil Kumaran in branch 'default': merge from 3.5 https://hg.python.org/cpython/rev/eca161a355d4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 15 00:30:12 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 15 May 2016 04:30:12 +0000 Subject: [docs] [issue27018] Incorrect documentation of select module In-Reply-To: <1463221477.58.0.675652051466.issue27018@psf.upfronthosting.co.za> Message-ID: <1463286612.39.0.583802190824.issue27018@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Thanks for the report, Salvo. And thank you for the patch, SilentGhost. This is fixed in the active versions of python. ---------- nosy: +orsenthil resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 15 03:08:12 2016 From: report at bugs.python.org (ProgVal) Date: Sun, 15 May 2016 07:08:12 +0000 Subject: [docs] [issue27023] Documentation of tempfile.gettempdir() does not mention it only supports existing directories In-Reply-To: <1463247583.74.0.311593159637.issue27023@psf.upfronthosting.co.za> Message-ID: <1463296092.72.0.805223247355.issue27023@psf.upfronthosting.co.za> ProgVal added the comment: The directory could be created ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 15 04:06:20 2016 From: report at bugs.python.org (Hong Minhee) Date: Sun, 15 May 2016 08:06:20 +0000 Subject: [docs] [issue27026] async/await keywords are missing from reference docs Message-ID: <1463299580.57.0.0973198258941.issue27026@psf.upfronthosting.co.za> New submission from Hong Minhee: The async/await keywords are missing from ?2.3.1. Keywords in reference docs. The attached patch adds two missing keywords to Doc/reference/lexical_analysis.rst file. ---------- assignee: docs at python components: Documentation files: patch.diff hgrepos: 343 keywords: patch messages: 265593 nosy: docs at python, hongminhee priority: normal severity: normal status: open title: async/await keywords are missing from reference docs type: enhancement versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file42856/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 15 05:12:15 2016 From: report at bugs.python.org (Martin Panter) Date: Sun, 15 May 2016 09:12:15 +0000 Subject: [docs] [issue27026] async/await keywords are missing from reference docs In-Reply-To: <1463299580.57.0.0973198258941.issue27026@psf.upfronthosting.co.za> Message-ID: <1463303535.14.0.868489659894.issue27026@psf.upfronthosting.co.za> Martin Panter added the comment: ..Related: Issue 26264, about updating the keywords module. Technically they are only reserved inside ?async def? functions. So it could be misleading adding them with the other always-reserved keywords without an explanation. ---------- nosy: +martin.panter, yselivanov stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 15 11:32:51 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 15 May 2016 15:32:51 +0000 Subject: [docs] [issue27023] Documentation of tempfile.gettempdir() does not mention it only supports existing directories In-Reply-To: <1463247583.74.0.311593159637.issue27023@psf.upfronthosting.co.za> Message-ID: <1463326371.4.0.629487784659.issue27023@psf.upfronthosting.co.za> R. David Murray added the comment: No, it shouldn't. The design is that different systems use different locations for the default tempdir, and we look down a list of ones we know about until we find one that exists and can be used. Likewise, different shells use different environment variables, so we look at a sequence of those as well. It is arguable whether the fact that an environment variable that points to an invalid directory is ignored is a feature or a bug, but at this point tempfile has behaved that was for so long that we must class it as a feature. In any case, I would find it objectionable for a program to create a temporary directory for me unasked. It would be much more likely that I misspelled the directory when I set the environment variable. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 15 12:27:55 2016 From: report at bugs.python.org (ProgVal) Date: Sun, 15 May 2016 16:27:55 +0000 Subject: [docs] [issue27023] Documentation of tempfile.gettempdir() does not mention it only supports existing directories In-Reply-To: <1463247583.74.0.311593159637.issue27023@psf.upfronthosting.co.za> Message-ID: <1463329675.78.0.758918939415.issue27023@psf.upfronthosting.co.za> ProgVal added the comment: I know, that's why I did not ask to change the code. Only the doc to make that behavior more explicit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun May 15 12:45:40 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 15 May 2016 16:45:40 +0000 Subject: [docs] [issue27023] Documentation of tempfile.gettempdir() does not mention it only supports existing directories In-Reply-To: <1463247583.74.0.311593159637.issue27023@psf.upfronthosting.co.za> Message-ID: <1463330740.16.0.749850802767.issue27023@psf.upfronthosting.co.za> R. David Murray added the comment: As Steve pointed out, the documentation is explicit: "to *find* one the user can craete files in". You can't find something that doesn't yet exist. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 03:12:59 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 16 May 2016 07:12:59 +0000 Subject: [docs] [issue18531] Undocumented different between METH_KEYWORDS and **kws In-Reply-To: <1374519103.74.0.277776306074.issue18531@psf.upfronthosting.co.za> Message-ID: <20160516071243.42363.1238.DA9399B3@psf.io> Roundup Robot added the comment: New changeset e3283b4ae61d by Serhiy Storchaka in branch '3.5': Backported tests for issue #18531. https://hg.python.org/cpython/rev/e3283b4ae61d New changeset 621e0a3249c2 by Serhiy Storchaka in branch '2.7': Backported tests for issue #18531. https://hg.python.org/cpython/rev/621e0a3249c2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 03:37:55 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 May 2016 07:37:55 +0000 Subject: [docs] [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1463384275.88.0.971368171639.issue25910@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: XML-RPC link was fixed in issue26889 (using the a web archive). Left links are http://www.zope.com/, http://www.pythonlabs.com/logos.html, and links to dead projects. What can we do with Zope and PythonLabs links? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 04:30:07 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 16 May 2016 08:30:07 +0000 Subject: [docs] [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1463387407.85.0.924434849052.issue25910@psf.upfronthosting.co.za> Senthil Kumaran added the comment: zope should be http://www.zope.org/ The pythonlabs link could be removed. The logos at pythonlabs link does not exist. Reference for pythonlab exists in a humorous form here: http://www.pythonlabs.com/ ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 04:33:49 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 May 2016 08:33:49 +0000 Subject: [docs] [issue27036] Mark up of references in different form Message-ID: <1463387629.05.0.783453150634.issue27036@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: When there is a reference from the term in different form (e.g. in plural), the modified part can be appended outside of the reference: ":term:`bytes-like object`\ s". But this looks not very nice in rendered document, since only a part of the word is undescored. Proposed patch expands similar references to full words: ":term:`bytes-like objects `". ---------- assignee: docs at python components: Documentation files: refs_forms.patch keywords: patch messages: 265686 nosy: docs at python, georg.brandl, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Mark up of references in different form type: enhancement versions: Python 2.7, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file42869/refs_forms.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 05:32:20 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 16 May 2016 09:32:20 +0000 Subject: [docs] [issue27036] Mark up of references in different form In-Reply-To: <1463387629.05.0.783453150634.issue27036@psf.upfronthosting.co.za> Message-ID: <1463391140.79.0.938192927262.issue27036@psf.upfronthosting.co.za> Martin Panter added the comment: These bug me too. For the changes like the bytes-like objects example, you have my full support. But for the changes that modify identifier names, I think the both the old and the new versions are pretty bad. Example: - . . . for some :exc:`SyntaxError`\ s. + . . . for some :exc:`SyntaxErrors `. In Firefox, the new version renders as if it is talking about something literally called SyntaxErrors. It is only obvious that the exception is called SyntaxError when you hover the mouse, follow the link, etc. I wonder if it would be better to find another way to write these kind of cases. E.g.: * . . . for some syntax errors. [Just drop the link and markup.] * . . . for some :exc:`SyntaxError` exceptions. For cases like ?eval()uated?, would it be acceptable changing to ?evaluated with :func:`eval` ?? ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From vadmium+py at gmail.com Mon May 16 05:38:10 2016 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Mon, 16 May 2016 09:38:10 -0000 Subject: [docs] Mark up of references in different form (issue 27036) Message-ID: <20160516093810.18065.55701@psf.upfronthosting.co.za> https://bugs.python.org/review/27036/diff/17256/Doc/library/asyncore.rst File Doc/library/asyncore.rst (right): https://bugs.python.org/review/27036/diff/17256/Doc/library/asyncore.rst#newcode104 Doc/library/asyncore.rst:104: :c:func:`polled ` for read and write events. Would it hurt to just drop the markup? As far as I know it normally just changes the font, and doesn?t make a link. https://bugs.python.org/review/27036/diff/17256/Doc/library/email.headerregistry.rst File Doc/library/email.headerregistry.rst (right): https://bugs.python.org/review/27036/diff/17256/Doc/library/email.headerregistry.rst#newcode214 Doc/library/email.headerregistry.rst:214: ``decoded`` value is set by :attr:`joining <~str.join>` the :class:`str` value of I think you would have to drop the tilde (~) to get the link to work. There are other changes that also have this problem. But I don?t like this version any better than the original. What about something like: .?.?. is set to the concatenation of the :class:`str` value of each element .?.?., using :meth:`str.join` and a separator of ``',?'``. https://bugs.python.org/review/27036/diff/17256/Doc/whatsnew/3.4.rst File Doc/whatsnew/3.4.rst (right): https://bugs.python.org/review/27036/diff/17256/Doc/whatsnew/3.4.rst#newcode1116 Doc/whatsnew/3.4.rst:1116: mmap objects can now be :mod:`weakrefed `. (Contributed by Valerie Lambert in Should probably be spelt ?weakreffed? (refed means re-fed as in fed again) Maybe ?weakly referenced with :mod:`weakref` ?, or similar? https://bugs.python.org/review/27036/ From report at bugs.python.org Mon May 16 12:08:24 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 16 May 2016 16:08:24 +0000 Subject: [docs] [issue27037] Universal newline support for zipFile.ZipExtFile.read() is not working (deprecated?), and the missing functionality not documented In-Reply-To: <1463410014.02.0.132222711737.issue27037@psf.upfronthosting.co.za> Message-ID: <1463414904.08.0.602688679125.issue27037@psf.upfronthosting.co.za> R. David Murray added the comment: The decision was to deprecate 'U' *everywhere* in python3. Yes, the 2.7 method you are concerned about is broken with respect to its documentation, which is what #6759 was about originally. That issue was deemed too disruptive to the codebase to address effectively, but in fixing things propery for python3 we apparently lost track of the 2.7 bug. You can fix the problem (in a forward compatible way) by wrapping the ZipExtFile in an io.TextIOWrapper. The 2.7 documentation should be changed to address this issue and the solution. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 12:09:14 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 16 May 2016 16:09:14 +0000 Subject: [docs] [issue27037] Universal newline support for zipFile.ZipExtFile.read() is not working (deprecated?), and the missing functionality not documented In-Reply-To: <1463410014.02.0.132222711737.issue27037@psf.upfronthosting.co.za> Message-ID: <1463414954.57.0.499115935538.issue27037@psf.upfronthosting.co.za> R. David Murray added the comment: The decision was to deprecate 'U' *everywhere* in python3. Yes, the 2.7 method you are concerned about is broken with respect to its documentation, which is what #6759 was about originally. That issue was deemed too disruptive to the codebase to address effectively, but in fixing things properly for python3 we apparently lost track of the 2.7 bug. You can fix the problem (in a forward compatible way) by wrapping the ZipExtFile in an io.TextIOWrapper. The 2.7 documentation should be changed to address this issue and the solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 12:09:22 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 16 May 2016 16:09:22 +0000 Subject: [docs] [issue27037] Universal newline support for zipFile.ZipExtFile.read() is not working (deprecated?), and the missing functionality not documented In-Reply-To: <1463410014.02.0.132222711737.issue27037@psf.upfronthosting.co.za> Message-ID: <1463414962.75.0.0863740383451.issue27037@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- Removed message: http://bugs.python.org/msg265705 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 12:12:38 2016 From: report at bugs.python.org (SilentGhost) Date: Mon, 16 May 2016 16:12:38 +0000 Subject: [docs] [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1463415158.69.0.303910403835.issue25910@psf.upfronthosting.co.za> SilentGhost added the comment: Does it not matter that the link to pythonlabs is a part of the official license text? Besides, it's not an actual html a tag, but rather a verbatim text, surely the only correction here is to make sure that the linkcheck doesn't check links within pre, code and similar tags. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 12:44:59 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 16 May 2016 16:44:59 +0000 Subject: [docs] [issue26141] typing module documentation incomplete In-Reply-To: <1453049740.68.0.762293537242.issue26141@psf.upfronthosting.co.za> Message-ID: <1463417099.86.0.728687978687.issue26141@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> needs patch type: -> enhancement versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon May 16 16:34:36 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 16 May 2016 20:34:36 +0000 Subject: [docs] [issue27036] Mark up of references in different form In-Reply-To: <1463387629.05.0.783453150634.issue27036@psf.upfronthosting.co.za> Message-ID: <1463430875.75.0.848577987139.issue27036@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your review Martin! Absolutely agreed with you about references to classes and exceptions. I have removed this from the next version of the patch. I left your idea about ":exc:`SyntaxError` exceptions" for other patch. ?evaluated with :func:`eval` ? looks tautologically to me. In hypertext we can avoid the repetition. ---------- Added file: http://bugs.python.org/file42877/refs_forms2.patch _______________________________________ Python tracker _______________________________________ From storchaka at gmail.com Mon May 16 16:34:49 2016 From: storchaka at gmail.com (storchaka at gmail.com) Date: Mon, 16 May 2016 20:34:49 -0000 Subject: [docs] Mark up of references in different form (issue 27036) Message-ID: <20160516203449.12259.32973@psf.upfronthosting.co.za> Reviewers: vadmium, http://bugs.python.org/review/27036/diff/17256/Doc/library/asyncore.rst File Doc/library/asyncore.rst (right): http://bugs.python.org/review/27036/diff/17256/Doc/library/asyncore.rst#newcode104 Doc/library/asyncore.rst:104: :c:func:`polled ` for read and write events. On 2016/05/16 11:38:10, vadmium wrote: > Would it hurt to just drop the markup? As far as I know it normally just changes > the font, and doesn?t make a link. Ah, I missed that this is just :c:func:. Maybe use references to corresponding functions in the select module? http://bugs.python.org/review/27036/diff/17256/Doc/library/email.headerregistry.rst File Doc/library/email.headerregistry.rst (right): http://bugs.python.org/review/27036/diff/17256/Doc/library/email.headerregistry.rst#newcode214 Doc/library/email.headerregistry.rst:214: ``decoded`` value is set by :attr:`joining <~str.join>` the :class:`str` value of On 2016/05/16 11:38:10, vadmium wrote: > I think you would have to drop the tilde (~) to get the link to work. There are > other changes that also have this problem. Good catch! > But I don?t like this version any better than the original. What about something > like: > > . . . is set to the concatenation of the :class:`str` value of each element > . . ., using :meth:`str.join` and a separator of ``', '``. I don't know. I left this for David. Maybe this sentence should be merged with the first sentence in this paragraph. http://bugs.python.org/review/27036/diff/17256/Doc/library/threading.rst File Doc/library/threading.rst (right): http://bugs.python.org/review/27036/diff/17256/Doc/library/threading.rst#newcode272 Doc/library/threading.rst:272: A thread can be :meth:`joined <~Thread.join>` many times. Since there are multiple references to Thread.join in surrounding paragraphs, I think it is better to remove this reference. http://bugs.python.org/review/27036/diff/17256/Doc/whatsnew/3.4.rst File Doc/whatsnew/3.4.rst (right): http://bugs.python.org/review/27036/diff/17256/Doc/whatsnew/3.4.rst#newcode1116 Doc/whatsnew/3.4.rst:1116: mmap objects can now be :mod:`weakrefed `. (Contributed by Valerie Lambert in On 2016/05/16 11:38:10, vadmium wrote: > Should probably be spelt ?weakreffed? (refed means re-fed as in fed again) > > Maybe ?weakly referenced with :mod:`weakref` ?, or similar? What about "mmap objects are now :mod:`weakly referenceable `"? Terms "weakly referenceable", "weak referenceable" and "weakly referenced" are already used in the documentation. See also yet one change in this file. Please review this at http://bugs.python.org/review/27036/ Affected files: Doc/library/array.rst Doc/library/asyncore.rst Doc/library/audioop.rst Doc/library/base64.rst Doc/library/binascii.rst Doc/library/doctest.rst Doc/library/email.headerregistry.rst Doc/library/email.rst Doc/library/hashlib.rst Doc/library/http.cookies.rst Doc/library/logging.config.rst Doc/library/logging.rst Doc/library/nntplib.rst Doc/library/threading.rst Doc/library/urllib.request.rst Doc/whatsnew/3.4.rst diff -r 3ceb54a49387 Doc/library/array.rst --- a/Doc/library/array.rst Sat May 07 10:49:58 2016 +0300 +++ b/Doc/library/array.rst Sat May 07 14:38:30 2016 +0300 @@ -91,7 +91,7 @@ Array objects support the ordinary seque concatenation, and multiplication. When using slice assignment, the assigned value must be an array object with the same type code; in all other cases, :exc:`TypeError` is raised. Array objects also implement the buffer interface, -and may be used wherever :term:`bytes-like object`\ s are supported. +and may be used wherever :term:`bytes-like objects ` are supported. The following data items and methods are also supported: diff -r 3ceb54a49387 Doc/library/asyncore.rst --- a/Doc/library/asyncore.rst Sat May 07 10:49:58 2016 +0300 +++ b/Doc/library/asyncore.rst Sat May 07 14:38:30 2016 +0300 @@ -100,8 +100,8 @@ any that have been added to the map duri During asynchronous processing, each mapped channel's :meth:`readable` and :meth:`writable` methods are used to determine whether the channel's socket - should be added to the list of channels :c:func:`select`\ ed or - :c:func:`poll`\ ed for read and write events. + should be added to the list of channels :c:func:`selected