From report at bugs.python.org Wed Nov 1 00:06:40 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 01 Nov 2017 04:06:40 +0000 Subject: [docs] [issue31454] Include "import as" in tutorial In-Reply-To: <1505317940.24.0.986048971751.issue31454@psf.upfronthosting.co.za> Message-ID: <1509509200.74.0.213398074469.issue31454@psf.upfronthosting.co.za> Berker Peksag added the comment: I just reviewed Mario's pull request. Should we mention the "from fibo import fib as fibonacci" syntax too? ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 1 03:51:22 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 01 Nov 2017 07:51:22 +0000 Subject: [docs] [issue31390] pydoc.Helper.keywords missing async and await In-Reply-To: <1504830840.14.0.251676747088.issue31390@psf.upfronthosting.co.za> Message-ID: <1509522682.03.0.213398074469.issue31390@psf.upfronthosting.co.za> Berker Peksag added the comment: Thank you for your report. Prior to Python 3.7, async and await keywords have had special meanings and they weren't treated as normal keywords. They are now in Python 3.7: >>> async = 42 File "", line 1 async = 42 ^ SyntaxError: invalid syntax And they are listed as keywords: $ ./python -m pydoc keywords Here is a list of the Python keywords. Enter any keyword to get more help. False class from or None continue global pass True def if raise and del import return as elif in try assert else is while async except lambda with await finally nonlocal yield break for not So I don't think we should modify pydoc to list them as keywords in Python 3.6. ---------- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 1 13:31:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Nov 2017 17:31:00 +0000 Subject: [docs] [issue8243] curses writing to window's bottom right position raises: `_curses.error: addstr() returned ERR' In-Reply-To: <1352121880.55.0.191535515397.issue8243@psf.upfronthosting.co.za> Message-ID: <1509557460.13.0.912454111764.issue8243@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- type: behavior -> enhancement versions: +Python 3.6, Python 3.7 -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 1 14:50:53 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Nov 2017 18:50:53 +0000 Subject: [docs] [issue18669] curses.chgat() moves cursor, documentation says it shouldn't In-Reply-To: <1375800170.73.0.20062232661.issue18669@psf.upfronthosting.co.za> Message-ID: <1509562253.33.0.912454111764.issue18669@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 2 09:52:26 2017 From: report at bugs.python.org (Davy Wybiral) Date: Thu, 02 Nov 2017 13:52:26 +0000 Subject: [docs] [issue31923] Misspelled "loading" in Doc/includes/sqlite3/load_extension.py Message-ID: <1509630745.31.0.213398074469.issue31923@psf.upfronthosting.co.za> New submission from Davy Wybiral : Line #14 of Doc/includes/sqlite3/load_extension.py reads: # disable extension laoding again ---------- assignee: docs at python components: Documentation messages: 305423 nosy: davywtf, docs at python priority: normal severity: normal status: open title: Misspelled "loading" in Doc/includes/sqlite3/load_extension.py versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 2 09:57:26 2017 From: report at bugs.python.org (Davy Wybiral) Date: Thu, 02 Nov 2017 13:57:26 +0000 Subject: [docs] [issue31923] Misspelled "loading" in Doc/includes/sqlite3/load_extension.py In-Reply-To: <1509630745.31.0.213398074469.issue31923@psf.upfronthosting.co.za> Message-ID: <1509631046.84.0.912454111764.issue31923@psf.upfronthosting.co.za> Change by Davy Wybiral : ---------- keywords: +patch pull_requests: +4197 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 2 15:21:45 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 02 Nov 2017 19:21:45 +0000 Subject: [docs] [issue31928] DOC: Show sys.version_info as a named tuple Message-ID: <1509650505.83.0.213398074469.issue31928@psf.upfronthosting.co.za> New submission from Cheryl Sabella : Invoking sys.version_info displays results as a named tuple, but the documentation shows the results as a tuple. ---------- assignee: docs at python components: Documentation messages: 305446 nosy: csabella, docs at python priority: normal severity: normal status: open title: DOC: Show sys.version_info as a named tuple versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 2 15:26:21 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Thu, 02 Nov 2017 19:26:21 +0000 Subject: [docs] [issue31928] DOC: Show sys.version_info as a named tuple In-Reply-To: <1509650505.83.0.213398074469.issue31928@psf.upfronthosting.co.za> Message-ID: <1509650781.78.0.912454111764.issue31928@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- keywords: +patch pull_requests: +4204 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 2 21:08:14 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Fri, 03 Nov 2017 01:08:14 +0000 Subject: [docs] [issue31928] DOC: Show sys.version_info as a named tuple In-Reply-To: <1509650505.83.0.213398074469.issue31928@psf.upfronthosting.co.za> Message-ID: <1509671293.22.0.912454111764.issue31928@psf.upfronthosting.co.za> Change by Cheryl Sabella : ---------- stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 3 13:19:46 2017 From: report at bugs.python.org (Daniel U. Thibault) Date: Fri, 03 Nov 2017 17:19:46 +0000 Subject: [docs] [issue31936] "5. The import system" grammatical error Message-ID: <1509729586.08.0.213398074469.issue31936@psf.upfronthosting.co.za> New submission from Daniel U. Thibault : https://docs.python.org/3/reference/import.html#importsystem "Other mechanisms for invoking the import system (such as importlib.import_module()) may choose to subvert __import__() and use its own solution to implement import semantics." should be "Other mechanisms for invoking the import system (such as importlib.import_module()) may choose to subvert __import__() and use their own solution to implement import semantics." ---------- assignee: docs at python components: Documentation messages: 305489 nosy: Daniel.U..Thibault, docs at python priority: normal severity: normal status: open title: "5. The import system" grammatical error type: enhancement versions: Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 3 13:29:28 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 03 Nov 2017 17:29:28 +0000 Subject: [docs] [issue31936] "5. The import system" grammatical error In-Reply-To: <1509729586.08.0.213398074469.issue31936@psf.upfronthosting.co.za> Message-ID: <1509730168.45.0.912454111764.issue31936@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- nosy: +barry versions: +Python 3.7 -Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 3 13:36:11 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 03 Nov 2017 17:36:11 +0000 Subject: [docs] [issue31936] "5. The import system" grammatical error In-Reply-To: <1509729586.08.0.213398074469.issue31936@psf.upfronthosting.co.za> Message-ID: <1509730571.07.0.912454111764.issue31936@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- keywords: +patch pull_requests: +4219 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 3 13:37:25 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 03 Nov 2017 17:37:25 +0000 Subject: [docs] [issue31936] "5. The import system" grammatical error In-Reply-To: <1509729586.08.0.213398074469.issue31936@psf.upfronthosting.co.za> Message-ID: <1509730644.95.0.213398074469.issue31936@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Re-reading the paragraph now, it also parsed weirdly for me. See the linked PR for a suggested improvement, along with your change. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 3 15:29:35 2017 From: report at bugs.python.org (=?utf-8?b?0JTQuNC70Y/QvSDQn9Cw0LvQsNGD0LfQvtCy?=) Date: Fri, 03 Nov 2017 19:29:35 +0000 Subject: [docs] [issue31914] Document Pool.(star)map return type In-Reply-To: <1509482713.68.0.213398074469.issue31914@psf.upfronthosting.co.za> Message-ID: <1509737374.95.0.213398074469.issue31914@psf.upfronthosting.co.za> ????? ???????? added the comment: If the idea is one day to switch the return type to an iterable/generator, returning from starmap() before all parallel executions have completed, this needs to be documented and the typeshed adjusted accordingly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 3 16:45:48 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 03 Nov 2017 20:45:48 +0000 Subject: [docs] [issue31936] "5. The import system" grammatical error In-Reply-To: <1509729586.08.0.213398074469.issue31936@psf.upfronthosting.co.za> Message-ID: <1509741948.57.0.213398074469.issue31936@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: New changeset 93952f881500053057c2e08c4b253ac61233d7db by Barry Warsaw in branch 'master': Fix a grammatical problem and reword for clarity. (#4257) https://github.com/python/cpython/commit/93952f881500053057c2e08c4b253ac61233d7db ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 3 16:46:05 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 03 Nov 2017 20:46:05 +0000 Subject: [docs] [issue31936] "5. The import system" grammatical error In-Reply-To: <1509729586.08.0.213398074469.issue31936@psf.upfronthosting.co.za> Message-ID: <1509741964.98.0.912454111764.issue31936@psf.upfronthosting.co.za> Change by Barry A. Warsaw : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 3 16:57:49 2017 From: report at bugs.python.org (Brett Cannon) Date: Fri, 03 Nov 2017 20:57:49 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary Message-ID: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> New submission from Brett Cannon : The term "dunder" is used out in the community regularly, but if you have never been exposed to it before it can seem a little odd without context. ---------- assignee: docs at python components: Documentation messages: 305509 nosy: brett.cannon, docs at python priority: normal severity: normal status: open title: Add the term "dunder" to the glossary _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 3 16:59:17 2017 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 03 Nov 2017 20:59:17 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1509742757.07.0.213398074469.issue31937@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: -1 until we have something we can call a "mifflin". (Kidding of course!) ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 3 17:02:03 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Nov 2017 21:02:03 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1509742923.34.0.213398074469.issue31937@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: > until we have something we can call a "mifflin". Name of next GitHub bot? :P ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 3 17:03:36 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Fri, 03 Nov 2017 21:03:36 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1509743016.04.0.213398074469.issue31937@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Anyway, +1 to adding dunder to glossary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 04:41:22 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Nov 2017 08:41:22 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1509784882.0.0.213398074469.issue31937@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think it shouldn't be added as a separate entry, but just mentioned in [1] and [2], and added to the index. [1] https://docs.python.org/3/glossary.html#term-special-method [2] https://docs.python.org/3/reference/datamodel.html#specialnames ---------- keywords: +easy nosy: +serhiy.storchaka stage: -> needs patch type: -> enhancement versions: +Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 04:45:58 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Nov 2017 08:45:58 +0000 Subject: [docs] [issue18669] curses.chgat() moves cursor, documentation says it shouldn't In-Reply-To: <1375800170.73.0.20062232661.issue18669@psf.upfronthosting.co.za> Message-ID: <1509785158.26.0.912454111764.issue18669@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 04:49:25 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Nov 2017 08:49:25 +0000 Subject: [docs] [issue18669] curses.chgat() moves cursor, documentation says it shouldn't In-Reply-To: <1375800170.73.0.20062232661.issue18669@psf.upfronthosting.co.za> Message-ID: <1509785365.12.0.213398074469.issue18669@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b838cc3ff4e039af949c6a19bd896e98e944dcbe by Serhiy Storchaka (Chillar Anand) in branch 'master': bpo-18699: Corrected documentation for window.chgat in curses module (#1430) https://github.com/python/cpython/commit/b838cc3ff4e039af949c6a19bd896e98e944dcbe New changeset 6dbecd2cd9c9448b34e1a632509220f3c4cf7587 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430) (#4271) https://github.com/python/cpython/commit/6dbecd2cd9c9448b34e1a632509220f3c4cf7587 New changeset fd38819497fd2a52ada674f0c890f5b414d0e87f by Serhiy Storchaka in branch '2.7': [2.7] bpo-18699: Corrected documentation for window.chgat in curses module (GH-1430). (#4272) https://github.com/python/cpython/commit/fd38819497fd2a52ada674f0c890f5b414d0e87f There is a typo in the issue number in commit messages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 05:10:01 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Nov 2017 09:10:01 +0000 Subject: [docs] [issue31942] Document that support of start and stop parameters in the Sequence's index() is optional Message-ID: <1509786601.53.0.213398074469.issue31942@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Parameters start and stop were added to the Sequence.index() mixin method in 3.5 (see issue23086). But not all concrete implementations of the Sequence ABC support them (for example range.index() doesn't, see issue28197). This should be explicitly documented (including the docstring of Sequence.index). ---------- assignee: docs at python components: Documentation keywords: easy messages: 305547 nosy: docs at python, rhettinger, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Document that support of start and stop parameters in the Sequence's index() is optional type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 05:11:00 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Nov 2017 09:11:00 +0000 Subject: [docs] [issue28197] Add start and stop parameters to the range.index() ABC method In-Reply-To: <1474231832.91.0.157673750963.issue28197@psf.upfronthosting.co.za> Message-ID: <1509786660.05.0.912454111764.issue28197@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Interpreter Core -Documentation, Library (Lib) keywords: +easy (C) title: range.index mismatch with documentation -> Add start and stop parameters to the range.index() ABC method _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 05:12:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Nov 2017 09:12:02 +0000 Subject: [docs] [issue28197] Add start and stop parameters to the range.index() ABC method In-Reply-To: <1474231832.91.0.157673750963.issue28197@psf.upfronthosting.co.za> Message-ID: <1509786722.68.0.213398074469.issue28197@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Opened issue31942 for the documenting part. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 05:12:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 04 Nov 2017 09:12:26 +0000 Subject: [docs] [issue31942] Document that support of start and stop parameters in the Sequence's index() is optional In-Reply-To: <1509786601.53.0.213398074469.issue31942@psf.upfronthosting.co.za> Message-ID: <1509786746.43.0.912454111764.issue31942@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +Devin Jeanpierre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 06:39:47 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Nov 2017 10:39:47 +0000 Subject: [docs] [issue31678] Incorrect C Function name for timedelta In-Reply-To: <1507038462.28.0.213398074469.issue31678@psf.upfronthosting.co.za> Message-ID: <1509791987.62.0.213398074469.issue31678@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 82cd3cede804ca694fb0657fd985d5eff84a414f by Berker Peksag (Phobosmir) in branch 'master': bpo-31678: Fix typo in PyDateTime_DELTA_GET_MICROSECONDS (GH-3869) https://github.com/python/cpython/commit/82cd3cede804ca694fb0657fd985d5eff84a414f ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 06:40:57 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 Nov 2017 10:40:57 +0000 Subject: [docs] [issue31678] Incorrect C Function name for timedelta In-Reply-To: <1507038462.28.0.213398074469.issue31678@psf.upfronthosting.co.za> Message-ID: <1509792057.54.0.912454111764.issue31678@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4236 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 06:45:53 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Nov 2017 10:45:53 +0000 Subject: [docs] [issue31678] Incorrect C Function name for timedelta In-Reply-To: <1507038462.28.0.213398074469.issue31678@psf.upfronthosting.co.za> Message-ID: <1509792353.9.0.213398074469.issue31678@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset f9387469e82eccb6e0471037033f921be7f59909 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-31678: Fix typo in PyDateTime_DELTA_GET_MICROSECONDS (GH-3869) https://github.com/python/cpython/commit/f9387469e82eccb6e0471037033f921be7f59909 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 06:46:51 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Nov 2017 10:46:51 +0000 Subject: [docs] [issue31678] Incorrect C Function name for timedelta In-Reply-To: <1507038462.28.0.213398074469.issue31678@psf.upfronthosting.co.za> Message-ID: <1509792411.53.0.213398074469.issue31678@psf.upfronthosting.co.za> Berker Peksag added the comment: Good catch, thank you! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 07:17:19 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Nov 2017 11:17:19 +0000 Subject: [docs] [issue31668] "fixFirefoxAnchorBug" function in doctools.js causes navigating problem in Py3 doc in Chrome In-Reply-To: <1507005320.05.0.213398074469.issue31668@psf.upfronthosting.co.za> Message-ID: <1509794238.94.0.213398074469.issue31668@psf.upfronthosting.co.za> Berker Peksag added the comment: This is indeed an annoying bug. Turns out there is already a compatibility shim for $.browser in doctools.js: https://github.com/sphinx-doc/sphinx/commit/c608af4babe140626877be08535af095ff633c00 I've opened https://github.com/sphinx-doc/sphinx/pull/4216 to add the "$.browser.firefox" check back. There is nothing we can do here because we don't maintain a copy of doctools.js in Python codebase: $ git ls-files | grep doctools.js Thank you for your report. ---------- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 12:27:06 2017 From: report at bugs.python.org (Marat Sharafutdinov) Date: Sat, 04 Nov 2017 16:27:06 +0000 Subject: [docs] [issue31943] Add asyncio.Handle.cancelled() and asyncio.TimerHandle.when Message-ID: <1509812825.97.0.213398074469.issue31943@psf.upfronthosting.co.za> New submission from Marat Sharafutdinov : It would be handy to access the loop's time the Handle's callback will be called at if you are using delayed calls with "delay" (not "when") argument. Also it is useful to know whether the call was cancelled through the special attribute. ---------- assignee: docs at python components: Documentation, Library (Lib), asyncio messages: 305561 nosy: decaz, docs at python, yselivanov priority: normal pull_requests: 4238 severity: normal status: open title: Add asyncio.Handle.cancelled() and asyncio.TimerHandle.when type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 15:59:30 2017 From: report at bugs.python.org (Nitish) Date: Sat, 04 Nov 2017 19:59:30 +0000 Subject: [docs] [issue31942] Document that support of start and stop parameters in the Sequence's index() is optional In-Reply-To: <1509786601.53.0.213398074469.issue31942@psf.upfronthosting.co.za> Message-ID: <1509825570.57.0.912454111764.issue31942@psf.upfronthosting.co.za> Change by Nitish : ---------- keywords: +patch pull_requests: +4239 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 16:10:42 2017 From: report at bugs.python.org (Nitish) Date: Sat, 04 Nov 2017 20:10:42 +0000 Subject: [docs] [issue31942] Document that support of start and stop parameters in the Sequence's index() is optional In-Reply-To: <1509786601.53.0.213398074469.issue31942@psf.upfronthosting.co.za> Message-ID: <1509826242.98.0.912454111764.issue31942@psf.upfronthosting.co.za> Change by Nitish : ---------- nosy: +nitishch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 17:52:59 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 04 Nov 2017 21:52:59 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1509832379.52.0.213398074469.issue31937@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I would rather not clutter the glossary with this sort of entry. Already, it has clutter that should probably be removed so that once again it becomes a worthwhile read rather than turning into a dictionary of random terms (such as meta-path-finder, module spec, and regular-package). Instead, there should probably be a FAQ entry or wiki entry on the ever evolving spoken cultural terminology: dunder --> double underscore stir --> __str__ repper --> __repr__ rest --> .rst files or representational-state-transfer sequel -> sql gwid -> globally unique indentifier inker and decker -> incref and decef (larry hastings pronunciation) ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 19:00:53 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Nov 2017 23:00:53 +0000 Subject: [docs] [issue31923] Misspelled "loading" in Doc/includes/sqlite3/load_extension.py In-Reply-To: <1509630745.31.0.213398074469.issue31923@psf.upfronthosting.co.za> Message-ID: <1509836453.93.0.213398074469.issue31923@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset aafece7a9e010075fff4420cfbb16f1ec0342698 by Berker Peksag (davy wybiral) in branch 'master': bpo-31923: Fix spelling in sqlite3 docs (GH-4227) https://github.com/python/cpython/commit/aafece7a9e010075fff4420cfbb16f1ec0342698 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 19:01:30 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Nov 2017 23:01:30 +0000 Subject: [docs] [issue31923] Misspelled "loading" in Doc/includes/sqlite3/load_extension.py In-Reply-To: <1509630745.31.0.213398074469.issue31923@psf.upfronthosting.co.za> Message-ID: <1509836490.31.0.912454111764.issue31923@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- type: -> behavior versions: +Python 2.7, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 19:02:02 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 Nov 2017 23:02:02 +0000 Subject: [docs] [issue31923] Misspelled "loading" in Doc/includes/sqlite3/load_extension.py In-Reply-To: <1509630745.31.0.213398074469.issue31923@psf.upfronthosting.co.za> Message-ID: <1509836522.01.0.912454111764.issue31923@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4243 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 19:03:01 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 Nov 2017 23:03:01 +0000 Subject: [docs] [issue31923] Misspelled "loading" in Doc/includes/sqlite3/load_extension.py In-Reply-To: <1509630745.31.0.213398074469.issue31923@psf.upfronthosting.co.za> Message-ID: <1509836581.18.0.912454111764.issue31923@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4244 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 19:11:03 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Nov 2017 23:11:03 +0000 Subject: [docs] [issue31923] Misspelled "loading" in Doc/includes/sqlite3/load_extension.py In-Reply-To: <1509630745.31.0.213398074469.issue31923@psf.upfronthosting.co.za> Message-ID: <1509837063.66.0.213398074469.issue31923@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 5c0100aec014b9e0a66884468cbfa3ac01e4bfbb by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-31923: Fix spelling in sqlite3 docs (GH-4227) https://github.com/python/cpython/commit/5c0100aec014b9e0a66884468cbfa3ac01e4bfbb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 19:11:27 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Nov 2017 23:11:27 +0000 Subject: [docs] [issue31923] Misspelled "loading" in Doc/includes/sqlite3/load_extension.py In-Reply-To: <1509630745.31.0.213398074469.issue31923@psf.upfronthosting.co.za> Message-ID: <1509837087.71.0.213398074469.issue31923@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 4376a2275967971a2f9586028347d6ed4ed6ef13 by Berker Peksag (Miss Islington (bot)) in branch '2.7': bpo-31923: Fix spelling in sqlite3 docs (GH-4227) https://github.com/python/cpython/commit/4376a2275967971a2f9586028347d6ed4ed6ef13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 4 19:12:02 2017 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Nov 2017 23:12:02 +0000 Subject: [docs] [issue31923] Misspelled "loading" in Doc/includes/sqlite3/load_extension.py In-Reply-To: <1509630745.31.0.213398074469.issue31923@psf.upfronthosting.co.za> Message-ID: <1509837122.83.0.213398074469.issue31923@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks, Davy! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 5 06:49:27 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 05 Nov 2017 11:49:27 +0000 Subject: [docs] [issue31948] Broken MSDN links in msilib docs Message-ID: <1509882567.57.0.213398074469.issue31948@psf.upfronthosting.co.za> New submission from Berker Peksag : Most of the MSDN links in Doc/library/msilib.rst are broken: https://docs.python.org/3/library/msilib.html For example, the UuidToString link goes to https://msdn.microsoft.com/library?url=/library/en-us/rpc/rpc/uuidtostring.asp But I believe the correct link should be https://msdn.microsoft.com/en-us/library/windows/desktop/aa379352(v=vs.85).aspx ---------- assignee: docs at python components: Documentation keywords: easy messages: 305593 nosy: berker.peksag, docs at python priority: normal severity: normal stage: needs patch status: open title: Broken MSDN links in msilib docs type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 5 06:55:10 2017 From: report at bugs.python.org (Berker Peksag) Date: Sun, 05 Nov 2017 11:55:10 +0000 Subject: [docs] [issue31454] Include "import as" in tutorial In-Reply-To: <1505317940.24.0.986048971751.issue31454@psf.upfronthosting.co.za> Message-ID: <1509882910.83.0.213398074469.issue31454@psf.upfronthosting.co.za> Berker Peksag added the comment: PR 4041 looks good to me. Mariatta, do you have time to look at Mario's patch? Sarthak, thank you for your PR, but a PR was opened 12 days before yours (sorry, I missed it earlier) Would you like to work on another issue? I've just opened bpo-31948 and I'd be happy to review/merge a PR if you have time. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From nsigrist at gmail.com Sun Nov 5 02:39:59 2017 From: nsigrist at gmail.com (n sigrist) Date: Sun, 5 Nov 2017 00:39:59 -0700 Subject: [docs] Font quality in docs degraded in 3.6.3 in comparison to 3.6.2 -- please use type 1 fonts only Message-ID: Example: tutorial.pdf => Documents are compiled with pdflatex -- can you ensure to use type 1 fonts and avoid the old type 3 fonts. The latex settings just needs a tuning and you get higher quality pdf docs. All type 3 fonts can be replaced with type 1 fonts available in any TeX distribution. It makes the documents more readable and enjoyable. -- Norbert -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sun Nov 5 13:16:09 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 05 Nov 2017 18:16:09 +0000 Subject: [docs] [issue31950] Default event loop policy doc lacks precision Message-ID: <1509905769.74.0.213398074469.issue31950@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The doc for the default event loop policy states that """the default policy defines context as the current thread, and manages an event loop per thread that interacts with asyncio""". What it doesn't mention, though, is that you get a RuntimeError if you call get_event_loop() in a non-main thread -- you first have to call set_event_loop(new_event_loop()) in that thread. This wasn't expected by me. As a side note, customizing the event loop policy isn't trivial either: it seems it's best to subclass DefaultEventLoopPolicy and make adjustments by overriding the API methods. Writing your own wouldn't work, as e.g. the Unix default policy has custom initialization code for child watchers. ---------- assignee: docs at python components: Documentation, asyncio messages: 305607 nosy: docs at python, giampaolo.rodola, gvanrossum, haypo, pitrou, yselivanov priority: normal severity: normal status: open title: Default event loop policy doc lacks precision type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 5 14:07:21 2017 From: report at bugs.python.org (Mario Corchero) Date: Sun, 05 Nov 2017 19:07:21 +0000 Subject: [docs] [issue30548] typo in documentation for create_autospec In-Reply-To: <1496394381.09.0.91116482689.issue30548@psf.upfronthosting.co.za> Message-ID: <1509908841.96.0.213398074469.issue30548@psf.upfronthosting.co.za> Mario Corchero added the comment: I've always understood instance as a way to say "I am passing this class but I want to force the autospec on the instance" For example, given ``` class X: def __init__(self): raise ``` You can do `unittest.mock.create_autospec(X, instance=True)` to set a spec of the instance rather than the class. Also quite often you do autospec on a class but you want the interface of the instance. This parameter allows you to do so. Basically, `unittest.mock.create_autospec(X, instance=True)` will produce a non callable mock. I think the docs are correct, maybe misleading ---------- nosy: +mariocj89 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 5 14:57:17 2017 From: report at bugs.python.org (Mario Corchero) Date: Sun, 05 Nov 2017 19:57:17 +0000 Subject: [docs] [issue30699] Misleading class names in datetime.tzinfo usage examples In-Reply-To: <1497824156.09.0.152108719585.issue30699@psf.upfronthosting.co.za> Message-ID: <1509911837.75.0.912454111764.issue30699@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- keywords: +patch pull_requests: +4253 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 5 14:58:56 2017 From: report at bugs.python.org (Mario Corchero) Date: Sun, 05 Nov 2017 19:58:56 +0000 Subject: [docs] [issue30699] Misleading class names in datetime.tzinfo usage examples In-Reply-To: <1497824156.09.0.152108719585.issue30699@psf.upfronthosting.co.za> Message-ID: <1509911936.1.0.912454111764.issue30699@psf.upfronthosting.co.za> Change by Mario Corchero : ---------- nosy: +mariocj89 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 5 21:26:50 2017 From: report at bugs.python.org (Jean-Philippe Ouellet) Date: Mon, 06 Nov 2017 02:26:50 +0000 Subject: [docs] [issue31953] Dedicated place for security announcements? Message-ID: <1509935210.34.0.213398074469.issue31953@psf.upfronthosting.co.za> New submission from Jean-Philippe Ouellet : Hello, My apologies if this is not the right place to discus this. I would like to ensure that I stay informed of any potential future security issues in python (specifically at least the cpython runtime and standard library, although select very-popular 3rd party libraries wouldn't hurt). I cannot find a single place where such announcements are guaranteed to land. Good examples of the type of thing I am looking for are the openssl-announce list [1][2] and the golang-announce list [3], where the projects pre-announce "Hey, we're going to have a release on which addresses a security issue in ." and then announces again when patches are available such that responsible maintainers (such as I am trying to be) can ensure that updates are available to our users ASAP. The python-announce-list [4] does not serve this purpose because it has lots of noise from initial release announcements about random 3rd party stuff, and the "security news" page [5] is really just a "how to disclose vulns" page. Note that I'm *not* advocating for the creation of a pre-disclosure list! Python is such a ubiquitous piece of software that I don't think it's reasonable to expect that such a list could contain all affected parties without also leaking details to those who would cause harm. I'm only asking for something public that I can subscribe to in order to be sure I'll have a heads up of when patching is imminently required. Regards, Jean-Philippe (a contributor to the Qubes OS project [6] whose security relies mostly on Python's and Xen's - and is on Xen's pre-disclosure list) [1]: https://mta.openssl.org/pipermail/openssl-announce/2017-October/thread.html [2]: https://mta.openssl.org/pipermail/openssl-announce/2017-November/thread.html [3]: https://groups.google.com/forum/#!forum/golang-announce [4]: https://mail.python.org/mailman/listinfo/python-announce-list [5]: https://www.python.org/news/security/ [6]: https://www.qubes-os.org/ ---------- assignee: docs at python components: Documentation, email messages: 305614 nosy: barry, docs at python, jpo, r.david.murray priority: normal severity: normal status: open title: Dedicated place for security announcements? type: security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 5 21:58:35 2017 From: report at bugs.python.org (Martin Panter) Date: Mon, 06 Nov 2017 02:58:35 +0000 Subject: [docs] [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1509937115.24.0.213398074469.issue29710@psf.upfronthosting.co.za> Martin Panter added the comment: I find the model in terms of ?bit_length? hard to understand. You have to understand what bit_length returns, and why you added 1. Bit_length is awkward for negative numbers. It only uses the absolute value, which would give off-by-one problems with negative values, so I guess you added 1 to compensate. I understand the bitwise operations as using two?s complement extended to an unlimited width, so that negative values have a series of ones for the most-significant bits. I presume this is what your ?2-adic representation? is. Having this spelled out may have helped when I was learning Python. ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 5 22:14:15 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Mon, 06 Nov 2017 03:14:15 +0000 Subject: [docs] [issue31953] Dedicated place for security announcements? In-Reply-To: <1509935210.34.0.213398074469.issue31953@psf.upfronthosting.co.za> Message-ID: <1509938055.74.0.213398074469.issue31953@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: There is Security SIG mailing list, please check it out: https://mail.python.org/mm3/archives/list/security-sig at python.org/ ---------- nosy: +Mariatta resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 5 23:03:28 2017 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 06 Nov 2017 04:03:28 +0000 Subject: [docs] [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1509941008.01.0.213398074469.issue29710@psf.upfronthosting.co.za> Nick Coghlan added the comment: Right, and that's why I think we're better off focusing on the arithmetic explanations wherever they apply. The problem is that for "x | y" and "x & y" there's no avoiding discussing the 2's complement representation. Martin, would you find the reference to `bit_length()` in the current PR easier to follow if it had a second follow-up sentence like the one below: === Bitwise binary operations are semantically equivalent to calculations using 2's complement in a bit-width of ``1 + max(x.bit_length(), y .bit_length()``. This choice of bit-width ensures there is sufficient space for the absolute value of both operands, while also providing space for an explicit sign bit (representing the conceptually infinite series of zeros or ones at the left of a 2's complement value). === That retains the precision of the currently suggested definition (for the benefit of language implementors), but also spells out the rationale for that definition (the "1 +" is for the sign bit, while the abs() is implicit in the fact that bit_length() assumes 2's complement and hence doesn't allow space for an explicit sign bit). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 6 03:56:31 2017 From: report at bugs.python.org (Jean-Philippe Ouellet) Date: Mon, 06 Nov 2017 08:56:31 +0000 Subject: [docs] [issue31953] Dedicated place for security announcements? In-Reply-To: <1509935210.34.0.213398074469.issue31953@psf.upfronthosting.co.za> Message-ID: <1509958591.91.0.213398074469.issue31953@psf.upfronthosting.co.za> Jean-Philippe Ouellet added the comment: Ah, I now see there actually *is* a security-announce list [1]! Unless one happens to already know that Python has two concurrent mailman instances hosting different lists [2][3], it's easy to miss. Thanks, and sorry for the noise! [1]: https://mail.python.org/mm3/archives/list/security-announce at python.org/ [2]: https://mail.python.org/mm3/archives/ [3]: https://mail.python.org/mailman/listinfo ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 6 08:29:46 2017 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 06 Nov 2017 13:29:46 +0000 Subject: [docs] [issue29710] Incorrect representation caveat on bitwise operation docs In-Reply-To: <1488551919.31.0.20533072889.issue29710@psf.upfronthosting.co.za> Message-ID: <1509974986.43.0.213398074469.issue29710@psf.upfronthosting.co.za> Mark Dickinson added the comment: > ?Bitwise operations have the same result as calculations using two?s complement with a bit-width large enough to avoid overflows.? That sounds fine to me, but then, the original wording sounds fine to me now that I know how to read it. :-) The main issue here is making it clear that in "avoid overflow", we're talking about overflow incurred in representing a value in two's complement in the first place, as opposed to overflow of the operation itself. I'd go with something like the following (which evolved by successive refinement from Martin's suggestion): "Each bitwise operation has the same result as though carried out in two's complement using a bit-width that's large enough to represent the inputs." > I presume this is what your ?2-adic representation? is. Yes, exactly. Without invoking 2-adic numbers, which is a bit of overkill, there's a natural one-to-one correspondence between (a) integers, and (b) (singly) infinite bit strings, extending infinitely to the left, in which either all but finitely many bits are zero, or all but finitely many bits are one. In the domain (b), the bitwise operations have their obvious bitwise meanings; translating via the correspondence gives us the corresponding definitions of the bitwise operations on (a). For the correspondence: going from (a) to (b): take an integer n, then for each k >= 0 reduce n modulo 2^k to get a length-k bit string. Now it's easy to see that the length-k bit strings are all compatible with one another, in the sense that they all agree with each other when right-aligned, so you naturally get an infinite-length bit string that's eventually either all 1s (for negative n) or all zeros (for nonnegative n). Going back from (b) to (a): it's not hard to convince yourself that the map above is one-to-one and onto, but then you miss out on a beautiful description of the inverse map: given an infinite bit-string indexed as below, with b_0 the least significant bit: ... b_{k+1} b_k b_{k-1} ... b_2 b_1 b_0 we simply map that bit string to the integer n = sum_{i>=0} b_i * 2**i Of course the RHS of the above is an infinite sum, so a priori doesn't make sense. If almost all the bits are zeros, it becomes a finite sum and everything's okay. If almost all the bits are ones, you can either (i) introduce the 2-adic topology on the integers and point out that it still converges in that topology, so that everything has a sound mathematical footing, or (ii) just use the "trick" that 1 + 2 + 4 + 8 + 16 + ... = -1, which more-or-less amounts to the same thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 6 08:47:34 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 06 Nov 2017 13:47:34 +0000 Subject: [docs] [issue30699] Misleading class names in datetime.tzinfo usage examples In-Reply-To: <1497824156.09.0.152108719585.issue30699@psf.upfronthosting.co.za> Message-ID: <1509976054.67.0.912454111764.issue30699@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 6 11:30:39 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Nov 2017 16:30:39 +0000 Subject: [docs] [issue31948] [EASY] Broken MSDN links in msilib docs In-Reply-To: <1509882567.57.0.213398074469.issue31948@psf.upfronthosting.co.za> Message-ID: <1509985839.0.0.912454111764.issue31948@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- title: Broken MSDN links in msilib docs -> [EASY] Broken MSDN links in msilib docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 6 11:33:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Mon, 06 Nov 2017 16:33:04 +0000 Subject: [docs] [issue31942] Document that support of start and stop parameters in the Sequence's index() is optional In-Reply-To: <1509786601.53.0.213398074469.issue31942@psf.upfronthosting.co.za> Message-ID: <1509985984.79.0.213398074469.issue31942@psf.upfronthosting.co.za> STINNER Victor added the comment: See also bpo-31956: "Add start and stop parameters to the array.index()". ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 6 12:01:12 2017 From: report at bugs.python.org (Marat Sharafutdinov) Date: Mon, 06 Nov 2017 17:01:12 +0000 Subject: [docs] [issue31943] Add asyncio.Handle.cancelled() method In-Reply-To: <1509812825.97.0.213398074469.issue31943@psf.upfronthosting.co.za> Message-ID: <1509987672.21.0.912454111764.issue31943@psf.upfronthosting.co.za> Change by Marat Sharafutdinov : ---------- title: Add asyncio.Handle.cancelled() and asyncio.TimerHandle.when -> Add asyncio.Handle.cancelled() method _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 00:36:04 2017 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 07 Nov 2017 05:36:04 +0000 Subject: [docs] [issue31950] Default event loop policy doc lacks precision In-Reply-To: <1509905769.74.0.213398074469.issue31950@psf.upfronthosting.co.za> Message-ID: <1510032964.1.0.213398074469.issue31950@psf.upfronthosting.co.za> Guido van Rossum added the comment: Agreed that this needs more clarification. Is something stopping you from submitting a PR? Note that the thing about non-main-threads is mentioned in the docstring for BaseDefaultEventLoopPolicy. I agree that the best way to create a new policy is to study the existing code and subclass DefaultEventLoopPolicy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 03:44:51 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 07 Nov 2017 08:44:51 +0000 Subject: [docs] [issue31950] Default event loop policy doc lacks precision In-Reply-To: <1509905769.74.0.213398074469.issue31950@psf.upfronthosting.co.za> Message-ID: <1510044291.18.0.912454111764.issue31950@psf.upfronthosting.co.za> Change by Antoine Pitrou : ---------- keywords: +patch pull_requests: +4269 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 04:26:39 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 07 Nov 2017 09:26:39 +0000 Subject: [docs] [issue31950] Default event loop policy doc lacks precision In-Reply-To: <1509905769.74.0.213398074469.issue31950@psf.upfronthosting.co.za> Message-ID: <1510046799.93.0.213398074469.issue31950@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset 4135c89395726024abddb7340a0c7a42c801f616 by Antoine Pitrou in branch 'master': bpo-31950: Improve event loop policy doc (#4306) https://github.com/python/cpython/commit/4135c89395726024abddb7340a0c7a42c801f616 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 04:26:47 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 07 Nov 2017 09:26:47 +0000 Subject: [docs] [issue31950] Default event loop policy doc lacks precision In-Reply-To: <1509905769.74.0.213398074469.issue31950@psf.upfronthosting.co.za> Message-ID: <1510046807.37.0.912454111764.issue31950@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4270 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 04:34:49 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 07 Nov 2017 09:34:49 +0000 Subject: [docs] [issue31950] Default event loop policy doc lacks precision In-Reply-To: <1509905769.74.0.213398074469.issue31950@psf.upfronthosting.co.za> Message-ID: <1510047289.63.0.213398074469.issue31950@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New changeset e65617f65e203a2a6d3e3100d0d6fed0ffa0613d by Antoine Pitrou (Miss Islington (bot)) in branch '3.6': bpo-31950: Improve event loop policy doc (GH-4306) (#4307) https://github.com/python/cpython/commit/e65617f65e203a2a6d3e3100d0d6fed0ffa0613d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 04:35:23 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 07 Nov 2017 09:35:23 +0000 Subject: [docs] [issue31950] Default event loop policy doc lacks precision In-Reply-To: <1509905769.74.0.213398074469.issue31950@psf.upfronthosting.co.za> Message-ID: <1510047323.21.0.213398074469.issue31950@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you Guido. This is fixed now. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 07:57:38 2017 From: report at bugs.python.org (R. David Murray) Date: Tue, 07 Nov 2017 12:57:38 +0000 Subject: [docs] [issue31968] exec(): method's default arguments from dict-inherited globals In-Reply-To: <1510058956.93.0.213398074469.issue31968@psf.upfronthosting.co.za> Message-ID: <1510059458.28.0.213398074469.issue31968@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, that's the way it works (and is intended to work, for performance reasons). The documentation on this could be improved...while it does say globals must be a dict and that locals can be any mapping object, it does it in a sentence that is a bit confusing in this context, and it doesn't make it clear that it has to be a "real" dict, not a subclass. (I wouldn't be surprised if that sentence was written back when you couldn't subclass dict.) ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, r.david.murray versions: +Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 08:15:48 2017 From: report at bugs.python.org (Ilya Polyakovskiy) Date: Tue, 07 Nov 2017 13:15:48 +0000 Subject: [docs] [issue31968] exec(): method's default arguments from dict-inherited globals In-Reply-To: <1510058956.93.0.213398074469.issue31968@psf.upfronthosting.co.za> Message-ID: <1510060548.71.0.912454111764.issue31968@psf.upfronthosting.co.za> Change by Ilya Polyakovskiy : ---------- keywords: +patch pull_requests: +4272 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 08:30:00 2017 From: report at bugs.python.org (Ilya Polyakovskiy) Date: Tue, 07 Nov 2017 13:30:00 +0000 Subject: [docs] [issue31968] exec(): method's default arguments from dict-inherited globals In-Reply-To: <1510058956.93.0.213398074469.issue31968@psf.upfronthosting.co.za> Message-ID: <1510061400.74.0.912454111764.issue31968@psf.upfronthosting.co.za> Change by Ilya Polyakovskiy : ---------- pull_requests: +4274 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 11:46:56 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 07 Nov 2017 16:46:56 +0000 Subject: [docs] [issue31793] Allow to specialize smart quotes in documentation translations In-Reply-To: <1508060988.99.0.213398074469.issue31793@psf.upfronthosting.co.za> Message-ID: <1510073215.89.0.213398074469.issue31793@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 5a66c8a64d180b5f3c80307924adaec53cc8faa3 by INADA Naoki (Julien Palard) in branch 'master': bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006) https://github.com/python/cpython/commit/5a66c8a64d180b5f3c80307924adaec53cc8faa3 ---------- nosy: +inada.naoki _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 11:48:15 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 07 Nov 2017 16:48:15 +0000 Subject: [docs] [issue31793] Allow to specialize smart quotes in documentation translations In-Reply-To: <1508060988.99.0.213398074469.issue31793@psf.upfronthosting.co.za> Message-ID: <1510073295.0.0.912454111764.issue31793@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4281 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 11:49:13 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 07 Nov 2017 16:49:13 +0000 Subject: [docs] [issue31793] Allow to specialize smart quotes in documentation translations In-Reply-To: <1508060988.99.0.213398074469.issue31793@psf.upfronthosting.co.za> Message-ID: <1510073353.96.0.912454111764.issue31793@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4282 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 11:53:26 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 07 Nov 2017 16:53:26 +0000 Subject: [docs] [issue31793] Allow to specialize smart quotes in documentation translations In-Reply-To: <1508060988.99.0.213398074469.issue31793@psf.upfronthosting.co.za> Message-ID: <1510073606.22.0.213398074469.issue31793@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 47eaaa55247b6ad8ae507c0048509c2e3db79bf0 by INADA Naoki (Miss Islington (bot)) in branch '2.7': bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006) https://github.com/python/cpython/commit/47eaaa55247b6ad8ae507c0048509c2e3db79bf0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 11:55:11 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 07 Nov 2017 16:55:11 +0000 Subject: [docs] [issue31793] Allow to specialize smart quotes in documentation translations In-Reply-To: <1508060988.99.0.213398074469.issue31793@psf.upfronthosting.co.za> Message-ID: <1510073711.49.0.213398074469.issue31793@psf.upfronthosting.co.za> INADA Naoki added the comment: New changeset 64f10492dcda4117ac06399ae46ab645cb09b19e by INADA Naoki (Miss Islington (bot)) in branch '3.6': bpo-31793: Doc: Specialize smart-quotes for Japanese (GH-4006) https://github.com/python/cpython/commit/64f10492dcda4117ac06399ae46ab645cb09b19e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 11:59:15 2017 From: report at bugs.python.org (INADA Naoki) Date: Tue, 07 Nov 2017 16:59:15 +0000 Subject: [docs] [issue31793] Allow to specialize smart quotes in documentation translations In-Reply-To: <1508060988.99.0.213398074469.issue31793@psf.upfronthosting.co.za> Message-ID: <1510073955.31.0.213398074469.issue31793@psf.upfronthosting.co.za> INADA Naoki added the comment: Thanks, Julien. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 12:28:53 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 07 Nov 2017 17:28:53 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1510075732.97.0.213398074469.issue31937@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks Raymond. +1 for adding the above list. I don't think FAQ is the right place either, I prefer we don't have to add the entries in the form of questions & answers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 15:18:31 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 07 Nov 2017 20:18:31 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1510085911.95.0.213398074469.issue31937@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed with Raymond that Python folk terminology should not go into the glossary. I don't think I ever say "dunder" myself. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 15:56:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 07 Nov 2017 20:56:52 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1510088212.88.0.213398074469.issue31937@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I never seen terms like "stir" or "inker", but the term "dunder" is used pretty widely. The glossary already contains abbreviations and Python folk terminology like EAFP and BDFL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 16:43:14 2017 From: report at bugs.python.org (Berker Peksag) Date: Tue, 07 Nov 2017 21:43:14 +0000 Subject: [docs] [issue31824] Missing default argument detail in documentation of StreamReaderWriter In-Reply-To: <1508455062.42.0.213398074469.issue31824@psf.upfronthosting.co.za> Message-ID: <1510090994.88.0.213398074469.issue31824@psf.upfronthosting.co.za> Berker Peksag added the comment: For those who want to work on this issue: codecs.StreamReaderWriter documentation is located at Doc/library/codecs.rst. ---------- keywords: +easy nosy: +berker.peksag stage: -> needs patch versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 7 17:44:49 2017 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Tue, 07 Nov 2017 22:44:49 +0000 Subject: [docs] [issue31824] Missing default argument detail in documentation of StreamReaderWriter In-Reply-To: <1508455062.42.0.213398074469.issue31824@psf.upfronthosting.co.za> Message-ID: <1510094689.65.0.912454111764.issue31824@psf.upfronthosting.co.za> Change by Pablo Galindo Salgado : ---------- keywords: +patch pull_requests: +4284 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 03:54:42 2017 From: report at bugs.python.org (Tom Floyer) Date: Wed, 08 Nov 2017 08:54:42 +0000 Subject: [docs] [issue31811] async and await missing from keyword list in lexical analysis doc In-Reply-To: <1508340723.02.0.213398074469.issue31811@psf.upfronthosting.co.za> Message-ID: <1510131282.18.0.912454111764.issue31811@psf.upfronthosting.co.za> Change by Tom Floyer : ---------- pull_requests: -4095 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 04:32:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Nov 2017 09:32:03 +0000 Subject: [docs] [issue31972] Inherited docstrings for pathlib classes are confusing In-Reply-To: <1510081543.19.0.213398074469.issue31972@psf.upfronthosting.co.za> Message-ID: <1510133523.29.0.912454111764.issue31972@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 07:59:23 2017 From: report at bugs.python.org (Mikey D) Date: Wed, 08 Nov 2017 12:59:23 +0000 Subject: [docs] [issue31981] os.mkdirs does not exist on 2.7.5+ Message-ID: <1510145963.34.0.213398074469.issue31981@psf.upfronthosting.co.za> New submission from Mikey D : https://docs.python.org/2/library/os.html os.mkdirs('/tmp/folder') AttributeError: 'module' object has no attribute 'mkdirs'' os.makedirs('/tmp/folder') os.path.isdir('/tmp/folder') True ---------- assignee: docs at python components: Documentation messages: 305826 nosy: Mikey D, docs at python priority: normal severity: normal status: open title: os.mkdirs does not exist on 2.7.5+ versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 08:03:28 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Nov 2017 13:03:28 +0000 Subject: [docs] [issue31981] os.mkdirs does not exist on 2.7.5+ In-Reply-To: <1510145963.34.0.213398074469.issue31981@psf.upfronthosting.co.za> Message-ID: <1510146208.59.0.213398074469.issue31981@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, os.mkdirs does not exist. What is your issue Mikey? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 08:03:43 2017 From: report at bugs.python.org (Mikey D) Date: Wed, 08 Nov 2017 13:03:43 +0000 Subject: [docs] [issue31981] os.mkdirs does not exist on 2.7.5+ In-Reply-To: <1510145963.34.0.213398074469.issue31981@psf.upfronthosting.co.za> Message-ID: Mikey D added the comment: Forgot to add, python 2.7.5 python-2.7.5-48.el7.x86_64 (RHEL 7.3) On Wed, Nov 8, 2017 at 7:59 AM, Mikey D wrote: > > New submission from Mikey D : > > https://docs.python.org/2/library/os.html > > os.mkdirs('/tmp/folder') > AttributeError: 'module' object has no attribute 'mkdirs'' > > os.makedirs('/tmp/folder') > os.path.isdir('/tmp/folder') > True > > ---------- > assignee: docs at python > components: Documentation > messages: 305826 > nosy: Mikey D, docs at python > priority: normal > severity: normal > status: open > title: os.mkdirs does not exist on 2.7.5+ > versions: Python 2.7 > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 08:05:35 2017 From: report at bugs.python.org (Mikey D) Date: Wed, 08 Nov 2017 13:05:35 +0000 Subject: [docs] [issue31981] os.mkdirs does not exist on 2.7.5+ In-Reply-To: <1510146208.59.0.213398074469.issue31981@psf.upfronthosting.co.za> Message-ID: Mikey D added the comment: Bah, I need more coffee... sorry! I though I saw "mkdirs" on that page. Please close. On Wed, Nov 8, 2017 at 8:03 AM, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Yes, os.mkdirs does not exist. What is your issue Mikey? > > ---------- > nosy: +serhiy.storchaka > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 08:06:59 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Nov 2017 13:06:59 +0000 Subject: [docs] [issue31981] os.mkdirs does not exist on 2.7.5+ In-Reply-To: <1510145963.34.0.213398074469.issue31981@psf.upfronthosting.co.za> Message-ID: <1510146419.93.0.213398074469.issue31981@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No problem. ;) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 10:17:58 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 08 Nov 2017 15:17:58 +0000 Subject: [docs] [issue11253] Document ctypes.wintypes constants In-Reply-To: <1298182426.14.0.687578094658.issue11253@psf.upfronthosting.co.za> Message-ID: <1510154278.03.0.912454111764.issue11253@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- stage: -> needs patch title: autodocument first appearance of ctypes.wintypes constants -> Document ctypes.wintypes constants type: -> enhancement versions: +Python 3.6, Python 3.7 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 10:26:05 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 08 Nov 2017 15:26:05 +0000 Subject: [docs] [issue31824] Missing default argument detail in documentation of StreamReaderWriter In-Reply-To: <1508455062.42.0.213398074469.issue31824@psf.upfronthosting.co.za> Message-ID: <1510154765.02.0.213398074469.issue31824@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the PR, Pablo. I think we can make the same change to StreamRecoder documentation too: https://docs.python.org/3/library/codecs.html#codecs.StreamRecoder ---------- nosy: +pablogsal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 10:51:21 2017 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 08 Nov 2017 15:51:21 +0000 Subject: [docs] [issue29179] Py_UNUSED is not documented In-Reply-To: <1483712936.43.0.521596791461.issue29179@psf.upfronthosting.co.za> Message-ID: <1510156281.04.0.213398074469.issue29179@psf.upfronthosting.co.za> Petr Viktorin added the comment: Since the macro has a public name and is used in the wild outside CPython, I'll go ahead and submit a pull request documenting it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 10:51:37 2017 From: report at bugs.python.org (Petr Viktorin) Date: Wed, 08 Nov 2017 15:51:37 +0000 Subject: [docs] [issue29179] Py_UNUSED is not documented In-Reply-To: <1483712936.43.0.521596791461.issue29179@psf.upfronthosting.co.za> Message-ID: <1510156297.12.0.912454111764.issue29179@psf.upfronthosting.co.za> Change by Petr Viktorin : ---------- keywords: +patch pull_requests: +4295 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 10:59:23 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Nov 2017 15:59:23 +0000 Subject: [docs] [issue29179] Py_UNUSED is not documented In-Reply-To: <1483712936.43.0.521596791461.issue29179@psf.upfronthosting.co.za> Message-ID: <1510156763.87.0.912454111764.issue29179@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 2138163621196a186975796afb2b0a6aa335231d by Victor Stinner (Petr Viktorin) in branch 'master': bpo-29179: Document the Py_UNUSED macro (#4341) https://github.com/python/cpython/commit/2138163621196a186975796afb2b0a6aa335231d ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 10:59:50 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Nov 2017 15:59:50 +0000 Subject: [docs] [issue29179] Py_UNUSED is not documented In-Reply-To: <1483712936.43.0.521596791461.issue29179@psf.upfronthosting.co.za> Message-ID: <1510156790.64.0.912454111764.issue29179@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 11:00:04 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Nov 2017 16:00:04 +0000 Subject: [docs] [issue29179] Py_UNUSED is not documented In-Reply-To: <1483712936.43.0.521596791461.issue29179@psf.upfronthosting.co.za> Message-ID: <1510156804.15.0.213398074469.issue29179@psf.upfronthosting.co.za> STINNER Victor added the comment: Thank you Petr for your PR! I merged it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 11:10:51 2017 From: report at bugs.python.org (Sasha Kacanski) Date: Wed, 08 Nov 2017 16:10:51 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlMzE5ODJdIDguMy4gY29sbGVjdGlvbnMg4oCU?= =?utf-8?q?_Container_datatypes?= Message-ID: <1510157451.94.0.213398074469.issue31982@psf.upfronthosting.co.za> New submission from Sasha Kacanski : Hi, In ChainMap example c = ChainMap() # Create root context d = c.new_child() # Create nested child context e = c.new_child() # Child of c, independent from d e.maps[0] # Current context dictionary -- like Python's locals() e.maps[-1] # Root context -- like Python's globals() e.parents # Enclosing context chain -- like Python's nonlocals d['x'] # Get first key in the chain of contexts d['x'] = 1 # Set value in current context d['x'] - will raise key does not exist error so simple fix is to flip last two lines... I know, possibly anal but look love Python and would like to help new folks to not get confused if they play with example in cPython shell... --best ---------- assignee: docs at python components: Documentation messages: 305876 nosy: Sasha Kacanski, docs at python priority: normal severity: normal status: open title: 8.3. collections ? Container datatypes versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 11:24:41 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Nov 2017 16:24:41 +0000 Subject: [docs] [issue31983] Officially add Py_SETREF and Py_XSETREF Message-ID: <1510158281.4.0.213398074469.issue31983@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : Private macros Py_SETREF and Py_XSETREF were introduced in 3.6 and backported to all maintained versions for fixing bugs (see issue20440 and issue26200). They are helpful and used not only for the primary purpose, but also for simplifying the code. Their names don't start from underscore because I planned to make them public and didn't want massive renaming and backporting conflicts. Now I think it is a time to add them officially to the stable C API. ---------- assignee: docs at python components: Documentation, Interpreter Core messages: 305878 nosy: docs at python, serhiy.storchaka priority: normal severity: normal status: open title: Officially add Py_SETREF and Py_XSETREF type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 11:25:17 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Nov 2017 16:25:17 +0000 Subject: [docs] [issue31983] Officially add Py_SETREF and Py_XSETREF In-Reply-To: <1510158281.4.0.213398074469.issue31983@psf.upfronthosting.co.za> Message-ID: <1510158317.55.0.912454111764.issue31983@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 12:31:51 2017 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 08 Nov 2017 17:31:51 +0000 Subject: [docs] [issue31811] async and await missing from keyword list in lexical analysis doc In-Reply-To: <1508340723.02.0.213398074469.issue31811@psf.upfronthosting.co.za> Message-ID: <1510162311.75.0.912454111764.issue31811@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 12:43:42 2017 From: report at bugs.python.org (STINNER Victor) Date: Wed, 08 Nov 2017 17:43:42 +0000 Subject: [docs] [issue31811] async and await missing from keyword list in lexical analysis doc In-Reply-To: <1508340723.02.0.213398074469.issue31811@psf.upfronthosting.co.za> Message-ID: <1510163022.65.0.213398074469.issue31811@psf.upfronthosting.co.za> STINNER Victor added the comment: The final commit uses the wrong bpo number: New changeset bf9d317626eebcf79bd0756b4dd43df82d5cc186 by Yury Selivanov (Tom Floyer) in branch 'master': bpo-31810: added missing keywords to docs. (#4140) https://github.com/python/cpython/commit/bf9d317626eebcf79bd0756b4dd43df82d5cc186 ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 13:06:31 2017 From: report at bugs.python.org (Stefan Krah) Date: Wed, 08 Nov 2017 18:06:31 +0000 Subject: [docs] [issue31983] Officially add Py_SETREF and Py_XSETREF In-Reply-To: <1510158281.4.0.213398074469.issue31983@psf.upfronthosting.co.za> Message-ID: <1510164391.64.0.213398074469.issue31983@psf.upfronthosting.co.za> Stefan Krah added the comment: Just adding +1. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 13:48:02 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 08 Nov 2017 18:48:02 +0000 Subject: [docs] [issue31983] Officially add Py_SETREF and Py_XSETREF In-Reply-To: <1510158281.4.0.213398074469.issue31983@psf.upfronthosting.co.za> Message-ID: <1510166882.48.0.213398074469.issue31983@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Does anyone want to propose a patch? This is mainly a documentation issue. Needed documenting Py_SETREF and Py_XSETREF in Doc/c-api/refcounting.rst, adding entries in Doc/whatsnew/3.7.rst, and "Misc/NEWS.d/next/C API/", and updating a guard in Include/object.h. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 15:41:45 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 08 Nov 2017 20:41:45 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlMzE5ODJdIDguMy4gY29sbGVjdGlvbnMg4oCU?= =?utf-8?q?_Container_datatypes?= In-Reply-To: <1510157451.94.0.213398074469.issue31982@psf.upfronthosting.co.za> Message-ID: <1510173705.12.0.213398074469.issue31982@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I will flip the two because there is not downside. However, the table of wasn't intended to be a sequential example (that's why there is no data or display of result). Instead, it was just meant to be table of typing-this-does-that. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 15:50:58 2017 From: report at bugs.python.org (Sasha Kacanski) Date: Wed, 08 Nov 2017 20:50:58 +0000 Subject: [docs] =?utf-8?b?W2lzc3VlMzE5ODJdIDguMy4gY29sbGVjdGlvbnMg4oCU?= =?utf-8?q?_Container_datatypes?= In-Reply-To: <1510173705.12.0.213398074469.issue31982@psf.upfronthosting.co.za> Message-ID: Sasha Kacanski added the comment: Agree, and I know. On Nov 8, 2017 3:41 PM, "Raymond Hettinger" wrote: > > Raymond Hettinger added the comment: > > I will flip the two because there is not downside. However, the table of > wasn't intended to be a sequential example (that's why there is no data or > display of result). Instead, it was just meant to be table of > typing-this-does-that. > > ---------- > assignee: docs at python -> rhettinger > nosy: +rhettinger > priority: normal -> low > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 8 22:58:32 2017 From: report at bugs.python.org (Caleb Hattingh) Date: Thu, 09 Nov 2017 03:58:32 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1510199912.42.0.213398074469.issue30487@psf.upfronthosting.co.za> Caleb Hattingh added the comment: I messed up the PR through a failed rebase (trying to rebase my PR on top of upstream). I closed the PR as a result. I have now fixed up my feature branch, but I have not resubmitted the PR. Since the PR was left alone for many months, I'm ok with leaving things as is, and close this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 9 00:04:05 2017 From: report at bugs.python.org (Zachary Ware) Date: Thu, 09 Nov 2017 05:04:05 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1510203845.23.0.213398074469.issue30487@psf.upfronthosting.co.za> Zachary Ware added the comment: You should be able to force-push your branch (`git push -f origin auto-venv-docbuilder`, or replace `origin` with the correct remote name) to fix the existing PR. Sorry I haven't gotten back to this previously; time to do a review and remembering that the PR exists have not coincided. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 9 03:59:31 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Nov 2017 08:59:31 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1510217971.91.0.912454111764.issue31937@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: docs at python -> fdrake nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 9 04:00:53 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 09 Nov 2017 09:00:53 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1510218053.69.0.213398074469.issue31937@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Recommend closing this and leaving it for StackOverflow. I really don't want to further garbage-up the glossary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 9 05:47:33 2017 From: report at bugs.python.org (Caleb Hattingh) Date: Thu, 09 Nov 2017 10:47:33 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1510224453.95.0.912454111764.issue30487@psf.upfronthosting.co.za> Change by Caleb Hattingh : ---------- keywords: +patch pull_requests: +4303 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 9 05:50:19 2017 From: report at bugs.python.org (Caleb Hattingh) Date: Thu, 09 Nov 2017 10:50:19 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1510224619.59.0.213398074469.issue30487@psf.upfronthosting.co.za> Caleb Hattingh added the comment: No worries. I've made a new PR 4346. The old one was unsalvagable I'm afraid. Too many other people got added to the notifications list as a result of my incorrect rebase. The new one is fine. ---------- _______________________________________ Python tracker _______________________________________ From yvalors at videotron.ca Wed Nov 8 18:40:10 2017 From: yvalors at videotron.ca (yves allard) Date: Wed, 8 Nov 2017 18:40:10 -0500 Subject: [docs] download of python french documentation gives an error 404 Message-ID: At the following link?: https://docs.python.org/fr/3/download.html I can?t dnload french doc on python in pdf format, get error http 404 (not found) I would appreciate very much to dnload the FRENCH docs Thank you for help ! Yves -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Thu Nov 9 12:42:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Nov 2017 17:42:57 +0000 Subject: [docs] [issue31778] ast.literal_eval supports non-literals in Python 3 In-Reply-To: <1507847478.46.0.213398074469.issue31778@psf.upfronthosting.co.za> Message-ID: <1510249377.69.0.213398074469.issue31778@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 9 13:15:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Nov 2017 18:15:51 +0000 Subject: [docs] [issue14124] _pickle.c comment/documentation improvement In-Reply-To: <1330203362.98.0.289163571674.issue14124@psf.upfronthosting.co.za> Message-ID: <1510251351.31.0.912454111764.issue14124@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> rejected stage: -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 9 14:06:10 2017 From: report at bugs.python.org (Alexander Mentis) Date: Thu, 09 Nov 2017 19:06:10 +0000 Subject: [docs] [issue31995] Set operations documentation error Message-ID: <1510254370.03.0.213398074469.issue31995@psf.upfronthosting.co.za> New submission from Alexander Mentis : Documentation for set/frozenset says |=, &=, -=, ^= operators do not apply to immutable instances of frozenset. This is incorrect. These operators can be used on frozenset; however, they behave differently on frozenset than on set. When used with set, they modify the target set in place. When used with frozenset, they return a new frozenset that replaces the target frozenset. ---------- assignee: docs at python components: Documentation messages: 305981 nosy: Alexander Mentis, docs at python priority: normal severity: normal status: open title: Set operations documentation error versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 9 14:08:35 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Nov 2017 19:08:35 +0000 Subject: [docs] [issue31995] Set operations documentation error In-Reply-To: <1510254370.03.0.213398074469.issue31995@psf.upfronthosting.co.za> Message-ID: <1510254515.36.0.912454111764.issue31995@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- nosy: +rhettinger, serhiy.storchaka versions: -Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 9 16:45:10 2017 From: report at bugs.python.org (Neil Schemenauer) Date: Thu, 09 Nov 2017 21:45:10 +0000 Subject: [docs] [issue31778] ast.literal_eval supports non-literals in Python 3 In-Reply-To: <1507847478.46.0.213398074469.issue31778@psf.upfronthosting.co.za> Message-ID: <1510263910.48.0.213398074469.issue31778@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Just a comment on what I guess is the intended use of literal_eval(), i.e. taking a potentially untrusted string and turning it into a Python object. Exposing the whole of the Python parser to potential attackers would make me very worried. Parsing code for all of Python syntax is just going to be very complicated and there can easily be bugs there. Generating an AST and then walking over it to see if it is safe is also scary. The "attack surface" is too large. This is similar to the Shellshock bug. If you can trust the supplier of the string then okay but I would guess that literal_eval() is going to get used for untrusted inputs. It would be really nice to have something like ast.literal_eval() that could be used for untrusted strings. I would implement it by writing a retricted parser. Keep it extremely simple. Validate it by heavy code reviews and extensive testing (e.g. fuzzing). ---------- nosy: +nascheme _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 9 18:34:14 2017 From: report at bugs.python.org (Luther Thompson) Date: Thu, 09 Nov 2017 23:34:14 +0000 Subject: [docs] [issue31996] `setuptools.setup` parameter `py_modules` is undocumented Message-ID: <1510270454.88.0.213398074469.issue31996@psf.upfronthosting.co.za> New submission from Luther Thompson : I wrote my own distribution package with only one module, but the module file was not being installed along with the dist info file. I found by looking up the code for the `six` module that `setup` has a `py_modules` parameter which apparently must be used to make the installation work. This module is not mentioned anywhere in https://packaging.python.org/tutorials/distributing-packages/. ---------- assignee: docs at python components: Documentation messages: 305997 nosy: Luther Thompson, docs at python priority: normal severity: normal status: open title: `setuptools.setup` parameter `py_modules` is undocumented type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 9 18:37:48 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 09 Nov 2017 23:37:48 +0000 Subject: [docs] [issue31996] `setuptools.setup` parameter `py_modules` is undocumented In-Reply-To: <1510270454.88.0.213398074469.issue31996@psf.upfronthosting.co.za> Message-ID: <1510270668.6.0.213398074469.issue31996@psf.upfronthosting.co.za> Berker Peksag added the comment: Thank you for your report, but the correct place to report issues with packaging.p.o is https://github.com/pypa/python-packaging-user-guide ---------- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 12:19:46 2017 From: report at bugs.python.org (Kevin Shweh) Date: Fri, 10 Nov 2017 17:19:46 +0000 Subject: [docs] [issue15606] re.VERBOSE whitespace behavior not completely documented In-Reply-To: <1344534617.67.0.49137100671.issue15606@psf.upfronthosting.co.za> Message-ID: <1510334386.09.0.213398074469.issue15606@psf.upfronthosting.co.za> Kevin Shweh added the comment: It looks to me like there are more situations than the patch lists where whitespace still separates tokens. For example, *? is a reluctant quantifier and * ? is a syntax error, even in verbose mode. ---------- nosy: +Kevin Shweh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 16:53:19 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Nov 2017 21:53:19 +0000 Subject: [docs] [issue15606] re.VERBOSE whitespace behavior not completely documented In-Reply-To: <1344534617.67.0.49137100671.issue15606@psf.upfronthosting.co.za> Message-ID: <1510350799.84.0.912454111764.issue15606@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- pull_requests: +4319 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 16:57:34 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Nov 2017 21:57:34 +0000 Subject: [docs] [issue15606] re.VERBOSE whitespace behavior not completely documented In-Reply-To: <1344534617.67.0.49137100671.issue15606@psf.upfronthosting.co.za> Message-ID: <1510351054.18.0.213398074469.issue15606@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Steven's patch is outdated since 71a0b43854164b6ada0026d90f241c987b54d019. But that commit missed that spaces are not ignored within tokens. PR 4366 fixes this by using the wording from Ezio's comments. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 17:14:45 2017 From: report at bugs.python.org (Pablo Galindo Salgado) Date: Fri, 10 Nov 2017 22:14:45 +0000 Subject: [docs] [issue31824] Missing default argument detail in documentation of StreamReaderWriter In-Reply-To: <1508455062.42.0.213398074469.issue31824@psf.upfronthosting.co.za> Message-ID: <1510352085.9.0.213398074469.issue31824@psf.upfronthosting.co.za> Pablo Galindo Salgado added the comment: I have updated the PR with the requested changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 18:05:18 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 10 Nov 2017 23:05:18 +0000 Subject: [docs] [issue31824] Missing default argument detail in documentation of StreamReaderWriter In-Reply-To: <1508455062.42.0.213398074469.issue31824@psf.upfronthosting.co.za> Message-ID: <1510355118.83.0.213398074469.issue31824@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset e184cfd7bf8bcfd160e3b611d4351ca3ce52d9e2 by Berker Peksag (Pablo Galindo) in branch 'master': bpo-31824: Document default value of 'errors' parameters (GH-4328) https://github.com/python/cpython/commit/e184cfd7bf8bcfd160e3b611d4351ca3ce52d9e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 18:06:22 2017 From: report at bugs.python.org (Roundup Robot) Date: Fri, 10 Nov 2017 23:06:22 +0000 Subject: [docs] [issue31824] Missing default argument detail in documentation of StreamReaderWriter In-Reply-To: <1508455062.42.0.213398074469.issue31824@psf.upfronthosting.co.za> Message-ID: <1510355182.27.0.912454111764.issue31824@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4320 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 18:14:02 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 10 Nov 2017 23:14:02 +0000 Subject: [docs] [issue31824] Missing default argument detail in documentation of StreamReaderWriter In-Reply-To: <1508455062.42.0.213398074469.issue31824@psf.upfronthosting.co.za> Message-ID: <1510355642.06.0.213398074469.issue31824@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 7abbddd88d4debe75b201145b6212afb7d93c457 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-31824: Document default value of 'errors' parameters (GH-4328) https://github.com/python/cpython/commit/7abbddd88d4debe75b201145b6212afb7d93c457 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 18:14:37 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 10 Nov 2017 23:14:37 +0000 Subject: [docs] [issue31824] Missing default argument detail in documentation of StreamReaderWriter In-Reply-To: <1508455062.42.0.213398074469.issue31824@psf.upfronthosting.co.za> Message-ID: <1510355677.44.0.213398074469.issue31824@psf.upfronthosting.co.za> Berker Peksag added the comment: Thank you, Peter and Pablo. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 18:31:04 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 10 Nov 2017 23:31:04 +0000 Subject: [docs] [issue31995] Set operations documentation error In-Reply-To: <1510254370.03.0.213398074469.issue31995@psf.upfronthosting.co.za> Message-ID: <1510356664.41.0.213398074469.issue31995@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is an artifact of how in-place operators work (which is a topic covered in the Library Reference). It doesn't really have anything to do with frozensets specifically. For example, you see the same effect with tuples which like frozensets are immutable and do not implement any of the in-place dunder methods: >>> s = ('a', 'b', 'c') >>> s += ('d', 'e') >>> s ('a', 'b', 'c', 'd', 'e') IIRC, this is the first time this has come-up in the 15 year history of sets, so I don't think there is a real problem to be solved. At best, this should be a FAQ entry or relegated to StackOverflow. I would prefer not to alter the set documentation because doing so would likely create confusion rather than solve it. ---------- assignee: docs at python -> rhettinger resolution: -> rejected stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 18:56:52 2017 From: report at bugs.python.org (Alexander Mentis) Date: Fri, 10 Nov 2017 23:56:52 +0000 Subject: [docs] [issue31995] Set operations documentation error In-Reply-To: <1510254370.03.0.213398074469.issue31995@psf.upfronthosting.co.za> Message-ID: <1510358212.09.0.213398074469.issue31995@psf.upfronthosting.co.za> Alexander Mentis added the comment: I don't think you understood my bug. That the augmented assignment operators work differently for set and frozenset is not the issue. The issue is that the documentation says that the |=, &=, -=, ^= operators do not apply to immutable instances of frozenset. This is incorrect. ---------- resolution: rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 19:06:00 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 11 Nov 2017 00:06:00 +0000 Subject: [docs] [issue31995] Set operations documentation error In-Reply-To: <1510254370.03.0.213398074469.issue31995@psf.upfronthosting.co.za> Message-ID: <1510358760.84.0.213398074469.issue31995@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I did understand your report. IMO your "declaration of incorrectness" is due to an overly strict misreading of what the docs are trying to say and it does not reflect an understanding of what the in-place operators do in-general. We could write an extra paragraph in the set documentation on this topic; however, I believe it would create confusion where none currently exists (i.e. no reported issues for 15+ years). Also the discussion is somewhat generic to any type that doesn't specifically implement in-place operators. In other words, I prefer to leave the doc as-is. ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 19:06:21 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 11 Nov 2017 00:06:21 +0000 Subject: [docs] [issue31995] Set operations documentation error In-Reply-To: <1510254370.03.0.213398074469.issue31995@psf.upfronthosting.co.za> Message-ID: <1510358781.08.0.912454111764.issue31995@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: -> rhettinger priority: normal -> low resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 19:06:48 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 11 Nov 2017 00:06:48 +0000 Subject: [docs] [issue31995] Set operations documentation error In-Reply-To: <1510254370.03.0.213398074469.issue31995@psf.upfronthosting.co.za> Message-ID: <1510358808.45.0.912454111764.issue31995@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 10 19:10:10 2017 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 11 Nov 2017 00:10:10 +0000 Subject: [docs] [issue32006] multiprocessing.Array 'c' code is not documented Message-ID: <1510359010.74.0.213398074469.issue32006@psf.upfronthosting.co.za> New submission from Steven D'Aprano : multiprocessing.Array is documented as taking the same character codes as array.array, but it also takes 'c' which is not documented. https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Array https://docs.python.org/3/library/array.html#module-array ---------- assignee: docs at python components: Documentation messages: 306069 nosy: docs at python, steven.daprano priority: normal severity: normal status: open title: multiprocessing.Array 'c' code is not documented type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 11 01:25:32 2017 From: report at bugs.python.org (Luther Thompson) Date: Sat, 11 Nov 2017 06:25:32 +0000 Subject: [docs] [issue31996] `setuptools.setup` parameter `py_modules` is undocumented In-Reply-To: <1510270454.88.0.213398074469.issue31996@psf.upfronthosting.co.za> Message-ID: <1510381532.53.0.213398074469.issue31996@psf.upfronthosting.co.za> Luther Thompson added the comment: Thanks, done: https://github.com/pypa/python-packaging-user-guide/issues/397 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 11 14:36:05 2017 From: report at bugs.python.org (Kurt Roeckx) Date: Sat, 11 Nov 2017 19:36:05 +0000 Subject: [docs] [issue32008] Example suggest to use a TLSv1 socket Message-ID: <1510428965.62.0.213398074469.issue32008@psf.upfronthosting.co.za> New submission from Kurt Roeckx : Here: https://docs.python.org/3/library/ssl.html#ssl.SSLContext.check_hostname And here: https://docs.python.org/2/library/ssl.html#ssl.SSLContext.check_hostname It uses ssl.PROTOCOL_TLSv1, which is a bad example. Please change it to PROTOCOL_SSLv23 or PROTOCOL_TLS. (Those were the first 2 examples I could find via google on how to create an ssl connection using python.) ---------- assignee: docs at python components: Documentation messages: 306093 nosy: docs at python, kroeckx priority: normal severity: normal status: open title: Example suggest to use a TLSv1 socket type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 12 06:21:46 2017 From: report at bugs.python.org (Nitish) Date: Sun, 12 Nov 2017 11:21:46 +0000 Subject: [docs] [issue28197] Add start and stop parameters to the range.index() ABC method In-Reply-To: <1474231832.91.0.157673750963.issue28197@psf.upfronthosting.co.za> Message-ID: <1510485706.18.0.912454111764.issue28197@psf.upfronthosting.co.za> Change by Nitish : ---------- keywords: +patch pull_requests: +4326 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 13 02:01:13 2017 From: report at bugs.python.org (Akash Jain) Date: Mon, 13 Nov 2017 07:01:13 +0000 Subject: [docs] [issue31948] [EASY] Broken MSDN links in msilib docs In-Reply-To: <1509882567.57.0.213398074469.issue31948@psf.upfronthosting.co.za> Message-ID: <1510556473.81.0.213398074469.issue31948@psf.upfronthosting.co.za> Akash Jain added the comment: Hi, I am new to contributing in Python, Can I work on this issue? ---------- nosy: +Akash Jain _______________________________________ Python tracker _______________________________________ From CToscher at baronfinance.com Thu Nov 9 11:13:59 2017 From: CToscher at baronfinance.com (Colton Toscher) Date: Thu, 9 Nov 2017 16:13:59 +0000 Subject: [docs] Regex documentation terminology correction Message-ID: The documentation for regex mentions (multiple times) ?qualifiers?. In regex, these are actually called ?quantifiers?. These pages includes such references: * https://docs.python.org/3/library/re.html * https://docs.python.org/2/library/re.html * https://docs.python.org/dev/_sources/library/re.txt Any other programming language uses the terminology of ?quantifier? (as seen below). * https://docs.microsoft.com/en-us/dotnet/standard/base-types/quantifiers-in-regular-expressions * https://docs.oracle.com/javase/tutorial/essential/regex/quant.html * https://perlmaven.com/regex-quantifiers * https://www.w3schools.com/jsref/jsref_regexp_nxy.asp * http://php.net/manual/en/regexp.reference.repetition.php Best regards, Colton Toscher | I.T. Manager | BARON FINANCE ___________________________________________________ 27 Roytec Road, Unit 11, Woodbridge, ON L4L 8E3 T: 905.761.1180 ext. 230 | F: 905.761.0580 ctoscher at baronfinance.com www.baronfinance.com This e-mail and any attachments may contain confidential information. If you are not the intended recipient, please notify the sender immediately by return e-mail, delete this e-mail and destroy any copies. Any dissemination or use of this information by a person other than the intended recipient is unauthorized and may be illegal. -------------- next part -------------- An HTML attachment was scrubbed... URL: From glyph at 163.com Sun Nov 12 08:41:53 2017 From: glyph at 163.com (glyph) Date: Sun, 12 Nov 2017 21:41:53 +0800 (CST) Subject: [docs] Is this a BUG? Message-ID: <6ff2408a.2b2f.15fb077100c.Coremail.glyph@163.com> Python Ver 2.7 and v3.6.2:5fd33b5 >>> p = True >>> q = False >>> p != q True # YES >>> p == q False # YES >>> ( p != q ) != p False # YES >>> p != ( q != p ) False # YES >>> p != q != p True # ??? >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Mon Nov 13 16:17:19 2017 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 13 Nov 2017 21:17:19 +0000 Subject: [docs] [issue32017] profile.Profile() has no method enable() Message-ID: <1510607839.08.0.213398074469.issue32017@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The section here is wrong as it claims that API is common to profile and cProfile. https://docs.python.org/3/library/profile.html#module-cProfile ---------- assignee: docs at python components: Documentation messages: 306169 nosy: docs at python, eric.araujo, ezio.melotti, pitrou, willingc priority: normal severity: normal status: open title: profile.Profile() has no method enable() type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 08:09:52 2017 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 14 Nov 2017 13:09:52 +0000 Subject: [docs] [issue32024] Nominal decorator function call syntax is inconsistent with regular function calls Message-ID: <1510664992.07.0.213398074469.issue32024@psf.upfronthosting.co.za> New submission from Nick Coghlan : Function calls in decorators are implemented as regular function calls, and hence permit the use of generator expressions as their sole argument without a second pair of parentheses. However, https://docs.python.org/3/reference/compound_stmts.html#function-definitions defines the permitted arguments differently from the way https://docs.python.org/3/reference/expressions.html#calls defines them, and thus technically considers a "function call as a decorator" to be a different construct from "a function call". The actual implementation treats these as the same thing, so clarification is needed as to whether it is the implementation or the language specification that should be updated to resolve the inconsistency. ---------- assignee: docs at python components: Documentation messages: 306205 nosy: docs at python, gvanrossum, ncoghlan, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Nominal decorator function call syntax is inconsistent with regular function calls type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 10:21:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Nov 2017 15:21:29 +0000 Subject: [docs] [issue15606] re.VERBOSE whitespace behavior not completely documented In-Reply-To: <1344534617.67.0.49137100671.issue15606@psf.upfronthosting.co.za> Message-ID: <1510672888.85.0.213398074469.issue15606@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset b0b44b4b3337297007f5ef87220a75df204399f8 by Serhiy Storchaka in branch 'master': bpo-15606: Improve the re.VERBOSE documentation. (#4366) https://github.com/python/cpython/commit/b0b44b4b3337297007f5ef87220a75df204399f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 10:22:43 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 14 Nov 2017 15:22:43 +0000 Subject: [docs] [issue15606] re.VERBOSE whitespace behavior not completely documented In-Reply-To: <1344534617.67.0.49137100671.issue15606@psf.upfronthosting.co.za> Message-ID: <1510672963.99.0.912454111764.issue15606@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4342 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 10:23:36 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 14 Nov 2017 15:23:36 +0000 Subject: [docs] [issue15606] re.VERBOSE whitespace behavior not completely documented In-Reply-To: <1344534617.67.0.49137100671.issue15606@psf.upfronthosting.co.za> Message-ID: <1510673016.95.0.912454111764.issue15606@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4343 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 10:38:52 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Nov 2017 15:38:52 +0000 Subject: [docs] [issue15606] re.VERBOSE whitespace behavior not completely documented In-Reply-To: <1344534617.67.0.49137100671.issue15606@psf.upfronthosting.co.za> Message-ID: <1510673932.56.0.213398074469.issue15606@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset 14c1fe682f0086ec28f24fee9bf1c85d80507ee5 by Serhiy Storchaka (Miss Islington (bot)) in branch '3.6': bpo-15606: Improve the re.VERBOSE documentation. (GH-4366) (#4394) https://github.com/python/cpython/commit/14c1fe682f0086ec28f24fee9bf1c85d80507ee5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 10:39:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Nov 2017 15:39:06 +0000 Subject: [docs] [issue15606] re.VERBOSE whitespace behavior not completely documented In-Reply-To: <1344534617.67.0.49137100671.issue15606@psf.upfronthosting.co.za> Message-ID: <1510673946.24.0.213398074469.issue15606@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: New changeset a2f1be0b5ba2bed49b7f94c026b541ff07e52518 by Serhiy Storchaka (Miss Islington (bot)) in branch '2.7': bpo-15606: Improve the re.VERBOSE documentation. (GH-4366) (#4395) https://github.com/python/cpython/commit/a2f1be0b5ba2bed49b7f94c026b541ff07e52518 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 10:39:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Nov 2017 15:39:50 +0000 Subject: [docs] [issue15606] re.VERBOSE whitespace behavior not completely documented In-Reply-To: <1344534617.67.0.49137100671.issue15606@psf.upfronthosting.co.za> Message-ID: <1510673990.55.0.912454111764.issue15606@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 12:29:42 2017 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rn_Hees?=) Date: Tue, 14 Nov 2017 17:29:42 +0000 Subject: [docs] [issue32027] argparse allow_abbrev option also controls short flag combinations Message-ID: <1510680582.36.0.213398074469.issue32027@psf.upfronthosting.co.za> New submission from J?rn Hees : The allow_abbrev option (default True) currently is documented like this (https://docs.python.org/3/library/argparse.html#allow-abbrev): > Normally, when you pass an argument list to the parse_args() method of an ArgumentParser, it recognizes abbreviations of long options. However, it also controls combinations of short options and especially the combination of flags (store_const) like `-a -b` as `-ab`. Example snippet for testing: import argparse import sys parser = argparse.ArgumentParser( allow_abbrev=False ) parser.add_argument('-a', action='store_true') parser.add_argument('-b', action='store_true') parser.add_argument('x', nargs='*') parser.parse_args('-a -b foo bar'.split()) parser.parse_args('-ab foo bar'.split()) As you can see the 2nd parse will fail if allow_abbrev=False. This issue is either a doc issue only or an unintended combination of long option shortening and (the way more common) flag combinations. When i deactivated this in my code, i wanted to disable the (nice to have) long option shortening, but i unintentionally also deactivated (MUST have) short flag combinations. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 306229 nosy: docs at python, joern priority: normal severity: normal status: open title: argparse allow_abbrev option also controls short flag combinations versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 13:00:57 2017 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 14 Nov 2017 18:00:57 +0000 Subject: [docs] [issue32024] Nominal decorator function call syntax is inconsistent with regular function calls In-Reply-To: <1510664992.07.0.213398074469.issue32024@psf.upfronthosting.co.za> Message-ID: <1510682457.2.0.213398074469.issue32024@psf.upfronthosting.co.za> Guido van Rossum added the comment: The implementation is as intended and the language spec needs an update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 13:04:47 2017 From: report at bugs.python.org (=?utf-8?q?J=C3=B6rn_Hees?=) Date: Tue, 14 Nov 2017 18:04:47 +0000 Subject: [docs] [issue32027] argparse allow_abbrev option also controls short flag combinations In-Reply-To: <1510680582.36.0.213398074469.issue32027@psf.upfronthosting.co.za> Message-ID: <1510682687.23.0.912454111764.issue32027@psf.upfronthosting.co.za> Change by J?rn Hees : ---------- keywords: +patch pull_requests: +4344 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 13:25:26 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 14 Nov 2017 18:25:26 +0000 Subject: [docs] [issue32024] Nominal decorator function call syntax is inconsistent with regular function calls In-Reply-To: <1510664992.07.0.213398074469.issue32024@psf.upfronthosting.co.za> Message-ID: <1510683926.46.0.912454111764.issue32024@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- dependencies: +Disallow ambiguous syntax f(x for x in [1],) type: behavior -> enhancement versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 17:35:35 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 14 Nov 2017 22:35:35 +0000 Subject: [docs] [issue31948] [EASY] Broken MSDN links in msilib docs In-Reply-To: <1509882567.57.0.213398074469.issue31948@psf.upfronthosting.co.za> Message-ID: <1510698935.85.0.912454111764.issue31948@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +4345 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 18:06:21 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 14 Nov 2017 23:06:21 +0000 Subject: [docs] [issue31948] [EASY] Broken MSDN links in msilib docs In-Reply-To: <1509882567.57.0.213398074469.issue31948@psf.upfronthosting.co.za> Message-ID: <1510700781.11.0.213398074469.issue31948@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 3bda02222aa3783bf85fc3ff8bc042aefd9c4fd3 by Mariatta (Jesse-Bakker) in branch 'master': bpo-31948: Fix broken links in msilib docs (GH-4397) https://github.com/python/cpython/commit/3bda02222aa3783bf85fc3ff8bc042aefd9c4fd3 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 18:09:47 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Tue, 14 Nov 2017 23:09:47 +0000 Subject: [docs] [issue31948] [EASY] Broken MSDN links in msilib docs In-Reply-To: <1509882567.57.0.213398074469.issue31948@psf.upfronthosting.co.za> Message-ID: <1510700986.93.0.213398074469.issue31948@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: This couldn't be backported by miss-islington, so someone needs to do it manually. ---------- stage: patch review -> backport needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 18:30:01 2017 From: report at bugs.python.org (Jesse Bakker) Date: Tue, 14 Nov 2017 23:30:01 +0000 Subject: [docs] [issue31948] [EASY] Broken MSDN links in msilib docs In-Reply-To: <1509882567.57.0.213398074469.issue31948@psf.upfronthosting.co.za> Message-ID: <1510702201.59.0.912454111764.issue31948@psf.upfronthosting.co.za> Change by Jesse Bakker : ---------- pull_requests: +4346 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 19:23:41 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 15 Nov 2017 00:23:41 +0000 Subject: [docs] [issue31948] [EASY] Broken MSDN links in msilib docs In-Reply-To: <1509882567.57.0.213398074469.issue31948@psf.upfronthosting.co.za> Message-ID: <1510705421.12.0.213398074469.issue31948@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 42336def77f53861284336b3335098a1b9b8cab2 by Mariatta (Jesse-Bakker) in branch '3.6': bpo-31948: Fix broken links in msilib docs (GH-4397). (GH-4398) https://github.com/python/cpython/commit/42336def77f53861284336b3335098a1b9b8cab2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 14 19:27:17 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Wed, 15 Nov 2017 00:27:17 +0000 Subject: [docs] [issue31948] [EASY] Broken MSDN links in msilib docs In-Reply-To: <1509882567.57.0.213398074469.issue31948@psf.upfronthosting.co.za> Message-ID: <1510705637.67.0.912454111764.issue31948@psf.upfronthosting.co.za> Change by Mariatta Wijaya : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 15 03:57:43 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Nov 2017 08:57:43 +0000 Subject: [docs] [issue32024] Nominal decorator function call syntax is inconsistent with regular function calls In-Reply-To: <1510664992.07.0.213398074469.issue32024@psf.upfronthosting.co.za> Message-ID: <1510736263.05.0.213398074469.issue32024@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since this change is approved, this is a documentation issue, and I left it on to Nick. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 15 04:18:03 2017 From: report at bugs.python.org (Stefan Krah) Date: Wed, 15 Nov 2017 09:18:03 +0000 Subject: [docs] [issue31983] Officially add Py_SETREF and Py_XSETREF In-Reply-To: <1510158281.4.0.213398074469.issue31983@psf.upfronthosting.co.za> Message-ID: <1510737483.42.0.912454111764.issue31983@psf.upfronthosting.co.za> Change by Stefan Krah : ---------- nosy: -skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 15 09:54:20 2017 From: report at bugs.python.org (Daniel) Date: Wed, 15 Nov 2017 14:54:20 +0000 Subject: [docs] [issue32035] Documentation of zipfile.ZipFile().writestr() fails to mention that 'data' may also be bytes Message-ID: <1510757660.91.0.213398074469.issue32035@psf.upfronthosting.co.za> New submission from Daniel : The documentation for "ZipFile.writestr(zinfo_or_arcname, data[, compress_type])" says: "Write the string data to the archive; [...]" --> https://docs.python.org/3/library/zipfile.html I fails to mention that data could also be bytes. The source code does mention it however, that is how I found out: def writestr(self, zinfo_or_arcname, data, compress_type=None): """Write a file into the archive. The contents is 'data', which may be either a 'str' or a 'bytes' instance; if it is a 'str', it is encoded as UTF-8 first. 'zinfo_or_arcname' is either a ZipInfo instance or the name of the file in the archive.""" I believe this should be added to the documentation as it's an important information to those who try to add non-UTF8 StringIO data to in-memory ZipFiles using BytesIO. ---------- assignee: docs at python components: Documentation messages: 306271 nosy: Daniel5148, docs at python priority: normal severity: normal status: open title: Documentation of zipfile.ZipFile().writestr() fails to mention that 'data' may also be bytes versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 15 10:05:45 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 15 Nov 2017 15:05:45 +0000 Subject: [docs] [issue32035] Documentation of zipfile.ZipFile().writestr() fails to mention that 'data' may also be bytes In-Reply-To: <1510757660.91.0.213398074469.issue32035@psf.upfronthosting.co.za> Message-ID: <1510758345.34.0.912454111764.issue32035@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- keywords: +easy stage: -> needs patch type: -> enhancement versions: -Python 3.4, Python 3.5, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 15 11:37:11 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 15 Nov 2017 16:37:11 +0000 Subject: [docs] [issue31983] Officially add Py_SETREF and Py_XSETREF In-Reply-To: <1510158281.4.0.213398074469.issue31983@psf.upfronthosting.co.za> Message-ID: <1510763831.57.0.213398074469.issue31983@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Adding my -1. My experience was that these macros impaired my ability to maintain the code and interfered with useful patterns like delaying all decrefs until an object was in a consistent state. While I know that name was bikeshedded quite a bit, the outcome is rather unintuitive: https://twitter.com/raymondh/status/930535938459025408 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 03:01:14 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 16 Nov 2017 08:01:14 +0000 Subject: [docs] [issue32027] argparse allow_abbrev option also controls short flag combinations In-Reply-To: <1510680582.36.0.213398074469.issue32027@psf.upfronthosting.co.za> Message-ID: <1510819273.97.0.213398074469.issue32027@psf.upfronthosting.co.za> Berker Peksag added the comment: Thank you for the report and for the PR. I think this is a duplicate of issue 26967. > This issue is either a doc issue only or an unintended combination of > long option shortening and (the way more common) flag combinations. This is indeed a bug so it would be better to fix it. ---------- nosy: +berker.peksag resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> argparse: allow_abbrev=False stops -vv from working type: -> behavior versions: -Python 3.5, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 05:41:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Nov 2017 10:41:48 +0000 Subject: [docs] [issue24896] It is undocumented that re.UNICODE and re.LOCALE affect re.IGNORECASE In-Reply-To: <1439987891.31.0.547960058443.issue24896@psf.upfronthosting.co.za> Message-ID: <1510828908.61.0.912454111764.issue24896@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 07:36:28 2017 From: report at bugs.python.org (=?utf-8?b?0JDRgNGC0LXQvNC40Lkg0KDQvtC00LjQvtC90L7Qsg==?=) Date: Thu, 16 Nov 2017 12:36:28 +0000 Subject: [docs] [issue32048] Misprint in the unittest.mock documentation. Message-ID: <1510835788.01.0.912454111764.issue32048@psf.upfronthosting.co.za> Change by ??????? ???????? : ---------- assignee: docs at python components: Documentation nosy: docs at python, ??????? ???????? priority: normal severity: normal status: open title: Misprint in the unittest.mock documentation. type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 07:43:08 2017 From: report at bugs.python.org (=?utf-8?b?0JDRgNGC0LXQvNC40Lkg0KDQvtC00LjQvtC90L7Qsg==?=) Date: Thu, 16 Nov 2017 12:43:08 +0000 Subject: [docs] [issue32048] Misprint in the unittest.mock documentation. Message-ID: <1510836188.31.0.912454111764.issue32048@psf.upfronthosting.co.za> Change by ??????? ???????? : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 09:12:24 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Nov 2017 14:12:24 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1510841544.81.0.213398074469.issue30004@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Do you mind to create a pull request on GitHub Cristian? ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett, serhiy.storchaka stage: -> needs patch versions: -Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 09:14:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Nov 2017 14:14:36 +0000 Subject: [docs] [issue28951] re.flags not documented in Module Contents as promised. In-Reply-To: <1481569048.46.0.00215126822864.issue28951@psf.upfronthosting.co.za> Message-ID: <1510841676.97.0.912454111764.issue28951@psf.upfronthosting.co.za> Change by Serhiy Storchaka : ---------- components: +Regular Expressions nosy: +ezio.melotti, mrabarnett stage: -> needs patch versions: +Python 2.7, Python 3.6, Python 3.7 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 09:14:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Nov 2017 14:14:44 +0000 Subject: [docs] [issue28951] re.flags not documented in Module Contents as promised. In-Reply-To: <1481569048.46.0.00215126822864.issue28951@psf.upfronthosting.co.za> Message-ID: <1510841684.58.0.912454111764.issue28951@psf.upfronthosting.co.za> Change by Serhiy Storchaka : Removed file: https://bugs.python.org/file45941/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 09:14:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Nov 2017 14:14:49 +0000 Subject: [docs] [issue28951] re.flags not documented in Module Contents as promised. In-Reply-To: <1481569048.46.0.00215126822864.issue28951@psf.upfronthosting.co.za> Message-ID: <1510841689.65.0.912454111764.issue28951@psf.upfronthosting.co.za> Change by Serhiy Storchaka : Removed file: https://bugs.python.org/file45940/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 09:14:54 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Nov 2017 14:14:54 +0000 Subject: [docs] [issue28951] re.flags not documented in Module Contents as promised. In-Reply-To: <1481569048.46.0.00215126822864.issue28951@psf.upfronthosting.co.za> Message-ID: <1510841694.86.0.912454111764.issue28951@psf.upfronthosting.co.za> Change by Serhiy Storchaka : Removed file: https://bugs.python.org/file45934/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 10:01:37 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 16 Nov 2017 15:01:37 +0000 Subject: [docs] [issue28450] Misleading/inaccurate documentation about unknown escape sequences in regular expressions In-Reply-To: <1476529213.17.0.132534478532.issue28450@psf.upfronthosting.co.za> Message-ID: <1510844497.35.0.213398074469.issue28450@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Barry, could you please improve the documentation about unknown escape sequences in regular expressions? My skills is not enough for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 12:27:04 2017 From: report at bugs.python.org (jason) Date: Thu, 16 Nov 2017 17:27:04 +0000 Subject: [docs] [issue32051] Possible issue in multiprocessing doc Message-ID: <1510853224.34.0.213398074469.issue32051@psf.upfronthosting.co.za> New submission from jason : in multiprocessing doc https://docs.python.org/3.6/library/multiprocessing.html under 17.2.2.7.2. Using a remote manager, >>> from multiprocessing.managers import BaseManager >>> import queue >>> queue = queue.Queue() >>> class QueueManager(BaseManager): pass >>> QueueManager.register('get_queue', callable=lambda:queue) >>> m = QueueManager(address=('', 50000), authkey=b'abracadabra') >>> s = m.get_server() >>> s.serve_forever() queue is used as both module name and variable name, should this be avoided? ---------- assignee: docs at python components: Documentation messages: 306389 nosy: 1a1a11a, docs at python priority: normal severity: normal status: open title: Possible issue in multiprocessing doc type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 23:39:55 2017 From: report at bugs.python.org (Berker Peksag) Date: Fri, 17 Nov 2017 04:39:55 +0000 Subject: [docs] [issue32051] Possible issue in multiprocessing doc In-Reply-To: <1510853224.34.0.213398074469.issue32051@psf.upfronthosting.co.za> Message-ID: <1510893595.56.0.213398074469.issue32051@psf.upfronthosting.co.za> Berker Peksag added the comment: The example itself works fine, but I agree that it would be better to use a better name. We could replace ``('foo.bar.org', 50000)`` in the following examples with ``('', 50000)`` too. Would you like to send a PR? The documentation file is located at Doc/library/multiprocessing.rst. ---------- keywords: +easy nosy: +berker.peksag stage: -> needs patch type: enhancement -> behavior versions: +Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 16 23:43:15 2017 From: report at bugs.python.org (jason) Date: Fri, 17 Nov 2017 04:43:15 +0000 Subject: [docs] [issue32051] Possible issue in multiprocessing doc In-Reply-To: <1510853224.34.0.213398074469.issue32051@psf.upfronthosting.co.za> Message-ID: <1510893794.97.0.213398074469.issue32051@psf.upfronthosting.co.za> jason added the comment: Thank you for answering! Yes, I would be very happy to do that, this is going to be my first contribution! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 17 01:06:11 2017 From: report at bugs.python.org (Lisa Roach) Date: Fri, 17 Nov 2017 06:06:11 +0000 Subject: [docs] [issue31822] Document that urllib.parse.{Defrag, Split, Parse}Result are namedtuples In-Reply-To: <1508439273.05.0.213398074469.issue31822@psf.upfronthosting.co.za> Message-ID: <1510898771.6.0.912454111764.issue31822@psf.upfronthosting.co.za> Change by Lisa Roach : ---------- keywords: +patch pull_requests: +4378 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 17 02:45:08 2017 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 17 Nov 2017 07:45:08 +0000 Subject: [docs] [issue28617] Why isn't "in" called a comparison operation? In-Reply-To: <1478291760.05.0.758080389861.issue28617@psf.upfronthosting.co.za> Message-ID: <1510904707.88.0.213398074469.issue28617@psf.upfronthosting.co.za> Nick Coghlan added the comment: Also see https://bugs.python.org/issue32055 regarding the prospect of bringing the implementation into line with the intuitive semantics, and preventing implicit comparison chaining for containment tests. ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 17 09:25:10 2017 From: report at bugs.python.org (Cristian Barbarosie) Date: Fri, 17 Nov 2017 14:25:10 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1510928710.17.0.213398074469.issue30004@psf.upfronthosting.co.za> Cristian Barbarosie added the comment: I'm sorry, I have no experience at all with Git. Could you please do it for me ? The bug appears in two places, see my first two messages. Thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 17 09:35:44 2017 From: report at bugs.python.org (Mandeep Bhutani) Date: Fri, 17 Nov 2017 14:35:44 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1510929344.55.0.213398074469.issue30004@psf.upfronthosting.co.za> Mandeep Bhutani added the comment: Serhiy, Christian: I'll submit a PR for this later today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 17 10:48:59 2017 From: report at bugs.python.org (Mandeep Bhutani) Date: Fri, 17 Nov 2017 15:48:59 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1510933739.34.0.912454111764.issue30004@psf.upfronthosting.co.za> Change by Mandeep Bhutani : ---------- keywords: +patch pull_requests: +4384 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 17 10:53:21 2017 From: report at bugs.python.org (Mandeep Bhutani) Date: Fri, 17 Nov 2017 15:53:21 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1510934001.93.0.213398074469.issue30004@psf.upfronthosting.co.za> Mandeep Bhutani added the comment: Cristian, Serhiy: I've submitted a PR for this bug. Cristian: I apologize for misspelling your name in a prior post. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 18 09:15:21 2017 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 18 Nov 2017 14:15:21 +0000 Subject: [docs] [issue31943] Add asyncio.Handle.cancelled() method In-Reply-To: <1509812825.97.0.213398074469.issue31943@psf.upfronthosting.co.za> Message-ID: <1511014521.75.0.912454111764.issue31943@psf.upfronthosting.co.za> Change by Andrew Svetlov : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 18 09:20:51 2017 From: report at bugs.python.org (Marat Sharafutdinov) Date: Sat, 18 Nov 2017 14:20:51 +0000 Subject: [docs] [issue31943] Add asyncio.Handle.cancelled() method In-Reply-To: <1509812825.97.0.213398074469.issue31943@psf.upfronthosting.co.za> Message-ID: <1511014851.6.0.912454111764.issue31943@psf.upfronthosting.co.za> Change by Marat Sharafutdinov : ---------- versions: +Python 3.7 -Python 3.6 _______________________________________ Python tracker _______________________________________ From tarasmatsyk at icloud.com Fri Nov 17 09:46:53 2017 From: tarasmatsyk at icloud.com (Taras Matsyk) Date: Fri, 17 Nov 2017 16:46:53 +0200 Subject: [docs] Would be happy to help with Python docs translation Message-ID: Hi The Documentation Team! I saw a tweet that docs.python.org has a language switch from now (maybe from a month or two ago). However I see only French and Japanese languages there and I really want to help with translation to other languages, for instance, my native one - Ukrainian or Russian, which is my second language. Can even help with English documentation if there is a room for my help :) I?ve found a python.dot.org repo but have not found any translations there: https://github.com/python/pythondotorg , the main repo (https://github.com/python/cpython ) does not seem to have translations neither. Any suggestions or hints on where and how to move next is highly appreciated. Cheers, Taras -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat Nov 18 13:04:15 2017 From: report at bugs.python.org (Jesse SHapiro) Date: Sat, 18 Nov 2017 18:04:15 +0000 Subject: [docs] [issue32070] Clarify the behavior of the staticmethod builtin Message-ID: <1511028255.0.0.213398074469.issue32070@psf.upfronthosting.co.za> New submission from Jesse SHapiro : It looks like the original staticmethod docstring might have been based on the classmethod docstring, and it seems like the current description might not be accurate. Current string: ...It can be called either on the class (e.g. C.f()) or on an instance (e.g. C().f()); the instance is ignored except for its class... Proposed change: It can be called either on the class (e.g. C.f()) or on an instance (e.g. C().f()). Both the class and the instance are ignored, and neither is passed implicitly as the first argument to the method. ---------- assignee: docs at python components: Documentation messages: 306489 nosy: docs at python, haikuginger priority: normal pull_requests: 4391 severity: normal status: open title: Clarify the behavior of the staticmethod builtin type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 19 04:08:49 2017 From: report at bugs.python.org (Sai Bhargava Ramu) Date: Sun, 19 Nov 2017 09:08:49 +0000 Subject: [docs] [issue32074] Might be a wrong implementation Message-ID: <1511082529.04.0.213398074469.issue32074@psf.upfronthosting.co.za> New submission from Sai Bhargava Ramu : https://docs.python.org/2/library/itertools.html#itertools.combinations #The behaviour of combinations function in documentation is different and I think identation is missing with `else` #I didn't get the logic right is point out anything further. This might not be a real issue ---------- assignee: docs at python components: Documentation files: combinations.py messages: 306499 nosy: Sai Bhargava Ramu, docs at python priority: normal severity: normal status: open title: Might be a wrong implementation type: behavior versions: Python 3.5 Added file: https://bugs.python.org/file47273/combinations.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 19 04:27:44 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 19 Nov 2017 09:27:44 +0000 Subject: [docs] [issue32074] Might be a wrong implementation In-Reply-To: <1511082529.04.0.213398074469.issue32074@psf.upfronthosting.co.za> Message-ID: <1511083664.13.0.213398074469.issue32074@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The implementation in the documentation is correct. Did you tested your implementation? The indentation of the "else" is correct. See https://docs.python.org/3/reference/compound_stmts.html#the-for-statement ---------- nosy: +serhiy.storchaka resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From zlneed at hotmail.com Sat Nov 18 09:48:39 2017 From: zlneed at hotmail.com (=?gb2312?B?194gwNY=?=) Date: Sat, 18 Nov 2017 14:48:39 +0000 Subject: [docs] =?gb2312?b?UHl0aG9uIDMuNS4yIM7EtbUgzt63qM/C1Ng=?= Message-ID: Hello! I am a beginner for Python?I need the Python Document very much. But the Python 3.5.2 Document Chinese Version can?t download from http://python.usyiyi.cn/translate/python_352/download.html . It?s inconvenient to me for English version.If you could give me the Chinese version.I will really tankfull.. GOOD NIGHT -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sun Nov 19 09:35:40 2017 From: report at bugs.python.org (Jim Jewett) Date: Sun, 19 Nov 2017 14:35:40 +0000 Subject: [docs] [issue31040] mimetypes.add_type should complain when you give it an undotted ext In-Reply-To: <1501010741.93.0.952054126016.issue31040@psf.upfronthosting.co.za> Message-ID: <1511102140.16.0.213398074469.issue31040@psf.upfronthosting.co.za> Jim Jewett added the comment: Ideally, use .startswith('.') Instead if find, but this is a clear UI fix. First pull request fixes doc, second fixes code. OK to apply both. ---------- nosy: +Jim.Jewett stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 19 12:13:33 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 19 Nov 2017 17:13:33 +0000 Subject: [docs] [issue32070] Clarify the behavior of the staticmethod builtin In-Reply-To: <1511028255.0.0.213398074469.issue32070@psf.upfronthosting.co.za> Message-ID: <1511111613.39.0.213398074469.issue32070@psf.upfronthosting.co.za> Raymond Hettinger added the comment: ISTM the current wording is correct and aims to describe how staticmethods differ from regular methods. With a regular methods we have "c.m(*a) -> type(c).m(c, *a)" and "C.m(*a) -> C.m(*s)". With a class method, only the first of those changes to "c.m(*a) -> type(c).m(*a)". Expressed in English, this change is "the instance is ignored except for its class...". That said, the staticmethod() docs could use a complete rewrite. They amble all over the place and don't directly speak to what a static method is for (attaching regular functions to classes to improve findability) or how they work (use descriptor logic to suppress the usual behavior of prepend "self" to the argument list when called from an instance) or a concise motivating example. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 19 13:50:47 2017 From: report at bugs.python.org (Jason) Date: Sun, 19 Nov 2017 18:50:47 +0000 Subject: [docs] [issue32051] Possible issue in multiprocessing doc In-Reply-To: <1510853224.34.0.213398074469.issue32051@psf.upfronthosting.co.za> Message-ID: <1511117447.11.0.912454111764.issue32051@psf.upfronthosting.co.za> Change by Jason : ---------- keywords: +patch pull_requests: +4401 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 19 13:58:20 2017 From: report at bugs.python.org (Jason) Date: Sun, 19 Nov 2017 18:58:20 +0000 Subject: [docs] [issue32051] Possible issue in multiprocessing doc In-Reply-To: <1510853224.34.0.213398074469.issue32051@psf.upfronthosting.co.za> Message-ID: <1511117900.29.0.213398074469.issue32051@psf.upfronthosting.co.za> Jason added the comment: Hi Berker, I didn't update "following examples with ``('', 50000)`` too." because this is different than the previous one, this is client connecting to server, so hostname cannot be empty string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 19 19:00:14 2017 From: report at bugs.python.org (Mathew M.) Date: Mon, 20 Nov 2017 00:00:14 +0000 Subject: [docs] [issue32077] Documentation: Some Unicode object functions don't indicate whether they return a new reference Message-ID: <1511136014.35.0.213398074469.issue32077@psf.upfronthosting.co.za> New submission from Mathew M. : This is just something I've noticed when browsing the C API documentation for Unicode objects. For example, the documentation entry for PyUnicode_DecodeMBCSStateful lacks the "Return value: New reference", etc. ---------- assignee: docs at python components: Documentation messages: 306516 nosy: Mathew M., docs at python priority: normal severity: normal status: open title: Documentation: Some Unicode object functions don't indicate whether they return a new reference type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 19 19:06:25 2017 From: report at bugs.python.org (Mathew M.) Date: Mon, 20 Nov 2017 00:06:25 +0000 Subject: [docs] [issue32077] Documentation: Some Unicode object functions don't indicate whether they return a new reference In-Reply-To: <1511136014.35.0.213398074469.issue32077@psf.upfronthosting.co.za> Message-ID: <1511136385.89.0.912454111764.issue32077@psf.upfronthosting.co.za> Change by Mathew M. : ---------- keywords: +patch pull_requests: +4407 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 19 19:08:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Nov 2017 00:08:09 +0000 Subject: [docs] [issue32077] Documentation: Some Unicode object functions don't indicate whether they return a new reference In-Reply-To: <1511136014.35.0.213398074469.issue32077@psf.upfronthosting.co.za> Message-ID: <1511136489.24.0.213398074469.issue32077@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: C API functions return new references by default. It needs to be explicitly documented only when the function returns a borrowed reference. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 19 19:11:06 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Nov 2017 00:11:06 +0000 Subject: [docs] [issue32077] Documentation: Some Unicode object functions don't indicate whether they return a new reference In-Reply-To: <1511136014.35.0.213398074469.issue32077@psf.upfronthosting.co.za> Message-ID: <1511136666.28.0.213398074469.issue32077@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, you have changed just refcounts.dat! This is good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 19 22:24:27 2017 From: report at bugs.python.org (Decorater) Date: Mon, 20 Nov 2017 03:24:27 +0000 Subject: [docs] [issue32075] Expose ZipImporter Type Object in the include header files. In-Reply-To: <1511121369.3.0.213398074469.issue32075@psf.upfronthosting.co.za> Message-ID: <1511148267.77.0.912454111764.issue32075@psf.upfronthosting.co.za> Change by Decorater : ---------- assignee: -> docs at python components: +Build, Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From songofacandy at gmail.com Sun Nov 19 22:44:44 2017 From: songofacandy at gmail.com (INADA Naoki) Date: Mon, 20 Nov 2017 12:44:44 +0900 Subject: [docs] Would be happy to help with Python docs translation In-Reply-To: References: Message-ID: Hi, Taras. There is PEP about how to translate Python document. https://www.python.org/dev/peps/pep-0545/ Please read it first. When you have team, I'll add your team's coordinator to Transifex group. Regards, INADA Naoki On Fri, Nov 17, 2017 at 11:46 PM, Taras Matsyk wrote: > Hi The Documentation Team! > > I saw a tweet that docs.python.org has a language switch from now (maybe > from a month or two ago). However I see only French and Japanese languages > there and I really want to help with translation to other languages, > for instance, my native one - Ukrainian or Russian, which is my second > language. Can even help with English documentation if there is a room for my > help :) > > I?ve found a python.dot.org repo but have not found any translations there: > https://github.com/python/pythondotorg, the main repo > (https://github.com/python/cpython) does not seem to have translations > neither. > > Any suggestions or hints on where and how to move next is highly > appreciated. > > Cheers, > Taras > > _______________________________________________ > docs mailing list > docs at python.org > https://mail.python.org/mailman/listinfo/docs > From report at bugs.python.org Mon Nov 20 03:18:03 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Nov 2017 08:18:03 +0000 Subject: [docs] [issue32075] Expose ZipImporter Type Object in the include header files. In-Reply-To: <1511121369.3.0.213398074469.issue32075@psf.upfronthosting.co.za> Message-ID: <1511165883.69.0.213398074469.issue32075@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is a plan of reimplementing zipimport in Python (see issue25711). What are you going to do with this? I think that C extensions should use a common import API. ---------- nosy: +brett.cannon, eric.snow, ncoghlan, serhiy.storchaka, twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 03:25:19 2017 From: report at bugs.python.org (Decorater) Date: Mon, 20 Nov 2017 08:25:19 +0000 Subject: [docs] [issue32075] Expose ZipImporter Type Object in the include header files. In-Reply-To: <1511121369.3.0.213398074469.issue32075@psf.upfronthosting.co.za> Message-ID: <1511166319.78.0.213398074469.issue32075@psf.upfronthosting.co.za> Decorater added the comment: That is true, but Well, I am using this in a project of mine currently where it loads up encrypted scripts from a zip file. However I must have the import hook itself be in an C extension and subclass the current zipimporter. However knowing a rewrite for it is best, I have not experienced any bugs with it so far actually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 03:40:45 2017 From: report at bugs.python.org (Decorater) Date: Mon, 20 Nov 2017 08:40:45 +0000 Subject: [docs] [issue32075] Expose ZipImporter Type Object in the include header files. In-Reply-To: <1511121369.3.0.213398074469.issue32075@psf.upfronthosting.co.za> Message-ID: <1511167245.28.0.213398074469.issue32075@psf.upfronthosting.co.za> Decorater added the comment: Well since issue25711 might be for 3.7 and newer I guess this patch might actually be for 3.6.4 or something then. And then the rewrite would take over on 3.7 and newer depending on if the rewrite makes it in to 3.7. ---------- versions: +Python 3.6 -Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 04:02:50 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Nov 2017 09:02:50 +0000 Subject: [docs] [issue32075] Expose ZipImporter Type Object in the include header files. In-Reply-To: <1511121369.3.0.213398074469.issue32075@psf.upfronthosting.co.za> Message-ID: <1511168570.1.0.213398074469.issue32075@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The C API cann't be changed in a bugfix release. Unless for fixing bugs, but even in that case we should be very very careful. There is no a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 09:24:41 2017 From: report at bugs.python.org (KINEBUCHI Tomohiko) Date: Mon, 20 Nov 2017 14:24:41 +0000 Subject: [docs] [issue32087] deprecated-removed directive generates overlapping msgids in .pot files Message-ID: <1511187880.98.0.213398074469.issue32087@psf.upfronthosting.co.za> New submission from KINEBUCHI Tomohiko : When gettext builder is invoked, deprecated-removed directive which is defined in Doc/tools/extensions/pyspecific.py generates overlapping msgids in .pot files. For example, the following .rst source (taken from Doc/library/dmb.rst L354):: .. deprecated-removed:: 3.6 3.8 Creating database in ``'r'`` and ``'w'`` modes. Modifying database in ``'r'`` mode. results to following .pot file entries:: #: ../../library/dbm.rst:357 msgid "Deprecated since version 3.6, will be removed in version 3.8: Creating database in 'r' and 'w' modes. Modifying database in 'r' mode." msgstr "" #: ../../library/dbm.rst:357 msgid "Creating database in ``'r'`` and ``'w'`` modes. Modifying database in ``'r'`` mode." msgstr "" using the command:: sphinx-build -E -b gettext -D gettext_compact=0 -w warnings.txt -d build/.doctrees . locale/pot The root cause is deprecated-removed directive constructs inappropriate sub-doctree for translation. First, above .rst source is compiled into following tree structure:: Deprecated since version 3.6, will be removed in version 3.8: Creating database in... and gettext builder picks up paragraph node and the second inline node as translation targets. Expected result is that two inline nodes are picked up as translation targets and the paragraph node is not, and expected .pot file entries are such as following:: #: ../../library/dbm.rst:357 msgid "Deprecated since version 3.6, will be removed in version 3.8:" msgstr "" #: ../../library/dbm.rst:357 msgid "Creating database in ``'r'`` and ``'w'`` modes. Modifying database in ``'r'`` mode." msgstr "" ---------- assignee: docs at python components: Documentation messages: 306546 nosy: cocoatomo, docs at python priority: normal severity: normal status: open title: deprecated-removed directive generates overlapping msgids in .pot files versions: Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 09:46:23 2017 From: report at bugs.python.org (KINEBUCHI Tomohiko) Date: Mon, 20 Nov 2017 14:46:23 +0000 Subject: [docs] [issue32087] deprecated-removed directive generates overlapping msgids in .pot files In-Reply-To: <1511187880.98.0.213398074469.issue32087@psf.upfronthosting.co.za> Message-ID: <1511189183.34.0.912454111764.issue32087@psf.upfronthosting.co.za> Change by KINEBUCHI Tomohiko : ---------- keywords: +patch pull_requests: +4408 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 19:54:27 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 21 Nov 2017 00:54:27 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe Message-ID: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> New submission from Terry J. Reedy : The itertools roundrobin recipe has an outer loop executed a preset number of times. It is currently implemented with two assignments and a while loop. https://docs.python.org/3/library/itertools.html#itertools-recipes These can be replaced with a for loop using a reversed range. def roundrobin(*iterables): "roundrobin('ABC', 'D', 'EF') --> A D E B F C" nexts = cycle(iter(it).__next__ for it in iterables) for current_len in reversed(range(1, len(iterables)+1)): try: for next in nexts: yield next() except StopIteration: nexts = cycle(islice(nexts, current_len - 1)) I think this is easier to understand. So do some other participants in the current python-ideas thread 'Rewriting the "roundrobin" recipe in the itertools documentation'. I changed 'pending' to 'current_len' because, to me, 'pending' should be the set of iter_nexts and not their number. I originally avoided the '-1' in the islice call by decrementing both range arguments by 1 and calling the loop variable 'reduced_len'. But having the loop variable be the size of the nexts iterable in the next outer iteration seemed confusing and not worth the trivial efficiency gain. An independent change would be to replace 'next' with 'iter' on the basis that reusing the builtin name is not good and because 'nexts' is awkward to pronounce. I will produce a PR if any version is preferred to the current one. --- The OP proposed, and some participants like, an accept-reject algorithm based on zip_longest. def roundrobin(*iters): "roundrobin('ABC', 'D', 'EF') --> A D E B F C" # Perhaps "flat_zip_nofill" is a better name, or something similar sentinel = object() for tup in it.zip_longest(*iters, fillvalue=sentinel): yield from (x for x in tup if x is not sentinel) I dislike creating tuples we don't want, with values we don't want, with an arbitrarily small acceptance ratio. I also note that zip_longest is properly used in grouper, whereas roundrobin is the only recipe using cycle. ---------- assignee: docs at python components: Documentation messages: 306605 nosy: docs at python, rhettinger, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Use range in itertools roundrobin recipe type: enhancement versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 20:27:02 2017 From: report at bugs.python.org (Dubslow) Date: Tue, 21 Nov 2017 01:27:02 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511227621.81.0.213398074469.issue32099@psf.upfronthosting.co.za> Dubslow added the comment: Note that this follows a bit of discussion on python-ideas, in two threads: https://mail.python.org/pipermail/python-ideas/2017-November/047920.html https://mail.python.org/pipermail/python-ideas/2017-November/047989.html I agree the zip_longest-derived solution is both easier to read/understand and also not really accurate, especially in extreme cases. But, and see the second thread, I think it might just be better to add this funcitonality itself to itertools, under the name zip_flat -- per the second thread, there's a lot of confusion around the topic beyond just the suitability of the current recipe (including such things as lack of a clear name, legibility, efficiency, and brevity -- a fair number of people are looking for one or two liners, even if that doesn't really exist). (One alternative to zip_flat would be to add a second keyword argument to zip_longest that *doesn't* use a fillvalue, producing variable-length tuples when the supplied iters run out. Then the recipe and the entire conversation/topic could be replaced by "yield from zip_longest(*iters, usefill=False)".) Despite that opinion, this suggested change is better than nothing. ---------- nosy: +Dubslow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 20:50:04 2017 From: report at bugs.python.org (Dubslow) Date: Tue, 21 Nov 2017 01:50:04 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511229004.82.0.213398074469.issue32099@psf.upfronthosting.co.za> Dubslow added the comment: Regarding the current bug more specifically, I think a few comments would go a long way to helping readers understand the code. And also, I do think the (1, +1, -1) is less readable, simply because it doesn't follow the most common usage patterns of range, where your first version using (0,0,0) (with implicit zeroes of course) is cleaner. It's much more apparent how long the loop is at first glance ("loop once per iter" vs "loop... from what to what? oh, once per iter"). Perhaps not using reversed() but instead setting step=-1 would be a better case to use the off-by-1 variant. Such a version with both proposed changes (which are independent and can be considered or accepted separately) looks like this: def roundrobin(*iterables): "roundrobin('ABC', 'D', 'EF') --> A D E B F C" # This recipe is also called other names like "alternate", "interleave", or # "merge". "zip_flat" would also be an accurate name. # Algorithm: cycle around the __next__ methods of each iterable. when an # iter runs out, remove its __next__ from the cycle. nexts = cycle(iter(it).__next__ for it in iterables) for reduced_len in reversed(range(len(iterables))): try: for next in nexts: yield next() except StopIteration: nexts = cycle(islice(nexts, reduced_len)) # This skips one round of the cycle, starting the next round # without the current iter The last comment is probably the least valuable, though it does point out the slight quirk of how the last line works. I suppose this is the case for having the loop variable be named the actual length, but I think most Python users are accustomed to the last element of a list having index length-1. At any rate, I think the readability gain in the for statement is more than the readability loss in the islice(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 20:51:13 2017 From: report at bugs.python.org (Dubslow) Date: Tue, 21 Nov 2017 01:51:13 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511229073.22.0.213398074469.issue32099@psf.upfronthosting.co.za> Dubslow added the comment: Perhaps the loop variable could be renamed to "len_minus_1" or some such something which is more semantic to the algorithm. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 20:54:21 2017 From: report at bugs.python.org (Dubslow) Date: Tue, 21 Nov 2017 01:54:21 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511229261.89.0.213398074469.issue32099@psf.upfronthosting.co.za> Dubslow added the comment: Er, in my first message, make that "(yield from tup for tup in zip_longest(*iters, usefill=False))" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 21:29:01 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Nov 2017 02:29:01 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511231341.95.0.912454111764.issue32099@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 22:15:21 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Nov 2017 03:15:21 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511234121.1.0.213398074469.issue32099@psf.upfronthosting.co.za> Raymond Hettinger added the comment: IMO, George Sakkis's original version is better than the TJR's proposed revision which has three separate adjustments by one and adds to extraneous functions which aren't central to the example. Dubslow's alternative at least avoids the three offsets by one; however, it has the disadvantage that meaning of the loop induction variable is somewhat indirect and creates its own source of confusion. I agree that some algorithmic comment should be added, probably just for the last line. Let's not add any of the listed alternative names to the comments. Each one is either confusing or wrong. The word "merge" already has an established, different meaning as in "sort/merge". For example, heapq.merge('ABC', 'D', 'EF') gives ['A', 'B', 'C', 'D', 'E', 'F']. The word "alternate" tends to mean "toggle back-and-forth" in common usage. The term "zip_flat" has no meaning to me, it has no hits on Google, and the closest match is a recipe on StackOverflow that does something different. And "interleave" is not suggestive of looping back over the iterables until each is exhausted. Also, we may yet use interleave() to mean something else. In contrast, "round robin" has a well established meaning that matches what this recipe does. Until now, not a single reader has ever claimed to not know what it means. https://en.wikipedia.org/wiki/Round-robin_scheduling FWIW, the recipe has several benefit. 1) Give a way to implement round robin iteration without re-inventing the wheel, 2) Demonstrate ways to use cycle() and islice(). 3) Demonstrate useful optimization technique of factoring the try/except out of the for-loop, 4) Demonstrate the useful optimization technique of calling bound methods, and 5) Be concise (I've left longer or more complex recipes for the ASPN cookbook or StackOverflow). Ideally, I would prefer to not add two extra builtin lookups (the recipe is sometime used on short inputs which would be affected by the extra overhead). Also, I prefer the visual weight to be on the central message of tight inner loops that exploit itertools rather than having the visual weight shift to the for-loop which is the least important part. Can you a suggest a concise single line comment that would make the last line clearer about what it is doing? Also, I'm open to changing the name of the "pending" variable but think "current_len" and "reduced_len" are not improvements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 22:30:26 2017 From: report at bugs.python.org (Tim Peters) Date: Tue, 21 Nov 2017 03:30:26 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511235025.92.0.213398074469.issue32099@psf.upfronthosting.co.za> Tim Peters added the comment: I agree the current recipe strikes a very nice balance among competing interests, and is educational on several counts. s/pending/numactive/ # Remove the iterator we just exhausted from the cycle. numactive -= 1 nexts = cycle(islice(nexts, numactive)) ---------- nosy: +tim.peters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 20 23:17:46 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Nov 2017 04:17:46 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511237866.05.0.912454111764.issue32099@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- keywords: +patch pull_requests: +4424 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 01:37:27 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Nov 2017 06:37:27 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511246247.59.0.213398074469.issue32099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: roundrobin() has quadratic computational complexity. For example list(roundrobin(*([[1]]*N))). Is there a way to make it with linear complexity? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 02:02:00 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Nov 2017 07:02:00 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511247720.83.0.213398074469.issue32099@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Serhiy, I think you're focusing on an irrelevant edge case and reading too much into the recipe. You could create an underlying binary tree with O(n) iteration and O(log n) deletion but then that completely misses the point of the itertools recipes and would likely be pointless in the real-world and likely perform worse than the current recipe in common cases unless you wrote a C extension for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 02:06:13 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Nov 2017 07:06:13 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511247973.87.0.912454111764.issue32099@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- Removed message: https://bugs.python.org/msg306629 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 02:16:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Nov 2017 07:16:56 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511248616.69.0.213398074469.issue32099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I agree that using binary tree would be excessively here. I just wondering if there is a simple way to get rid of the quadratic complexity. In any case this does not matter much until you work with many hundreds or thousands of iterables. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 02:25:57 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Nov 2017 07:25:57 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511249156.97.0.213398074469.issue32099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually I tried to test if this implementation can cause a crash due to using deeply nested iterators (like in issue14010). For example in next(roundrobin(*([[]]*N + [[1]]))). But if there is such problem here, roundrobin() becomes unusable due to quadratic time for smaller N (tens of thousands). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 03:27:03 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 21 Nov 2017 08:27:03 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511252823.44.0.912454111764.issue32099@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4425 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 10:25:13 2017 From: report at bugs.python.org (Thomas Eldon Allred) Date: Tue, 21 Nov 2017 15:25:13 +0000 Subject: [docs] [issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation Message-ID: <1511277913.62.0.213398074469.issue32105@psf.upfronthosting.co.za> New submission from Thomas Eldon Allred : asyncio.BaseEventLoop.connect_accepted_socket was added in v3.5.3 Please add a note to the documentation. ---------- assignee: docs at python components: Documentation messages: 306650 nosy: Thomas Eldon Allred, docs at python priority: normal severity: normal status: open title: Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation type: enhancement versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 10:33:10 2017 From: report at bugs.python.org (Decorater) Date: Tue, 21 Nov 2017 15:33:10 +0000 Subject: [docs] [issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation In-Reply-To: <1511277913.62.0.213398074469.issue32105@psf.upfronthosting.co.za> Message-ID: <1511278390.47.0.213398074469.issue32105@psf.upfronthosting.co.za> Decorater added the comment: Will see whhat I can do. ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 10:48:37 2017 From: report at bugs.python.org (Decorater) Date: Tue, 21 Nov 2017 15:48:37 +0000 Subject: [docs] [issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation In-Reply-To: <1511277913.62.0.213398074469.issue32105@psf.upfronthosting.co.za> Message-ID: <1511279317.54.0.912454111764.issue32105@psf.upfronthosting.co.za> Change by Decorater : ---------- keywords: +patch pull_requests: +4428 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 11:06:29 2017 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 21 Nov 2017 16:06:29 +0000 Subject: [docs] [issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation In-Reply-To: <1511277913.62.0.213398074469.issue32105@psf.upfronthosting.co.za> Message-ID: <1511280389.01.0.213398074469.issue32105@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset 431665bf1971e66c51f59abf0693f700ff7919e8 by Yury Selivanov (AraHaan) in branch 'master': bpo-32105: add asyncio.BaseEventLoop.connect_accepted_socket versionadded to documentation. (#4491) https://github.com/python/cpython/commit/431665bf1971e66c51f59abf0693f700ff7919e8 ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 11:06:42 2017 From: report at bugs.python.org (Roundup Robot) Date: Tue, 21 Nov 2017 16:06:42 +0000 Subject: [docs] [issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation In-Reply-To: <1511277913.62.0.213398074469.issue32105@psf.upfronthosting.co.za> Message-ID: <1511280402.21.0.912454111764.issue32105@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4430 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 11:16:42 2017 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 21 Nov 2017 16:16:42 +0000 Subject: [docs] [issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation In-Reply-To: <1511277913.62.0.213398074469.issue32105@psf.upfronthosting.co.za> Message-ID: <1511281002.85.0.213398074469.issue32105@psf.upfronthosting.co.za> Yury Selivanov added the comment: New changeset d7ed48c2b8c11bb99da3661e8fe0bf5ae7f6b8d7 by Yury Selivanov (Miss Islington (bot)) in branch '3.6': bpo-32105: add asyncio.BaseEventLoop.connect_accepted_socket versionadded to documentation. (GH-4491) (#4493) https://github.com/python/cpython/commit/d7ed48c2b8c11bb99da3661e8fe0bf5ae7f6b8d7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 11:16:54 2017 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 21 Nov 2017 16:16:54 +0000 Subject: [docs] [issue32105] Please add asyncio.BaseEventLoop.connect_accepted_socket Version Added to documentation In-Reply-To: <1511277913.62.0.213398074469.issue32105@psf.upfronthosting.co.za> Message-ID: <1511281014.28.0.912454111764.issue32105@psf.upfronthosting.co.za> Change by Yury Selivanov : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 12:04:18 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Nov 2017 17:04:18 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511283858.52.0.213398074469.issue32099@psf.upfronthosting.co.za> Raymond Hettinger added the comment: While we're on the topic, I had some thought of also adding a similar recipe to https://docs.python.org/3/library/collections.html#deque-recipes . The alternative recipe is slower is common cases but doesn't degrade when there are a huge number of iterables: def roundrobin(*iterables): "roundrobin('ABC', 'D', 'EF') --> A D E B F C" nexts = deque(iter(it).__next__ for it in iterables) while nexts: try: while True: yield nexts[0]() nexts.rotate(-1) except StopIteration: nexts.popleft() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 12:28:56 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Nov 2017 17:28:56 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511285336.42.0.213398074469.issue32099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Today I have published a similar recipe on Python-Ideas. It uses popleft/append instead of __getitem__/rotate. def roundrobin(*iterables): "roundrobin('ABC', 'D', 'EF') --> A D E B F C" nexts = deque(iter(it).__next__ for it in iterables) popleft = nexts.popleft append = nexts.append while nexts: next = popleft() try: yield next() except StopIteration: pass else: append(next) It is faster (10-25%) in all microbenchmarks that I did (Steven's benchmarks for small number of iterables and my examples for large number of iterables). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 14:35:04 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 21 Nov 2017 19:35:04 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511292904.25.0.213398074469.issue32099@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Really, I don't give a whit about the micro-benchmarks -- that completely misses the point. The recipes are primarily intended to have educational value on ways to use itertools, deques, and whatnot. For itertools, I'm satisfied with new variable name and the additional comment. For collections, there is an open question about whether adding an extra example would make users better off. Beyond that, I have little interest is exploring all the little variants or wasting further time on this (that is what ASPN, StackOverflow, and blog posts are for). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 14:39:49 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 21 Nov 2017 19:39:49 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511293189.54.0.213398074469.issue32099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But why use less efficient code? Is my code worse? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 21 19:10:06 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 22 Nov 2017 00:10:06 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511309406.38.0.912454111764.issue32099@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- pull_requests: +4434 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 22 01:46:32 2017 From: report at bugs.python.org (YCmove) Date: Wed, 22 Nov 2017 06:46:32 +0000 Subject: [docs] [issue32109] Separated square brackets will generate a tuple instead of a list. Message-ID: <1511333192.36.0.912454111764.issue32109@psf.upfronthosting.co.za> Change by YCmove : ---------- assignee: docs at python components: Documentation nosy: YCmove, docs at python priority: normal severity: normal status: open title: Separated square brackets will generate a tuple instead of a list. type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 22 01:54:39 2017 From: report at bugs.python.org (YCmove) Date: Wed, 22 Nov 2017 06:54:39 +0000 Subject: [docs] [issue32109] Separated square brackets will generate a tuple instead of a list. Message-ID: <1511333679.6.0.912454111764.issue32109@psf.upfronthosting.co.za> Change by YCmove : ---------- keywords: +patch pull_requests: +4435 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 22 02:09:18 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 22 Nov 2017 07:09:18 +0000 Subject: [docs] [issue32109] Separated square brackets will generate a tuple instead of a list. Message-ID: <1511334558.68.0.213398074469.issue32109@psf.upfronthosting.co.za> New submission from Berker Peksag : Thank you for your report and for the PR, but I think you misunderstood documentation: Using square brackets, separating items with commas: [a], [a, b, c] The comma is used to show two different lists: a list with one item ``[a]`` *and* a list with three items ``[a, b, c]``, not a tuple with two lists ``[a], [a, b, c]`` (In Python, both ``(1,)`` and ``1,`` create a tuple) ---------- nosy: +berker.peksag resolution: -> not a bug stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 22 06:07:26 2017 From: report at bugs.python.org (Cheryl Sabella) Date: Wed, 22 Nov 2017 11:07:26 +0000 Subject: [docs] [issue32109] Separated square brackets will generate a tuple instead of a list. In-Reply-To: <1511334558.68.0.213398074469.issue32109@psf.upfronthosting.co.za> Message-ID: <1511348846.67.0.213398074469.issue32109@psf.upfronthosting.co.za> Cheryl Sabella added the comment: Perhaps this is what the YCMove meant? >>> a = [1], [2, 3, 4] >>> a ([1], [2, 3, 4]) >>> ---------- nosy: +csabella _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 22 06:37:01 2017 From: report at bugs.python.org (Berker Peksag) Date: Wed, 22 Nov 2017 11:37:01 +0000 Subject: [docs] [issue32109] Separated square brackets will generate a tuple instead of a list. In-Reply-To: <1511334558.68.0.213398074469.issue32109@psf.upfronthosting.co.za> Message-ID: <1511350620.99.0.213398074469.issue32109@psf.upfronthosting.co.za> Berker Peksag added the comment: That's why I mentioned ``[a], [a, b, c]`` in my earlier message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 22 08:28:59 2017 From: report at bugs.python.org (R. David Murray) Date: Wed, 22 Nov 2017 13:28:59 +0000 Subject: [docs] [issue32109] Separated square brackets will generate a tuple instead of a list. In-Reply-To: <1511334558.68.0.213398074469.issue32109@psf.upfronthosting.co.za> Message-ID: <1511357339.61.0.213398074469.issue32109@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, the markup (and therefore how the code is displayed in the docs) clearly indicates that the , between the lists is not part of the python syntax being discussed. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From jobyjohnpk at gmail.com Tue Nov 21 03:14:49 2017 From: jobyjohnpk at gmail.com (Joby John) Date: Tue, 21 Nov 2017 13:44:49 +0530 Subject: [docs] small issue Message-ID: https://docs.python.org/2/library/simplehttpserver.html > extensions_map> "The mapping is used case-insensitively, and so should contain only lower-cased keys." statement is contradicting. -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Wed Nov 22 21:10:39 2017 From: report at bugs.python.org (YCmove) Date: Thu, 23 Nov 2017 02:10:39 +0000 Subject: [docs] [issue32109] Separated square brackets will generate a tuple instead of a list. In-Reply-To: <1511334558.68.0.213398074469.issue32109@psf.upfronthosting.co.za> Message-ID: <1511403039.51.0.213398074469.issue32109@psf.upfronthosting.co.za> YCmove added the comment: Yes, what Cheryl Sabella says is what I was misled to. Took me a while to understand that ``[a]``, ``[a, b, c]`` is not ``[a], [a, b, c]``, how about replace comma to "or" for more clarity? just like it used in [tuple documention](https://github.com/python/cpython/blob/master/Doc/library/stdtypes.rst#tuples) Here is my rephrased version, and I add one more example of comma separated lists in tuple according to R. David Murray. ---------- hgrepos: +374 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 22 23:27:01 2017 From: report at bugs.python.org (Dubslow) Date: Thu, 23 Nov 2017 04:27:01 +0000 Subject: [docs] [issue32118] Docs: add note about sequence comparisons containing non-orderable elements Message-ID: <1511411221.22.0.213398074469.issue32118@psf.upfronthosting.co.za> New submission from Dubslow : In sequence comparisons, the enforcement of reflexivity of elements means that only non-identical elements are actually compared. The docs then note, with example, that non-reflexive elements thus always "compare" equal inside the sequence. This patch adds a second corollary, that non-orderable singletons (e.g. None) will also not break sequence comparison. Yes, the consequence is logically derivable from the statement "element identity is compared first, and element comparison is performed only for distinct elements", but the first example is given because "For non-reflexive elements, the result is different than for strict element comparison, and may be surprising", which also holds for the example I add here: different from strict element comparison, which may lead to otherwise surprising results (it sure was surprising to me when I expected a list with Nones to fail to compare, hence why I went trawling through the docs). In the manner of the first example, explicit is better than implicit, and (I believe) it will be helpful for readers to have this second consequence demonstrated. ---------- assignee: docs at python components: Documentation messages: 306780 nosy: Dubslow, docs at python priority: normal severity: normal status: open title: Docs: add note about sequence comparisons containing non-orderable elements versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 22 23:28:15 2017 From: report at bugs.python.org (Roundup Robot) Date: Thu, 23 Nov 2017 04:28:15 +0000 Subject: [docs] [issue32118] Docs: add note about sequence comparisons containing non-orderable elements In-Reply-To: <1511411221.22.0.213398074469.issue32118@psf.upfronthosting.co.za> Message-ID: <1511411295.09.0.912454111764.issue32118@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- keywords: +patch pull_requests: +4451 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 22 23:35:42 2017 From: report at bugs.python.org (Dubslow) Date: Thu, 23 Nov 2017 04:35:42 +0000 Subject: [docs] [issue32118] Docs: add note about sequence comparisons containing non-orderable elements In-Reply-To: <1511411221.22.0.213398074469.issue32118@psf.upfronthosting.co.za> Message-ID: <1511411742.34.0.213398074469.issue32118@psf.upfronthosting.co.za> Dubslow added the comment: The PR includes an unrelated one word grammar fix in the same file, that can be removed (by me or by someone else, IDC). This is possibly backportable but I wouldn't know, and leave such decisions for someone who do. ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From mc.marco at yandex.com Wed Nov 22 22:01:42 2017 From: mc.marco at yandex.com (Marco) Date: Thu, 23 Nov 2017 10:01:42 +0700 Subject: [docs] (no subject) Message-ID: The documentation on Classes in the latest Python Tutorial is poorly written and confusing, the author seems to be writing it for C++ programmers, this is not an acceptable assumption for a general introduction to a programming language, the majority of people reading this will not be former C++ programmers. In short, it's not up to standards of technical writing in this context. Thank you From mc.marco at yandex.com Wed Nov 22 22:10:50 2017 From: mc.marco at yandex.com (Marco) Date: Thu, 23 Nov 2017 10:10:50 +0700 Subject: [docs] poor documentation Message-ID: To give a couple of examples to my previous message: "Although scopes are determined statically, they are used dynamically." What on earth does this mean? "It is important to realize that scopes are determined textually: the global scope of a function defined in a module is that module?s namespace, no matter from where or by what alias the function is called. On the other hand, the actual search for names is done dynamically, at run time ? however, the language definition is evolving towards static name resolution, at ?compile? time, so don?t rely on dynamic name resolution! (In fact, local variables are already determined statically.)" What does "determined textually" mean? What is "the global scope of a function"? It just said functions have a separate local scope. Now it's global? I don't get it, what was the person who wrote this smoking? Is this really the tutorial you recommend to people starting your language? -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Thu Nov 23 11:12:57 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 23 Nov 2017 16:12:57 +0000 Subject: [docs] [issue32118] Docs: add note about sequence comparisons containing non-orderable elements In-Reply-To: <1511411221.22.0.213398074469.issue32118@psf.upfronthosting.co.za> Message-ID: <1511453577.32.0.213398074469.issue32118@psf.upfronthosting.co.za> R. David Murray added the comment: The surprising thing is the behavior of NaN, which is *not equal* to itself. The statement about orderability says "...are ordered the same as their first unequal elements". This is explicit and unambiguous, there is no difference in this context between the number 1 and the singleton None, or the reflexivity enforced on NaN: all are equal to the corresponding element from the other sequence. The whole point of the paragraph is that *no order test is done until the first unequal element is encountered*. If we want to make this *more* explicit, I would suggest simply adding the following sentence after the first example in the original paragraph: "This means that reflexive elements that are otherwise unorderable (such as None and NaN) do not trigger a TypeError during a comparison." ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 23 15:21:40 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 23 Nov 2017 20:21:40 +0000 Subject: [docs] [issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses In-Reply-To: <1495629480.46.0.852726762555.issue30456@psf.upfronthosting.co.za> Message-ID: <1511468500.91.0.912454111764.issue30456@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- keywords: +patch pull_requests: +4466 stage: backport needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 23 15:27:27 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 23 Nov 2017 20:27:27 +0000 Subject: [docs] [issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses In-Reply-To: <1495629480.46.0.852726762555.issue30456@psf.upfronthosting.co.za> Message-ID: <1511468847.89.0.213398074469.issue30456@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset a645b23ffc76073a2eb4e77b88cb7648cfc6ef77 by Berker Peksag in branch '3.6': bpo-30456: Clarify example for duplicates in second argument of isinstance (GH-1699) https://github.com/python/cpython/commit/a645b23ffc76073a2eb4e77b88cb7648cfc6ef77 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 23 15:28:32 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 23 Nov 2017 20:28:32 +0000 Subject: [docs] [issue30456] 2to3 docs: example of fix for duplicates in second argument of isinstance has superfluous parentheses In-Reply-To: <1495629480.46.0.852726762555.issue30456@psf.upfronthosting.co.za> Message-ID: <1511468912.54.0.213398074469.issue30456@psf.upfronthosting.co.za> Berker Peksag added the comment: Looks like I forgot to backport this 3.6 branch. Now it's done. Thanks, Eli. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 2.7, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 23 16:32:25 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 23 Nov 2017 21:32:25 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511472745.16.0.213398074469.issue32099@psf.upfronthosting.co.za> Raymond Hettinger added the comment: New changeset 0858495a50e19defde786a4ec050ec182e920f46 by Raymond Hettinger in branch 'master': bpo-32099 Add deque variant of roundrobin() recipe (#4497) https://github.com/python/cpython/commit/0858495a50e19defde786a4ec050ec182e920f46 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 23 16:33:29 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 23 Nov 2017 21:33:29 +0000 Subject: [docs] [issue32099] Use range in itertools roundrobin recipe In-Reply-To: <1511225667.31.0.213398074469.issue32099@psf.upfronthosting.co.za> Message-ID: <1511472809.59.0.912454111764.issue32099@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 01:26:48 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Nov 2017 06:26:48 +0000 Subject: [docs] [issue32122] Improve -x option documentation Message-ID: <1511504808.14.0.213398074469.issue32122@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The documentation of the -x option is virtually not existing. The current short line of the description was enough to me for understanding what is the purpose of this option and how it can be used (I didn't use Windows for more than 10 years). But I was surprised not founding more detailed information about this feature in the documentation. Definitely it should be better documented. Most of users will have no ideas about this feature. The purpose of this option is turning Python scripts into Windows batch files which can be ran as other executables. Similarly as adding she-bang and setting the executable bit allows to run them on Unix. The extension of the Python script should be changed to ".bat", and the following line should be added at the start of the script: @path\to\python -x %0 %* & exit /b Or @py -3 -x %0 %* & exit /b Unlike a she-bang line which is a Python comment, this line is not valid Python syntax, and the -x option is used for skipping it. ---------- assignee: docs at python components: Documentation, Windows messages: 306878 nosy: docs at python, paul.moore, serhiy.storchaka, steve.dower, tim.golden, zach.ware priority: normal severity: normal stage: needs patch status: open title: Improve -x option documentation type: enhancement versions: Python 2.7, Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 08:19:16 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Nov 2017 13:19:16 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() Message-ID: <1511529556.02.0.213398074469.issue32124@psf.upfronthosting.co.za> New submission from STINNER Victor : Follow-up of bpo-32086, bpo-32096 and "[Python-Dev] Python initialization and embedded Python" thread: https://mail.python.org/pipermail/python-dev/2017-November/150605.html I propose to explicitly list functions that can be safetely called before Py_Initialize(). This safety warranty must be part of the C API. Maybe we should even test all tests function in test_capi using Programs/_testembed, as we did for Py_DecodeLocale() and Py_SetProgramName() in commit 9e87e7776f7ace66baaf7247233afdabd00c2b44 ("pre_initialization_api" test). Attached PR adds proposed documentation. It also documents "global configuration variables" like Py_DebugFlag. ---------- assignee: docs at python components: Documentation messages: 306894 nosy: docs at python, eric.snow, ncoghlan, vstinner priority: normal severity: normal status: open title: Document functions safe to be called before Py_Initialize() versions: Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 08:22:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Nov 2017 13:22:20 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() In-Reply-To: <1511529556.02.0.213398074469.issue32124@psf.upfronthosting.co.za> Message-ID: <1511529740.8.0.912454111764.issue32124@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- keywords: +patch pull_requests: +4474 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 09:09:12 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Nov 2017 14:09:12 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() In-Reply-To: <1511529556.02.0.213398074469.issue32124@psf.upfronthosting.co.za> Message-ID: <1511532552.38.0.213398074469.issue32124@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Are you sure about PyMem_Malloc() and PyObject_Malloc()? What functions require them? I thought only PyMem_RawMalloc() can be called before Py_Initialize(). I think that for all functions that *can* or *should* be called before Py_Initialize() this should be explicitly documented in the documentation of this function, like for Py_SetProgramName() and PyImport_AppendInittab(). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 11:05:00 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Nov 2017 16:05:00 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() In-Reply-To: <1511529556.02.0.213398074469.issue32124@psf.upfronthosting.co.za> Message-ID: <1511539500.4.0.213398074469.issue32124@psf.upfronthosting.co.za> STINNER Victor added the comment: > Are you sure about PyMem_Malloc() and PyObject_Malloc()? Technically, the pymalloc memory allocator is initialized statically by the compiler, from the first instruction of the process. But maybe we should not suggest users to call them, especially because the allocator can be modified by the PYTHONMALLOC environment variable. > What functions require them? No function to initalize Python require PyMem or PyObject allocators. Only PyMem_Raw allocator is needed. Py_EncodeLocale() uses it, but this function also uses Python objects (str, bytes), and so Py_EncodeLocale() must no be called before Py_Initialize(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 13:28:07 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Nov 2017 18:28:07 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() In-Reply-To: <1511529556.02.0.213398074469.issue32124@psf.upfronthosting.co.za> Message-ID: <1511548087.69.0.213398074469.issue32124@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Should PyMem_SetAllocator() and PyObject_SetArenaAllocator() be called before Py_Initialize(), or they can be called after it? If PyMem_Malloc() and PyObject_Malloc() are not needed for pre-initialization, should we support calling them before Py_Initialize()? There are other functions and macros that can be safely used before Py_Initialize(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 14:14:29 2017 From: report at bugs.python.org (Toby Berla) Date: Fri, 24 Nov 2017 19:14:29 +0000 Subject: [docs] [issue32127] tutorial on dictionaries has error in example Message-ID: <1511550869.58.0.213398074469.issue32127@psf.upfronthosting.co.za> New submission from Toby Berla : in https://docs.python.org/3/tutorial/datastructures.html: ----- 5.5. Dictionaries ... Here is a small example using a dictionary: >>> >>> tel = {'jack': 4098, 'sape': 4139} >>> tel['guido'] = 4127 >>> tel {'sape': 4139, 'guido': 4127, 'jack': 4098} ----- I think the order of dictionary elements shown after 'guido' is inserted is wrong. The correct order is: {'jack': 4098, 'sape': 4139, 'guido': 4127} ---------- assignee: docs at python components: Documentation messages: 306913 nosy: docs at python, tberla priority: normal severity: normal status: open title: tutorial on dictionaries has error in example versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 14:16:52 2017 From: report at bugs.python.org (Eric V. Smith) Date: Fri, 24 Nov 2017 19:16:52 +0000 Subject: [docs] [issue32127] tutorial on dictionaries has error in example In-Reply-To: <1511550869.58.0.213398074469.issue32127@psf.upfronthosting.co.za> Message-ID: <1511551012.71.0.213398074469.issue32127@psf.upfronthosting.co.za> Eric V. Smith added the comment: dict makes no guarantees on ordering, so I think the example is fine. There is no "correct" ordering. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 14:25:53 2017 From: report at bugs.python.org (Toby Berla) Date: Fri, 24 Nov 2017 19:25:53 +0000 Subject: [docs] [issue32127] tutorial on dictionaries has error in example In-Reply-To: <1511550869.58.0.213398074469.issue32127@psf.upfronthosting.co.za> Message-ID: <1511551553.69.0.213398074469.issue32127@psf.upfronthosting.co.za> Toby Berla added the comment: Thanks, Eric. (I'm new to Python.) Perhaps I should have paid closer attention to the description of the dictionary data structure -- "Performing list(d.keys()) on a dictionary returns a list of all the keys used in the dictionary, in arbitrary order" -- rather than just jumping ahead to the code example. ;-) ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 15:38:22 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Nov 2017 20:38:22 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() In-Reply-To: <1511529556.02.0.213398074469.issue32124@psf.upfronthosting.co.za> Message-ID: <1511555902.55.0.213398074469.issue32124@psf.upfronthosting.co.za> STINNER Victor added the comment: > Should PyMem_SetAllocator() and PyObject_SetArenaAllocator() be called before Py_Initialize(), or they can be called after it? I'm quite sure that calling PyMem_SetAllocator() or PyObject_SetArenaAllocator() after Py_Initialize() will quickly crash. > If PyMem_Malloc() and PyObject_Malloc() are not needed for pre-initialization, should we support calling them before Py_Initialize()? We don't have to support them. Ok, I remove them from the pre-init documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 15:43:36 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Nov 2017 20:43:36 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() In-Reply-To: <1511555902.55.0.213398074469.issue32124@psf.upfronthosting.co.za> Message-ID: <1919935.nP2zlzugBP@saraksh> Serhiy Storchaka added the comment: > I'm quite sure that calling PyMem_SetAllocator() or > PyObject_SetArenaAllocator() after Py_Initialize() will quickly crash. Then document this explicitly like for other functions that *should* be called before Py_Initialize() if called at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 16:30:29 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Nov 2017 21:30:29 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() In-Reply-To: <1511529556.02.0.213398074469.issue32124@psf.upfronthosting.co.za> Message-ID: <1511559029.8.0.213398074469.issue32124@psf.upfronthosting.co.za> STINNER Victor added the comment: New changeset 84c4b1938fade2b425ac906730beabd413de094d by Victor Stinner in branch 'master': bpo-32124: Document C functions safe before init (#4540) https://github.com/python/cpython/commit/84c4b1938fade2b425ac906730beabd413de094d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 16:33:03 2017 From: report at bugs.python.org (STINNER Victor) Date: Fri, 24 Nov 2017 21:33:03 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() In-Reply-To: <1511529556.02.0.213398074469.issue32124@psf.upfronthosting.co.za> Message-ID: <1511559183.6.0.213398074469.issue32124@psf.upfronthosting.co.za> STINNER Victor added the comment: > Then document this explicitly like for other functions that *should* be called before Py_Initialize() if called at all. I agree that it would be even better to document if a function must not be called after Py_Initialize(). *But* I'm not sure of what I wrote, I have to check the code, and maybe even test manually to "see what happens" (ensure that it works) :-) So I decided to push my first PR, and will work on a second PR later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 17:05:36 2017 From: report at bugs.python.org (Eric Snow) Date: Fri, 24 Nov 2017 22:05:36 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() In-Reply-To: <1511529556.02.0.213398074469.issue32124@psf.upfronthosting.co.za> Message-ID: <1511561136.47.0.213398074469.issue32124@psf.upfronthosting.co.za> Eric Snow added the comment: I've left a review (writing it as you merged the PR). My main concern is that we not promise more than we must. Every pre-init function or variable we promise to embedders represents global state that is hard to get rid of. It also entrenches pre-init API and state that we're aiming to deprecate (via PEP 432). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 17:48:21 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 24 Nov 2017 22:48:21 +0000 Subject: [docs] [issue32118] Docs: add note about sequence comparisons containing non-orderable elements In-Reply-To: <1511411221.22.0.213398074469.issue32118@psf.upfronthosting.co.za> Message-ID: <1511563700.97.0.213398074469.issue32118@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This whole section has become a mess an is now more complex that the underlying code. Adding more caveats, special cases, and atypical examples will make it worse (rather like the U.S. tax code, another example of bad technical writing). I recommend the whole section be rewritten, extracting the most general rules and with examples that cover the general rules. There can then be brief separate paragraphs for language lawyers that cover what makes NaNs and None unusual (none of the comparison logic special cases these value -- their interesting behaviors are intrinsic to the object itself). ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 19:05:26 2017 From: report at bugs.python.org (Decorater) Date: Sat, 25 Nov 2017 00:05:26 +0000 Subject: [docs] [issue30396] Document the PyClassMethod* C API functions. In-Reply-To: <1495072171.73.0.812244452186.issue30396@psf.upfronthosting.co.za> Message-ID: <1511568326.01.0.912454111764.issue30396@psf.upfronthosting.co.za> Change by Decorater : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 20:42:56 2017 From: report at bugs.python.org (Eric V. Smith) Date: Sat, 25 Nov 2017 01:42:56 +0000 Subject: [docs] [issue32127] tutorial on dictionaries has error in example In-Reply-To: <1511550869.58.0.213398074469.issue32127@psf.upfronthosting.co.za> Message-ID: <1511574176.1.0.213398074469.issue32127@psf.upfronthosting.co.za> Eric V. Smith added the comment: No problem. Welcome to Python! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 22:32:11 2017 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 25 Nov 2017 03:32:11 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() In-Reply-To: <1511529556.02.0.213398074469.issue32124@psf.upfronthosting.co.za> Message-ID: <1511580731.2.0.213398074469.issue32124@psf.upfronthosting.co.za> Nick Coghlan added the comment: Key point to note regarding PEP 432: at least personally, I'm not actually aiming to deprecate the legacy embedding API. Instead, I'm just aiming to eventually stop *adding* to it, with new config structs replacing the current ad hoc mix of pre-init function calls, C globals, environment variables, and filesystem state. That means I'm quite willing to accept maintaining compatibility for applications using the current single phase initialisation approach as a design constraint for the PEP. We have a similar constraint in place for extension modules: even though any *new* features we introduce are likely to be dependent on switching over to PEP 489's multi-phase initialisation APIs, we still ensure that single-phase initialisation continues working for existing modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 23:56:02 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Nov 2017 04:56:02 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1511585762.76.0.213398074469.issue30004@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 610e5afdcbe3eca906ef32f4e0364e20e1b1ad23 by Mariatta (Mandeep Bhutani) in branch 'master': bpo-30004: Fix the code example of using group in Regex Howto Docs (GH-4443) https://github.com/python/cpython/commit/610e5afdcbe3eca906ef32f4e0364e20e1b1ad23 ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 23:56:10 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 25 Nov 2017 04:56:10 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1511585770.9.0.912454111764.issue30004@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4485 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Nov 24 23:57:10 2017 From: report at bugs.python.org (Roundup Robot) Date: Sat, 25 Nov 2017 04:57:10 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1511585830.15.0.912454111764.issue30004@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4486 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 25 00:01:42 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Nov 2017 05:01:42 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1511586102.76.0.213398074469.issue30004@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset c02037d62284f4d4ca6b22f2ed05165ce2014951 by Mariatta (Miss Islington (bot)) in branch '2.7': bpo-30004: Fix the code example of using group in Regex Howto Docs (GH-4443) (GH-4555) https://github.com/python/cpython/commit/c02037d62284f4d4ca6b22f2ed05165ce2014951 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 25 00:03:06 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Nov 2017 05:03:06 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1511586186.73.0.213398074469.issue30004@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 3e60747025edc34b503397ab8211be59cfdd05cd by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-30004: Fix the code example of using group in Regex Howto Docs (GH-4443) (GH-4554) https://github.com/python/cpython/commit/3e60747025edc34b503397ab8211be59cfdd05cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 25 00:03:50 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sat, 25 Nov 2017 05:03:50 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1511586230.44.0.213398074469.issue30004@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: Thanks everyone. I merged the PR, and it's been backported to 3.6 and 2.7 ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 25 02:03:29 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Nov 2017 07:03:29 +0000 Subject: [docs] [issue30004] in regex-howto, improve example on grouping In-Reply-To: <1491453642.54.0.802330198745.issue30004@psf.upfronthosting.co.za> Message-ID: <1511593409.83.0.213398074469.issue30004@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Cristian for reporting this issue. Thank you Mandeep for your patch. Thank you Mariatta for merging. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 25 13:31:43 2017 From: report at bugs.python.org (abcdef) Date: Sat, 25 Nov 2017 18:31:43 +0000 Subject: [docs] [issue32133] documentation: numbers module nitpick Message-ID: <1511634703.59.0.213398074469.issue32133@psf.upfronthosting.co.za> New submission from abcdef : Documentation of the numbers module: https://docs.python.org/3/library/numbers.html states "None of the types defined in this module can be instantiated." This is true for Complex, Real, Rational, Integral but not for Number: >>> numbers.Number() >>> numbers.Real() Traceback (most recent call last): File "", line 1, in TypeError: Can't instantiate abstract class Real... Since Number doesn't have any abstract methods, the correct fix seems to be changing the documentation. I would try to convey something like this: "The types defined in this module can be used for subclassing and checking whether a specific class is in the numeric hierarchy; they are not used directly for instantiation. For this, you can use types such as `complex` or `fractions.Fraction`". ---------- assignee: docs at python components: Documentation messages: 306970 nosy: abcdef, docs at python priority: normal severity: normal status: open title: documentation: numbers module nitpick type: enhancement versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Nov 25 17:49:18 2017 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 25 Nov 2017 22:49:18 +0000 Subject: [docs] [issue32118] Doc for comparison of sequences with non-orderable elements In-Reply-To: <1511411221.22.0.213398074469.issue32118@psf.upfronthosting.co.za> Message-ID: <1511650158.88.0.213398074469.issue32118@psf.upfronthosting.co.za> Terry J. Reedy added the comment: (Raymond, I wrote this before reading your message, but I believe it provides what you requested. There is nothing special about None that is relevant to sequence comparison. Nans just happen to be the only built-in non-reflexive objects (that I know of, thank goodness).) This issue is about order comparisons *also* being defined on a single object in a sequence and therefore also possibly giving a different result. Title revised to be clearer and short enough to all be visible. Demonstration: >>> a = object() >>> a == a, a != a # but a < a, a <= a, a >= a, a > a raise TypeError (True, False) >>> la = [a] >>> la == la, la != la, la < la, la <= la, la >= la, la > la (True, False, False, True, True, False) Comparison of two sequences infers from identity all 6 rich comparison results on a single object in corresponding positions of the two sequences. This has nothing to do with the object being a singleton, other than a singleton being a single object. The enforcement of reflexivity and enforcement of consistent order on single objects are related, but the latter did not have to follow from the first. The presentation of order, in the patch, by reference to singletons and reflexivity, does not work. As I said in review, the example is too long and wrongly placed. I think using a generic object instead of None would also be better. I would like to rewrite the sequence comparison paragraphs after the first as something like the following. --- Sequences compare lexicographically using comparison of corresponding elements. The two objects are first compared for identity. If they are distinct, they are compared normally. If they are the same object, the self comparisons are inferred: '==', '>=', and '<=' are true, while '!=', '>', and '<' are false. By design, the inferred self comparisons for sequences sometimes give different results than would strict element comparison. Instances of an unordered class become ordered with respect to themselves instead of raising a TypeError. >>> a = object() >>> a < a # By default, objects are not ordered Traceback (most recent call last): File "", line 1, in TypeError: '>=' not supported between instances of 'object' and 'object' >>> [a] < [a] False # Sequence comparison orders an object versus itself Even anti-reflexive not-a-number values, for example, are treated as reflexive (meaning a == a always). --- This re-write describes sequence comparison in one paragraph, instead of putting the details in the middle of the next paragraph. The next paragraph describes the two possible consequences of inferring comparisons from identify: a result instead of a raise, and a different result. ---------- nosy: +terry.reedy title: Docs: add note about sequence comparisons containing non-orderable elements -> Doc for comparison of sequences with non-orderable elements _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 02:32:43 2017 From: report at bugs.python.org (Sanyam Khurana) Date: Sun, 26 Nov 2017 07:32:43 +0000 Subject: [docs] [issue22671] Typo in class io.BufferedIOBase docs In-Reply-To: <1413711352.27.0.0253692424247.issue22671@psf.upfronthosting.co.za> Message-ID: <1511681563.39.0.912454111764.issue22671@psf.upfronthosting.co.za> Change by Sanyam Khurana : ---------- pull_requests: +4496 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 06:50:09 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 26 Nov 2017 11:50:09 +0000 Subject: [docs] [issue31937] Add the term "dunder" to the glossary In-Reply-To: <1509742669.66.0.213398074469.issue31937@psf.upfronthosting.co.za> Message-ID: <1511697008.92.0.213398074469.issue31937@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The term "dunder" is used in PEPs: PEP 8, PEP 408, PEP 435, PEP 505, PEP 520, PEP 526, and in the enum module documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 11:05:48 2017 From: report at bugs.python.org (Scott Queen) Date: Sun, 26 Nov 2017 16:05:48 +0000 Subject: [docs] [issue32142] heapq.heappop - documentation misleading or doesn't work Message-ID: <1511712348.11.0.213398074469.issue32142@psf.upfronthosting.co.za> New submission from Scott Queen : The documentation for heapq.heappop(heap) says: "Pop and return the smallest item from the heap, maintaining the heap invariant. If the heap is empty, IndexError is raised. To access the smallest item without popping it, use heap[0]." yet, in the following code, the resultant heap doesn't reflect the heap invariant: import heapq li = [5, 7, 9, 1, 4, 3] heapq.heapify(li) #change a couple values in the heap li[3] = 16 li[4] = 2 print (heapq.heappop(li)) print ("The heap after pop is : ",end="") print (list(li)) This prints: The heap after pop is : [3, 4, 9, 16, 2] The documentation implies to me that heapify would be called internally after heappop, but I may be misreading. Perhaps heappop could say that the heap invariant is maintained if the heap is properly sorted before the heappop invocation. ---------- assignee: docs at python components: Documentation messages: 307006 nosy: docs at python, scooter4j priority: normal severity: normal status: open title: heapq.heappop - documentation misleading or doesn't work type: behavior versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 11:24:10 2017 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 26 Nov 2017 16:24:10 +0000 Subject: [docs] [issue32142] heapq.heappop - documentation misleading or doesn't work In-Reply-To: <1511712348.11.0.213398074469.issue32142@psf.upfronthosting.co.za> Message-ID: <1511713450.24.0.213398074469.issue32142@psf.upfronthosting.co.za> Eric V. Smith added the comment: The heap invariant is also required in order to even meet the documented behavior of returning the smallest item. >>> import heapq >>> li = [5, 7, 9, 1, 4, 3] >>> heapq.heapify(li) >>> li [1, 4, 3, 7, 5, 9] >>> li[2] = 0 >>> heapq.heappop(li) 1 >>> li [0, 4, 9, 7, 5] >>> I guess the argument could be made that docs say "from the heap", and by modifying the list yourself it's no longer a heap. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 12:51:24 2017 From: report at bugs.python.org (abcdef) Date: Sun, 26 Nov 2017 17:51:24 +0000 Subject: [docs] [issue32142] heapq.heappop - documentation misleading or doesn't work In-Reply-To: <1511712348.11.0.213398074469.issue32142@psf.upfronthosting.co.za> Message-ID: <1511718684.79.0.213398074469.issue32142@psf.upfronthosting.co.za> abcdef added the comment: > Perhaps heappop could say that the heap invariant is maintained if the heap is properly sorted before the heappop invocation. Honestly I like this wording less. "Properly sorted" would suggest sorted in the sense of heap.sort() [as the docs refer to this earlier], but the array doesn't have to be sorted; it's enough if it's a heap. The function always maintains the invariant - this means that if the invariant is true as a precondition, it will be true as a postcondition. Maybe you have a different idea? ---------- nosy: +abcdef _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 15:24:25 2017 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 26 Nov 2017 20:24:25 +0000 Subject: [docs] [issue32142] heapq.heappop - documentation misleading or doesn't work In-Reply-To: <1511712348.11.0.213398074469.issue32142@psf.upfronthosting.co.za> Message-ID: <1511727865.92.0.213398074469.issue32142@psf.upfronthosting.co.za> Eric V. Smith added the comment: By "sorted" I meant "sorted by the heap functions so as to maintain their invariants". I don't have any suggestion for the actual specific language to use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 16:17:04 2017 From: report at bugs.python.org (Ivan Levkivskyi) Date: Sun, 26 Nov 2017 21:17:04 +0000 Subject: [docs] [issue29879] typing.Text not available in python 3.5.1 In-Reply-To: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> Message-ID: <1511731024.56.0.912454111764.issue29879@psf.upfronthosting.co.za> Change by Ivan Levkivskyi : ---------- keywords: +patch pull_requests: +4501 stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 16:18:32 2017 From: report at bugs.python.org (Zachary Ware) Date: Sun, 26 Nov 2017 21:18:32 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1511731112.48.0.213398074469.issue30487@psf.upfronthosting.co.za> Zachary Ware added the comment: New changeset d8d6b9122134f040cd5a4f15f40f6c9e3386db4d by Zachary Ware (Caleb Hattingh) in branch 'master': bpo-30487: automatically create a venv and install Sphinx when running make (GH-4346) https://github.com/python/cpython/commit/d8d6b9122134f040cd5a4f15f40f6c9e3386db4d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 16:20:07 2017 From: report at bugs.python.org (Zachary Ware) Date: Sun, 26 Nov 2017 21:20:07 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1511731207.14.0.912454111764.issue30487@psf.upfronthosting.co.za> Change by Zachary Ware : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 17:23:05 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 26 Nov 2017 22:23:05 +0000 Subject: [docs] [issue29879] typing.Text not available in python 3.5.1 In-Reply-To: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> Message-ID: <1511734984.95.0.213398074469.issue29879@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset 0cd2e81bea639828d7c9a7afc61fb1da9699492c by Mariatta (Ivan Levkivskyi) in branch 'master': bpo-29879: Update typing documentation. (GH-4573) https://github.com/python/cpython/commit/0cd2e81bea639828d7c9a7afc61fb1da9699492c ---------- nosy: +Mariatta _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 17:23:17 2017 From: report at bugs.python.org (Roundup Robot) Date: Sun, 26 Nov 2017 22:23:17 +0000 Subject: [docs] [issue29879] typing.Text not available in python 3.5.1 In-Reply-To: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> Message-ID: <1511734997.73.0.912454111764.issue29879@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4502 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 17:27:47 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 26 Nov 2017 22:27:47 +0000 Subject: [docs] [issue29879] typing.Text not available in python 3.5.1 In-Reply-To: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> Message-ID: <1511735266.96.0.213398074469.issue29879@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: New changeset cceb0f8d7b3451fb8de03651c979f5ac639b68c0 by Mariatta (Miss Islington (bot)) in branch '3.6': bpo-29879: Update typing documentation. (GH-4573) (GH-4574) https://github.com/python/cpython/commit/cceb0f8d7b3451fb8de03651c979f5ac639b68c0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 17:30:30 2017 From: report at bugs.python.org (Mariatta Wijaya) Date: Sun, 26 Nov 2017 22:30:30 +0000 Subject: [docs] [issue29879] typing.Text not available in python 3.5.1 In-Reply-To: <1490191885.24.0.466307693119.issue29879@psf.upfronthosting.co.za> Message-ID: <1511735430.82.0.213398074469.issue29879@psf.upfronthosting.co.za> Mariatta Wijaya added the comment: This has been fixed in the 3.7 and 3.6 branches. Thanks all! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.6, Python 3.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 20:18:37 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 27 Nov 2017 01:18:37 +0000 Subject: [docs] [issue32051] Possible issue in multiprocessing doc In-Reply-To: <1510853224.34.0.213398074469.issue32051@psf.upfronthosting.co.za> Message-ID: <1511745517.72.0.213398074469.issue32051@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset c172fc5031a4035986bef0b2fcef906706d7abf3 by Berker Peksag (Jason Yang) in branch 'master': bpo-32051: Fix name shadowing in multiprocessing docs (GH-4469) https://github.com/python/cpython/commit/c172fc5031a4035986bef0b2fcef906706d7abf3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 20:18:49 2017 From: report at bugs.python.org (Roundup Robot) Date: Mon, 27 Nov 2017 01:18:49 +0000 Subject: [docs] [issue32051] Possible issue in multiprocessing doc In-Reply-To: <1510853224.34.0.213398074469.issue32051@psf.upfronthosting.co.za> Message-ID: <1511745529.42.0.912454111764.issue32051@psf.upfronthosting.co.za> Change by Roundup Robot : ---------- pull_requests: +4505 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 20:22:53 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 27 Nov 2017 01:22:53 +0000 Subject: [docs] [issue32051] Possible issue in multiprocessing doc In-Reply-To: <1510853224.34.0.213398074469.issue32051@psf.upfronthosting.co.za> Message-ID: <1511745773.29.0.213398074469.issue32051@psf.upfronthosting.co.za> Berker Peksag added the comment: New changeset 8a957534f5182022ee8ac2dbaac4b4900dc98159 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-32051: Fix name shadowing in multiprocessing docs (GH-4469) https://github.com/python/cpython/commit/8a957534f5182022ee8ac2dbaac4b4900dc98159 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 20:23:18 2017 From: report at bugs.python.org (Berker Peksag) Date: Mon, 27 Nov 2017 01:23:18 +0000 Subject: [docs] [issue32051] Possible issue in multiprocessing doc In-Reply-To: <1510853224.34.0.213398074469.issue32051@psf.upfronthosting.co.za> Message-ID: <1511745798.91.0.213398074469.issue32051@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Nov 26 23:58:51 2017 From: report at bugs.python.org (Scott Queen) Date: Mon, 27 Nov 2017 04:58:51 +0000 Subject: [docs] [issue32142] heapq.heappop - documentation misleading or doesn't work In-Reply-To: <1511718684.79.0.213398074469.issue32142@psf.upfronthosting.co.za> Message-ID: Scott Queen added the comment: Fair statement. "Properly sorted" was a poor choice. Seems that "if the invariant is true as a precondition, it will be true as a postcondition" is accurate and descriptive - maybe with a caution that modifying the list (heap) values by means other than the heapq functions are likely to render the invariant false (the latter phrase being for somewhat newbies like me who wouldn't realize this truth without having to learn it in the debugger). On Sun, Nov 26, 2017 at 10:51 AM, abcdef wrote: > > abcdef added the comment: > > > Perhaps heappop could say that the heap invariant is maintained if the > heap is properly sorted before the heappop invocation. > > Honestly I like this wording less. "Properly sorted" would suggest sorted > in the sense of heap.sort() [as the docs refer to this earlier], but the > array doesn't have to be sorted; it's enough if it's a heap. The function > always maintains the invariant - this means that if the invariant is true > as a precondition, it will be true as a postcondition. Maybe you have a > different idea? > > ---------- > nosy: +abcdef > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 03:34:13 2017 From: report at bugs.python.org (Maurizio Zucchelli) Date: Mon, 27 Nov 2017 08:34:13 +0000 Subject: [docs] [issue32145] Wrong ExitStack Callback recipe Message-ID: <1511771653.67.0.213398074469.issue32145@psf.upfronthosting.co.za> New submission from Maurizio Zucchelli : The documentation for contextlib.ExitStack (https://docs.python.org/3.7/library/contextlib.html#replacing-any-use-of-try-finally-and-flag-variables) shows an helper class (Callback) to perform cleanup using a callback. Problem is, Callback.cancel() calls ExitStack.pop_all(), which in turn calls type(self)(), this is not a valid constructor for Callback, since it always expects at least one element. (I have marked only Python 3.4 and 3.6 since those are the versions where I verified this, but it likely applies to every version.) ---------- assignee: docs at python components: Documentation messages: 307037 nosy: Denaun, docs at python priority: normal severity: normal status: open title: Wrong ExitStack Callback recipe type: crash versions: Python 3.4, Python 3.6 _______________________________________ Python tracker _______________________________________ From nijazxp at gmail.com Thu Nov 23 12:54:55 2017 From: nijazxp at gmail.com (=?UTF-8?Q?Nijaz_Muratovi=C4=87?=) Date: Thu, 23 Nov 2017 18:54:55 +0100 Subject: [docs] Should I download documentation if I downloaded python? Message-ID: I've seen pyhton has it's help files when installed. Is that enough, meaning are these help files samme as separate documentation? You offer as html in zip or pdf or text, and separate chm... From report at bugs.python.org Mon Nov 27 16:12:46 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Nov 2017 21:12:46 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1511817166.79.0.213398074469.issue30487@psf.upfronthosting.co.za> Ned Deily added the comment: I don't think this is a good idea. It has already caused problems with one buildbot (Issue32149) and will likely break other build scripts. As the Doc Makefile stood previous to this commit, the Doc builds could take advantage of either a system-installed or user-supplied Sphinx and blurb without having to use the venv step. Unless there are major objections, I am going to at least temporarily revert it. ---------- nosy: +ned.deily resolution: fixed -> stage: resolved -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 16:23:33 2017 From: report at bugs.python.org (Caleb Hattingh) Date: Mon, 27 Nov 2017 21:23:33 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1511817166.79.0.213398074469.issue30487@psf.upfronthosting.co.za> Message-ID: Caleb Hattingh added the comment: Hi Ned It's still supposed to allow both. It sounds like it's not working properly. I'll have a look. FYI, I worked on this for Zach Ware who is the primary stakeholder for this feature. Rgds Caleb > On 28 Nov 2017, at 7:12 AM, Ned Deily wrote: > > > Ned Deily added the comment: > > I don't think this is a good idea. It has already caused problems with one buildbot (Issue32149) and will likely break other build scripts. As the Doc Makefile stood previous to this commit, the Doc builds could take advantage of either a system-installed or user-supplied Sphinx and blurb without having to use the venv step. Unless there are major objections, I am going to at least temporarily revert it. > > ---------- > nosy: +ned.deily > resolution: fixed -> > stage: resolved -> needs patch > status: closed -> open > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 16:26:50 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Nov 2017 21:26:50 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1511818010.69.0.213398074469.issue30487@psf.upfronthosting.co.za> Ned Deily added the comment: One problem is that the venv can't always be automatically built in all environments, as a recent Python 3 needs to be available in the right location. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 16:40:29 2017 From: report at bugs.python.org (Zachary Ware) Date: Mon, 27 Nov 2017 21:40:29 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1511818829.56.0.213398074469.issue30487@psf.upfronthosting.co.za> Zachary Ware added the comment: Go ahead with the revert, Ned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 16:50:18 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Nov 2017 21:50:18 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1511819418.19.0.912454111764.issue30487@psf.upfronthosting.co.za> Change by Ned Deily : ---------- pull_requests: +4516 stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 16:58:15 2017 From: report at bugs.python.org (Caleb Hattingh) Date: Mon, 27 Nov 2017 21:58:15 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1511819895.86.0.213398074469.issue30487@psf.upfronthosting.co.za> Caleb Hattingh added the comment: It looks like the check for an existing sphinx-build passes, and so no new venv is made, but this also means that blurb doesn't get installed. I was concerned about this, but figured that at least the buildbots would create new envs each time, and this would only be an issue that a user with an odd configuration might have. Sorry for the trouble. The feature was simpler when it was only sphinx. Now that blurb is there too, the logic for checking what is and isn't already present becomes a bit complex to reason through. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 17:03:18 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Nov 2017 22:03:18 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1511820198.75.0.213398074469.issue30487@psf.upfronthosting.co.za> Ned Deily added the comment: "Now that blurb is there too, the logic for checking what is and isn't already present becomes a bit complex to reason through." Yeah, it is a bit complicated. There's also the issue of trying to use a make recipe to ensure a "venv" exists and is up-to-date. I don't necessarily want to abandon the idea (and sorry I wasn't around to review the proposed change initially) but let's at least hold off until 370a3 is out the door. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 17:04:19 2017 From: report at bugs.python.org (Caleb Hattingh) Date: Mon, 27 Nov 2017 22:04:19 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1511820259.21.0.213398074469.issue30487@psf.upfronthosting.co.za> Caleb Hattingh added the comment: Yep, sounds good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 17:07:34 2017 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Nov 2017 22:07:34 +0000 Subject: [docs] [issue30487] DOC: automatically create a venv and install Sphinx when running make In-Reply-To: <1495817388.46.0.640927890572.issue30487@psf.upfronthosting.co.za> Message-ID: <1511820454.75.0.912454111764.issue30487@psf.upfronthosting.co.za> Ned Deily added the comment: New changeset 122fc136b34e11906466851e77bb6959946467ee by Ned Deily in branch 'master': Revert "bpo-30487: automatically create a venv and install Sphinx when running make (GH-4346)" (#4592) https://github.com/python/cpython/commit/122fc136b34e11906466851e77bb6959946467ee ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 18:20:28 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 27 Nov 2017 23:20:28 +0000 Subject: [docs] [issue32142] heapq.heappop - documentation misleading or doesn't work In-Reply-To: <1511712348.11.0.213398074469.issue32142@psf.upfronthosting.co.za> Message-ID: <1511824828.56.0.912454111764.issue32142@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 18:22:38 2017 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 27 Nov 2017 23:22:38 +0000 Subject: [docs] [issue32118] Doc for comparison of sequences with non-orderable elements In-Reply-To: <1511411221.22.0.213398074469.issue32118@psf.upfronthosting.co.za> Message-ID: <1511824958.52.0.912454111764.issue32118@psf.upfronthosting.co.za> Change by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Nov 27 23:08:36 2017 From: report at bugs.python.org (Dubslow) Date: Tue, 28 Nov 2017 04:08:36 +0000 Subject: [docs] [issue32118] Doc for comparison of sequences with non-orderable elements In-Reply-To: <1511411221.22.0.213398074469.issue32118@psf.upfronthosting.co.za> Message-ID: <1511842116.03.0.213398074469.issue32118@psf.upfronthosting.co.za> Dubslow added the comment: I like Terry's suggestion much better. I've closed my GitHub PR in favor of Terry's change. My only suggested tweak might be throwing in something like "(e.g." None)", perhaps e.g. "Instances of an unordered class (e.g. None) become ordered...", but even as is, is a major improvement over mine. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 28 15:43:43 2017 From: report at bugs.python.org (Daniel Himmelstein) Date: Tue, 28 Nov 2017 20:43:43 +0000 Subject: [docs] [issue32160] lzma documentation: example to XZ compress file on disk In-Reply-To: <1511901675.08.0.213398074469.issue32160@psf.upfronthosting.co.za> Message-ID: <1511901823.94.0.912454111764.issue32160@psf.upfronthosting.co.za> Change by Daniel Himmelstein : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 28 15:50:26 2017 From: report at bugs.python.org (Daniel Himmelstein) Date: Tue, 28 Nov 2017 20:50:26 +0000 Subject: [docs] [issue32160] lzma documentation: example to XZ compress file on disk In-Reply-To: <1511901675.08.0.213398074469.issue32160@psf.upfronthosting.co.za> Message-ID: <1511902226.0.0.213398074469.issue32160@psf.upfronthosting.co.za> Daniel Himmelstein added the comment: > we could consider an API addition Just brainstorming here... perhaps an API addition would be most appropriate in the shutil module (https://docs.python.org/3.6/library/shutil.html) which already contains shutil.make_archive and shutil.unpack_archive. One could imagine shutil.compress and shutil.decompress that took a format argument to specify the compression type. ---------- _______________________________________ Python tracker _______________________________________ From randy.duncan at ibm.com Mon Nov 27 14:19:58 2017 From: randy.duncan at ibm.com (Randy Duncan) Date: Mon, 27 Nov 2017 13:19:58 -0600 Subject: [docs] Incorrect statement in section 8.3 of Python Tutorial Message-ID: I believe I found an erroneous statement in the Python tutorials. In section 8.3 found here (https://docs.python.org/3.6/tutorial/errors.html ) There is a section showing how to handle exceptions which works as advertised: However, the next line in the tutorial state this: Note that if the except clauses were reversed (with except B first), it would have printed B, B, B ? the first matching except clause is triggered. I re-entered the example and reversed the except clauses, and got this result which does not match the statement: Best regards, Randy Duncan ______________________________________________________________ Randy Duncan, PMP PMI-ACP CSM Test Architect, IBM Cloud Infrastructure Core Fabric Team 14001 Dallas Parkway, Suite M100, Dallas, TX 75240 214-873-8316 Office | 469-360-7232 Cell | randy.duncan at ibm.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1A422273.gif Type: image/gif Size: 19921 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 1A363088.gif Type: image/gif Size: 4629 bytes Desc: not available URL: From vikas at hackr.io Tue Nov 28 05:47:55 2017 From: vikas at hackr.io (Vikas from Hackr.io) Date: Tue, 28 Nov 2017 16:17:55 +0530 Subject: [docs] Regarding your Official Documentation Message-ID: Hi Team, I am a Python Enthusiast currently working with Hackr.io - a programming community that recommends best online programming courses and tutorials. Ex: For Python - https://hackr.io/tutorials/learn-python I believe your website viewers would love to know about these community up-voted resources mentioned above. It would be great if you could mention it within the "Need Help" section of the BeginnersGuide . Thanks for your help! Warm regards, Vikas Kalwani Community Manager Hackr.io Get Hackr.io on Android Get Hackr.io on iOS Virus-free. www.avast.com <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> -------------- next part -------------- An HTML attachment was scrubbed... URL: From j.stienlet at gmail.com Tue Nov 28 13:02:18 2017 From: j.stienlet at gmail.com (=?UTF-8?Q?Jo=C3=ABl_Stienlet?=) Date: Tue, 28 Nov 2017 19:02:18 +0100 Subject: [docs] possible memory leak in doc example Message-ID: Hello, A little mail to signal a possible memory leak in an example of the doc, not very probable, but it may happen sometimes (and more often if we're already low on memory): https://docs.python.org/2/extending/newtypes.html in: self->first = PyString_FromString(""); if (self->first == NULL) { Py_DECREF(self); return NULL; } self->last = PyString_FromString(""); if (self->last == NULL) { Py_DECREF(self); return NULL; } I think it should be (add line in bold): self->first = PyString_FromString(""); if (self->first == NULL) { Py_DECREF(self); return NULL; } self->last = PyString_FromString(""); if (self->last == NULL) { *Py_DECREF(self->first); /* self->first is != NULL if we get here. */* Py_DECREF(self); return NULL; } Best Regards, Joel Stienlet -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Tue Nov 28 18:26:20 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Nov 2017 23:26:20 +0000 Subject: [docs] [issue32124] Document functions safe to be called before Py_Initialize() In-Reply-To: <1511529556.02.0.213398074469.issue32124@psf.upfronthosting.co.za> Message-ID: <1511911580.56.0.912454111764.issue32124@psf.upfronthosting.co.za> Change by STINNER Victor : ---------- pull_requests: +4536 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 28 18:29:35 2017 From: report at bugs.python.org (STINNER Victor) Date: Tue, 28 Nov 2017 23:29:35 +0000 Subject: [docs] [issue32122] Improve -x option documentation In-Reply-To: <1511504808.14.0.213398074469.issue32122@psf.upfronthosting.co.za> Message-ID: <1511911775.48.0.213398074469.issue32122@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't know if "@path\to\python -x %0 %* & exit /b" and "@py -3 -x %0 %* & exit /b" are correct and well supported on all recent Windows versions. Apart of that, I like your new documentation :-) ---------- nosy: +vstinner _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Nov 28 21:58:01 2017 From: report at bugs.python.org (Steve Dower) Date: Wed, 29 Nov 2017 02:58:01 +0000 Subject: [docs] [issue32122] Improve -x option documentation In-Reply-To: <1511504808.14.0.213398074469.issue32122@psf.upfronthosting.co.za> Message-ID: <1511924281.55.0.213398074469.issue32122@psf.upfronthosting.co.za> Steve Dower added the comment: Those examples look fine to me ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Nov 29 03:07:51 2017 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 29 Nov 2017 08:07:51 +0000 Subject: [docs] [issue32122] Improve -x option documentation In-Reply-To: <1511504808.14.0.213398074469.issue32122@psf.upfronthosting.co.za> Message-ID: <1511942871.09.0.213398074469.issue32122@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: AFAIK this should work in Windows XP. And maybe even in Windows 2000. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Nov 30 09:45:01 2017 From: report at bugs.python.org (R. David Murray) Date: Thu, 30 Nov 2017 14:45:01 +0000 Subject: [docs] [issue32142] heapq.heappop - documentation misleading or doesn't work In-Reply-To: <1511712348.11.0.213398074469.issue32142@psf.upfronthosting.co.za> Message-ID: <1512053101.37.0.213398074469.issue32142@psf.upfronthosting.co.za> R. David Murray added the comment: I would suggested following the statement "To create a heap, use a list initialized to [], or you can transform a populated list into a heap via function heapify()." with "Any mutation of the list thereafter must maintain the heap invariant in order for the list to remain a heap." ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From zachary.ware+pydocs at gmail.com Thu Nov 30 15:01:56 2017 From: zachary.ware+pydocs at gmail.com (Zachary Ware) Date: Thu, 30 Nov 2017 14:01:56 -0600 Subject: [docs] Incorrect statement in section 8.3 of Python Tutorial In-Reply-To: References: Message-ID: Hi Randy, On Mon, Nov 27, 2017 at 1:19 PM, Randy Duncan wrote: > I believe I found an erroneous statement in the Python tutorials. > > In section 8.3 found here (https://docs.python.org/3.6/tutorial/errors.html) > > There is a section showing how to handle exceptions which works as > advertised: > > > However, the next line in the tutorial state this: > > > Note that if the except clauses were reversed (with except B first), it > would have printed B, B, B ? the first matching except clause is triggered. > > > I re-entered the example and reversed the except clauses, and got this > result which does not match the statement: Thanks for the report! However, I just tried it myself and got the output predicted by the docs. Can you show how you defined B, C, and D? Regards, -- Zach From report at bugs.python.org Thu Nov 30 18:17:52 2017 From: report at bugs.python.org (Berker Peksag) Date: Thu, 30 Nov 2017 23:17:52 +0000 Subject: [docs] [issue32145] Wrong ExitStack Callback recipe In-Reply-To: <1511771653.67.0.213398074469.issue32145@psf.upfronthosting.co.za> Message-ID: <1512083872.23.0.912454111764.issue32145@psf.upfronthosting.co.za> Change by Berker Peksag : ---------- nosy: +ncoghlan type: crash -> behavior _______________________________________ Python tracker _______________________________________ From epiphany at tutanota.com Wed Nov 29 14:51:30 2017 From: epiphany at tutanota.com (epiphany at tutanota.com) Date: Wed, 29 Nov 2017 20:51:30 +0100 (CET) Subject: [docs] Incorrect Syntax Message-ID: https://docs.python.org/3/tutorial/stdlib2.html#output-formatting >>> import pprint>>> t = [[[['black', 'cyan'], 'white', ['green', 'red']], [['magenta',... 'yellow'], 'blue']]]...>>> pprint.pprint(t, width=30) It doesn't work. There's one "]" too much in blue... It should look like this: >>> import pprint>>> t = [[[['black', 'cyan'], 'white', ['green', 'red']], [['magenta',... 'yellow'], 'blue']]...>>> pprint.pprint(t, width=30) Then it works. -------------- next part -------------- An HTML attachment was scrubbed... URL: From john.sullivan at mercurypaper.com Thu Nov 30 15:49:29 2017 From: john.sullivan at mercurypaper.com (John Sullivan) Date: Thu, 30 Nov 2017 15:49:29 -0500 Subject: [docs] expression and order of evaluation example Message-ID: Hi ? a question about something in the docs. In order of math operations we all use PEMDAS with parentheses coming first. On the page related to that in the docs: https://docs.python.org/3/reference/expressions.html I find this example in section 6.15 ? Evaluation Order, which states that in the examples given the expressions will be evaluated in the arithmetic order of their suffixes: expr1 + expr2 * (expr3 - expr4) I thought with PEMDAS being the rule (for that simple expression) that the order of operations would actually be: expr4 + expr3 * (expr1 ? expr2) since the parentheses should force that operation (item1 ? item2) to happen first, followed by the multiplication by item3 and finally adding item4. So which is correct? As listed(1,2,3,4) or the version I?ve typed below that (4,3,1,2)? Follow-up question ? to do this PEMDAS and other evaluation is it correct to assume that Python keeps rescanning the expression from left to right (with the exception of exponentiation) over and over while it reduces down the values represented until it has a single workable string to process into its single final value? Thanks, John Sullivan Systems Engineer Mercury Paper, Inc. Office: (540) 465-7733 -------------- next part -------------- An HTML attachment was scrubbed... URL: From randy.duncan at ibm.com Thu Nov 30 15:49:59 2017 From: randy.duncan at ibm.com (Randy Duncan) Date: Thu, 30 Nov 2017 14:49:59 -0600 Subject: [docs] Incorrect statement in section 8.3 of Python Tutorial In-Reply-To: References: Message-ID: Hi Zach, Thanks for the response! I just retried it and also got the B B B that the doc says I should get. Which is probably a good reason to remind myself not to try to correct things when I'm a newbie. Except of course, who else reads tutorials, except newbies? Unfortunately, my original work was all done in interactive mode, but after playing around a bit, I suspect I might have defined all my classes with Exception as the parm rather than the previous class. ie: class B(Exception): class C(Exception): class D(Exception): When I do that, I get the behavior I reported. Sorry to have wasted your time. I'm loving Python so far! Randy ______________________________________________________________ Randy Duncan, PMP PMI-ACP CSM Test Architect, IBM Cloud Infrastructure Core Fabric Team 14001 Dallas Parkway, Suite M100, Dallas, TX 75240 214-873-8316 Office | 469-360-7232 Cell | randy.duncan at ibm.com From: Zachary Ware To: docs Cc: Randy Duncan Date: 11/30/2017 02:02 PM Subject: Re: [docs] Incorrect statement in section 8.3 of Python Tutorial Sent by: zachary.ware at gmail.com Hi Randy, On Mon, Nov 27, 2017 at 1:19 PM, Randy Duncan wrote: > I believe I found an erroneous statement in the Python tutorials. > > In section 8.3 found here ( https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.python.org_3.6_tutorial_errors.html&d=DwIFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=2hm5iaCSjiprqr-rfYXI0dho47AI_LMBBYH2C7Y2ww8&m=E1Ov6eTjsgWbASY2-3OX8iE25webARUK3MdxuZHbwpM&s=b7pNqM3mcug6zVT9LYkMvM0-LbguVTuDWfaEMhVNHSU&e= ) > > There is a section showing how to handle exceptions which works as > advertised: > > > However, the next line in the tutorial state this: > > > Note that if the except clauses were reversed (with except B first), it > would have printed B, B, B ? the first matching except clause is triggered. > > > I re-entered the example and reversed the except clauses, and got this > result which does not match the statement: Thanks for the report! However, I just tried it myself and got the output predicted by the docs. Can you show how you defined B, C, and D? Regards, -- Zach -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: