From report at bugs.python.org Wed Jul 1 03:42:28 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 01 Jul 2015 01:42:28 +0000 Subject: [docs] [issue24541] test_eightteen() in test_inspect out of sync with documentation Message-ID: <1435714948.75.0.931424341037.issue24541@psf.upfronthosting.co.za> New submission from Martin Panter: Revision 0b7c313851ca highlights an inconsistency in the test case at the top of the TestPredicates class. After removing isawaitable() in Issue 24400, there are now actually eighteen is* functions. The comment in the test case still says there are sixteen (from before the two iscoroutine* functions were added), and so does the documentation it references: ?The sixteen functions whose names begin with ?is? ? . The quick fix is to change all the numbers to eighteen. But maybe a better fix is to drop it all and rewrite the documentation to just say ?The functions whose names begin with ?is? are mainly provided . . .?. ---------- assignee: docs at python components: Documentation, Tests messages: 246012 nosy: docs at python, vadmium priority: normal severity: normal status: open title: test_eightteen() in test_inspect out of sync with documentation versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 03:45:22 2015 From: report at bugs.python.org (Roundup Robot) Date: Wed, 01 Jul 2015 01:45:22 +0000 Subject: [docs] [issue24541] test_eightteen() in test_inspect out of sync with documentation In-Reply-To: <1435714948.75.0.931424341037.issue24541@psf.upfronthosting.co.za> Message-ID: <20150701014519.125839.50256@psf.io> Roundup Robot added the comment: New changeset a5c6eaa7d733 by Yury Selivanov in branch '3.5': Issue #24541: Update comment in test_inspect.test_eightteen https://hg.python.org/cpython/rev/a5c6eaa7d733 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 03:46:20 2015 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 01 Jul 2015 01:46:20 +0000 Subject: [docs] [issue24541] test_eightteen() in test_inspect out of sync with documentation In-Reply-To: <1435714948.75.0.931424341037.issue24541@psf.upfronthosting.co.za> Message-ID: <1435715180.44.0.222725479125.issue24541@psf.upfronthosting.co.za> Yury Selivanov added the comment: This has already been fix (see issue24400). I've also updated the comment (16 -> 18). Let's keep the test as is. ---------- nosy: +yselivanov resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 03:55:33 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 01 Jul 2015 01:55:33 +0000 Subject: [docs] [issue24541] test_eightteen() in test_inspect out of sync with documentation In-Reply-To: <1435714948.75.0.931424341037.issue24541@psf.upfronthosting.co.za> Message-ID: <1435715733.19.0.73011182316.issue24541@psf.upfronthosting.co.za> Martin Panter added the comment: Okay but what about the documentation? It still claims sixteen. # This test is here for remember you to update Doc/library/inspect.rst ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 04:03:53 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 01 Jul 2015 02:03:53 +0000 Subject: [docs] =?utf-8?q?=5Bissue24487=5D_Change_asyncio=2Easync=28=29_?= =?utf-8?b?4oaSIGVuc3VyZV9mdXR1cmUoKQ==?= In-Reply-To: <1434983069.7.0.469854953168.issue24487@psf.upfronthosting.co.za> Message-ID: <1435716233.14.0.287879088053.issue24487@psf.upfronthosting.co.za> Martin Panter added the comment: Reopening. The patch still applies to the current code (e.g. revision df310e5ac015, 30 June). It changes eight references of ?async()? that still exist in this revision. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 04:07:04 2015 From: report at bugs.python.org (Roundup Robot) Date: Wed, 01 Jul 2015 02:07:04 +0000 Subject: [docs] [issue24541] test_eightteen() in test_inspect out of sync with documentation In-Reply-To: <1435714948.75.0.931424341037.issue24541@psf.upfronthosting.co.za> Message-ID: <20150701020700.86858.66468@psf.io> Roundup Robot added the comment: New changeset bd45435fd081 by Yury Selivanov in branch '3.5': Issue #24541: Drop test_inspect.test_eightteen unittest; update docs https://hg.python.org/cpython/rev/bd45435fd081 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 04:08:56 2015 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 01 Jul 2015 02:08:56 +0000 Subject: [docs] [issue24541] test_eightteen() in test_inspect out of sync with documentation In-Reply-To: <1435714948.75.0.931424341037.issue24541@psf.upfronthosting.co.za> Message-ID: <1435716536.47.0.853449359977.issue24541@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thanks for pushing this Martin. I didn't notice that you suggested to update inspect.rst as well. And it does make sense to just remove the number of is* functions from the docs (and after that we don't need the unittest). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 04:14:15 2015 From: report at bugs.python.org (Roundup Robot) Date: Wed, 01 Jul 2015 02:14:15 +0000 Subject: [docs] =?utf-8?q?=5Bissue24487=5D_Change_asyncio=2Easync=28=29_?= =?utf-8?b?4oaSIGVuc3VyZV9mdXR1cmUoKQ==?= In-Reply-To: <1434983069.7.0.469854953168.issue24487@psf.upfronthosting.co.za> Message-ID: <20150701021412.24160.99106@psf.io> Roundup Robot added the comment: New changeset 1b3be273e327 by Yury Selivanov in branch '3.5': Issue #24487: Rename async() -> ensure_future() in asyncio docs. https://hg.python.org/cpython/rev/1b3be273e327 New changeset 3dc2a113e8a7 by Yury Selivanov in branch 'default': Merge 3.5 (Issue #24487) https://hg.python.org/cpython/rev/3dc2a113e8a7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 04:14:53 2015 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 01 Jul 2015 02:14:53 +0000 Subject: [docs] =?utf-8?q?=5Bissue24487=5D_Change_asyncio=2Easync=28=29_?= =?utf-8?b?4oaSIGVuc3VyZV9mdXR1cmUoKQ==?= In-Reply-To: <1434983069.7.0.469854953168.issue24487@psf.upfronthosting.co.za> Message-ID: <1435716893.31.0.7415119471.issue24487@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thanks, Martin! ---------- resolution: out of date -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 04:38:24 2015 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 01 Jul 2015 02:38:24 +0000 Subject: [docs] =?utf-8?q?=5Bissue24487=5D_Change_asyncio=2Easync=28=29_?= =?utf-8?b?4oaSIGVuc3VyZV9mdXR1cmUoKQ==?= In-Reply-To: <1434983069.7.0.469854953168.issue24487@psf.upfronthosting.co.za> Message-ID: <1435718304.57.0.520052019573.issue24487@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 09:25:40 2015 From: report at bugs.python.org (Ethan Furman) Date: Wed, 01 Jul 2015 07:25:40 +0000 Subject: [docs] [issue24195] Add `Executor.filter` to concurrent.futures In-Reply-To: <1431638802.0.0.167827013304.issue24195@psf.upfronthosting.co.za> Message-ID: <1435735540.69.0.146169499453.issue24195@psf.upfronthosting.co.za> Ethan Furman added the comment: Brian, given my comments in msg245016 are you willing to add the Executor.filter() function? ---------- versions: +Python 3.6 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 10:41:04 2015 From: report at bugs.python.org (Ivan Levkivskyi) Date: Wed, 01 Jul 2015 08:41:04 +0000 Subject: [docs] [issue24129] Incorrect (misleading) statement in the execution model documentation In-Reply-To: <1430859119.42.0.185221847455.issue24129@psf.upfronthosting.co.za> Message-ID: <1435740064.77.0.658125136222.issue24129@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: What holds the patch now? Should I do something or just wait? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 20:57:56 2015 From: report at bugs.python.org (Jakub Wilk) Date: Wed, 01 Jul 2015 18:57:56 +0000 Subject: [docs] =?utf-8?q?=5Bissue24547=5D_What=E2=80=99s_New_In_Python_3?= =?utf-8?b?LjQ6IHN0cmF5ICIoIg==?= Message-ID: <1435777076.04.0.84284757159.issue24547@psf.upfronthosting.co.za> New submission from Jakub Wilk: https://docs.python.org/3/whatsnew/3.4.html#multiprocessing reads: "On Unix two new start methods, (spawn and forkserver, have been added for starting processes using multiprocessing." This stray "(" should be removed. ---------- assignee: docs at python components: Documentation messages: 246043 nosy: docs at python, jwilk priority: normal severity: normal status: open title: What?s New In Python 3.4: stray "(" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 1 21:08:30 2015 From: report at bugs.python.org (Dmitry Kazakov) Date: Wed, 01 Jul 2015 19:08:30 +0000 Subject: [docs] [issue24548] Broken link in the unittest documentation Message-ID: <1435777710.4.0.98470331082.issue24548@psf.upfronthosting.co.za> New submission from Dmitry Kazakov: The "Simple Smalltalk Testing: With Patterns" link from https://docs.python.org/3.5/library/unittest.html is dead. I found 2 "mirrors" but I don't think any of them should replace the broken link. 1. http://testingsoftware.blogspot.com/2007/08/smalltalk-testing-with-patterns.html (ads and spam in comments) 2. http://live.exept.de/doc/online/english/tools/misc/testfram.htm (image link is broken) ---------- assignee: docs at python components: Documentation messages: 246044 nosy: docs at python, wau priority: normal severity: normal status: open title: Broken link in the unittest documentation type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 2 05:37:56 2015 From: report at bugs.python.org (Roundup Robot) Date: Thu, 02 Jul 2015 03:37:56 +0000 Subject: [docs] =?utf-8?q?=5Bissue24547=5D_What=E2=80=99s_New_In_Python_3?= =?utf-8?b?LjQ6IHN0cmF5ICIoIg==?= In-Reply-To: <1435777076.04.0.84284757159.issue24547@psf.upfronthosting.co.za> Message-ID: <20150702033641.14801.43044@psf.io> Roundup Robot added the comment: New changeset 74e75a9aa562 by Benjamin Peterson in branch '3.4': remove stray '(' (closes #24547) https://hg.python.org/cpython/rev/74e75a9aa562 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 2 05:58:15 2015 From: report at bugs.python.org (Steven D'Aprano) Date: Thu, 02 Jul 2015 03:58:15 +0000 Subject: [docs] [issue24515] docstring of isinstance In-Reply-To: <1435312150.5.0.444169583356.issue24515@psf.upfronthosting.co.za> Message-ID: <1435809495.14.0.0339860557284.issue24515@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Closing. If anyone thinks the docs aren't clear enough, and has an alternate version they would like to suggest, you can re-open it. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 2 07:10:30 2015 From: report at bugs.python.org (Ned Deily) Date: Thu, 02 Jul 2015 05:10:30 +0000 Subject: [docs] [issue24548] Broken link in the unittest documentation In-Reply-To: <1435777710.4.0.98470331082.issue24548@psf.upfronthosting.co.za> Message-ID: <1435813830.27.0.868080017034.issue24548@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ezio.melotti, michael.foord, rbcollins stage: -> needs patch type: enhancement -> versions: +Python 2.7, Python 3.4, Python 3.6 _______________________________________ Python tracker _______________________________________ From gabriel.barros at gmail.com Thu Jul 2 00:47:13 2015 From: gabriel.barros at gmail.com (gabriel.barros) Date: Wed, 1 Jul 2015 15:47:13 -0700 Subject: [docs] bug: first tkinter sample, scope leak Message-ID: on the page https://docs.python.org/3.3/library/tkinter.html#a-simple-hello-world-program there is a line: self.QUIT = tk.Button(self, text="QUIT", fg="red", command=root.destroy) where 'root' is leaking from the global context. It would me better for the audience of hello world programs to properly store that value in the class. on the constructor, it is called 'master' on the arg list. class Application(tk.Frame): def __init__(self, master=None): .... root = tk.Tk() app = Application(master=root) i'd suggest the change: def __init__(self, master=None): + self.tkmaster=master ... self.QUIT = tk.Button(self, text="QUIT", fg="red", - command=root.destroy) + command=self.tkmaster.destroy) thank you, -- gabriel From berker.peksag at gmail.com Thu Jul 2 10:30:15 2015 From: berker.peksag at gmail.com (=?UTF-8?Q?Berker_Peksa=C4=9F?=) Date: Thu, 2 Jul 2015 11:30:15 +0300 Subject: [docs] bug: first tkinter sample, scope leak In-Reply-To: References: Message-ID: On Thu, Jul 2, 2015 at 1:47 AM, gabriel.barros wrote: > on the page https://docs.python.org/3.3/library/tkinter.html#a-simple-hello-world-program > > there is a line: > > self.QUIT = tk.Button(self, text="QUIT", fg="red", > command=root.destroy) > > > where 'root' is leaking from the global context. It would me better > for the audience of hello world programs to properly store that value > in the class. on the constructor, it is called 'master' on the arg > list. Hi Gabriel, Thank you for your email. Your suggestion sounds reasonable to me. Could you please open an issue at bugs.python.org? If you have time to work on a patch, please see https://docs.python.org/devguide/index.html --Berker From report at bugs.python.org Fri Jul 3 10:46:12 2015 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 03 Jul 2015 08:46:12 +0000 Subject: [docs] [issue24458] Documentation for PEP 489 In-Reply-To: <1434452866.14.0.181014085851.issue24458@psf.upfronthosting.co.za> Message-ID: <1435913170.99.0.280292800442.issue24458@psf.upfronthosting.co.za> Petr Viktorin added the comment: Thanks for the review. I've added the explanation you suggested, and I've made the names monospace (or linked them, where it seemed appropriate). I've also marked *NULL*s like in the rest of the doc. ---------- Added file: http://bugs.python.org/file39851/pep489-docs.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 3 11:52:18 2015 From: report at bugs.python.org (Roundup Robot) Date: Fri, 03 Jul 2015 09:52:18 +0000 Subject: [docs] [issue24458] Documentation for PEP 489 In-Reply-To: <1434452866.14.0.181014085851.issue24458@psf.upfronthosting.co.za> Message-ID: <20150703095215.27420.98466@psf.io> Roundup Robot added the comment: New changeset bad92d696866 by Nick Coghlan in branch '3.5': Close #24458: PEP 489 documentation https://hg.python.org/cpython/rev/bad92d696866 New changeset 86daa37c1cc9 by Nick Coghlan in branch 'default': Merge fix for #24458 from 3.5 https://hg.python.org/cpython/rev/86daa37c1cc9 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 3 11:54:38 2015 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 03 Jul 2015 09:54:38 +0000 Subject: [docs] [issue24458] Documentation for PEP 489 In-Reply-To: <1434452866.14.0.181014085851.issue24458@psf.upfronthosting.co.za> Message-ID: <1435917278.08.0.0249027359139.issue24458@psf.upfronthosting.co.za> Nick Coghlan added the comment: Thanks and, as you can see, merged :) Am I correct in thinking these docs were the only item remaining for PEP 489? ---------- resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 3 12:02:18 2015 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 03 Jul 2015 10:02:18 +0000 Subject: [docs] [issue24458] Documentation for PEP 489 In-Reply-To: <1434452866.14.0.181014085851.issue24458@psf.upfronthosting.co.za> Message-ID: <1435917738.6.0.844876801633.issue24458@psf.upfronthosting.co.za> Petr Viktorin added the comment: Yes! Aside from the callback problem, which is left for another PEP, but limits PEP 489 usefulness in the real world :( It turns out that one is quite a rabbit hole. I'll post my findings on that soon-ish. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 3 19:42:30 2015 From: report at bugs.python.org (Eric Snow) Date: Fri, 03 Jul 2015 17:42:30 +0000 Subject: [docs] [issue24458] Documentation for PEP 489 In-Reply-To: <1434452866.14.0.181014085851.issue24458@psf.upfronthosting.co.za> Message-ID: <1435945350.19.0.922440589898.issue24458@psf.upfronthosting.co.za> Eric Snow added the comment: Sorry I didn't get a review in before. Since subinterpreters and multi-phase initialization are on my mind, I have a couple questions: Should there be a note in the "Single-phase initialization" section (perhaps at the top of the section) that encourages use of multi-phase initialization? Would it be worth demonstrating how a module might be verified to work with subinterpreters (as indicated in the multi-phase section)? An example with a brief main function would likely be sufficient. If it's not obvious how to do it then module authors may not consider it worth the trouble. If all goes well then subinterpreters will be exposed in Python in 3.6 which will make such testing much easier. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 3 19:43:02 2015 From: report at bugs.python.org (Eric Snow) Date: Fri, 03 Jul 2015 17:43:02 +0000 Subject: [docs] [issue24458] Documentation for PEP 489 In-Reply-To: <1434452866.14.0.181014085851.issue24458@psf.upfronthosting.co.za> Message-ID: <1435945382.87.0.0945015119246.issue24458@psf.upfronthosting.co.za> Eric Snow added the comment: What is the level of impact of the callback problem? Of the 4 scenarios in [1], it seems to me like #1 (C callbacks w/o a module reference) would be the most common. However, can't that be addressed by adjusting the API, so it would only be a big problem in the case of a public C-API for the module (where backward-compatibility is a concern)? #3 (classes have no reference to the module) sounds like the most problematic but how common a problem is it practice? It may be worth including an explicit note in the multi-phase section on the scenarios that currently don't lend themselves well to multi-phase initialization. It would also be great to indicate how to work around those issues (or the cases where for now it's better to just use single-phase initialization). FWIW, the matter ties in directly to the work I'm doing with subinterpreters right now. [1] https://mail.python.org/pipermail/import-sig/2015-April/000959.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 3 22:36:27 2015 From: report at bugs.python.org (Petr Viktorin) Date: Fri, 03 Jul 2015 20:36:27 +0000 Subject: [docs] [issue24458] Documentation for PEP 489 In-Reply-To: <1434452866.14.0.181014085851.issue24458@psf.upfronthosting.co.za> Message-ID: <1435955787.67.0.646083106661.issue24458@psf.upfronthosting.co.za> Petr Viktorin added the comment: Verifying modules to work ith subinterpreters is tricky. What level of assurance do you want? Subinterpreters themselves require that you embed Python, which doesn't lend itself to an easy example. I hope 2.6 makes the situation better. Example code is in xxmodule, which is mentioned. The #3 problem is pretty common, unfortunately: if you define a Database class and a Record class, Database objects can't get to the Record class to instantiate it. If you define a module-level exception, methods of other classes can't easily raise it. I think recommending workarounds/solutions needs some more discussion; I plan to summarize my thoughts on a mailing list soonish. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 01:10:28 2015 From: report at bugs.python.org (Roundup Robot) Date: Fri, 03 Jul 2015 23:10:28 +0000 Subject: [docs] [issue24525] [doc] missing word In-Reply-To: <1435567711.2.0.215374180363.issue24525@psf.upfronthosting.co.za> Message-ID: <20150703231025.30901.50380@psf.io> Roundup Robot added the comment: New changeset 25985b0c4dbf by Terry Jan Reedy in branch '2.7': Issue #24525: Add missing word. Patch by Vincent Legoll. https://hg.python.org/cpython/rev/25985b0c4dbf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 01:11:43 2015 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Jul 2015 23:11:43 +0000 Subject: [docs] [issue24525] [doc] missing word In-Reply-To: <1435567711.2.0.215374180363.issue24525@psf.upfronthosting.co.za> Message-ID: <1435965103.44.0.122622659655.issue24525@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Fix is to 2.7 specific note about not using stuff not exposed in 3.x. ---------- nosy: +terry.reedy resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 01:38:39 2015 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Jul 2015 23:38:39 +0000 Subject: [docs] [issue24563] Encoding declaration: doc supported encodings Message-ID: <1435966719.35.0.908058462942.issue24563@psf.upfronthosting.co.za> New submission from Terry J. Reedy: The source .rst for has at the end: .. XXX there should be a list of supported encodings. While I believe this is impractical, there could be a link to https://docs.python.org/3/library/codecs.html#standard-encodings -- and possible subsubsections that follow. Are the latter supported for Python code? ---------- assignee: docs at python components: Documentation messages: 246233 nosy: docs at python, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Encoding declaration: doc supported encodings type: enhancement versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 01:40:36 2015 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 03 Jul 2015 23:40:36 +0000 Subject: [docs] [issue24531] please document that no code preceding encoding declaration is allowed In-Reply-To: <1435592545.23.0.229313024646.issue24531@psf.upfronthosting.co.za> Message-ID: <1435966836.7.0.173053180143.issue24531@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I moved the existing comment-only sentence to the first paragraph, where I strongly believe it belongs, and added a second about the first. (PS I opened #24563 to address the xxx visible in the patch.) ---------- keywords: +patch nosy: +terry.reedy stage: needs patch -> commit review Added file: http://bugs.python.org/file39855/encode-declare.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 09:23:02 2015 From: report at bugs.python.org (Angad Singh) Date: Sat, 04 Jul 2015 07:23:02 +0000 Subject: [docs] [issue13456] Providing a custom HTTPResponse class to HTTPConnection In-Reply-To: <1321988533.96.0.72454390842.issue13456@psf.upfronthosting.co.za> Message-ID: <1435994582.81.0.64278023249.issue13456@psf.upfronthosting.co.za> Angad Singh added the comment: I have a patch for this. I have also documented some of the non-documented attributes of HTTPConnection class. ---------- keywords: +patch nosy: +angad Added file: http://bugs.python.org/file39856/response_class.http.client.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 09:55:30 2015 From: report at bugs.python.org (Angad Singh) Date: Sat, 04 Jul 2015 07:55:30 +0000 Subject: [docs] [issue8519] doc: termios and ioctl reference links In-Reply-To: <1272125391.54.0.0119716465224.issue8519@psf.upfronthosting.co.za> Message-ID: <1435996530.61.0.771215731851.issue8519@psf.upfronthosting.co.za> Angad Singh added the comment: Created a patch for this. Added POSIX links for fcntl, ioctl and termios. Let me know if I am missing anything. ---------- nosy: +angad Added file: http://bugs.python.org/file39857/posix_specification_links_fcntl_ioctl_termios.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 10:27:23 2015 From: report at bugs.python.org (Angad Singh) Date: Sat, 04 Jul 2015 08:27:23 +0000 Subject: [docs] [issue24548] Broken link in the unittest documentation In-Reply-To: <1435777710.4.0.98470331082.issue24548@psf.upfronthosting.co.za> Message-ID: <1435998443.5.0.135266751753.issue24548@psf.upfronthosting.co.za> Angad Singh added the comment: Internet Archive (with image) - https://web.archive.org/web/20150315073817/http://www.xprogramming.com/testfram.htm ---------- nosy: +angad _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 10:58:39 2015 From: report at bugs.python.org (Angad Singh) Date: Sat, 04 Jul 2015 08:58:39 +0000 Subject: [docs] [issue24256] threading.Timer is not a class In-Reply-To: <1432189781.3.0.318420798275.issue24256@psf.upfronthosting.co.za> Message-ID: <1436000319.15.0.526565752563.issue24256@psf.upfronthosting.co.za> Angad Singh added the comment: Taking a stab at this. Attached patch. ---------- keywords: +patch nosy: +angad Added file: http://bugs.python.org/file39858/function_threading_timer.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 12:32:39 2015 From: report at bugs.python.org (Berker Peksag) Date: Sat, 04 Jul 2015 10:32:39 +0000 Subject: [docs] [issue13456] Providing a custom HTTPResponse class to HTTPConnection In-Reply-To: <1321988533.96.0.72454390842.issue13456@psf.upfronthosting.co.za> Message-ID: <1436005959.89.0.747228750344.issue13456@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> patch review type: -> enhancement versions: +Python 3.4, Python 3.5, Python 3.6 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 13:17:22 2015 From: report at bugs.python.org (Vivek) Date: Sat, 04 Jul 2015 11:17:22 +0000 Subject: [docs] [issue24548] Broken link in the unittest documentation In-Reply-To: <1435777710.4.0.98470331082.issue24548@psf.upfronthosting.co.za> Message-ID: <1436008642.36.0.36366831998.issue24548@psf.upfronthosting.co.za> Vivek added the comment: Updated the broken link to the new link given by angad. Attached is a patch for the same. Please review. ---------- keywords: +patch nosy: +viv1 Added file: http://bugs.python.org/file39859/mywork.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 19:38:52 2015 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Jul 2015 17:38:52 +0000 Subject: [docs] [issue24256] threading.Timer is not a class In-Reply-To: <1432189781.3.0.318420798275.issue24256@psf.upfronthosting.co.za> Message-ID: <1436031532.5.0.771765677273.issue24256@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, but we don't want to document an "internal only" name (which is what the leading underscore means in this case). It might be desirable to note that the name is a class in python3, I'm not sure. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 21:50:40 2015 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 Jul 2015 19:50:40 +0000 Subject: [docs] [issue24548] Broken link in the unittest documentation In-Reply-To: <1435777710.4.0.98470331082.issue24548@psf.upfronthosting.co.za> Message-ID: <20150704195038.8857.40090@psf.io> Roundup Robot added the comment: New changeset 5f279db087e7 by R David Murray in branch '2.7': #24548: replace dead link with pointer to archive.org. https://hg.python.org/cpython/rev/5f279db087e7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 4 21:51:06 2015 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Jul 2015 19:51:06 +0000 Subject: [docs] [issue24548] Broken link in the unittest documentation In-Reply-To: <1435777710.4.0.98470331082.issue24548@psf.upfronthosting.co.za> Message-ID: <1436039466.91.0.324502555141.issue24548@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks. I typoed the issue number in the commit messages :(. The python3 commits are 050a941f69fb, 51e05ee9848a, and 631ef17fc772. ---------- nosy: +r.david.murray resolution: -> fixed stage: needs patch -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 5 00:07:07 2015 From: report at bugs.python.org (Roundup Robot) Date: Sat, 04 Jul 2015 22:07:07 +0000 Subject: [docs] [issue24330] Idle doc: explain "Configure Idle" not in "Options" on OSX, etc. In-Reply-To: <1432962360.31.0.591497904103.issue24330@psf.upfronthosting.co.za> Message-ID: <20150704220704.23363.63431@psf.io> Roundup Robot added the comment: New changeset 64b42ec6ef42 by Ned Deily in branch '2.7': Issue #24330: Update IDLE doc and help to note "Configure IDLE" difference https://hg.python.org/cpython/rev/64b42ec6ef42 New changeset b9460ee09228 by Ned Deily in branch '3.4': Issue #24330: Update IDLE doc and help to note "Configure IDLE" difference https://hg.python.org/cpython/rev/b9460ee09228 New changeset 2dfdbbe0701b by Ned Deily in branch '3.5': Issue #24330: merge from 3.4 https://hg.python.org/cpython/rev/2dfdbbe0701b New changeset 055ddc0e713b by Ned Deily in branch 'default': Issue #24330: merge from 3.5 https://hg.python.org/cpython/rev/055ddc0e713b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 5 00:12:51 2015 From: report at bugs.python.org (Ned Deily) Date: Sat, 04 Jul 2015 22:12:51 +0000 Subject: [docs] [issue24330] Idle doc: explain "Configure Idle" not in "Options" on OSX, etc. In-Reply-To: <1432962360.31.0.591497904103.issue24330@psf.upfronthosting.co.za> Message-ID: <1436047970.94.0.73854287517.issue24330@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for your patch, Andr?! I changed the wording a bit to make it even clearer. Applied to 2.7 (for 2.7.11), 3.4 (3.4.4), and 3.5.0 ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 5 02:59:15 2015 From: report at bugs.python.org (Larry Hastings) Date: Sun, 05 Jul 2015 00:59:15 +0000 Subject: [docs] [issue23623] Python 3.5 docs need to clarify how to set PATH, etc In-Reply-To: <1425910467.52.0.177540191477.issue23623@psf.upfronthosting.co.za> Message-ID: <1436057955.51.0.650326243733.issue23623@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 5 03:09:51 2015 From: report at bugs.python.org (Larry Hastings) Date: Sun, 05 Jul 2015 01:09:51 +0000 Subject: [docs] [issue23020] New matmul operator crashes modules compiled with CPython3.4 In-Reply-To: <1418128303.35.0.105853053103.issue23020@psf.upfronthosting.co.za> Message-ID: <1436058591.08.0.0783924273391.issue23020@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- priority: release blocker -> normal stage: -> needs patch type: crash -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 5 12:41:47 2015 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 05 Jul 2015 10:41:47 +0000 Subject: [docs] [issue23020] New matmul operator crashes modules compiled with CPython3.4 In-Reply-To: <1418128303.35.0.105853053103.issue23020@psf.upfronthosting.co.za> Message-ID: <1436092906.96.0.785879293568.issue23020@psf.upfronthosting.co.za> Antoine Pitrou added the comment: There was probably an informal "best effort ABI compatibility" in 2.x that we de facto dropped in 3.x. Otherwise, as Amaury points out, several Py_TPFLAGS_HAVE_XXX flags would have no purpose. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 5 14:07:17 2015 From: report at bugs.python.org (Jakub Wilk) Date: Sun, 05 Jul 2015 12:07:17 +0000 Subject: [docs] [issue24568] Misc/NEWS: "free-after-use" -> "use-after-free" Message-ID: <1436098037.39.0.99506662274.issue24568@psf.upfronthosting.co.za> New submission from Jakub Wilk: Misc/NEWS reads: "Fix free-after-use bug" It should be "use-after-free", not "free-after-use". ---------- assignee: docs at python components: Documentation messages: 246310 nosy: docs at python, jwilk priority: normal severity: normal status: open title: Misc/NEWS: "free-after-use" -> "use-after-free" versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 5 17:39:57 2015 From: report at bugs.python.org (Roundup Robot) Date: Sun, 05 Jul 2015 15:39:57 +0000 Subject: [docs] [issue24568] Misc/NEWS: "free-after-use" -> "use-after-free" In-Reply-To: <1436098037.39.0.99506662274.issue24568@psf.upfronthosting.co.za> Message-ID: <20150705153955.15654.74013@psf.io> Roundup Robot added the comment: New changeset 5097c91cdc2d by Benjamin Peterson in branch '2.7': 'free-after-use' is not a bug :) (closes #24568) https://hg.python.org/cpython/rev/5097c91cdc2d ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 5 17:49:22 2015 From: report at bugs.python.org (Jakub Wilk) Date: Sun, 05 Jul 2015 15:49:22 +0000 Subject: [docs] [issue24568] Misc/NEWS: "free-after-use" -> "use-after-free" In-Reply-To: <1436098037.39.0.99506662274.issue24568@psf.upfronthosting.co.za> Message-ID: <1436111362.75.0.00820833251101.issue24568@psf.upfronthosting.co.za> Jakub Wilk added the comment: Uh, "use-after-use" is not a bug either. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 6 17:16:02 2015 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Jul 2015 15:16:02 +0000 Subject: [docs] [issue24577] Document behavior (logging and call to connection_lost) on socket TimeoutError In-Reply-To: <1436195676.25.0.309895350913.issue24577@psf.upfronthosting.co.za> Message-ID: <1436195762.67.0.654979084959.issue24577@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> docs at python components: +Documentation, asyncio nosy: +docs at python, gvanrossum, haypo, yselivanov stage: -> needs patch type: -> behavior versions: +Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 6 17:36:36 2015 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Jul 2015 15:36:36 +0000 Subject: [docs] [issue24577] Document asyncio behavior (logging and call to connection_lost) on socket TimeoutError In-Reply-To: <1436195676.25.0.309895350913.issue24577@psf.upfronthosting.co.za> Message-ID: <1436196996.29.0.147841586851.issue24577@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: Document behavior (logging and call to connection_lost) on socket TimeoutError -> Document asyncio behavior (logging and call to connection_lost) on socket TimeoutError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 7 00:25:16 2015 From: report at bugs.python.org (Konstantin Molchanov) Date: Mon, 06 Jul 2015 22:25:16 +0000 Subject: [docs] [issue24136] document PEP 448 In-Reply-To: <1430918327.69.0.579699866453.issue24136@psf.upfronthosting.co.za> Message-ID: <1436221516.48.0.339741654145.issue24136@psf.upfronthosting.co.za> Konstantin Molchanov added the comment: Hi! I'd like to update the docs with the examples of the new syntax usage. This is my first contribution to the Python docs, so I'd like to ask for some assistance. I'm going to start with adding an example to the tutorial (https://docs.python.org/3.5/tutorial/introduction.html#lists). I wanted to demonstrate the new syntax with string too (https://docs.python.org/3.5/tutorial/introduction.html#strings), but it turned out to produce somewhat unexpected results: >>> s = 'And now' >>> first, *rest = s >>> # I expected it to be synonymous >>> # to ``first, rest = s[0], s[1:]`` >>> # ``first`` is expected to be 'A', >>> # ``rest`` is expected to be 'nd now'. >>> # ``first`` is 'A', as expected: >>> first 'A' >>> # But ``rest`` is implicitly turned into a list: >>> rest ['n', 'd', ' ', 'n', 'o', 'w', ' ', 'f', 'o', 'r', ' ', 's', 'o', 'm', 'e', 't', 'h', 'i', 'n', 'g', ' ', 'c', 'o', 'm', 'p', 'l', 'e', 't', 'e', 'l', 'y', ' ', 'd', 'i', 'f', 'f', 'e', 'r', 'e', 'n', 't'] Is this behavior intended? Why wasn't ``first`` converted into ['A'] as well? Am I just not supposed to use the new unpacking with strings? Thanks, Konstantin ---------- nosy: +moigagoo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 7 01:59:05 2015 From: report at bugs.python.org (Martin Panter) Date: Mon, 06 Jul 2015 23:59:05 +0000 Subject: [docs] [issue24136] document PEP 448: unpacking generalization In-Reply-To: <1430918327.69.0.579699866453.issue24136@psf.upfronthosting.co.za> Message-ID: <1436227145.63.0.235943352035.issue24136@psf.upfronthosting.co.za> Martin Panter added the comment: Yes I think it is expected and documented that the leftovers are turned into a list. See . I originally had similar confusion, expectating the starred target to become a tuple, because people often use tuple-like syntax, but: >>> generator_expression = (2**i for i in range(4)) >>> (one, *a_list, eight) = generator_expression >>> a_list # Not a tuple! [2, 4] One thing in the section I linked above that should also be fixed is that the assigned object may be any iterable, not just a sequence. About changing the tutorial, just be careful you don?t add unnecessary complication too early. The original * and ** syntax for function parameters is not mentioned until . Later, argument unpacking: . Assignment unpacking doesn?t seem to mentioned at all (not that I am saying it should be). It might be higher priority to update the main reference documentation first. ---------- title: document PEP 448 -> document PEP 448: unpacking generalization _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 7 02:24:48 2015 From: report at bugs.python.org (Martin Panter) Date: Tue, 07 Jul 2015 00:24:48 +0000 Subject: [docs] [issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation In-Reply-To: <1430350495.43.0.91352789573.issue24079@psf.upfronthosting.co.za> Message-ID: <1436228688.47.0.0894509873284.issue24079@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 7 03:01:38 2015 From: report at bugs.python.org (Martin Panter) Date: Tue, 07 Jul 2015 01:01:38 +0000 Subject: [docs] [issue13456] Providing a custom HTTPResponse class to HTTPConnection In-Reply-To: <1321988533.96.0.72454390842.issue13456@psf.upfronthosting.co.za> Message-ID: <1436230898.68.0.849372579109.issue13456@psf.upfronthosting.co.za> Martin Panter added the comment: Why do people want ?response_class? to be part of the API? If so, more details about it may need to added, e.g. the following methods and attributes seem to be required: _read_status(), fp, close(), isclosed(), begin() and will_close. The ?debuglevel? attribute seems fairly redundant with the existing set_debuglevel() method. Also, what is the point of adding the ?default_port? attribute, if it cannot be modified? The only use case I can imagine is in a subclass that specifically does modify it. But I?m not sure it should be added at all. So I am sorry, but I don?t see why any of the three additions in the patch should be made. IMO it would be better to explain that ?response_class? is an internal implementation detail, or even drop it entirely from the doc string. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 7 09:17:47 2015 From: report at bugs.python.org (Konstantin Molchanov) Date: Tue, 07 Jul 2015 07:17:47 +0000 Subject: [docs] [issue24136] document PEP 448: unpacking generalization In-Reply-To: <1430918327.69.0.579699866453.issue24136@psf.upfronthosting.co.za> Message-ID: <1436253467.25.0.800747097514.issue24136@psf.upfronthosting.co.za> Konstantin Molchanov added the comment: @vadmium thanks for the assistance! I'll kick off with the reference then. P.S. Am I the only one who doesn't receive any emails from the tracker? I never got the registration link or a follow-up notification from this issue. Am I missing something? P.P.S. I'm not yet familiar with the local etiquette, so please forgive me if I'm unintentionally breaking some rules. Is @mentioning OK? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 8 05:25:38 2015 From: report at bugs.python.org (Neil Girdhar) Date: Wed, 08 Jul 2015 03:25:38 +0000 Subject: [docs] [issue24136] document PEP 448: unpacking generalization In-Reply-To: <1430918327.69.0.579699866453.issue24136@psf.upfronthosting.co.za> Message-ID: <1436325938.74.0.753068165267.issue24136@psf.upfronthosting.co.za> Neil Girdhar added the comment: I don't receive emails from the tracker anymore either and I have no idea why that is. ---------- _______________________________________ Python tracker _______________________________________ From moigagoo at live.com Tue Jul 7 00:00:29 2015 From: moigagoo at live.com (moigagoo at live.com) Date: Mon, 06 Jul 2015 22:00:29 -0000 Subject: [docs] document PEP 448 (issue 24136) Message-ID: <20150706220029.16349.88973@psf.upfronthosting.co.za> http://bugs.python.org/review/24136/diff/14840/Doc/whatsnew/3.5.rst File Doc/whatsnew/3.5.rst (right): http://bugs.python.org/review/24136/diff/14840/Doc/whatsnew/3.5.rst#newcode131 Doc/whatsnew/3.5.rst:131: in function calls, in comprehensions and generator expressions, and in The PEP in its approved form does not include list or generator comprehensions, or unbracketed comprehensions in function calls: https://www.python.org/dev/peps/pep-0448/#variations http://bugs.python.org/review/24136/ From report at bugs.python.org Wed Jul 8 11:05:32 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 08 Jul 2015 09:05:32 +0000 Subject: [docs] [issue24136] document PEP 448: unpacking generalization In-Reply-To: <1430918327.69.0.579699866453.issue24136@psf.upfronthosting.co.za> Message-ID: <1436346332.48.0.0872578413425.issue24136@psf.upfronthosting.co.za> Martin Panter added the comment: FWIW, I still emails from the tracker, even the ones with my own comments and changes. All I can suggest is check the address you have set, check for spam, etc. I don?t @mentioning will do anything here. But as long as the person is in the nosy list they _should_ get an email (in theory :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 8 18:00:36 2015 From: report at bugs.python.org (Sameer Kulkarni) Date: Wed, 08 Jul 2015 16:00:36 +0000 Subject: [docs] [issue24563] Encoding declaration: doc supported encodings In-Reply-To: <1435966719.35.0.908058462942.issue24563@psf.upfronthosting.co.za> Message-ID: <1436371236.54.0.512461838885.issue24563@psf.upfronthosting.co.za> Sameer Kulkarni added the comment: I have added link to Standard Encodings : https://docs.python.org/3/library/codecs.html#standard-encodings and Python Specific Encodings : https://docs.python.org/3/library/codecs.html#python-specific-encodings ---------- keywords: +patch nosy: +ksameersrk Added file: http://bugs.python.org/file39884/encoding_links.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 9 13:16:24 2015 From: report at bugs.python.org (Neil Girdhar) Date: Thu, 09 Jul 2015 11:16:24 +0000 Subject: [docs] [issue24136] document PEP 448: unpacking generalization In-Reply-To: <1430918327.69.0.579699866453.issue24136@psf.upfronthosting.co.za> Message-ID: <1436440584.33.0.570844987868.issue24136@psf.upfronthosting.co.za> Neil Girdhar added the comment: Copied from closed issue 24240: Since Grammar/Grammar relies on semantic postprocessing in ast.c, it would be nice to have an update of the (human readable) Grammar in the language reference docs. ---------- _______________________________________ Python tracker _______________________________________ From buaa.gg at gmail.com Thu Jul 9 05:47:45 2015 From: buaa.gg at gmail.com (Qingwen Guan) Date: Thu, 9 Jul 2015 11:47:45 +0800 Subject: [docs] Builtin-types, str.end_with, doc might be unclear Message-ID: Hi, When I am reading the builtin-types session of the py2.7 document( https://docs.python.org/2/library/stdtypes.html), I personal think the doc of the *str.ends_with(suffix[, start, [end]]) *API is not clear enough. With optional*start*, test beginning at that position. With optional *end*, stop comparing at that position. There might be ambiguity if it mean str[start:end].ends_with(suffix), or str[end:start].ends_with(suffix). -- Best Regards, Qingwen -------------- next part -------------- An HTML attachment was scrubbed... URL: From chehongzhi at msn.com Thu Jul 9 15:29:11 2015 From: chehongzhi at msn.com (=?gb2312?B?s7W66ta+?=) Date: Thu, 9 Jul 2015 21:29:11 +0800 Subject: [docs] bug report Message-ID: 7.1. Fancier Output Formatting '!a' (apply ascii() ), '!s' (apply str() ) and '!r' (apply repr() ) can be used to convert the value before it is formatted: >>> import math >>> print('The value of PI is approximately {}.'.format(math.pi)) The value of PI is approximately 3.14159265359. >>> print('The value of PI is approximately {!r}.'.format(math.pi)) The value of PI is approximately 3.141592653589793. In python 3.4.3,codes above produce different outputs which I?ve tested: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2015-07-09 at ??9.25.png Type: image/png Size: 5889 bytes Desc: not available URL: From report at bugs.python.org Fri Jul 10 10:09:30 2015 From: report at bugs.python.org (Martin Panter) Date: Fri, 10 Jul 2015 08:09:30 +0000 Subject: [docs] [issue22232] str.splitlines splitting on non-\r\n characters In-Reply-To: <1408528911.37.0.452679392827.issue22232@psf.upfronthosting.co.za> Message-ID: <1436515769.93.0.125428099197.issue22232@psf.upfronthosting.co.za> Martin Panter added the comment: The main documentation has been updated and Issue 12855 has been closed. What is left to do here, considering this is marked as a documenation bug? Just modify the doc strings, as Terry suggested in ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 10 19:11:24 2015 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 10 Jul 2015 17:11:24 +0000 Subject: [docs] [issue22232] str.splitlines splitting on non-\r\n characters In-Reply-To: <1408528911.37.0.452679392827.issue22232@psf.upfronthosting.co.za> Message-ID: <1436548284.83.0.344202303856.issue22232@psf.upfronthosting.co.za> Gregory P. Smith added the comment: If this isn't already mentioned in 2 to 3 porting notes it is worth highlighting there. code which uses a str in python 2 and still uses a str in python 3 is now splitting on many more characters. That seems to be the source of bugs like issue22233. splitlines() used to work for the strict \r\n splitting task. now that code needs to made explicit about its splitting desires. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 11 10:00:56 2015 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 11 Jul 2015 08:00:56 +0000 Subject: [docs] [issue23220] IDLE does not display \b backspace correctly. In-Reply-To: <1420937687.17.0.885670059147.issue23220@psf.upfronthosting.co.za> Message-ID: <1436601656.73.0.743619370071.issue23220@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I closed #24572 as a duplicate of this. It is the same issue except for printing \r instead of \b. These issues are not about responses to keyboard actions when entering text into an Idle editor window. During entry, just about any cntl/alt/function/shift/key combination can be intercepted to and translated to arbitrary action. They are also not about REPL echo. For 3.4+ Win7, both console Python and Shell echo '\b\t\x08\x09' as '\x08\t\x08\t'. Carol's report suggest that the same is true on Mac also. Both issues *are* about print(s, file=outfile), where s is the result of processing all args except 'file' and outfile defaults to sys.stdout. The print call is the same as outfile.write(s), so outfile (and sys.stdout) could be any object with a write method. >>> print('hello\b\b\b\b\bHELLO') helloHELLO >>> import sys; sys.stdout.write('hello\b\b\b\b\bHELLO'+'\n') helloHELLO (I actually see the same circles as Al, but copy-paste does not seem to work as well for me.) So both issues are about the effect of writing 'control chars', in particular \b and \r, to a file. Well, that depends on the file. Some possibilities are copy as is (StringIO), encode and copy (disk file, socket), ignore, display as one glyph, display as multiple chars, non-destructively backspace (like backspace on typewriters and printing terminals and left-arrow elsewhere), or destructively backspace (like backspace on as most (all?) screen keyboards). After non-destructive movement of the 'cursor' position, the possibilities for following graphical chars are overwrite (like typewriters), replace, and insert (the modes sometimes selected by the Insert key). Non-destructive backspace followed by overwrite (meaning 'HELLO' printed on top of 'hello') is the original meaning of 'backspace'. Having said all this, I am sympathetic to the idea that there should be an option to have 'print(ascii_string)' in user code give the same result in the console and Idle. I think this would best be accomplished by a least-common-denominator SimpleTerm subclass of tkinter.Text put somewhere in the tkinter package. (This would be a new issue that should start on python-ideas list.) However, I would consider something Idle specific. Does the following work the same on *nix and Mac as Windows? >>> print('hello\rHELLO') HELLO # helloHELLO with Win7 Idle Are there any control-chars (other than \n) that work might work in the consoles on all three systems and that should be included? Carol, another difference between the Windows console and Idle is that tk and hence Idle support the entire BMP subset of unicode. This should also be mentioned in the doc. ---------- stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 11 12:46:49 2015 From: report at bugs.python.org (Chris Angelico) Date: Sat, 11 Jul 2015 10:46:49 +0000 Subject: [docs] [issue24610] Incorrect example Unicode string in docs footnote Message-ID: <1436611609.77.0.659224194833.issue24610@psf.upfronthosting.co.za> New submission from Chris Angelico: https://docs.python.org/3/reference/expressions.html#id18 The string "\u0327\u0043" does not normalize to the same string as "\u00C7", as combining characters are supposed to _follow_ the base character. (Some consoles may happen to display them the same way, but prepend another letter to the string and it's clear that the combining cedilla is attached to that and not to the C.) Switching the two escape sequences makes the example work. Patch attached. ---------- assignee: docs at python components: Documentation files: cedilla_docs.patch keywords: patch messages: 246599 nosy: Rosuav, docs at python priority: normal severity: normal status: open title: Incorrect example Unicode string in docs footnote versions: Python 3.6 Added file: http://bugs.python.org/file39894/cedilla_docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 11 12:48:58 2015 From: report at bugs.python.org (Chris Angelico) Date: Sat, 11 Jul 2015 10:48:58 +0000 Subject: [docs] [issue24610] Incorrect example Unicode string in docs footnote In-Reply-To: <1436611609.77.0.659224194833.issue24610@psf.upfronthosting.co.za> Message-ID: <1436611738.82.0.34027538329.issue24610@psf.upfronthosting.co.za> Chris Angelico added the comment: Interestingly, the 2.7 docs have this correct already. https://docs.python.org/2.7/reference/expressions.html#id23 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 11 13:26:04 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Jul 2015 11:26:04 +0000 Subject: [docs] [issue24610] Incorrect example Unicode string in docs footnote In-Reply-To: <1436611609.77.0.659224194833.issue24610@psf.upfronthosting.co.za> Message-ID: <1436613964.8.0.201573826442.issue24610@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. The 2.x docs were fixed in c9bf6e70308e, but this change was lost during merging to 3.x in 3d866579117d. ---------- components: +Unicode nosy: +ezio.melotti, haypo, serhiy.storchaka stage: -> commit review versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 11 14:29:21 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Jul 2015 12:29:21 +0000 Subject: [docs] [issue23220] IDLE does not display \b backspace correctly. In-Reply-To: <1420937687.17.0.885670059147.issue23220@psf.upfronthosting.co.za> Message-ID: <1436617761.62.0.257073383287.issue23220@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Control characters are named control characters because they are control the output device. Different devices have different capabilities and reacts different on the same codes. Windows console, different sorts of Linux terminals and Tk text widget are different devices. Some prints funny characters, others not, some beeps, others not, some interprets particular flavor of ESC sequences, others not, some allows color and positioning, others not. Python can't unify the behavior of these devices without lost most of functionality as it can't unify the behavior of black-white matrix printer, graphical plotter and 24-bit color LCD monitor. I would close this issue as not related to Python. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 11 23:35:39 2015 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 11 Jul 2015 21:35:39 +0000 Subject: [docs] [issue23220] Documents input/output effects of how IDLE runs user code In-Reply-To: <1420937687.17.0.885670059147.issue23220@psf.upfronthosting.co.za> Message-ID: <1436650539.74.0.421319733797.issue23220@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Serhiy, thanks for the paraphrase of what I tried to say. This issue has already been changed to a doc issue to explain the input/output effects of Idle's way of running user code. I should have retitled before. Control codes are just one of the effects that have come up on the tracker, python-list, or stackoverflow. Misunderstanding had lead to user puzzlement and even undeserved insults directed as Python. I propose to something like the following to the introductory section of the Idle doc, https://docs.python.org/3/library/idle.html#index-0, after the feature list. --- When Idle runs user code from either the shell or an editor window, the result is nearly always be the same as running the same code directly with python in either interactive or batch mode. However, environmental differences can have visible effects. For instance, Idle import statements add numerous entries to sys.modules and a few module attributes to modules such as tkinter. The line `1import tkinter; tkinter.colorchooser`` normally raises AttributeError but works when run with Idle because Idle has already imported tkinter.colorchooser. To detect whether code is running under Idle, run ``import idlelib; idlelib.run`` within a try-except statement. More important are the input/output differences. Python normally runs in a text console process with direct access to keyboard and screen. For code run with Idle, the keyboard and screen are controlled by the tk graphics subsystem and sys.stdin, sys.stdout, and sys.stderr are bound to objects that connect to the gui. (Note that ``print`` calls ``sys.stdout.write``.) Here are some of the effects of keyboard and screen access being indirect. * Operating system (OS) specific functions that directly access the keyboard may not work. * The Idle shell works with complete statements rather than individual lines of code. One can edit and retrieve complete multiline statements instead of single lines. * User code gets colorized. Normal output and error output to the shell get their own colors. * Tk supports the Basic Multilingual Plane (BMP) subset of Unicode characters. This is worse than consoles that support supplementary planes (with appropriate fonts in use), but better than the Windows console, which only supports restricted subsets of the BMP, depending on the code page in use. * Tk handling of ascii control chars depends on the OS and is usually different from the text console. --- ---------- title: IDLE does not display \b backspace correctly. -> Documents input/output effects of how IDLE runs user code _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 12 01:33:58 2015 From: report at bugs.python.org (Roundup Robot) Date: Sat, 11 Jul 2015 23:33:58 +0000 Subject: [docs] [issue24610] Incorrect example Unicode string in docs footnote In-Reply-To: <1436611609.77.0.659224194833.issue24610@psf.upfronthosting.co.za> Message-ID: <20150711233356.14247.15193@psf.io> Roundup Robot added the comment: New changeset 1cae77f873af by Benjamin Peterson in branch '3.4': fix normalization example (closes #24610) https://hg.python.org/cpython/rev/1cae77f873af New changeset 0127b0cad5ec by Benjamin Peterson in branch '3.5': merge 3.4 (#24610) https://hg.python.org/cpython/rev/0127b0cad5ec New changeset 02b81a82a57d by Benjamin Peterson in branch 'default': merge 3.5 (#24610) https://hg.python.org/cpython/rev/02b81a82a57d ---------- nosy: +python-dev resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 12 04:41:16 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 12 Jul 2015 02:41:16 +0000 Subject: [docs] [issue23220] Documents input/output effects of how IDLE runs user code In-Reply-To: <1420937687.17.0.885670059147.issue23220@psf.upfronthosting.co.za> Message-ID: <1436668876.77.0.636820192212.issue23220@psf.upfronthosting.co.za> Martin Panter added the comment: ?run ``import idlelib; idlelib.run`` within a try-except statement?: It might be nice to say what exceptions are expected. My guess is ImportError if Idle or TK is not available, or AttributeError if it is but Idle is not running. ?Tk handling of ascii control chars?: I presume you mean stdout and stderr handling, which this bug was originally about (or also input, source code, etc as well?). It might be good to say that output of Unix newlines (\n) is guaranteed to be supported. Also might be worth explicitly pointing out that output of CRLFs is not supported, even if os.linesep is "\r\n". In my experiments between Linux and Wine, this does not appear to depend on the OS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 12 05:55:25 2015 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 12 Jul 2015 03:55:25 +0000 Subject: [docs] [issue23220] Documents input/output effects of how IDLE runs user code In-Reply-To: <1420937687.17.0.885670059147.issue23220@psf.upfronthosting.co.za> Message-ID: <1436673325.09.0.733273125283.issue23220@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I was thinking AttributeError, as mentioned in the previous sentence. But you are correct that ImportError is possible too. Maybe I should just give the code. try: import idlelib idlelib.run running_idle = True except (ImportError, AttributeError): running_idle = False tk does not 'handle' stdout. Idle does, by inserting strings into a tk text widget. tk does not care where inserted chars come from. tk \b behavior is OS dependent. tk may always ignore \r, but this is different from (at least some) consoles. Attempt 2, with and added paragraph. ... * Except for newline ('\n'), tk handling of ascii control chars may depend on the OS and may by different from text consoles. Both are true for backspace ('\b') and the latter for return ('\r'), which tk ignores. These differences noted above are not bugs. If an application is going to be run repeatedly after being developed with Idle, it should usually be run directly, without Idle. (An exception would be non-gui Windows apps that need tk's better unicode support.) That means testing at least once without Idle. --- Thanks for the comments. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 12 06:59:42 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 12 Jul 2015 04:59:42 +0000 Subject: [docs] [issue23220] Documents input/output effects of how IDLE runs user code In-Reply-To: <1420937687.17.0.885670059147.issue23220@psf.upfronthosting.co.za> Message-ID: <1436677182.46.0.629450625523.issue23220@psf.upfronthosting.co.za> Martin Panter added the comment: I wouldn?t say TK ignores carriage returns, though I agree it would be better if Idle stripped them out. Currently I get a glyph displayed for them, similarly to \b. They wouldn?t copy to my clipboard, so I fudged them after pasting here: >>> _ = stdout.write("CRLF\r\n") # Linux: box-drawing corner piece CRLF? >>> _ = stdout.write("CRLF\r\n") # Wine: euro sign CRLF? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 12 10:17:10 2015 From: report at bugs.python.org (Julien Maisonneuve) Date: Sun, 12 Jul 2015 08:17:10 +0000 Subject: [docs] [issue24614] 404 link in Documenting Python, Style Guide Message-ID: <1436689030.66.0.0896590076737.issue24614@psf.upfronthosting.co.za> New submission from Julien Maisonneuve: The link to the Apple Publications Style Guide on this page https://docs.python.org/3.0/documenting/style.html lniks to a 404 page on https://developer.apple.com/ (https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/APStyleGuide/APSG_2008.pdf) ---------- assignee: docs at python components: Documentation messages: 246640 nosy: Julien Maisonneuve, docs at python priority: normal severity: normal status: open title: 404 link in Documenting Python, Style Guide versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 12 11:45:58 2015 From: report at bugs.python.org (Berker Peksag) Date: Sun, 12 Jul 2015 09:45:58 +0000 Subject: [docs] [issue24614] 404 link in Documenting Python, Style Guide In-Reply-To: <1436689030.66.0.0896590076737.issue24614@psf.upfronthosting.co.za> Message-ID: <1436694358.83.0.160024870358.issue24614@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report, Julien. The up-to-date version of the document can be found at https://docs.python.org/devguide/documenting.html Also, Python 3.0.1 documentation is really old and I think the "The Python documentation should follow the Apple Publications Style Guide wherever possible." part is no longer true. ---------- nosy: +berker.peksag resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 12 23:27:52 2015 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 12 Jul 2015 21:27:52 +0000 Subject: [docs] [issue23220] Documents input/output effects of how IDLE runs user code In-Reply-To: <1420937687.17.0.885670059147.issue23220@psf.upfronthosting.co.za> Message-ID: <1436736472.77.0.39828647647.issue23220@psf.upfronthosting.co.za> Terry J. Reedy added the comment: OK. "Both are true for backspace ('\b') and return ('\r')." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 13 00:20:21 2015 From: report at bugs.python.org (Konstantin Molchanov) Date: Sun, 12 Jul 2015 22:20:21 +0000 Subject: [docs] [issue24136] document PEP 448: unpacking generalization In-Reply-To: <1430918327.69.0.579699866453.issue24136@psf.upfronthosting.co.za> Message-ID: <1436739621.61.0.255007383608.issue24136@psf.upfronthosting.co.za> Konstantin Molchanov added the comment: I've updated the Calls syntax reference in reference/expressions and the assignment object description in reference/simple_stmts. Please tell me if I'm generally doing OK. If I'm not, please guide me to the right direction. ---------- Added file: http://bugs.python.org/file39918/reference_calls_syntax_update.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 13 00:21:21 2015 From: report at bugs.python.org (Konstantin Molchanov) Date: Sun, 12 Jul 2015 22:21:21 +0000 Subject: [docs] [issue24136] document PEP 448: unpacking generalization In-Reply-To: <1430918327.69.0.579699866453.issue24136@psf.upfronthosting.co.za> Message-ID: <1436739681.61.0.870866119968.issue24136@psf.upfronthosting.co.za> Changes by Konstantin Molchanov : Added file: http://bugs.python.org/file39919/replace_sequence_with_iterable.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 13 03:37:26 2015 From: report at bugs.python.org (Neil Girdhar) Date: Mon, 13 Jul 2015 01:37:26 +0000 Subject: [docs] [issue24624] Itertools documentation says iterator when iterable is intended Message-ID: <1436751446.36.0.0536875668561.issue24624@psf.upfronthosting.co.za> New submission from Neil Girdhar: In the description of the consume recipe: def consume(iterator, n): "Advance the iterator n-steps ahead. If n is none, consume entirely." # Use functions that consume iterators at C speed. if n is None: # feed the entire iterator into a zero-length deque collections.deque(iterator, maxlen=0) else: # advance to the empty slice starting at position n next(islice(iterator, n, n), None) iterator should be replaced with iterable. This function accepts strings for example, which are not iterators. ---------- assignee: docs at python components: Documentation messages: 246676 nosy: docs at python, neil.g priority: normal severity: normal status: open title: Itertools documentation says iterator when iterable is intended type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 13 03:57:42 2015 From: report at bugs.python.org (Steven D'Aprano) Date: Mon, 13 Jul 2015 01:57:42 +0000 Subject: [docs] [issue24624] Itertools documentation says iterator when iterable is intended In-Reply-To: <1436751446.36.0.0536875668561.issue24624@psf.upfronthosting.co.za> Message-ID: <20150713015734.GK27268@ando.pearwood.info> Steven D'Aprano added the comment: On Mon, Jul 13, 2015 at 01:37:26AM +0000, Neil Girdhar wrote: > > New submission from Neil Girdhar: > > In the description of the consume recipe: [...] > iterator should be replaced with iterable. This function accepts strings for example, which are not iterators. It *accepts* strings, but it doesn't consume them. It runs through the string, but the string still exists and you can iterate over it again and again and again. The intent of the recipe is to consume an *iterator* not arbitrary iterables. I don't believe the recipe or its description needs to be changed. ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 13 05:19:08 2015 From: report at bugs.python.org (hiroaki itoh) Date: Mon, 13 Jul 2015 03:19:08 +0000 Subject: [docs] [issue24626] please sync cgi.parse document Message-ID: <1436757548.2.0.774685113457.issue24626@psf.upfronthosting.co.za> New submission from hiroaki itoh: https://docs.python.org/2/library/cgi.html#cgi.parse (the file defaults to ``sys.stdin`` and environment defaults to ``os.environ``) https://docs.python.org/3/library/cgi.html#cgi.parse (the file defaults to ``sys.stdin``) maby this fix had applied only to python2 branch, so please update to py3 also. ---------- assignee: docs at python components: Documentation messages: 246680 nosy: docs at python, xwhhsprings priority: normal severity: normal status: open title: please sync cgi.parse document type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 13 05:28:05 2015 From: report at bugs.python.org (R. David Murray) Date: Mon, 13 Jul 2015 03:28:05 +0000 Subject: [docs] [issue24624] Itertools documentation says iterator when iterable is intended In-Reply-To: <1436751446.36.0.0536875668561.issue24624@psf.upfronthosting.co.za> Message-ID: <1436758085.25.0.730152553242.issue24624@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 13 08:20:01 2015 From: report at bugs.python.org (Neil Girdhar) Date: Mon, 13 Jul 2015 06:20:01 +0000 Subject: [docs] [issue24624] Itertools documentation says iterator when iterable is intended In-Reply-To: <1436751446.36.0.0536875668561.issue24624@psf.upfronthosting.co.za> Message-ID: <1436768401.89.0.211116092404.issue24624@psf.upfronthosting.co.za> Neil Girdhar added the comment: Ah, good point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 13 22:59:54 2015 From: report at bugs.python.org (Berker Peksag) Date: Mon, 13 Jul 2015 20:59:54 +0000 Subject: [docs] [issue24136] document PEP 448: unpacking generalization In-Reply-To: <1430918327.69.0.579699866453.issue24136@psf.upfronthosting.co.za> Message-ID: <1436821194.11.0.831690006345.issue24136@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: needs patch -> patch review versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 14 08:54:01 2015 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 14 Jul 2015 06:54:01 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py Message-ID: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> New submission from Ezio Melotti: __main__.py seems to only be mentioned briefly in a couple of places in the official docs: 1) https://docs.python.org/3/library/__main__.html 2) https://docs.python.org/3/using/cmdline.html#cmdoption-m The first link only says: """For a package, the same effect can be achieved by including a __main__.py module, the contents of which will be executed when the module is run with -m.""" ("-m" should actually use :option:`-m` to automatically link to the second URL.) The second link mentions __main__.py in two sentences: """Execute the Python code contained in script, which must be a filesystem path (absolute or relative) referring to either a Python file, a directory containing a __main__.py file, or a zipfile containing a __main__.py file.""" """If the script name refers to a directory or zipfile, the script name is added to the start of sys.path and the __main__.py file in that location is executed as the __main__ module.""" I think it would be better to expand the first link to state clearly what is __main__.py and what is its purpose. In addition, the section should clarify a few more things, e.g. when it should be used, what it should contain, if it's ok to have other __main__.py in the subpackages (e.g. test/__main__.py to run the tests with python -m package.test), how it interacts __init__.py (which one is executed first?). Perhaps it should also get a glossary entry and/or a short mention in the tutorial together with zip imports. In addition to the two links above, a Google search returns the stackoverflow question "What is __main__.py?" as first result, and a couple more related questions that could/should be answered by our docs. ---------- assignee: docs at python components: Documentation messages: 246719 nosy: docs at python, ethan.furman, ezio.melotti, nedbat priority: normal severity: normal stage: needs patch status: open title: Improve documentation about __main__.py type: enhancement versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 14 11:30:08 2015 From: report at bugs.python.org (Ned Batchelder) Date: Tue, 14 Jul 2015 09:30:08 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1436866208.34.0.437384837427.issue24632@psf.upfronthosting.co.za> Ned Batchelder added the comment: BTW, the Stack Overflow answer: http://stackoverflow.com/a/4043007 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 15 09:15:37 2015 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 15 Jul 2015 07:15:37 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1436944537.55.0.367789964148.issue24632@psf.upfronthosting.co.za> Ezio Melotti added the comment: Another thing that should be clarified, is the difference between __main__.py inside a package, and __main__.py inside a zip file. For packages, as far as I understand, __main__.py should be inside the package (i.e. pkg/__main__.py, in the same dir of pkg/__init__.py). This allows the package to be "executed" by doing "python3 -m pkg". For zip files, the __main__.py should be right inside the zip (i.e. file.zip/__main__.py). This allows the zip file to be "executed" by doing "python3 file.zip" (note that no -m is used here, and that "python3 -m file.zip" fails). While zipping a package that already contains a __main__.py, the right way to do it seems to be the following: 1) add the package to a zip file (i.e. file.zip/pkg/) 2) add another __main__.py to the zip (i.e. file.zip/__main__.py) 3) add 'import pkg.__main__' to file.zip/__main__.py now if you do "python3 file.zip", file.zip/__main__.py will be executed, and in turn it will import file.zip/pkg/__main__.py, obtaining a result equivalent to "python -m pkg". (I still haven't figured out if the __main__.py is necessary while /importing/ a package/module from a zip file, after having added the zip file to sys.path.) So, to summarize, it seems to me that: 1) pkg/__main__.py is necessary to run "python3 -m pkg" (with -m); 2) file.zip/__main__.py is necessary to run "python3 file.zip" (without -m); 3) due to 1) and 2) creating an executable zipped package requires 2 __main__.py; 4) "python3 pkg" and "python3 -m file.zip" are not supposed to work even if the __main__.py files are in the right place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 15 13:53:28 2015 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 15 Jul 2015 11:53:28 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1436961208.32.0.0508459075492.issue24632@psf.upfronthosting.co.za> Ezio Melotti added the comment: After further tests, I think I figured out how things works. There are three separate things that interact with each other: * packages (dirs with an __init__.py) and "regular" dirs (with no __init__.py) or zip files; * how python is executed (with or without -m); * if the pkg/dir/zip is executed or imported. __main__.py makes a pkg/dir/zip "executable", but: * if it's a package, "python -m pkg" should be used; * if it's a dir or zip, "python dir_or_zip" should be used instead. There seem to be no differences between "regular" dirs and zip files: * both can become executable with a __main__.py; * both should be executed with "python dir_or_zip" (no -m); * both can not be imported (if we ignore namespace packages); * both can be added to sys.path, and the modules they contain imported, without needing any __main__.py. This also means that __main__.py is used only while doing "python -m pkg" or "python dir_or_zip", and not while doing "import pkg" or while importing a module inside a dir/zip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 15 14:04:05 2015 From: report at bugs.python.org (R. David Murray) Date: Wed, 15 Jul 2015 12:04:05 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1436961845.29.0.0323161237987.issue24632@psf.upfronthosting.co.za> R. David Murray added the comment: What you just described is exactly what I would have said was the case (a zip file acts exactly like it was a directory), so I'm glad that's the way it actually works :). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 15 14:05:41 2015 From: report at bugs.python.org (R. David Murray) Date: Wed, 15 Jul 2015 12:05:41 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1436961941.58.0.783265264942.issue24632@psf.upfronthosting.co.za> R. David Murray added the comment: The surprising thing is that __main__ works without there being an __init__. I didn't know that, assumed it wasn't true, and so never tried it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 15 15:23:06 2015 From: report at bugs.python.org (Matthew Keeter) Date: Wed, 15 Jul 2015 13:23:06 +0000 Subject: [docs] [issue24637] locals dictionary in PyRun_String Message-ID: <1436966586.07.0.0153968460371.issue24637@psf.upfronthosting.co.za> New submission from Matthew Keeter: The C API docs for PyRun_StringFlags, PyEval_EvalCodeEx, and PyEval_EvalCode say that globals and locals both must be dictionaries. However, digging into the source [1] shows that locals can be any object implementing the mapping protocol. Furthermore, the Python docs for eval and exec (which end up taking the same path) match the implementation, saying that locals can be any mapping object (which has been true since 2.4). The attached patch changes the C API docs to reflect the Python docs (and the actual implementation). No new tests are required, as test_general_eval [2] already checks that an arbitrary mapping object can be used as the locals variable in exec. [1] https://github.com/python/cpython/blob/master/Objects/frameobject.c#L628-L629 [2] https://github.com/python/cpython/blob/master/Lib/test/test_builtin.py#L473 ---------- assignee: docs at python components: Documentation files: locals.patch keywords: patch messages: 246761 nosy: Matthew Keeter, docs at python priority: normal severity: normal status: open title: locals dictionary in PyRun_String type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file39929/locals.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 15 15:40:19 2015 From: report at bugs.python.org (Ruth Berkow) Date: Wed, 15 Jul 2015 13:40:19 +0000 Subject: [docs] [issue24639] Documentation: broken link on unittest page Message-ID: <1436967619.28.0.696001000901.issue24639@psf.upfronthosting.co.za> New submission from Ruth Berkow: The documentation for unittest, in the "See also" box contains a link for "Simple Smalltalk Testing: With Patterns" that leads to a 404. Replacing this with a working link seems like a good idea; may I suggest http://live.exept.de/doc/online/english/tools/misc/testfram.htm ---------- assignee: docs at python components: Documentation messages: 246764 nosy: Ruth Berkow, docs at python priority: normal severity: normal status: open title: Documentation: broken link on unittest page type: performance versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 15 15:43:53 2015 From: report at bugs.python.org (R. David Murray) Date: Wed, 15 Jul 2015 13:43:53 +0000 Subject: [docs] [issue24639] Documentation: broken link on unittest page In-Reply-To: <1436967619.28.0.696001000901.issue24639@psf.upfronthosting.co.za> Message-ID: <1436967833.66.0.315876917767.issue24639@psf.upfronthosting.co.za> R. David Murray added the comment: This has already been corrected in issue 24548 using a link to archive.org. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> Broken link in the unittest documentation type: performance -> behavior versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 15 17:22:04 2015 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 15 Jul 2015 15:22:04 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1436973724.32.0.104223946642.issue24632@psf.upfronthosting.co.za> Ezio Melotti added the comment: > The surprising thing is that __main__ works without there being an __init__. That's also what surprised me, I always thought __main__.py was supposed to be used within a package executed with "python -m pkg", but apparently "regular" dirs and zip files can have one too -- as long as they are executed as "python dir_or_zip". This should have answered the question I posed in my first message: what is __main__.py and what is its purpose? As for the others: Q: when should it be used? A: whenever you want to make a package/dir/zip executable Q: what should it contain? A: usually an import + a function call that launches the app should be enough, but might contain more code if necessary Q: is it ok to have other __main__.py in the subpackages (e.g. test/__main__.py to run the tests with python -m package.test)? A: this seems to work and should be OK Q: how it interacts __init__.py (which one is executed first?) A: __init__.py seems to be executed first. I'm not aware of other interactions. If these are indeed correct, a patch can be made (feel free to do it, since I don't when I'll have time to do it myself). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 15 19:19:45 2015 From: report at bugs.python.org (Ethan Furman) Date: Wed, 15 Jul 2015 17:19:45 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1436980785.9.0.352570751999.issue24632@psf.upfronthosting.co.za> Ethan Furman added the comment: RDM noted: --------- > The surprising thing is that __main__ works without there being an > __init__. I didn't know that, assumed it wasn't true, and so never > tried it. I think this is due to PEP 420 Namespace Packages. ---------- _______________________________________ Python tracker _______________________________________ From jinz at email.sc.edu Wed Jul 15 18:17:21 2015 From: jinz at email.sc.edu (JIN, ZHEMING) Date: Wed, 15 Jul 2015 16:17:21 +0000 Subject: [docs] bug report Message-ID: In 7. Input and Output If you have an object x, you can view its JSON string representation with a simple line of code: >>> json.dumps([1, 'simple', 'list']) May be modified as x = [1, 'simple', 'list'] json.dumps(x) zheming -------------- next part -------------- An HTML attachment was scrubbed... URL: From williamst at uspioneer.com Wed Jul 15 22:44:00 2015 From: williamst at uspioneer.com (Tom Williams) Date: Wed, 15 Jul 2015 13:44:00 -0700 Subject: [docs] python 2.7.6: Datetime issue Message-ID: <955732E0701E8B4582EF8F8750CE841A9994E33A69@WEBSERVER.uspioneer.com> I am creating some test data by associating dates to certain fields. I encountered the following issue: [cid:image001.png at 01D0BF04.4E1E3000] import datetime myDate = datetime.date(2012,01,20) -- No issue myDate = datetime.date(2012,02,20) -- No issue myDate = datetime.date(2012,03,20) -- No issue myDate = datetime.date(2012,04,20) -- No issue myDate = datetime.date(2012,05,20) -- No issue myDate = datetime.date(2012,06,20) -- No issue myDate = datetime.date(2012,07,20) -- No issue myDate = datetime.date(2012,08,20) -- SyntaxError: invalid token myDate = datetime.date(2012,09,20) -- SyntaxError: invalid token myDate = datetime.date(2012,10,20) -- No issue myDate = datetime.date(2012,11,20) -- No issue myDate = datetime.date(2012,12,20) -- No issue thanks, __________________________________ - Thomas Williams :: williamst at uspioneer.com PIONEER Technologies Corporation 5205 Corporate Ctr. Ct. SE, Ste. A Olympia, WA 98503-5901 Phone: 360.570.1700 Fax: 360.570.1777 http://www.uspioneer.com This electronic mail transmission and any accompanying documents contain information belonging to the sender which may be confidential and legally privileged. This information is intended only for the use of the individual or entity to whom this electronic mail transmission was sent as indicated above. If you are not the intended recipient, any disclosure, copying, distribution, or action taken in reliance on the contents of the information contained in this transmission is strictly prohibited. If you have received this transmission in error, please notify the sender by return e-mail and delete the message. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.png Type: image/png Size: 17791 bytes Desc: image001.png URL: From report at bugs.python.org Wed Jul 15 23:58:04 2015 From: report at bugs.python.org (STINNER Victor) Date: Wed, 15 Jul 2015 21:58:04 +0000 Subject: [docs] [issue24640] no ensurepip in embedded Windows distribution In-Reply-To: <1436992591.69.0.374487494039.issue24640@psf.upfronthosting.co.za> Message-ID: <1436997484.55.0.236769784855.issue24640@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 15 23:58:47 2015 From: report at bugs.python.org (Chris Krycho) Date: Wed, 15 Jul 2015 21:58:47 +0000 Subject: [docs] [issue24640] no ensurepip in embedded Windows distribution In-Reply-To: <1436992591.69.0.374487494039.issue24640@psf.upfronthosting.co.za> Message-ID: <1436997527.56.0.856416908788.issue24640@psf.upfronthosting.co.za> Chris Krycho added the comment: Using --root or --target (as appropriate to the specific package) does appear to be the preferred approach for that, and given the constraints of an embedded installation, I agree that that's the most reasonable solution. I spent a fair bit of time reading up on that and the other options, and can't see a better one. I've already verified that approach will work for us, so I imagine it should for others as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 16 04:45:12 2015 From: report at bugs.python.org (Berker Peksag) Date: Thu, 16 Jul 2015 02:45:12 +0000 Subject: [docs] [issue24626] please sync cgi.parse document In-Reply-To: <1436757548.2.0.774685113457.issue24626@psf.upfronthosting.co.za> Message-ID: <1437014712.05.0.707509352963.issue24626@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 16 09:28:29 2015 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 16 Jul 2015 07:28:29 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1437031709.24.0.599521271636.issue24632@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I think this is due to PEP 420 Namespace Packages. It works on Python 2 too: $ ls execdir/ foo.py __main__.py $ cat execdir/foo.py print("foo imported") $ cat execdir/__main__.py import foo; print("main imported") $ python execdir/ foo imported main imported $ python -V Python 2.7.8 I haven't done any tests about the interaction of namespace packages and __main__.py, but if there are additional semantics, they should be documented as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 16 10:42:39 2015 From: report at bugs.python.org (Davide Rizzo) Date: Thu, 16 Jul 2015 08:42:39 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1437036159.62.0.699163197989.issue24632@psf.upfronthosting.co.za> Davide Rizzo added the comment: As far as I understand, assuming dir/ contains a __main__.py file $ python dir is equivalent to $ python dir/__main__.py in that it's behaviourally nothing more than executing a script in that dir and setting sys.path accordingly. This is the same in Python 2 and Python 3. This, together with the notion that zip files and directories are treated in the same way, allows running python file.zip since we have no option for executing a file *within* the zip file. Altogether, this is a significantly different behaviour than the one for "python -m pkg". That would be closer to: >>> import pkg.__main__ This also explains why the package __init__ is executed first (you import the package first, then the module). A significant difference is that it's not a real import (just as pkg.__init__ is not imported) and sys.modules is not affected. ---------- nosy: +davide.rizzo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 16 12:11:38 2015 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 16 Jul 2015 10:11:38 +0000 Subject: [docs] [issue17359] Mention "__main__.py" explicitly in command line docs In-Reply-To: <1362512425.64.0.937549165034.issue17359@psf.upfronthosting.co.za> Message-ID: <1437041498.24.0.870263625294.issue17359@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #24632. ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From mail at timgolden.me.uk Thu Jul 16 15:51:09 2015 From: mail at timgolden.me.uk (Tim Golden) Date: Thu, 16 Jul 2015 14:51:09 +0100 Subject: [docs] python 2.7.6: Datetime issue In-Reply-To: <955732E0701E8B4582EF8F8750CE841A9994E33A69@WEBSERVER.uspioneer.com> References: <955732E0701E8B4582EF8F8750CE841A9994E33A69@WEBSERVER.uspioneer.com> Message-ID: <55A7B6CD.30903@timgolden.me.uk> On 15/07/2015 21:44, Tom Williams wrote: > I am creating some test data by associating dates to certain fields. I > encountered the following issue: > > > import datetime > > myDate = datetime.date(2012,01,20) -- No issue > > myDate = datetime.date(2012,02,20) -- No issue > > myDate = datetime.date(2012,03,20) -- No issue > > myDate = datetime.date(2012,04,20) -- No issue > > myDate = datetime.date(2012,05,20) -- No issue > > myDate = datetime.date(2012,06,20) -- No issue > > myDate = datetime.date(2012,07,20) -- No issue > > myDate = datetime.date(2012,08,20) -- SyntaxError: invalid token > > myDate = datetime.date(2012,09,20) -- SyntaxError: invalid token > I'm afraid you've been bitten by the slightly obscure fact that, in Python, numbers which start with a zero are expected to be octal (base 8) and so any digit greater than 7 is invalid. This typically trips people up who, like you, want to line numbers up and for whom the use of base 8 for *anything* is pretty much unknown. Sorry! TJG From report at bugs.python.org Fri Jul 17 08:53:39 2015 From: report at bugs.python.org (swanson) Date: Fri, 17 Jul 2015 06:53:39 +0000 Subject: [docs] [issue24650] Error in yield expression documentation Message-ID: <1437116019.06.0.685229534138.issue24650@psf.upfronthosting.co.za> New submission from swanson: https://docs.python.org/3/reference/expressions.html in 6.2.9. Yield expressions end of 1st paragraph: "Using a yield expression in a function?s body causes that function to be a generator." NO! As the very next sentence explains, a generator is what's returned by such a function, not the function itself. Basically, it should be sufficient to add the word "function" to the end of that sentence: "... generator function." However, this error does NOT exist in 3.0 to 3.2 - just in 3.3 to 3.6, so I suggest just using the same wording as 3.0 to 3.2: "Using a yield expression in a function definition is sufficient to cause that definition to create a generator function instead of a normal function." ---------- assignee: docs at python components: Documentation messages: 246841 nosy: docs at python, swanson priority: normal severity: normal status: open title: Error in yield expression documentation versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 17 16:47:12 2015 From: report at bugs.python.org (Marcin Szewczyk) Date: Fri, 17 Jul 2015 14:47:12 +0000 Subject: [docs] [issue24654] PEP 492 - example benchmark doesn't work (TypeError) Message-ID: <1437144432.53.0.243847833989.issue24654@psf.upfronthosting.co.za> New submission from Marcin Szewczyk: Using benchmark from the section https://www.python.org/dev/peps/pep-0492/#async-await raises: Traceback (most recent call last): File "./bench.py", line 28, in timeit(abinary, 19, 30) File "./bench.py", line 23, in timeit list(gen(depth)) TypeError: 'coroutine' object is not iterable Am I missing something or is a correction needed in code or documentation? BTW, PEP 492 uses the term "plain generator", but unlike "generator-based coroutine" or "native coroutine" it's not defined in section https://www.python.org/dev/peps/pep-0492/#glossary. I think adding a definition would be beneficial. ---------- assignee: docs at python components: Documentation, asyncio messages: 246856 nosy: docs at python, gvanrossum, haypo, wodny, yselivanov priority: normal severity: normal status: open title: PEP 492 - example benchmark doesn't work (TypeError) type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 17 20:20:16 2015 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Jul 2015 18:20:16 +0000 Subject: [docs] [issue24654] PEP 492 - example benchmark doesn't work (TypeError) In-Reply-To: <1437144432.53.0.243847833989.issue24654@psf.upfronthosting.co.za> Message-ID: <1437157216.38.0.525144987763.issue24654@psf.upfronthosting.co.za> Terry J. Reedy added the comment: timeit(binary, 5, 3) timeit(abinary, 5, 3) gives me the same error running on Win 7 from Idle ---------- nosy: +terry.reedy stage: -> needs patch type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 17 20:43:08 2015 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 17 Jul 2015 18:43:08 +0000 Subject: [docs] [issue24654] PEP 492 - example benchmark doesn't work (TypeError) In-Reply-To: <1437144432.53.0.243847833989.issue24654@psf.upfronthosting.co.za> Message-ID: <1437158588.73.0.260034086328.issue24654@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 17 23:10:11 2015 From: report at bugs.python.org (Steve Dower) Date: Fri, 17 Jul 2015 21:10:11 +0000 Subject: [docs] [issue24642] Will there be an MSI installer? In-Reply-To: <1437036229.97.0.552879737445.issue24642@psf.upfronthosting.co.za> Message-ID: <1437167411.77.0.355315169669.issue24642@psf.upfronthosting.co.za> Steve Dower added the comment: > 1. This should be more prominently documented. Very true. I'll get a link to the updated docs page in there. > 2. passing /? should list the available kay-value arguments. Should be doable. I've mostly been holding off until I stop changing the arguments. At the very least, I can add a link to the doc page from here as well. > 2.5. The help should really be to stdout... Unfortunately, I don't think this one is possible as the installer is SUBSYSTEM:WINDOWS not CONSOLE. stdout is unbound by default, and the only way to bind it is to open a new console window, which doesn't really help here. Switching to SUBSYSTEM:CONSOLE is going to open a new console window every time you run it (and running by double-clicking or from a browser will be the vast majority). I can probably add a link from the front page of the installer to bring up the help page, but I wouldn't want it to be too obtrusive (maybe from the Customize Options page?) - the aim is to reduce the number of decisions for most users by having a very clean front page. There was a suggestion a while ago to generate a full command line based on the options selected in the UI, which is doable, but maybe not useful enough to justify the time and effort. I'd expect anyone capable of this sort of deployment to be able to figure out the command line for themselves though, given access to the list of possible options. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 01:13:53 2015 From: report at bugs.python.org (Martin Panter) Date: Fri, 17 Jul 2015 23:13:53 +0000 Subject: [docs] [issue24650] Error in yield expression documentation In-Reply-To: <1437116019.06.0.685229534138.issue24650@psf.upfronthosting.co.za> Message-ID: <1437174833.18.0.35799203876.issue24650@psf.upfronthosting.co.za> Martin Panter added the comment: Technically, the glossary defines the unqualified term ?generator? as the factory function: . (The 3.6 documentation should say the same but the build has been broken or out of date for a few months.) Though I agree adding the old wording would make it clearer. The 3.3 change was made in revision e02da391741f for Issue 12704. ---------- nosy: +nikratio, vadmium stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 01:49:55 2015 From: report at bugs.python.org (Roundup Robot) Date: Fri, 17 Jul 2015 23:49:55 +0000 Subject: [docs] [issue24642] Will there be an MSI installer? In-Reply-To: <1437036229.97.0.552879737445.issue24642@psf.upfronthosting.co.za> Message-ID: <20150717234952.70561.70452@psf.io> Roundup Robot added the comment: New changeset 06600287f11f by Steve Dower in branch '3.5': Issue #24642: Adds installer notes and links to What's New for 3.5 https://hg.python.org/cpython/rev/06600287f11f New changeset d6c91b8242d2 by Steve Dower in branch 'default': Issue #24642: Adds installer notes and links to What's New for 3.5 https://hg.python.org/cpython/rev/d6c91b8242d2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 02:23:15 2015 From: report at bugs.python.org (swanson) Date: Sat, 18 Jul 2015 00:23:15 +0000 Subject: [docs] [issue24650] Error in yield expression documentation In-Reply-To: <1437116019.06.0.685229534138.issue24650@psf.upfronthosting.co.za> Message-ID: <1437178994.8.0.964101313373.issue24650@psf.upfronthosting.co.za> swanson added the comment: Okay, interesting - I hadn't checked the glossary. I don't ultimately care what it's called as long as the documentation is clear and consistent. But for anyone just looking at the names of the classes and the class hierarchy, they'd come away saying, "A generator is a type of iterator," not "A generator is a type of function." (Functions can't even have subtypes.) If the docs are painting a different picture than the already existing reality, it seems like that would be confusing to anyone who doesn't already know how they work. (If you already know how something works, you don't really need the docs, so it's easy to think they're clearer than they really are.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 05:51:47 2015 From: report at bugs.python.org (Martin Panter) Date: Sat, 18 Jul 2015 03:51:47 +0000 Subject: [docs] [issue24563] Encoding declaration: doc supported encodings In-Reply-To: <1435966719.35.0.908058462942.issue24563@psf.upfronthosting.co.za> Message-ID: <1437191506.96.0.825461538224.issue24563@psf.upfronthosting.co.za> Martin Panter added the comment: You can remove the ?.. XXX? line; I understand it is just like a TODO comment, and with this fixed it would no longer be relevant. I suggest putting the links next to the sentence that ends ?. . . the encoding name must be recognized by Python.? The links should be internal links, rather than hard-coded Internet links to another version of the documentation. See . The Standard Encodings section already has a label already set up for you to use :) ---------- nosy: +vadmium stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 06:23:21 2015 From: report at bugs.python.org (Martin Panter) Date: Sat, 18 Jul 2015 04:23:21 +0000 Subject: [docs] [issue24563] Encoding declaration: doc supported encodings In-Reply-To: <1435966719.35.0.908058462942.issue24563@psf.upfronthosting.co.za> Message-ID: <1437193401.44.0.419205496316.issue24563@psf.upfronthosting.co.za> Martin Panter added the comment: PEP 263 doesn?t say exactly what encodings are supported. It mentions Shift JIS is supported, but UTF-16 is not. Only UTF-8 is allowed if the file starts with a UTF-8 BOM. I guess many of the Python-specific text encodings from the second section may be supported. Probably any text encoding in general, as long as the first one or two lines can ?rougly? be parsed in ASCII. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 07:08:40 2015 From: report at bugs.python.org (Alex Walters) Date: Sat, 18 Jul 2015 05:08:40 +0000 Subject: [docs] [issue24642] Will there be an MSI installer? In-Reply-To: <1437036229.97.0.552879737445.issue24642@psf.upfronthosting.co.za> Message-ID: <1437196120.76.0.173551995434.issue24642@psf.upfronthosting.co.za> Alex Walters added the comment: on 2.5, I figured the answer would be along those lines. for 2, Linking to the documentation at least would be helpful (or otherwise indicating that there are arguments that are not listed and are in the docs) if the arguments cant be listed reasonably easily. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 08:39:53 2015 From: report at bugs.python.org (Yury Selivanov) Date: Sat, 18 Jul 2015 06:39:53 +0000 Subject: [docs] [issue24654] PEP 492 - example benchmark doesn't work (TypeError) In-Reply-To: <1437144432.53.0.243847833989.issue24654@psf.upfronthosting.co.za> Message-ID: <1437201593.53.0.571391444292.issue24654@psf.upfronthosting.co.za> Yury Selivanov added the comment: Fixed in https://hg.python.org/peps/rev/7ad183c1d9be I'll quote the commit message here: pep-492: Update benchmark code Since coroutines now have a distinct type, they do not support iteration. Instead of doing 'list(o)', we now do 'o.send(None)' until StopIteration. Note, that the updated timings are due to the difference of doing a loop in Python vs doing it in C ('list()' vs 'while True'). Marcin and Terry, thanks for reporting this! ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 10:55:00 2015 From: report at bugs.python.org (Christian Barcenas) Date: Sat, 18 Jul 2015 08:55:00 +0000 Subject: [docs] [issue24659] dict() built-in fails on iterators with a "keys" attribute Message-ID: <1437209700.05.0.411435282726.issue24659@psf.upfronthosting.co.za> New submission from Christian Barcenas: I noticed an inconsistency today between the dict() documentation vs. implementation. The documentation for the dict() built-in [1] states that the function accepts an optional positional argument that is either a mapping object [2] or an iterable object [3]. Consider the following: import collections.abc class MyIterable(object): def __init__(self): self._data = [('one', 1), ('two', 2)] def __iter__(self): return iter(self._data) class MyIterableWithKeysMethod(MyIterable): def keys(self): return "And now for something completely different" class MyIterableWithKeysAttribute(MyIterable): keys = "It's just a flesh wound!" assert issubclass(MyIterable, collections.abc.Iterable) assert issubclass(MyIterableWithKeysMethod, collections.abc.Iterable) assert issubclass(MyIterableWithKeysAttribute, collections.abc.Iterable) assert not issubclass(MyIterable, collections.abc.Mapping) assert not issubclass(MyIterableWithKeysMethod, collections.abc.Mapping) assert not issubclass(MyIterableWithKeysAttribute, collections.abc.Mapping) # OK assert dict(MyIterable()) == {'one': 1, 'two': 2} # Traceback (most recent call last): # File "", line 1, in # TypeError: 'MyIterableWithKeysMethod' object is not subscriptable assert dict(MyIterableWithKeysMethod()) == {'one': 1, 'two': 2} # Traceback (most recent call last): # File "", line 1, in # TypeError: attribute of type 'str' is not callable assert dict(MyIterableWithKeysAttribute()) == {'one': 1, 'two': 2} The last two assertions should not fail, and it appears that the offending code can be found in Objects/dictobject.c's dict_update_common: else if (arg != NULL) { _Py_IDENTIFIER(keys); if (_PyObject_HasAttrId(arg, &PyId_keys)) result = PyDict_Merge(self, arg, 1); else result = PyDict_MergeFromSeq2(self, arg, 1); } PyDict_Merge is used to merge key-value pairs if the optional parameter is a mapping, and PyDict_MergeFromSeq2 is used if the parameter is an iterable. My immediate thought was to substitute the _PyObject_HasAttrId call with PyMapping_Check which I believe would work in 2.7, but due to #5945 I don't think this fix would work in 3.x. Thoughts? [1] https://docs.python.org/3.6/library/stdtypes.html#dict [2] https://docs.python.org/3.6/glossary.html#term-mapping [3] https://docs.python.org/3.6/glossary.html#term-iterable ---------- assignee: docs at python components: Documentation, Interpreter Core messages: 246890 nosy: christian.barcenas, docs at python priority: normal severity: normal status: open title: dict() built-in fails on iterators with a "keys" attribute type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 10:57:27 2015 From: report at bugs.python.org (Stefan Behnel) Date: Sat, 18 Jul 2015 08:57:27 +0000 Subject: [docs] [issue24654] PEP 492 - example benchmark doesn't work (TypeError) In-Reply-To: <1437144432.53.0.243847833989.issue24654@psf.upfronthosting.co.za> Message-ID: <1437209847.73.0.100429547559.issue24654@psf.upfronthosting.co.za> Stefan Behnel added the comment: Thanks for updating the micro-benchmark. Just FYI (and sorry for hijacking this ticket), I ran it through Cython. Here are the numbers: Cython 0.23 (latest master) binary(21) * 3: total 1.609s abinary(21) * 3: total 1.514s CPython 3.5 (latest branch) binary(21) * 3: total 4.653s abinary(21) * 3: total 4.750s The low factor between the two shows (IMO) that using a type slot function for await was a very good idea. Streamlining FetchStopIteration might bring another bit. I also tried the same thing with alternating recursively between the Python and Cython implementation by changing it to l = await cy_abinary(n - 1) r = await py_abinary(n - 1) binary(21) * 3: total 3.835s abinary(21) * 3: total 3.952s So even the slow fallback paths seem pretty efficient on both sides. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 11:07:29 2015 From: report at bugs.python.org (Christian Barcenas) Date: Sat, 18 Jul 2015 09:07:29 +0000 Subject: [docs] [issue24659] dict() built-in fails on iterators with a "keys" attribute In-Reply-To: <1437209700.05.0.411435282726.issue24659@psf.upfronthosting.co.za> Message-ID: <1437210449.62.0.937797780613.issue24659@psf.upfronthosting.co.za> Christian Barcenas added the comment: Should have clarified that the specific issue that is outlined in #5945 is that PyMapping_Check returns 1 on sequences (e.g. lists), which would mean something like x = [('one', 1), ('two', 2)]; dict(x) would fail in 3.x because x would be incorrectly evaluated as a mapping rather than as an iterable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 13:45:44 2015 From: report at bugs.python.org (R. David Murray) Date: Sat, 18 Jul 2015 11:45:44 +0000 Subject: [docs] [issue24659] dict() built-in fails on iterators with a "keys" attribute In-Reply-To: <1437209700.05.0.411435282726.issue24659@psf.upfronthosting.co.za> Message-ID: <1437219944.01.0.788852958544.issue24659@psf.upfronthosting.co.za> R. David Murray added the comment: Well, this is an example of duck typing, something we commonly do in Python. I'm not convinced this is a bug. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 15:06:24 2015 From: report at bugs.python.org (Martin Panter) Date: Sat, 18 Jul 2015 13:06:24 +0000 Subject: [docs] [issue24659] dict() built-in fails on iterators with a "keys" attribute In-Reply-To: <1437209700.05.0.411435282726.issue24659@psf.upfronthosting.co.za> Message-ID: <1437224784.19.0.528207332189.issue24659@psf.upfronthosting.co.za> Martin Panter added the comment: It is at least an omission from the documentation. The glossary refers to the Mapping ABC. From Christian?s point of view, the quack of an iterator with just a ?keys? attribute sounds more like an iterator than a mapping. I think the documentation for the dict() constructor should say how to ensure the iterable and mapping modes are triggered. Perhaps dict.update() should also, because it appears to also treat non-dict() ?mappings? differently to plain iterators. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 18:30:12 2015 From: report at bugs.python.org (Roundup Robot) Date: Sat, 18 Jul 2015 16:30:12 +0000 Subject: [docs] [issue24642] Will there be an MSI installer? In-Reply-To: <1437036229.97.0.552879737445.issue24642@psf.upfronthosting.co.za> Message-ID: <20150718163008.14702.87995@psf.io> Roundup Robot added the comment: New changeset 9f60ec6d6586 by Steve Dower in branch '3.5': Issue #24642: Improves help text displayed in the Windows installer. https://hg.python.org/cpython/rev/9f60ec6d6586 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 19:29:22 2015 From: report at bugs.python.org (Christian Barcenas) Date: Sat, 18 Jul 2015 17:29:22 +0000 Subject: [docs] [issue24659] dict() built-in fails on iterators with a "keys" attribute In-Reply-To: <1437209700.05.0.411435282726.issue24659@psf.upfronthosting.co.za> Message-ID: <1437240562.72.0.701426818114.issue24659@psf.upfronthosting.co.za> Christian Barcenas added the comment: I'm aware of duck typing but I don't think this is the right place for it. (Although ABCs are ostensibly a kind of duck typing, as they do not require implementing classes to inherit from the ABC.) As Martin noticed, the glossary directly defines a "mapping" as a class that implements the Mapping ABC, and likewise the definition of an "iterable" under the glossary would satisfy the Iterable ABC. I think this is not just a documentation issue: the "quack" of a mapping has been well-defined and consistent since Python 2.7. Same for iterables. (It is worth noting that 2.6's definition of mapping was indeed just any object with a __getitem__ method ) > I think the documentation for the dict() constructor should say how to ensure the iterable and mapping modes are triggered. Doesn't it do this already by referencing the definitions of "iterable" and "mapping"? These ABCs are used in other built-ins such as any() and eval(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 18 23:00:53 2015 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 18 Jul 2015 21:00:53 +0000 Subject: [docs] [issue24568] Misc/NEWS: "free-after-use" -> "use-after-free" In-Reply-To: <1436098037.39.0.99506662274.issue24568@psf.upfronthosting.co.za> Message-ID: <1437253253.1.0.106065653441.issue24568@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Still not fixed. ---------- nosy: +Arfrever, benjamin.peterson resolution: fixed -> stage: resolved -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 19 01:16:00 2015 From: report at bugs.python.org (Chris Mattmann) Date: Sat, 18 Jul 2015 23:16:00 +0000 Subject: [docs] [issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(""''''")) In-Reply-To: <1418654943.54.0.176050651858.issue23054@psf.upfronthosting.co.za> Message-ID: <1437261360.13.0.839402017618.issue23054@psf.upfronthosting.co.za> Chris Mattmann added the comment: Hi there, we are experiencing this in tika-python too, see: https://github.com/chrismattmann/tika-python/issues/44 ---------- nosy: +chrismattmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 19 01:28:48 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 Jul 2015 23:28:48 +0000 Subject: [docs] [issue24568] Misc/NEWS: "free-after-use" -> "use-after-free" In-Reply-To: <1436098037.39.0.99506662274.issue24568@psf.upfronthosting.co.za> Message-ID: <1437262128.11.0.100466315092.issue24568@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 19 01:31:40 2015 From: report at bugs.python.org (Roundup Robot) Date: Sat, 18 Jul 2015 23:31:40 +0000 Subject: [docs] [issue24568] Misc/NEWS: "free-after-use" -> "use-after-free" In-Reply-To: <1436098037.39.0.99506662274.issue24568@psf.upfronthosting.co.za> Message-ID: <20150718233136.87954.81700@psf.io> Roundup Robot added the comment: New changeset 669d6b5c1734 by Raymond Hettinger in branch '2.7': Issue #24568: fix typo. https://hg.python.org/cpython/rev/669d6b5c1734 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 19 01:31:57 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 Jul 2015 23:31:57 +0000 Subject: [docs] [issue24568] Misc/NEWS: "free-after-use" -> "use-after-free" In-Reply-To: <1436098037.39.0.99506662274.issue24568@psf.upfronthosting.co.za> Message-ID: <1437262317.56.0.472380404926.issue24568@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 19 01:52:33 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 18 Jul 2015 23:52:33 +0000 Subject: [docs] [issue24659] dict() built-in fails on iterators with a "keys" attribute In-Reply-To: <1437209700.05.0.411435282726.issue24659@psf.upfronthosting.co.za> Message-ID: <1437263553.26.0.155354419934.issue24659@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 19 02:23:42 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 19 Jul 2015 00:23:42 +0000 Subject: [docs] [issue24659] dict() built-in fails on iterators with a "keys" attribute In-Reply-To: <1437209700.05.0.411435282726.issue24659@psf.upfronthosting.co.za> Message-ID: <1437265422.07.0.18944919381.issue24659@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I'm aware of duck typing but I don't think this > is the right place for it. The code for dicts is very old, stable, and unlikely to change. Also, the logic of checking for .keys() is immortalized in the collections.abc.MutableMapping update() method. For the most part, consumers of iterables, sequences, and mappings are allowed to use duct-typing (this is a feature of the language, not a bug). The docs can be improved in a number of places. For example the docstring on the dict constructor is out of sync with the dict.update() method: >>> print(dict.__doc__) dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) >>> print(dict.update.__doc__) D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k] In addition, the glossary entries for iterable, sequence, and mapping need to be improved to distinguish between their somewhat vague use in a general sense versus the specific meaning of isinstance(obj, Mapping). Unless the docs specify a check for the latter, they almost always do some form of duck-typing or a check for concrete built-in class or subclass. Terms like "mapping" and "sequence" are often used somewhat generally both inside and outside the Python world. Sometimes mapping is used in the mathematic sense (pairing each member of the domain with each member of the range), http://www.icoachmath.com/math_dictionary/mapping.html, and sometimes in the sense of a subset of dict capabilities (i.e. has __getitem__ and keys). The docs for PyMapping_Check() need to be updated to indicate the known limitations of the check and to disambiguate it from isinstance(obj, Mapping). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 19 02:36:28 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 19 Jul 2015 00:36:28 +0000 Subject: [docs] [issue23054] ConnectionError: ('Connection aborted.', BadStatusLine(""''''")) In-Reply-To: <1418654943.54.0.176050651858.issue23054@psf.upfronthosting.co.za> Message-ID: <1437266187.93.0.598488916314.issue23054@psf.upfronthosting.co.za> Martin Panter added the comment: There is hopefully a better RemoteDisconnected exception and documentation in 3.5, thanks to Issue 3566. In Python 2, I think this is the same as Issue 8450. ---------- resolution: -> duplicate status: open -> closed superseder: -> httplib: false BadStatusLine() raised _______________________________________ Python tracker _______________________________________ From lluis.bellsolell at gmail.com Sun Jul 19 20:57:44 2015 From: lluis.bellsolell at gmail.com (=?UTF-8?Q?Llu=C3=ADs_Bellsolell?=) Date: Sun, 19 Jul 2015 20:57:44 +0200 Subject: [docs] doc bug in 17.5.6. Legacy Shell Invocation Functions Message-ID: Python 3.4.3 Documentation In 17.5.6. Legacy Shell Invocation Functions the 3rd paragraph starting: Execute the string cmd in a shell with Popen.check_output() ... should read: Execute the string cmd in a shell with subprocess.check_output() ... -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sun Jul 19 21:28:16 2015 From: report at bugs.python.org (Marcin Szewczyk) Date: Sun, 19 Jul 2015 19:28:16 +0000 Subject: [docs] [issue24654] PEP 492 - example benchmark doesn't work (TypeError) In-Reply-To: <1437144432.53.0.243847833989.issue24654@psf.upfronthosting.co.za> Message-ID: <1437334096.84.0.244876314132.issue24654@psf.upfronthosting.co.za> Marcin Szewczyk added the comment: Thanks for the update. Regarding the "plain generator" part -- am I right thinking it's simply a generator not decorated with @asyncio.coroutine? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 20 04:06:25 2015 From: report at bugs.python.org (Alex Walters) Date: Mon, 20 Jul 2015 02:06:25 +0000 Subject: [docs] [issue24642] Will there be an MSI installer? In-Reply-To: <1437036229.97.0.552879737445.issue24642@psf.upfronthosting.co.za> Message-ID: <1437357985.45.0.5346586803.issue24642@psf.upfronthosting.co.za> Changes by Alex Walters : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 20 06:43:18 2015 From: report at bugs.python.org (Martin Panter) Date: Mon, 20 Jul 2015 04:43:18 +0000 Subject: [docs] [issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__ In-Reply-To: <1227464493.77.0.130820783094.issue4395@psf.upfronthosting.co.za> Message-ID: <1437367398.58.0.128749709129.issue4395@psf.upfronthosting.co.za> Martin Panter added the comment: Nick seemed to approve of this, so perhaps it is ready to commit? The new patch just resolves a minor conflict with the current code. ---------- stage: patch review -> commit review versions: +Python 3.6 Added file: http://bugs.python.org/file39954/default-ne-reflected-priority.v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 20 07:22:58 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Jul 2015 05:22:58 +0000 Subject: [docs] [issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__ In-Reply-To: <1227464493.77.0.130820783094.issue4395@psf.upfronthosting.co.za> Message-ID: <1437369778.77.0.290779453118.issue4395@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Added comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 20 09:27:30 2015 From: report at bugs.python.org (Martin Panter) Date: Mon, 20 Jul 2015 07:27:30 +0000 Subject: [docs] [issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__ In-Reply-To: <1227464493.77.0.130820783094.issue4395@psf.upfronthosting.co.za> Message-ID: <1437377249.94.0.444621168853.issue4395@psf.upfronthosting.co.za> Martin Panter added the comment: This updated patch adds the clarification about NotImplemented. ---------- Added file: http://bugs.python.org/file39958/default-ne-reflected-priority.v4.patch _______________________________________ Python tracker _______________________________________ From storchaka at gmail.com Mon Jul 20 07:22:28 2015 From: storchaka at gmail.com (storchaka at gmail.com) Date: Mon, 20 Jul 2015 05:22:28 -0000 Subject: [docs] Document auto __ne__ generation; provide a use case for non-trivial __ne__ (issue 4395) Message-ID: <20150720052228.15563.43881@psf.upfronthosting.co.za> http://bugs.python.org/review/4395/diff/15237/Doc/reference/datamodel.rst File Doc/reference/datamodel.rst (right): http://bugs.python.org/review/4395/diff/15237/Doc/reference/datamodel.rst#newcode1280 Doc/reference/datamodel.rst:1280: inverts the result. There are no other implied relationships Is it worth explicitly mention that __ne__ inverts the result if it is not NotImplemented? http://bugs.python.org/review/4395/diff/15237/Lib/test/test_binop.py File Lib/test/test_binop.py (right): http://bugs.python.org/review/4395/diff/15237/Lib/test/test_binop.py#newcode387 Lib/test/test_binop.py:387: self.assertTrue(issubclass(V, B)) assertIsSubclass? http://bugs.python.org/review/4395/ From vadmium+py at gmail.com Mon Jul 20 09:03:34 2015 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Mon, 20 Jul 2015 07:03:34 -0000 Subject: [docs] Document auto __ne__ generation; provide a use case for non-trivial __ne__ (issue 4395) Message-ID: <20150720070334.383.88550@psf.upfronthosting.co.za> https://bugs.python.org/review/4395/diff/15237/Doc/reference/datamodel.rst File Doc/reference/datamodel.rst (right): https://bugs.python.org/review/4395/diff/15237/Doc/reference/datamodel.rst#newcode1280 Doc/reference/datamodel.rst:1280: inverts the result. There are no other implied relationships On 2015/07/20 07:22:28, storchaka wrote: > Is it worth explicitly mention that __ne__ inverts the result if it is not > NotImplemented? Yes I think so. I?ll prolly add something like ?. . . inverts the result unless it is ``NotImplemented``.? https://bugs.python.org/review/4395/diff/15237/Lib/test/test_binop.py File Lib/test/test_binop.py (right): https://bugs.python.org/review/4395/diff/15237/Lib/test/test_binop.py#newcode387 Lib/test/test_binop.py:387: self.assertTrue(issubclass(V, B)) On 2015/07/20 07:22:28, storchaka wrote: > assertIsSubclass? Don?t think such a method exists; I only have assertIsInstance(). https://bugs.python.org/review/4395/ From report at bugs.python.org Mon Jul 20 10:12:44 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 20 Jul 2015 08:12:44 +0000 Subject: [docs] [issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__ In-Reply-To: <1227464493.77.0.130820783094.issue4395@psf.upfronthosting.co.za> Message-ID: <1437379964.52.0.703246119194.issue4395@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:03:36 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:03:36 +0000 Subject: [docs] [issue24632] Improve documentation about __main__.py In-Reply-To: <1436856841.67.0.538500952598.issue24632@psf.upfronthosting.co.za> Message-ID: <1437462216.37.0.772349545683.issue24632@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:05:19 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:05:19 +0000 Subject: [docs] [issue23623] Python 3.5 docs need to clarify how to set PATH, etc In-Reply-To: <1425910467.52.0.177540191477.issue23623@psf.upfronthosting.co.za> Message-ID: <1437462319.49.0.00323341997003.issue23623@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:07:46 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:07:46 +0000 Subject: [docs] [issue24195] Add `Executor.filter` to concurrent.futures In-Reply-To: <1431638802.0.0.167827013304.issue24195@psf.upfronthosting.co.za> Message-ID: <1437462466.74.0.504381935029.issue24195@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:08:12 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:08:12 +0000 Subject: [docs] [issue17546] Document the circumstances where the locals() dict get updated In-Reply-To: <1364232011.36.0.2936348393.issue17546@psf.upfronthosting.co.za> Message-ID: <1437462492.69.0.297301870612.issue17546@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:16:24 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:16:24 +0000 Subject: [docs] [issue24045] Behavior of large returncodes (sys.exit(nn)) In-Reply-To: <1429836429.07.0.888331603842.issue24045@psf.upfronthosting.co.za> Message-ID: <1437462984.47.0.881371412206.issue24045@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:18:17 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:18:17 +0000 Subject: [docs] [issue23987] docs about containers membership testing wrong for broken objects In-Reply-To: <1429258165.63.0.284734084008.issue23987@psf.upfronthosting.co.za> Message-ID: <1437463097.75.0.866465816549.issue23987@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:23:29 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:23:29 +0000 Subject: [docs] [issue23556] Scope for raise without argument is different in Python 2 and 3 In-Reply-To: <1425212072.31.0.66074782686.issue23556@psf.upfronthosting.co.za> Message-ID: <1437463409.68.0.225655870046.issue23556@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:27:01 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:27:01 +0000 Subject: [docs] [issue17352] Be clear that __prepare__ must be declared as a class method In-Reply-To: <1362409892.83.0.717786566871.issue17352@psf.upfronthosting.co.za> Message-ID: <1437463621.51.0.709826439918.issue17352@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:27:28 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:27:28 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1437463648.6.0.914412845832.issue12067@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:29:07 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:29:07 +0000 Subject: [docs] [issue23455] file iterator "deemed broken"; can resume after StopIteration In-Reply-To: <1423766934.46.0.3718920034.issue23455@psf.upfronthosting.co.za> Message-ID: <1437463747.72.0.00964093177997.issue23455@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:29:34 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:29:34 +0000 Subject: [docs] [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1437463774.88.0.247241732759.issue17576@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:36:01 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:36:01 +0000 Subject: [docs] [issue17422] language reference should specify restrictions on class namespace In-Reply-To: <1363293215.19.0.289288553848.issue17422@psf.upfronthosting.co.za> Message-ID: <1437464161.4.0.126134419525.issue17422@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:43:20 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:43:20 +0000 Subject: [docs] [issue22867] document behavior of calling atexit.register() while atexit._run_exitfuncs is running In-Reply-To: <1415911957.21.0.792604038872.issue22867@psf.upfronthosting.co.za> Message-ID: <1437464600.93.0.021968380373.issue22867@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:47:20 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:47:20 +0000 Subject: [docs] [issue22790] some class attributes missing from dir(Class) In-Reply-To: <1415090644.24.0.620494684539.issue22790@psf.upfronthosting.co.za> Message-ID: <1437464840.58.0.796275912587.issue22790@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:56:20 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:56:20 +0000 Subject: [docs] [issue22738] improve 'python -h' documentation for '-c' In-Reply-To: <1414384786.34.0.941168460328.issue22738@psf.upfronthosting.co.za> Message-ID: <1437465380.56.0.309090661393.issue22738@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 09:57:34 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 07:57:34 +0000 Subject: [docs] [issue22297] 2.7 json encoding broken for enums In-Reply-To: <1409310034.91.0.63329091583.issue22297@psf.upfronthosting.co.za> Message-ID: <1437465454.83.0.468812968712.issue22297@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 10:02:41 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 08:02:41 +0000 Subject: [docs] [issue18334] type(name, bases, dict) does not call metaclass' __prepare__ attribute In-Reply-To: <1372641138.46.0.644775856541.issue18334@psf.upfronthosting.co.za> Message-ID: <1437465761.71.0.423855751662.issue18334@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 10:05:49 2015 From: report at bugs.python.org (Ethan Furman) Date: Tue, 21 Jul 2015 08:05:49 +0000 Subject: [docs] [issue16508] include the "object" type in the lists of documented types In-Reply-To: <1353284081.12.0.684350303879.issue16508@psf.upfronthosting.co.za> Message-ID: <1437465949.97.0.277333814597.issue16508@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 10:26:41 2015 From: report at bugs.python.org (Carol Willing) Date: Tue, 21 Jul 2015 08:26:41 +0000 Subject: [docs] [issue13124] Add "Running a Build Slave" page to the devguide In-Reply-To: <1318011517.56.0.343886781977.issue13124@psf.upfronthosting.co.za> Message-ID: <1437467201.37.0.812705074749.issue13124@psf.upfronthosting.co.za> Carol Willing added the comment: Closing this issue since a newer issue #24440 addresses devguide documentation of installing and running a buildbot. Thanks to R. David Murray for submitting the patch to #24440. ---------- nosy: +willingc resolution: -> duplicate stage: patch review -> resolved status: open -> closed superseder: -> Move the buildslave setup information from the wiki to the devguide _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 15:03:45 2015 From: report at bugs.python.org (R. David Murray) Date: Tue, 21 Jul 2015 13:03:45 +0000 Subject: [docs] [issue13124] Add "Running a Build Slave" page to the devguide In-Reply-To: <1318011517.56.0.343886781977.issue13124@psf.upfronthosting.co.za> Message-ID: <1437483825.3.0.606306613142.issue13124@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. You'd think I'd remember to search the bug tracker before opening a new issue :(. I'll review this and make sure I've incorporated anything relevant from here into my patch when I've updated it. I think the security information is useful, but based on Stefan's feedback I'll fix the language to be informative rather than cautionary. I'll be updating the patch in the linked issue in the near future. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 18:30:36 2015 From: report at bugs.python.org (Robert Collins) Date: Tue, 21 Jul 2015 16:30:36 +0000 Subject: [docs] [issue24653] Mock.assert_has_calls([]) is surprising for users In-Reply-To: <1437126004.09.0.453747784975.issue24653@psf.upfronthosting.co.za> Message-ID: <1437496236.82.0.631020747683.issue24653@psf.upfronthosting.co.za> Robert Collins added the comment: Ok, so as a doc bug this should still be tracked here - I'm going to reopen it to reflect that, hope thats ok. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python resolution: not a bug -> status: closed -> open title: Mock.assert_has_calls([]) incorrectly passes -> Mock.assert_has_calls([]) is surprising for users _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 21 22:01:28 2015 From: report at bugs.python.org (Antti Haapala) Date: Tue, 21 Jul 2015 20:01:28 +0000 Subject: [docs] [issue24653] Mock.assert_has_calls([]) is surprising for users In-Reply-To: <1437126004.09.0.453747784975.issue24653@psf.upfronthosting.co.za> Message-ID: <1437508888.3.0.660676573271.issue24653@psf.upfronthosting.co.za> Changes by Antti Haapala : ---------- nosy: +ztane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 22 04:37:10 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 22 Jul 2015 02:37:10 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1437532629.04.0.691167918314.issue12067@psf.upfronthosting.co.za> Martin Panter added the comment: Patch v15. No doc changes, but I refactored the test code: * Manually merged with recent changes * Separate assert_equality_only() and assert_total_order() test methods. Hopefully this is a bit simpler for people to understand and review, and avoids suggesting that partial ordering is tested. * Dropped subTest() instances with identical parameters. The basic stack trace can already distinguish these. * Eliminated is_value_comparable(); remove the ?meth? parameters from the call sites instead ---------- versions: +Python 3.6 Added file: http://bugs.python.org/file39970/issue12067-expressions-py3.5_v15.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 22 04:47:29 2015 From: report at bugs.python.org (cdz) Date: Wed, 22 Jul 2015 02:47:29 +0000 Subject: [docs] [issue24680] typo in documentation, section extending python Message-ID: <1437533249.17.0.220138449851.issue24680@psf.upfronthosting.co.za> New submission from cdz: In section "3. Building C and C++ Extensions with distutils" there is unnecessary "\" in the middle of the line. Seems to be bulk (re)formatting issue. Simple patch fixing the issue is attached. ---------- assignee: docs at python components: Documentation files: extending_doc_typo.diff keywords: patch messages: 247080 nosy: cdz, docs at python priority: normal severity: normal status: open title: typo in documentation, section extending python type: enhancement versions: Python 3.6 Added file: http://bugs.python.org/file39971/extending_doc_typo.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 22 05:14:28 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 22 Jul 2015 03:14:28 +0000 Subject: [docs] [issue24680] typo in documentation, section extending python In-Reply-To: <1437533249.17.0.220138449851.issue24680@psf.upfronthosting.co.za> Message-ID: <1437534868.54.0.748889548632.issue24680@psf.upfronthosting.co.za> Martin Panter added the comment: Nice and obvious fix, looks like it also applies to Python 2. ---------- nosy: +vadmium stage: -> commit review versions: +Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 22 05:31:44 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 22 Jul 2015 03:31:44 +0000 Subject: [docs] [issue22000] cross type comparisons clarification In-Reply-To: <1405622312.02.0.49093151571.issue22000@psf.upfronthosting.co.za> Message-ID: <1437535904.76.0.931684157225.issue22000@psf.upfronthosting.co.za> Martin Panter added the comment: Actually, this is about a different section of the documentation. But it might still be best to update /Doc/reference/expressions.rst first in Issue 12067, and then sort out /Doc/library/stdtypes.rst to match. Why do we need a dedicated section in Built-in Types about Comparisons? I think it might make more sense to just document how comparisons work separately for each type (Numeric, Sequence, Text, etc), if this is not already done. ---------- dependencies: +Doc: remove errors about mixed-type comparisons. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 22 05:35:06 2015 From: report at bugs.python.org (Roundup Robot) Date: Wed, 22 Jul 2015 03:35:06 +0000 Subject: [docs] [issue24680] typo in documentation, section extending python In-Reply-To: <1437533249.17.0.220138449851.issue24680@psf.upfronthosting.co.za> Message-ID: <20150722033503.51992.34608@psf.io> Roundup Robot added the comment: New changeset 91b738cfdc2f by Zachary Ware in branch '2.7': Issue #24680: Remove random backslash. Patch by cdz. https://hg.python.org/cpython/rev/91b738cfdc2f New changeset cf0011b6ebbd by Zachary Ware in branch '3.4': Issue #24680: Remove random backslash. Patch by cdz. https://hg.python.org/cpython/rev/cf0011b6ebbd New changeset d7229f26dbdb by Zachary Ware in branch '3.5': Issue #24680: Merge with 3.4 https://hg.python.org/cpython/rev/d7229f26dbdb New changeset 96910e822266 by Zachary Ware in branch 'default': Closes #24680: Merge with 3.5 https://hg.python.org/cpython/rev/96910e822266 ---------- nosy: +python-dev resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 22 05:35:58 2015 From: report at bugs.python.org (Zachary Ware) Date: Wed, 22 Jul 2015 03:35:58 +0000 Subject: [docs] [issue24680] typo in documentation, section extending python In-Reply-To: <1437533249.17.0.220138449851.issue24680@psf.upfronthosting.co.za> Message-ID: <1437536157.91.0.575537719025.issue24680@psf.upfronthosting.co.za> Zachary Ware added the comment: Fixed! Thanks for the report and patch, cdz, and thanks for the triage, Martin. ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 22 06:23:33 2015 From: report at bugs.python.org (Berker Peksag) Date: Wed, 22 Jul 2015 04:23:33 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1437539013.04.0.503634273816.issue12067@psf.upfronthosting.co.za> Berker Peksag added the comment: I think we can commit documentation and tests separately. I just did a quick review of the test changes and I will add some review comments later (sorry, lack of time :)). ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 22 20:40:40 2015 From: report at bugs.python.org (Roundup Robot) Date: Wed, 22 Jul 2015 18:40:40 +0000 Subject: [docs] [issue22153] Documentation of TestCase.runTest is incorrect and confusing In-Reply-To: <1407301202.17.0.719208246986.issue22153@psf.upfronthosting.co.za> Message-ID: <20150722184037.13853.35821@psf.io> Roundup Robot added the comment: New changeset eefc157b3096 by Robert Collins in branch '3.4': Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero. https://hg.python.org/cpython/rev/eefc157b3096 New changeset 10f5a7fa26d5 by Robert Collins in branch '3.5': Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero. https://hg.python.org/cpython/rev/10f5a7fa26d5 New changeset 45bd2dadbd0d by Robert Collins in branch 'default': Issue #22153: Improve unittest docs. Patch from Martin Panter and evilzero. https://hg.python.org/cpython/rev/45bd2dadbd0d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 22 20:43:08 2015 From: report at bugs.python.org (Robert Collins) Date: Wed, 22 Jul 2015 18:43:08 +0000 Subject: [docs] [issue22153] Documentation of TestCase.runTest is incorrect and confusing In-Reply-To: <1407301202.17.0.719208246986.issue22153@psf.upfronthosting.co.za> Message-ID: <1437590588.73.0.279023226917.issue22153@psf.upfronthosting.co.za> Robert Collins added the comment: Thanks for the update, it looks good to me. Applied to 3.4 and up. I'm not applying to 2.7 at this stage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 22 21:25:06 2015 From: report at bugs.python.org (Robert Collins) Date: Wed, 22 Jul 2015 19:25:06 +0000 Subject: [docs] [issue22153] Documentation of TestCase.runTest is incorrect and confusing In-Reply-To: <1407301202.17.0.719208246986.issue22153@psf.upfronthosting.co.za> Message-ID: <1437593106.05.0.440735196083.issue22153@psf.upfronthosting.co.za> Changes by Robert Collins : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 3.6 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 23 13:21:42 2015 From: report at bugs.python.org (Antoine Pietri) Date: Thu, 23 Jul 2015 11:21:42 +0000 Subject: [docs] [issue24692] types.coroutines() idempotence documentation Message-ID: <1437650502.32.0.0288592289227.issue24692@psf.upfronthosting.co.za> New submission from Antoine Pietri: In the new types.coroutines() documentation, it is not clearly stated whether this function is idempotent or not: what happens when it is called on a function that is already a native coroutine? ---------- assignee: docs at python components: Documentation messages: 247184 nosy: docs at python, seirl priority: normal severity: normal status: open title: types.coroutines() idempotence documentation versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 23 14:59:32 2015 From: report at bugs.python.org (Roundup Robot) Date: Thu, 23 Jul 2015 12:59:32 +0000 Subject: [docs] [issue24692] types.coroutines() idempotence documentation In-Reply-To: <1437650502.32.0.0288592289227.issue24692@psf.upfronthosting.co.za> Message-ID: <20150723125929.62381.58200@psf.io> Roundup Robot added the comment: New changeset 636ce05ea8f6 by Yury Selivanov in branch '3.5': Issue #24692: Add more tests for types.coroutine https://hg.python.org/cpython/rev/636ce05ea8f6 New changeset 3f3e398bcd3e by Yury Selivanov in branch 'default': Merge 3.5 (Issue #24692) https://hg.python.org/cpython/rev/3f3e398bcd3e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 23 15:01:16 2015 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 23 Jul 2015 13:01:16 +0000 Subject: [docs] [issue24692] types.coroutines() idempotence documentation In-Reply-To: <1437650502.32.0.0288592289227.issue24692@psf.upfronthosting.co.za> Message-ID: <1437656476.1.0.029934631719.issue24692@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 24 03:38:54 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 24 Jul 2015 01:38:54 +0000 Subject: [docs] [issue22000] cross type comparisons clarification In-Reply-To: <1405622312.02.0.49093151571.issue22000@psf.upfronthosting.co.za> Message-ID: <1437701933.93.0.896957354256.issue22000@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Why do we need a dedicated section in Built-in Types about Comparisons? It is nice to have some of that information collected together. I think people learn about comparison logic as a single topic rather than piecemeal type by type. To Jim's point, the discussion of "is" and "is not" should probably be factored-out (their meaning is type-invariant and is not overridable with a dunder method). Also, they don't have the same reflective logic as the rich comparisons. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From abdielgonzalez7000 at att.net Fri Jul 24 02:06:47 2015 From: abdielgonzalez7000 at att.net (abdiel) Date: Thu, 23 Jul 2015 20:06:47 -0400 Subject: [docs] How to access to math source code? Message-ID: <55B18197.9000202@att.net> How can I access the math library source code in python 3.x to change the pi=3.141... by the true pi=3.144...? From DSanders at hbk.com Thu Jul 23 19:43:20 2015 From: DSanders at hbk.com (Danielle Sanders) Date: Thu, 23 Jul 2015 17:43:20 +0000 Subject: [docs] bug in python struct package Message-ID: If you run the following python on 3.3, the contents of altogether_output.bin has 4 extra bytes. These should be logically identical. import struct with open('separated_output.bin', 'wb') as f: f.write(struct.pack('L12sQ', 1* 1000, bytes("ABCDEFGH", "UTF-8"), 2)) f.write(struct.pack('L', 3)) f.write(struct.pack('4Q4x', 4, 5, 6, 7)) with open('alltogether_output.bin', 'wb') as f: f.write(struct.pack('L12sQL4Q4x', 1* 1000, bytes("ABCDEFGH", "UTF-8"), 2, 3, 4, 5, 6, 7)) -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Fri Jul 24 07:35:16 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 24 Jul 2015 05:35:16 +0000 Subject: [docs] [issue24659] dict() built-in fails on iterators with a "keys" attribute In-Reply-To: <1437209700.05.0.411435282726.issue24659@psf.upfronthosting.co.za> Message-ID: <1437716116.46.0.587509518839.issue24659@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> low stage: -> needs patch _______________________________________ Python tracker _______________________________________ From berker.peksag at gmail.com Fri Jul 24 08:56:35 2015 From: berker.peksag at gmail.com (=?UTF-8?Q?Berker_Peksa=C4=9F?=) Date: Fri, 24 Jul 2015 09:56:35 +0300 Subject: [docs] How to access to math source code? In-Reply-To: <55B18197.9000202@att.net> References: <55B18197.9000202@att.net> Message-ID: On Fri, Jul 24, 2015 at 3:06 AM, abdiel wrote: > How can I access the math library source code in python 3.x to change the > pi=3.141... by the true pi=3.144...? Hi abdiel, This list not the right place to ask questions like this, but math.pi is defined in https://github.com/python/cpython/blob/master/Modules/mathmodule.c#L2146. You can also find Py_MATH_PI in https://github.com/python/cpython/blob/master/Include/pymath.h#L47 From report at bugs.python.org Fri Jul 24 17:32:16 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 24 Jul 2015 15:32:16 +0000 Subject: [docs] [issue15657] Error in Python 3 docs for PyMethodDef In-Reply-To: <1344970966.7.0.115664419243.issue15657@psf.upfronthosting.co.za> Message-ID: <1437751936.38.0.612804626801.issue15657@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In 3.5 it would be better to make METH_KEYWORDS == METH_VARARGS | METH_KEYWORDS. Current definition: #define METH_VARARGS 0x0001 #define METH_KEYWORDS 0x0002 Should be: #define METH_VARARGS 0x0001 #define METH_KEYWORDS 0x0003 But it can't be applied in maintained releases. In 3.4 and 2.7 we should add explicit test as in the patch or change the documentation. If fix the code rather than documentation in 3.4 and 2.7, then the versionchanged directive in 3.5 shouldn't be added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 01:12:11 2015 From: report at bugs.python.org (Markus Unterwaditzer) Date: Fri, 24 Jul 2015 23:12:11 +0000 Subject: [docs] [issue24711] Document getpass.getpass behavior on ^C Message-ID: <1437779531.88.0.954988782388.issue24711@psf.upfronthosting.co.za> New submission from Markus Unterwaditzer: getpass.getpass doesn't enter a newline when the user aborts input with ^C, while input/raw_input does. This behavior is surprising and can lead to mis-formatting of subsequent output. However, since this behavior exists since 2.7 and applications may have started to rely on it, I'd add a note to the documentation. ---------- assignee: docs at python components: Documentation messages: 247302 nosy: docs at python, untitaker priority: normal severity: normal status: open title: Document getpass.getpass behavior on ^C versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 01:19:04 2015 From: report at bugs.python.org (Biwin John) Date: Fri, 24 Jul 2015 23:19:04 +0000 Subject: [docs] [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. Message-ID: <1437779944.79.0.655167923721.issue24712@psf.upfronthosting.co.za> Changes by Biwin John : ---------- assignee: docs at python components: Documentation nosy: Biwin John, docs at python priority: normal severity: normal status: open title: Docs page's sidebar vibrates on mouse wheel scroll on Chrome. type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 01:22:07 2015 From: report at bugs.python.org (Biwin John) Date: Fri, 24 Jul 2015 23:22:07 +0000 Subject: [docs] [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. Message-ID: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> New submission from Biwin John: The sidebar on the documentation pages ex. https://docs.python.org/2/library/collections.html vibrates/flashes on mouse wheel scroll. The sidebar with class sphinxsidebar, works okay when scrolling with the scrollbar, Firefox but not with mouse wheel on Chrome. please consider fixing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 03:28:21 2015 From: report at bugs.python.org (Carol Willing) Date: Sat, 25 Jul 2015 01:28:21 +0000 Subject: [docs] [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. In-Reply-To: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> Message-ID: <1437787701.44.0.467061006813.issue24712@psf.upfronthosting.co.za> Carol Willing added the comment: Biwan John, thanks for the issue report. I can confirm that there is jitter due to scroll speed lag in Chrome for Python 2.7 docs. This behavior does not happen with Python 3.x docs. No issues with Firefox. I am using Mac OS X 10.10 with up-to-date Chrome and Firefox. I believe that this is likely a Chrome scroll issue and not a Python docs or Sphinx issue. I have triaged this as "needs patch" in case someone is aware of a workaround to resolve. If this is still open after a month, I would recommend closing the issue as a "third party" issue ---------- nosy: +willingc priority: normal -> low stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 05:47:52 2015 From: report at bugs.python.org (Ned Deily) Date: Sat, 25 Jul 2015 03:47:52 +0000 Subject: [docs] [issue24647] Document argparse.REMAINDER as being equal to "..." In-Reply-To: <1437079645.1.0.921184801927.issue24647@psf.upfronthosting.co.za> Message-ID: <1437796072.79.0.674590444921.issue24647@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +bethard, docs at python versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 07:16:46 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 25 Jul 2015 05:16:46 +0000 Subject: [docs] [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. In-Reply-To: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> Message-ID: <1437801406.25.0.961236151778.issue24712@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 08:30:31 2015 From: report at bugs.python.org (asal ada) Date: Sat, 25 Jul 2015 06:30:31 +0000 Subject: [docs] [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. In-Reply-To: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> Message-ID: <1437805831.25.0.303129556955.issue24712@psf.upfronthosting.co.za> Changes by asal ada : ---------- components: +2to3 (2.x to 3.x conversion tool), Benchmarks, Build, Cross-Build, Demos and Tools, IO, Installation, Interpreter Core, Library (Lib), Tests, Unicode, Windows, XML, email nosy: +barry, haypo, paul.moore, r.david.murray, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 08:59:03 2015 From: report at bugs.python.org (Steve Dower) Date: Sat, 25 Jul 2015 06:59:03 +0000 Subject: [docs] [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. In-Reply-To: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> Message-ID: <1437807543.82.0.94209843436.issue24712@psf.upfronthosting.co.za> Changes by Steve Dower : ---------- components: -2to3 (2.x to 3.x conversion tool), Benchmarks, Build, Cross-Build, Demos and Tools, IO, Installation, Interpreter Core, Library (Lib), Tests, Unicode, Windows, XML, email nosy: -steve.dower _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 10:49:06 2015 From: report at bugs.python.org (Petr Viktorin) Date: Sat, 25 Jul 2015 08:49:06 +0000 Subject: [docs] [issue24713] Import docs reference the deprecated imp.reload Message-ID: <1437814146.48.0.230121728687.issue24713@psf.upfronthosting.co.za> New submission from Petr Viktorin: In 3.4, `imp.reload` was deprecated in favor of `importlib.reload`. https://docs.python.org/3/library/imp.html ---------- assignee: docs at python components: Documentation files: docs.patch keywords: patch messages: 247319 nosy: docs at python, encukou, eric.araujo, ezio.melotti, georg.brandl priority: normal severity: normal status: open title: Import docs reference the deprecated imp.reload versions: Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file40011/docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 11:34:05 2015 From: report at bugs.python.org (Biwin John) Date: Sat, 25 Jul 2015 09:34:05 +0000 Subject: [docs] [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. In-Reply-To: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> Message-ID: <1437816845.41.0.639978143894.issue24712@psf.upfronthosting.co.za> Biwin John added the comment: The problem exist with the Chrome on Ubuntu, Windows and OSX, but ony with the python docs for version 2.7. Docs for 2.6 use the same sidebar. But in 2.7 docs, the content of sidebar is positioned with the style added on scroll, style="float: left; margin-right: 0px; width: 202px; top: 13px;" The top value is calculated on scroll, the same code works with FireFox without any problem. So it might be the way chrome handles the change in values. And we must workaround with our code than waiting for Chrome to get fixed. Needs to be fixed as, 2.7 is the most used version, comes default with most distros and chrome is the most used browser (50.25% of all)[https://en.wikipedia.org/wiki/Usage_share_of_web_browsers] Recommendations: 1. Change the sidebar behavior to the 2.6 docs sidebar one.(default top value, users can scroll up to see the content) or. 2. Make the sidebar position:fixed and provide a inner scroll bar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 11:51:11 2015 From: report at bugs.python.org (Jakub Wilk) Date: Sat, 25 Jul 2015 09:51:11 +0000 Subject: [docs] [issue24715] Sorting HOW TO: bad example for reverse sort stability Message-ID: <1437817871.39.0.0442628081402.issue24715@psf.upfronthosting.co.za> New submission from Jakub Wilk: https://docs.python.org/3/howto/sorting.html#odd-and-ends gives the following example for reverse sort stability: >>> data = [('red', 1), ('blue', 1), ('red', 2), ('blue', 2)] >>> assert sorted(data, reverse=True) == list(reversed(sorted(reversed(data)))) But here all the keys are different, so the result would be the same even if the sort algorithm weren't stable. You probably wanted to pass to key=itemgetter(0) to both sorted() calls. ---------- assignee: docs at python components: Documentation messages: 247328 nosy: docs at python, jwilk priority: normal severity: normal status: open title: Sorting HOW TO: bad example for reverse sort stability _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 12:03:59 2015 From: report at bugs.python.org (Roundup Robot) Date: Sat, 25 Jul 2015 10:03:59 +0000 Subject: [docs] [issue24713] Import docs reference the deprecated imp.reload In-Reply-To: <1437814146.48.0.230121728687.issue24713@psf.upfronthosting.co.za> Message-ID: <20150725100355.113890.17015@psf.io> Roundup Robot added the comment: New changeset 6c713dcce26a by Berker Peksag in branch '3.4': Issue #24713: Use importlib.reload() in import reference document. https://hg.python.org/cpython/rev/6c713dcce26a New changeset afb12ebd96df by Berker Peksag in branch '3.5': Issue #24713: Use importlib.reload() in import reference document. https://hg.python.org/cpython/rev/afb12ebd96df New changeset 5fb7d3238248 by Berker Peksag in branch 'default': Issue #24713: Use importlib.reload() in import reference document. https://hg.python.org/cpython/rev/5fb7d3238248 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 12:06:43 2015 From: report at bugs.python.org (Berker Peksag) Date: Sat, 25 Jul 2015 10:06:43 +0000 Subject: [docs] [issue24713] Import docs reference the deprecated imp.reload In-Reply-To: <1437814146.48.0.230121728687.issue24713@psf.upfronthosting.co.za> Message-ID: <1437818803.82.0.94904200845.issue24713@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report and the patch, Petr. ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 13:28:19 2015 From: report at bugs.python.org (Roundup Robot) Date: Sat, 25 Jul 2015 11:28:19 +0000 Subject: [docs] [issue24420] Documentation regressions from adding subprocess.run() In-Reply-To: <1433909056.73.0.964707918197.issue24420@psf.upfronthosting.co.za> Message-ID: <20150725112816.110395.2685@psf.io> Roundup Robot added the comment: New changeset bedff93d778d by Berker Peksag in branch '3.5': Issue #24420: Fix documentation regression introduced by f0a00ee094ff. https://hg.python.org/cpython/rev/bedff93d778d New changeset 9b17df697a3c by Berker Peksag in branch 'default': Issue #24420: Fix documentation regression introduced by f0a00ee094ff. https://hg.python.org/cpython/rev/9b17df697a3c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 13:29:13 2015 From: report at bugs.python.org (Berker Peksag) Date: Sat, 25 Jul 2015 11:29:13 +0000 Subject: [docs] [issue24420] Documentation regressions from adding subprocess.run() In-Reply-To: <1433909056.73.0.964707918197.issue24420@psf.upfronthosting.co.za> Message-ID: <1437823753.49.0.0199388539626.issue24420@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks Martin. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 18:42:52 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 25 Jul 2015 16:42:52 +0000 Subject: [docs] [issue24715] Sorting HOW TO: bad example for reverse sort stability In-Reply-To: <1437817871.39.0.0442628081402.issue24715@psf.upfronthosting.co.za> Message-ID: <1437842572.73.0.217337692661.issue24715@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 19:10:58 2015 From: report at bugs.python.org (Eric Snow) Date: Sat, 25 Jul 2015 17:10:58 +0000 Subject: [docs] [issue24721] The result of calling dict.* methods on OrderedDict is undefined. Message-ID: <1437844258.42.0.543403557619.issue24721@psf.upfronthosting.co.za> New submission from Eric Snow: (see issue24667) collections.OrderedDict subclasses dict so calling dict's methods on an OrderedDict works. However, neither the pure Python nor the C implementation of OrderedDict was written to support doing so. In fact, both of them currently enter an inconsistent state when this happens. For example: # Python 3.4 (pure Python implementation) >>> from collections import OrderedDict >>> od = OrderedDict([('spam', 1), ('eggs', 2)]) >>> dict.__delitem__(od, 'spam') >>> str(od) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.4/reprlib.py", line 24, in wrapper result = user_function(self) File "/usr/lib/python3.4/collections/__init__.py", line 198, in __repr__ return '%s(%r)' % (self.__class__.__name__, list(self.items())) File "/usr/lib/python3.4/_collections_abc.py", line 485, in __iter__ yield (key, self._mapping[key]) KeyError: 'spam' # Python 3.5 (C implementation) >>> from collections import OrderedDict >>> od = OrderedDict([('spam', 1), ('eggs', 2)]) >>> dict.__delitem__(od, 'spam') >>> str(od) Traceback (most recent call last): File "", line 1, in KeyError: 'spam' This is a consequence of subclassing a builtin type, which typically do not have good support for subclassing (e.g. issue10977). It probably isn't worth making any changes to the code of either OrderedDict implementations. At most I'd recommend a note in the OrderedDict documentation indicating that the results of passing an OrderedDict object to dict.* methods are undefined. ---------- assignee: docs at python components: Documentation messages: 247354 nosy: docs at python, eric.snow, rhettinger priority: low severity: normal status: open title: The result of calling dict.* methods on OrderedDict is undefined. type: behavior versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 19:12:08 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 25 Jul 2015 17:12:08 +0000 Subject: [docs] [issue24721] The result of calling dict.* methods on OrderedDict is undefined. In-Reply-To: <1437844258.42.0.543403557619.issue24721@psf.upfronthosting.co.za> Message-ID: <1437844328.27.0.580279697795.issue24721@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 19:31:22 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 25 Jul 2015 17:31:22 +0000 Subject: [docs] [issue24721] The result of calling dict.* methods on OrderedDict is undefined. In-Reply-To: <1437844258.42.0.543403557619.issue24721@psf.upfronthosting.co.za> Message-ID: <1437845482.22.0.0842881817283.issue24721@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > This is a consequence of subclassing a builtin type Not really. This is how subclassing works in general. Any time you a user calls a parent class directly on an instance of subclass, they are bypassing whatever the subclass needs to do to maintain its invariants. class A: def __init__(self): self.data = [] def add(self, x): self.data.append(x) class B(A): 'Track the number of odds' def __init__(self): A.__init__(self) self.odds = 0 def add(self, x): A.add(self, x) self.odds += (x % 2) b = B() b.add(1) b.add(2) b.add(3) b.add(4) A.add(b, 5) assert b.odds == sum(x%1 for x in b.data), 'OMG, B is broken!' There is nothing special about OrderedDicts in this regard. Perhaps there should be a FAQ entry regarding the "facts of life" in the world of object oriented programming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 19:40:17 2015 From: report at bugs.python.org (Eric Snow) Date: Sat, 25 Jul 2015 17:40:17 +0000 Subject: [docs] [issue24721] The result of calling dict.* methods on OrderedDict is undefined. In-Reply-To: <1437844258.42.0.543403557619.issue24721@psf.upfronthosting.co.za> Message-ID: <1437846017.05.0.311232202731.issue24721@psf.upfronthosting.co.za> Eric Snow added the comment: Ah, you're right. I was hung up on issue10977. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 19:50:49 2015 From: report at bugs.python.org (Eric Snow) Date: Sat, 25 Jul 2015 17:50:49 +0000 Subject: [docs] [issue24721] The result of calling dict.* methods on OrderedDict is undefined. In-Reply-To: <1437844258.42.0.543403557619.issue24721@psf.upfronthosting.co.za> Message-ID: <1437846648.99.0.919922362336.issue24721@psf.upfronthosting.co.za> Eric Snow added the comment: Feel free to close this, Raymond. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 21:34:11 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 25 Jul 2015 19:34:11 +0000 Subject: [docs] [issue24715] Sorting HOW TO: bad example for reverse sort stability In-Reply-To: <1437817871.39.0.0442628081402.issue24715@psf.upfronthosting.co.za> Message-ID: <1437852851.81.0.737618772751.issue24715@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- keywords: +patch Added file: http://bugs.python.org/file40022/reverse_stablity.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 21:37:26 2015 From: report at bugs.python.org (Ned Deily) Date: Sat, 25 Jul 2015 19:37:26 +0000 Subject: [docs] [issue24712] Docs page's sidebar vibrates on mouse wheel scroll on Chrome. In-Reply-To: <1437780127.19.0.0270083299372.issue24712@psf.upfronthosting.co.za> Message-ID: <1437853046.79.0.0118582177863.issue24712@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 25 22:33:31 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 25 Jul 2015 20:33:31 +0000 Subject: [docs] [issue24721] The result of calling dict.* methods on OrderedDict is undefined. In-Reply-To: <1437844258.42.0.543403557619.issue24721@psf.upfronthosting.co.za> Message-ID: <1437856411.0.0.757299659609.issue24721@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 26 00:08:57 2015 From: report at bugs.python.org (STINNER Victor) Date: Sat, 25 Jul 2015 22:08:57 +0000 Subject: [docs] [issue24723] The new typing module is not documented :-( Message-ID: <1437862136.98.0.143477076953.issue24723@psf.upfronthosting.co.za> New submission from STINNER Victor: It looks like someone forgot to write the doc ;-) https://docs.python.org/dev/library/typing.html ---------- assignee: docs at python components: Documentation messages: 247399 nosy: docs at python, gvanrossum, haypo priority: normal severity: normal status: open title: The new typing module is not documented :-( versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 26 10:41:42 2015 From: report at bugs.python.org (Berker Peksag) Date: Sun, 26 Jul 2015 08:41:42 +0000 Subject: [docs] [issue24723] The new typing module is not documented :-( In-Reply-To: <1437862136.98.0.143477076953.issue24723@psf.upfronthosting.co.za> Message-ID: <1437900102.13.0.494725641243.issue24723@psf.upfronthosting.co.za> Berker Peksag added the comment: This is a duplicate of issue 24272. ---------- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> PEP 484 docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 26 10:42:30 2015 From: report at bugs.python.org (Berker Peksag) Date: Sun, 26 Jul 2015 08:42:30 +0000 Subject: [docs] [issue24272] PEP 484 docs In-Reply-To: <1432415368.91.0.945654992881.issue24272@psf.upfronthosting.co.za> Message-ID: <1437900150.7.0.23226433977.issue24272@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: needs patch -> patch review versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 26 12:41:18 2015 From: report at bugs.python.org (Mark Shannon) Date: Sun, 26 Jul 2015 10:41:18 +0000 Subject: [docs] [issue24721] The result of calling dict.* methods on OrderedDict is undefined. In-Reply-To: <1437844258.42.0.543403557619.issue24721@psf.upfronthosting.co.za> Message-ID: <1437907278.36.0.299424500353.issue24721@psf.upfronthosting.co.za> Mark Shannon added the comment: I think this is a bug. This is not a normal case of subclassing as the interpreter calls the C API PyDict_XXX() in many cases where a dictionary subclass is passed in. For example: class C: pass c = C() # Liskov substitution principle says this is OK. c.__dict__ = OrderedDict() c.a = 1 All access to the ordered dict is via the dict.__setitem__ method. I think this should be documented. ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 26 17:20:18 2015 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 26 Jul 2015 15:20:18 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 Message-ID: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> New submission from Jason R. Coombs: In Doc/tutorial/inputoutput.rst, the docs state this about opening a file: Normally, files are opened in :dfn:`text mode`, that means, you read and write strings from and to the file, which are encoded in a specific encoding (the default being UTF-8). That statement is directly contradicted by the docs for open (Doc/library/functions.rst) which indicate: In text mode, if encoding is not specified the encoding used is platform dependent: locale.getpreferredencoding(False) is called to get the current locale encoding. The implementation matches the latter indication. ---------- assignee: docs at python components: Documentation, IO messages: 247433 nosy: docs at python, jason.coombs priority: normal severity: normal status: open title: Input and Output tutorial erroneously references default encoding UTF-8 versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 26 17:20:36 2015 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 26 Jul 2015 15:20:36 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <1437924036.82.0.707057687503.issue24729@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 26 19:08:42 2015 From: report at bugs.python.org (Alessandro Cucci) Date: Sun, 26 Jul 2015 17:08:42 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <1437930522.1.0.874359244842.issue24729@psf.upfronthosting.co.za> Alessandro Cucci added the comment: corrected ---------- keywords: +patch nosy: +acucci Added file: http://bugs.python.org/file40033/issue24729.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 27 14:36:46 2015 From: report at bugs.python.org (Stefan Krah) Date: Mon, 27 Jul 2015 12:36:46 +0000 Subject: [docs] [issue23756] Tighten definition of bytes-like objects In-Reply-To: <1427185517.26.0.298293861062.issue23756@psf.upfronthosting.co.za> Message-ID: <1438000606.81.0.34882744482.issue23756@psf.upfronthosting.co.za> Stefan Krah added the comment: Sorry, I'm still not convinced that the C-contiguity explanation is in the right place. The docs have to be terse in order to be useful as a reference, and the explanation at that particular location breaks the flow of reading. So, please don't commit that. The glossary update looks good to me. -- C-contiguity could also be explained in the glossary, but I prefer this explanation from http://docs.scipy.org/doc/numpy/reference/generated/numpy.array.html "Specify the order of the array. If order is ?C? (default), then the array will be in C-contiguous order (last-index varies the fastest). If order is ?F?, then the returned array will be in Fortran-contiguous order (first-index varies the fastest)." ---------- assignee: skrah -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 27 20:31:08 2015 From: report at bugs.python.org (R. David Murray) Date: Mon, 27 Jul 2015 18:31:08 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <1438021868.52.0.872329303824.issue24729@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. It's a tutorial. It would probably be better to just say "the default is platform dependent" with a link to the open docs. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 27 23:16:35 2015 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Jul 2015 21:16:35 +0000 Subject: [docs] [issue24737] Doc issue: Python 3.6 doesn't compile on Visual Studio 2010 anymore Message-ID: <1438031795.81.0.202066044705.issue24737@psf.upfronthosting.co.za> New submission from STINNER Victor: Hi, I'm unable to compile Python default (3.6) on Windows 7 with Visual Studio 2010: it requires "ucrtd.lib" which looks like a new feature of Visual Studio 2015. Please update the developer guide to be more explicit: Current text says that VS 2010 SP1 is supported. Well, I don't have the SP1, but I don't think that ucrtd.lib comes with VS 2010 SP1 anyway. """ Python 3.5 and later use Microsoft Visual Studio 2015. You can download Microsoft Visual Studio 2015 CTP 6 or newer, or you can continue to use Visual Studio 2010 SP1 until Microsoft releases the final version of Visual Studio 2015. """" ---------- assignee: docs at python components: Build, Documentation, Windows messages: 247485 nosy: docs at python, haypo, paul.moore, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: Doc issue: Python 3.6 doesn't compile on Visual Studio 2010 anymore versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 28 00:09:13 2015 From: report at bugs.python.org (Steve Dower) Date: Mon, 27 Jul 2015 22:09:13 +0000 Subject: [docs] [issue24737] Doc issue: Python 3.6 doesn't compile on Visual Studio 2010 anymore In-Reply-To: <1438031795.81.0.202066044705.issue24737@psf.upfronthosting.co.za> Message-ID: <1438034953.87.0.83883874482.issue24737@psf.upfronthosting.co.za> Steve Dower added the comment: Technically it says that it will work until VS 2015 is released (which happened last Monday), but the statement certainly should be clarified now. I'll do it. I'm still waiting to hear what options will be available for installing the compilers without a full VS, but right now there aren't any good options I'm afraid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 28 00:13:55 2015 From: report at bugs.python.org (STINNER Victor) Date: Mon, 27 Jul 2015 22:13:55 +0000 Subject: [docs] [issue24737] Doc issue: Python 3.6 doesn't compile on Visual Studio 2010 anymore In-Reply-To: <1438031795.81.0.202066044705.issue24737@psf.upfronthosting.co.za> Message-ID: <1438035235.58.0.225818576731.issue24737@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'm still waiting to hear what options will be available for installing the compilers without a full VS, but right now there aren't any good options I'm afraid. Well, for me the most important point is to document the current supported compilers. Good if we support more options later ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 28 17:49:58 2015 From: report at bugs.python.org (Steve Dower) Date: Tue, 28 Jul 2015 15:49:58 +0000 Subject: [docs] [issue24737] Doc issue: Python 3.6 doesn't compile on Visual Studio 2010 anymore In-Reply-To: <1438031795.81.0.202066044705.issue24737@psf.upfronthosting.co.za> Message-ID: <1438098598.57.0.524595854265.issue24737@psf.upfronthosting.co.za> Steve Dower added the comment: Dev guide has been updated. I assume it'll flow through to the website eventually, though that hasn't happened yet. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 28 20:06:27 2015 From: report at bugs.python.org (Alessandro Cucci) Date: Tue, 28 Jul 2015 18:06:27 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <1438106787.73.0.984062862736.issue24729@psf.upfronthosting.co.za> Alessandro Cucci added the comment: @r.david.murray: just like that? (see patch v2) ---------- Added file: http://bugs.python.org/file40045/issue24729_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 28 20:22:43 2015 From: report at bugs.python.org (R. David Murray) Date: Tue, 28 Jul 2015 18:22:43 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <1438107763.13.0.451844034117.issue24729@psf.upfronthosting.co.za> R. David Murray added the comment: A direct link to open would be better ("see :func:`~functions.open`" should do it, I think). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 28 21:01:59 2015 From: report at bugs.python.org (Alessandro Cucci) Date: Tue, 28 Jul 2015 19:01:59 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <1438110119.9.0.930246933975.issue24729@psf.upfronthosting.co.za> Alessandro Cucci added the comment: tried again :) ---------- Added file: http://bugs.python.org/file40046/issue24729_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 28 21:38:19 2015 From: report at bugs.python.org (R. David Murray) Date: Tue, 28 Jul 2015 19:38:19 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <1438112299.12.0.189001719887.issue24729@psf.upfronthosting.co.za> R. David Murray added the comment: Looks good to me assuming it renders correctly. ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 00:14:50 2015 From: report at bugs.python.org (Carol Willing) Date: Tue, 28 Jul 2015 22:14:50 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <1438121690.49.0.0881315842671.issue24729@psf.upfronthosting.co.za> Carol Willing added the comment: @acucci and R. David Murray: I've run the patch locally, and all renders well except for one link. @acucci: I believe that the direct link to the `open()` command should be ... "see :func:`open` " An example exists at the beginning of the section containing this line. The command in the current patch renders as plain text and not a link. If you can fix this small issue, the patch should be ready to merge (pending R David Murray's agreement). Thanks! ---------- nosy: +willingc stage: commit review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 02:55:58 2015 From: report at bugs.python.org (Roundup Robot) Date: Wed, 29 Jul 2015 00:55:58 +0000 Subject: [docs] [issue23254] Document how to close the TCPServer listening socket In-Reply-To: <1421469175.0.0.628748486385.issue23254@psf.upfronthosting.co.za> Message-ID: <20150729005550.758.72069@psf.io> Roundup Robot added the comment: New changeset 8afd995802a6 by Robert Collins in branch '2.7': Issue #23254: Document how to close the TCPServer listening socket. https://hg.python.org/cpython/rev/8afd995802a6 New changeset 1123de53195e by Robert Collins in branch '3.4': Issue #23254: Document how to close the TCPServer listening socket. https://hg.python.org/cpython/rev/1123de53195e New changeset 5ee8a4efc06f by Robert Collins in branch '3.5': Issue #23254: Document how to close the TCPServer listening socket. https://hg.python.org/cpython/rev/5ee8a4efc06f New changeset 256d5c7146cb by Robert Collins in branch 'default': Issue #23254: Document how to close the TCPServer listening socket. https://hg.python.org/cpython/rev/256d5c7146cb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 02:57:29 2015 From: report at bugs.python.org (Robert Collins) Date: Wed, 29 Jul 2015 00:57:29 +0000 Subject: [docs] [issue23254] Document how to close the TCPServer listening socket In-Reply-To: <1421469175.0.0.628748486385.issue23254@psf.upfronthosting.co.za> Message-ID: <1438131449.46.0.824114479467.issue23254@psf.upfronthosting.co.za> Robert Collins added the comment: Applied to 2.7/3.4/3.5/3.6. Thanks! ---------- nosy: +rbcollins resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 03:54:47 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 29 Jul 2015 01:54:47 +0000 Subject: [docs] [issue24692] types.coroutines() idempotence documentation In-Reply-To: <1437650502.32.0.0288592289227.issue24692@psf.upfronthosting.co.za> Message-ID: <1438134887.39.0.140271799256.issue24692@psf.upfronthosting.co.za> Martin Panter added the comment: Going by Yury?s tests and implementation, I think it is intended that: * An ?async def? coroutine factory function is accepted and passed through unmodified * An generator?coroutine factory function that has already been transformed is also accepted * If a wrapped function (not a normal coroutine nor generator factory) returns a coroutine instance (e.g. if the function was already decorated), the return value is never wrapped a second time I will have a go at writing this up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 04:34:47 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 29 Jul 2015 02:34:47 +0000 Subject: [docs] [issue24692] types.coroutines() idempotence documentation In-Reply-To: <1437650502.32.0.0288592289227.issue24692@psf.upfronthosting.co.za> Message-ID: <1438137287.77.0.0324604764399.issue24692@psf.upfronthosting.co.za> Martin Panter added the comment: Let me know if this patch works for you. ---------- keywords: +patch stage: -> patch review versions: +Python 3.6 Added file: http://bugs.python.org/file40050/coro-idempotent.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 06:34:28 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 29 Jul 2015 04:34:28 +0000 Subject: [docs] [issue23756] Tighten definition of bytes-like objects In-Reply-To: <1427185517.26.0.298293861062.issue23756@psf.upfronthosting.co.za> Message-ID: <1438144468.33.0.472815520472.issue23756@psf.upfronthosting.co.za> Martin Panter added the comment: Patch v3: * Merged with recent changes * New glossary entry for ?contiguous?, with incoming links from various points * Removed my definition from buffer.rst I found the Num Py explanation a bit brief, assuming what you quoted was the extent of it. I used some of that wording, and added a bit more, although it is still not a complete definition. Let me know if you think this version is acceptable. ---------- Added file: http://bugs.python.org/file40051/c-contig.v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 06:44:36 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 29 Jul 2015 04:44:36 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1438145076.06.0.387816914727.issue12067@psf.upfronthosting.co.za> Martin Panter added the comment: I can split out a documentation-only patch if it would help get that committed. In the meantime, patch v16 includes some fixups to comments etc in the test code that I missed myself. ---------- assignee: -> docs at python components: +Tests Added file: http://bugs.python.org/file40052/issue12067-expressions-py3.6_v16.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 11:28:16 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 29 Jul 2015 09:28:16 +0000 Subject: [docs] [issue23556] Scope for raise without argument is different in Python 2 and 3 In-Reply-To: <1425212072.31.0.66074782686.issue23556@psf.upfronthosting.co.za> Message-ID: <1438162096.47.0.697321227766.issue23556@psf.upfronthosting.co.za> Martin Panter added the comment: Here is a patch for Python 3. The re-raise behaviour reported by Antoine is already tested in test_raise.TestRaise.test_except_reraise(). My patch also clarifies some details about how __context__ is set: * Context is the exception being handled, not necessarily the last exception * ?With? statements can influence context * Re-raising does not set context; must be new exception object * Add test case when context is not the last exception I?m not so experienced with Python 2?s exception handling, so I haven?t got a patch for that. I suspect there is some shared ?last exception? context. I wonder how it interacts with generators, multi-threading, __del__() and other callbacks, etc. ---------- keywords: +patch stage: -> patch review versions: +Python 3.5, Python 3.6 Added file: http://bugs.python.org/file40053/raise-scope-py3.patch _______________________________________ Python tracker _______________________________________ From Scot.Kelly at overlandadvisors.com Wed Jul 29 15:03:08 2015 From: Scot.Kelly at overlandadvisors.com (Scot Kelly) Date: Wed, 29 Jul 2015 13:03:08 +0000 Subject: [docs] upgrade to documentation Message-ID: The example used for dircache should be altered to greater stresss that annotate() affects only directories (and not files) by adding some files to the list in the example or choosing a different directory altogether. -------------- next part -------------- An HTML attachment was scrubbed... URL: From rmatenga at mybce.catholic.edu.au Tue Jul 28 03:42:38 2015 From: rmatenga at mybce.catholic.edu.au (Ryan Matenga) Date: Tue, 28 Jul 2015 01:42:38 +0000 Subject: [docs] Python error Message-ID: Hi Could you help me please. I am using Python 3.4.3 and I keep getting an error when I try to run my code. My class mates are using the same code and version as me and they are not getting the error. Thanks Ryan from turtle import* shape("turtle") speed(10) forward(100) right(90) forward(100) done() Traceback (most recent call last): File "/Users/rmatenga/Desktop/LineDrawing.py", line 1, in from turtle import* File "/Users/rmatenga/Desktop/turtle.py", line 2, in shape("turtle") NameError: name 'shape' is not defined >>> -------------- next part -------------- An HTML attachment was scrubbed... URL: From encukou at gmail.com Wed Jul 29 15:23:27 2015 From: encukou at gmail.com (Petr Viktorin) Date: Wed, 29 Jul 2015 15:23:27 +0200 Subject: [docs] Python error In-Reply-To: References: Message-ID: Hello Ryan, Rename your file to something other than "turtle.py". The "import" statement is loading the file you wrote instead of Python's turtle library. On Tue, Jul 28, 2015 at 3:42 AM, Ryan Matenga wrote: > Hi > > Could you help me please. I am using Python 3.4.3 and I keep getting an > error when I try to run my code. > > My class mates are using the same code and version as me and they are not > getting the error. > > Thanks > Ryan > > from turtle import* > shape("turtle") > speed(10) > > forward(100) > right(90) > forward(100) > > done() > Traceback (most recent call last): > File "/Users/rmatenga/Desktop/LineDrawing.py", line 1, in > from turtle import* > File "/Users/rmatenga/Desktop/turtle.py", line 2, in > shape("turtle") > NameError: name 'shape' is not defined >>>> > > _______________________________________________ > docs mailing list > docs at python.org > https://mail.python.org/mailman/listinfo/docs > From report at bugs.python.org Wed Jul 29 18:50:44 2015 From: report at bugs.python.org (Antoine Pietri) Date: Wed, 29 Jul 2015 16:50:44 +0000 Subject: [docs] [issue24692] types.coroutines() idempotence documentation In-Reply-To: <1437650502.32.0.0288592289227.issue24692@psf.upfronthosting.co.za> Message-ID: <1438188644.36.0.733673397011.issue24692@psf.upfronthosting.co.za> Antoine Pietri added the comment: Lgtm! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 19:30:15 2015 From: report at bugs.python.org (Stefan Behnel) Date: Wed, 29 Jul 2015 17:30:15 +0000 Subject: [docs] [issue24692] types.coroutines() idempotence documentation In-Reply-To: <1437650502.32.0.0288592289227.issue24692@psf.upfronthosting.co.za> Message-ID: <1438191015.01.0.693511060216.issue24692@psf.upfronthosting.co.za> Stefan Behnel added the comment: Note that the expected usage is not as a function but as a decorator. That should be stated in the docs as well. IMHO, users should only do two things with whatever the result is: either use it as a Generator (as before), or pass it as an argument to "await". Everything else is best considered implementation details. Well, except for the case of passing a coroutine, which will obviously just be passed through (and that answers the original question). ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 19:55:32 2015 From: report at bugs.python.org (Alessandro Cucci) Date: Wed, 29 Jul 2015 17:55:32 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <1438192532.13.0.331009345648.issue24729@psf.upfronthosting.co.za> Alessandro Cucci added the comment: ok, this time I tested the render myself and seems ok. For rendering I used sphinx. Sorry if I didn't try the final result in the first time, but I've never had the chance to use rst files before. ---------- Added file: http://bugs.python.org/file40056/issue24729_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 19:58:27 2015 From: report at bugs.python.org (Alessandro Cucci) Date: Wed, 29 Jul 2015 17:58:27 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <1438192707.48.0.463655061556.issue24729@psf.upfronthosting.co.za> Changes by Alessandro Cucci : Added file: http://bugs.python.org/file40057/issue24729_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 20:13:01 2015 From: report at bugs.python.org (Robert Collins) Date: Wed, 29 Jul 2015 18:13:01 +0000 Subject: [docs] [issue23589] Redundant sentence in FAQ In-Reply-To: <1425544358.43.0.799956102379.issue23589@psf.upfronthosting.co.za> Message-ID: <1438193581.7.0.108152940869.issue23589@psf.upfronthosting.co.za> Robert Collins added the comment: @Demian, I agree that there are more improvements we can make. The current patch addresses the specific issue of this bug, and if you wished to make a new issue with further improvements that would be great. I'm going to apply this patch now though. ---------- nosy: +rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 20:20:39 2015 From: report at bugs.python.org (Roundup Robot) Date: Wed, 29 Jul 2015 18:20:39 +0000 Subject: [docs] [issue23589] Redundant sentence in FAQ In-Reply-To: <1425544358.43.0.799956102379.issue23589@psf.upfronthosting.co.za> Message-ID: <20150729182036.5515.54398@psf.io> Roundup Robot added the comment: New changeset 02f3bf3f74aa by Robert Collins in branch '2.7': Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan. https://hg.python.org/cpython/rev/02f3bf3f74aa New changeset 941b9c27b8c8 by Robert Collins in branch '3.4': Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan. https://hg.python.org/cpython/rev/941b9c27b8c8 New changeset 93f3ca8fdc39 by Robert Collins in branch '3.5': Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan. https://hg.python.org/cpython/rev/93f3ca8fdc39 New changeset 7163dd7e9511 by Robert Collins in branch 'default': Issue #23589: Remove duplicate sentence from the FAQ. Patch by Yongzhi Pan. https://hg.python.org/cpython/rev/7163dd7e9511 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 20:21:12 2015 From: report at bugs.python.org (Robert Collins) Date: Wed, 29 Jul 2015 18:21:12 +0000 Subject: [docs] [issue23589] Redundant sentence in FAQ In-Reply-To: <1425544358.43.0.799956102379.issue23589@psf.upfronthosting.co.za> Message-ID: <1438194072.71.0.398831140473.issue23589@psf.upfronthosting.co.za> Changes by Robert Collins : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 20:30:07 2015 From: report at bugs.python.org (Roundup Robot) Date: Wed, 29 Jul 2015 18:30:07 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <20150729183004.17709.37899@psf.io> Roundup Robot added the comment: New changeset c9e78d91d588 by Alessandro Cucci in branch '3.4': Issue #24729: Update tutorial to match implementation. https://hg.python.org/cpython/rev/c9e78d91d588 New changeset 20084be60761 by Jason R. Coombs in branch '3.4': Issue #24729: Correct reference to open function. https://hg.python.org/cpython/rev/20084be60761 New changeset 575e60ed7cb8 by Jason R. Coombs in branch '3.5': Merge with 3.4 for Issue #24729 https://hg.python.org/cpython/rev/575e60ed7cb8 New changeset 47330144debd by Jason R. Coombs in branch 'default': Merge with 3.5 for Issue #24729 https://hg.python.org/cpython/rev/47330144debd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 20:31:19 2015 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 29 Jul 2015 18:31:19 +0000 Subject: [docs] [issue24729] Input and Output tutorial erroneously references default encoding UTF-8 In-Reply-To: <1437924018.14.0.782968400575.issue24729@psf.upfronthosting.co.za> Message-ID: <1438194679.51.0.0914808015598.issue24729@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Thanks for working through this Alessandro. I've applied your v3 patch and added a subsequent commit 20084be60761 to correct the open reference. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 20:49:40 2015 From: report at bugs.python.org (Stefan Krah) Date: Wed, 29 Jul 2015 18:49:40 +0000 Subject: [docs] [issue23756] Tighten definition of bytes-like objects In-Reply-To: <1427185517.26.0.298293861062.issue23756@psf.upfronthosting.co.za> Message-ID: <1438195780.62.0.559229545974.issue23756@psf.upfronthosting.co.za> Stefan Krah added the comment: c-contig.v3.patch LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 22:16:54 2015 From: report at bugs.python.org (Robert Collins) Date: Wed, 29 Jul 2015 20:16:54 +0000 Subject: [docs] [issue23144] html.parser.HTMLParser: setting 'convert_charrefs = True' leads to dropped text In-Reply-To: <1420138028.63.0.996553076818.issue23144@psf.upfronthosting.co.za> Message-ID: <1438201014.8.0.526895568013.issue23144@psf.upfronthosting.co.za> Robert Collins added the comment: @ezio I think you should commit what you have so far. LGTM. ---------- nosy: +rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 23:04:43 2015 From: report at bugs.python.org (Roundup Robot) Date: Wed, 29 Jul 2015 21:04:43 +0000 Subject: [docs] [issue24109] Documentation for difflib uses optparse In-Reply-To: <1430509130.15.0.798081297108.issue24109@psf.upfronthosting.co.za> Message-ID: <20150729210435.110864.44778@psf.io> Roundup Robot added the comment: New changeset 8777e59a99bd by Berker Peksag in branch '3.5': Issue #24109: Include Tools/scripts/diff.py instead of duplicating it in difflib documentation. https://hg.python.org/cpython/rev/8777e59a99bd New changeset aa2517e9f9ce by Berker Peksag in branch 'default': Issue #24109: Include Tools/scripts/diff.py instead of duplicating it in difflib documentation. https://hg.python.org/cpython/rev/aa2517e9f9ce ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 29 23:05:58 2015 From: report at bugs.python.org (Berker Peksag) Date: Wed, 29 Jul 2015 21:05:58 +0000 Subject: [docs] [issue24109] Documentation for difflib uses optparse In-Reply-To: <1430509130.15.0.798081297108.issue24109@psf.upfronthosting.co.za> Message-ID: <1438203957.91.0.970947797013.issue24109@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks Keith. ---------- nosy: +berker.peksag resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 30 12:03:38 2015 From: report at bugs.python.org (Marcin Szewczyk) Date: Thu, 30 Jul 2015 10:03:38 +0000 Subject: [docs] [issue24755] asyncio.wrap_future undocumented Message-ID: <1438250618.09.0.00442439827356.issue24755@psf.upfronthosting.co.za> New submission from Marcin Szewczyk: While asyncio.wrap_future is mentioned in PEP 3156 and has its docstring it is undocumented in the reference. run_in_executor is documented but doesn't mention wrap_future either. $ grep -r wrap_future Doc; echo $? 1 ---------- assignee: docs at python components: Documentation messages: 247659 nosy: docs at python, wodny priority: normal severity: normal status: open title: asyncio.wrap_future undocumented type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 30 14:43:09 2015 From: report at bugs.python.org (Martin Panter) Date: Thu, 30 Jul 2015 12:43:09 +0000 Subject: [docs] [issue16508] include the "object" type in the lists of documented types In-Reply-To: <1353284081.12.0.684350303879.issue16508@psf.upfronthosting.co.za> Message-ID: <1438260187.54.0.85850118558.issue16508@psf.upfronthosting.co.za> Martin Panter added the comment: Here is a patch. Perhaps it is what you had in mind. I added quick mentions of the ?object? class to The Standard Type Hierarchy and Other Built-in Types. I added documentation of what the object class?s own implementations do where it provides them. I added sentences pointing out that other methods are not provided by the object class, where I thought it may not already be clear. I also added a test case to check that various methods exist or not, to match the documentation. ---------- keywords: +patch nosy: +vadmium stage: needs patch -> patch review versions: +Python 3.5, Python 3.6 -Python 3.3 Added file: http://bugs.python.org/file40066/object-type.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 30 17:27:40 2015 From: report at bugs.python.org (Roundup Robot) Date: Thu, 30 Jul 2015 15:27:40 +0000 Subject: [docs] [issue12160] codecs doc: what is StreamCodec? In-Reply-To: <1306166137.72.0.066960808058.issue12160@psf.upfronthosting.co.za> Message-ID: <20150730152734.41825.46746@psf.io> Roundup Robot added the comment: New changeset f9694502f07c by Berker Peksag in branch '3.4': Issue #12160: Fix incorrect StreamCodec references in Codec.encode() and Codec.decode() docs. https://hg.python.org/cpython/rev/f9694502f07c New changeset 98631f35426f by Berker Peksag in branch '3.5': Issue #12160: Fix incorrect StreamCodec references in Codec.encode() and Codec.decode() docs. https://hg.python.org/cpython/rev/98631f35426f New changeset d3b20bff9c5d by Berker Peksag in branch 'default': Issue #12160: Fix incorrect StreamCodec references in Codec.encode() and Codec.decode() docs. https://hg.python.org/cpython/rev/d3b20bff9c5d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 30 17:28:46 2015 From: report at bugs.python.org (Berker Peksag) Date: Thu, 30 Jul 2015 15:28:46 +0000 Subject: [docs] [issue12160] codecs doc: what is StreamCodec? In-Reply-To: <1306166137.72.0.066960808058.issue12160@psf.upfronthosting.co.za> Message-ID: <1438270126.43.0.0504221066383.issue12160@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch, Nick! ---------- nosy: +berker.peksag resolution: -> fixed stage: commit review -> resolved status: open -> closed type: -> behavior versions: +Python 3.5, Python 3.6 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 30 18:07:37 2015 From: report at bugs.python.org (Berker Peksag) Date: Thu, 30 Jul 2015 16:07:37 +0000 Subject: [docs] [issue12833] raw_input misbehaves when readline is imported In-Reply-To: <1314205212.4.0.313319940132.issue12833@psf.upfronthosting.co.za> Message-ID: <1438272457.32.0.759595779878.issue12833@psf.upfronthosting.co.za> Berker Peksag added the comment: Also, I'd change the patch to use a note directive. ---------- nosy: +berker.peksag stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 30 19:55:15 2015 From: report at bugs.python.org (John Palermo) Date: Thu, 30 Jul 2015 17:55:15 +0000 Subject: [docs] [issue24757] Installing Py on Windows: Need to restart or logout for path to be added Message-ID: <1438278915.55.0.513516650833.issue24757@psf.upfronthosting.co.za> New submission from John Palermo: Something I suppose many new users could stumble over: After installing Python and trying out "pip" or "python" on the command line nothing is found. You have to re-start Windows or re-log into your account. I suggest adding this information to the documentation here https://docs.python.org/2/using/windows.html#installing-python and also adding it to the Windows installer description for the "add Python to your path" option. ---------- assignee: docs at python components: Documentation messages: 247688 nosy: John Palermo, docs at python priority: normal severity: normal status: open title: Installing Py on Windows: Need to restart or logout for path to be added type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 30 21:50:28 2015 From: report at bugs.python.org (eryksun) Date: Thu, 30 Jul 2015 19:50:28 +0000 Subject: [docs] [issue24757] Installing Py on Windows: Need to restart or logout for path to be added In-Reply-To: <1438278915.55.0.513516650833.issue24757@psf.upfronthosting.co.za> Message-ID: <1438285828.18.0.222711908106.issue24757@psf.upfronthosting.co.za> eryksun added the comment: I think a custom action can be added to Tools/msi/msisupport.c to send a [WM_SETTINGCHANGE][1] "Environment" message to top-level windows. This makes Explorer reload its environment from the registry, so starting a new command prompt (cmd.exe) from Explorer will see the updated PATH. [1]: https://msdn.microsoft.com/en-us/library/ms725497 ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 30 22:27:23 2015 From: report at bugs.python.org (Roundup Robot) Date: Thu, 30 Jul 2015 20:27:23 +0000 Subject: [docs] [issue12160] codecs doc: what is StreamCodec? In-Reply-To: <1306166137.72.0.066960808058.issue12160@psf.upfronthosting.co.za> Message-ID: <20150730202719.94762.59709@psf.io> Roundup Robot added the comment: New changeset 296a09614f31 by Berker Peksag in branch '2.7': Issue #12160: Fix incorrect StreamCodec references in Codec.encode() and Codec.decode() docs. https://hg.python.org/cpython/rev/296a09614f31 ---------- _______________________________________ Python tracker _______________________________________ From vadmium+py at gmail.com Fri Jul 31 01:54:19 2015 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Thu, 30 Jul 2015 23:54:19 -0000 Subject: [docs] include the "object" type in the lists of documented types (issue 16508) Message-ID: <20150730235419.7358.60771@psf.upfronthosting.co.za> https://bugs.python.org/review/16508/diff/15301/Doc/reference/datamodel.rst File Doc/reference/datamodel.rst (right): https://bugs.python.org/review/16508/diff/15301/Doc/reference/datamodel.rst#newcode1095 Doc/reference/datamodel.rst:1095: cls).__new__(cls[, ...])`` with appropriate arguments and then modify the Eugh, the original was more correct. Perhaps I should simplify this into two sentences or something. https://bugs.python.org/review/16508/ From report at bugs.python.org Fri Jul 31 05:26:21 2015 From: report at bugs.python.org (Zachary Ware) Date: Fri, 31 Jul 2015 03:26:21 +0000 Subject: [docs] [issue20464] Update distutils sample config file in Doc/install/index.rst In-Reply-To: <1391201711.97.0.184979826347.issue20464@psf.upfronthosting.co.za> Message-ID: <1438313181.44.0.788609762761.issue20464@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- versions: +Python 3.5, Python 3.6 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 31 08:09:03 2015 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 31 Jul 2015 06:09:03 +0000 Subject: [docs] [issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation In-Reply-To: <1430350495.43.0.91352789573.issue24079@psf.upfronthosting.co.za> Message-ID: <1438322942.93.0.560517170066.issue24079@psf.upfronthosting.co.za> Stefan Behnel added the comment: could we apply this patch, please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 31 08:15:26 2015 From: report at bugs.python.org (Ned Deily) Date: Fri, 31 Jul 2015 06:15:26 +0000 Subject: [docs] [issue24757] Installing Py on Windows: Need to restart or logout for path to be added In-Reply-To: <1438278915.55.0.513516650833.issue24757@psf.upfronthosting.co.za> Message-ID: <1438323326.39.0.665525143351.issue24757@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- components: +Windows -Documentation nosy: +paul.moore, steve.dower, tim.golden, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 31 09:17:17 2015 From: report at bugs.python.org (Ned Deily) Date: Fri, 31 Jul 2015 07:17:17 +0000 Subject: [docs] [issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation In-Reply-To: <1430350495.43.0.91352789573.issue24079@psf.upfronthosting.co.za> Message-ID: <1438327037.07.0.810373316103.issue24079@psf.upfronthosting.co.za> Ned Deily added the comment: I note that the current wording for both "text" and "tail" are careful to allow for the most general use of the Element class, that is, that it may be used in non-XML contexts, for example: "The text attribute can be used to hold additional data associated with the element. As the name implies this attribute is usually a string but may be any application-specific object. If the element is created from an XML file the attribute will contain any text found between the element tags." The proposed patch downplays that generality. How about modifying the original wording so that the description starts something like: "These attributes can be used to hold additional [...] application-specific object. If the element is created from an XML file, the *text* attribute holds either the text between the element'sstart tag and its first child or end tag, or ``None``and the *tail* attribute holds either the text [...]." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 31 09:35:52 2015 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 31 Jul 2015 07:35:52 +0000 Subject: [docs] [issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation In-Reply-To: <1430350495.43.0.91352789573.issue24079@psf.upfronthosting.co.za> Message-ID: <1438328152.32.0.775292304137.issue24079@psf.upfronthosting.co.za> Stefan Behnel added the comment: > The proposed patch downplays that generality. That is completely intentional. Almost all readers of the documentation will first need to understand the difference between text and tail before they can go and think about any more advanced use cases that will almost certainly fail on their first serialisation attempts. The most important aim of the new phrasing is therefore to make that difference clear. Everything else is secondary, although still worth mentioning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 31 15:34:14 2015 From: report at bugs.python.org (Martin Panter) Date: Fri, 31 Jul 2015 13:34:14 +0000 Subject: [docs] [issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation In-Reply-To: <1430350495.43.0.91352789573.issue24079@psf.upfronthosting.co.za> Message-ID: <1438349654.75.0.32561026556.issue24079@psf.upfronthosting.co.za> Martin Panter added the comment: I think Ned?s version is an acceptable solution (modulo some punctuation) to the original problem, although I do agree with Stefan that downplaying the generality would be even better. Perhaps we could add a qualifier, like ?The *text* attribute [normally] holds . . .? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 31 16:02:32 2015 From: report at bugs.python.org (Stefan Behnel) Date: Fri, 31 Jul 2015 14:02:32 +0000 Subject: [docs] [issue24079] xml.etree.ElementTree.Element.text does not conform to the documentation In-Reply-To: <1430350495.43.0.91352789573.issue24079@psf.upfronthosting.co.za> Message-ID: <1438351352.83.0.12655022061.issue24079@psf.upfronthosting.co.za> Stefan Behnel added the comment: Personally, I would prefer getting the improved version applied over bikeshedding for another couple of months. But maybe that's just me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 31 19:07:56 2015 From: report at bugs.python.org (Steve Dower) Date: Fri, 31 Jul 2015 17:07:56 +0000 Subject: [docs] [issue24757] Installing Py on Windows: Need to restart or logout for path to be added In-Reply-To: <1438278915.55.0.513516650833.issue24757@psf.upfronthosting.co.za> Message-ID: <1438362476.27.0.762185173135.issue24757@psf.upfronthosting.co.za> Steve Dower added the comment: That's exactly what is needed (though it still won't affect command prompts that are already open). The 3.5+ installer does it, so this only affects 2.7 and 3.4. ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From aaronjtippetts at gmail.com Fri Jul 31 19:56:03 2015 From: aaronjtippetts at gmail.com (Aaron Tippetts) Date: Fri, 31 Jul 2015 11:56:03 -0600 Subject: [docs] Bug Message-ID: Steps before error: 1 - Loaded Workspace that has worked just fine many times (approx 40 different layers with Google Streets) 2 - Project -> Composure Manager -> Show (any composure that I setup) 3 - Web -> Open Layers Plugin -> Google Hybrid (nothing bad happened) 4 - Right clicked in Layer Toolbox to remove Google Streets (the following error occurred): __________________________________________________________________ An error has occured while executing Python code: Traceback (most recent call last): File "C:/Users/ShadowFox/.qgis2/python/plugins\openlayers_plugin\openlayers_layer.py", line 135, in pageLoaded self.setup_map() File "C:/Users/ShadowFox/.qgis2/python/plugins\openlayers_plugin\openlayers_layer.py", line 185, in setup_map olSize = QSize(int(olWidth), int(olHeight)) TypeError: arguments did not match any overloaded call: QSize(): too many arguments QSize(int, int): argument 1 has unexpected type 'long' QSize(QSize): argument 1 has unexpected type 'long' Python version: 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] QGIS version: 2.8.2-Wien Wien, 1b929ef Python path: ['C:/Users/ShadowFox/.qgis2/python/plugins\\processing', 'C:/PROGRA~1/QGISWI~1/apps/qgis/./python', u'C:/Users/ShadowFox/.qgis2/python', u'C:/Users/ShadowFox/.qgis2/python/plugins', 'C:/PROGRA~1/QGISWI~1/apps/qgis/./python/plugins', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\matplotlib-1.3.1-py2.7-win-amd64.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\nose-1.3.3-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\tornado-4.0.1-py2.7-win-amd64.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\backports.ssl_match_hostname-3.4.0.2-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\certifi-14.05.14-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\bin\\python27.zip', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\DLLs', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\plat-win', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\lib-tk', 'C:\\PROGRA~1\\QGISWI~1\\bin', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\PIL', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\jinja2-2.7.2-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\markupsafe-0.23-py2.7-win-amd64.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\pytz-2012j-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\win32', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\six-1.3.0-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\xlrd-0.9.2-py2.7.egg', 'C:\\PROGRA~1\\QGISWI~1\\apps\\Python27\\lib\\site-packages\\xlwt-0.7.5-py2.7.egg', u'C:/Users/ShadowFox/.qgis2//python', 'C:\\PROGRA~1\\QGISWI~1\\apps\\qgis\\python\\plugins\\fTools\\tools', 'G:/Area Studies/California/San Diego 15'] -------------- next part -------------- An HTML attachment was scrubbed... URL: