From report at bugs.python.org Fri Jul 1 00:42:23 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Jul 2016 04:42:23 +0000 Subject: [docs] [issue1349732] urllib.urlencode provides two features in one param Message-ID: <1467348143.04.0.459321846328.issue1349732@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 2.7 can get doc changes if a core developer wants to push it. ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 1 04:11:59 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 01 Jul 2016 08:11:59 +0000 Subject: [docs] [issue27430] Spelling fixes Message-ID: <1467360719.94.0.135154829609.issue27430@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> patch review versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 1 04:29:57 2016 From: report at bugs.python.org (Steve Piercy) Date: Fri, 01 Jul 2016 08:29:57 +0000 Subject: [docs] [issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv` In-Reply-To: <1465544944.16.0.549761687921.issue27285@psf.upfronthosting.co.za> Message-ID: <1467361795.37.0.249533602778.issue27285@psf.upfronthosting.co.za> Steve Piercy added the comment: Patch attached for review. Notes: - I built the docs using Sphinx 1.4.1, whereas I think 1.3.3 is in use in production. If you upgrade, you will need to specify the language for syntax highlighting, else you will get hundreds of these error messages: /Users/stevepiercy/projects/cpython/Doc/distutils/examples.rst:250: WARNING: Could not lex literal_block as "python3". Highlighting skipped. I made my changes accordingly, as they are backward compatible to Sphinx 1.3.3 and will be one fewer thing to update in future releases. - I removed the file Doc/using/scripts.rst because it became obsolete. This caused warnings in Doc/whatsnew/3.3.rst and Doc/whatsnew/3.4.rst which reference the obsolete file. - I updated a lot of links to https://packaging.python.org/ and others to save a redirect and to get link checking to pass. - I replaced confusing colloquialisms of "env", "venv", and "virtualenv" with "virtual environment" as appropriate. This clarifies that a virtual environment is the thing created, whereas `venv`, `pyvenv`, and `virtualenv` are modules/scripts/commands that create a virtual environment, or that "env" is the name of a directory. - Minor grammar, punctuation, and reST fixes. ---------- hgrepos: +346 keywords: +patch Added file: http://bugs.python.org/file43598/pyvenv-to-venv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 1 05:15:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 01 Jul 2016 09:15:50 +0000 Subject: [docs] [issue27430] Spelling fixes Message-ID: <20160701091547.11279.25003.F8AD8153@psf.io> New submission from Roundup Robot: New changeset ab6129af2a5c by Berker Peksag in branch '3.5': Issue #27430: Fix typos, patch by scop. https://hg.python.org/cpython/rev/ab6129af2a5c New changeset 97b22fe37af1 by Berker Peksag in branch 'default': Issue #27430: Merge from 3.5 https://hg.python.org/cpython/rev/97b22fe37af1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 1 05:16:15 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 01 Jul 2016 09:16:15 +0000 Subject: [docs] [issue27430] Spelling fixes In-Reply-To: <20160701091547.11279.25003.F8AD8153@psf.io> Message-ID: <1467364575.64.0.417972946672.issue27430@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks. ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 1 05:17:42 2016 From: report at bugs.python.org (Sander Steffann) Date: Fri, 01 Jul 2016 09:17:42 +0000 Subject: [docs] [issue27431] Shelve pickle version error Message-ID: <1467364662.95.0.314062070458.issue27431@psf.upfronthosting.co.za> New submission from Sander Steffann: The "class shelve.Shelf(dict, protocol=None, writeback=False, keyencoding='utf-8')" section still says "By default, version 0 pickles are used to serialize values.". This is incorrect. The default version has been 3 since this commit: https://hg.python.org/cpython/file/f351fb7ea179/Lib/shelve.py ---------- assignee: docs at python components: Documentation messages: 269652 nosy: Sander Steffann, docs at python priority: normal severity: normal status: open title: Shelve pickle version error type: enhancement versions: Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 1 05:31:30 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 01 Jul 2016 09:31:30 +0000 Subject: [docs] [issue27431] Shelve pickle version error In-Reply-To: <1467364662.95.0.314062070458.issue27431@psf.upfronthosting.co.za> Message-ID: <20160701093127.72498.90253.4DF3C7B1@psf.io> Roundup Robot added the comment: New changeset b2c3837f7833 by Berker Peksag in branch '3.5': Issue #27431: Update default protocol version in shelve.Shelf() documentation https://hg.python.org/cpython/rev/b2c3837f7833 New changeset 908b801f8a62 by Berker Peksag in branch 'default': Issue #27431: Merge from 3.5 https://hg.python.org/cpython/rev/908b801f8a62 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 1 05:33:34 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 01 Jul 2016 09:33:34 +0000 Subject: [docs] [issue27431] Shelve pickle version error In-Reply-To: <1467364662.95.0.314062070458.issue27431@psf.upfronthosting.co.za> Message-ID: <1467365614.2.0.687937085434.issue27431@psf.upfronthosting.co.za> Berker Peksag added the comment: Good catch, thanks for the report! 3.2, 3.3 and 3.4 are now in security-fix-only so their docs won't be updated. ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: enhancement -> behavior versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 1 12:20:06 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 01 Jul 2016 16:20:06 +0000 Subject: [docs] [issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv` In-Reply-To: <1465544944.16.0.549761687921.issue27285@psf.upfronthosting.co.za> Message-ID: <1467390006.1.0.92679231901.issue27285@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the patch, Steve! Since this is a bug fix I may take until after 3.6b1 goes out to get reviewed and committed since I need to get any semantic changes in before then (b1 is due out in Sep). So if this patch lingers for a couple months, that will be why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 2 16:18:43 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 02 Jul 2016 20:18:43 +0000 Subject: [docs] [issue27422] Deadlock when mixing threading and multiprocessing In-Reply-To: <1467303803.25.0.914359339926.issue27422@psf.upfronthosting.co.za> Message-ID: <1467490723.71.0.676712174058.issue27422@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, this isn't even a Python specific behavior. It is just how threads, locks, and processes work (or in this case don't work). The code is doing what it is told to do which happens to not be what you want (i.e. a user bug rather than a Python bug). I think a FAQ entry would be a reasonable place to mention this (it comes up more often than one would hope). ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 3 08:43:18 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 03 Jul 2016 12:43:18 +0000 Subject: [docs] [issue27429] xml.sax.saxutils.escape doesn't escape multiple characters safely In-Reply-To: <1467329284.42.0.570425192888.issue27429@psf.upfronthosting.co.za> Message-ID: <1467549798.89.0.617851743877.issue27429@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From David.Wheelock at ag.ok.gov Fri Jul 1 14:42:59 2016 From: David.Wheelock at ag.ok.gov (David Wheelock) Date: Fri, 1 Jul 2016 18:42:59 +0000 Subject: [docs] =?windows-1252?q?Usage_error_in_the_documentation_for_the_?= =?windows-1252?q?=93del=94_statement?= Message-ID: Usage error in the documentation for the ?del? statement here: https://docs.python.org/2/reference/simple_stmts.html#del In the following statement: ?Deletion is recursively defined very similar?? ?similar? should be changed to ?similarly? David Wheelock, GISP Application Specialist david.wheelock at ag.ok.gov Oklahoma Department of Agriculture, Food and Forestry 2800 North Lincoln Boulevard Oklahoma City, OK 73105-4298 Phone: (405) 522-5477 FAX: (405) 522-3590 http://ag.ok.gov "We are usually convinced more easily by reasons we have found ourselves, than by those which have occurred to others." Pascal -------------- next part -------------- An HTML attachment was scrubbed... URL: From jim.belton at gmail.com Sat Jul 2 03:56:07 2016 From: jim.belton at gmail.com (Jim Belton) Date: Sat, 2 Jul 2016 00:56:07 -0700 Subject: [docs] How best to submit a change? Message-ID: Hi all: I'm more than happy to hack some restructured text. How best to submit a patch to a doc? I'm not going to take the time to improve unless I know how to get my change included. I'd be hacking the 2.7 branch, since that's the version I seem to be working in. Hopefully, 3 will start getting more traction in real world dev.ops. environments soon. Thanks, Jim. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mani.baktha at gmail.com Fri Jul 1 04:36:53 2016 From: mani.baktha at gmail.com (Manikandan Bakthavatchalam) Date: Fri, 1 Jul 2016 10:36:53 +0200 Subject: [docs] python cam style docs on mac Message-ID: <2476A066-B71B-4494-B799-DED6A1EAAA1C@gmail.com> Hi, First, thanks for this wonderful language. I am using python on my mac OSX El Capitan. Where can I find the offline help files on my mac? In windows, I see people using the offline chm. This is very useful while programming without having to browse the internet for docs each time. regards, Manikandan From report at bugs.python.org Sun Jul 3 10:17:00 2016 From: report at bugs.python.org (Xiang Zhang) Date: Sun, 03 Jul 2016 14:17:00 +0000 Subject: [docs] [issue27429] xml.sax.saxutils.escape doesn't escape multiple characters safely In-Reply-To: <1467329284.42.0.570425192888.issue27429@psf.upfronthosting.co.za> Message-ID: <1467555420.79.0.310648403386.issue27429@psf.upfronthosting.co.za> Xiang Zhang added the comment: Put a not in escape's doc. ---------- Added file: http://bugs.python.org/file43617/sax_escape_doc.patch _______________________________________ Python tracker _______________________________________ From willingc at willingconsulting.com Sun Jul 3 14:05:51 2016 From: willingc at willingconsulting.com (Carol Willing) Date: Sun, 03 Jul 2016 18:05:51 +0000 Subject: [docs] How best to submit a change? In-Reply-To: References: Message-ID: <5dgmk9kata73zp7u6wf31gzlj-2147483647@mailer.nylas.com> ![](https://link.nylas.com/open/1oeantoc6n5zav9mkp4e6rmlq/local- 54a3fc56-81ac?r=ZG9jc0BweXRob24ub3Jn) On Jul 3 2016, at 6:38 am, Jim Belton <jim.belton at gmail.com> wrote: > Hi all: > > > > I'm more than happy to hack some restructured text. How best to submit a patch to a doc? I'm not going to take the time to improve unless I know how to get my change included. I'd be hacking the 2.7 branch, since that's the version I seem to be working in. Hopefully, 3 will start getting more traction in real world dev.ops. environments soon. > > > > Thanks, > > > Jim. > Hi Jim, The Python Dev Guide (https://docs.python.org/devguide/#full-table-of- contents) would be a good resource to walk you through how to submit a patch to the CPython docs: * Section 3: Life cycle of a patch * Section 6: Helping with documentation * Section 7: Documenting Python Thanks for your interest in submitting a doc patch. We're looking forward to contributions from you. Thanks! Carol \--- Carol Willing Research Software Engineer Project Jupyter @ Cal Poly SLO Director, Python Software Foundation _Signature strengths_ _Empathy - Relator - Ideation - Strategic - Learner_ _ _ -------------- next part -------------- An HTML attachment was scrubbed... URL: From willingc at willingconsulting.com Sun Jul 3 14:10:51 2016 From: willingc at willingconsulting.com (Carol Willing) Date: Sun, 03 Jul 2016 18:10:51 +0000 Subject: [docs] python cam style docs on mac In-Reply-To: <2476A066-B71B-4494-B799-DED6A1EAAA1C@gmail.com> References: <2476A066-B71B-4494-B799-DED6A1EAAA1C@gmail.com> Message-ID: <9pmmdogw7la940b9bm2498kku-2147483647@mailer.nylas.com> ![](https://link.nylas.com/open/1oeantoc6n5zav9mkp4e6rmlq/local-25e3c6bb- d01f?r=ZG9jc0BweXRob24ub3Jn) On Jul 3 2016, at 6:33 am, Manikandan Bakthavatchalam <mani.baktha at gmail.com> wrote: > Hi, > > First, thanks for this wonderful language. > > I am using python on my mac OSX El Capitan. Where can I find the offline help files on my mac? In windows, I see people using the offline chm. This is very useful while programming without having to browse the internet for docs each time. > > regards, > Manikandan > > _______________________________________________ > docs mailing list > docs at python.org > https://mail.python.org/mailman/listinfo/docs > > > Hi Manikandan, We're happy that you like the Python language :-) One way to have the Python documentation offline on OS X would be to go to the documentation website (docs.python.org) and then download the entire documentation (link in the sidebar on the upper left). Another way would be to download the CPython source code and build the docs locally. Hope that helps, Carol -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Mon Jul 4 09:18:08 2016 From: report at bugs.python.org (Martin Ritter) Date: Mon, 04 Jul 2016 13:18:08 +0000 Subject: [docs] [issue27422] Deadlock when mixing threading and multiprocessing In-Reply-To: <1467303803.25.0.914359339926.issue27422@psf.upfronthosting.co.za> Message-ID: <1467638288.54.0.424124907663.issue27422@psf.upfronthosting.co.za> Martin Ritter added the comment: I agree that this is error prone and can not be fixed reliably on the python side. However, python makes it very easy to mix these two, a user might not even notice it if a function he calls uses fork and thus just use a ThreadPoolExecutor() because it's the simplest thing to do. What could be an nice solution in my opinion if the multiprocessing module could check if there are already multiple threads active on process creation and issue a warning if so. This warning could of course be optional but would make this issue more obvious. In my case we have a large C++ code base which still includes a lot of Fortran 77 code with common blocks all over the place (yay science). Everything is interfaced in python so to make sure that I do not have any side effects I run the some of the functions in a fork using multiprocessing.Process(). And in this case I just wanted to run some testing in parallel. I now switched to a ProcessPoolExecutor which works fine but for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 4 11:19:42 2016 From: report at bugs.python.org (Davin Potts) Date: Mon, 04 Jul 2016 15:19:42 +0000 Subject: [docs] [issue27422] Deadlock when mixing threading and multiprocessing In-Reply-To: <1467303803.25.0.914359339926.issue27422@psf.upfronthosting.co.za> Message-ID: <1467645582.9.0.573280293629.issue27422@psf.upfronthosting.co.za> Davin Potts added the comment: While I believe I understand the motivation behind the suggestion to detect when the code is doing something potentially dangerous, I'll point out a few things: * any time you ask for a layer of convenience, you must choose something to sacrifice to get it (usually performance is sacrificed) and this sacrifice will affect all code (including non-problematic code) * behind the scenes multiprocessing itself is employing multiple threads in the creation and coordination between processes -- "checking to see if there are multiple threads active on process creation" is therefore a more complicated request than it maybe first appears * Regarding "python makes it very easy to mix these two", I'd say it's nearly as easy to mix the two in C code -- the common pattern across different languages is to learn the pros+cons+gotchyas of working with processes and threads I too come from the world of scientific software and the mixing of Fortran, C/C++, and Python (yay science and yay Fortran) so I'll make another point (apologies if you already knew this): There's a lot of computationally intensive code in scientific code/applications and being able to perform those computations in parallel is a wonderful thing. I am unsure if the tests you're trying to speed up exercise compute-intensive functions but let's assume they do. For reasons not described here, using the CPython implementation, there is a constraint on the use of threads that restricts them to all run on a single core of your multi-core cpu (and on only one cpu if you have an SMP system). Hence spinning up threads to perform compute intensive tasks will likely result in no better throughput (no speedup) because they're all fighting over the same maxed-out core. To spread out onto and take advantage of multiple cores (and multiple cpus on an SMP system) you will want switch to creating processes (as you say you now have). I'd make the distinction that you are likely much more interested in 'parallel computing' than 'concurrent execution'. Since you're already using multiprocessing you might also simply use `multiprocessing.Pool`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 4 12:37:13 2016 From: report at bugs.python.org (Martin Ritter) Date: Mon, 04 Jul 2016 16:37:13 +0000 Subject: [docs] [issue27422] Deadlock when mixing threading and multiprocessing In-Reply-To: <1467303803.25.0.914359339926.issue27422@psf.upfronthosting.co.za> Message-ID: <1467650233.15.0.591093318116.issue27422@psf.upfronthosting.co.za> Martin Ritter added the comment: Dear Davin, Thanks for the input, I was perfectly aware that the "solution" I proposed is not realistic. But the feedback that multiprocessing is using threads internally is useful as I can quickly abandon the idea to do something like the check I proposed in our code base without spending time on it. I was aware of the Gil, I just did not anticipate that big a problem when mixing threads and processes with rather simple python code. My bad, sorry for the noise. Cheers, Martin ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 4 12:55:21 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 04 Jul 2016 16:55:21 +0000 Subject: [docs] [issue27422] Deadlock when mixing threading and multiprocessing In-Reply-To: <1467303803.25.0.914359339926.issue27422@psf.upfronthosting.co.za> Message-ID: <1467651321.06.0.717868727807.issue27422@psf.upfronthosting.co.za> R. David Murray added the comment: To clarify the GIL issue (for davin, I guess? :): if the library you are using to interface with the FORTRAN code drops the GIL before calling the FORTRAN, then you *can* take advantage of multiple cores. It is only the python code (and some of the code interacting with the python objects) that is limited to executing on one core at a time. (As far as I know it isn't restricted to be the *same* core unless you set CPU affinity somehow, and I have no idea if it improves performance to use CPU affinity or not). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 4 15:29:36 2016 From: report at bugs.python.org (Davin Potts) Date: Mon, 04 Jul 2016 19:29:36 +0000 Subject: [docs] [issue27422] Deadlock when mixing threading and multiprocessing In-Reply-To: <1467303803.25.0.914359339926.issue27422@psf.upfronthosting.co.za> Message-ID: <1467660576.43.0.391581659485.issue27422@psf.upfronthosting.co.za> Davin Potts added the comment: @r.david.murray: Oh man, I was not going to go as far as advocate dropping the GIL. :) At least not in situations like this where the exploitable parallelism is meant to be at the Python level and not inside the Fortran code (or that was my understanding of the setup). Martin had already mentioned the motivation to fork to avoid side effects possibly arising somewhere in that code. In practice, after dropping the GIL the threads will likely use multiple of the cores -- though that's up to the OS kernel scheduler, that's what I've observed happening after temporarily dropping the GIL on both Windows and Linux systems. As to the benefit of CPU affinity, it depends -- it depends upon what my code was and what the OS and other system processes were busily doing at the time my code ran -- but I've never seen it hurt performance (even if the help was diminishingly small at times). For certain situations, it has been worth doing. Correction: I have seen cpu affinity hurt performance when I make a bone-headed mistake and constrain too many things onto too few cores. But that's a PEBCAK root cause. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 4 15:32:46 2016 From: report at bugs.python.org (Davin Potts) Date: Mon, 04 Jul 2016 19:32:46 +0000 Subject: [docs] [issue27422] Deadlock when mixing threading and multiprocessing In-Reply-To: <1467303803.25.0.914359339926.issue27422@psf.upfronthosting.co.za> Message-ID: <1467660766.95.0.00411154737836.issue27422@psf.upfronthosting.co.za> Changes by Davin Potts : ---------- stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 5 07:25:29 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 05 Jul 2016 11:25:29 +0000 Subject: [docs] [issue27422] Deadlock when mixing threading and multiprocessing In-Reply-To: <1467303803.25.0.914359339926.issue27422@psf.upfronthosting.co.za> Message-ID: <1467717928.95.0.906296650536.issue27422@psf.upfronthosting.co.za> R. David Murray added the comment: Heh, yeah. What I was really trying to do by that comment was clarify for any *other* readers that stumble on this issue later it is just the python code that *has* to be constrained by the GIL. I have no idea how much of the scipy stack drops the gil at strategic spots. I do seem to remember that the the Jupyter uses multiple processes for its parallelism, though. Anyway, this is pretty off topic now :) ---------- _______________________________________ Python tracker _______________________________________ From kpt.suresh.babu at gmail.com Tue Jul 5 02:15:03 2016 From: kpt.suresh.babu at gmail.com (Suresh Babu) Date: Tue, 5 Jul 2016 11:45:03 +0530 Subject: [docs] NAMEING python Message-ID: Hi Guido Cpython is good easy to understand. Please change the names of other pythons like. JPython for java python NPython for .net python Python for original python without classes with regards, sureshbk. -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Tue Jul 5 09:20:52 2016 From: report at bugs.python.org (John Hagen) Date: Tue, 05 Jul 2016 13:20:52 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant Message-ID: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> New submission from John Hagen: Patch fixes tkinter examples to be PEP8 compliant. ---------- assignee: docs at python components: Documentation files: 0001-Fix-tkinter-docs-PEP8.patch keywords: patch messages: 269820 nosy: John Hagen, docs at python priority: normal severity: normal status: open title: Fix tkinter examples to be PEP8 compliant versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file43627/0001-Fix-tkinter-docs-PEP8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 5 09:24:41 2016 From: report at bugs.python.org (SilentGhost) Date: Tue, 05 Jul 2016 13:24:41 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467725081.71.0.0148294985055.issue27455@psf.upfronthosting.co.za> SilentGhost added the comment: This patch is going to be rejected, camelCase is standard convention in tkinter and logging modules and that's why it is used in documentation as well. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 5 09:41:21 2016 From: report at bugs.python.org (Berker Peksag) Date: Tue, 05 Jul 2016 13:41:21 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467726081.76.0.931648239111.issue27455@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch. If you want to improve the examples in tkinter documentation, I'd suggest to update Class.__init__(self, ...) to super().__init__(...). There is no old-style classes in Python 3 anymore so those examples could be updated safely. Also, please read https://docs.python.org/devguide/patch.html. Sending a patch from a Git checkout will only make the review process harder (and I will personally ignore them in the future). ---------- nosy: +berker.peksag, terry.reedy stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 5 13:41:39 2016 From: report at bugs.python.org (John Hagen) Date: Tue, 05 Jul 2016 17:41:39 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467740499.28.0.0614143971237.issue27455@psf.upfronthosting.co.za> Changes by John Hagen : Removed file: http://bugs.python.org/file43627/0001-Fix-tkinter-docs-PEP8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 5 13:49:26 2016 From: report at bugs.python.org (John Hagen) Date: Tue, 05 Jul 2016 17:49:26 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467740966.31.0.0349409300104.issue27455@psf.upfronthosting.co.za> John Hagen added the comment: @Berker, sorry for the incorrect diff format, still new to CPython (and Mercurial) workflow. I've attached the diff in a new format. @SilentGhost I see what you mean that camelCase is used often in tkinter (though many of the examples use lower_camel_case, so it seems like at least it's not consistent currently). The minor issue I was trying to fix with this patch is that I was showing a programmer completely new to Python the tkinter example and when he pasted it into PyCharm it had some PEP8 warnings, so I was hoping to improve that experience slightly for others in the future. Some of the changes were newlines for PEP8, would those be accepted? I'm not strongly inclined either way, so if the core team thinks it should not be changed, I'm happy with that. ---------- Added file: http://bugs.python.org/file43628/0001-Fix-tkinter-docs-PEP8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 5 15:46:19 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 Jul 2016 19:46:19 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467747979.28.0.491524531721.issue27455@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Except for replacing '' with ""*, I am strongly for this patch. To me, caMelcaSe is ugLy, and should not be encouraged. I disagree that camelCase is standard convention, at least not currently. Tkinter itself does not use it. It does not even use TitleCase much. As near as I could find, neither http://effbot.org/tkinterbook/tkinter-index.htm nor http://www.tkdocs.com/tutorial/index.html introduce camelCase identifiers. For instance, http://effbot.org/tkinterbook/tkinter-hello-again.htm, instead of hiThere and sayHi, has self.hi_there = Button(frame, text="Hello", command=self.say_hi) def say_hi(self): * PEP 8 says "In Python, single-quoted strings and double-quoted strings are the same. This PEP does not make a recommendation for this." My personal convention is 'word', which occurs a lot in tkinter code, and 'multi-word phrase or sentence", which is much rarer. Why the change in the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 5 15:46:37 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 05 Jul 2016 19:46:37 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467747997.73.0.768426328209.issue27455@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: +Tkinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 5 16:13:25 2016 From: report at bugs.python.org (John Hagen) Date: Tue, 05 Jul 2016 20:13:25 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467749605.67.0.517057241796.issue27455@psf.upfronthosting.co.za> John Hagen added the comment: @Terry The reason for changing the quotes was for consistency, since everywhere else on that page used double quotes. That being said, I don't have a strong preference and will happily revert it if that is the consensus. I'm +0 on the change. I personally use single quotes everywhere and use flake8-quotes to help with this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 6 08:38:57 2016 From: report at bugs.python.org (John Hagen) Date: Wed, 06 Jul 2016 12:38:57 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467808737.99.0.258114580344.issue27455@psf.upfronthosting.co.za> Changes by John Hagen : Removed file: http://bugs.python.org/file43628/0001-Fix-tkinter-docs-PEP8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 6 08:41:47 2016 From: report at bugs.python.org (John Hagen) Date: Wed, 06 Jul 2016 12:41:47 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467808906.95.0.448539576218.issue27455@psf.upfronthosting.co.za> John Hagen added the comment: @Terry I've removed the two string quotes changes in the latest patch. @Berker I spent a small amount of time trying out your proposed super() changes, but could not get them to work on 3.5.1. "C:\Users\John Hagen\AppData\Local\Programs\Python\Python35\python.exe" "C:/Users/John Hagen/PycharmProjects/test/test.py" Traceback (most recent call last): File "C:/Users/John Hagen/PycharmProjects/test/test.py", line 25, in app = Application(master=root) File "C:/Users/John Hagen/PycharmProjects/test/test.py", line 6, in __init__ super().__init__(self, master) File "C:\Users\John Hagen\AppData\Local\Programs\Python\Python35\lib\tkinter\__init__.py", line 2583, in __init__ Widget.__init__(self, master, 'frame', cnf, {}, extra) File "C:\Users\John Hagen\AppData\Local\Programs\Python\Python35\lib\tkinter\__init__.py", line 2131, in __init__ BaseWidget._setup(self, master, cnf) File "C:\Users\John Hagen\AppData\Local\Programs\Python\Python35\lib\tkinter\__init__.py", line 2109, in _setup self.tk = master.tk AttributeError: 'Application' object has no attribute 'tk' -------------------- import tkinter as tk class Application(tk.Frame): def __init__(self, master=None): super().__init__(self, master) self.pack() self.create_widgets() def create_widgets(self): self.hi_there = tk.Button(self) self.hi_there["text"] = "Hello World\n(click me)" self.hi_there["command"] = self.say_hi self.hi_there.pack(side="top") self.quit = tk.Button(self, text="QUIT", fg="red", command=root.destroy) self.quit.pack(side="bottom") def say_hi(self): print("hi there, everyone!") root = tk.Tk() app = Application(master=root) app.mainloop() ---------- Added file: http://bugs.python.org/file43641/0001-Fix-tkinter-docs-PEP8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 6 09:16:22 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 06 Jul 2016 13:16:22 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467810982.75.0.689091284161.issue27455@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the updated patch. I noticed a typo in your test script. It works for me if I update the super() line from super().__init__(self, master) to super().__init__(master) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 6 15:56:10 2016 From: report at bugs.python.org (John Hagen) Date: Wed, 06 Jul 2016 19:56:10 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467834970.68.0.561397389448.issue27455@psf.upfronthosting.co.za> Changes by John Hagen : Removed file: http://bugs.python.org/file43641/0001-Fix-tkinter-docs-PEP8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 6 15:57:46 2016 From: report at bugs.python.org (John Hagen) Date: Wed, 06 Jul 2016 19:57:46 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1467835066.29.0.535174308106.issue27455@psf.upfronthosting.co.za> John Hagen added the comment: @Berker, thanks for the tip! I've fixed it up. I think this latest patch covers everything Berker and Terry have commented about. ---------- Added file: http://bugs.python.org/file43645/Fix-tkinter-docs-PEP8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 6 17:48:56 2016 From: report at bugs.python.org (Ammar Askar) Date: Wed, 06 Jul 2016 21:48:56 +0000 Subject: [docs] [issue26267] UUID docs should say how to get "standard form" In-Reply-To: <1454438589.41.0.991764109365.issue26267@psf.upfronthosting.co.za> Message-ID: <1467841736.37.0.971534848805.issue26267@psf.upfronthosting.co.za> Ammar Askar added the comment: This patch adds documentation for the str(uuid) operator along with documenting the fact that UUID instances support comparisons with `>` and `<`. It also indents the attributes and descriptions to emphasize that they are part of the UUID instance, not the uuid module. I followed https://docs.python.org/3/library/stdtypes.html#set for documenting the operators, hope it's fine. ---------- keywords: +patch nosy: +ammar2 Added file: http://bugs.python.org/file43647/uuiddocs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 6 17:51:19 2016 From: report at bugs.python.org (Emanuel Barry) Date: Wed, 06 Jul 2016 21:51:19 +0000 Subject: [docs] [issue27242] Make the docs for NotImplemented & NotImplementedError unambiguous In-Reply-To: <1465239567.69.0.773832868585.issue27242@psf.upfronthosting.co.za> Message-ID: <1467841879.73.0.478123345013.issue27242@psf.upfronthosting.co.za> Emanuel Barry added the comment: New patch with proper indenting, should be good as far as formatting is concerned :) ---------- Added file: http://bugs.python.org/file43648/NotImplemented_exceptions_wording_5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 6 18:39:45 2016 From: report at bugs.python.org (Ammar Askar) Date: Wed, 06 Jul 2016 22:39:45 +0000 Subject: [docs] [issue23710] C API doc for PyObject_HEAD is outdated In-Reply-To: <1426776099.01.0.644113037586.issue23710@psf.upfronthosting.co.za> Message-ID: <1467844785.19.0.593378354153.issue23710@psf.upfronthosting.co.za> Ammar Askar added the comment: This diff amends the documentation to point out that PyObject_HEAD includes the ob_base field, gives a brief overview of it and points to the PyObject/structures page for more information. It also changes the semicolon part to a warning for clarity. ---------- keywords: +patch nosy: +ammar2 Added file: http://bugs.python.org/file43649/capidocs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 6 19:28:10 2016 From: report at bugs.python.org (Ammar Askar) Date: Wed, 06 Jul 2016 23:28:10 +0000 Subject: [docs] [issue19489] move quick search box above TOC In-Reply-To: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> Message-ID: <1467847690.24.0.824414248182.issue19489@psf.upfronthosting.co.za> Ammar Askar added the comment: It looks like this can be fixed by us. Since sphinx 1.0 there is this handy config parameter: http://www.sphinx-doc.org/en/stable/config.html#confval-html_sidebars I've attached a patch which pins the searchbox as the first thing on every page. ---------- keywords: +patch nosy: +ammar2 Added file: http://bugs.python.org/file43650/searchbar.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 6 22:31:31 2016 From: report at bugs.python.org (Joshua Jay Herman) Date: Thu, 07 Jul 2016 02:31:31 +0000 Subject: [docs] [issue24459] Mention PYTHONFAULTHANDLER in the man page In-Reply-To: <1434487895.85.0.561507121326.issue24459@psf.upfronthosting.co.za> Message-ID: <1467858691.52.0.740869540697.issue24459@psf.upfronthosting.co.za> Joshua Jay Herman added the comment: ping ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 7 08:29:45 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Thu, 07 Jul 2016 12:29:45 +0000 Subject: [docs] [issue27461] Optimize PNGs Message-ID: <1467894574.39.0.144098385194.issue27461@psf.upfronthosting.co.za> New submission from Ville Skytt?: Running PNGs through zopflipng makes them smaller, with no drawbacks. This patch was done with zopflipng version 1.0.1 with the -m option, and decreases the in-tree total size size of all *.png by almost 100KiB. $ find -name "*.png" | xargs du -bc | tail -n 1 # before 291101 total $ find -name "*.png" | xargs du -bc | tail -n 1 # after 194639 total ---------- assignee: docs at python components: Documentation files: pngs.patch keywords: patch messages: 269929 nosy: docs at python, scop priority: normal severity: normal status: open title: Optimize PNGs type: enhancement Added file: http://bugs.python.org/file43653/pngs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 7 08:31:58 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Jul 2016 12:31:58 +0000 Subject: [docs] [issue27461] Optimize PNGs In-Reply-To: <1467894574.39.0.144098385194.issue27461@psf.upfronthosting.co.za> Message-ID: <1467894718.46.0.389725054736.issue27461@psf.upfronthosting.co.za> STINNER Victor added the comment: Hi, The idea is interesting, but IMO it would be more efficient to contribute to Sphinx, so all documentations will benefit of smallest pictures. There is a similar tool for JPEG. Victor ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 7 08:36:17 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Thu, 07 Jul 2016 12:36:17 +0000 Subject: [docs] [issue27461] Optimize PNGs In-Reply-To: <1467894574.39.0.144098385194.issue27461@psf.upfronthosting.co.za> Message-ID: <1467894977.08.0.529081636581.issue27461@psf.upfronthosting.co.za> Ville Skytt? added the comment: Sure, I plan to suggest this to sphinx as well. One corresponding tool for JPEGs is jpegoptim and its --strip-all option, but there is only ./Mac/BuildScript/resources/background.jpg in the cpython source tree (which despite of the .jpg extension appears to be a PNG file so I don't want to touch that stuff), plus ./Lib/test/imghdrdata/python.jpg which isn't worth a patch alone :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 7 08:38:03 2016 From: report at bugs.python.org (STINNER Victor) Date: Thu, 07 Jul 2016 12:38:03 +0000 Subject: [docs] [issue27461] Optimize PNGs In-Reply-To: <1467894574.39.0.144098385194.issue27461@psf.upfronthosting.co.za> Message-ID: <1467895083.67.0.387549014689.issue27461@psf.upfronthosting.co.za> STINNER Victor added the comment: > there is only ./Mac/BuildScript/resources/background.jpg in the cpython source tree (which despite of the .jpg extension appears to be a PNG file so I don't want to touch that stuff) Oh funny, you're right: it's a PNG file :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 7 10:32:42 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 07 Jul 2016 14:32:42 +0000 Subject: [docs] [issue23710] C API doc for PyObject_HEAD is outdated In-Reply-To: <1426776099.01.0.644113037586.issue23710@psf.upfronthosting.co.za> Message-ID: <1467901962.43.0.5065342703.issue23710@psf.upfronthosting.co.za> R. David Murray added the comment: Warnings are big red boxes, and we try to only use those for really critical info. The current text is what we want as far as that goes. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 7 14:16:34 2016 From: report at bugs.python.org (Ammar Askar) Date: Thu, 07 Jul 2016 18:16:34 +0000 Subject: [docs] [issue23710] C API doc for PyObject_HEAD is outdated In-Reply-To: <1426776099.01.0.644113037586.issue23710@psf.upfronthosting.co.za> Message-ID: <1467915394.8.0.597478163634.issue23710@psf.upfronthosting.co.za> Ammar Askar added the comment: >The current text is what we want as far as that goes. Roger that, I've reverted the change to make that a warning in the newest diff. ---------- Added file: http://bugs.python.org/file43657/capidocs.diff-2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 7 14:46:49 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 07 Jul 2016 18:46:49 +0000 Subject: [docs] [issue23710] C API doc for PyObject_HEAD is outdated In-Reply-To: <1426776099.01.0.644113037586.issue23710@psf.upfronthosting.co.za> Message-ID: <1467917209.91.0.720562976442.issue23710@psf.upfronthosting.co.za> R. David Murray added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 03:08:34 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 08 Jul 2016 07:08:34 +0000 Subject: [docs] [issue27467] distutils.config API different between <=3.5.1 and 3.5.2 In-Reply-To: <1467951392.72.0.939570638824.issue27467@psf.upfronthosting.co.za> Message-ID: <1467961713.99.0.124258586852.issue27467@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report. Yes, the RawConfigParser change was intentional and it was discussed in issue 20120. I'm marking this as a documentation issue. ---------- assignee: -> docs at python components: +Documentation nosy: +berker.peksag, docs at python stage: -> needs patch versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 03:22:39 2016 From: report at bugs.python.org (Xiang Zhang) Date: Fri, 08 Jul 2016 07:22:39 +0000 Subject: [docs] [issue27467] distutils.config API different between <=3.5.1 and 3.5.2 In-Reply-To: <1467951392.72.0.939570638824.issue27467@psf.upfronthosting.co.za> Message-ID: <1467962558.98.0.958442717793.issue27467@psf.upfronthosting.co.za> Xiang Zhang added the comment: Berker, what doc needs to be changed? Although RawConfigParser is legacy but that does not mean it's deprecated, right? We can still use it although the doc suggests us use ConfigParser. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 03:37:59 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 08 Jul 2016 07:37:59 +0000 Subject: [docs] [issue27467] distutils.config API different between <=3.5.1 and 3.5.2 In-Reply-To: <1467951392.72.0.939570638824.issue27467@psf.upfronthosting.co.za> Message-ID: <1467963479.84.0.812742564345.issue27467@psf.upfronthosting.co.za> Berker Peksag added the comment: I was thinking to document issue 20120 in Misc/NEWS. It turns out I was looking at the wrong commit and it was already documented in eae59b6bf133. ---------- resolution: -> not a bug stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 04:32:39 2016 From: report at bugs.python.org (SilentGhost) Date: Fri, 08 Jul 2016 08:32:39 +0000 Subject: [docs] [issue27464] Document that SplitResult & friends are namedtuples In-Reply-To: <1467934956.52.0.328129985005.issue27464@psf.upfronthosting.co.za> Message-ID: <1467966759.91.0.673337512628.issue27464@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> needs patch versions: +Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 07:09:38 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Fri, 08 Jul 2016 11:09:38 +0000 Subject: [docs] [issue27269] ipaddress: Wrong behavior with ::ffff:1.2.3.4 style IPs In-Reply-To: <1465397723.89.0.175384049159.issue27269@psf.upfronthosting.co.za> Message-ID: <1467976178.71.0.482056820263.issue27269@psf.upfronthosting.co.za> ???? ????????? added the comment: Also, it should be marked explicitly, if cross-type lookup is safe. I mean code like that: some_net = ipaddress.ip_network(some_input1) some_addr = ipaddress.ip_address(some_input2) return some_addr in some_net Is it safe to write such code? Docs say: 21.28.2.3. Operators Address objects support some operators. Unless stated otherwise, operators can only be applied between compatible objects (i.e. IPv4 with IPv4, IPv6 with IPv6). 1. It is not said if exception will be raised if incompatible objects are used, and not said if result is defined. 2. "Unless stated otherwise" - Seem it is stated nowhere. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 12:23:05 2016 From: report at bugs.python.org (Matthew Gilson) Date: Fri, 08 Jul 2016 16:23:05 +0000 Subject: [docs] [issue27470] -3 commandline option documented differently via man Message-ID: <1467994985.16.0.513883147731.issue27470@psf.upfronthosting.co.za> New submission from Matthew Gilson: The man page for python says: > Warn about Python 3.x incompatibilities that 2to3 cannot trivially fix. The official documentation (https://docs.python.org/2/using/cmdline.html#cmdoption-3) does not mention 2to3 at all: > Warn about Python 3.x possible incompatibilities by emitting a DeprecationWarning for features that are removed or significantly changed in Python 3. This seems like a pretty big oversight when the following code issues no warnings (presumably because 2to3 can trivially handle this change): ``` from __future__ import print_function class test(object): def __nonzero__(self): return False t = test() if t: print('Hello') ``` ---------- assignee: docs at python components: Documentation messages: 269994 nosy: docs at python, mgilson priority: normal severity: normal status: open title: -3 commandline option documented differently via man versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 13:46:33 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 08 Jul 2016 17:46:33 +0000 Subject: [docs] [issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv` In-Reply-To: <1465544944.16.0.549761687921.issue27285@psf.upfronthosting.co.za> Message-ID: <20160708174626.15465.64135.85DA4CE9@psf.io> Roundup Robot added the comment: New changeset 414f67e000a7 by Brett Cannon in branch 'default': Issue #27285: Document the deprecation of the pyvenv script. https://hg.python.org/cpython/rev/414f67e000a7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 13:47:30 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 08 Jul 2016 17:47:30 +0000 Subject: [docs] [issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv` In-Reply-To: <1465544944.16.0.549761687921.issue27285@psf.upfronthosting.co.za> Message-ID: <1468000050.05.0.223468009131.issue27285@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the patch, Steve! I went ahead and got this done now when I realized your patch touched so many files, thus waiting could lead to skew and the need to update the patch needlessly. ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 14:15:05 2016 From: report at bugs.python.org (Steve Piercy) Date: Fri, 08 Jul 2016 18:15:05 +0000 Subject: [docs] [issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv` In-Reply-To: <1465544944.16.0.549761687921.issue27285@psf.upfronthosting.co.za> Message-ID: <1468001705.63.0.929879750868.issue27285@psf.upfronthosting.co.za> Steve Piercy added the comment: Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 15:18:04 2016 From: report at bugs.python.org (Oren Milman) Date: Fri, 08 Jul 2016 19:18:04 +0000 Subject: [docs] [issue20842] pkgutil docs should reference glossary terms not PEP 302 In-Reply-To: <1393846400.67.0.723549613222.issue20842@psf.upfronthosting.co.za> Message-ID: <1468005484.39.0.748335368242.issue20842@psf.upfronthosting.co.za> Oren Milman added the comment: Note that http://bugs.python.org/issue26896 is now closed (the patches proposed in it (with some minor changes) were committed). ---------- nosy: +Oren Milman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 15:38:07 2016 From: report at bugs.python.org (Daniel Holth) Date: Fri, 08 Jul 2016 19:38:07 +0000 Subject: [docs] [issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation) In-Reply-To: <1445194189.09.0.0973348556564.issue25435@psf.upfronthosting.co.za> Message-ID: <1468006687.12.0.926056715879.issue25435@psf.upfronthosting.co.za> Daniel Holth added the comment: This bit me also. Is there other documentation for how many arguments MethodType() should take? ---------- nosy: +dholth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 8 19:01:12 2016 From: report at bugs.python.org (Eryk Sun) Date: Fri, 08 Jul 2016 23:01:12 +0000 Subject: [docs] [issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation) In-Reply-To: <1445194189.09.0.0973348556564.issue25435@psf.upfronthosting.co.za> Message-ID: <1468018872.59.0.649514514082.issue25435@psf.upfronthosting.co.za> Eryk Sun added the comment: I'm surprised it's not documented for the types module: https://docs.python.org/3.5/library/types.html#types.MethodType At least the docstring has the parameters: >>> print(types.MethodType.__doc__) method(function, instance) Create a bound instance method object. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From senthil at uthcode.com Fri Jul 8 21:22:24 2016 From: senthil at uthcode.com (senthil at uthcode.com) Date: Sat, 09 Jul 2016 01:22:24 -0000 Subject: [docs] Fix tkinter examples to be PEP8 compliant (issue 27455) Message-ID: <20160709012224.4175.30838@psf.upfronthosting.co.za> I reviewed the version 3 of the patch. The changes look good to me. It can be committed. http://bugs.python.org/review/27455/ From hogne.haug at vegvesen.no Fri Jul 8 09:30:16 2016 From: hogne.haug at vegvesen.no (Haug Hogne) Date: Fri, 8 Jul 2016 13:30:16 +0000 Subject: [docs] ePUB Python 3 docs Message-ID: <63898e898b444814b58765996e961ea0@SVVPECMB01B.vegvesen.no> Hi! Just for your information. I'm sorry I have misunderstood anything, but it seems the Python 3.5.2 ePUB documentation linked to from https://docs.python.org/3/download.html is a zip containing the HTML documentation? Yours sincerely, Hogne Haug -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sun Jul 10 13:55:29 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 10 Jul 2016 17:55:29 +0000 Subject: [docs] [issue26020] set_display evaluation order doesn't match documented behaviour In-Reply-To: <1452048141.82.0.22346371212.issue26020@psf.upfronthosting.co.za> Message-ID: <1468173329.29.0.617771923343.issue26020@psf.upfronthosting.co.za> R. David Murray added the comment: Ping. (Raymond, if you are OK with someone else committing this, you could un-assign it.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 10 14:01:13 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 10 Jul 2016 18:01:13 +0000 Subject: [docs] [issue26176] EmailMessage example doesn't work In-Reply-To: <1453427916.73.0.91814079944.issue26176@psf.upfronthosting.co.za> Message-ID: <20160710180108.19895.19241.B97EF655@psf.io> Roundup Robot added the comment: New changeset 1530fd9a7089 by R David Murray in branch '3.5': #26176: fix usage of Address constructor in email examples. https://hg.python.org/cpython/rev/1530fd9a7089 New changeset a9c11fecd83b by R David Murray in branch 'default': Merge: #26176: fix usage of Address constructor in email examples. https://hg.python.org/cpython/rev/a9c11fecd83b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 10 14:02:35 2016 From: report at bugs.python.org (R. David Murray) Date: Sun, 10 Jul 2016 18:02:35 +0000 Subject: [docs] [issue26176] EmailMessage example doesn't work In-Reply-To: <1453427916.73.0.91814079944.issue26176@psf.upfronthosting.co.za> Message-ID: <1468173755.85.0.418945552383.issue26176@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Nathan. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 10 16:39:17 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 10 Jul 2016 20:39:17 +0000 Subject: [docs] [issue26020] set_display evaluation order doesn't match documented behaviour In-Reply-To: <1452048141.82.0.22346371212.issue26020@psf.upfronthosting.co.za> Message-ID: <1468183157.68.0.00743522624935.issue26020@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I've got it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 10 20:33:49 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 11 Jul 2016 00:33:49 +0000 Subject: [docs] [issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv` In-Reply-To: <1465544944.16.0.549761687921.issue27285@psf.upfronthosting.co.za> Message-ID: <1468197229.05.0.575176922122.issue27285@psf.upfronthosting.co.za> Martin Panter added the comment: Buildbot has errors and warnings: http://buildbot.python.org/all/builders/Docs%203.x/builds/1729/steps/suspicious/logs/stdio make -C Doc/ suspicious . . . writing output... [ 83%] library/venv WARNING: [library/venv:353] ":param" found in " :param context: The information for the virtual environment" . . . /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.3.rst:110: WARNING: undefined label: scripts-pyvenv (if the link has no caption the label must precede a section header) /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:200: WARNING: undefined label: scripts-pyvenv (if the link has no caption the label must precede a section header) /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:1992: WARNING: undefined label: scripts-pyvenv (if the link has no caption the label must precede a section header) /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:1996: WARNING: undefined label: scripts-pyvenv (if the link has no caption the label must precede a section header) /buildbot/buildarea/3.x.ware-docs/build/Doc/whatsnew/3.4.rst:2462: WARNING: undefined label: scripts-pyvenv (if the link has no caption the label must precede a section header) WARNING: Found 2/299 unused rules: library/venv,,:param,:param context: The information for the environment creation request tutorial/venv,,:c7b9645a6f35,Python 3.4.3+ (3.4:c7b9645a6f35+, May 22 2015, 09:31:25) . . . Suspicious check complete; look for any errors in the above output or in build/suspicious/suspicious.csv. If all issues are false positives, append that file to tools/susp-ignored.csv. Looks like Doc/tools/susp-ignored.csv and the whatsnew files need adjusting. ---------- nosy: +martin.panter status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 10 21:22:27 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 11 Jul 2016 01:22:27 +0000 Subject: [docs] [issue10697] host and port attributes not documented well in function urllib.parse.urlparse and urlsplit In-Reply-To: <1292271440.42.0.107945784803.issue10697@psf.upfronthosting.co.za> Message-ID: <1468200147.4.0.301425162266.issue10697@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 10 21:30:47 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 11 Jul 2016 01:30:47 +0000 Subject: [docs] [issue27464] Document that SplitResult & friends are namedtuples In-Reply-To: <1467934956.52.0.328129985005.issue27464@psf.upfronthosting.co.za> Message-ID: <1468200647.36.0.583853727452.issue27464@psf.upfronthosting.co.za> Martin Panter added the comment: I agree, SplitResult._replace() would probably have been very useful to me in the past if it were available (and guaranteed by the documentation). The namedtuple implementation was added in revision 79579fa8d752 (in 2.6 and 3.0), with a comment mentioning speeding up and simplifying the code. So it may not have originally been intended to have the namedtuple functionality as part of the API. If the change is made in 3.5, it should equally be made in 2.7 (with a notice about only being supported since 2.6). ---------- nosy: +martin.panter, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 00:07:22 2016 From: report at bugs.python.org (Steve Piercy) Date: Mon, 11 Jul 2016 04:07:22 +0000 Subject: [docs] [issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv` In-Reply-To: <1465544944.16.0.549761687921.issue27285@psf.upfronthosting.co.za> Message-ID: <1468210039.71.0.34995007741.issue27285@psf.upfronthosting.co.za> Steve Piercy added the comment: I've attached a patch for the buildbot error at [library/venv:353]. However, as noted in my [second bullet point](http://bugs.python.org/issue27285#msg269649): - I removed the file Doc/using/scripts.rst because it became obsolete. This caused warnings in Doc/whatsnew/3.3.rst and Doc/whatsnew/3.4.rst which reference the obsolete file. I couldn't find a policy that addresses what to do in this situation, so I left it to the council of elders to provide me with their sage guidance. I'll submit a patch as soon as I know which path to follow. ---------- Added file: http://bugs.python.org/file43681/pyvenv-to-venv.update-susp-ignored.csv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 04:55:36 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 11 Jul 2016 08:55:36 +0000 Subject: [docs] [issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character" Message-ID: <1468227336.42.0.208326485001.issue27481@psf.upfronthosting.co.za> New submission from Xiang Zhang: Errors regarding "embedded NUL character" were changed from TypeError to ValueError, in r92365, issue22215, but the doc doesn't get updated. Add a patch to apply the change in doc. ---------- assignee: docs at python components: Documentation files: null_characters_doc.patch keywords: patch messages: 270164 nosy: docs at python, serhiy.storchaka, xiang.zhang priority: normal severity: normal status: open title: Replace TypeError with ValueError in doc regarding "embedded NUL character" versions: Python 3.6 Added file: http://bugs.python.org/file43685/null_characters_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 05:18:05 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 11 Jul 2016 09:18:05 +0000 Subject: [docs] [issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character" In-Reply-To: <1468227336.42.0.208326485001.issue27481@psf.upfronthosting.co.za> Message-ID: <1468228685.05.0.595734482856.issue27481@psf.upfronthosting.co.za> Xiang Zhang added the comment: Just for a note, there has already been an issue26401 fixing the function.rst. Upload a new patch adding versionchanged tag. ---------- Added file: http://bugs.python.org/file43686/null_characters_doc_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 05:57:19 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 Jul 2016 09:57:19 +0000 Subject: [docs] [issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character" In-Reply-To: <1468227336.42.0.208326485001.issue27481@psf.upfronthosting.co.za> Message-ID: <1468231039.44.0.809585553963.issue27481@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. But while we are here, it would be worth to change "NUL character" and "NUL byte" to "null character" or "null byte" as most used in the documentation and the code. ---------- assignee: docs at python -> serhiy.storchaka stage: -> commit review versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 06:08:48 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 11 Jul 2016 10:08:48 +0000 Subject: [docs] [issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character" In-Reply-To: <1468227336.42.0.208326485001.issue27481@psf.upfronthosting.co.za> Message-ID: <1468231728.1.0.972970487604.issue27481@psf.upfronthosting.co.za> Xiang Zhang added the comment: Yes. I noticed the change but didn't change it. Now add it. ---------- Added file: http://bugs.python.org/file43689/null_characters_doc_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 06:12:41 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 11 Jul 2016 10:12:41 +0000 Subject: [docs] [issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character" In-Reply-To: <1468227336.42.0.208326485001.issue27481@psf.upfronthosting.co.za> Message-ID: <1468231961.82.0.820317507295.issue27481@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Python strings contain characters, not bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 06:18:25 2016 From: report at bugs.python.org (Xiang Zhang) Date: Mon, 11 Jul 2016 10:18:25 +0000 Subject: [docs] [issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character" In-Reply-To: <1468227336.42.0.208326485001.issue27481@psf.upfronthosting.co.za> Message-ID: <1468232305.09.0.214353843374.issue27481@psf.upfronthosting.co.za> Xiang Zhang added the comment: Sorry, I didn't notice the difference. ---------- Added file: http://bugs.python.org/file43690/null_characters_doc_v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 09:20:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 11 Jul 2016 13:20:56 +0000 Subject: [docs] [issue25523] Correct "a" article to "an" article In-Reply-To: <1446294729.19.0.0593417180133.issue25523@psf.upfronthosting.co.za> Message-ID: <20160711132049.17323.60416.F2407648@psf.io> Roundup Robot added the comment: New changeset 651f7addf4a8 by Martin Panter in branch '2.7': Issue #25523: Correct "a" article to "an" article https://hg.python.org/cpython/rev/651f7addf4a8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 09:36:22 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 11 Jul 2016 13:36:22 +0000 Subject: [docs] [issue25523] Correct "a" article to "an" article In-Reply-To: <1446294729.19.0.0593417180133.issue25523@psf.upfronthosting.co.za> Message-ID: <1468244182.59.0.00167797316309.issue25523@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 12:56:56 2016 From: report at bugs.python.org (Rufus V. Smith) Date: Mon, 11 Jul 2016 16:56:56 +0000 Subject: [docs] [issue27484] Some Examples in Format String Syntax are incorrect or poorly worded Message-ID: <1468256216.77.0.446527786917.issue27484@psf.upfronthosting.co.za> New submission from Rufus V. Smith: In section 6.1.3 Format String Syntax, some examples have incorrect or poorly worded comments: Original: "Harold's a clever {0!s}" # Calls str() on the argument first "Bring out the holy {name!r}" # Calls repr() on the argument first "More {!a}" # Calls ascii() on the argument first Suggested Changes: "Harold's a clever {0!s}" # Calls str() on first positional argument "Bring out the holy {name!r}" # Calls repr() on the named argument 'name' "More {!a}" # Calls ascii() on first positional argument (v. 3.1 and later) ---------- assignee: docs at python components: Documentation messages: 270189 nosy: RufusVS, docs at python priority: normal severity: normal status: open title: Some Examples in Format String Syntax are incorrect or poorly worded _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 14:07:32 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 11 Jul 2016 18:07:32 +0000 Subject: [docs] [issue27464] Document that SplitResult & friends are namedtuples In-Reply-To: <1467934956.52.0.328129985005.issue27464@psf.upfronthosting.co.za> Message-ID: <1468260452.53.0.0533101522563.issue27464@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 14:10:42 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 11 Jul 2016 18:10:42 +0000 Subject: [docs] [issue27484] Some Examples in Format String Syntax are incorrect or poorly worded In-Reply-To: <1468256216.77.0.446527786917.issue27484@psf.upfronthosting.co.za> Message-ID: <1468260642.45.0.0477478332119.issue27484@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think all of these read fine as-is though I would change "argument first" to "first argument" or just "argument". Adding the word "positional" is a distractor from what the comments are trying to communicate. The version numbering is normally done with a directive and outside of the examples. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 14:23:44 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 11 Jul 2016 18:23:44 +0000 Subject: [docs] [issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv` In-Reply-To: <1465544944.16.0.549761687921.issue27285@psf.upfronthosting.co.za> Message-ID: <20160711182339.29055.82345.DFCFCC92@psf.io> Roundup Robot added the comment: New changeset 2a34cef7681b by Ned Deily in branch 'default': Issue #27285: Cleanup "suspicious" warnings. https://hg.python.org/cpython/rev/2a34cef7681b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 14:28:32 2016 From: report at bugs.python.org (Ned Deily) Date: Mon, 11 Jul 2016 18:28:32 +0000 Subject: [docs] [issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv` In-Reply-To: <1465544944.16.0.549761687921.issue27285@psf.upfronthosting.co.za> Message-ID: <1468261712.01.0.390502152525.issue27285@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the fix up, Steve. For 3.6.0a3, I chose to just change the 3.3 and 3.4 whatsnew references to just in-line code without any links. If anyone wants something fancier, please feel free to expand on it (after the release). (BTW, Steve, when you submit an updated patch, please do so against the current tip of the branch; most of your update patch had already been committed by Brett.) ---------- nosy: +ned.deily status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 14:29:31 2016 From: report at bugs.python.org (Zachary Ware) Date: Mon, 11 Jul 2016 18:29:31 +0000 Subject: [docs] [issue27484] Some Examples in Format String Syntax are incorrect or poorly worded In-Reply-To: <1468256216.77.0.446527786917.issue27484@psf.upfronthosting.co.za> Message-ID: <1468261771.24.0.977117792288.issue27484@psf.upfronthosting.co.za> Zachary Ware added the comment: I don't think "argument first" should be changed to "first argument": the point is that the converter is called on the argument before it's formatted into the string, the call is done "first". ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 16:18:35 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 11 Jul 2016 20:18:35 +0000 Subject: [docs] [issue27484] Some Examples in Format String Syntax are incorrect or poorly worded In-Reply-To: <1468256216.77.0.446527786917.issue27484@psf.upfronthosting.co.za> Message-ID: <1468268315.33.0.459489620518.issue27484@psf.upfronthosting.co.za> R. David Murray added the comment: Agree with Zach. The example comments are correct as written, especially when considered in the context of the preceding example. ---------- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 18:06:12 2016 From: report at bugs.python.org (Brad Larsen) Date: Mon, 11 Jul 2016 22:06:12 +0000 Subject: [docs] [issue13402] Document absoluteness of sys.executable In-Reply-To: <1321289437.84.0.982753479785.issue13402@psf.upfronthosting.co.za> Message-ID: <1468274772.28.0.198358413257.issue13402@psf.upfronthosting.co.za> Brad Larsen added the comment: It looks like sys.executable is *not* always an absolute path. In Python 2.7: $ which python2.7 /opt/local/bin/python2.7 $ cd /opt/local/bin $ ../bin/python2.7 -m 'import sys; print(sys.executable)' /opt/local/bin/../bin/python2.7 Also in Python 3.5: $ which python3.5 /opt/local/bin/python3.5 $ cd /opt/local/bin $ ../bin/python3.5 -m 'import sys; print(sys.executable)' /opt/local/bin/../bin/python3.5 ---------- nosy: +blarsen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 20:31:53 2016 From: report at bugs.python.org (ahxxm) Date: Tue, 12 Jul 2016 00:31:53 +0000 Subject: [docs] [issue26608] RLock undocumented behavior in case of multiple acquire In-Reply-To: <1458629798.26.0.210968234517.issue26608@psf.upfronthosting.co.za> Message-ID: <1468283513.1.0.736732750909.issue26608@psf.upfronthosting.co.za> ahxxm added the comment: As seen from commit log, all return type are double back-quoted, this could be a rendering error. I think this commit somehow makes it clear that RLock is a thread-level reentrant lock, some code example of suggested usage might be helpful though. ---------- hgrepos: +348 nosy: +ahxxm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 20:35:28 2016 From: report at bugs.python.org (Eryk Sun) Date: Tue, 12 Jul 2016 00:35:28 +0000 Subject: [docs] [issue13402] Document absoluteness of sys.executable In-Reply-To: <1321289437.84.0.982753479785.issue13402@psf.upfronthosting.co.za> Message-ID: <1468283728.32.0.260476402825.issue13402@psf.upfronthosting.co.za> Eryk Sun added the comment: "/opt/local/bin/../bin/python2.7" is an absolute path. >>> os.path.isabs('/opt/local/bin/../bin/python2.7') True It's not relative to the working directory. ---------- nosy: +eryksun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 22:39:28 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 12 Jul 2016 02:39:28 +0000 Subject: [docs] [issue13402] Document absoluteness of sys.executable In-Reply-To: <1321289437.84.0.982753479785.issue13402@psf.upfronthosting.co.za> Message-ID: <1468291168.33.0.0513988842836.issue13402@psf.upfronthosting.co.za> Ned Deily added the comment: @blarsen, and there's something strange about your example. '-m' won't work with a real python executable, presumably you meant '-c'. And judging from the paths involved, I'm guessing you are using MacPorts on OS X. With either MacPorts or any other OS X framework build, you wouldn't see results like that with -c. ../bin/python3.5 -c 'import sys; print(sys.executable)' /opt/local/bin/python3.5 ../bin/python2.7 -c 'import sys; print(sys.executable)' /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python So I'm guessing what's in ../bin/python3.7 and ../bin/python3.5 is something other than the normal python bootstrap binaries. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 22:59:08 2016 From: report at bugs.python.org (Brad Larsen) Date: Tue, 12 Jul 2016 02:59:08 +0000 Subject: [docs] [issue13402] Document absoluteness of sys.executable In-Reply-To: <1321289437.84.0.982753479785.issue13402@psf.upfronthosting.co.za> Message-ID: <1468292348.31.0.449927782551.issue13402@psf.upfronthosting.co.za> Brad Larsen added the comment: @eryksun, you are right! The output *is* an absolute path as far as `os.path.isabs` is concerned. @ned.deily, you are right about my example --- I transcribed it wrong, and it should be `-c`. The system in question is not a Mac OS system, but a Linux system with newer Python versions than what come with the system installed to /opt/local. These are compiled from source, but without any modifications. I'm commenting here because I'm seeing the `test_sys` test from the regression suite fail in a slightly modified version of Python that ships with a product. In particular, in Lib/test/test_sys.py around line 640, we have this: @unittest.skipIf(sys.base_prefix != sys.prefix, 'Test is not venv-compatible') def test_executable(self): # sys.executable should be absolute self.assertEqual(os.path.abspath(sys.executable), sys.executable) Yes, /opt/local/bin/../bin/python3.5 is an absolute path as far as `os.path.isabs` is concerned, but `os.path.abspath('/opt/local/bin/../bin/python3.5')` gives '/opt/local/bin/python3.5', and the test fails. So maybe the documentation is fine but the test is wrong? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 11 23:05:43 2016 From: report at bugs.python.org (Ned Deily) Date: Tue, 12 Jul 2016 03:05:43 +0000 Subject: [docs] [issue13402] Document absoluteness of sys.executable In-Reply-To: <1321289437.84.0.982753479785.issue13402@psf.upfronthosting.co.za> Message-ID: <1468292743.84.0.398927952947.issue13402@psf.upfronthosting.co.za> Ned Deily added the comment: @blarsen, OK, but if you want to pursue this, please open a new issue against the current versions. This issue was closed years ago and against earlier versions so your comments will not get acted on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 02:11:31 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 12 Jul 2016 06:11:31 +0000 Subject: [docs] [issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character" In-Reply-To: <1468227336.42.0.208326485001.issue27481@psf.upfronthosting.co.za> Message-ID: <1468303891.68.0.408732040324.issue27481@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Thanks Xiang. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 02:15:33 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 12 Jul 2016 06:15:33 +0000 Subject: [docs] [issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character" In-Reply-To: <1468227336.42.0.208326485001.issue27481@psf.upfronthosting.co.za> Message-ID: <20160712061530.31564.92941.5973B540@psf.io> Roundup Robot added the comment: New changeset 420030a5e854 by Serhiy Storchaka in branch '3.5': Issue #27481: Docummented that ValueError is now raised instead of TypeError https://hg.python.org/cpython/rev/420030a5e854 New changeset 00b9c734af87 by Serhiy Storchaka in branch 'default': Issue #27481: Docummented that ValueError is now raised instead of TypeError https://hg.python.org/cpython/rev/00b9c734af87 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 02:16:14 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 12 Jul 2016 06:16:14 +0000 Subject: [docs] [issue27481] Replace TypeError with ValueError in doc regarding "embedded NUL character" In-Reply-To: <1468227336.42.0.208326485001.issue27481@psf.upfronthosting.co.za> Message-ID: <1468304174.13.0.510598155096.issue27481@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 13:38:39 2016 From: report at bugs.python.org (Steve Piercy) Date: Tue, 12 Jul 2016 17:38:39 +0000 Subject: [docs] [issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv` In-Reply-To: <1465544944.16.0.549761687921.issue27285@psf.upfronthosting.co.za> Message-ID: <1468345119.17.0.419267194696.issue27285@psf.upfronthosting.co.za> Steve Piercy added the comment: Thanks, Ned. This was my first hg patch. I'm learning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 18:12:00 2016 From: report at bugs.python.org (STINNER Victor) Date: Tue, 12 Jul 2016 22:12:00 +0000 Subject: [docs] [issue27180] Doc/pathlib: Please describe the behaviour of Path().rename() is depends on the platform (same as os.rename()) In-Reply-To: <1464866299.22.0.549959469595.issue27180@psf.upfronthosting.co.za> Message-ID: <1468361519.83.0.659927776913.issue27180@psf.upfronthosting.co.za> STINNER Victor added the comment: patch27180. LGTM. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 20:40:21 2016 From: report at bugs.python.org (Mitchell Model) Date: Wed, 13 Jul 2016 00:40:21 +0000 Subject: [docs] [issue27504] Missing assertion methods in unittest documentation Message-ID: <1468370421.07.0.622363937754.issue27504@psf.upfronthosting.co.za> New submission from Mitchell Model: In looking at the source for unittest.TestCase I was very surprised to see quite a few assertion methods that are not included in the module documentation. Every available assertion method should be included in the library documentation. Users should not have to look at the source to see what's available ? in fact, why would it even occur to the typical user to do that? Also, I think the phrase "provides several assert methods to check for and report failures" is an understatement ? it provides MANY assert methods. I think "assertion method" is a better term than "assert method". ---------- assignee: docs at python components: Documentation messages: 270278 nosy: MLModel, docs at python priority: normal severity: normal status: open title: Missing assertion methods in unittest documentation type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 20:47:07 2016 From: report at bugs.python.org (Ned Deily) Date: Wed, 13 Jul 2016 00:47:07 +0000 Subject: [docs] [issue27504] Missing assertion methods in unittest documentation In-Reply-To: <1468370421.07.0.622363937754.issue27504@psf.upfronthosting.co.za> Message-ID: <1468370827.38.0.837291544122.issue27504@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ezio.melotti, michael.foord, rbcollins versions: +Python 3.6 -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 21:15:26 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 13 Jul 2016 01:15:26 +0000 Subject: [docs] [issue27504] Missing assertion methods in unittest documentation In-Reply-To: <1468370421.07.0.622363937754.issue27504@psf.upfronthosting.co.za> Message-ID: <1468372526.28.0.259522485422.issue27504@psf.upfronthosting.co.za> R. David Murray added the comment: If you are looking at the source, you can look at the source. If you are looking at the documentation, we believe they are all documented. If you use pydoc/help, they are all documented. I can't find the phrase you cite, but 'assert methods' is correct: all of the method names start with the word 'assert'. If there are specific methods you think are *not* in the library reference that you think should be, please give examples. I suspect they will turn out to be internal helper functions. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 21:32:02 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 13 Jul 2016 01:32:02 +0000 Subject: [docs] [issue27505] Missing documentation for setting module __class__ attribute Message-ID: <1468373521.97.0.915242819681.issue27505@psf.upfronthosting.co.za> New submission from Nick Coghlan: Python 3.5 added the ability to set module __class__ attributes by way of http://bugs.python.org/issue22986 However, this isn't covered in the What's New guide or anywhere else in the documentation, and even in the NEWS file it appears under the cryptic title "Issue #22986: Allow changing an object?s __class__ between a dynamic type and static type in some cases." for 3.5.0a1 This should be documented somewhere (perhaps in the data model section of the language reference?) and an example given of using the feature to emit DeprecationWarning for access to a particular module level attribute. It should also be mentioned in the Python 3.5 What's New documentation. ---------- assignee: docs at python components: Documentation messages: 270285 nosy: docs at python, ncoghlan, njs priority: normal severity: normal stage: needs patch status: open title: Missing documentation for setting module __class__ attribute type: enhancement versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 21:32:13 2016 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 13 Jul 2016 01:32:13 +0000 Subject: [docs] [issue27505] Missing documentation for setting module __class__ attribute In-Reply-To: <1468373521.97.0.915242819681.issue27505@psf.upfronthosting.co.za> Message-ID: <1468373533.74.0.938363623513.issue27505@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- dependencies: +Improved handling of __class__ assignment _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 22:13:26 2016 From: report at bugs.python.org (Mitchell Model) Date: Wed, 13 Jul 2016 02:13:26 +0000 Subject: [docs] [issue27504] Missing assertion methods in unittest documentation In-Reply-To: <1468372526.28.0.259522485422.issue27504@psf.upfronthosting.co.za> Message-ID: <10F6A097-592C-4112-9527-E14E867BDB99@software-concepts.org> Mitchell Model added the comment: My strong apology. I missed a section of the documentation. It didn't seem possible that they weren't there, but I made a mistake when I checked for them. Sorry. > On Jul 12, 2016, at 9:15 PM, R. David Murray wrote: > > > R. David Murray added the comment: > > If you are looking at the source, you can look at the source. If you are looking at the documentation, we believe they are all documented. If you use pydoc/help, they are all documented. > > I can't find the phrase you cite, but 'assert methods' is correct: all of the method names start with the word 'assert'. > > If there are specific methods you think are *not* in the library reference that you think should be, please give examples. I suspect they will turn out to be internal helper functions. > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 12 22:50:12 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 13 Jul 2016 02:50:12 +0000 Subject: [docs] [issue27504] Missing assertion methods in unittest documentation In-Reply-To: <1468370421.07.0.622363937754.issue27504@psf.upfronthosting.co.za> Message-ID: <1468378212.55.0.0064420810693.issue27504@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 13 00:22:01 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 13 Jul 2016 04:22:01 +0000 Subject: [docs] [issue25393] 'resource' module documentation error In-Reply-To: <1444746542.39.0.814536865396.issue25393@psf.upfronthosting.co.za> Message-ID: <1468383721.62.0.0369159299848.issue25393@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +easy nosy: +berker.peksag stage: -> needs patch type: enhancement -> behavior versions: +Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 13 01:23:27 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 13 Jul 2016 05:23:27 +0000 Subject: [docs] [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1468387407.24.0.488495970723.issue10225@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +andymaier, belopolsky, docs at python, eric.araujo, ezio.melotti, georg.brandl, lukasz.langa, rhettinger, terry.reedy -lissacoffeyx _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 13 01:23:46 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 13 Jul 2016 05:23:46 +0000 Subject: [docs] [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1468387426.8.0.617301177134.issue10225@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- Removed message: http://bugs.python.org/msg270297 _______________________________________ Python tracker _______________________________________ From jacko21 at aliceadsl.fr Mon Jul 11 16:26:12 2016 From: jacko21 at aliceadsl.fr (Jacques) Date: Mon, 11 Jul 2016 22:26:12 +0200 Subject: [docs] Fwd: Python documentation : some points requiring attention v.3.5.1 In-Reply-To: <56DDA43C.2000500@aliceadsl.fr> References: <56DDA43C.2000500@aliceadsl.fr> Message-ID: <88b82565-a34f-1492-497b-b032c9c73d8a@aliceadsl.fr> Dear Python doc master, I had the pleasure to send you the following message in March, with the attached file, including some remarks about the Python 3.5 documentation. Without receiving any reply since this time, I think this message vanished into the web for any reason. Thus, I take the liberty of sending it again. Thank you for your attention. With best regards. Jacques Ducasse -------- Message transf?r? -------- Sujet : Python documentation : some points requiring attention v.3.5.1 Date : Mon, 7 Mar 2016 16:54:36 +0100 De : Jacques Pour : docs at python.org Hello, First, I want to thank you again for the useful and clear documentation of Python. Beeing a fanatic reader of it, sometimes I encounter some mistake (or it seems to me it is such). If this could bring some help, you will find in the attached file a list of points requiring attention. Some of them are only grammatical typos, the others are more interesting (I hope!). All the comments concern the official standard documentation of Python 3.5.1. With best regards. Jacques Ducasse FRANCE -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PythonDocErreurs160307.pdf Type: application/pdf Size: 73431 bytes Desc: not available URL: From report at bugs.python.org Wed Jul 13 08:11:57 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 13 Jul 2016 12:11:57 +0000 Subject: [docs] [issue27504] Missing assertion methods in unittest documentation In-Reply-To: <1468370421.07.0.622363937754.issue27504@psf.upfronthosting.co.za> Message-ID: <1468411917.62.0.635090291002.issue27504@psf.upfronthosting.co.za> R. David Murray added the comment: No problem. Personally I'd like to see a table of all of them at the top; however, that wasn't the decision that was made in issue 9796 when the tables were added. ---------- _______________________________________ Python tracker _______________________________________ From berker.peksag at gmail.com Wed Jul 13 08:27:14 2016 From: berker.peksag at gmail.com (=?UTF-8?Q?Berker_Peksa=C4=9F?=) Date: Wed, 13 Jul 2016 15:27:14 +0300 Subject: [docs] Fwd: Python documentation : some points requiring attention v.3.5.1 In-Reply-To: <88b82565-a34f-1492-497b-b032c9c73d8a@aliceadsl.fr> References: <56DDA43C.2000500@aliceadsl.fr> <88b82565-a34f-1492-497b-b032c9c73d8a@aliceadsl.fr> Message-ID: On Mon, Jul 11, 2016 at 11:26 PM, Jacques wrote: > > Dear Python doc master, > > I had the pleasure to send you the following message in March, with the attached file, including some remarks about the Python 3.5 documentation. > Without receiving any reply since this time, I think this message vanished into the web for any reason. > Thus, I take the liberty of sending it again. > Thank you for your attention. Hi Jacques, Thank you for your detailed report! Some of the issues you've reported have already been fixed (see https://bugs.python.org/issue27113 for documenting check_same_thread for example). I will try to take a look at the rest this weekend. --Berker From report at bugs.python.org Wed Jul 13 15:32:53 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 13 Jul 2016 19:32:53 +0000 Subject: [docs] [issue27508] process thread with implicit join is killed unexpectedly In-Reply-To: <1468430448.11.0.0781111425971.issue27508@psf.upfronthosting.co.za> Message-ID: <1468438373.57.0.699070207808.issue27508@psf.upfronthosting.co.za> R. David Murray added the comment: On my gentoo system it prints hi four times in 2.7, and 3.2 through 3.6. I suspect multiprocessing is killing threads, daemon or not, when the main process thread ends. I expect that's a feature, although I didn't find it documented. Ah, found the explanation: issue 18966. Antoine indicates this could indeed be considered a bug but is part of a larger issue. If we aren't going to fix it, we should probably document it. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, r.david.murray versions: +Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 13 15:58:10 2016 From: report at bugs.python.org (Tim Peters) Date: Wed, 13 Jul 2016 19:58:10 +0000 Subject: [docs] [issue27508] process thread with implicit join is killed unexpectedly In-Reply-To: <1468430448.11.0.0781111425971.issue27508@psf.upfronthosting.co.za> Message-ID: <1468439890.08.0.716156565291.issue27508@psf.upfronthosting.co.za> Tim Peters added the comment: Ah - good catch! I'm closing this as a duplicate of bug18966. The real mystery now is why the threads _don't_ terminate early under Windows 3.5.2 - heh. ---------- resolution: -> duplicate status: open -> closed superseder: -> Threads within multiprocessing Process terminate early _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 13 19:11:58 2016 From: report at bugs.python.org (John Hagen) Date: Wed, 13 Jul 2016 23:11:58 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1468451518.23.0.477439867274.issue27455@psf.upfronthosting.co.za> John Hagen added the comment: The patch was reviewed and marked ready to commit. Could someone with commit privileges perform the final commit? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 14 00:32:56 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 14 Jul 2016 04:32:56 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <20160714043252.9468.67821.E7C0DCC0@psf.io> Roundup Robot added the comment: New changeset 453a88a41a58 by Berker Peksag in branch '3.5': Issue #27455: Improve examples in tkinter documentation https://hg.python.org/cpython/rev/453a88a41a58 New changeset 800c069e16a0 by Berker Peksag in branch 'default': Issue #27455: Merge from 3.5 https://hg.python.org/cpython/rev/800c069e16a0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 14 00:35:15 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 14 Jul 2016 04:35:15 +0000 Subject: [docs] [issue27455] Fix tkinter examples to be PEP8 compliant In-Reply-To: <1467724852.16.0.852334218439.issue27455@psf.upfronthosting.co.za> Message-ID: <1468470915.62.0.825520815928.issue27455@psf.upfronthosting.co.za> Berker Peksag added the comment: Since Terry is already busy with IDLE maintenance, I went ahead and commit the patch with minor modifications. Thanks for the patch, John! :) ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 14 00:45:03 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 14 Jul 2016 04:45:03 +0000 Subject: [docs] [issue27180] Doc/pathlib: Please describe the behaviour of Path().rename() is depends on the platform (same as os.rename()) In-Reply-To: <1464866299.22.0.549959469595.issue27180@psf.upfronthosting.co.za> Message-ID: <20160714044500.124674.46409.EAF5583A@psf.io> Roundup Robot added the comment: New changeset 270fd4493195 by Berker Peksag in branch '3.5': Issue #27180: Clarify Path.rename() behavior on Unix systems https://hg.python.org/cpython/rev/270fd4493195 New changeset 89821243621b by Berker Peksag in branch 'default': Issue #27180: Merge from 3.5 https://hg.python.org/cpython/rev/89821243621b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 14 00:45:56 2016 From: report at bugs.python.org (Berker Peksag) Date: Thu, 14 Jul 2016 04:45:56 +0000 Subject: [docs] [issue27180] Doc/pathlib: Please describe the behaviour of Path().rename() is depends on the platform (same as os.rename()) In-Reply-To: <1464866299.22.0.549959469595.issue27180@psf.upfronthosting.co.za> Message-ID: <1468471556.77.0.726761915577.issue27180@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 14 01:54:37 2016 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 14 Jul 2016 05:54:37 +0000 Subject: [docs] [issue10697] host and port attributes not documented well in function urllib.parse.urlparse and urlsplit In-Reply-To: <1292271440.42.0.107945784803.issue10697@psf.upfronthosting.co.za> Message-ID: <1468475677.22.0.523276388779.issue10697@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I am unsure of the change too. I am willing to close this report as .port attribute is already documented. ---------- resolution: -> not a bug stage: needs patch -> resolved status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 14 12:49:37 2016 From: report at bugs.python.org (Jaysinh shukla) Date: Thu, 14 Jul 2016 16:49:37 +0000 Subject: [docs] [issue20842] pkgutil docs should reference glossary terms not PEP 302 In-Reply-To: <1393846400.67.0.723549613222.issue20842@psf.upfronthosting.co.za> Message-ID: <1468514976.92.0.949205375082.issue20842@psf.upfronthosting.co.za> Jaysinh shukla added the comment: Adding updated patch after merging Issue 26896. Requesting to review. Thanks! ---------- Added file: http://bugs.python.org/file43721/issue20842_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 14 15:36:44 2016 From: report at bugs.python.org (Alakshendra Yadav) Date: Thu, 14 Jul 2016 19:36:44 +0000 Subject: [docs] [issue25393] 'resource' module documentation error In-Reply-To: <1444746542.39.0.814536865396.issue25393@psf.upfronthosting.co.za> Message-ID: <1468525004.89.0.475139729321.issue25393@psf.upfronthosting.co.za> Alakshendra Yadav added the comment: It does seem that the mentioned line belongs under RLIMIT_STACK instead of RLIMIT_FSIZE. I am submitting a patch. ---------- keywords: +patch nosy: +Alakshendra Yadav Added file: http://bugs.python.org/file43724/resource.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 06:39:07 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 15 Jul 2016 10:39:07 +0000 Subject: [docs] [issue27518] small typo error in Grammar/Grammar Message-ID: <1468579147.6.0.884332252172.issue27518@psf.upfronthosting.co.za> New submission from St?phane Wirtel: Here is a small patch for the Grammar/Grammar file, there is a typo in the comments. ---------- assignee: docs at python components: Documentation files: Grammar.diff keywords: patch messages: 270475 nosy: docs at python, matrixise priority: normal severity: normal status: open title: small typo error in Grammar/Grammar versions: Python 3.6 Added file: http://bugs.python.org/file43730/Grammar.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 07:12:37 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 15 Jul 2016 11:12:37 +0000 Subject: [docs] [issue27519] update the references to http://mercurial.selenic.com Message-ID: <1468581157.12.0.317486616514.issue27519@psf.upfronthosting.co.za> New submission from St?phane Wirtel: In the devguide, there are some references to http://mercurial.selenic.com/wiki/ but the website has been migrated to http://mercurial-scm.org/wiki/ ---------- assignee: docs at python components: Documentation messages: 270476 nosy: docs at python, matrixise priority: normal severity: normal status: open title: update the references to http://mercurial.selenic.com versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 07:24:34 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 15 Jul 2016 11:24:34 +0000 Subject: [docs] [issue27519] update the references to http://mercurial.selenic.com In-Reply-To: <1468581157.12.0.317486616514.issue27519@psf.upfronthosting.co.za> Message-ID: <1468581874.86.0.855567202005.issue27519@psf.upfronthosting.co.za> St?phane Wirtel added the comment: I just updated to the new url of the Mercurial Wiki for the devguide. ---------- components: +Devguide -Documentation keywords: +patch nosy: +ezio.melotti, willingc versions: +Python 3.5 Added file: http://bugs.python.org/file43731/issue27519.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 09:12:40 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Jul 2016 13:12:40 +0000 Subject: [docs] [issue27518] small typo error in Grammar/Grammar In-Reply-To: <1468579147.6.0.884332252172.issue27518@psf.upfronthosting.co.za> Message-ID: <20160715131235.62863.2529.9A34A0E3@psf.io> Roundup Robot added the comment: New changeset db5a5679a9de by Berker Peksag in branch '3.5': Issue #27518: Fix typo in Grammar/Grammar https://hg.python.org/cpython/rev/db5a5679a9de New changeset bae0d7389e96 by Berker Peksag in branch 'default': Issue #27518: Merge from 3.5 https://hg.python.org/cpython/rev/bae0d7389e96 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 09:13:42 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 15 Jul 2016 13:13:42 +0000 Subject: [docs] [issue27518] small typo error in Grammar/Grammar In-Reply-To: <1468579147.6.0.884332252172.issue27518@psf.upfronthosting.co.za> Message-ID: <1468588422.83.0.302447586391.issue27518@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks, St?phane. ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 09:18:37 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Jul 2016 13:18:37 +0000 Subject: [docs] [issue27519] update the references to http://mercurial.selenic.com In-Reply-To: <1468581157.12.0.317486616514.issue27519@psf.upfronthosting.co.za> Message-ID: <20160715131824.19036.75873.37AD2E8E@psf.io> Roundup Robot added the comment: New changeset 2edae149e8c5 by Berker Peksag in branch 'default': Issue #27519: Update Mercurial links to mercurial-scm.org https://hg.python.org/devguide/rev/2edae149e8c5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 09:19:20 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 15 Jul 2016 13:19:20 +0000 Subject: [docs] [issue27519] update the references to http://mercurial.selenic.com In-Reply-To: <1468581157.12.0.317486616514.issue27519@psf.upfronthosting.co.za> Message-ID: <1468588760.4.0.773142132831.issue27519@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks! ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 09:20:32 2016 From: report at bugs.python.org (Berker Peksag) Date: Fri, 15 Jul 2016 13:20:32 +0000 Subject: [docs] [issue27519] update the references to http://mercurial.selenic.com In-Reply-To: <1468581157.12.0.317486616514.issue27519@psf.upfronthosting.co.za> Message-ID: <1468588832.72.0.230538799874.issue27519@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: -Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 11:20:12 2016 From: report at bugs.python.org (Decorater) Date: Fri, 15 Jul 2016 15:20:12 +0000 Subject: [docs] [issue27519] update the references to http://mercurial.selenic.com In-Reply-To: <1468581157.12.0.317486616514.issue27519@psf.upfronthosting.co.za> Message-ID: <1468596012.11.0.0808830933134.issue27519@psf.upfronthosting.co.za> Decorater added the comment: Why not add url to the GUI version too that actually adds hg to the path? ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 11:25:10 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 15 Jul 2016 15:25:10 +0000 Subject: [docs] [issue27519] update the references to http://mercurial.selenic.com In-Reply-To: <1468581157.12.0.317486616514.issue27519@psf.upfronthosting.co.za> Message-ID: <1468596310.06.0.196055557703.issue27519@psf.upfronthosting.co.za> St?phane Wirtel added the comment: which GUI version ? it's in the documentation. please could you be more explicit ? thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 11:28:17 2016 From: report at bugs.python.org (Decorater) Date: Fri, 15 Jul 2016 15:28:17 +0000 Subject: [docs] [issue27519] update the references to http://mercurial.selenic.com In-Reply-To: <1468581157.12.0.317486616514.issue27519@psf.upfronthosting.co.za> Message-ID: <1468596497.4.0.628983209078.issue27519@psf.upfronthosting.co.za> Decorater added the comment: TortoiseHg ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 11:36:51 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Fri, 15 Jul 2016 15:36:51 +0000 Subject: [docs] [issue27519] update the references to http://mercurial.selenic.com In-Reply-To: <1468581157.12.0.317486616514.issue27519@psf.upfronthosting.co.za> Message-ID: <1468597011.33.0.414884443622.issue27519@psf.upfronthosting.co.za> St?phane Wirtel added the comment: because we don't want to change a tool but just an URL. you can create an other issue if you prefer to use TortoiseHg. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 15:16:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 15 Jul 2016 19:16:50 +0000 Subject: [docs] [issue26696] Document collections.abc.ByteString In-Reply-To: <1459881544.79.0.834895685887.issue26696@psf.upfronthosting.co.za> Message-ID: <20160715191647.7520.55554.1EBE149D@psf.io> Roundup Robot added the comment: New changeset 8be87fde577f by Brett Cannon in branch '3.5': Issue #26696: Document collections.abc.ByteString. https://hg.python.org/cpython/rev/8be87fde577f New changeset 6ba86ca875a8 by Brett Cannon in branch 'default': Merge for #26696 https://hg.python.org/cpython/rev/6ba86ca875a8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 15:17:12 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 15 Jul 2016 19:17:12 +0000 Subject: [docs] [issue26696] Document collections.abc.ByteString In-Reply-To: <1459881544.79.0.834895685887.issue26696@psf.upfronthosting.co.za> Message-ID: <1468610231.97.0.503262675767.issue26696@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the patch, Xiang! ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 15 21:27:06 2016 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 16 Jul 2016 01:27:06 +0000 Subject: [docs] [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1468632426.6.0.665231523259.issue10225@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: belopolsky -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 16 03:29:19 2016 From: report at bugs.python.org (Roundup Robot) Date: Sat, 16 Jul 2016 07:29:19 +0000 Subject: [docs] [issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv` In-Reply-To: <1465544944.16.0.549761687921.issue27285@psf.upfronthosting.co.za> Message-ID: <20160716072913.32538.48210.7BD6743A@psf.io> Roundup Robot added the comment: New changeset 0d8f139a6e19 by Martin Panter in branch 'default': Issue #27285: Cleanup leftover susp-ignored entry after text was changed https://hg.python.org/cpython/rev/0d8f139a6e19 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 16 03:47:50 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 16 Jul 2016 07:47:50 +0000 Subject: [docs] [issue27528] Document that filterwarnings(message=...) matches the start of a message Message-ID: <1468655270.19.0.264691959865.issue27528@psf.upfronthosting.co.za> New submission from Martin Panter: I assumed that the ?message? parameter could be used to match any substring of a warning message, but it turns out it calls regex.match(), which is anchored at the beginning of the search string (but is not anchored at the end). I propose this patch to clarify the documentation, and add some tests. ---------- assignee: docs at python components: Documentation files: match-start.patch keywords: patch messages: 270546 nosy: docs at python, martin.panter priority: normal severity: normal stage: patch review status: open title: Document that filterwarnings(message=...) matches the start of a message versions: Python 2.7, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file43744/match-start.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 16 05:50:49 2016 From: report at bugs.python.org (Martin Panter) Date: Sat, 16 Jul 2016 09:50:49 +0000 Subject: [docs] [issue20842] pkgutil docs should reference glossary terms not PEP 302 In-Reply-To: <1393846400.67.0.723549613222.issue20842@psf.upfronthosting.co.za> Message-ID: <1468662649.25.0.216847201784.issue20842@psf.upfronthosting.co.za> Martin Panter added the comment: I still think the links are too dense. Three links to the same term in two short paragraphs is too much. Do you think it would be okay to just link the first occurrence for pkgutil.ImpImporter? Also, there is still a problem at least the definition of ?finder? used by the ImpImporter documentation. In PEP 302, ?a finder object has a single method: finder.find_module(fullname, path=None)?. This seems to be a pretty good description of the ImpImporter API. However, by dropping the reference to PEP 302, and linking to the glossary definition, we are suggesting that ImpImporter implements importlib.abc.MetaPathFinder and/or importlib.abc.PathEntryFinder. Both these APIs require some sort of find_spec() method, which is not provided by ImpImporter. As I see it, either Python?s ?finder? glossary entry should be adjusted to accommodate PEP 302, or we should retain the PEP 302 reference and not point at the wrong definition of ?finder?. ---------- _______________________________________ Python tracker _______________________________________ From berker.peksag at gmail.com Sat Jul 16 13:52:04 2016 From: berker.peksag at gmail.com (berker.peksag at gmail.com) Date: Sat, 16 Jul 2016 17:52:04 -0000 Subject: [docs] Document that filterwarnings(message=...) matches the start of a message (issue 27528) Message-ID: <20160716175204.8802.5773@psf.upfronthosting.co.za> http://bugs.python.org/review/27528/diff/17886/Doc/library/warnings.rst File Doc/library/warnings.rst (right): http://bugs.python.org/review/27528/diff/17886/Doc/library/warnings.rst#newcode145 Doc/library/warnings.rst:145: the warning message must match. (The expression is compiled to always be Can we drop parentheses? http://bugs.python.org/review/27528/diff/17886/Lib/test/test_warnings/__init__.py File Lib/test/test_warnings/__init__.py (right): http://bugs.python.org/review/27528/diff/17886/Lib/test/test_warnings/__init__.py#newcode274 Lib/test/test_warnings/__init__.py:274: self.assertListEqual(w, []) assertEqual calls assertListEqual implicitly so I guess this can be replaced with an assertEqual. http://bugs.python.org/review/27528/ From report at bugs.python.org Sat Jul 16 14:00:02 2016 From: report at bugs.python.org (Michael Killough) Date: Sat, 16 Jul 2016 18:00:02 +0000 Subject: [docs] [issue27531] Documentation for assert_not_called() has wrong signature Message-ID: <1468692002.86.0.178541373215.issue27531@psf.upfronthosting.co.za> New submission from Michael Killough: The documentation for `Mock.assert_not_called` gives its signature as `assert_not_called(*args, **kwargs)`. Since 01ae1ac2daf4, its signature has just been `assert_not_called()`. I've attached a trivial patch that updates the documentation to match the new signature. ---------- assignee: docs at python components: Documentation files: docs-assert_not_called.patch keywords: patch messages: 270577 nosy: docs at python, mjkillough priority: normal severity: normal status: open title: Documentation for assert_not_called() has wrong signature versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file43754/docs-assert_not_called.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 17 08:26:40 2016 From: report at bugs.python.org (Roundup Robot) Date: Sun, 17 Jul 2016 12:26:40 +0000 Subject: [docs] [issue27531] Documentation for assert_not_called() has wrong signature In-Reply-To: <1468692002.86.0.178541373215.issue27531@psf.upfronthosting.co.za> Message-ID: <20160717122631.31697.4201.5E6286DB@psf.io> Roundup Robot added the comment: New changeset b43f61118793 by Berker Peksag in branch '3.5': Issue #27531: Update signature of Mock.assert_not_called method https://hg.python.org/cpython/rev/b43f61118793 New changeset f4541c56c353 by Berker Peksag in branch 'default': Issue #27531: Merge from 3.5 https://hg.python.org/cpython/rev/f4541c56c353 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 17 08:27:23 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 17 Jul 2016 12:27:23 +0000 Subject: [docs] [issue27531] Documentation for assert_not_called() has wrong signature In-Reply-To: <1468692002.86.0.178541373215.issue27531@psf.upfronthosting.co.za> Message-ID: <1468758443.01.0.812924913985.issue27531@psf.upfronthosting.co.za> Berker Peksag added the comment: Good catch, thanks Michael! ---------- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 17 21:25:16 2016 From: report at bugs.python.org (hannah) Date: Mon, 18 Jul 2016 01:25:16 +0000 Subject: [docs] [issue27544] Document checking dict types Message-ID: <1468805116.02.0.14575319212.issue27544@psf.upfronthosting.co.za> New submission from hannah: While there is documentation that dict.keys(), dict.values(), and dict.items() are now view objects(https://docs.python.org/3/library/stdtypes.html#dict-views), there's no mention dictviews, dict_keys, dict_values, and dict_items not being built-ins. This is confusing because type(dict.keys()) returns dict_keys, type(dict.values()) returns dict_values, etc., and the documentation uses `dictview` as the object signature, and so it's unclear how to do object introspection on dictview objects. The #python-dev channel suggested that the canonical way to do the object introspection is to use the collections.abc.mapview types; the documentation for dicts should reflect this (and that dictview and the rest are not __builtin__ types/in the python namspace). ---------- assignee: docs at python components: Documentation messages: 270672 nosy: docs at python, story645 priority: normal severity: normal status: open title: Document checking dict types type: enhancement 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 17 21:26:43 2016 From: report at bugs.python.org (hannah) Date: Mon, 18 Jul 2016 01:26:43 +0000 Subject: [docs] [issue27544] documentiona of dict view types In-Reply-To: <1468805116.02.0.14575319212.issue27544@psf.upfronthosting.co.za> Message-ID: <1468805203.18.0.98160369777.issue27544@psf.upfronthosting.co.za> Changes by hannah : ---------- title: Document checking dict types -> documentiona of dict view types _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 17 21:41:17 2016 From: report at bugs.python.org (Emanuel Barry) Date: Mon, 18 Jul 2016 01:41:17 +0000 Subject: [docs] [issue27544] documentiona of dict view types In-Reply-To: <1468805116.02.0.14575319212.issue27544@psf.upfronthosting.co.za> Message-ID: <1468806077.68.0.710648358356.issue27544@psf.upfronthosting.co.za> Emanuel Barry added the comment: "The #python-dev channel" being me in this context ;) Patch attached. ---------- keywords: +patch nosy: +ebarry stage: -> patch review Added file: http://bugs.python.org/file43768/dict_view_doc_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 17 21:43:08 2016 From: report at bugs.python.org (Emanuel Barry) Date: Mon, 18 Jul 2016 01:43:08 +0000 Subject: [docs] [issue27544] Document the ABCs for instance/subclass checks of dict view types In-Reply-To: <1468805116.02.0.14575319212.issue27544@psf.upfronthosting.co.za> Message-ID: <1468806188.94.0.657628894832.issue27544@psf.upfronthosting.co.za> Changes by Emanuel Barry : ---------- title: documentiona of dict view types -> Document the ABCs for instance/subclass checks of dict view types _______________________________________ Python tracker _______________________________________ From vadmium+py at gmail.com Mon Jul 18 02:59:24 2016 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Mon, 18 Jul 2016 06:59:24 -0000 Subject: [docs] Document that filterwarnings(message=...) matches the start of a message (issue 27528) Message-ID: <20160718065924.29897.78190@psf.upfronthosting.co.za> Reviewers: berkerpeksag, https://bugs.python.org/review/27528/diff/17886/Doc/library/warnings.rst File Doc/library/warnings.rst (right): https://bugs.python.org/review/27528/diff/17886/Doc/library/warnings.rst#newcode145 Doc/library/warnings.rst:145: the warning message must match. (The expression is compiled to always be On 2016/07/16 19:52:04, berkerpeksag wrote: > Can we drop parentheses? Sure, will do this in next patch version https://bugs.python.org/review/27528/diff/17886/Lib/test/test_warnings/__init__.py File Lib/test/test_warnings/__init__.py (right): https://bugs.python.org/review/27528/diff/17886/Lib/test/test_warnings/__init__.py#newcode274 Lib/test/test_warnings/__init__.py:274: self.assertListEqual(w, []) On 2016/07/16 19:52:04, berkerpeksag wrote: > assertEqual calls assertListEqual implicitly so I guess this can be replaced > with an assertEqual. Yeah plain assertEqual() should be fine Please review this at https://bugs.python.org/review/27528/ Affected files: Doc/library/warnings.rst Lib/test/test_warnings/__init__.py # HG changeset patch # Parent 0d8f139a6e19f72e3575ee37d410dfe12184be56 Document and test that the beginning of the warning message is matched diff -r 0d8f139a6e19 Doc/library/warnings.rst --- a/Doc/library/warnings.rst Sat Jul 16 07:17:46 2016 +0000 +++ b/Doc/library/warnings.rst Sat Jul 16 07:41:31 2016 +0000 @@ -141,14 +141,15 @@ | | warnings, regardless of location | +---------------+----------------------------------------------+ -* *message* is a string containing a regular expression that the warning message - must match (the match is compiled to always be case-insensitive). +* *message* is a string containing a regular expression that the start of + the warning message must match. (The expression is compiled to always be + case-insensitive.) * *category* is a class (a subclass of :exc:`Warning`) of which the warning category must be a subclass in order to match. * *module* is a string containing a regular expression that the module name must - match (the match is compiled to be case-sensitive). + match. (The expression is compiled to be case-sensitive.) * *lineno* is an integer that the line number where the warning occurred must match, or ``0`` to match all line numbers. diff -r 0d8f139a6e19 Lib/test/test_warnings/__init__.py --- a/Lib/test/test_warnings/__init__.py Sat Jul 16 07:17:46 2016 +0000 +++ b/Lib/test/test_warnings/__init__.py Sat Jul 16 07:41:31 2016 +0000 @@ -263,6 +263,18 @@ self.assertEqual(str(w[-1].message), text) self.assertTrue(w[-1].category is UserWarning) + def test_message_matching(self): + with original_warnings.catch_warnings(record=True, + module=self.module) as w: + self.module.simplefilter("ignore", UserWarning) + self.module.filterwarnings("error", "match", UserWarning) + self.assertRaises(UserWarning, self.module.warn, "match") + self.assertRaises(UserWarning, self.module.warn, "match prefix") + self.module.warn("suffix match") + self.assertListEqual(w, []) + self.module.warn("something completely different") + self.assertListEqual(w, []) + def test_mutate_filter_list(self): class X: def match(self, a): From report at bugs.python.org Mon Jul 18 09:30:51 2016 From: report at bugs.python.org (Kirk Hansen) Date: Mon, 18 Jul 2016 13:30:51 +0000 Subject: [docs] [issue27561] Warn against subclassing builtins, and overriding their methods Message-ID: <1468848651.49.0.804648096873.issue27561@psf.upfronthosting.co.za> New submission from Kirk Hansen: I tried subclassing dict, and overriding its __setitem__ and __getitem__ and got some interesting results. See http://stackoverflow.com/questions/38362420/subclassing-dict-dict-update-returns-incorrrect-value-python-bug?noredirect=1#comment64142710_38362420 for an example. I tried sub-classing UserDict.UserDict and experienced some of the same problems. Eventually, I discovered that subclassing MutableMapping was my best bet. After an hour or two of searching and reading I discovered that CPython will not call overridden built-in methods of the same object (https://pypy.readthedocs.io/en/latest/cpython_differences.html#subclasses-of-built-in-types). This behaviour could (and did) cause some hard to track down bugs in code. I briefly looked at the later versions of python documentation and didn't see a mention of this (sorry if it's there), but python2.7 definitely does not mention this. In fact, python2.7 seems to __encourage__ users to subclass the built-ins (see the note https://docs.python.org/2.7/library/stdtypes.html?highlight=dict#built-in-types). Subclassing dict to __extend__ functionality is great, but there should be a big bad warning when trying to __override__ built-ins like __setitem__ and __getitem__. ---------- assignee: docs at python components: Documentation messages: 270754 nosy: Kirk Hansen, docs at python priority: normal severity: normal status: open title: Warn against subclassing builtins, and overriding their methods type: enhancement 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 Mon Jul 18 10:27:43 2016 From: report at bugs.python.org (Ram Rachum) Date: Mon, 18 Jul 2016 14:27:43 +0000 Subject: [docs] [issue27563] docs for `gc.get_referrers` should explain the result format (i.e. what keys in the dict mean) Message-ID: <1468852063.22.0.61619698648.issue27563@psf.upfronthosting.co.za> Changes by Ram Rachum : ---------- assignee: docs at python components: Documentation nosy: cool-RR, docs at python priority: normal severity: normal status: open title: docs for `gc.get_referrers` should explain the result format (i.e. what keys in the dict mean) 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 Mon Jul 18 10:29:23 2016 From: report at bugs.python.org (Ram Rachum) Date: Mon, 18 Jul 2016 14:29:23 +0000 Subject: [docs] [issue27563] docs for `gc.get_referrers` should explain the result format (i.e. what keys in the dict mean) Message-ID: <1468852163.19.0.0852873955518.issue27563@psf.upfronthosting.co.za> New submission from Ram Rachum: My mistake ---------- resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 18 10:43:41 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Jul 2016 14:43:41 +0000 Subject: [docs] [issue27561] Warn against subclassing builtins, and overriding their methods In-Reply-To: <1468848651.49.0.804648096873.issue27561@psf.upfronthosting.co.za> Message-ID: <1468853021.11.0.378229204534.issue27561@psf.upfronthosting.co.za> R. David Murray added the comment: Where in the docs do you think such a note should go? I suppose it could go in the intro to the chapter you link to. I doubt many people will find it there, though :( ---------- nosy: +r.david.murray versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 18 12:02:11 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Mon, 18 Jul 2016 16:02:11 +0000 Subject: [docs] [issue25910] Fixing links in documentation In-Reply-To: <1450530544.1.0.9187941337.issue25910@psf.upfronthosting.co.za> Message-ID: <1468857731.21.0.314861948633.issue25910@psf.upfronthosting.co.za> St?phane Wirtel added the comment: maybe we can continue on this issue and close it asap. what do you think ? ---------- nosy: +matrixise _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 18 14:18:13 2016 From: report at bugs.python.org (Kirk Hansen) Date: Mon, 18 Jul 2016 18:18:13 +0000 Subject: [docs] [issue27561] Warn against subclassing builtins, and overriding their methods In-Reply-To: <1468848651.49.0.804648096873.issue27561@psf.upfronthosting.co.za> Message-ID: <1468865893.02.0.92318670769.issue27561@psf.upfronthosting.co.za> Kirk Hansen added the comment: I think it could make sense at the top of the intro. It could also make sense to have it sit https://docs.python.org/2.7/library/stdtypes.html?highlight=dict#mapping-types-dict and have the intro link to it, or vice-versa. Thoughts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 18 16:15:09 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Jul 2016 20:15:09 +0000 Subject: [docs] [issue27561] Warn against subclassing builtins, and overriding their methods In-Reply-To: <1468848651.49.0.804648096873.issue27561@psf.upfronthosting.co.za> Message-ID: <1468872909.12.0.413260198709.issue27561@psf.upfronthosting.co.za> R. David Murray added the comment: It doesn't just apply to dicts, it applies to all the built in collection types (and possibly to other built in types). But not to all the methods, which will make the documentation somewhat vague ("you may not be able to successfully override base class methods such as __setitem__...") Oh, and I suppose it needs to be marked as a CPython implementation detail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 18 17:31:02 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 Jul 2016 21:31:02 +0000 Subject: [docs] [issue27561] Warn against subclassing builtins, and overriding their methods In-Reply-To: <1468848651.49.0.804648096873.issue27561@psf.upfronthosting.co.za> Message-ID: <1468877462.62.0.452551221369.issue27561@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is an example of the open-closed-principle (the class is open for extension but closed for modification). It is good thing to have because it allows subclassers to extend or override a method without unintentionally triggering behavior changes in others and without breaking the classes's invariants. We even do this in pure python code as well; for example, inside the pure python ordered dict code, the class local call from __init__ to update() is done using name mangling. This allows a subclasser to override update() without accidentally breaking __init__. Sometimes, this is inconvenient. It means that a subclasser has to override every method whose behavior they want to change including get(), update(), and others. However, there are offsetting benefits (protection of internal invariants, preventing implementation details from leaking from the abstraction, and allowing users to assume the methods are independent of one another). This style (chosen by Guido from the outset) is the default for the builtin types (otherwise we would forever be fighting segfaulting invariant violations) and for some pure python classes. We do document when there is a departure from the default. For example, the cmd module uses the framework design pattern, letting the user define various do_action() methods. Also, some of the http modules do the same, specifically documentation that the user's do_get method gets called and that some specifically named user handler method gets called. In the absence of specifically documented method hooks (i.e. those listed above or methods like __missing__), a subclasser should presume method independence. Otherwise, how are you to know whether __getitem__ calls get() under the hood or vice-versa? FWIW, this isn't unique to Python. It comes up quite a bit in object oriented programming. Correctly designed classes either document root methods that affect the behavior of other methods or they are presumed to be independent. There may need to be a FAQ for this, but nothing is broken or wrong here (other than Python having way to many dict variants to chose from). Also, R David Murray almost no one would be helped by a note in some random place in the docs. If someone assumes or believes that __getitem__ must be called by the other accessor methods, they find out very quickly that assumption is wrong (that is if they run even minimal tests on the code). ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 18 17:31:24 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 Jul 2016 21:31:24 +0000 Subject: [docs] [issue27561] Warn against subclassing builtins, and overriding their methods In-Reply-To: <1468848651.49.0.804648096873.issue27561@psf.upfronthosting.co.za> Message-ID: <1468877484.82.0.0392301728533.issue27561@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 18 17:52:05 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Jul 2016 21:52:05 +0000 Subject: [docs] [issue27561] Warn against subclassing builtins, and overriding their methods In-Reply-To: <1468848651.49.0.804648096873.issue27561@psf.upfronthosting.co.za> Message-ID: <1468878725.27.0.53190966909.issue27561@psf.upfronthosting.co.za> R. David Murray added the comment: Raymond: yes, I was dubious about the benefit of the doc note. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 18 22:51:18 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Jul 2016 02:51:18 +0000 Subject: [docs] [issue27528] Document that filterwarnings(message=...) matches the start of a message In-Reply-To: <1468655270.19.0.264691959865.issue27528@psf.upfronthosting.co.za> Message-ID: <20160719025114.79671.523.EA013377@psf.io> Roundup Robot added the comment: New changeset 739f638bb9f8 by Martin Panter in branch '2.7': Issue #27528: Document and test warning messages must match at beginning https://hg.python.org/cpython/rev/739f638bb9f8 New changeset 7571432200a2 by Martin Panter in branch '3.5': Issue #27528: Document and test warning messages must match at beginning https://hg.python.org/cpython/rev/7571432200a2 New changeset e0761e817deb by Martin Panter in branch 'default': Issue #27528: Merge warning doc and test from 3.5 https://hg.python.org/cpython/rev/e0761e817deb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 18 23:35:38 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 19 Jul 2016 03:35:38 +0000 Subject: [docs] [issue27528] Document that filterwarnings(message=...) matches the start of a message In-Reply-To: <1468655270.19.0.264691959865.issue27528@psf.upfronthosting.co.za> Message-ID: <1468899338.92.0.152415139784.issue27528@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 19 08:30:43 2016 From: report at bugs.python.org (Steven D'Aprano) Date: Tue, 19 Jul 2016 12:30:43 +0000 Subject: [docs] [issue27561] Warn against subclassing builtins, and overriding their methods In-Reply-To: <1468848651.49.0.804648096873.issue27561@psf.upfronthosting.co.za> Message-ID: <1468931443.46.0.425044344537.issue27561@psf.upfronthosting.co.za> Steven D'Aprano added the comment: Raymond, that was a fantastic explanation. Would you be willing to turn it into a FAQ? Or if you don't have the time, to allow somebody to steal your description and use it? ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 19 10:47:34 2016 From: report at bugs.python.org (Kirk Hansen) Date: Tue, 19 Jul 2016 14:47:34 +0000 Subject: [docs] [issue27561] Warn against subclassing builtins, and overriding their methods In-Reply-To: <1468848651.49.0.804648096873.issue27561@psf.upfronthosting.co.za> Message-ID: <1468939654.19.0.134100734936.issue27561@psf.upfronthosting.co.za> Kirk Hansen added the comment: Raymond: Thanks for essentially answering my stackoverflow question (if you are a member, and add most of your response, I'll accept it). I agree enough with your documentation statement. An entry in an FAQ would have been just as helpful to me as a note in the documentation, and the FAQ is probably more accessible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 19 17:01:28 2016 From: report at bugs.python.org (Evelyn Mitchell) Date: Tue, 19 Jul 2016 21:01:28 +0000 Subject: [docs] [issue25393] 'resource' module documentation error In-Reply-To: <1444746542.39.0.814536865396.issue25393@psf.upfronthosting.co.za> Message-ID: <1468962088.06.0.876828450679.issue25393@psf.upfronthosting.co.za> Evelyn Mitchell added the comment: I've looked at the patch, and the fix looks correct to me. Thanks Alakshendra! I'll verify it builds correctly. ---------- nosy: +Evelyn Mitchell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 19 17:12:16 2016 From: report at bugs.python.org (Ammar Askar) Date: Tue, 19 Jul 2016 21:12:16 +0000 Subject: [docs] [issue19489] move quick search box above TOC In-Reply-To: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> Message-ID: <1468962736.03.0.70127305333.issue19489@psf.upfronthosting.co.za> Ammar Askar added the comment: bump, added the documentation experts list, not sure if the core dev who made this issue is still active. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 19 17:48:48 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 19 Jul 2016 21:48:48 +0000 Subject: [docs] [issue25393] 'resource' module documentation error In-Reply-To: <1444746542.39.0.814536865396.issue25393@psf.upfronthosting.co.za> Message-ID: <20160719214839.16868.34494.0AF32AE2@psf.io> Roundup Robot added the comment: New changeset 434fc614c506 by Zachary Ware in branch '2.7': Issue #25393: Fix probable copy/paste error in resource docs https://hg.python.org/cpython/rev/434fc614c506 New changeset 0fe2b7509707 by Zachary Ware in branch '3.5': Issue #25393: Fix probable copy/paste error in resource docs https://hg.python.org/cpython/rev/0fe2b7509707 New changeset 829117ae2e55 by Zachary Ware in branch 'default': Closes #25393: Merge with 3.5 https://hg.python.org/cpython/rev/829117ae2e55 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 19 17:49:27 2016 From: report at bugs.python.org (Zachary Ware) Date: Tue, 19 Jul 2016 21:49:27 +0000 Subject: [docs] [issue25393] 'resource' module documentation error In-Reply-To: <1444746542.39.0.814536865396.issue25393@psf.upfronthosting.co.za> Message-ID: <1468964967.02.0.274048553755.issue25393@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks to Christos for the report and Alakshendra for the patch! ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 20 10:42:29 2016 From: report at bugs.python.org (=?utf-8?q?St=C3=A9phane_Wirtel?=) Date: Wed, 20 Jul 2016 14:42:29 +0000 Subject: [docs] [issue27579] Add a tutorial for AsyncIO in the documentation Message-ID: <1469025749.21.0.829921979586.issue27579@psf.upfronthosting.co.za> New submission from St?phane Wirtel: The documentation of AsyncIO is well written for a developer, but it's a reference. We have the description of all the methods, classes, etc... But we want to learn to develop with AsyncIO, it's difficult, because there is no many examples in this reference and we have to look for some examples on Internet. Could we add a AsyncIO tutorial|cookbook|howto ? because we have a "Logging Cookbook" but not a "AsyncIO 101". Thank you Stephane ---------- assignee: docs at python components: Documentation messages: 270876 nosy: asvetlov, docs at python, haypo, matrixise, yselivanov priority: normal severity: normal status: open title: Add a tutorial for AsyncIO in the documentation versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 20 10:53:26 2016 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 20 Jul 2016 14:53:26 +0000 Subject: [docs] [issue27579] Add a tutorial for AsyncIO in the documentation In-Reply-To: <1469025749.21.0.829921979586.issue27579@psf.upfronthosting.co.za> Message-ID: <3DA8F43D-3F5B-47EE-BE3E-086F41B44F19@gmail.com> Yury Selivanov added the comment: I guess someone has to step forward -- i can propose an initial patch with the tutorial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 20 12:32:32 2016 From: report at bugs.python.org (Ludovic Gasc) Date: Wed, 20 Jul 2016 16:32:32 +0000 Subject: [docs] [issue27579] Add a tutorial for AsyncIO in the documentation In-Reply-To: <1469025749.21.0.829921979586.issue27579@psf.upfronthosting.co.za> Message-ID: <1469032352.49.0.598680334414.issue27579@psf.upfronthosting.co.za> Changes by Ludovic Gasc : ---------- nosy: +Ludovic.Gasc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 22 05:50:51 2016 From: report at bugs.python.org (Gareth Rees) Date: Fri, 22 Jul 2016 09:50:51 +0000 Subject: [docs] [issue27588] Type objects are hashable and comparable for equality but this is not documented Message-ID: <1469181051.15.0.925508125369.issue27588@psf.upfronthosting.co.za> New submission from Gareth Rees: The type objects constructed by the metaclasses in the typing module are hashable and comparable for equality: >>> from typing import * >>> {Mapping[str, int], Mapping[int, str]} {typing.Mapping[int, str], typing.Mapping[str, int]} >>> Union[str, int, float] == Union[float, int, str] True >>> List[int] == List[float] False but this is not clearly documented in the documentation for the typing module (there are a handful of examples using equality, but it's not explicit that these are runnable). It would be nice if there were explicit documentation for these properties of type objects. ---------- assignee: docs at python components: Documentation messages: 270981 nosy: Gareth.Rees, docs at python priority: normal severity: normal status: open title: Type objects are hashable and comparable for equality but this is not documented type: enhancement versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 22 06:08:25 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Jul 2016 10:08:25 +0000 Subject: [docs] [issue27589] asyncio doc: issue in as_completed() doc Message-ID: <1469182105.52.0.303554063448.issue27589@psf.upfronthosting.co.za> New submission from STINNER Victor: Remark on as_completed() doc by Hynek. https://docs.python.org/dev/library/asyncio-task.html#asyncio.as_completed Futures are yielded in an unexpected order: as soon as a future completes. ---------- assignee: docs at python components: Documentation, asyncio messages: 270982 nosy: docs at python, gvanrossum, haypo, yselivanov priority: normal severity: normal status: open title: asyncio doc: issue in as_completed() doc versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 22 10:06:06 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 22 Jul 2016 14:06:06 +0000 Subject: [docs] [issue27588] Type (typing) objects are hashable and comparable for equality but this is not documented In-Reply-To: <1469181051.15.0.925508125369.issue27588@psf.upfronthosting.co.za> Message-ID: <1469196366.06.0.322851429411.issue27588@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: Type objects are hashable and comparable for equality but this is not documented -> Type (typing) objects are hashable and comparable for equality but this is not documented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 22 12:23:37 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 22 Jul 2016 16:23:37 +0000 Subject: [docs] [issue27588] Type (typing) objects are hashable and comparable for equality but this is not documented In-Reply-To: <1469181051.15.0.925508125369.issue27588@psf.upfronthosting.co.za> Message-ID: <1469204617.23.0.920707414433.issue27588@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I am not sure that this feature will survive the resolution of https://github.com/python/typing/issues/136 Types in typing are primarily intended for use with static type checkers and similar tools, their runtime properties are still under some discussions. ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 22 12:49:37 2016 From: report at bugs.python.org (Chris Rebert) Date: Fri, 22 Jul 2016 16:49:37 +0000 Subject: [docs] [issue27561] Warn against subclassing builtins, and overriding their methods In-Reply-To: <1468848651.49.0.804648096873.issue27561@psf.upfronthosting.co.za> Message-ID: <1469206177.68.0.177303771148.issue27561@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 22 15:50:50 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Jul 2016 19:50:50 +0000 Subject: [docs] [issue10965] dev task of documenting undocumented APIs In-Reply-To: <1295566423.14.0.859020697485.issue10965@psf.upfronthosting.co.za> Message-ID: <1469217050.06.0.840134406719.issue10965@psf.upfronthosting.co.za> Brett Cannon added the comment: Moved to https://github.com/python/devguide/issues/10 ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 22 15:54:45 2016 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Jul 2016 19:54:45 +0000 Subject: [docs] [issue23320] devguide should mention rules about "paragraph reflow" in the documentation In-Reply-To: <1422219993.92.0.674256323538.issue23320@psf.upfronthosting.co.za> Message-ID: <1469217284.88.0.433059121544.issue23320@psf.upfronthosting.co.za> Brett Cannon added the comment: Moved to https://github.com/python/devguide/issues/12 ---------- nosy: +brett.cannon resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 22 16:18:17 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 22 Jul 2016 20:18:17 +0000 Subject: [docs] [issue27561] Warn against subclassing builtins, and overriding their methods In-Reply-To: <1468848651.49.0.804648096873.issue27561@psf.upfronthosting.co.za> Message-ID: <1469218697.21.0.97228262024.issue27561@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Will do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 22 16:28:14 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 22 Jul 2016 20:28:14 +0000 Subject: [docs] [issue27544] Document the ABCs for instance/subclass checks of dict view types In-Reply-To: <1468805116.02.0.14575319212.issue27544@psf.upfronthosting.co.za> Message-ID: <1469219294.32.0.0829406205546.issue27544@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The view objects *are* built-ins, but are not exposed in the __builtins__ module. This is true of many internal types, perhaps even a majority. The function and list_iterator classes are other examples. >>> type(lambda: 0) >>> type(iter([])) A few such 'hidden' classes are exposed in the types module. "This module provides names for many of the types that are required to implement a Python interpreter. It deliberately avoids including some of the types that arise only incidentally during processing such as the listiterator type. Typical use of these names is for isinstance() or issubclass() checks." The function class is. "types.FunctionType types.LambdaType The type of user-defined functions and functions created by lambda expressions." The list_iterator class is not. Perhaps the rationale is that there is no reason to know whether an iterator is iterating over a list, tuple, range, set, frozenset, dict, or anything else. They are all used the same. On the other hand, Different view types are used a bit differently. Types includes a generic MappingProxyType. Perhaps you should propose adding the specific dict view types. Or you can create them yourself. KeysViewType = type({}.keys()) ValuesViewType = type({}.values()) ItemsViewType = type({}.items()) This is the code that would be used in the module if they were added there. ---------- nosy: +terry.reedy versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 22 17:24:20 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 22 Jul 2016 21:24:20 +0000 Subject: [docs] [issue27579] Add a tutorial for AsyncIO in the documentation In-Reply-To: <1469025749.21.0.829921979586.issue27579@psf.upfronthosting.co.za> Message-ID: <1469222660.13.0.122929704593.issue27579@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 22 19:56:20 2016 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Jul 2016 23:56:20 +0000 Subject: [docs] [issue27579] Add a tutorial for AsyncIO in the documentation In-Reply-To: <1469222660.13.0.122929704593.issue27579@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: The tutorial is happening but outside Python: https://github.com/asyncio-doc/asyncio-doc I suggest to now close this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 06:58:10 2016 From: report at bugs.python.org (Ram Rachum) Date: Sat, 23 Jul 2016 10:58:10 +0000 Subject: [docs] [issue27597] Add usage examples for TracebackException, StackSummary and FrameSummary Message-ID: <1469271490.04.0.794512221992.issue27597@psf.upfronthosting.co.za> New submission from Ram Rachum: I saw these new interesting classes in the `traceback` docs, but if I were shown an example of how they are used, I might get inspired to use them in my own code. ---------- assignee: docs at python components: Documentation messages: 271072 nosy: cool-RR, docs at python priority: normal severity: normal status: open title: Add usage examples for TracebackException, StackSummary and FrameSummary type: enhancement versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From lindapescatore at yahoo.com Thu Jul 21 13:51:43 2016 From: lindapescatore at yahoo.com (Linda Pescatore) Date: Thu, 21 Jul 2016 17:51:43 +0000 (UTC) Subject: [docs] Word missing References: <746938434.3229025.1469123503230.JavaMail.yahoo.ref@mail.yahoo.com> Message-ID: <746938434.3229025.1469123503230.JavaMail.yahoo@mail.yahoo.com> Section 3.3.2, there is a word missing at the end of this sentence: This allows you to type?python?to run the interpreter, and?pip?or .? -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat Jul 23 10:47:54 2016 From: report at bugs.python.org (Julien) Date: Sat, 23 Jul 2016 14:47:54 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469285274.56.0.191330793761.issue26462@psf.upfronthosting.co.za> Julien added the comment: Hi, Look like it has not been merged, is there something I can do to help with this? Bests ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 14:17:52 2016 From: report at bugs.python.org (Aleksandr Koshkin) Date: Sat, 23 Jul 2016 18:17:52 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation Message-ID: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> New submission from Aleksandr Koshkin: https://docs.python.org/3.6/library/stdtypes.html#hashing-of-numeric-types Look at semantics example for hash_complex function. The variable 'hash' is clearly misused - it is not defined or refers to builtin function 'hash'. Either way the example is incorrect. ---------- assignee: docs at python components: Documentation messages: 271097 nosy: docs at python, magniff priority: normal severity: normal status: open title: Minor inaccuracy in hash documentation versions: 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 23 14:25:17 2016 From: report at bugs.python.org (Aleksandr Koshkin) Date: Sat, 23 Jul 2016 18:25:17 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469298317.09.0.507374187014.issue27601@psf.upfronthosting.co.za> Aleksandr Koshkin added the comment: Moreover this example contains following code if hash_ == -1: hash_ == -2 return hash_ that doesn`t make too much sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 14:49:52 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sat, 23 Jul 2016 18:49:52 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469299792.74.0.816396021697.issue27601@psf.upfronthosting.co.za> Emanuel Barry added the comment: Indeed, nicely spotted! Patch attached (hash_complex_type_1.patch) P.S.: I don't like the 'hash_' name as a variable for this example; it looks like grit on Tim's monitor to me, so I went ahead and renamed it to 'hash_value' in that block. Attached as a separate patch for good measure (hash_doc_renamed_1.patch) ---------- keywords: +patch nosy: +ebarry stage: -> patch review versions: -Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file43845/hash_complex_typo_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 14:50:07 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sat, 23 Jul 2016 18:50:07 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469299807.14.0.335649932575.issue27601@psf.upfronthosting.co.za> Changes by Emanuel Barry : Added file: http://bugs.python.org/file43846/hash_doc_renamed_1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 15:03:08 2016 From: report at bugs.python.org (Aleksandr Koshkin) Date: Sat, 23 Jul 2016 19:03:08 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469300588.3.0.394392869536.issue27601@psf.upfronthosting.co.za> Aleksandr Koshkin added the comment: Thanks) ---------- resolution: -> fixed versions: +Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 15:03:57 2016 From: report at bugs.python.org (Aleksandr Koshkin) Date: Sat, 23 Jul 2016 19:03:57 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469300637.4.0.855060323564.issue27601@psf.upfronthosting.co.za> Changes by Aleksandr Koshkin : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 15:11:18 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 23 Jul 2016 19:11:18 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469301078.54.0.712103074715.issue27601@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> mark.dickinson nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 15:19:56 2016 From: report at bugs.python.org (SilentGhost) Date: Sat, 23 Jul 2016 19:19:56 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469301596.55.0.771732335729.issue27601@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 15:34:16 2016 From: report at bugs.python.org (Emanuel Barry) Date: Sat, 23 Jul 2016 19:34:16 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469302456.65.0.336458366913.issue27601@psf.upfronthosting.co.za> Emanuel Barry added the comment: Do note that nothing has been changed in the docs yet. I submitted the patch, and now other developers need to review it, decide whether it's correct or need modifications, and then someone needs to commit it. Let the bikeshedding start =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 15:49:06 2016 From: report at bugs.python.org (Zachary Ware) Date: Sat, 23 Jul 2016 19:49:06 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469303346.38.0.00324787418894.issue26462@psf.upfronthosting.co.za> Zachary Ware added the comment: Hi Julien, there are still a few unanswered review comments. Check the 'review' link on 'issue26462_regen.diff' (which was your patch, I just recreated it in a format that our Rietveld review tool would accept). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 15:52:31 2016 From: report at bugs.python.org (Zachary Ware) Date: Sat, 23 Jul 2016 19:52:31 +0000 Subject: [docs] [issue19489] move quick search box above TOC In-Reply-To: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> Message-ID: <1469303551.63.0.219850678884.issue19489@psf.upfronthosting.co.za> Zachary Ware added the comment: The patch needs some work, as it stands it makes the 'Report a Bug' link disappear. I haven't looked into it far enough to determine why. For an alternative bikeshed color, would it be possible to put the quick search in the header, just left of the 'previous | next | modules | index' links? ---------- nosy: +zach.ware versions: +Python 2.7, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 16:20:13 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Jul 2016 20:20:13 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469305213.93.0.423865390736.issue27601@psf.upfronthosting.co.za> R. David Murray added the comment: Adding a _ after a keyword is a very common trick. The fact that one got lost indicates that it isn't necessarily optimal :). I don't really have an opinion one way or the other on the variable rename. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 16:24:11 2016 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 23 Jul 2016 20:24:11 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469305451.1.0.449616950611.issue27601@psf.upfronthosting.co.za> Mark Dickinson added the comment: The changes look good to me. Thanks for spotting this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 18:25:05 2016 From: report at bugs.python.org (Julien) Date: Sat, 23 Jul 2016 22:25:05 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469312704.25.0.127764321171.issue26462@psf.upfronthosting.co.za> Julien added the comment: Hi, I completly missed the "review" link, sry. I reviewed comments, and I'm trying to provide an up-to-date patch that you'll hopefully won't have to doctor to make Rietveld eat it. ---------- Added file: http://bugs.python.org/file43847/issue26462.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 21:28:18 2016 From: report at bugs.python.org (Ammar Askar) Date: Sun, 24 Jul 2016 01:28:18 +0000 Subject: [docs] [issue19489] move quick search box above TOC In-Reply-To: <1383546510.68.0.587653327623.issue19489@psf.upfronthosting.co.za> Message-ID: <1469323697.93.0.670092161908.issue19489@psf.upfronthosting.co.za> Ammar Askar added the comment: Thank you for pointing that out to me, it completely slipped past. It looks like the 'Report a Bug' link disappears because deprecated api is used in Doc/tools/templates/layout.html {% block sidebarsourcelink %} {% endblock %} http://www.sphinx-doc.org/en/stable/templating.html#blocks >The following four blocks are only used for pages that do not have >assigned a list of custom sidebars in the html_sidebars config >value" I've amended the patch to fix this by using the way they recommend with a custom html_sidebar. As far as putting it in the title bar goes, I think it's slightly more prone to breakage since we're essentially duplicating sphinx's searchbar code. It's easy enough to add it to the right of those links, there's a {% block relbaritems %} for that. Adding it to the left is slightly more complicated. Personally I like just pinning it to the top of the sidebar but I can look into that as well if you really want. https://github.com/sphinx-doc/sphinx/blob/master/sphinx/themes/basic/layout.html#L27-L46 ---------- Added file: http://bugs.python.org/file43848/searchbar.diff2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 23 22:09:19 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 24 Jul 2016 02:09:19 +0000 Subject: [docs] [issue27579] Add a tutorial for AsyncIO in the documentation In-Reply-To: <1469025749.21.0.829921979586.issue27579@psf.upfronthosting.co.za> Message-ID: <1469326159.12.0.284934891988.issue27579@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I would like the tutorial to include something like the following. Adding Tkinter GUI to Asyncio Program ------------------------------------- Assuming that the tkinter Tk instance is called 'root' and the asyncio loop is called 'loop', add the following callback loop. def tk_update(): root.update() loop.call_soon(tk_update) Before each loop.run_forever() or loop.run_until_complete(...) call, add tk_update() Do not call root.mainloop() or root.quit(). Loop.stop() or completion of run_until_complete will stop the tk_update loop. --- This is the result of my experiments in #27546. One of my tests was running IDLE with an asyncio loop augmented with the above replacing root.mainloop. I don't yet know how to work with git and github. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 24 05:46:21 2016 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 Jul 2016 09:46:21 +0000 Subject: [docs] [issue27604] More details about `-O` flag Message-ID: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> New submission from Ram Rachum: I wanted to ensure that the `-O` flag doesn't really do anything more than remove assert statement and make `__debug__` equal `False`. But the documentation for `-O` doesn't cover it: https://docs.python.org/3/using/cmdline.html#cmdoption-O https://docs.python.org/3/using/cmdline.html#envvar-PYTHONOPTIMIZE It just says "basic optimizations". Are there any other optimizations except the two I mentioned? ---------- assignee: docs at python components: Documentation messages: 271142 nosy: cool-RR, docs at python priority: normal severity: normal status: open title: More details about `-O` flag type: enhancement versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 24 10:50:33 2016 From: report at bugs.python.org (Julien) Date: Sun, 24 Jul 2016 14:50:33 +0000 Subject: [docs] [issue26546] Provide translated french translation on docs.python.org In-Reply-To: <1457794223.79.0.618185263259.issue26546@psf.upfronthosting.co.za> Message-ID: <1469371833.75.0.351945053239.issue26546@psf.upfronthosting.co.za> Julien added the comment: I'm on the way of simplifying my [pull request for docsbuild-script](https://github.com/python/docsbuild-scripts/pull/1) with two goals in mind: - Simplify to make it more robust - Avoid executing external (~untrusted) Makefile on docs.python.org servers To achieve this, I need to pass sphinx options to the `Doc/Makefile`, I'd like to call, typically: make autobuild-stable SPHINXOPTS='-D language=fr -D locale_dirs=./locale/' Which work if `Doc/Makefile` don't erase but append to the `SPHINXOPTS` variable. Which is done by `allow_sphinxopts.diff`. We may simplify it further by adding `locale_dirs` to `Doc/conf.py` which does not break the english build, but I'm not sure if it's of any interest. We may abstract it further by accepting a new parameter like SPHINXLANG='fr', with a default of 'en', but in every case I think it's a good thing to allow passing arbitrary SPHINXOPTS so let's start with this? ---------- Added file: http://bugs.python.org/file43865/allow_sphinxopts.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 24 12:27:40 2016 From: report at bugs.python.org (Brett Cannon) Date: Sun, 24 Jul 2016 16:27:40 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469377660.95.0.507054930836.issue27604@psf.upfronthosting.co.za> Brett Cannon added the comment: No, there are only the two optimizations, but I think historically the vagueness has been on purpose to allow us to add appropriate optimizations without breaking backwards-compatibility with what is documented. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 24 15:13:20 2016 From: report at bugs.python.org (Ram Rachum) Date: Sun, 24 Jul 2016 19:13:20 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469387600.69.0.639362779813.issue27604@psf.upfronthosting.co.za> Ram Rachum added the comment: So... The reasoning is that if someone adds optimizations to Python's `-O` mode (Something that hasn't happened in the last decade or two, right?) we want to save them from going to the trouble of writing two or three sentences in the docs describing the optimizations? Isn't it standard practice to require people who contribute code to Python to add documentation for their changes? Anyway, I think that it'll be a good idea to add two or three sentences that document it. Would you like a patch? If so against which version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 24 16:31:55 2016 From: report at bugs.python.org (Brett Cannon) Date: Sun, 24 Jul 2016 20:31:55 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469392315.93.0.300298234529.issue27604@psf.upfronthosting.co.za> Brett Cannon added the comment: Two things. One, I don't know if you meant for your comment to come off as antagonistic, but it did. Two, a patch is fine as long as it makes it clear that what optimizations are activated by the flag could change with no backwards-compatibility guarantees. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 24 21:56:17 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Jul 2016 01:56:17 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <20160725015614.20112.55681.6ECC9497@psf.io> Roundup Robot added the comment: New changeset a6be689eacf8 by Berker Peksag in branch '3.5': Issue #27601: Improve example in the "Hashing of numeric types" section https://hg.python.org/cpython/rev/a6be689eacf8 New changeset 06bbcbaeeb18 by Berker Peksag in branch 'default': Issue #27601: Merge from 3.5 https://hg.python.org/cpython/rev/06bbcbaeeb18 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 24 21:58:16 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 25 Jul 2016 01:58:16 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469411896.36.0.25069057311.issue27601@psf.upfronthosting.co.za> Berker Peksag added the comment: Looks good to me too. 'hash_value' looks more readable to me, thanks! ---------- nosy: +berker.peksag resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 24 22:22:01 2016 From: report at bugs.python.org (Aleksandr Koshkin) Date: Mon, 25 Jul 2016 02:22:01 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469413320.95.0.518009406498.issue27601@psf.upfronthosting.co.za> Aleksandr Koshkin added the comment: Originally I emphasized that this bug occurs at every py3k version since 3.2. For some reason version list somehow shrinked to only tow of them - 3.5 and 3.6. I am very sorry, this is probably my fault. ---------- resolution: fixed -> status: closed -> open versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 24 22:31:44 2016 From: report at bugs.python.org (Berker Peksag) Date: Mon, 25 Jul 2016 02:31:44 +0000 Subject: [docs] [issue27601] Minor inaccuracy in hash documentation In-Reply-To: <1469297872.54.0.246840894647.issue27601@psf.upfronthosting.co.za> Message-ID: <1469413904.09.0.607547622594.issue27601@psf.upfronthosting.co.za> Berker Peksag added the comment: > I am very sorry, this is probably my fault. It's not your fault :) I removed them. 3.2, 3.3 and 3.4 are in security-fix-only mode so they won't get any documentation updates. You can read https://docs.python.org/devguide/devcycle.html#secbranch for details about security branches. Thanks for the report! ---------- resolution: -> fixed status: open -> closed versions: -Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 24 23:01:51 2016 From: report at bugs.python.org (Roundup Robot) Date: Mon, 25 Jul 2016 03:01:51 +0000 Subject: [docs] [issue19198] Improve cross-references in cgi documentation In-Reply-To: <1381266335.84.0.645626523869.issue19198@psf.upfronthosting.co.za> Message-ID: <20160725030148.20197.75596.61784CE8@psf.io> Roundup Robot added the comment: New changeset 128ad410c776 by Terry Jan Reedy in branch 'default': Issue #19198: IDLE: tab after initial whitespace should tab, not autocomplete. https://hg.python.org/cpython/rev/128ad410c776 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 24 23:48:27 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 25 Jul 2016 03:48:27 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469418507.44.0.199662256534.issue26462@psf.upfronthosting.co.za> Changes by Martin Panter : Added file: http://bugs.python.org/file43872/issue26462.v3_regen.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 01:05:42 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 25 Jul 2016 05:05:42 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469423142.12.0.460352943356.issue26462@psf.upfronthosting.co.za> Martin Panter added the comment: With Julien?s patch applied, these are the remaining warnings: /media/disk/home/proj/python/cpython/Doc/library/configparser.rst:240: WARNING: Could not lex literal_block as "ini". Highlighting skipped. /media/disk/home/proj/python/cpython/Doc/library/configparser.rst:301: WARNING: Could not lex literal_block as "ini". Highlighting skipped. /media/disk/home/proj/python/cpython/Doc/library/configparser.rst:332: WARNING: Could not lex literal_block as "ini". Highlighting skipped. /media/disk/home/proj/python/cpython/Doc/library/configparser.rst:341: WARNING: Could not lex literal_block as "ini". Highlighting skipped. /media/disk/home/proj/python/cpython/Doc/reference/lexical_analysis.rst:799: WARNING: Could not lex literal_block as "python3". Highlighting skipped. /media/disk/home/proj/python/cpython/Doc/reference/lexical_analysis.rst:813: WARNING: Could not lex literal_block as "python3". Highlighting skipped. /media/disk/home/proj/python/cpython/Doc/whatsnew/2.4.rst:1430: WARNING: Could not lex literal_block as "python3". Highlighting skipped. /media/disk/home/proj/python/cpython/Doc/whatsnew/3.5.rst:285: WARNING: Could not lex literal_block as "python3". Highlighting skipped. /media/disk/home/proj/python/cpython/Doc/whatsnew/3.5.rst:294: WARNING: Could not lex literal_block as "python3". Highlighting skipped. Also, perhaps you didn?t see Georg?s comment in some unpatched code: ---------- nosy: +martin.panter _______________________________________ Python tracker _______________________________________ From vadmium+py at gmail.com Mon Jul 25 01:10:49 2016 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Mon, 25 Jul 2016 05:10:49 -0000 Subject: [docs] Patch to enhance literal block language declaration (issue 26462) Message-ID: <20160725051049.9334.87748@psf.upfronthosting.co.za> http://bugs.python.org/review/26462/diff/16666/Doc/whatsnew/3.2.rst File Doc/whatsnew/3.2.rst (right): http://bugs.python.org/review/26462/diff/16666/Doc/whatsnew/3.2.rst#newcode2048 Doc/whatsnew/3.2.rst:2048: .. code-block:: none On 2016/03/01 23:15:32, Zach Ware wrote: > This can be 'doscon' instead of 'none'. FWIW this still produces a warning for me (but maybe it is beneficial if Sphinx knows about ?doscon?): /media/disk/home/proj/python/cpython/Doc/whatsnew/3.2.rst:2050: WARNING: Pygments lexer name 'doscon' is not known http://bugs.python.org/review/26462/ From report at bugs.python.org Mon Jul 25 03:29:08 2016 From: report at bugs.python.org (Ram Rachum) Date: Mon, 25 Jul 2016 07:29:08 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469431748.38.0.124802756756.issue27604@psf.upfronthosting.co.za> Ram Rachum added the comment: Yes, my comment was antagonistic. I'm baffled that the first response to someone who wants to contribute to Python is an esoteric argument against the contribution. I understand that sometimes not all contributions can be accepted because they break existing assumptions, but since that's not the case here, I think that this kind of responses just put people off contributing. How about "Great idea, lots of people have been asking about Python's optimization mode on Stack Overflow and it'll be much nicer if they could see this information officially in the docs where they have more confidence that this information is correct. Except one thing, could you please mention that this behavior could change in future versions? This is important." Anyway, I'll send a patch later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 04:02:45 2016 From: report at bugs.python.org (Julien) Date: Mon, 25 Jul 2016 08:02:45 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469433760.29.0.120950408829.issue26462@psf.upfronthosting.co.za> Julien added the comment: Upladed a new patch, I was working on 3.5 branch so I did not get all errors. I'm still having: WARNING: Could not parse literal_block as "ini". highlighting skipped. But it may be considered another bug: pygments ini parser can't parse ini syntax used in configparser doc (probably due to the columns usage instead of equals signs): I prefer having an "can't parse ini" on an ini paragraph than "can't parse python3". ---------- Added file: http://bugs.python.org/file43874/issue26462.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 04:04:14 2016 From: report at bugs.python.org (Julien) Date: Mon, 25 Jul 2016 08:04:14 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469433854.64.0.907202516533.issue26462@psf.upfronthosting.co.za> Julien added the comment: Oh and, is there a proper way for me to generate a diff that rietveld can eat without someone regeneratig it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 05:09:12 2016 From: report at bugs.python.org (Ludovic Gasc) Date: Mon, 25 Jul 2016 09:09:12 +0000 Subject: [docs] [issue27579] Add a tutorial for AsyncIO in the documentation In-Reply-To: <1469025749.21.0.829921979586.issue27579@psf.upfronthosting.co.za> Message-ID: <1469437752.25.0.0443965635319.issue27579@psf.upfronthosting.co.za> Ludovic Gasc added the comment: Hi Terry, > I don't yet know how to work with git and github. I don't yet know how to work with tkinter and TK. I propose to combine our respective knowledge to improve the documentation together. If you give an all in one python file example with tkinter, I'll add that in the documentation via git and Github. Thanks for your help. Have a nice day. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 05:29:37 2016 From: report at bugs.python.org (STINNER Victor) Date: Mon, 25 Jul 2016 09:29:37 +0000 Subject: [docs] [issue27579] Add a tutorial for AsyncIO in the documentation In-Reply-To: <1469025749.21.0.829921979586.issue27579@psf.upfronthosting.co.za> Message-ID: <1469438977.41.0.319518548886.issue27579@psf.upfronthosting.co.za> STINNER Victor added the comment: "I would like the tutorial to include something like the following: Adding Tkinter GUI to Asyncio Program" Please open an issue in the asyncio-doc project: https://github.com/asyncio-doc/asyncio-doc There is now a small community working on this documentation project, so I don't think that it's worth to keep this issue open. But today, Tkinter is not really fully integrated with asyncio. So I'm not sure that it's only a matter of *documentation*, it's more a matter of code that should be written and/or completed no? Or maybe open a thread on the new async-sig mailing list? http://asyncio.readthedocs.io/en/latest/getting_help.html ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 09:02:52 2016 From: report at bugs.python.org (Martin Panter) Date: Mon, 25 Jul 2016 13:02:52 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469451772.21.0.972392350105.issue26462@psf.upfronthosting.co.za> Martin Panter added the comment: I think generating it with Mercurial (and not using Mercurial?s Git patch format) is the best way. I just left some more notes at . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 09:33:44 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Jul 2016 13:33:44 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469453624.29.0.0951589927218.issue27604@psf.upfronthosting.co.za> R. David Murray added the comment: Ram: Brett gave you the benefit of the doubt on whether or not your comment was *intended* to be antagonistic. Brett's comment was giving you the historical context for why it isn't documented, but said nothing about what we might do now. In fact, his use of the term "historically" implies that we could re-evaluate things now if we wish to, whether or not he meant that. You could have given him the benefit of the doubt. I know that is often hard, though. I've reacted negatively to a comment often enough myself that these days I try very hard to think two or three times about what the most charitable interpretation could be, and what the best way would be for moving the conversation forward in my response even if the other party really is being antagonistic. I've found that this works well more often than not. But yes, it is good for us to be reminded periodically that we should think about being welcoming any time we respond to a contribution. (On the other hand, you aren't exactly a new contributor, so Brett may have assumed he could take some shortcuts in speaking to you.) Also, you will find in *every* community that there is a tendency to "defend the status quo" (and we're explicit about this), so sometimes you do have to mount an argument for changing it. That's just human nature, but is also something I've been trying to train myself to be aware of (I'm still working on getting better at both of these :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 09:36:30 2016 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Jul 2016 13:36:30 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469453790.48.0.813662986545.issue27604@psf.upfronthosting.co.za> R. David Murray added the comment: Heh, clarification on "we're explicit about this". I was referring to Nick's aphorism, "The status quo wins a tie", which means that there has to be a *postive* reason to change the status quo. That's what we're explicit about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 09:44:27 2016 From: report at bugs.python.org (Ram Rachum) Date: Mon, 25 Jul 2016 13:44:27 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469454267.16.0.259939826047.issue27604@psf.upfronthosting.co.za> Ram Rachum added the comment: Thanks for your understanding David. I'll submit a patch for this issue soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 10:03:09 2016 From: report at bugs.python.org (Stefan Krah) Date: Mon, 25 Jul 2016 14:03:09 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469455389.25.0.992907809281.issue27604@psf.upfronthosting.co.za> Stefan Krah added the comment: I can see nothing wrong with msg271168. It's polite, informative, not apodictic and does not rule out the possibility of accepting a patch. Also, it answers a direct question from msg271142. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 13:47:42 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 25 Jul 2016 17:47:42 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469468862.89.0.285661142474.issue27604@psf.upfronthosting.co.za> Brett Cannon added the comment: If you had viewed the comment as esoteric, Ram, then you could have politely asked for a more in-depth explanation. To me the explanation seemed clear: the optimizations had not been documented so we could feel free in changing what -O meant without breaking any assumptions people had made. I didn't think about suggesting a doc patch saying as such while still documenting what it currently does until after I explained why the documentation is the way it is. As for discouraging contributions, please stop and think about how your messages read to newcomers to bugs.python.org. If I had never contributed and stumbled upon this issue thinking it was an easy one to help with and I saw an openly antagonistic message, I would think twice about participating if that was the kind of attitude I might be confronted with. And then think about how this discourages me from contributing. I took personal time out of my weekend to give you a prompt reply to your issue instead of making you wait until Monday or until someone else happened to reply so you knew the issue was noticed and you didn't start working on a patch that may not get accepted. And in response to me taking the time to respond to your message I get an antagonistic response. How does that in any way inspire me to want to help you out with this issue? And I certainly don't need this documentation change as I know what -O and -OO do, so if my time to try and help someone with an issue I don't directly benefit from leads to me getting grief for my efforts then why should I bother helping anyone unless it also helps me? It's this sort of tone in communication that is unnecessarily hostile towards project maintainers that leads to burnout and long-term contributors such as myself walking away from a project (and I'm not stating this lightly; this is just one instance in a string of incidents like this where I have been treated poorly that has convinced me to take some time off from helping others in my spare time after Python 3.6b1 is released to prevent me from quitting the Python project entirely). I'm going to remove myself from the nosy list so that I recuse myself from this issue so that my feelings about this whole situation doesn't influence any potential patch review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 13:47:50 2016 From: report at bugs.python.org (Brett Cannon) Date: Mon, 25 Jul 2016 17:47:50 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469468870.56.0.34065680079.issue27604@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 15:30:00 2016 From: report at bugs.python.org (Stefan Krah) Date: Mon, 25 Jul 2016 19:30:00 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469475000.12.0.571372442503.issue27604@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: -skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 19:00:41 2016 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 25 Jul 2016 23:00:41 +0000 Subject: [docs] [issue27618] docs for threading.Lock claim it's a class (since 3.3), but it's not (and has never been, apparently) In-Reply-To: <1469480103.96.0.342423272445.issue27618@psf.upfronthosting.co.za> Message-ID: <1469487641.04.0.487472284321.issue27618@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 21:43:22 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 26 Jul 2016 01:43:22 +0000 Subject: [docs] [issue27579] Add a tutorial for AsyncIO in the documentation In-Reply-To: <1469025749.21.0.829921979586.issue27579@psf.upfronthosting.co.za> Message-ID: <1469497401.97.0.432259604621.issue27579@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ludovic: Thank you for the offer. When I post a proposed text with code to #27546, I will nosy you if you have not already done so by then. Viktor: 'full integration' by adding a tk update in the standard _run_once is not possible as tkinter is not always present. I started #27546 by creating a custom subclass, but that requires dealing with the Selector and Proactor subclasses and default loop policy and still will not work with independent implementations. I considered a tk-loop implementation, but speed tests do not make that very inviting. The simple code I then tried is my current best recommendation. It will work with any asyncio compatible implementation. Besides the test with IDLE, Guido tested it with Examples/crawl.py, and I will improve on that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 25 23:22:17 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 26 Jul 2016 03:22:17 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469503337.58.0.435443749691.issue26462@psf.upfronthosting.co.za> Changes by Martin Panter : Added file: http://bugs.python.org/file43885/issue26462.v4_regen.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 01:44:12 2016 From: report at bugs.python.org (Ram Rachum) Date: Tue, 26 Jul 2016 05:44:12 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469511852.34.0.196423197842.issue27604@psf.upfronthosting.co.za> Ram Rachum added the comment: I'm sorry everyone, for being unpleasant on this thread. Rereading the thread from the beginning, I think I misunderstood Brett's message and immediately saw it as someone trying to block my efforts rather than just answering the question I asked. Anyway, I attached my patch. A couple of questions: 1. As you can see in the patch, I also found a spot in `Doc/c-api/veryhigh.rst` where optimization mode was mentioned, so I figured let's add the "this may change in the future" comment there. But I don't know that area of the docs at all, so let me know if that makes sense there. 2. I believe these are the docs for Python 3.4, right? Can this change be merged into the documentation for all versions of Python? ---------- keywords: +patch Added file: http://bugs.python.org/file43888/1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 02:20:38 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 26 Jul 2016 06:20:38 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise Message-ID: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> New submission from ???? ?????????: Docstring says: The signed keyword-only argument determines whether two's complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised. But actually, (130).to_bytes(1, 'big', signed=True) will also trigger OverflowError ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 271327 nosy: docs at python, mmarkk priority: normal severity: normal status: open title: int.to_bytes(): docstring is not precise type: enhancement versions: Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 02:22:23 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Jul 2016 06:22:23 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469514143.33.0.956003199141.issue27622@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is wrong? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From vadmium+py at gmail.com Tue Jul 26 02:32:56 2016 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Tue, 26 Jul 2016 06:32:56 -0000 Subject: [docs] Patch to enhance literal block language declaration (issue 26462) Message-ID: <20160726063256.9334.95564@psf.upfronthosting.co.za> https://bugs.python.org/review/26462/diff/17976/Doc/extending/newtypes.rst File Doc/extending/newtypes.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/extending/newtypes.rst#newcode212 Doc/extending/newtypes.rst:212: in a file called :file:`setup.py`; then typing: Not a big deal, but I don?t think this colon is needed https://bugs.python.org/review/26462/diff/17976/Doc/library/2to3.rst File Doc/library/2to3.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/library/2to3.rst#newcode63 Doc/library/2to3.rst:63: can be given with :option:`-f`. Likewise the :option:`-x` explicitly disables a I presume this line was changed accidentally. The :option:`-x` link is wrong; see where I made this change. https://bugs.python.org/review/26462/diff/17976/Doc/library/decimal.rst File Doc/library/decimal.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/library/decimal.rst#newcode168 Doc/library/decimal.rst:168: .. doctest:: $ make -C Doc/ doctest . . . WARNING: no code/output in doctest block at /media/disk/home/proj/python/cpython/Doc/library/decimal.rst:168 Also, with or without this change, I get no highlighting. Perhaps there should be a blank line inbetween? https://bugs.python.org/review/26462/diff/17976/Doc/library/decimal.rst#newcode173 Doc/library/decimal.rst:173: File "", line 1, in Or perhaps because of missing indentation here? https://bugs.python.org/review/26462/diff/17976/Doc/library/decimal.rst#newcode247 Doc/library/decimal.rst:247: .. doctest:: WARNING: no code/output in doctest block at /media/disk/home/proj/python/cpython/Doc/library/decimal.rst:247 https://bugs.python.org/review/26462/diff/17976/Doc/library/logging.config.rst File Doc/library/logging.config.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/library/logging.config.rst#newcode635 Doc/library/logging.config.rst:635: Examples of these sections in the file are given below. : This produces a floating colon (:) at the end of the line. Perhaps remove it completely? (same problem below) https://bugs.python.org/review/26462/diff/17976/Doc/library/pyexpat.rst File Doc/library/pyexpat.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/library/pyexpat.rst#newcode874 Doc/library/pyexpat.rst:874: not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl This is reverting an unrelated change (Issue 26736). I suggest not to mess with newlines in files you edit without a good reason. https://bugs.python.org/review/26462/diff/17976/Doc/library/subprocess.rst File Doc/library/subprocess.rst (left): https://bugs.python.org/review/26462/diff/17976/Doc/library/subprocess.rst#oldcode960 Doc/library/subprocess.rst:960: # becomes These are all hybrid python3 and Unix shell code. I guess ?python? means Python 2, where `...` means repr(...). I guess we could split here into two blocks (Unix shell and python3) https://bugs.python.org/review/26462/diff/17976/Doc/whatsnew/3.3.rst File Doc/whatsnew/3.3.rst (left): https://bugs.python.org/review/26462/diff/17976/Doc/whatsnew/3.3.rst#oldcode1002 Doc/whatsnew/3.3.rst:1002: $ ./python -q I think you can just drop the python -q line instead https://bugs.python.org/review/26462/diff/17976/Doc/whatsnew/3.5.rst File Doc/whatsnew/3.5.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/whatsnew/3.5.rst#newcode294 Doc/whatsnew/3.5.rst:294: .. code-block:: pycon $ make -C Doc/ suspicious PYTHON=python3 . . . WARNING: [whatsnew/3.5:294] "::" found in ".. code-block:: pycon" Maybe the double colon (::) needs adjusting? In fact, why is this change needed at all? Maybe it is just that my Sphinx or whatever needs updating to understand the new operator. https://bugs.python.org/review/26462/ From report at bugs.python.org Tue Jul 26 02:36:06 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 26 Jul 2016 06:36:06 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469514966.48.0.558685743999.issue26462@psf.upfronthosting.co.za> Martin Panter added the comment: I?ve finished going over the latest patch. There are a couple of problems; see the review link. Also, why did you add the changes in Doc/library/decimal.rst? In your second patch, you removed one of these changes, but now you have added more. They seem to reduce the number of doctests reported (make -C Doc/ doctest). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 02:50:48 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 26 Jul 2016 06:50:48 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469515848.72.0.461629641593.issue27622@psf.upfronthosting.co.za> ???? ????????? added the comment: The docstring does not say, that positive values also may raise OverflowError if it can not fit into `(byte_count * 8) - 1` bits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 02:51:37 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 26 Jul 2016 06:51:37 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469515897.82.0.623134343606.issue27622@psf.upfronthosting.co.za> ???? ????????? added the comment: I mean when signed=True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 02:53:10 2016 From: report at bugs.python.org (Roundup Robot) Date: Tue, 26 Jul 2016 06:53:10 +0000 Subject: [docs] [issue26638] Avoid warnings about missing CLI options when building documentation In-Reply-To: <1458881380.09.0.599104229044.issue26638@psf.upfronthosting.co.za> Message-ID: <20160726065258.24839.98910.D9F4E64C@psf.io> Roundup Robot added the comment: New changeset 3996dd17ca21 by Martin Panter in branch '3.5': Issue #26638: Don?t link 2to3 -l option to the tarfile -l option https://hg.python.org/cpython/rev/3996dd17ca21 New changeset d7cbaaba59e8 by Martin Panter in branch 'default': Issue #26638: Merge CLI link fix from 3.5 https://hg.python.org/cpython/rev/d7cbaaba59e8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 02:53:53 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 26 Jul 2016 06:53:53 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469516033.56.0.0276958110154.issue27622@psf.upfronthosting.co.za> INADA Naoki added the comment: docstring says: The integer is represented using length bytes. An OverflowError is raised if the integer is not representable with the given number of bytes. (Python 3.5.2) ---------- nosy: +methane _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 02:58:46 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 26 Jul 2016 06:58:46 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469516326.77.0.892628168788.issue27622@psf.upfronthosting.co.za> ???? ????????? added the comment: Well. Phrase `If signed is False and a negative integer is given, an OverflowError is raised.` describe onlyhalf of behaviour. It does not explain behaviour when `signed=True` and value is big enough to trigger exception, but not enough to trigger it when signed=False. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 02:59:59 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 26 Jul 2016 06:59:59 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469516399.33.0.538855707734.issue27622@psf.upfronthosting.co.za> ???? ????????? added the comment: So, in order to make documentation consistent, either new text should be added, or last phraze removed. That's what I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 03:01:37 2016 From: report at bugs.python.org (INADA Naoki) Date: Tue, 26 Jul 2016 07:01:37 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469516496.97.0.178626740382.issue27622@psf.upfronthosting.co.za> INADA Naoki added the comment: @mmarkk Do you read full docstring? It's documented very clearly. --- int.to_bytes(length, byteorder, *, signed=False) -> bytes Return an array of bytes representing an integer. The integer is represented using length bytes. An OverflowError is raised if the integer is not representable with the given number of bytes. The byteorder argument determines the byte order used to represent the integer. If byteorder is 'big', the most significant byte is at the beginning of the byte array. If byteorder is 'little', the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder' as the byte order value. The signed keyword-only argument determines whether two's complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised. --- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 03:03:45 2016 From: report at bugs.python.org (Martin Panter) Date: Tue, 26 Jul 2016 07:03:45 +0000 Subject: [docs] [issue26638] Avoid warnings about missing CLI options when building documentation In-Reply-To: <1458881380.09.0.599104229044.issue26638@psf.upfronthosting.co.za> Message-ID: <1469516625.32.0.415542721392.issue26638@psf.upfronthosting.co.za> Changes by Martin Panter : Added file: http://bugs.python.org/file43889/doc-warnings.v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 03:04:52 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Jul 2016 07:04:52 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469516692.39.0.113287599845.issue27622@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The docstring looks correct to me. The last phrase corresponds to the last paragraph that describes the signed keyword-only argument. Is there anyone else for whom the docstring looks wrong? ---------- _______________________________________ Python tracker _______________________________________ From python at mandark.fr Tue Jul 26 03:45:45 2016 From: python at mandark.fr (python at mandark.fr) Date: Tue, 26 Jul 2016 07:45:45 -0000 Subject: [docs] Patch to enhance literal block language declaration (issue 26462) Message-ID: <20160726074545.2716.36119@psf.upfronthosting.co.za> Reviewers: Zach Ware, Georg, vadmium, https://bugs.python.org/review/26462/diff/16666/Doc/whatsnew/3.2.rst File Doc/whatsnew/3.2.rst (right): https://bugs.python.org/review/26462/diff/16666/Doc/whatsnew/3.2.rst#newcode2048 Doc/whatsnew/3.2.rst:2048: .. code-block:: none On 2016/07/25 07:10:49, vadmium wrote: > Pygments lexer name 'doscon' is not known doscon looks known to some pygments version, at least mine did not give the warning about unknown lexer: http://pygments.org/docs/lexers/#pygments.lexers.shell.MSDOSSessionLexer Please review this at https://bugs.python.org/review/26462/ Affected files: Doc/distutils/examples.rst Doc/distutils/packageindex.rst Doc/distutils/sourcedist.rst Doc/extending/building.rst Doc/extending/embedding.rst Doc/extending/extending.rst Doc/extending/newtypes.rst Doc/faq/extending.rst Doc/howto/clinic.rst Doc/howto/logging-cookbook.rst Doc/howto/logging.rst Doc/howto/regex.rst Doc/howto/unicode.rst Doc/library/2to3.rst Doc/library/argparse.rst Doc/library/ast.rst Doc/library/asyncio-dev.rst Doc/library/cgi.rst Doc/library/cmd.rst Doc/library/decimal.rst Doc/library/doctest.rst Doc/library/email-examples.rst Doc/library/html.parser.rst Doc/library/idle.rst Doc/library/logging.config.rst Doc/library/optparse.rst Doc/library/pickletools.rst Doc/library/pyexpat.rst Doc/library/shutil.rst Doc/library/socketserver.rst Doc/library/subprocess.rst Doc/library/sys.rst Doc/library/sysconfig.rst Doc/library/tarfile.rst Doc/library/zipimport.rst Doc/reference/expressions.rst Doc/reference/lexical_analysis.rst Doc/tutorial/controlflow.rst Doc/tutorial/interpreter.rst Doc/tutorial/modules.rst Doc/whatsnew/2.3.rst Doc/whatsnew/2.4.rst Doc/whatsnew/2.7.rst Doc/whatsnew/3.0.rst Doc/whatsnew/3.2.rst Doc/whatsnew/3.3.rst Doc/whatsnew/3.5.rst From vadmium+py at gmail.com Tue Jul 26 04:37:07 2016 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Tue, 26 Jul 2016 08:37:07 -0000 Subject: [docs] Patch to enhance literal block language declaration (issue 26462) Message-ID: <20160726083707.16015.49196@psf.upfronthosting.co.za> https://bugs.python.org/review/26462/diff/16666/Doc/whatsnew/3.2.rst File Doc/whatsnew/3.2.rst (right): https://bugs.python.org/review/26462/diff/16666/Doc/whatsnew/3.2.rst#newcode2048 Doc/whatsnew/3.2.rst:2048: .. code-block:: none On 2016/07/26 09:45:45, sizeof wrote: > On 2016/07/25 07:10:49, vadmium wrote: > > Pygments lexer name 'doscon' is not known > > doscon looks known to some pygments version, at least mine did not give the > warning about unknown lexer: > > http://pygments.org/docs/lexers/#pygments.lexers.shell.MSDOSSessionLexer Yeah I think it is safe to ignore this. After I posted that I discovered that you need Pygments 2.1 and I only have 2.0. https://bugs.python.org/review/26462/ From python at mandark.fr Tue Jul 26 05:21:30 2016 From: python at mandark.fr (python at mandark.fr) Date: Tue, 26 Jul 2016 09:21:30 -0000 Subject: [docs] Patch to enhance literal block language declaration (issue 26462) Message-ID: <20160726092130.19181.48151@psf.upfronthosting.co.za> Thanks for all that feedback I should clearly have reviewed my patch deeper, not prod of me... I'm submitting "issue26462.v5.diff", I'm trying to generate a diff format that rietveld will understand but I'm not sure to one-shot it, I'm using: git diff --staged | sed 's/^\(@@ .* @@\).*$/\1/g' | grep -v '^index' > issue26462.v5.diff (I may also learn to use mercurial, but as it look you're migrating to git, I'm not sure it's worth the effort. But if it's the only way to generate rietveld-compatible patches and it saves you time (by not having to regenerate each of my patches), tell me and I'll do. If my sed is enough, cool). https://bugs.python.org/review/26462/diff/17976/Doc/extending/newtypes.rst File Doc/extending/newtypes.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/extending/newtypes.rst#newcode212 Doc/extending/newtypes.rst:212: in a file called :file:`setup.py`; then typing: On 2016/07/26 08:32:56, vadmium wrote: > Not a big deal, but I don?t think this colon is needed Done. https://bugs.python.org/review/26462/diff/17976/Doc/library/2to3.rst File Doc/library/2to3.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/library/2to3.rst#newcode63 Doc/library/2to3.rst:63: can be given with :option:`-f`. Likewise the :option:`-x` explicitly disables a On 2016/07/26 08:32:56, vadmium wrote: > I presume this line was changed accidentally. The :option:`-x` link is wrong; > see where I made this change. Done. https://bugs.python.org/review/26462/diff/17976/Doc/library/decimal.rst File Doc/library/decimal.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/library/decimal.rst#newcode168 Doc/library/decimal.rst:168: .. doctest:: On 2016/07/26 08:32:56, vadmium wrote: > $ make -C Doc/ doctest > . . . > WARNING: no code/output in doctest block at > /media/disk/home/proj/python/cpython/Doc/library/decimal.rst:168 > > Also, with or without this change, I get no highlighting. Perhaps there should > be a blank line inbetween? Done, it was the wrong Traceback indentation. https://bugs.python.org/review/26462/diff/17976/Doc/library/decimal.rst#newcode173 Doc/library/decimal.rst:173: File "", line 1, in On 2016/07/26 08:32:56, vadmium wrote: > Or perhaps because of missing indentation here? Done, it was exactly this. https://bugs.python.org/review/26462/diff/17976/Doc/library/decimal.rst#newcode247 Doc/library/decimal.rst:247: .. doctest:: On 2016/07/26 08:32:56, vadmium wrote: > WARNING: no code/output in doctest block at > /media/disk/home/proj/python/cpython/Doc/library/decimal.rst:247 Done. Missing newline after `.. doctest::` https://bugs.python.org/review/26462/diff/17976/Doc/library/logging.config.rst File Doc/library/logging.config.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/library/logging.config.rst#newcode635 Doc/library/logging.config.rst:635: Examples of these sections in the file are given below. : On 2016/07/26 08:32:56, vadmium wrote: > This produces a floating colon (:) at the end of the line. Perhaps remove it > completely? (same problem below) Done. https://bugs.python.org/review/26462/diff/17976/Doc/library/pyexpat.rst File Doc/library/pyexpat.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/library/pyexpat.rst#newcode874 Doc/library/pyexpat.rst:874: not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl On 2016/07/26 08:32:56, vadmium wrote: > This is reverting an unrelated change (Issue 26736). I suggest not to mess with > newlines in files you edit without a good reason. Done, as my patch was a few month old it not merged properly, I should have reviewed it myself in depth... sry for that. https://bugs.python.org/review/26462/diff/17976/Doc/library/subprocess.rst File Doc/library/subprocess.rst (left): https://bugs.python.org/review/26462/diff/17976/Doc/library/subprocess.rst#oldcode960 Doc/library/subprocess.rst:960: # becomes On 2016/07/26 08:32:56, vadmium wrote: > These are all hybrid python3 and Unix shell code. I guess ?python? means Python > 2, where `...` means repr(...). > > I guess we could split here into two blocks (Unix shell and python3) Done (splitted). https://bugs.python.org/review/26462/diff/17976/Doc/whatsnew/3.3.rst File Doc/whatsnew/3.3.rst (left): https://bugs.python.org/review/26462/diff/17976/Doc/whatsnew/3.3.rst#oldcode1002 Doc/whatsnew/3.3.rst:1002: $ ./python -q On 2016/07/26 08:32:56, vadmium wrote: > I think you can just drop the python -q line instead Done (removed the line). https://bugs.python.org/review/26462/diff/17976/Doc/whatsnew/3.5.rst File Doc/whatsnew/3.5.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/whatsnew/3.5.rst#newcode294 Doc/whatsnew/3.5.rst:294: .. code-block:: pycon On 2016/07/26 08:32:56, vadmium wrote: > $ make -C Doc/ suspicious PYTHON=python3 > . . . > WARNING: [whatsnew/3.5:294] "::" found in ".. code-block:: pycon" > > Maybe the double colon (::) needs adjusting? > > In fact, why is this change needed at all? Maybe it is just that my Sphinx or > whatever needs updating to understand the new operator. Without my buggy `::` I'm getting "Could not parse literal_block as "pycon"", clearly our parsers are not up-to-date and should be fixed. I'll see what I can do about it, but it's another unrelated patch so I just drop this `.. code-block:: pycon` and keep the warning to explicitly tell there's a problem here. https://bugs.python.org/review/26462/ From report at bugs.python.org Tue Jul 26 05:22:02 2016 From: report at bugs.python.org (Julien) Date: Tue, 26 Jul 2016 09:22:02 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469524920.06.0.989471691406.issue26462@psf.upfronthosting.co.za> Julien added the comment: Here a new patch after reviewing comments on rietveld. ---------- Added file: http://bugs.python.org/file43892/issue26462.v5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 05:26:19 2016 From: report at bugs.python.org (Julien) Date: Tue, 26 Jul 2016 09:26:19 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469525179.89.0.329114905118.issue26462@psf.upfronthosting.co.za> Julien added the comment: @martin I reviewed my changes on `decimal.rst` and I now just fixing the indentation problem, so I don't change anything unrealated to fixing warnings, and don't break doctests. ---------- _______________________________________ Python tracker _______________________________________ From neotrader86 at outlook.com Mon Jul 25 00:49:02 2016 From: neotrader86 at outlook.com (Bruno Clementi) Date: Mon, 25 Jul 2016 04:49:02 +0000 Subject: [docs] Python Documentation - EPUB Download Message-ID: Hello! I'm currently learning python and I'm using the documentation to consult specific topics, but I also would like to read it, studying it as a "text" book, and one of the reasons that I don't do it as much as I otherwise would, is because it is difficult to read it on my smarphone or tablet, because I have to constatly adjust the text in order to fit the text to the screen. I tried taking the pdf and converting it to EPUB, but it never comes out right and the coding part, which would be better to read by opening it as an image, is always the worst formatted part. That being said, one suggestion I would make, specially taking into account the widespread use of smartphones, tablets and ereaders today and since you already have different times of formats for the documentation to be downloaded, would be to add the option to download the documentation on epub format. Thank you for the time and attention. Bruno Clementi From report at bugs.python.org Tue Jul 26 09:00:53 2016 From: report at bugs.python.org (Doug Hoskisson) Date: Tue, 26 Jul 2016 13:00:53 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() Message-ID: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> New submission from Doug Hoskisson: The documentation for Queue.qsize(): "Return the approximate size of the queue." "approximate" is unclear. It might suggest some strategy used for approximating, or it might be the exact size at an arbitrary time. It should be made more clear. ---------- assignee: docs at python components: Documentation messages: 271362 nosy: Doug Hoskisson, docs at python priority: normal severity: normal status: open title: unclear documentation on Queue.qsize() versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 11:13:38 2016 From: report at bugs.python.org (SilentGhost) Date: Tue, 26 Jul 2016 15:13:38 +0000 Subject: [docs] [issue27626] Spelling fixes Message-ID: <1469546018.68.0.327961283898.issue27626@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- assignee: -> docs at python components: +Documentation nosy: +SilentGhost, docs at python stage: -> patch review type: enhancement -> behavior versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 11:25:38 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 26 Jul 2016 15:25:38 +0000 Subject: [docs] [issue27461] Optimize PNGs In-Reply-To: <1467894574.39.0.144098385194.issue27461@psf.upfronthosting.co.za> Message-ID: <1469546730.3.0.0342985915132.issue27461@psf.upfronthosting.co.za> Ville Skytt? added the comment: Updated patch against tip. Before: 289426 total After: 194638 total ---------- Added file: http://bugs.python.org/file43896/pngs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 11:25:56 2016 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Tue, 26 Jul 2016 15:25:56 +0000 Subject: [docs] [issue27461] Optimize PNGs In-Reply-To: <1467894574.39.0.144098385194.issue27461@psf.upfronthosting.co.za> Message-ID: <1469546756.37.0.127318878605.issue27461@psf.upfronthosting.co.za> Changes by Ville Skytt? : Removed file: http://bugs.python.org/file43653/pngs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 11:34:43 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Jul 2016 15:34:43 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469547283.03.0.658243157378.issue27604@psf.upfronthosting.co.za> R. David Murray added the comment: It might be better to reduce redundancy (ie: minimize the places that would need changing) by creating a cross link from the option description to the technical details in veryhigh.rst. You could make the existing words 'basic optimizations' the link text. Doc changes will be made to 3.5 and 3.6. I've adjusted the versions accordingly. A single patch against 3.5 will be merged into 3.6 by the committer. ---------- versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 11:46:11 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Jul 2016 15:46:11 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469547971.83.0.41993920005.issue27622@psf.upfronthosting.co.za> R. David Murray added the comment: Looks correct to me as well. If you can think of a wording that would be clearer, ????, that would be great, but it shouldn't make the docstring much wordier (we strive for conciseness in docstrings). That the last phrase can't be just removed without omitting an important piece of information (an *additional* time OverflowError can be raised). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 11:47:10 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Jul 2016 15:47:10 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469548030.63.0.198428820493.issue27622@psf.upfronthosting.co.za> R. David Murray added the comment: Looks correct to me as well. If you can think of a wording that would be clearer, ????, that would be great, but it shouldn't make the docstring much wordier (we strive for conciseness in docstrings). That last phrase can't be just removed without omitting an important piece of information (an *additional* time OverflowError can be raised). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 11:47:18 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Jul 2016 15:47:18 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469548038.59.0.355761663829.issue27622@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- Removed message: http://bugs.python.org/msg271381 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 11:53:53 2016 From: report at bugs.python.org (Emanuel Barry) Date: Tue, 26 Jul 2016 15:53:53 +0000 Subject: [docs] [issue27626] Spelling fixes Message-ID: <1469548433.15.0.911548060088.issue27626@psf.upfronthosting.co.za> New submission from Emanuel Barry: LGTM. ---------- nosy: +ebarry stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 12:01:21 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Jul 2016 16:01:21 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469548881.52.0.551640266022.issue27624@psf.upfronthosting.co.za> R. David Murray added the comment: Since we're talking about multi-threaded operations, the concept of "exact size at an arbitrary time" isn't operationally different from "a strategy used for approximating". The subsequent text clarifies what "approximately" means operationally. Specifying it further would be, I think, overspecification. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 13:04:49 2016 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 26 Jul 2016 17:04:49 +0000 Subject: [docs] [issue27626] Spelling fixes In-Reply-To: <1469548433.15.0.911548060088.issue27626@psf.upfronthosting.co.za> Message-ID: <1469552689.37.0.34088270897.issue27626@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +martin.panter, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 14:34:57 2016 From: report at bugs.python.org (=?utf-8?b?0JzQsNGA0Log0JrQvtGA0LXQvdCx0LXRgNCz?=) Date: Tue, 26 Jul 2016 18:34:57 +0000 Subject: [docs] [issue27622] int.to_bytes(): docstring is not precise In-Reply-To: <1469514037.92.0.489318728995.issue27622@psf.upfronthosting.co.za> Message-ID: <1469558097.0.0.21382960326.issue27622@psf.upfronthosting.co.za> ???? ????????? added the comment: Ok. This is minor fix, I will not fight for my point of view :) ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 14:51:45 2016 From: report at bugs.python.org (Doug Hoskisson) Date: Tue, 26 Jul 2016 18:51:45 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469559105.07.0.713899185912.issue27624@psf.upfronthosting.co.za> Doug Hoskisson added the comment: Some strategies for approximating might report a size the the queue has never been and never will be. For example, a strategy could gather data and find the size is increasing at some rate, and approximate based on that rate, but then the rate of increase changes before it reaches the approximated size. That's the kind of thing that "approximate" would suggest to some people. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 14:57:33 2016 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Jul 2016 18:57:33 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469559453.87.0.924370271243.issue27624@psf.upfronthosting.co.za> R. David Murray added the comment: What if we just replaced the period with a colon? That is, the definition of "approximate" is the two rules in the second sentence. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 15:13:21 2016 From: report at bugs.python.org (Doug Hoskisson) Date: Tue, 26 Jul 2016 19:13:21 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469560401.36.0.355252323399.issue27624@psf.upfronthosting.co.za> Doug Hoskisson added the comment: The way that this whole page of documentation is written does not suggest that this class is ONLY for use in a multi-threaded setting. This class can be used without multi-threading, right? Wouldn't it be useful to know whether this function does give the exact size of the queue in a single-threaded setting? Right now, it doesn't contain that information. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 17:29:11 2016 From: report at bugs.python.org (Doug Hoskisson) Date: Tue, 26 Jul 2016 21:29:11 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469568551.04.0.150552325924.issue27624@psf.upfronthosting.co.za> Doug Hoskisson added the comment: One thing that is important to recognize in considering this, is which information is specific to what is being documented, and which information is more general. Some people may think that documentation should only give information specific to what is being documented. Others may think it is useful to also include general information that can help people learn. I don't know whether the writers of Python documentation lean to one of these or the other, but this contains a significant amount of information that has nothing to do with Python specifically, nothing to do with this class specifically, and nothing to do with this function specifically. (Again, I'm not saying this is bad. I just think it's important for people to recognize it.) It's just general multi-threading knowledge. Anyone who knows about multi-threading (in any language) knows that the queue could change between two function calls. But despite that extra general information, there is some specific information missing. Does it return the size of the queue (at the time the memory is accessed by the function call)? or does it use a more complex strategy for approximating the size of the queue? The reason this information is important is that if it is the former, that would be useful in single-threaded situations. I am guessing that it is the former, but I don't know because not enough information is given. Assuming that guess, I think following the model I see in the documentation of the next 2 functions on the page (Queue.empty() and Queue.full()) would be a good idea. That is, that the first sentence should only contain information specific to what is being documented, and more general information (about multi-threading) can be given afterward. The fact that the size returned is approximate would have nothing to do with this function specifically, and it is just general information about how multi-threading works. My suggestion for this documentation (again, assuming that my guess of the missing information is correct) I will put in a separate comment because this comment will be TLDR for many. If my guess is incorrect, then something should be clarified to lessen people guessing thus. (Maybe this is just projecting, but I think most people would make the same guess that I am making.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 17:30:03 2016 From: report at bugs.python.org (Doug Hoskisson) Date: Tue, 26 Jul 2016 21:30:03 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469568603.73.0.304330110175.issue27624@psf.upfronthosting.co.za> Doug Hoskisson added the comment: My suggestion for this documentation: """ Return the number of items in the queue. Note, in multi-threading this mostly just serves as an approximation, and information from this doesn?t guarantee that a subsequent get() or put() will not block. """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 26 23:41:56 2016 From: report at bugs.python.org (Martin Panter) Date: Wed, 27 Jul 2016 03:41:56 +0000 Subject: [docs] [issue27626] Spelling fixes In-Reply-To: <1469548433.15.0.911548060088.issue27626@psf.upfronthosting.co.za> Message-ID: <1469590913.87.0.078305978556.issue27626@psf.upfronthosting.co.za> Martin Panter added the comment: Here is a patch that fixes some more related misspellings. This includes some test method names, and one internal C function variable. FWIW nonexistant vs nonexistent may be a bit controversial (and neither look particularly wrong to me), so I didn?t change any other occurrences, but the existing change looks okay to be consistent with the ?self._nonexistent_dir? spelling. ---------- Added file: http://bugs.python.org/file43906/spelling.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 00:12:36 2016 From: report at bugs.python.org (Xiang Zhang) Date: Wed, 27 Jul 2016 04:12:36 +0000 Subject: [docs] [issue27626] Spelling fixes In-Reply-To: <1469548433.15.0.911548060088.issue27626@psf.upfronthosting.co.za> Message-ID: <1469592756.73.0.230341114638.issue27626@psf.upfronthosting.co.za> Xiang Zhang added the comment: LGTM. ---------- nosy: +xiang.zhang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 05:36:51 2016 From: report at bugs.python.org (SilentGhost) Date: Wed, 27 Jul 2016 09:36:51 +0000 Subject: [docs] [issue27633] Doc: Add missing version info to email.parser In-Reply-To: <1469611833.34.0.859096267207.issue27633@psf.upfronthosting.co.za> Message-ID: <1469612211.07.0.943868546769.issue27633@psf.upfronthosting.co.za> SilentGhost added the comment: LGTM ---------- assignee: -> docs at python components: +Documentation nosy: +SilentGhost, docs at python stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 06:33:11 2016 From: report at bugs.python.org (Roundup Robot) Date: Wed, 27 Jul 2016 10:33:11 +0000 Subject: [docs] [issue27633] Doc: Add missing version info to email.parser In-Reply-To: <1469611833.34.0.859096267207.issue27633@psf.upfronthosting.co.za> Message-ID: <20160727103308.94294.67642.1D425AA6@psf.io> Roundup Robot added the comment: New changeset 3f2e37e705d3 by Berker Peksag in branch '3.5': Issue #27633: Fix usage of versionchanged directive in email.parser.rst https://hg.python.org/cpython/rev/3f2e37e705d3 New changeset 8224ad99842e by Berker Peksag in branch 'default': Issue #27633: Merge from 3.5 https://hg.python.org/cpython/rev/8224ad99842e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 06:33:53 2016 From: report at bugs.python.org (Berker Peksag) Date: Wed, 27 Jul 2016 10:33:53 +0000 Subject: [docs] [issue27633] Doc: Add missing version info to email.parser In-Reply-To: <1469611833.34.0.859096267207.issue27633@psf.upfronthosting.co.za> Message-ID: <1469615632.93.0.09736169782.issue27633@psf.upfronthosting.co.za> Berker Peksag added the comment: Good catch, thanks! ---------- nosy: +berker.peksag resolution: -> fixed stage: commit review -> resolved status: open -> closed type: enhancement -> behavior versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 10:18:34 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Jul 2016 14:18:34 +0000 Subject: [docs] [issue27626] Spelling fixes In-Reply-To: <1469548433.15.0.911548060088.issue27626@psf.upfronthosting.co.za> Message-ID: <1469629114.3.0.592284639477.issue27626@psf.upfronthosting.co.za> R. David Murray added the comment: LGTM as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 11:12:26 2016 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Jul 2016 15:12:26 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469632346.12.0.782244497586.issue27624@psf.upfronthosting.co.za> STINNER Victor added the comment: """ Return the number of items in the queue. Note, in multi-threading this mostly just serves as an approximation, and information from this doesn?t guarantee that a subsequent get() or put() will not block. """ I dislike this description. If I understand correctly, the issue is that someone must not rely on the size to check if the queue is empty or not. If I'm right, the doc must be more explicit. Something like: "The size must not be used to check if get() or put() will block. Use get_nowait() and put_nowait(), or get() and put() in non-blocking mode (block=False)." There is even a Wikipedia article on the bug :-) https://en.wikipedia.org/wiki/Time_of_check_to_time_of_use (I'm not sure that it's exactly the same class of bug.) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 12:12:14 2016 From: report at bugs.python.org (Doug Hoskisson) Date: Wed, 27 Jul 2016 16:12:14 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469635933.98.0.888401149317.issue27624@psf.upfronthosting.co.za> Doug Hoskisson added the comment: More explicit is ok, if that's what people want, but just not in the first sentence, because that stuff has nothing to do with what is being documented specifically (as evidenced by referencing a wikipedia article that doesn't even mention python). I don't think more explicit is necessary, but if that's what others want, it's not bad. How much of the python documentation should be dedicated to teaching people stuff that has nothing to do with python specifically? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 13:07:25 2016 From: report at bugs.python.org (July Tikhonov) Date: Wed, 27 Jul 2016 17:07:25 +0000 Subject: [docs] [issue27635] pickle documentation says that unpickling may not call __new__ Message-ID: <1469639245.7.0.966654223743.issue27635@psf.upfronthosting.co.za> New submission from July Tikhonov: A note just below object.__setstate__() documentation https://docs.python.org/3.6/library/pickle.html#object.__setstate__ says that """ ? the type should implement __getnewargs__() or __getnewargs_ex__() to establish such an invariant; otherwise, neither __new__() nor __init__() will be called. """ I believe that note about not calling __new__() was relevant in python2. I could not find case in python3 in which __new__() would not be called. And __init__() is not called anyway, as far as I understand (unless explicitly by __setstate__() or something). Python 3.6.0a3+ (default:da9898e7e90d, Jul 27 2016, 19:51:12) [GCC 4.9.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class C: ... def __getstate__(self): return {'foo' : self.foo} ... def __setstate__(self, state): self.foo = state['foo'] ... def __new__(cls): ... print('__new__ is called'); return super().__new__(cls) ... def __init__(self): ... print('__init__ is called'); self.foo = None; super().__init__() ... >>> c = C(); c.foo = 'bar' __new__ is called __init__ is called >>> import pickle >>> c2 = pickle.loads(pickle.dumps(c)) __new__ is called >>> c2.foo 'bar' ---------- assignee: docs at python components: Documentation messages: 271465 nosy: docs at python, july priority: normal severity: normal status: open title: pickle documentation says that unpickling may not call __new__ versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 14:41:04 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Jul 2016 18:41:04 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469644864.76.0.0917068252597.issue27624@psf.upfronthosting.co.za> R. David Murray added the comment: The current wording is, IMO, better than the suggested wording, especially if you don't want to be "teaching stuff". The current wording is a specification of the method's behavior. I really don't know what you could replace "approximate" with that would improve it without having to get into a description of the behavior of a threaded program. It seems like you are wanting us to document that the function will return an accurate size if the program is single threaded, but I don't think we want to do that, because that is not part of the specification of the method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 14:55:24 2016 From: report at bugs.python.org (Doug Hoskisson) Date: Wed, 27 Jul 2016 18:55:24 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469645724.67.0.972364911222.issue27624@psf.upfronthosting.co.za> Doug Hoskisson added the comment: It is inconsistent with other documentation right next to it. Should the documentation for empty() say "Return True if the queue is approximately empty, False otherwise."? Should the documentation for full() say "Return True if the queue is approximately full, False otherwise."? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 14:59:45 2016 From: report at bugs.python.org (Doug Hoskisson) Date: Wed, 27 Jul 2016 18:59:45 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469645985.43.0.579953606883.issue27624@psf.upfronthosting.co.za> Doug Hoskisson added the comment: If the specification of the empty method is to return whether the queue is empty, then the programmers have failed to meet that specification, because by the time you get that return value, it might not be empty anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 15:04:53 2016 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Jul 2016 19:04:53 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469646293.76.0.690768085241.issue27624@psf.upfronthosting.co.za> R. David Murray added the comment: The subsequent text specifies the behavior. You *could* delete the 'approximately' from the qsize documentation to be parallel, but I think that would be a disservice to the reader. You could also use the phrase "at the moment of the call" in all three, which might be acceptable. Let's see what Raymond has to say, when he has time to respond. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 15:40:41 2016 From: report at bugs.python.org (Doug Hoskisson) Date: Wed, 27 Jul 2016 19:40:41 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469648441.39.0.554786795426.issue27624@psf.upfronthosting.co.za> Doug Hoskisson added the comment: My suggestion was not to delete the "approximate" entirely. Just move it out of the first sentence to make it more consistent with the other documentation. This is the model I'm seeing in empty() and full(): The first sentence is something simple and direct (without nebulous words that will make people wonder what it means), and then after that, comment on the race-condition stuff. I think that documentation is good, and it would be good to follow the same model for qsize(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 15:54:36 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 27 Jul 2016 19:54:36 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469649276.33.0.905470196997.issue27624@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 27 21:33:50 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 28 Jul 2016 01:33:50 +0000 Subject: [docs] [issue27626] Spelling fixes In-Reply-To: <1469548433.15.0.911548060088.issue27626@psf.upfronthosting.co.za> Message-ID: <20160728013346.19971.31345.19F13E72@psf.io> Roundup Robot added the comment: New changeset 6080d720cbf5 by Martin Panter in branch '3.5': Issue #27626: Spelling fixes in docs, comments and internal names https://hg.python.org/cpython/rev/6080d720cbf5 New changeset 3f337cce758c by Martin Panter in branch 'default': Issue #27626: Merge spelling fixes from 3.5 https://hg.python.org/cpython/rev/3f337cce758c New changeset e12dee34deae by Martin Panter in branch 'default': Issue #27626: Further spelling fixes for 3.6 https://hg.python.org/cpython/rev/e12dee34deae ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 00:20:05 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 28 Jul 2016 04:20:05 +0000 Subject: [docs] [issue23943] Misspellings in a few files In-Reply-To: <1428975576.21.0.663921788116.issue23943@psf.upfronthosting.co.za> Message-ID: <20160728042002.21097.53589.76741335@psf.io> Roundup Robot added the comment: New changeset b0addbbc7671 by Martin Panter in branch '2.7': Issue #23943: Fix typos. Patch by Piotr Kasprzyk. https://hg.python.org/cpython/rev/b0addbbc7671 New changeset 48f074e2afcf by Martin Panter in branch '3.5': Issue #23943: Restore extra fixes lost in merge 4fb2075952a4 https://hg.python.org/cpython/rev/48f074e2afcf New changeset 0026d94d45e6 by Martin Panter in branch 'default': Issue #23943: Merge spelling fixes from 3.5 https://hg.python.org/cpython/rev/0026d94d45e6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 00:20:06 2016 From: report at bugs.python.org (Roundup Robot) Date: Thu, 28 Jul 2016 04:20:06 +0000 Subject: [docs] [issue27626] Spelling fixes In-Reply-To: <1469548433.15.0.911548060088.issue27626@psf.upfronthosting.co.za> Message-ID: <20160728042002.21097.47357.4A1FFB41@psf.io> Roundup Robot added the comment: New changeset c8c1ea94379a by Martin Panter in branch '2.7': Issue #27626: Spelling fixes in docs, comments and internal names https://hg.python.org/cpython/rev/c8c1ea94379a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 01:13:42 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 28 Jul 2016 05:13:42 +0000 Subject: [docs] [issue27626] Spelling fixes In-Reply-To: <1469548433.15.0.911548060088.issue27626@psf.upfronthosting.co.za> Message-ID: <1469682822.1.0.35009093264.issue27626@psf.upfronthosting.co.za> Martin Panter added the comment: Thanks for the patch ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 03:39:59 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 28 Jul 2016 07:39:59 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469691599.28.0.274093787166.issue26462@psf.upfronthosting.co.za> Changes by Martin Panter : Added file: http://bugs.python.org/file43915/issue26462.v5_regen.diff _______________________________________ Python tracker _______________________________________ From vadmium+py at gmail.com Thu Jul 28 04:30:45 2016 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Thu, 28 Jul 2016 08:30:45 -0000 Subject: [docs] Patch to enhance literal block language declaration (issue 26462) Message-ID: <20160728083045.4951.19035@psf.upfronthosting.co.za> https://bugs.python.org/review/26462/diff/17976/Doc/whatsnew/3.2.rst File Doc/whatsnew/3.2.rst (right): https://bugs.python.org/review/26462/diff/17976/Doc/whatsnew/3.2.rst#newcode487 Doc/whatsnew/3.2.rst:487: $ python -q Lets leave this as you had it before; it is demonstrating the -q option https://bugs.python.org/review/26462/ From report at bugs.python.org Thu Jul 28 04:31:45 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 28 Jul 2016 08:31:45 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469694705.14.0.252257810125.issue26462@psf.upfronthosting.co.za> Martin Panter added the comment: V5 looks pretty good to me. With your blessing of restoring the python -q example from v4 (see review), I think it is ready to commit. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 05:27:27 2016 From: report at bugs.python.org (Julien) Date: Thu, 28 Jul 2016 09:27:27 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469698043.6.0.168902689051.issue26462@psf.upfronthosting.co.za> Julien added the comment: Hi, You're right, nice catch! Removing `python -q` from the code block demonstrating it was a bad idea. I fixed it in the v6. Thanks! ---------- Added file: http://bugs.python.org/file43916/issue26462.v6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 07:13:27 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 28 Jul 2016 11:13:27 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469704407.42.0.882099581211.issue26462@psf.upfronthosting.co.za> Martin Panter added the comment: One last change I think needs making to the same demo, the ?code-block? needs indenting under the bullet point: * The interpreter can now be started with a quiet option, ``-q``, to prevent the copyright and version information from being displayed in the interactive mode. The option can be introspected using the :attr:`sys.flags` attribute: .. code-block:: shell-session <== Indented $ python -q Otherwise, it seems to include extra text in the code block. ---------- _______________________________________ Python tracker _______________________________________ From luca.percich at gmail.com Thu Jul 28 04:52:34 2016 From: luca.percich at gmail.com (Luca Sigfrido Percich) Date: Thu, 28 Jul 2016 10:52:34 +0200 Subject: [docs] Broken links Message-ID: Hi, the following links from https://docs.python.org/3.4/download.html are broken: https://docs.python.org/3.4/archives/python-3.4.5-docs-pdf-letter.tar.bz2 https://docs.python.org/3.4/archives/python-3.4.5-docs-pdf-a4.tar.bz2 https://docs.python.org/3.4/archives/python-3.4.5-docs-text.tar.bz2 https://docs.python.org/3.4/archives/python-3.4.5-docs.epub Best regards Sig -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Thu Jul 28 09:48:46 2016 From: report at bugs.python.org (Julien) Date: Thu, 28 Jul 2016 13:48:46 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469713721.42.0.904401265098.issue26462@psf.upfronthosting.co.za> Julien added the comment: Hi, Indentation in whatsnew/3.2 fixed. Colors in this block are clearly not perfect, but I think that's another subject. ---------- Added file: http://bugs.python.org/file43923/issue26462.v7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 09:58:52 2016 From: report at bugs.python.org (Julien) Date: Thu, 28 Jul 2016 13:58:52 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469714332.67.0.310098471319.issue26462@psf.upfronthosting.co.za> Julien added the comment: Hi, Would you like me to also provide patches for different versions? I only provided patches for the default branch, but I'll gladly see this applied on other branches, as I often build them all. Also is a documented policy about maintaining the documentation? I have some questions like: - Should we maintain bugfix/security/end-of-life branches? - Are we even allowed to push a documentation change to them? - I'm seeing that the 3.x documentation are converging by using the "New in version 3.xx." marks, but they still different, is this effort documented? - Is this a goal to merge them on the long term? - Is there a team on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 10:09:08 2016 From: report at bugs.python.org (Decorater) Date: Thu, 28 Jul 2016 14:09:08 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469714948.91.0.11036858409.issue26462@psf.upfronthosting.co.za> Decorater added the comment: tbh it would be nice if the entire documentation was recolored to look more 'interesting' to read. And to also have it in a way that people who lean visually can learn the info easier instead of them trying to read a giant wall of text that they may or may not understand. (got to hate reading giant walls) But yeah all versions on it should be good. ---------- nosy: +Decorater _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 10:10:37 2016 From: report at bugs.python.org (Decorater) Date: Thu, 28 Jul 2016 14:10:37 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469715037.92.0.133110587143.issue26462@psf.upfronthosting.co.za> Decorater added the comment: Also I was thinking maybe I could figure out how to Add in asyncio to 2.7 anyway (well latest one that is) because why not. With as many things using asyncio now days it would be cake for those python 2 users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 10:23:26 2016 From: report at bugs.python.org (Martin Panter) Date: Thu, 28 Jul 2016 14:23:26 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469715806.52.0.22301178157.issue26462@psf.upfronthosting.co.za> Martin Panter added the comment: Usually my technique is to apply the 3.6 patch to 3.5, fix up any conflicts, and leave the 3.6-only bits out (which get rejected by the patch process anyway). But dedicated patch(es) may be useful. Especially for 2.7, where there are probably independent changes to be made (e.g. modules that were removed in Python 3). I think the policy on documentation in each branch should be in the devguide. My understanding: In general, bug fix branches (3.5, 2.7) have the documentation maintained, but generally not the older security-only branches. My view is if a feature is added to (say) 3.6, then it gets a new-in-3.6 notice in the 3.6 documentation, but nothing gets added to 3.5. The Python 3 documentation rarely mentions features of Python 2, so every feature is treated as being new in 3.0 by default. For Python 2, it won?t document new features of Python 3, but is updated with changes relevant to porting to 3. So in theory the latest Python 3.6+ documentation should also be usable with 3.5, but not with Python 2. That?s about all I know :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 10:32:31 2016 From: report at bugs.python.org (R. David Murray) Date: Thu, 28 Jul 2016 14:32:31 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469716351.72.0.0162267676523.issue26462@psf.upfronthosting.co.za> R. David Murray added the comment: Martin: your summary is correct. A new feature should also have a What's New entry, of course; I think that's the only essential you left out. Decorator: general comments (eg: color of docs, etc) aren't really useful comments on a specific bug report, and the asyncio comment is totally irrelevant. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 11:49:59 2016 From: report at bugs.python.org (Julien) Date: Thu, 28 Jul 2016 15:49:59 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469720999.01.0.140482359774.issue26462@psf.upfronthosting.co.za> Julien added the comment: Martin: OK, let's apply this to 3.6 / 3.5 with this one, and I'll provide independent patch for 2.7 if needed (long time without building 2.7 doc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 12:41:22 2016 From: report at bugs.python.org (Julien) Date: Thu, 28 Jul 2016 16:41:22 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469724082.81.0.156733582003.issue26462@psf.upfronthosting.co.za> Julien added the comment: Decorater: Colors used by the documentation are defined here: https://github.com/sphinx-doc/sphinx/blob/master/sphinx/pygments_styles.py#L22 you can easily modify it and rebuild the doc ``(cd Doc; make html)``. Take a look at existing themes (https://help.farbox.com/pygments.html), sphinx uses a vaiarion of "friendly". But, in general, please open a new issue to speak on different subjects, typically about asyncio which is not related to this issue. Have a nice day. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 13:29:04 2016 From: report at bugs.python.org (Michael Lee) Date: Thu, 28 Jul 2016 17:29:04 +0000 Subject: [docs] [issue27644] Expand documentation about type aliases and NewType in the typing module Message-ID: <1469726944.72.0.582694680461.issue27644@psf.upfronthosting.co.za> New submission from Michael Lee: This is a patch to update the documentation on the typing module. It expands the section on type aliases and adds a section on [NewType][0]. Since support for NewType was [recently added][1] to mypy, it seemed like a prudent time to update the docs to describe this new feature. The section on type aliases was mainly expanded because the distinction between type aliases and NewType could be potentially confusing, so adding extra clarification seemed like a good idea. [0]: https://www.python.org/dev/peps/pep-0484/#newtype-helper-function [1]: https://github.com/python/mypy/pull/1939 ---------- assignee: docs at python components: Documentation files: document_newtype.patch keywords: patch messages: 271572 nosy: docs at python, michael0x2a priority: normal severity: normal status: open title: Expand documentation about type aliases and NewType in the typing module versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file43926/document_newtype.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 14:30:50 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 28 Jul 2016 18:30:50 +0000 Subject: [docs] [issue27646] yield from expression can be any iterable Message-ID: <1469730650.89.0.176012351897.issue27646@psf.upfronthosting.co.za> New submission from Terry J. Reedy: https://docs.python.org/3/reference/expressions.html#yield-expressions says "When yield from is used, it treats the supplied expression as a subiterator. All values produced by that subiterator ...". To me "treats..expression as a subiterator" means that the expression must *be* an iterator, such as returned by iter or calling a generator function. Hence I was surprised upon reading "yield from " in stdlib code. I confirmed that this usage is correct by trying >>> def g(): yield from (1,2) >>> i = g() >>> next(i), next(i) (1, 2) and then reading the PEP380 Formal Semantics, which begins with "_i = iter(EXPR)". Hence I suggest the following replacement for the quote above: "When yield from is used, the expression must be an iterable. A subiterator is obtained with iter(). All values produced by that subiterator ...". Note that 'subiterator' is spelled in the following sentences 'underlying iterable' (which I am not sure I like) and 'sub-iterator' (and 'sub-generator'). I think we should be consistent for at least the two short 'yield from' paragraphs. ---------- assignee: docs at python components: Documentation messages: 271577 nosy: docs at python, terry.reedy priority: normal severity: normal stage: patch review status: open title: yield from expression can be any iterable type: behavior versions: Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From guido at python.org Thu Jul 28 17:49:09 2016 From: guido at python.org (guido at python.org) Date: Thu, 28 Jul 2016 21:49:09 -0000 Subject: [docs] Expand documentation about type aliases and NewType in the typing module (issue 27644) Message-ID: <20160728214909.16247.21190@psf.upfronthosting.co.za> Great! A few nits. http://bugs.python.org/review/27644/diff/18004/Doc/library/typing.rst File Doc/library/typing.rst (right): http://bugs.python.org/review/27644/diff/18004/Doc/library/typing.rst#newcode32 Doc/library/typing.rst:32: A type alias is defined by assigning the type to the alias. In this example, Can you try to make all lines you've added shorter than 80 chars? Even the examples (examples with long lines cause annoying horizontal scroll bars). http://bugs.python.org/review/27644/diff/18004/Doc/library/typing.rst#newcode36 Doc/library/typing.rst:36: Vector = List[float] I'd add an example that passes a List[float] into a function expecting a Vector. E.g. def sum(a: Vector): ... sum([0.0, 1.1, 2.2]) http://bugs.python.org/review/27644/diff/18004/Doc/library/typing.rst#newcode92 Doc/library/typing.rst:92: Recall that type aliases declares two types to be *equivalent* to one another. "type aliases declares" -- plural subject with singular verb. Maybe "the use of a type alias causes two types ..." ? http://bugs.python.org/review/27644/diff/18004/Doc/library/typing.rst#newcode97 Doc/library/typing.rst:97: In contrast, ``NewType`` declares one type to be a *derivative* of another. derivative -> subtype http://bugs.python.org/review/27644/ From report at bugs.python.org Thu Jul 28 18:12:17 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 28 Jul 2016 22:12:17 +0000 Subject: [docs] [issue27644] Expand documentation about type aliases and NewType in the typing module In-Reply-To: <1469726944.72.0.582694680461.issue27644@psf.upfronthosting.co.za> Message-ID: <1469743937.21.0.746256730903.issue27644@psf.upfronthosting.co.za> Changes by Ivan Levkivskyi : ---------- nosy: +levkivskyi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 18:14:08 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Thu, 28 Jul 2016 22:14:08 +0000 Subject: [docs] [issue27644] Expand documentation about type aliases and NewType in the typing module In-Reply-To: <1469726944.72.0.582694680461.issue27644@psf.upfronthosting.co.za> Message-ID: <1469744048.7.0.82350642766.issue27644@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: Added two small comments to the review. ---------- _______________________________________ Python tracker _______________________________________ From levkivskyi at gmail.com Thu Jul 28 18:11:37 2016 From: levkivskyi at gmail.com (levkivskyi at gmail.com) Date: Thu, 28 Jul 2016 22:11:37 -0000 Subject: [docs] Expand documentation about type aliases and NewType in the typing module (issue 27644) Message-ID: <20160728221137.22930.22798@psf.upfronthosting.co.za> I would add two small comments http://bugs.python.org/review/27644/diff/18004/Doc/library/typing.rst File Doc/library/typing.rst (right): http://bugs.python.org/review/27644/diff/18004/Doc/library/typing.rst#newcode65 Doc/library/typing.rst:65: The static type checker will treat the new type almost as if it were a subclass It is not clear why do you need word "almost" here. NewType creates something that type checker treats as equivalent of a subclass with only one constructor that accepts an instance of the base class. http://bugs.python.org/review/27644/diff/18004/Doc/library/typing.rst#newcode86 Doc/library/typing.rst:86: More precisely, the expression ``some_value == Derived(some_value)`` is always true at runtime. I would replace here ``some_value == Derived(some_value)`` with ``some_value is Derived(some_value)`` http://bugs.python.org/review/27644/ From michael.lee.0x2a at gmail.com Thu Jul 28 18:46:24 2016 From: michael.lee.0x2a at gmail.com (michael.lee.0x2a at gmail.com) Date: Thu, 28 Jul 2016 22:46:24 -0000 Subject: [docs] Expand documentation about type aliases and NewType in the typing module (issue 27644) Message-ID: <20160728224624.4951.86608@psf.upfronthosting.co.za> Reviewers: gvanrossum, levkivskyi, http://bugs.python.org/review/27644/diff/18004/Doc/library/typing.rst File Doc/library/typing.rst (right): http://bugs.python.org/review/27644/diff/18004/Doc/library/typing.rst#newcode65 Doc/library/typing.rst:65: The static type checker will treat the new type almost as if it were a subclass On 2016/07/29 00:11:37, levkivskyi wrote: > It is not clear why do you need word "almost" here. > NewType creates something that type checker treats as equivalent of a subclass > with only one constructor that accepts an instance of the base class. I used the word "almost" mainly because the created type doesn't behave exactly like a subclass in all cases -- the main difference is that you're not allowed to subclass the derived type. So, this fails: from typing import NewType UserId = NewType('UserId', int) # Throws an exception at runtime; mypy explicitly flags this as an error class Foo(UserId): pass So I guess it might be more accurate to say that NewType creates something that behaves like a final subclass, in Java terms? Should I edit the patch to include a sentence or two describing this distinction, just remove the word "almost", or do something else? Please review this at http://bugs.python.org/review/27644/ Affected files: Doc/library/typing.rst diff -r da9898e7e90d -r c5151efd2bca Doc/library/typing.rst --- a/Doc/library/typing.rst Wed Jul 27 16:59:22 2016 +0200 +++ b/Doc/library/typing.rst Thu Jul 28 10:12:22 2016 -0700 @@ -29,10 +29,77 @@ Type aliases ------------ -A type alias is defined by assigning the type to the alias:: +A type alias is defined by assigning the type to the alias. In this example, +``Vector`` and ``List[float]`` will be treated as interchangeable synonyms:: + from typing import List Vector = List[float] +Type aliases are useful for simplifying complex type signatures. For example:: + + from typing import Dict, Tuple, List + + + ConnectionOptions = Dict[str, str] + Address = Tuple[str, int] + Server = Tuple[Address, ConnectionOptions] + + def broadcast_message(message: str, servers: List[Server]) -> None: + ... + + # The static type checker will treat the previous type signature as + # being exactly equivalent to this one. + def broadcast_message(message: str, servers: List[Tuple[Tuple[str, int], Dict[str, str]]]) -> None: + ... + +NewType +------- + +Use the ``NewType`` helper function to create distinct types:: + + from typing import NewType + + UserId = NewType('UserId', int) + some_id = UserId(524313) + +The static type checker will treat the new type almost as if it were a subclass +of the original type. This is useful in helping catch logical errors:: + + def get_user_name(user_id: UserId) -> str: + ... + + user_a = get_user_name(UserId(42351)) # typechecks + user_b = get_user_name(-1) # does not typecheck; an int is not a UserId + +You may still perform all ``int`` operations on a variable of type ``UserId``, but the +result will always be of type ``int``. This lets you pass in a ``UserId`` wherever an +``int`` might be expected, but will prevent you from accidentally creating a ``UserId`` +in an invalid way:: + + output = UserId(23413) + UserId(54341) # `output` is of type `int`, not `UserId` + +Note that these checks are enforced only by the static type checker. At runtime the statement +``Derived = NewType('Derived', Base)`` will make ``Derived`` a function that immediately +returns whatever parameter you pass it. That means the expression ``Derived(some_value)`` +does not create a new class or introduce any overhead beyond that of a regular function call. + +More precisely, the expression ``some_value == Derived(some_value)`` is always true at runtime. + +See :pep:`484` for more details. + +.. note:: + + Recall that type aliases declares two types to be *equivalent* to one another. + Doing ``Alias = Original`` will make the static type checker treat ``Alias`` as being + *exactly equivalent* to ``Original`` in all cases. This is useful when you want to simplify + complex type signatures. + + In contrast, ``NewType`` declares one type to be a *derivative* of another. + Doing ``Derived = NewType('Derived', Original)`` will make the static type checker + treat ``Derived`` as a *subclass* of ``Original``, which means a value of type + ``Original`` cannot be used in places where a value of type ``Derived`` is expected. + This is useful when you want to prevent logic errors with minimal runtime cost. + Callable -------- From jack.copper at neuralstudio.net Thu Jul 28 16:19:15 2016 From: jack.copper at neuralstudio.net (Jack Copper) Date: Thu, 28 Jul 2016 20:19:15 +0000 Subject: [docs] Typo in Windows Install Instructions Message-ID: While I noticed a typo, I am greatly impressed with the clarity and completeness of the Windows installation instructions. Thanks! The typo: Page (as shown in IE 11 address bar): https://docs.python.org/3/using/windows.html "pace" should be "page" *The Python Launcher for Windows will be installed according to the option at the bottom of the first pace Cheers, Jack ____________________________ Jack Copper Managing Director NeuralStudio SEZC #68 West Bay Road, Bay Town Plaza PO Box 10315 Grand Cayman KY1-1003 Cayman Islands Direct: +1 (345) 815-3930 Mobile: +1 (345) 925-8459 SKYPE: jack-copper ____________________________ This communication is for use by the intended recipient(s) only and contains information that may be privileged, confidential or copyrighted under applicable law. If you are not an intended recipient, you are hereby formally notified that any use, copying or distribution of this e-mail, in whole or in part, is strictly prohibited. Please notify the sender by return e-mail and delete this e-mail from your system. This e-mail does not constitute a consent to the use of sender's contact information for direct marketing purposes or for transfers of data to third parties. ************************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From zachary.ware+pydocs at gmail.com Thu Jul 28 20:02:26 2016 From: zachary.ware+pydocs at gmail.com (Zachary Ware) Date: Thu, 28 Jul 2016 19:02:26 -0500 Subject: [docs] Typo in Windows Install Instructions In-Reply-To: References: Message-ID: Hi Jack, On Thu, Jul 28, 2016 at 3:19 PM, Jack Copper wrote: > While I noticed a typo, I am greatly impressed with the clarity and > completeness of the Windows installation instructions. Thanks! > > The typo: > > Page (as shown in IE 11 address bar): > https://docs.python.org/3/using/windows.html > > ?pace? should be ?page? > > ?The Python Launcher for Windows will be installed according to the option > at the bottom of the first pace Thanks for the report! This has now been fixed. -- Zach From report at bugs.python.org Thu Jul 28 22:34:42 2016 From: report at bugs.python.org (Roundup Robot) Date: Fri, 29 Jul 2016 02:34:42 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <20160729023439.71450.4844.05CAA03F@psf.io> Roundup Robot added the comment: New changeset 8ba0000c90be by Martin Panter in branch '3.5': Issue #26462: Doc: reduce literal_block warnings, fix syntax highlighting. https://hg.python.org/cpython/rev/8ba0000c90be New changeset 6fbb7c9d77c6 by Martin Panter in branch 'default': Issue #26462: Merge code block fixes from 3.5 https://hg.python.org/cpython/rev/6fbb7c9d77c6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 23:28:09 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 29 Jul 2016 03:28:09 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469762889.83.0.670551640096.issue26462@psf.upfronthosting.co.za> Martin Panter added the comment: Okay, leaving this open for a 2.7 patch. BTW thanks for your work; I tried to tackle these warnings a while ago, but I didn?t know enough about Sphix/RST/etc. The 2.7 change should be fairly easy; I can give it a crack if you?re not that interested in 2.7. ---------- stage: commit review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 28 23:28:28 2016 From: report at bugs.python.org (Martin Panter) Date: Fri, 29 Jul 2016 03:28:28 +0000 Subject: [docs] [issue26462] Patch to enhance literal block language declaration In-Reply-To: <1456790330.71.0.936150839602.issue26462@psf.upfronthosting.co.za> Message-ID: <1469762908.94.0.78517559492.issue26462@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 02:22:11 2016 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 29 Jul 2016 06:22:11 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469773331.06.0.43909440524.issue27624@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry Doug, I don't find any of the suggestions to be an improvement and I concur with David Murray that the docstring for qsize() isn't the place for a tutorial on race conditions and LBYL vs EAPF which are general threading topics rather than a queue specific topics. Also, I'm reluctant to change Guido's original wording which has served well for a decade. While I'm sure you can invent ways to misread the word "approximate", it does communicate that this method cannot relied upon to return the exact size. If we were seeing recurring source of confusion, there might be a basis for a change, but that is not the case. Sorry, but I'm going to close this one. Every person might find a different way to wordsmith this one, but I think we should favor Guido's choice. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 10:13:06 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 29 Jul 2016 14:13:06 +0000 Subject: [docs] [issue27624] unclear documentation on Queue.qsize() In-Reply-To: <1469538053.41.0.353171937214.issue27624@psf.upfronthosting.co.za> Message-ID: <1469801586.81.0.208939420044.issue27624@psf.upfronthosting.co.za> R. David Murray added the comment: Doug: side note. Raymond teaches Python, and makes a study of what works and doesn't work in communicating it to students, so he isn't rejecting this lightly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 11:24:01 2016 From: report at bugs.python.org (Ram Rachum) Date: Fri, 29 Jul 2016 15:24:01 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469805841.55.0.47685701088.issue27604@psf.upfronthosting.co.za> Ram Rachum added the comment: I uploaded a new patch. I added another thing: Mentioning explicitly that no other optimizations are currently being made. I think this is important because it's often the question that the user is asking themselves. (At least my boss and team members have asked that, and people on Stack Overflow.) I disagree with your suggestion to limit the change only to veryhigh.rst and link to there from cmdline.rst. I think this is an important piece of information so it should be available in cmdline.rst which is more visible than the technical veryhigh.rst. If you feel strongly about this issue let me know and I'll do it your way. ---------- Added file: http://bugs.python.org/file43936/2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 13:21:40 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 Jul 2016 17:21:40 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469812900.81.0.854473931404.issue27604@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ram > (At least my boss and team members have asked that, and people on Stack Overflow.) Ram, to me it would have been helpful if you had said this initially. It gives a doc change request a bit more force. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 13:47:03 2016 From: report at bugs.python.org (R. David Murray) Date: Fri, 29 Jul 2016 17:47:03 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469814423.16.0.00253134235527.issue27604@psf.upfronthosting.co.za> R. David Murray added the comment: I think the cmdline ref telling you that optimizations are enabled or disabled is enough. If someone wants technical information they can click on the link. For comparison, the gcc man page lists what optimizations the -O levels enable, but does not explain them. To understand what it does you must follow the "links" to the referenced optimization options. If python had separate options for the individual optimizations we could do likewise, but we don't, so linking to the technical explanation seems like the logical thing to do instead. Perhaps we can get the opinion of some other devs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 15:40:40 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 29 Jul 2016 19:40:40 +0000 Subject: [docs] [issue27644] Expand documentation about type aliases and NewType in the typing module In-Reply-To: <1469726944.72.0.582694680461.issue27644@psf.upfronthosting.co.za> Message-ID: <1469821240.02.0.0671812470687.issue27644@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: > Should I edit the patch to include a sentence or two describing this > distinction, just remove the word "almost", or do something else? I think the best way is to remove the "almost" and briefly explain that you cannot subclass types returned by NewType. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 15:58:17 2016 From: report at bugs.python.org (Ram Rachum) Date: Fri, 29 Jul 2016 19:58:17 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469822297.59.0.640744489981.issue27604@psf.upfronthosting.co.za> Ram Rachum added the comment: Hi David, I attached a patch that follows your instructions, but to be honest, if I wasn't the person writing this patch and I wanted to find the information "Does Python do any optimization besides dumping asserts when I do -O?" I'm not sure I'd be able to understand the information from the docs with 3.patch applied. The documentation doesn't clearly state that `-O` causes an `optimize` value of 1. If it did it'll be a bit easier to understand. Still too difficult in my opinion (which is why I would personally put this information directly in cmdline.rst) but maybe a bit easier. ---------- Added file: http://bugs.python.org/file43938/3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 15:59:52 2016 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 Jul 2016 19:59:52 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469822392.94.0.187731652479.issue27604@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The -O entry is unchanged from when the Using doc was added in 2007. I believe there has been discussion about being more specific and that Guido said something, but that is the most I will say. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 17:09:27 2016 From: report at bugs.python.org (Michael Lee) Date: Fri, 29 Jul 2016 21:09:27 +0000 Subject: [docs] [issue27644] Expand documentation about type aliases and NewType in the typing module In-Reply-To: <1469726944.72.0.582694680461.issue27644@psf.upfronthosting.co.za> Message-ID: <1469826567.44.0.583185500314.issue27644@psf.upfronthosting.co.za> Michael Lee added the comment: Ok, here's revision 2 of my patch, after applying the changes from the last round of feedback. ---------- Added file: http://bugs.python.org/file43939/document_newtype_rev2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 17:25:54 2016 From: report at bugs.python.org (Ivan Levkivskyi) Date: Fri, 29 Jul 2016 21:25:54 +0000 Subject: [docs] [issue27644] Expand documentation about type aliases and NewType in the typing module In-Reply-To: <1469726944.72.0.582694680461.issue27644@psf.upfronthosting.co.za> Message-ID: <1469827554.16.0.413969072539.issue27644@psf.upfronthosting.co.za> Ivan Levkivskyi added the comment: I have only one optional comment on the second revision. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 18:40:21 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 29 Jul 2016 22:40:21 +0000 Subject: [docs] [issue27644] Expand documentation about type aliases and NewType in the typing module In-Reply-To: <1469726944.72.0.582694680461.issue27644@psf.upfronthosting.co.za> Message-ID: <1469832021.64.0.975278174979.issue27644@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks! Should go live later today. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 29 18:42:45 2016 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 29 Jul 2016 22:42:45 +0000 Subject: [docs] [issue27644] Expand documentation about type aliases and NewType in the typing module In-Reply-To: <1469726944.72.0.582694680461.issue27644@psf.upfronthosting.co.za> Message-ID: <1469832165.16.0.432162580363.issue27644@psf.upfronthosting.co.za> Guido van Rossum added the comment: Mercurial revs: fd0dce6d33e7, 15a35a8da24b, 4ecea1ea11bf, 4ecea1ea11bf. ---------- _______________________________________ Python tracker _______________________________________ From srijanlawrence at gmail.com Fri Jul 29 09:07:38 2016 From: srijanlawrence at gmail.com (Srijan Lawrence) Date: Fri, 29 Jul 2016 18:37:38 +0530 Subject: [docs] bug in python Message-ID: i found a bug in python program during my computer practicals -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: python bug.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 12749 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: bug in python.PNG Type: image/png Size: 18038 bytes Desc: not available URL: From levkivskyi at gmail.com Fri Jul 29 17:23:20 2016 From: levkivskyi at gmail.com (levkivskyi at gmail.com) Date: Fri, 29 Jul 2016 21:23:20 -0000 Subject: [docs] Expand documentation about type aliases and NewType in the typing module (issue 27644) Message-ID: <20160729212320.26319.65489@psf.upfronthosting.co.za> I have only one optional comment. http://bugs.python.org/review/27644/diff/18014/Doc/library/typing.rst File Doc/library/typing.rst (right): http://bugs.python.org/review/27644/diff/18014/Doc/library/typing.rst#newcode103 Doc/library/typing.rst:103: is not possible to create another ``NewType`` based on a ``Derived`` type:: I don't think we need to mention this limitation. It might be useful to further derive the type returned by NewType. The PEP says that Base must be a proper class, but I could imagine that this limitation will be relaxed slightly to allow also unique types returned by NewType. However, if it is OK with Guido, then it is also OK with me. http://bugs.python.org/review/27644/ From guido at python.org Fri Jul 29 18:33:29 2016 From: guido at python.org (guido at python.org) Date: Fri, 29 Jul 2016 22:33:29 -0000 Subject: [docs] Expand documentation about type aliases and NewType in the typing module (issue 27644) Message-ID: <20160729223329.24808.70961@psf.upfronthosting.co.za> LGTM. I will merge this. http://bugs.python.org/review/27644/diff/18014/Doc/library/typing.rst File Doc/library/typing.rst (right): http://bugs.python.org/review/27644/diff/18014/Doc/library/typing.rst#newcode103 Doc/library/typing.rst:103: is not possible to create another ``NewType`` based on a ``Derived`` type:: On 2016/07/29 23:23:20, levkivskyi wrote: > I don't think we need to mention this limitation. It might be useful to further > derive the type returned by NewType. The PEP says that Base must be a proper > class, but I could imagine that this limitation will be relaxed slightly to > allow also unique types returned by NewType. > > However, if it is OK with Guido, then it is also OK with me. The limitation is very real. I really don't want people to start creating NewTypes with another NewType as base. I probably didn't think about this when reviewing the PEP text, so perhaps the PEP should also be updated. http://bugs.python.org/review/27644/ From levkivskyi at gmail.com Fri Jul 29 18:44:30 2016 From: levkivskyi at gmail.com (levkivskyi at gmail.com) Date: Fri, 29 Jul 2016 22:44:30 -0000 Subject: [docs] Expand documentation about type aliases and NewType in the typing module (issue 27644) Message-ID: <20160729224430.26319.81162@psf.upfronthosting.co.za> On 2016/07/30 00:33:29, gvanrossum wrote: > I probably didn't think about this when > reviewing the PEP text, so perhaps the PEP should also be updated. This is already in the PEP, quote: "NewType accepts only one argument that shoud be a proper class". http://bugs.python.org/review/27644/ From report at bugs.python.org Sat Jul 30 17:19:42 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Jul 2016 21:19:42 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469913582.82.0.205385204051.issue27604@psf.upfronthosting.co.za> R. David Murray added the comment: You know, it's actually more complicated than this now. We recently changed the way optimization levels are handled in pyc files in such a way that it is possible for other optimization 'levels" to be added by third parties. So the reference information is no longer complete. We may need to revise that section further. And yes, there needs to be a mapping from O values to the optimization levels discussed in the reference, in one location or the other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 30 17:27:36 2016 From: report at bugs.python.org (Ram Rachum) Date: Sat, 30 Jul 2016 21:27:36 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469914056.45.0.630210578596.issue27604@psf.upfronthosting.co.za> Ram Rachum added the comment: Hmm. What do you think about merging 3.patch now, and then possibly adding more information later? (Or asking the people who are designing the complex behvior you describe to write those docs.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 30 17:35:02 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Jul 2016 21:35:02 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469914501.96.0.187297745432.issue27604@psf.upfronthosting.co.za> R. David Murray added the comment: I wouldn't object, but if I started to do it I'd wind up doing the research to "do it right" instead, so it would have to be someone else doing the intermediate commit :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 30 17:47:04 2016 From: report at bugs.python.org (Ram Rachum) Date: Sat, 30 Jul 2016 21:47:04 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469915224.14.0.987848273699.issue27604@psf.upfronthosting.co.za> Ram Rachum added the comment: Well, I guess we had a fun week exchanging a couple thousand words about a two-line change to the docs that's now never going to happen ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 30 17:49:26 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Jul 2016 21:49:26 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469915366.5.0.756214609227.issue27604@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, don't say never. Berker seems to like these kind of small commits, and it won't get lost. Who knows, I may even decide to tackle it. Or someone else will decide to do the research and update your patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 30 17:51:47 2016 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Jul 2016 21:51:47 +0000 Subject: [docs] [issue27604] More details about `-O` flag In-Reply-To: <1469353581.38.0.811049911305.issue27604@psf.upfronthosting.co.za> Message-ID: <1469915507.67.0.693239781465.issue27604@psf.upfronthosting.co.za> R. David Murray added the comment: Heh, that comment about Berker came out wrong. I meant, he seems willing to do, and make time for, the small doc commits that some of the rest of us don't seem to get around to, which is great. ---------- _______________________________________ Python tracker _______________________________________ From berker.peksag at gmail.com Sat Jul 30 23:46:39 2016 From: berker.peksag at gmail.com (=?UTF-8?Q?Berker_Peksa=C4=9F?=) Date: Sun, 31 Jul 2016 06:46:39 +0300 Subject: [docs] bug in python In-Reply-To: References: Message-ID: On Fri, Jul 29, 2016 at 4:07 PM, Srijan Lawrence wrote: > i found a bug in python program during my computer practicals Hi Srijan, Thanks for the report! This is expected. You may find https://docs.python.org/3/tutorial/floatingpoint.html useful to understand how floating-point numbers work in Python (and in IEEE 754 compatible programming languages in general.) --Berker From report at bugs.python.org Sun Jul 31 07:26:39 2016 From: report at bugs.python.org (Berker Peksag) Date: Sun, 31 Jul 2016 11:26:39 +0000 Subject: [docs] [issue23746] sysconfg.is_python_build() is buggy In-Reply-To: <1427101982.73.0.589713060591.issue23746@psf.upfronthosting.co.za> Message-ID: <1469964399.36.0.572642444806.issue23746@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- components: -Library (Lib) keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 3.6 -Python 3.4 _______________________________________ Python tracker _______________________________________ From rameshj at alumni.stanford.edu Sat Jul 30 15:15:20 2016 From: rameshj at alumni.stanford.edu (Ramesh Jayaraman) Date: Sat, 30 Jul 2016 15:15:20 -0400 Subject: [docs] '404 Not Found' errors at www.python.org/ftp/python/doc/3.4.5/ Message-ID: 3.4.5 docs are inaccessible in any format ! (3.4.4 versions also inaccessible at docs.python.org/release/3.4.4/archives/python-3.4.4-docs-html.tar.bz2 -------------- next part -------------- An HTML attachment was scrubbed... URL: