From report at bugs.python.org Sat Dec 1 02:11:51 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 01 Dec 2012 01:11:51 +0000 Subject: [docs] [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <20121130152040.3b61a295@resist.wooz.org> Message-ID: Nick Coghlan added the comment: +1 I wrote the stuff in PEP 1 about committers acting as editors, but agree the editor part itself also falls into the "currently unwritten, but should be written" category. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 18:26:05 2012 From: report at bugs.python.org (mindrones) Date: Sat, 01 Dec 2012 17:26:05 +0000 Subject: [docs] [issue16589] PrettyPrinter docs is incomplete Message-ID: <1354382765.36.0.618684854763.issue16589@psf.upfronthosting.co.za> New submission from mindrones: Hi, at http://docs.python.org/2.7/library/pprint.html#pprint.PrettyPrinter we see: "class pprint.PrettyPrinter(...)" while at http://docs.python.org/3.3/library/pprint.html#pprint.PrettyPrinter we see: "class pprint.PrettyPrinter(indent=1, width=80, depth=None, stream=None)" I think the first case is a bug. Regards, Luca ---------- assignee: docs at python components: Documentation messages: 176745 nosy: docs at python, mindrones priority: normal severity: normal status: open title: PrettyPrinter docs is incomplete versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 18:36:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Dec 2012 17:36:14 +0000 Subject: [docs] [issue16589] PrettyPrinter docs is incomplete In-Reply-To: <1354382765.36.0.618684854763.issue16589@psf.upfronthosting.co.za> Message-ID: <3YDKQ55ytGzNWw@mail.python.org> Roundup Robot added the comment: New changeset 62fed5f18681 by Ezio Melotti in branch '2.7': #16589: fix pprint signatures in the doc (backport of 106ee4eb5970). http://hg.python.org/cpython/rev/62fed5f18681 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 18:37:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 01 Dec 2012 17:37:07 +0000 Subject: [docs] [issue16589] PrettyPrinter docs is incomplete In-Reply-To: <1354382765.36.0.618684854763.issue16589@psf.upfronthosting.co.za> Message-ID: <1354383427.23.0.492701769997.issue16589@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 20:23:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 01 Dec 2012 19:23:13 +0000 Subject: [docs] [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354389793.12.0.583777143504.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: >From PEP 1: "If the PEP author is a Python developer, assign the bug/patch to him, otherwise assign it to the [a] PEP editor." Given that the list is small, something else that might make sense is adding a "PEP editors" area to the Experts Index in the devguide. That would allow one to do more easily what is stated above, for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 20:29:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 01 Dec 2012 19:29:06 +0000 Subject: [docs] [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354390145.87.0.767107368914.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Btw, I will prepare a patch that incorporates the information that Barry provided. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 21:49:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 20:49:22 +0000 Subject: [docs] [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1354394962.52.0.711228613685.issue11908@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. However note, that for 2.7 the patch should be modified (maxsize -> maxint, range -> xrange). ---------- nosy: +serhiy.storchaka stage: needs patch -> commit review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 23:01:28 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 01 Dec 2012 22:01:28 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1354399288.29.0.242767804867.issue9650@psf.upfronthosting.co.za> ?ric Araujo added the comment: Any reason to not backport this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:20:31 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Dec 2012 10:20:31 +0000 Subject: [docs] [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1354443631.68.0.562921036909.issue11908@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:38:36 2012 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Sun, 02 Dec 2012 10:38:36 +0000 Subject: [docs] [issue16585] surrogateescape broken w/ multibytecodecs' encode In-Reply-To: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> Message-ID: <1354444716.64.0.485382330704.issue16585@psf.upfronthosting.co.za> Walter D?rwald added the comment: And returning bytes is documented in PEP 383, as an extension to the PEP 293 machinery: """To convert non-decodable bytes, a new error handler ([2]) "surrogateescape" is introduced, which produces these surrogates. On encoding, the error handler converts the surrogate back to the corresponding byte. This error handler will be used in any API that receives or produces file names, command line arguments, or environment variables. The error handler interface is extended to allow the encode error handler to return byte strings immediately, in addition to returning Unicode strings which then get encoded again (also see the discussion below).""" ---------- nosy: +doerwalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 13:04:01 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 12:04:01 +0000 Subject: [docs] [issue16585] surrogateescape broken w/ multibytecodecs' encode In-Reply-To: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> Message-ID: <1354449841.54.0.659686473724.issue16585@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: docs at python -> components: +Library (Lib) -Documentation, Interpreter Core, Unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 16:28:05 2012 From: report at bugs.python.org (Taavi Burns) Date: Sun, 02 Dec 2012 15:28:05 +0000 Subject: [docs] [issue16556] Update string.Formatter.vformat documentation to say "**kwargs" In-Reply-To: <1353903093.51.0.301727912961.issue16556@psf.upfronthosting.co.za> Message-ID: <1354462085.16.0.732867326499.issue16556@psf.upfronthosting.co.za> Taavi Burns added the comment: Ah, yes, I could have been more clear that I wasn't even looking at the source code itself. :) Thanks! ---------- resolution: fixed -> status: closed -> open versions: -Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 16:50:23 2012 From: report at bugs.python.org (Taavi Burns) Date: Sun, 02 Dec 2012 15:50:23 +0000 Subject: [docs] [issue16556] Update string.Formatter.vformat documentation to say "**kwargs" In-Reply-To: <1353903093.51.0.301727912961.issue16556@psf.upfronthosting.co.za> Message-ID: <1354463423.74.0.940812348867.issue16556@psf.upfronthosting.co.za> Taavi Burns added the comment: Gak, sorry, didn't mean to change the status and resolution! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 17:21:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 16:21:14 +0000 Subject: [docs] [issue16585] surrogateescape broken w/ multibytecodecs' encode In-Reply-To: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> Message-ID: <3YDvj53mZdzN0x@mail.python.org> Roundup Robot added the comment: New changeset 5c88c72dec60 by Benjamin Peterson in branch '3.3': support encoding error handlers that return bytes (closes #16585) http://hg.python.org/cpython/rev/5c88c72dec60 New changeset 2181c37977d3 by Benjamin Peterson in branch 'default': merge 3.3 (#16585) http://hg.python.org/cpython/rev/2181c37977d3 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 17:33:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 16:33:24 +0000 Subject: [docs] [issue16585] surrogateescape broken w/ multibytecodecs' encode In-Reply-To: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> Message-ID: <3YDvz74SKtzNHf@mail.python.org> Roundup Robot added the comment: New changeset 777aabdff35a by Benjamin Peterson in branch '3.3': document that encoding error handlers may return bytes (#16585) http://hg.python.org/cpython/rev/777aabdff35a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 17:41:11 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Dec 2012 16:41:11 +0000 Subject: [docs] [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1354466471.58.0.03798650721.issue11908@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 18:18:40 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Dec 2012 17:18:40 +0000 Subject: [docs] [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1354468720.7.0.0457712624118.issue11908@psf.upfronthosting.co.za> Raymond Hettinger added the comment: ysj: The "equivalent" means "roughly equivalent" not "precisely equivalent". The purpose of the code in the docs is to help communicate what islice() is all about. Practicality beats purity in this regard. I know of no one who has ever been mislead by the islice() docs. I don't really like the proposed patch -- it improves a bit on technical accuracy but forgoes readability and still falls short on what stop=None does and on which arguments are required. That said, I don't really like the current version of the "roughly equivalent code either". It should probably be rewritten completely (no longer using slice() and it should show the actual looping logic. For clarity, it may be helpful to split it into two code-equivalents, one for the finite case (where stop is specified) and one for the infinite case (where stop is None). As it stands, the examples are beating the code equivalent when it comes to communicating what islice() does. I don't want to lengthen the code fragment unless it becomes *both* more communicative and more accurate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 01:42:06 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 00:42:06 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1354495326.15.0.315777295395.issue16267@psf.upfronthosting.co.za> Andrew Svetlov added the comment: After trying to make patch I've realized ? better to leave current behavior as is and change documentation only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:41:43 2012 From: report at bugs.python.org (Steven Kryskalla) Date: Mon, 03 Dec 2012 03:41:43 +0000 Subject: [docs] [issue16598] Docs: double newlines printed in some file iteration examples Message-ID: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> New submission from Steven Kryskalla: I heard someone complain about this code appearing in the official documentation in a few places: for line in open("file.txt"): print(line) This code will print two newlines. I went through the current "default" and "2.7" branches and changed the places where this occurred to use print(line, end="") for 3.x or "print line," for 2.x. r80699.patch is for the "default" branch (3.x) r80694.py27.patch is for the "2.7" branch ---------- assignee: docs at python components: Documentation files: r80699.patch hgrepos: 164 keywords: patch messages: 176824 nosy: docs at python, lost-theory priority: normal severity: normal status: open title: Docs: double newlines printed in some file iteration examples type: enhancement versions: Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file28191/r80699.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:42:28 2012 From: report at bugs.python.org (Steven Kryskalla) Date: Mon, 03 Dec 2012 03:42:28 +0000 Subject: [docs] [issue16598] Docs: double newlines printed in some file iteration examples In-Reply-To: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> Message-ID: <1354506148.4.0.945665910013.issue16598@psf.upfronthosting.co.za> Changes by Steven Kryskalla : ---------- versions: +Python 2.7 Added file: http://bugs.python.org/file28192/r80699.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:43:01 2012 From: report at bugs.python.org (Steven Kryskalla) Date: Mon, 03 Dec 2012 03:43:01 +0000 Subject: [docs] [issue16598] Docs: double newlines printed in some file iteration examples In-Reply-To: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> Message-ID: <1354506181.89.0.929830520865.issue16598@psf.upfronthosting.co.za> Changes by Steven Kryskalla : Removed file: http://bugs.python.org/file28192/r80699.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:43:21 2012 From: report at bugs.python.org (Steven Kryskalla) Date: Mon, 03 Dec 2012 03:43:21 +0000 Subject: [docs] [issue16598] Docs: double newlines printed in some file iteration examples In-Reply-To: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> Message-ID: <1354506201.34.0.0950348825589.issue16598@psf.upfronthosting.co.za> Changes by Steven Kryskalla : Added file: http://bugs.python.org/file28193/r80694.py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:07:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 03 Dec 2012 05:07:05 +0000 Subject: [docs] [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354511223.87.0.683331684418.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching proposed patch. The patch also makes some minor stylistic improvements and typo fixes (e.g. s/work flow/workflow/, s/we/the PEP editors/, and eliminating trailing whitespace on a few lines). ---------- keywords: +patch Added file: http://bugs.python.org/file28194/issue-16581-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:22:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 03 Dec 2012 05:22:45 +0000 Subject: [docs] [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354512165.24.0.320846542312.issue16581@psf.upfronthosting.co.za> Ezio Melotti added the comment: +PEP editorship is by invitation of the current editors. The address + is a mailing list consisting of PEP editors. The "consisting" doesn't sound too well to me, maybe "reserved to"? +PEP-related email should be sent to this address (no cross-posting please). emails? ---------- nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:34:14 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 03 Dec 2012 05:34:14 +0000 Subject: [docs] [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354512854.07.0.781451713493.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > The "consisting" doesn't sound too well to me, maybe "reserved to"? "Reserved for" sounds good to me. Originally I was thinking of "limited to" or "restricted to," but that had a connotation of exclusivity I wanted to avoid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 09:10:13 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 08:10:13 +0000 Subject: [docs] [issue16568] allow constructors to be documented separately from class In-Reply-To: <1354093412.82.0.692042663136.issue16568@psf.upfronthosting.co.za> Message-ID: <1354522213.55.0.354058072228.issue16568@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 19:48:27 2012 From: report at bugs.python.org (myreallycoolname) Date: Tue, 04 Dec 2012 18:48:27 +0000 Subject: [docs] [issue16607] Bad examples in documentation Message-ID: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> New submission from myreallycoolname: The doumentation examples imn the tutorial in python3.2 are at lest in part invalid. I was having trouble understanding the documentation so I pulled out my pthony interperator and pluged in one of tyhe examples. Just as I thought self was not defined. You can't learn python if the docs are bad. Please review the examples under classes to make sure they are all correct. ---------- assignee: docs at python components: Documentation messages: 176927 nosy: docs at python, myreallycoolname priority: normal severity: normal status: open title: Bad examples in documentation versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:00:28 2012 From: report at bugs.python.org (Daniel Urban) Date: Tue, 04 Dec 2012 19:00:28 +0000 Subject: [docs] [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1354647628.15.0.0342205882933.issue16607@psf.upfronthosting.co.za> Daniel Urban added the comment: Could you please point to a specific example which is incorrect? Thank you. ---------- nosy: +daniel.urban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:50:48 2012 From: report at bugs.python.org (Georg Brandl) Date: Tue, 04 Dec 2012 19:50:48 +0000 Subject: [docs] [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1354650648.89.0.699449840908.issue16607@psf.upfronthosting.co.za> Georg Brandl added the comment: I had a look and can't see an example in the "Classes" doc where self might not be defined. Please reopen with a concrete pointer if you think otherwise. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:00:29 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Dec 2012 20:00:29 +0000 Subject: [docs] [issue16609] random.random() / float() loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354651229.82.0.614848177739.issue16609@psf.upfronthosting.co.za> R. David Murray added the comment: In fact it has been changed. In Python3 you get: >>> x = 0.88022393777095409 >>> x 0.8802239377709541 >>> str(x) '0.8802239377709541' Even in 2.7 you would get the above repr, not the one you showed. This is because 2.7 and 3.3 use the "shortest repr" described in the floating point document, but 2.7 still uses the old rounding as the default str representation (for backward compatibility reasons). While you could still make an argument for updating the 2.7 docs, I'm not sure it is worth it. If you (or anyone) want to propose a patch, I would suggest that instead of adding a note to the random docs, that a glossary entry be added for 'floating point' which mentions it as a 2.7 limitation, and a link to that glossary entry from the random docs. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, r.david.murray priority: normal -> low type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:05:51 2012 From: report at bugs.python.org (Cal Leeming) Date: Tue, 04 Dec 2012 20:05:51 +0000 Subject: [docs] [issue16609] random.random() / float() loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354651550.98.0.733901045922.issue16609@psf.upfronthosting.co.za> Cal Leeming added the comment: Many thanks for your lengthy response David. Sorry, my initial bug report stated it was Python 2.7. The tests I performed were actually on Python 2.6.6. I will take a look at how to contribute documentation updates, and once I've familiarized myself with it I'll submit a patch for review. Thanks again ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:06:35 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 04 Dec 2012 20:06:35 +0000 Subject: [docs] [issue16609] random.random() / float() loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354651595.36.0.945036378668.issue16609@psf.upfronthosting.co.za> Mark Dickinson added the comment: It is notable that this behaviour isn't described anywhere that I can find in the library manual or the reference manual. As David says, it applies only to 2.7; in 3.2 and later, `str` and `repr` are identical. > a glossary entry be added for 'floating point' which mentions it as a > 2.7 limitation That could work. I *really* don't think it should be linked to from the random docs, though; this has absolutely nothing to do with the random module, except that the random module happens to contain functions that can produce floats. Many other modules do that, too. Another option would be to add the information somewhere in http://docs.python.org/2/library/stdtypes.html#numeric-types-int-float-long-complex ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:11:16 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 04 Dec 2012 20:11:16 +0000 Subject: [docs] [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354651876.56.0.236266136085.issue16609@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- title: random.random() / float() loses precision when passed to str() -> float loses precision when passed to str() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:21:29 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Dec 2012 20:21:29 +0000 Subject: [docs] [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354652489.72.0.0378282689016.issue16609@psf.upfronthosting.co.za> R. David Murray added the comment: That's why I suggested a glossary entry. The relevant function description *does* contain the phrase "floating point", so a glossary link there would be reasonably natural. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:29:05 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Dec 2012 20:29:05 +0000 Subject: [docs] [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354652945.57.0.215501410396.issue16609@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree with Mark here. This isn't specific to random.random() and it's already covered elsewhere in the documentation. Furthermore, I don't know why you're using str() on random.random(). There are better ways to get random strings, such as random.getrandbits() or os.urandom(). Recommend closing. ---------- nosy: +pitrou resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:33:40 2012 From: report at bugs.python.org (Cal Leeming) Date: Tue, 04 Dec 2012 20:33:40 +0000 Subject: [docs] [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354653220.51.0.743034073591.issue16609@psf.upfronthosting.co.za> Cal Leeming added the comment: Actually, you do have a good point, this should have been using random.getrandbits really. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:37:58 2012 From: report at bugs.python.org (Cal Leeming) Date: Tue, 04 Dec 2012 20:37:58 +0000 Subject: [docs] [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354653478.6.0.641802675544.issue16609@psf.upfronthosting.co.za> Changes by Cal Leeming : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 22:12:15 2012 From: report at bugs.python.org (myreallycoolname) Date: Tue, 04 Dec 2012 21:12:15 +0000 Subject: [docs] [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <20121204211211.55680@gmx.com> myreallycoolname added the comment: Sorry about that. You will unfortunatly have to wait as I'm not on a computer that has python installed currently. > ----- Original Message ----- > From: Daniel Urban > Sent: 12/04/12 02:00 PM > To: doark at mail.com > Subject: [issue16607] Bad examples in documentation > > Daniel Urban added the comment: > > Could you please point to a specific example which is incorrect? Thank you. > > ---------- > nosy: +daniel.urban > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 22:17:00 2012 From: report at bugs.python.org (myreallycoolname) Date: Tue, 04 Dec 2012 21:17:00 +0000 Subject: [docs] [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <20121204211658.55680@gmx.com> myreallycoolname added the comment: I'm no expert so I'm not sure which it is but try these: >>> class Complex: ... def __init__(self, realpart, imagpart): ... self.r = realpart ... self.i = imagpart ... class Bag: def __init__(self): self.data = [] def add(self, x): self.data.append(x) def addtwice(self, x): self.add(x) self.add(x) If that's not it wait and I'll submit a new and better bug report or add to the existing one. > ----- Original Message ----- > From: myreallycoolname > Sent: 12/04/12 04:12 PM > To: doark at mail.com > Subject: [issue16607] Bad examples in documentation > > myreallycoolname added the comment: > > Sorry about that. You will unfortunatly have to wait as I'm not on a computer that has python installed currently. > > > ----- Original Message ----- > > From: Daniel Urban > > Sent: 12/04/12 02:00 PM > > To: doark at mail.com > > Subject: [issue16607] Bad examples in documentation > > > > Daniel Urban added the comment: > > > > Could you please point to a specific example which is incorrect? Thank you. > > > > ---------- > > nosy: +daniel.urban > > > > _______________________________________ > > Python tracker > > > > _______________________________________ > > > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 23:08:09 2012 From: report at bugs.python.org (Daniel Urban) Date: Tue, 04 Dec 2012 22:08:09 +0000 Subject: [docs] [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1354658889.34.0.935999932064.issue16607@psf.upfronthosting.co.za> Daniel Urban added the comment: Both work fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 02:17:52 2012 From: report at bugs.python.org (Daniel Swanson) Date: Wed, 05 Dec 2012 01:17:52 +0000 Subject: [docs] [issue15346] Tkinter extention modules have no documentation In-Reply-To: <1342198047.2.0.619885102312.issue15346@psf.upfronthosting.co.za> Message-ID: <1354670271.91.0.646315628324.issue15346@psf.upfronthosting.co.za> Daniel Swanson added the comment: We could at least put links to some documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:25:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Dec 2012 08:25:37 +0000 Subject: [docs] [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354695937.41.0.555817688988.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Are there any comments on the patch from the PEP 1 authors? PEP 1 says that I should assign this to one of the PEP authors. Any takers, or is this something I can commit on the authors' behalf? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:54:15 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 08:54:15 +0000 Subject: [docs] [issue15346] Tkinter extention modules have no documentation In-Reply-To: <1342198047.2.0.619885102312.issue15346@psf.upfronthosting.co.za> Message-ID: <1354697655.48.0.682389680112.issue15346@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Patch is welcome! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:31:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2012 19:31:10 +0000 Subject: [docs] [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1354735870.74.0.104468096594.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is good, if stdlib has function for escaping any special characters, even if this function is simple. There are already escape functions for re and sgml/xml/html. Private function glob.glob1 used in Lib/msilib and Tools/msi to prevent unexpected globbing in parent directory name. ``glob.glob1(dirname, pattern)`` should be replaced by ``glob.glob(os.path.join(fnmatch.escape(dirname), pattern)`` in external code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 11:24:01 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 06 Dec 2012 10:24:01 +0000 Subject: [docs] [issue10589] I/O ABC docs should specify which methods have implementations In-Reply-To: <1291143953.85.0.0204032538698.issue10589@psf.upfronthosting.co.za> Message-ID: <1354789440.93.0.732674075484.issue10589@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed in a58204570a7c, 3cb85250a0a3, 93742b046519. ---------- assignee: stutzbach -> asvetlov resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:26:29 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 06 Dec 2012 14:26:29 +0000 Subject: [docs] [issue16580] Add examples to int.to_bytres and int.from_bytes In-Reply-To: <1354217109.61.0.534443148437.issue16580@psf.upfronthosting.co.za> Message-ID: <1354803989.65.0.844875855055.issue16580@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Your example is comprehensive but not simple and obvious. I think better to keep it out of doc. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:31:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 06 Dec 2012 14:31:38 +0000 Subject: [docs] [issue16580] Add examples to int.to_bytres and int.from_bytes In-Reply-To: <1354217109.61.0.534443148437.issue16580@psf.upfronthosting.co.za> Message-ID: <1354804298.05.0.63730141766.issue16580@psf.upfronthosting.co.za> Ezio Melotti added the comment: I agree. The examples in the doc seem clear to me, whereas the ones you proposed are not as clear. Do you think there's something that they don't currently cover that should be added? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From andrew.svetlov at gmail.com Thu Dec 6 15:33:25 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Thu, 6 Dec 2012 16:33:25 +0200 Subject: [docs] datetime.time inconsistency In-Reply-To: References: Message-ID: Fixed for 2.7, thanks. 3.2 docs is already ok. On Thu, Nov 8, 2012 at 9:08 PM, Sean Munkel wrote: > In the 2.x (and 3.0) version of the python documentation, the arguments for > datetime.time are listed as follows: > datetime.time(hour[, minute[, second[, microsecond[, tzinfo]]]]) > > While the builtin python help() function says this: > time([hour[, minute[, second[, microsecond[, tzinfo]]]]]) > > The online documentation seems to suggest that "hour" is a required > argument, which isn't the case. > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- Thanks, Andrew Svetlov From report at bugs.python.org Thu Dec 6 16:12:29 2012 From: report at bugs.python.org (Daniel Swanson) Date: Thu, 06 Dec 2012 15:12:29 +0000 Subject: [docs] [issue15346] Tkinter extention modules have no documentation In-Reply-To: <1342198047.2.0.619885102312.issue15346@psf.upfronthosting.co.za> Message-ID: <1354806749.8.0.638566226959.issue15346@psf.upfronthosting.co.za> Daniel Swanson added the comment: There is documentation of these modules, it's just that it's in the modules themselves. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:10:25 2012 From: report at bugs.python.org (Ashish Nitin Patil) Date: Thu, 06 Dec 2012 19:10:25 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1354821025.89.0.745939179393.issue14901@psf.upfronthosting.co.za> Ashish Nitin Patil added the comment: Is anyone currently working on this issue? I am a newbie & am really looking forward to contributing, but, quite unsure of what exact changes need to be made to the FAQ documentation. The previous comments are very helpful & I am going to proceed with the same. Senior or Core developer suggestions/corrections are welcome anytime. ---------- nosy: +ashishnitinpatil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:50:07 2012 From: report at bugs.python.org (Ashish Nitin Patil) Date: Fri, 07 Dec 2012 07:50:07 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1354866607.14.0.884993969961.issue14901@psf.upfronthosting.co.za> Ashish Nitin Patil added the comment: Found this - http://docs.python.org/3/using/windows.html Seems like my work got a bit easy. Need to truncate the bits & bytes oof the document so as to fit with FAQ system. I think I will also need to do changes to the official wiki (online) too. Any help/suggestion is appreciated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:01:44 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Fri, 07 Dec 2012 12:01:44 +0000 Subject: [docs] [issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv) Message-ID: <1354881703.99.0.276690917603.issue16633@psf.upfronthosting.co.za> New submission from V?clav ?milauer: On windows, environment variables exist in two copies: one is manipulated using win32 API (GetEnvironmentVariable, SetEnvironmentVariable), and another one is maintained by the C runtime (getenv, _putenv). This is explained in more depth in [1]. os.environ manipulates win32 environment variables, but *not* those seen by the CRT. This means that if I set an environment variable using os.environ and later read it, in the same process, using getenv in an extension module, it will not give the expected result. Child processes *do* see those vars in CRT, since it is copied over from the win32 version at process startup. Setting env vars has legitimate uses, since it is one of the few ways to influence initialization of extension modules: for instance, setting OMP_NUM_THREADS sets number of threads for OpenMP runtime (which cannot be changed once the module using it is loaded). It would be ideal to keep both CRT and win32 env vars in sync transparently. If that is not realistically achievable, this gotcha should be documented as a warning in the os.environ documentation. A workaround to this problem to set variables in both win32 and CRT using something like import ctypes, ctypes.util, os.environ ctypes.cdll[ctypes.util.find_msvcrt()]._putenv("%s=%s"%(name,value)) os.environ[name]=value [1] http://msmvps.com/blogs/senthil/archive/2009/10/13/when-what-you-set-is-not-what-you-get-setenvironmentvariable-and-getenv.aspx ---------- assignee: docs at python components: Documentation messages: 177081 nosy: docs at python, eudoxos priority: normal severity: normal status: open title: os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv) type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:50:56 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Dec 2012 12:50:56 +0000 Subject: [docs] [issue16634] urllib.error.HTTPError.reason is not documented Message-ID: <1354884656.5.0.110910747898.issue16634@psf.upfronthosting.co.za> New submission from Berker Peksag: The "reason" attribute has been added to urllib.error.HTTPError in issue 13211. Related changeset: http://hg.python.org/cpython/rev/deb60efd32eb ---------- assignee: docs at python components: Documentation files: httperror-reason.diff keywords: patch messages: 177083 nosy: berker.peksag, docs at python priority: normal severity: normal status: open title: urllib.error.HTTPError.reason is not documented versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28241/httperror-reason.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:23:28 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 07 Dec 2012 13:23:28 +0000 Subject: [docs] [issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv) In-Reply-To: <1354881703.99.0.276690917603.issue16633@psf.upfronthosting.co.za> Message-ID: <1354886608.08.0.537927591429.issue16633@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think the problem is: windows process can contain single shared win32 API and several CRT copies ? one for Visual Studio 2008, other for VS 2010 etc. We cannot know which CRT version is used by particular extension, so I doubt we can initialize it properly. Your workaround has the same problem. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:30:17 2012 From: report at bugs.python.org (Tim Golden) Date: Fri, 07 Dec 2012 13:30:17 +0000 Subject: [docs] [issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv) In-Reply-To: <1354881703.99.0.276690917603.issue16633@psf.upfronthosting.co.za> Message-ID: <50C1EF67.7050606@timgolden.me.uk> Tim Golden added the comment: Does the same problem obtain if you use os.putenv (which calls the crt putenv under the covers)? ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:11:50 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Fri, 07 Dec 2012 17:11:50 +0000 Subject: [docs] [issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv) In-Reply-To: <1354881703.99.0.276690917603.issue16633@psf.upfronthosting.co.za> Message-ID: <1354900310.58.0.891014642915.issue16633@psf.upfronthosting.co.za> V?clav ?milauer added the comment: I checked on Windows 7 64bit with python 2.7 (sorry, not python 3.3 installed here) with the script attached. Each line sets a variable using the method in the very left column, then it attempts to read it back using all methods. os.environ win32 os.?etenv msvcrt msvcr? os.environ OK OK OK -- -- win32 -- OK -- -- -- os.?etenv -- OK -- -- -- msvcrt -- OK -- OK -- msvcr? -- OK -- -- -- Methods which can read back what they also set are os.environ, win32api, msvcrt. OTOH, msvcr? (which is ctypes.util.find_msvcr(), in my case msvcr90.dll) does not read its own values, just like os.getenv/os.putenv. It *seems* that reading with win32 API is very reliable (that is not a good news for writing cross-platform extension modules), though, but perhaps it just asks the CRT if it does not find the variable defined (my testing did not go that far). @Andrew: you're probably right, though it does not explain, why msvcr90.dll does not read back the values I set in there - that is the CRT python27.dll itself links to -- ---------- Added file: http://bugs.python.org/file28243/tryenv2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:21:47 2012 From: report at bugs.python.org (Ashish Nitin Patil) Date: Fri, 07 Dec 2012 18:21:47 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1354904505.25.0.27926238811.issue14901@psf.upfronthosting.co.za> Ashish Nitin Patil added the comment: Made most of the relevant changes & updation to the FAQ. 1. Updated references to Windows 7/XP/Vista & dropped all references & solutions on older Windows. 2. Also, many of the ending FAQs like cw3215mt.dll, CTL3D32 were completely dropped as I found that the googled pages show most results(pages) dating back more than 10 years. 3. Modified the questioon on 'freeze' to 'conversion from py to exe' 4. Did not touch questions that I am not familiar with, like CGI, os.kill(), etc. 5. Dropped questions that were directly in respect to older (unsupported) Windows. Any suggestion/correction is wel-received. My first patch! :-) \m/ ---------- keywords: +patch Added file: http://bugs.python.org/file28245/faq.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:37:49 2012 From: report at bugs.python.org (Ashish Nitin Patil) Date: Fri, 07 Dec 2012 20:37:49 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1354912667.92.0.149439764366.issue14901@psf.upfronthosting.co.za> Ashish Nitin Patil added the comment: Just added my name to the Misc/ACKS. ---------- Added file: http://bugs.python.org/file28250/faq+ack.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:25:45 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2012 05:25:45 +0000 Subject: [docs] [issue16598] Docs: double newlines printed in some file iteration examples In-Reply-To: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> Message-ID: <1354944345.28.0.490013771497.issue16598@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:30:50 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2012 05:30:50 +0000 Subject: [docs] [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354944650.09.0.715208159787.issue16609@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:52:17 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2012 05:52:17 +0000 Subject: [docs] [issue16634] urllib.error.HTTPError.reason is not documented In-Reply-To: <1354884656.5.0.110910747898.issue16634@psf.upfronthosting.co.za> Message-ID: <1354945937.03.0.8432313381.issue16634@psf.upfronthosting.co.za> Terry J. Reedy added the comment: And it was added to all of 2.7, 3.2, and 3.3, so doc patch should be also. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:54:40 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2012 05:54:40 +0000 Subject: [docs] [issue13211] urllib2.HTTPError does not have 'reason' attribute. In-Reply-To: <1318943168.93.0.520705450261.issue13211@psf.upfronthosting.co.za> Message-ID: <1354946080.54.0.921319731458.issue13211@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:39:08 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Dec 2012 10:39:08 +0000 Subject: [docs] [issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__ In-Reply-To: <1227464493.77.0.130820783094.issue4395@psf.upfronthosting.co.za> Message-ID: <1354963148.41.0.576322853806.issue4395@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:39:52 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Dec 2012 10:39:52 +0000 Subject: [docs] [issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__ In-Reply-To: <1227464493.77.0.130820783094.issue4395@psf.upfronthosting.co.za> Message-ID: <1354963192.11.0.956857054282.issue4395@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +antocuni _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:52:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 10:52:50 +0000 Subject: [docs] [issue16642] Mention new "kwargs" named tuple parameter in sched module Message-ID: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which adds missed mentions of "kwargs" named tuple parameter. ---------- assignee: docs at python components: Documentation files: sched_docs_kwargs.patch keywords: patch messages: 177154 nosy: docs at python, giampaolo.rodola, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Mention new "kwargs" named tuple parameter in sched module type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28258/sched_docs_kwargs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:59:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 10:59:41 +0000 Subject: [docs] [issue16643] Wrong documented default value for timefunc parameter in sched.scheduler() Message-ID: <1354964381.71.0.639628706124.issue16643@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: sched.scheduler() prefers to use time.monotonic as a default value for timefunc parameter, and time.time used only as a fallback. But time.time documented as a default value. ---------- assignee: docs at python components: Documentation messages: 177155 nosy: docs at python, giampaolo.rodola, haypo, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Wrong documented default value for timefunc parameter in sched.scheduler() type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 12:01:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 08 Dec 2012 11:01:54 +0000 Subject: [docs] [issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__ In-Reply-To: <1227464493.77.0.130820783094.issue4395@psf.upfronthosting.co.za> Message-ID: <1354964514.11.0.272575510068.issue4395@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 13:57:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Dec 2012 12:57:33 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <3YJVvJ3GXdzQgs@mail.python.org> Roundup Robot added the comment: New changeset 3345afd6dc61 by Nick Coghlan in branch '3.3': Close issue #16267: better docs for @abstractmethod composition http://hg.python.org/cpython/rev/3345afd6dc61 New changeset be7202c38089 by Nick Coghlan in branch 'default': Merge from 3.3 (issue #16267) http://hg.python.org/cpython/rev/be7202c38089 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 17:05:17 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 08 Dec 2012 16:05:17 +0000 Subject: [docs] [issue16598] Docs: double newlines printed in some file iteration examples In-Reply-To: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> Message-ID: <1354982717.05.0.370787806406.issue16598@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed, except whatsnew files. That ones should be untouched from my perspective ? the issue is not bugfix but improvement and I see no reason why we need to backedit whatsnew for old outdated versions. Changesetes fed7306f26ce, 268ead8ae46b, 9e4b003a4d7a, 29627bd5b333. Thanks for patches! ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 06:01:11 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Dec 2012 05:01:11 +0000 Subject: [docs] [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1355029271.68.0.214846762312.issue16267@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 11:34:49 2012 From: report at bugs.python.org (Paddy McCarthy) Date: Sun, 09 Dec 2012 10:34:49 +0000 Subject: [docs] [issue16580] Add examples to int.to_bytres and int.from_bytes In-Reply-To: <1354804298.05.0.63730141766.issue16580@psf.upfronthosting.co.za> Message-ID: <50C468F0.6020301@googlemail.com> Paddy McCarthy added the comment: On 06/12/2012 14:31, Ezio Melotti wrote: > Ezio Melotti added the comment: > > I agree. The examples in the doc seem clear to me, whereas the ones you proposed are not as clear. Do you think there's something that they don't currently cover that should be added? > > ---------- > nosy: +ezio.melotti > > _______________________________________ > Python tracker > > _______________________________________ > First, Thanks Ezio and Andrew for your replies. My problem was that when working on bitcoin address validation I saw code that was shifting and &'ing with 0xFF to convert to multiple bytes and half remembered that there might be a Python function to do that. On finding the .to_bytes method and its parameter "big" or "little", the only way I had of working out which to use was to try each until I found out which worked. I therefore thought that what would have helped me was code that showed the equivalent "expanded Python" for the method in a similar way to what is done for some of the itertools functions etc. If we split my request into two: 1. Is such extra explanation necessary. 2. Is my specific code that extra explanation. I can work on the code a bit more. Have I persuaded you that an extra explanation is necessary? Thanks, Paddy. P.S. I guess what is currently present shows the result of the methods but nothing on how it could be generated. I am stating that the generation can aid comprehension. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 11:55:36 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 09 Dec 2012 10:55:36 +0000 Subject: [docs] [issue16580] Add examples to int.to_bytres and int.from_bytes In-Reply-To: <1354217109.61.0.534443148437.issue16580@psf.upfronthosting.co.za> Message-ID: <1355050536.14.0.511880853298.issue16580@psf.upfronthosting.co.za> Ezio Melotti added the comment: Usually we add plain Python equivalents when they are simple enough that the code equivalent is as understandable as the prose or more (see for example http://docs.python.org/3/library/functions.html#all, or the itertools functions you mentioned). For this case I think it would help if you presented an equivalent function, e.g.: def to_bytes(n, length, order): if order == 'little': return bytes((n >> i*8) & 0xff for i in range(length)) elif order == 'big': return bytes((n >> i*8) & 0xff for i in reversed(range(length))) or even: def to_bytes(n, length, order): indexes = range(length) if order == 'little' else reversed(range(length)) return bytes((n >> i*8) & 0xff for i in indexes) This is also done for http://docs.python.org/3.3/library/stdtypes.html#int.bit_length just above to/from_bytes, so it might be a good addition. If this is done, the equivalent function can also be added to the test suite, so we can verify that it's indeed equivalent. ---------- keywords: +easy stage: -> needs patch versions: +Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 22:44:41 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 09 Dec 2012 21:44:41 +0000 Subject: [docs] [issue16652] socket.getfqdn docs are not explicit enough about the algorithm. Message-ID: <1355089481.55.0.645096435972.issue16652@psf.upfronthosting.co.za> New submission from R. David Murray: >From the docs it isn't quite clear if getfqnd() does the equivalent of: gethostbyaddr('127.0.0.1') or gethostbyaddr(gethostbyname(gethostname())) It matters which it is, when debugging a host's name configuration and DNS server problems. ---------- assignee: docs at python components: Documentation messages: 177236 nosy: docs at python, r.david.murray priority: normal severity: normal status: open title: socket.getfqdn docs are not explicit enough about the algorithm. type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 22:53:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 21:53:24 +0000 Subject: [docs] [issue13211] urllib2.HTTPError does not have 'reason' attribute. In-Reply-To: <1318943168.93.0.520705450261.issue13211@psf.upfronthosting.co.za> Message-ID: <3YKLl72PyyzRVw@mail.python.org> Roundup Robot added the comment: New changeset e1ba514ddcd2 by Senthil Kumaran in branch '3.2': Fix issue13211 - Document the reason attribute for urllib.error.HTTPError http://hg.python.org/cpython/rev/e1ba514ddcd2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 22:54:13 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 09 Dec 2012 21:54:13 +0000 Subject: [docs] [issue16634] urllib.error.HTTPError.reason is not documented In-Reply-To: <1354884656.5.0.110910747898.issue16634@psf.upfronthosting.co.za> Message-ID: <1355090053.81.0.578575186348.issue16634@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Thanks for raising the bug and patch, Berker Peksag. Fixed in all versions. ---------- nosy: +orsenthil resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:25:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Dec 2012 02:25:05 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <3YKSmc4mYFzRZH@mail.python.org> Roundup Robot added the comment: New changeset 181c170c6270 by Chris Jerdonek in branch '3.2': Issue #16629: Fix IDLE idlelib.CallTips test. Patch by Roger Serwy. http://hg.python.org/cpython/rev/181c170c6270 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:57:39 2012 From: report at bugs.python.org (Paddy McCarthy) Date: Mon, 10 Dec 2012 05:57:39 +0000 Subject: [docs] [issue16580] Add examples to int.to_bytres and int.from_bytes In-Reply-To: <1355050536.14.0.511880853298.issue16580@psf.upfronthosting.co.za> Message-ID: <50C57977.7020506@googlemail.com> Paddy McCarthy added the comment: On 09/12/2012 10:55, Ezio Melotti wrote: > Ezio Melotti added the comment: > > Usually we add plain Python equivalents when they are simple enough that the code equivalent is as understandable as the prose or more (see for example http://docs.python.org/3/library/functions.html#all, or the itertools functions you mentioned). > For this case I think it would help if you presented an equivalent function, e.g.: > > def to_bytes(n, length, order): > if order == 'little': > return bytes((n >> i*8) & 0xff for i in range(length)) > elif order == 'big': > return bytes((n >> i*8) & 0xff for i in reversed(range(length))) > > or even: > > def to_bytes(n, length, order): > indexes = range(length) if order == 'little' else reversed(range(length)) > return bytes((n >> i*8) & 0xff for i in indexes) > > This is also done for http://docs.python.org/3.3/library/stdtypes.html#int.bit_length just above to/from_bytes, so it might be a good addition. > If this is done, the equivalent function can also be added to the test suite, so we can verify that it's indeed equivalent. > > ---------- > keywords: +easy > stage: -> needs patch > versions: +Python 2.7, Python 3.2, Python 3.4 > > _______________________________________ > Python tracker > > _______________________________________ > The second example looks great. I like the dual use for testing too and will try and remember both the next time I find I have ireas about the documentation. Thanks guys. It's appreciated! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 10:19:08 2012 From: report at bugs.python.org (Robert Collins) Date: Tue, 11 Dec 2012 09:19:08 +0000 Subject: [docs] [issue12600] Add example of using load_tests to parameterise Test Cases In-Reply-To: <1311226769.48.0.369455670372.issue12600@psf.upfronthosting.co.za> Message-ID: <1355217547.79.0.906838458082.issue12600@psf.upfronthosting.co.za> Robert Collins added the comment: BTW I'm very happy with testscenarios (on pypi) for this, modulo one small issue which is the use of __str__ by the stdlib [which isn't easily overridable - there is a separate issue on that]. I'd be delighted to have testscenarios be in the stdlib, if thats desirable. ---------- nosy: +rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:16:31 2012 From: report at bugs.python.org (r3m0t) Date: Tue, 11 Dec 2012 16:16:31 +0000 Subject: [docs] [issue16663] Poor documentation for METH_KEYWORDS Message-ID: <1355242591.45.0.999993608815.issue16663@psf.upfronthosting.co.za> New submission from r3m0t: http://docs.python.org/3.3/c-api/structures.html#METH_KEYWORDS "Methods with these flags must be of type PyCFunctionWithKeywords. The function expects three parameters: self, args, and a dictionary of all the keyword arguments. The flag is typically combined with METH_VARARGS, and the parameters are typically processed using PyArg_ParseTupleAndKeywords()." The documentation doesn't mention the args/dictionary arguments will be NULL when there are no positional/keyword arguments. It might also be worth mentioning the arguments are in effect "borrowed" references. ---------- assignee: docs at python components: Documentation messages: 177341 nosy: docs at python, r3m0t priority: normal severity: normal status: open title: Poor documentation for METH_KEYWORDS versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:33:17 2012 From: report at bugs.python.org (rurpy the second) Date: Tue, 11 Dec 2012 20:33:17 +0000 Subject: [docs] [issue16665] doc for builtin hex() is poor Message-ID: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> New submission from rurpy the second: The documentation of the hex() builtin function is poor. Specifically it does not say (directly) that: 1. The resulting string is prefixed with "0x". 2. Any a-f characters used are lower case. 3. Negative integers are converted by prefixing a minus sign to hex() of the absolute value of the argument. 4. It should have a cross reference to the %x format of the "%" operator with a note that it is more veratile than the hex() builtin. 5. It should have a cross reference to the way of performing the inverse operation: hex->int I am not a good writer but here is an attempt at improving it: -------- Convert an integer number to a hexadecimal string. The resulting string is prefixed with "0x" and any alpha characters a-f are lowercase ascii. Negative integers are converted to hex(abs(x)) prefixed with "-". In all cases the result is a valid Python expression. If x is not a Python int object, it has to define an __index__() method that returns an integer. Note: For another more flexible way of converting an integer to hexadecimal see the "x" and "X" conversion types in link:[4.7.2 - printf-style String Formatting] and link:[6.1.3.1 - Format Specification Mini-Language] Note: To convert a hexadecimal string to an integer, use link:[int()] with a radix argument of 16. Note: To obtain a hexadecimal string representation for a float, use the link:[float.hex()] method. -------- ---------- assignee: docs at python components: Documentation messages: 177352 nosy: docs at python, rurpy2 priority: normal severity: normal status: open title: doc for builtin hex() is poor versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:42:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 11 Dec 2012 20:42:05 +0000 Subject: [docs] [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355258525.04.0.29116398919.issue16665@psf.upfronthosting.co.za> Ezio Melotti added the comment: +1 ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch type: -> enhancement versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 00:00:09 2012 From: report at bugs.python.org (Mikel Ward) Date: Tue, 11 Dec 2012 23:00:09 +0000 Subject: [docs] [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x Message-ID: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> New submission from Mikel Ward: The docs for 2.6 and 2.7 say socket.getaddrinfo takes keyword arguments. http://docs.python.org/release/2.6.6/library/socket.html?highlight=socket#socket.getaddrinfo > socket.getaddrinfo(host, port, family=0, socktype=0, proto=0, flags=0) But that doesn't actually work in Python 2.7. $ ./python Python 2.7.3+ (2.7:ec4ea40be2f6, Dec 11 2012, 14:43:35) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> s = socket.getaddrinfo('localhost', 999, family=socket.AF_INET) Traceback (most recent call last): File "", line 1, in TypeError: getaddrinfo() takes no keyword arguments Looks like it was introduced in 61999:c963478b9092. ---------- assignee: docs at python components: Documentation messages: 177356 nosy: Mikel.Ward, docs at python priority: normal severity: normal status: open title: docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 02:00:18 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 12 Dec 2012 01:00:18 +0000 Subject: [docs] [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355274018.17.0.450260213274.issue16667@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 02:11:46 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 12 Dec 2012 01:11:46 +0000 Subject: [docs] [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355274706.55.0.721027343712.issue16667@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 04:25:12 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 12 Dec 2012 03:25:12 +0000 Subject: [docs] [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355282711.95.0.138529260398.issue16666@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This might be a good place to use the newly-documented "positional-only" nomenclature: http://docs.python.org/2.7/glossary.html#term-parameter ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 07:11:35 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 12 Dec 2012 06:11:35 +0000 Subject: [docs] [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355292695.4.0.729297041495.issue16665@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 for the suggested text. For some of the points, a couple examples will do a better job of explaining hex() that trying to write-out the full code specification in prose. Overly wordy documentation is harder to use than something short that addresses the primary use case. Also, the suggested "notes" editorialize and venture into the realm of personal coding preferences. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 07:24:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 12 Dec 2012 06:24:48 +0000 Subject: [docs] [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355293488.87.0.938405447635.issue16665@psf.upfronthosting.co.za> Ezio Melotti added the comment: FTR my +1 was about the suggestion, not the proposed text. The first 3 points can be explained with an example, the last 2 can be added in the prose. I also agree that notes are not necessary (especially if they use the "note" rst directive). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 09:22:22 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 12 Dec 2012 08:22:22 +0000 Subject: [docs] [issue12600] Add example of using load_tests to parameterise Test Cases In-Reply-To: <1311226769.48.0.369455670372.issue12600@psf.upfronthosting.co.za> Message-ID: <1355300542.6.0.69187507037.issue12600@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 18:39:54 2012 From: report at bugs.python.org (julien tayon) Date: Wed, 12 Dec 2012 17:39:54 +0000 Subject: [docs] [issue16670] class Point in collections.namedtuples may be not that good example Message-ID: <1355333994.73.0.927546875612.issue16670@psf.upfronthosting.co.za> New submission from julien tayon: Priority: low Keywords: documentation After watching http://www.youtube.com/watch?v=o9pEzgHorH0 (Stop writing classes by diedrich) I think the class Point example for the named tuples may be a wrong practice: http://docs.python.org/2/library/collections.html#collections.namedtuple Since complex basic types 1* does the same, (if x is real and y is imag) 2* does more (rotation, norms, symbolic notation with i) At my opnion pointing some code to http://bugs.python.org/issue1818 (if it is accepted) may be the case of use of the named tuple. ---------- assignee: docs at python components: Documentation messages: 177382 nosy: docs at python, julien.tayon priority: normal severity: normal status: open title: [docs] class Point in collections.namedtuples may be not that good example versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 19:20:17 2012 From: report at bugs.python.org (rurpy) Date: Wed, 12 Dec 2012 18:20:17 +0000 Subject: [docs] [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355336417.49.0.893154208266.issue16665@psf.upfronthosting.co.za> rurpy added the comment: Raymond Hettinger (rhettinger) msg177365: > For some of the points, a couple examples will do a better job of explaining hex() that trying to write-out the full code specification in prose. Examples should never substitute for a clear, complete and concise description. Examples serve to illustrate and clarify a description. An example can only describe usage at a single point in the solution space. The prose description (when well written) describes the total solution space. > Overly wordy documentation is harder to use than something short that addresses the primary use case. No comments in this issue have suggested providing an "overly wordy" description. The suggestion was for wording that accurately and concisely describes the behavior of the hex() function. That is what good reference material is supposed to do. Reference documentation should describe the behavior of its subject including any corner cases. Addressing only "the primary use case" is not sufficient. For addressing the primary use case, supplement the prose with an example. > Also, the suggested "notes" editorialize and venture into the realm of personal coding preferences. That characterization is incorrect. There is no editorializing (if this in reference to the word "flexible" in the note). It is a fact that string formatting with the %x specifier also converts to hex and offers more control over the output than the hex() function does. A reader interested in the hex() function should be apprised of this alternative. Perhaps there is some other word that you would find more neutral than "flexible"? There is no venturing into personal coding preferences -- only the factual and appropriate mention of an alternative. One of the cheapest, easiest ways of improving documentation is good cross-referencing to related items. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 21:11:25 2012 From: report at bugs.python.org (myreallycoolname) Date: Wed, 12 Dec 2012 20:11:25 +0000 Subject: [docs] [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355343085.4.0.844103031692.issue16607@psf.upfronthosting.co.za> myreallycoolname added the comment: I am updating my bug report unfortunatly I am unable to give you a specific link due to the fact that I can not find the python3.2 documentation online. I do assure you that the docs from my computer are for python3.2 (as I have no other docs installed.) To find the docs I'm complaining about go to the index select tutorial and click on the classes section. The bad code along with the start of the chapter it is located in and the trace backs follow. Please note that errors are cumulative. In other words if you use variable a and variable a has no value (not created deffined etc.) then every time you use it you will get an error. Code follows: 9.2.1. Scopes and Namespaces Example This is an example demonstrating how to reference the different scopes and namespaces, and howglobal and nonlocal affect variable binding: >>> def scope_test(): ... def do_local(): ... spam = "local spam" ... def do_nonlocal(): ... nonlocal spam ... spam = "nonlocal spam" ... def do_global(): ... global spam ... spam = "global spam" ... SyntaxError: no binding for nonlocal 'spam' found >>> spam = "test spam" File "", line 1 spam = "test spam" ^ IndentationError: unexpected indent >>> do_local() File "", line 1 do_local() ^ IndentationError: unexpected indent >>> print("After local assignment:", spam) File "", line 1 print("After local assignment:", spam) ^ IndentationError: unexpected indent >>> do_nonlocal() File "", line 1 do_nonlocal() ^ IndentationError: unexpected indent >>> print("After nonlocal assignment:", spam) File "", line 1 print("After nonlocal assignment:", spam) ^ IndentationError: unexpected indent >>> do_global() File "", line 1 do_global() ^ IndentationError: unexpected indent >>> print("After global assignment:", spam) File "", line 1 print("After global assignment:", spam) ^ IndentationError: unexpected indent >>> >>> scope_test() Traceback (most recent call last): File "", line 1, in NameError: name 'scope_test' is not defined >>> print("In global scope:", spam) Traceback (most recent call last): File "", line 1, in NameError: name 'spam' is not defined 9.3.3. Instance Objects Now what can we do with instance objects? The only operations understood by instance objects are attribute references. There are two kinds of valid attribute names, data attributes and methods. data attributes correspond to ?instance variables? in Smalltalk, and to ?data members? in C++. Data attributes need not be declared; like local variables, they spring into existence when they are first assigned to. For example, if x is the instance of MyClass created above, the following piece of code will print the value 16, without leaving a trace: >>> x.counter = 1 >>> while x.counter < 10: ... x.counter = x.counter * 2 ... print(x.counter) File "", line 3 print(x.counter) ^ SyntaxError: invalid syntax >>> del x.counter 9.9. Iterators By now you have probably noticed that most container objects can be looped over using a forstatement: >>> for element in [1, 2, 3]: ... print(element) ... for element in (1, 2, 3): File "", line 3 for element in (1, 2, 3): ^ SyntaxError: invalid syntax >>> print(element) File "", line 1 print(element) ^ IndentationError: unexpected indent >>> for key in {'one':1, 'two':2}: ... print(key) ... for char in "123": File "", line 3 for char in "123": ^ SyntaxError: invalid syntax >>> print(char) File "", line 1 print(char) ^ IndentationError: unexpected indent >>> for line in open("myfile.txt"): ... print(line) ... Traceback (most recent call last): File "", line 1, in IOError: [Errno 2] No such file or directory: 'myfile.txt' >>> This is one html page of errors not just one section. You may also want to check the python 3.3 docs for these errors. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 22:12:54 2012 From: report at bugs.python.org (John Hampton) Date: Wed, 12 Dec 2012 21:12:54 +0000 Subject: [docs] [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355346774.64.0.278724663939.issue16607@psf.upfronthosting.co.za> John Hampton added the comment: The documentation is correct. The problem that you seem to be having are due to copy and pasting in the interpreter. The source of you first error is that after you copy >>> def scope_test(): ... def do_local(): ... spam = "local spam" ... def do_nonlocal(): ... nonlocal spam ... spam = "nonlocal spam" ... def do_global(): ... global spam ... spam = "global spam" ... into the interpreter, you press enter and the blank line tells the interpreter that you're done defining the class. However, if you look at the docs, the following statements: spam = "test spam" do_local() print("After local assignment:", spam) do_nonlocal() print("After nonlocal assignment:", spam) do_global() print("After global assignment:", spam) are supposed to be part of the class. A similar issue exists for the issues you're experiencing with the loops. Except it's the opposite. In this case: >>> for element in [1, 2, 3]: ... print(element) ... for element in (1, 2, 3): File "", line 3 for element in (1, 2, 3): ^ SyntaxError: invalid syntax the interpreter is expecting a blank line after the print statement to indicate that the loop is done. Since the second loop starts on the lien after "print", it thinks there is an indentation error. ---------- nosy: +pacopablo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 00:55:22 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 12 Dec 2012 23:55:22 +0000 Subject: [docs] [issue16670] class Point in collections.namedtuples may be not that good example In-Reply-To: <1355333994.73.0.927546875612.issue16670@psf.upfronthosting.co.za> Message-ID: <1355356522.27.0.248206223814.issue16670@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I like the current example. It does a great job teaching people how namedtuples work. Also, I think you've drawn the wrong conclusions from Jack's talk. ---------- assignee: docs at python -> rhettinger nosy: +jackdied, rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 09:57:42 2012 From: report at bugs.python.org (Daniel Urban) Date: Thu, 13 Dec 2012 08:57:42 +0000 Subject: [docs] [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355389062.54.0.312799616363.issue16607@psf.upfronthosting.co.za> Daniel Urban added the comment: As John Hampton have explained it, the documentation is actually correct. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 12:23:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 13 Dec 2012 11:23:35 +0000 Subject: [docs] [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355397815.5.0.135535048678.issue16607@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 14:15:15 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 13 Dec 2012 13:15:15 +0000 Subject: [docs] [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355404515.44.0.512413066111.issue16667@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +patch Added file: http://bugs.python.org/file28301/issue16667.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 14:15:27 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 13 Dec 2012 13:15:27 +0000 Subject: [docs] [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355404527.87.0.297214823856.issue16667@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 14:52:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2012 13:52:40 +0000 Subject: [docs] [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355406760.1.0.99366733691.issue16667@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I've reworded patch a bit and made it based on 3.2 for easier merging. ---------- nosy: +asvetlov Added file: http://bugs.python.org/file28302/issue16667_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:15:38 2012 From: report at bugs.python.org (Nurhusien Hasen) Date: Thu, 13 Dec 2012 16:15:38 +0000 Subject: [docs] [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355404515.32.0.0539455876973.issue16667@psf.upfronthosting.co.za> Message-ID: Nurhusien Hasen added the comment: On 12/14/12, Berker Peksag wrote: > > Changes by Berker Peksag : > > > ---------- > keywords: +patch > Added file: http://bugs.python.org/file28301/issue16667.diff > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: > http://mail.python.org/mailman/options/python-bugs-list/nurhusien.hasen27%40gmail.com > > -- find signatures serves ---------- nosy: +Nurhusien2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:30:55 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 16:30:55 +0000 Subject: [docs] [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355416255.18.0.368680334509.issue16667@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- Removed message: http://bugs.python.org/msg177410 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:32:06 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2012 16:32:06 +0000 Subject: [docs] [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355416326.92.0.589069941403.issue16667@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:32:55 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 16:32:55 +0000 Subject: [docs] [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355416375.25.0.91279380976.issue16667@psf.upfronthosting.co.za> ?ric Araujo added the comment: Second patch has a stray slash character, and the versionadded directive does not seem to be in the same place as the first patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:37:15 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 16:37:15 +0000 Subject: [docs] [issue16670] Point class may be not be a good example for namedtuple In-Reply-To: <1355333994.73.0.927546875612.issue16670@psf.upfronthosting.co.za> Message-ID: <1355416635.6.0.542775810545.issue16670@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo title: [docs] class Point in collections.namedtuples may be not that good example -> Point class may be not be a good example for namedtuple versions: +Python 3.4 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:38:48 2012 From: report at bugs.python.org (myreallycoolname) Date: Thu, 13 Dec 2012 16:38:48 +0000 Subject: [docs] [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355416728.89.0.561890350946.issue16607@psf.upfronthosting.co.za> myreallycoolname added the comment: Ok, but perhaps in order to aviod confusion the documentation could be changed so that the examples are complete or have an additional new line as needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:38:54 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 16:38:54 +0000 Subject: [docs] [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355416734.55.0.566065623502.issue16665@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:38:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2012 16:38:54 +0000 Subject: [docs] [issue16670] Point class may be not be a good example for namedtuple In-Reply-To: <1355333994.73.0.927546875612.issue16670@psf.upfronthosting.co.za> Message-ID: <1355416734.47.0.160700061106.issue16670@psf.upfronthosting.co.za> Andrew Svetlov added the comment: +1 for leaving the doc as is ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:40:05 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2012 16:40:05 +0000 Subject: [docs] [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355416805.94.0.626989648418.issue16666@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:53:58 2012 From: report at bugs.python.org (John Hampton) Date: Thu, 13 Dec 2012 16:53:58 +0000 Subject: [docs] [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355417638.0.0.0680403445482.issue16607@psf.upfronthosting.co.za> John Hampton added the comment: Ok, but perhaps in order to aviod confusion the documentation could be changed so that the examples are complete or have an additional new line as needed. Well, they are complete. And it's only an issue with the interpreter. If you were to copy and paste the examples into a file, say example.py, and run that with python via: python example.py then they would work as they are supposed to. If you backup in the tutorial to: http://docs.python.org/3/tutorial/interpreter.html#interactive-mode You will read an explanation of the interpreter prompts. It may be that there is a way to make it clearer, but to update those examples would require similar adjustments all over the docs. It would also only benefit the case where one were trying to run the code in the interpreter, and would make it more annoying to copy and paste into a file. So, I don't think changing anything is worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:13:40 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 17:13:40 +0000 Subject: [docs] [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355418820.05.0.285885130838.issue16666@psf.upfronthosting.co.za> ?ric Araujo added the comment: There are two or three issues on this tracker where we discuss the parameters notation conventions. I think I remember a proposal to add text explaining that the keyword notation does not imply that the function accepts keyword argument, only that there is a default value. Chris, does that ring a bell? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:56:07 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 13 Dec 2012 17:56:07 +0000 Subject: [docs] [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355421366.94.0.0974863188206.issue16666@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Is issue 13386 one of the issues you had in mind, ?ric? I don't know the current best practices for all of the signature edge cases, but Ezio might. Personally, I think explicitly stating in the text that the parameters are positional-only can't hurt, especially since that's the rarer case, no? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 19:22:02 2012 From: report at bugs.python.org (rurpy) Date: Thu, 13 Dec 2012 18:22:02 +0000 Subject: [docs] [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355422922.83.0.0569505954994.issue16665@psf.upfronthosting.co.za> rurpy added the comment: An ammendment to my proposed doc change. Replace the text (which is unchanged from the current doc), "...the result is a valid Python expression" with, "...the result is a valid Python "hexinteger" literal (see link:[Python Lang Ref, sec 2.4.4. Integer literals]) "Python epression" in the current doc is way more non-specific than it need be. The result is not any old python expression, it is a very specific type of python expression so the doc should say that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 19:24:53 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 13 Dec 2012 18:24:53 +0000 Subject: [docs] [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355423093.41.0.847195849956.issue16666@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Personally, I think explicitly stating in the text that the parameters > are positional-only can't hurt, especially since that's the rarer case, > no? OTOH it's an implementation detail that might be changed at some point. The other option is to use [] in the signature and document the default values in the text, and possibly fix it for 3.4 (or does it work there already?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 20:26:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 13 Dec 2012 19:26:42 +0000 Subject: [docs] [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355426802.46.0.263034233188.issue16666@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This issue only applies to 2.7. Keyword arguments are accepted in 3.x. See the interactive example here, for example: http://docs.python.org/3.2/library/socket.html#socket.getaddrinfo ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 21:13:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 13 Dec 2012 20:13:38 +0000 Subject: [docs] [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355429618.64.0.218869527015.issue16666@psf.upfronthosting.co.za> Ezio Melotti added the comment: In that case I think it's OK to use the [] and mention the default values in the text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:09:55 2012 From: report at bugs.python.org (rurpy) Date: Fri, 14 Dec 2012 06:09:55 +0000 Subject: [docs] [issue16677] Hard to find operator precedence in Lang Ref. Message-ID: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> New submission from rurpy: Python Language Reference, chapter 6 "Expressions". The last section (6.15) of this is titled, "Summary". That title is misleading -- it is not really a summary of the "Expressions" chapter but rather, as the first sentence makes clear, a table of operator precedences. It is not really even a "summary" of operator precedences since some of the preceeding operator sections don't mention their precedence. And adding to the confusion, none of preceding sections even use the word precedence, referring instead to "binding" or "priority". Operator precedences are something many users frequently look for frequently in a language reference and the lack of an Operator Precedence entry in the ToC makes this section hard to find. There are no index entries for "operators/precedence" or "expressions/order of evaluation". There is an index entry for "evaluation order" but that points to a different section. At a minimum, this section should have its title changed from "Summary" to "Operator Precedence" and get one or more index entries. In other languages operator precedence is often described and indexed under "order of evaluation", often as a subindex of "expressions". In the Python reference, there is a very short section called, 6.14, "Evaluation Order" that immediately preceeds the Operator Precedence section. That section and the Operator Precedence section could be effectively combined into a single section. ---------- assignee: docs at python components: Documentation messages: 177444 nosy: docs at python, rurpy2 priority: normal severity: normal status: open title: Hard to find operator precedence in Lang Ref. type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:27:36 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 14 Dec 2012 08:27:36 +0000 Subject: [docs] [issue16678] optparse: parse only known options Message-ID: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> New submission from anatoly techtonik: This following recipe from Optik examples should be added to documentation. It is extremely helpful when porting to optparse from getopt or other option parsing schemes. ---------- assignee: docs at python components: Documentation messages: 177447 nosy: docs at python, techtonik priority: normal severity: normal status: open title: optparse: parse only known options versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:27:43 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 14 Dec 2012 08:27:43 +0000 Subject: [docs] [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355473663.27.0.274217191453.issue16678@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file28307/pass_through.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:28:24 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 14 Dec 2012 08:28:24 +0000 Subject: [docs] [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355473704.24.0.812938435223.issue16678@psf.upfronthosting.co.za> anatoly techtonik added the comment: It allows to port options to and from optparse incrementally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 10:10:30 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Dec 2012 09:10:30 +0000 Subject: [docs] [issue16677] Hard to find operator precedence in Lang Ref. In-Reply-To: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> Message-ID: <1355476230.0.0.6829788195.issue16677@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +chris.jerdonek, ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:11:37 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Dec 2012 14:11:37 +0000 Subject: [docs] [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355494297.8.0.449740614607.issue16678@psf.upfronthosting.co.za> R. David Murray added the comment: We aren't encouraging people to use optparse any more. The recipe isn't needed in argparse, as that has a "parse_known_args" method that achieves the same end. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:05:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Dec 2012 15:05:09 +0000 Subject: [docs] [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <3YNFRm57PwzQQk@mail.python.org> Roundup Robot added the comment: New changeset 6eefe4d537b3 by Andrew Svetlov in branch 'default': Issue #16421: allow to load multiple modules from the same shared object. http://hg.python.org/cpython/rev/6eefe4d537b3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:06:24 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Dec 2012 15:06:24 +0000 Subject: [docs] [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1355497583.95.0.369667113798.issue16421@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Sorry for delay. Thanks, Vaclav! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:42:11 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2012 16:42:11 +0000 Subject: [docs] [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1355503331.38.0.850329598574.issue16421@psf.upfronthosting.co.za> STINNER Victor added the comment: Some tests are failing since the changeset 6eefe4d537b3. Example: http://buildbot.python.org/all/builders/x86%20RHEL%206%203.x/builds/1431/steps/test/logs/stdio Please check buildbots. [176/371] test_pkgutil test_getdata_filesys (test.test_pkgutil.PkgutilTests) ... ok test_getdata_zipfile (test.test_pkgutil.PkgutilTests) ... ok test_unreadable_dir_on_syspath (test.test_pkgutil.PkgutilTests) ... ok test_alreadyloaded (test.test_pkgutil.PkgutilPEP302Tests) ... ERROR test_getdata_pep302 (test.test_pkgutil.PkgutilPEP302Tests) ... ERROR test_mixed_namespace (test.test_pkgutil.ExtendPathTests) ... ERROR test_simple (test.test_pkgutil.ExtendPathTests) ... ERROR test_nested (test.test_pkgutil.NestedNamespacePackageTest) ... ok test_get_importer_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_importer_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok test_iter_importers_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_loader_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok ====================================================================== ERROR: test_alreadyloaded (test.test_pkgutil.PkgutilPEP302Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_pkgutil.py", line 139, in test_alreadyloaded self.assertEqual(foo.loads, 1) AttributeError: 'module' object has no attribute 'loads' ====================================================================== ERROR: test_getdata_pep302 (test.test_pkgutil.PkgutilPEP302Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/pkgutil.py", line 502, in find_loader return importlib.find_loader(fullname, path) File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/importlib/__init__.py", line 64, in find_loader loader = sys.modules[name].__loader__ AttributeError: 'module' object has no attribute '__loader__' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_pkgutil.py", line 131, in test_getdata_pep302 self.assertEqual(pkgutil.get_data('foo', 'dummy'), "Hello, world!") File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/pkgutil.py", line 625, in get_data loader = get_loader(package) File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/pkgutil.py", line 480, in get_loader return find_loader(fullname) File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/pkgutil.py", line 508, in find_loader raise ImportError(msg.format(fullname, type(ex), ex)) from ex ImportError: Error while finding loader for 'foo' (: 'module' object has no attribute '__loader__') ====================================================================== ERROR: test_mixed_namespace (test.test_pkgutil.ExtendPathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 1523, in _find_and_load_unlocked AttributeError: 'module' object has no attribute '__path__' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_pkgutil.py", line 198, in test_mixed_namespace import foo.bar ImportError: No module named 'foo.bar'; foo is not a package ====================================================================== ERROR: test_simple (test.test_pkgutil.ExtendPathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 1523, in _find_and_load_unlocked AttributeError: 'module' object has no attribute '__path__' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_pkgutil.py", line 170, in test_simple import foo.bar ImportError: No module named 'foo.bar'; foo is not a package ---------------------------------------------------------------------- Ran 13 tests in 0.027s ---------- nosy: +haypo resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:27:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 17:27:44 +0000 Subject: [docs] [issue16682] Document that audioop works with bytes, not strings Message-ID: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The audioop module documentation says that functions works with Python strings. This was right in 2.x, but in 3.x here should be bytes objects (actually the functions accept strings too, but this is an implementation detail, meaningless in general). ---------- assignee: docs at python components: Documentation messages: 177474 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Document that audioop works with bytes, not strings type: enhancement versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:28:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 17:28:25 +0000 Subject: [docs] [issue16682] Document that audioop works with bytes, not strings In-Reply-To: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> Message-ID: <1355506105.86.0.49499199927.issue16682@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +patch Added file: http://bugs.python.org/file28312/audioop_docs_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:31:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 17:31:32 +0000 Subject: [docs] [issue16683] Resort audioop documentation Message-ID: <1355506291.98.0.0406500704965.issue16683@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Functions in the audioop module documentation enumerated in alphabetic order. Only one function out of order. Here is a patch that fixes this. ---------- assignee: docs at python components: Documentation files: audioop_docs_resort.patch keywords: patch messages: 177475 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Resort audioop documentation type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28313/audioop_docs_resort.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:20:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Dec 2012 18:20:24 +0000 Subject: [docs] [issue16683] Resort audioop documentation In-Reply-To: <1355506291.98.0.0406500704965.issue16683@psf.upfronthosting.co.za> Message-ID: <3YNKn40yCmzNjb@mail.python.org> Roundup Robot added the comment: New changeset e451901e6243 by Ezio Melotti in branch '2.7': #16683: restore alphabetical order in audioop docs. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/e451901e6243 New changeset 5777ac884919 by Ezio Melotti in branch '3.2': #16683: restore alphabetical order in audioop docs. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/5777ac884919 New changeset a1ffb6c68711 by Ezio Melotti in branch '3.3': #16683: merge with 3.2. http://hg.python.org/cpython/rev/a1ffb6c68711 New changeset f32f67d26035 by Ezio Melotti in branch 'default': #16683: merge with 3.3. http://hg.python.org/cpython/rev/f32f67d26035 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:20:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Dec 2012 18:20:58 +0000 Subject: [docs] [issue16683] Resort audioop documentation In-Reply-To: <1355506291.98.0.0406500704965.issue16683@psf.upfronthosting.co.za> Message-ID: <1355509258.73.0.208210614739.issue16683@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:04:33 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 14 Dec 2012 20:04:33 +0000 Subject: [docs] [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355515473.22.0.328869357516.issue16678@psf.upfronthosting.co.za> ?ric Araujo added the comment: I agree with David and suggest closing this as outdated. Thanks for the suggestion nonetheless. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:19:14 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Dec 2012 20:19:14 +0000 Subject: [docs] [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355516354.1.0.718879031793.issue16678@psf.upfronthosting.co.za> Andrew Svetlov added the comment: +1 for closing as "won't fix" ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:48:12 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Dec 2012 20:48:12 +0000 Subject: [docs] [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355518092.35.0.520186398448.issue16678@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:55:54 2012 From: report at bugs.python.org (Jeff Knupp) Date: Fri, 14 Dec 2012 20:55:54 +0000 Subject: [docs] [issue16687] Fix small gramatical error and add reference link in hashlib documentation Message-ID: <1355518554.59.0.0791078366076.issue16687@psf.upfronthosting.co.za> New submission from Jeff Knupp: Original text is: > Feeding string objects is to update is not supported Should be "... objects in to update" instead of "is to" Also, mark "GIL" as a :term: to provide a link to its definition, as it's used without much context in the following note: > .. note:: > > For better multithreading performance, the Python :term:`GIL` is > released for strings of more than 2047 bytes at object creation or > on update. ---------- assignee: docs at python components: Documentation files: patch.txt messages: 177507 nosy: Jeff.Knupp, docs at python priority: normal severity: normal status: open title: Fix small gramatical error and add reference link in hashlib documentation versions: Python 3.5 Added file: http://bugs.python.org/file28318/patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 15:46:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 14:46:42 +0000 Subject: [docs] [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1355582801.92.0.863437781784.issue16421@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed it looks like this commit may be the culprit for numerous buildbot failures. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 15:48:16 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 14:48:16 +0000 Subject: [docs] [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1355582896.52.0.686618711669.issue16421@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Naming the test modules "foo" and "bar" was perhaps not the best idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 16:23:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Dec 2012 15:23:10 +0000 Subject: [docs] [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <3YNsp56xs5zRcp@mail.python.org> Roundup Robot added the comment: New changeset 2e492a9a1845 by Andrew Svetlov in branch 'default': Rename test module names for #16421 to don't clash with other tests. http://hg.python.org/cpython/rev/2e492a9a1845 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 17:28:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Dec 2012 16:28:40 +0000 Subject: [docs] [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1355588920.68.0.841437110267.issue16421@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Antoine, you are right: foo and bar was bad names. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 19:33:08 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2012 18:33:08 +0000 Subject: [docs] [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355596388.5.0.157997478412.issue16665@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:59:28 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2012 19:59:28 +0000 Subject: [docs] [issue16670] Point class may be not be a good example for namedtuple In-Reply-To: <1355333994.73.0.927546875612.issue16670@psf.upfronthosting.co.za> Message-ID: <1355601568.34.0.939352060498.issue16670@psf.upfronthosting.co.za> Terry J. Reedy added the comment: [Raymond, I am assuming that you only left this open for additional comments, possibly more favorable than yours. If I am wrong, reopen.] I have not read the namedtuple doc before. I did so now and think the Point example is fine for the purpose of explaining namedtuples and should be left as is. It is clear to me and should be for anyone. For instance, it naturally leads to this example. "Subclassing is not useful for adding new, stored fields. Instead, simply create a new named tuple type from the _fields attribute: >>> Point3D = namedtuple('Point3D', Point._fields + ('z',))" While I do not consider the issue of 'practice' to be entirely relevant here, I note that complex numbers only work for 2-d points while tuples work for other dimensions, as the above shows. Tuples can be easily multiplied by a transformation matrix of the same dimension through indexing. The namedtuple factory just creates a friendly facade for what is still basically a tuple. "Named tuple instances do not have per-instance dictionaries, so they are lightweight and require no more memory than regular tuples." Anyway, serious numerical work is more likely to use numpy arrays or something similar. ---------- nosy: +terry.reedy resolution: -> works for me stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 23:49:44 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2012 22:49:44 +0000 Subject: [docs] [issue16677] Hard to find operator precedence in Lang Ref. In-Reply-To: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> Message-ID: <1355611783.93.0.311160348164.issue16677@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree with index entries and that 6.14 Evaluation Order (7 lines) and 6.15 Summary (precedence table and notes) could be combined into 6.14 Evaluation Order and Precedence. I don't think the text necessarily needs revision. Just augment 6.14 and remove 6.15. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 01:38:48 2012 From: report at bugs.python.org (=?utf-8?q?Nacsa_Krist=C3=B3f?=) Date: Sun, 16 Dec 2012 00:38:48 +0000 Subject: [docs] [issue15962] Windows STDIN/STDOUT Redirection is actually FIXED In-Reply-To: <1347970794.78.0.910609008076.issue15962@psf.upfronthosting.co.za> Message-ID: <1355618328.03.0.264346374262.issue15962@psf.upfronthosting.co.za> Nacsa Krist?f added the comment: @dhgmgn I think the change is ok. That said, I add two things. It maybe should be noted which Windows version has this corrected. The article contains this string: "This problem was first corrected in Microsoft Windows 2000 Service Pack 4. This problem was first corrected in Windows XP Service Pack 1". The other thing is that I prefer if the relevant information is copied due to various reasons. One reason is that it serves as a "highlight" (nice time-saver and is also against TL;DR situations). Another is that Microsoft may simply cease support, or discontinue this link (they tend to do this). I'm not familiar with how the python docs is constructed, if there is a style guide, etc., but I can tell that I'd be happy if I could see this information there directly. This is also how I've found out about that cmd header line/'trick'. @ Another thing, can anyone else confirm that this works for [s]he? I've tested this on an 32-bit xp pro sp3. When _not_ using the fix, something like `foo | myscript.py | bar` results in: IOError: [Errno 9] Bad file descriptor With _using_ the registry fix from Microsoft, the command from above just works for me on the XP. (The cmd.exe/console needs to be restarted.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 11:32:16 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 16 Dec 2012 10:32:16 +0000 Subject: [docs] [issue16695] Clarify fnmatch & glob docs about the handling of leading "."s Message-ID: <1355653936.06.0.839482874064.issue16695@psf.upfronthosting.co.za> New submission from Hynek Schlawack: See issue16664. ---------- assignee: docs at python components: Documentation keywords: easy messages: 177584 nosy: Sebastian.Kreft, docs at python, hynek, pitrou priority: normal severity: normal stage: needs patch status: open title: Clarify fnmatch & glob docs about the handling of leading "."s type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 12:05:44 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 11:05:44 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1355655944.4.0.635281955426.issue14901@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 14:53:55 2012 From: report at bugs.python.org (wim glenn) Date: Sun, 16 Dec 2012 13:53:55 +0000 Subject: [docs] [issue16697] argparse kwarg 'choices' documentation Message-ID: <1355666035.13.0.877787561314.issue16697@psf.upfronthosting.co.za> New submission from wim glenn: Any object that supports the in operator can be passed as the choices value, so dict objects, set objects, custom containers, etc. are all supported. (from http://docs.python.org/dev/library/argparse.html#choices ) Actual behaviour is contradicted by the docs - it seems the container must additionally be iterable. When using a custom container, argparse b0rks on trying to iterate through choices. Using a metavar prevents this, but it still breaks on cases where the element is not in the container. More details here: http://stackoverflow.com/questions/13833566/python-argparse-choices-from-an-infinite-set ---------- assignee: docs at python components: Documentation messages: 177599 nosy: docs at python, wim.glenn priority: normal severity: normal status: open title: argparse kwarg 'choices' documentation type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 15:21:37 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 16 Dec 2012 14:21:37 +0000 Subject: [docs] [issue16697] argparse kwarg 'choices' documentation In-Reply-To: <1355666035.13.0.877787561314.issue16697@psf.upfronthosting.co.za> Message-ID: <1355667697.65.0.902981490069.issue16697@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of issue issue 16468, which may get closed with either a bug fix or a doc fix, depending on the outcome of the overall discussion. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> argparse only supports iterable choices type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:58:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 16:58:37 +0000 Subject: [docs] [issue16700] Document that bytes OS API can returns unusable results on Windows Message-ID: <1355677117.39.0.191453655217.issue16700@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Some OS functions which returns bytes (os.environb, os.getenvb(), os.getcwdb(), os.listdir(), os.readlink(), os.walk(), os.path.abspath(), os.path.expanduser(), os.path.expandvars(), os.path.realpath() and may be other) can return unusable result on Windows (see for example issue13247 and issue16656). The documentation should contains strong warnings about this. ---------- assignee: docs at python components: Documentation, Windows messages: 177613 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Document that bytes OS API can returns unusable results on Windows type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 18:07:06 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 17:07:06 +0000 Subject: [docs] [issue16700] Document that bytes OS API can returns unusable results on Windows In-Reply-To: <1355677117.39.0.191453655217.issue16700@psf.upfronthosting.co.za> Message-ID: <1355677626.4.0.0112948407942.issue16700@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 20:49:43 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Dec 2012 19:49:43 +0000 Subject: [docs] [issue16700] Document that bytes OS API can returns unusable results on Windows In-Reply-To: <1355677626.4.0.0112948407942.issue16700@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I don't remember il the deprecation of bytes filename is documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 21:41:14 2012 From: report at bugs.python.org (Ashwini Chaudhary) Date: Sun, 16 Dec 2012 20:41:14 +0000 Subject: [docs] [issue16701] Docs missing the behavior of += (in-place add) for lists. Message-ID: <1355690474.0.0.76209480062.issue16701@psf.upfronthosting.co.za> New submission from Ashwini Chaudhary: I think the python docs are missing the behavior of += for lists. It actually calls list.extend() but can't find that anywhere in docs expect in source code, http://hg.python.org/cpython/file/2d2d4807a3ed/Objects/listobject.c#l892. ---------- assignee: docs at python components: Documentation messages: 177627 nosy: docs at python, montysinngh priority: normal severity: normal status: open title: Docs missing the behavior of += (in-place add) for lists. type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 22:44:54 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 16 Dec 2012 21:44:54 +0000 Subject: [docs] [issue16701] Docs missing the behavior of += (in-place add) for lists. In-Reply-To: <1355690474.0.0.76209480062.issue16701@psf.upfronthosting.co.za> Message-ID: <1355694294.95.0.344682176724.issue16701@psf.upfronthosting.co.za> R. David Murray added the comment: Well, it is effectively documented by the text here: http://docs.python.org/3/reference/simple_stmts.html#augmented-assignment-statements since "a + b" is logically equivalent to a.extend(b) when a is being updated "in-place". The fact that it is in fact implemented using extend is an implementation detail. That said, it would be logical to add an entry for the augmented assignment to the table here: http://docs.python.org/3/library/stdtypes.html#mutable-sequence-types There also may be other places in that chapter where augmented assignment deserves mention. ---------- nosy: +r.david.murray versions: -Python 3.1, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 00:16:22 2012 From: report at bugs.python.org (Brian Curtin) Date: Sun, 16 Dec 2012 23:16:22 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1355699782.53.0.357969066723.issue14901@psf.upfronthosting.co.za> Brian Curtin added the comment: Looks alright so far. I'm working on reviewing and applying it. ---------- assignee: docs at python -> brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 07:18:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Dec 2012 06:18:58 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <3YPsdD0ynRzNjb@mail.python.org> Roundup Robot added the comment: New changeset 5edbd93509b8 by Brian Curtin in branch '3.2': Fix #14901. Update the Windows FAQ. http://hg.python.org/cpython/rev/5edbd93509b8 New changeset fe20d5bf0c93 by Brian Curtin in branch 'default': Add Ashish Nitin Patil for work on Issue #14901 http://hg.python.org/cpython/rev/fe20d5bf0c93 New changeset 81d1df1f512a by Brian Curtin in branch '2.7': Fix #14901. Update some sections of Windows FAQ. http://hg.python.org/cpython/rev/81d1df1f512a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 07:21:20 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 17 Dec 2012 06:21:20 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1355725280.78.0.519124464595.issue14901@psf.upfronthosting.co.za> Brian Curtin added the comment: Thanks for the patch. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From a.p.v.retsrov at gmail.com Mon Dec 3 14:21:22 2012 From: a.p.v.retsrov at gmail.com (Andrie Vorster) Date: Mon, 3 Dec 2012 15:21:22 +0200 Subject: [docs] File size! Message-ID: Halo I am Andrie Vorster, here on this page: http://docs.python.org/2/download.html it says the file size is 8 MB but it's 10.3 MB! Good day! -------------- next part -------------- An HTML attachment was scrubbed... URL: From b.dopplinger at gmail.com Mon Dec 3 18:25:33 2012 From: b.dopplinger at gmail.com (Benjamin Dopplinger) Date: Mon, 3 Dec 2012 18:25:33 +0100 Subject: [docs] bug report for docs.python.org for sqlite3 library doc Message-ID: hi I have found a bug on the page http://docs.python.org/3/library/sqlite3.html. There are a few examples where the documentation shows that it is possible to call close() on a Cursor object. But according to the list of all the Cursor methods which can be found on http://docs.python.org/3/library/sqlite3.html#cursor-objects no such close() method exists (although it does exist of course). So the only fix which has to be applied is to add the close() method in the listing of all the Cursor methods on http://docs.python.org/3/library/sqlite3.html#cursor-objects. Best regards Benjamin Dopplinger From m.herweg at gmx.de Mon Dec 3 21:40:07 2012 From: m.herweg at gmx.de (Martin Herweg) Date: Mon, 3 Dec 2012 21:40:07 +0100 Subject: [docs] http://docs.python.org/2/library/string.html#format-string-syntax Message-ID: <20121203214007.2575b904@lenovo> http://docs.python.org/2/library/string.html#format-string-syntax I suggest to change the examples so that they also work in Python 2.6 or add a comment to each line that it requires Python 2.7 It did bite me on android: PythonAPK is 2.7 but Py4A is still 2.6 Aligning the text and specifying a width: >>> '{:<30}'.format('left aligned') 'left aligned ' >>> '{:>30}'.format('right aligned') ' right aligned' >>> '{:^30}'.format('centered') ' centered ' >>> '{:*^30}'.format('centered') # use '*' as a fill char '***********centered***********' thank you! From gormanky at ohsu.edu Tue Dec 4 18:01:46 2012 From: gormanky at ohsu.edu (Kyle Gorman) Date: Tue, 4 Dec 2012 09:01:46 -0800 Subject: [docs] Bug in example code for the CSV library Message-ID: <602400B8-2266-4977-8BF5-FFDC51CC1FC0@ohsu.edu> Good day Python maintainers, I recently copied and pasted the example code at the bottom of the CSV module documentation. This code is designed to allow you to read and write unicode CSV files (by default, UTF-8). However, it doesn't work on quite minimal examples, in a way likely to stump beginners. I assume you have the code at the bottom of the CSV documentation page in a file called CSVunicode.py and it's in your path (I didn't bother attaching: lots of email systems are going to strip anything like Python attachments off an email, anyways). >>> from CSVunicode import UnicodeWriter >>> UnicodeWriter(open('temp.csv', 'r')).writerow((1, 2, 3)) Traceback (most recent call last): File "", line 1, in File "UnicodeCSV.py", line 58, in writerow self.writer.writerow([s.encode("utf-8") for s in row]) AttributeError: 'int' object has no attribute 'encode' The problem, of course, is that there is no guarantee that iterable argument sent to the writerow method each have a method "encode": they are quite likely to be integers. I don't have a simple suggestion about how to fix this. You could wrap "s" in the line that throws the AttributeError with the str() function (or check to see if hasattr(s, 'encode') before doing so), but that will break the functionality of the csv.QUOTE_* kwargs, which differentiate between numeric row values and their stringified variants. The whole issue seems to indicate the wrong level of abstraction, unfortunately (to my eyes). I'd be glad to help if I can be of any use as a writer (I used to work as a technical writer) or developer; Python means a lot to me. Yours, Kyle Gorman Center for Spoken Language Understanding, Oregon Health & Science University From gormanky at ohsu.edu Tue Dec 4 19:34:01 2012 From: gormanky at ohsu.edu (Kyle Gorman) Date: Tue, 4 Dec 2012 10:34:01 -0800 Subject: [docs] Bug in example code for the CSV library In-Reply-To: <602400B8-2266-4977-8BF5-FFDC51CC1FC0@ohsu.edu> References: <602400B8-2266-4977-8BF5-FFDC51CC1FC0@ohsu.edu> Message-ID: <2D264C8F-2372-45A2-8926-8DFDB6ED7366@ohsu.edu> I now have a bit of a solution: the offending line can be rewritten: self.writer.writerow([s.encode('utf-8') if hasattr(s, 'encode') else s for s in row]) In other words, encode s into UTF-8 if it's encodeable, otherwise keep as is: it's probably numeric. That should do for most use cases: it only breaks if s.__str__ returns non-ASCII Unicode code points, as far as I can tell. I confirmed this works nicely with quoting=QUOTE_NONNUMERIC. Kyle On Dec 4, 2012, at 9:01 AM, Kyle Gorman wrote: > Good day Python maintainers, > > I recently copied and pasted the example code at the bottom of the CSV module documentation. This code is designed to allow you to read and write unicode CSV files (by default, UTF-8). However, it doesn't work on quite minimal examples, in a way likely to stump beginners. > > I assume you have the code at the bottom of the CSV documentation page in a file called CSVunicode.py and it's in your path (I didn't bother attaching: lots of email systems are going to strip anything like Python attachments off an email, anyways). > >>>> from CSVunicode import UnicodeWriter >>>> UnicodeWriter(open('temp.csv', 'r')).writerow((1, 2, 3)) > Traceback (most recent call last): > File "", line 1, in > File "UnicodeCSV.py", line 58, in writerow > self.writer.writerow([s.encode("utf-8") for s in row]) > AttributeError: 'int' object has no attribute 'encode' > > The problem, of course, is that there is no guarantee that iterable argument sent to the writerow method each have a method "encode": they are quite likely to be integers. > > I don't have a simple suggestion about how to fix this. You could wrap "s" in the line that throws the AttributeError with the str() function (or check to see if hasattr(s, 'encode') before doing so), but that will break the functionality of the csv.QUOTE_* kwargs, which differentiate between numeric row values and their stringified variants. The whole issue seems to indicate the wrong level of abstraction, unfortunately (to my eyes). > > I'd be glad to help if I can be of any use as a writer (I used to work as a technical writer) or developer; Python means a lot to me. > > Yours, > Kyle Gorman > Center for Spoken Language Understanding, Oregon Health & Science University From d.s at daniel.shahaf.name Tue Dec 4 20:44:24 2012 From: d.s at daniel.shahaf.name (Daniel Shahaf) Date: Tue, 4 Dec 2012 21:44:24 +0200 Subject: [docs] A couple of minor issues Message-ID: <20121204194424.GH2926@lp-shahaf.local> First, http://mail.python.org/mailman/listinfo/docs claims this list's archives aren't public, and then links to the pipermail archives --- which are anonymously accessible. You might want to fix this inconsistency. Second, I think it'd be useful for :mod:`faulthandler.register` to link to :mod:`signal`, in case readers aren't already aware of the latter: diff -r b3fe2ef13470 Doc/library/faulthandler.rst --- a/Doc/library/faulthandler.rst Tue Dec 04 09:30:24 2012 +0100 +++ b/Doc/library/faulthandler.rst Tue Dec 04 16:20:40 2012 +0000 @@ -96,7 +96,9 @@ Register a user signal: install a handler for the *signum* signal to dump the traceback of all threads, or of the current thread if *all_threads* is - ``False``, into *file*. Call the previous handler if chain is ``True``. + ``False``, into *file*. Call the previous handler if *chain* is ``True``. + + See :mod:`signal.SIG*` for symbolic names of the available signals. Not available on Windows. Daniel (not subscribed; please CC on replies) From lev.levitsky at phystech.edu Wed Dec 5 18:38:30 2012 From: lev.levitsky at phystech.edu (Lev Levitsky) Date: Wed, 5 Dec 2012 21:38:30 +0400 Subject: [docs] Minor bug in the documentation of collections.Counter.subtract Message-ID: Hello everyone, I'd like to report a minor inaccuracy in the documentation of collections.Counter.subtract that I found here: http://docs.python.org/2/library/collections.html#collections.Counter.subtract (and its Python3 analog): The code sample provided there suggests that c.subtract(d) returns a new object: >>> c = Counter(a=4, b=2, c=0, d=-2)>>> d = Counter(a=1, b=2, c=3, d=4)>>> c.subtract(d)Counter({'a': 3, 'b': 0, 'c': -3, 'd': -6}) In reality, it modifies `c` in place similar to dict.update, and nothing is returned. A possible fix would be: >>> c = Counter(a=4, b=2, c=0, d=-2) >>> d = Counter(a=1, b=2, c=3, d=4) >>> c.subtract(d) >>> c Counter({'a': 3, 'b': 0, 'c': -3, 'd': -6}) Best regards, Lev -- Lev Levitsky Institute for Energy Problems of Chemical Physics RAS Laboratory of Physical and Chemical Methods for Structure Analysis Leninsky pr. 38, bld. 2 119334 Moscow Russia tel: +7 499 1378257 fax: +7 499 1378257, +7 499 1378258 -------------- next part -------------- An HTML attachment was scrubbed... URL: From dguth2 at illinois.edu Thu Dec 6 01:20:24 2012 From: dguth2 at illinois.edu (Guth, Dwight) Date: Thu, 6 Dec 2012 00:20:24 +0000 Subject: [docs] PEP 415 Message-ID: <8ABD6863470F4549BC297E8494CF51111E6E3FCD@CITESMBX5.ad.uillinois.edu> This page: http://docs.python.org/3.3/whatsnew/3.3.html Needs to list PEP 415 in the see also for PEP 409, since PEP 409's implementation is out of date and no longer applies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bgailer at gmail.com Thu Dec 6 17:15:54 2012 From: bgailer at gmail.com (bob gailer) Date: Thu, 06 Dec 2012 11:15:54 -0500 Subject: [docs] sum() Message-ID: <50C0C4BA.6000803@gmail.com> Currently: sum(iterable[, start]) Sums start and the items of an iterable from left to right and returns the total. start defaults to 0. The iterable?s items are normally numbers, and the start value is not allowed to be a string I just learned that sum([[1,2],[3,4]],[]) produces: [1, 2, 3, 4] I would never have guessed that from the explanation above! I think the terms "sum" and "total" are misleading. apply(operator.add, [[1,2], [3,4]]) generates the same result, but emphasizes the use of +. I suggest either explaining this explicitly or providing an example. -- Bob Gailer 919-636-4239 Chapel Hill NC From xuzhongjin at mychery.com Fri Dec 7 07:38:45 2012 From: xuzhongjin at mychery.com (=?gb2312?B?0OzW2b33?=) Date: Fri, 7 Dec 2012 14:38:45 +0800 Subject: [docs] threading.Timer Message-ID: <000001cdd445$81ad1b90$850752b0$@com> Hi Ladies/Gentleman, I am new in python. Here is a question, could I ask? When I use threading.Timer(interval, function), I got some issue, not clear. 1, the real time between the two times invoke is: interval + time of once function running. That means if my function running is not a fix time, then I get a unfixed interval? 2. the real time will be influenced by the external operation, just like mouse working, windows interaction, program running etc. Is there a good way to get a accurate timer by python, just like tasks in OS? I am looking forward for your reply. Thank you. Best regards, XU Zhongjin Electronic & Software Engineer Electronic & Control Department DERI CHERY No.8 Changchun Rd E&T Development Zone Wuhu Anhui China 241006 +86+553+5925245 +86+13355530465 -------------- next part -------------- An HTML attachment was scrubbed... URL: From xlii at xlii.org Fri Dec 7 08:29:18 2012 From: xlii at xlii.org (Quarante-Deux) Date: Fri, 7 Dec 2012 08:29:18 +0100 Subject: [docs] xml.etree.ElementTree.tostring Message-ID: <6AB90B4F-B7A6-4F9D-BDE0-C576EB9F28D4@xlii.org> Hello, For http://docs.python.org/2/library/xml.etree.elementtree.html#xml.etree.ElementTree.tostring could you please add that if the tag of the element is set to None, said tag is omitted in the resulting bytes: Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 01:25:11) from xml.etree.ElementTree import fromstring, tostring e = fromstring('example accentu?') tostring(e) --> b'example accentué' e.tag = None tostring(e) --> b'example accentué' Very handy in a templating context. Also, tostring returns bytes and should be named tobytes, actually :-) If what you really want is a string you should use : tostring(e, encoding='unicode') --> 'example accentu?' Hum? Thank you. Quarante-Deux: quelques pages sur la SF Ellen C. Herzfeld - Dominique O. Martel http://www.quarante-deux.org/ - @xlii42 http://www.quarante-deux.org/index.atom From Andrew.Roe at rbs.com Tue Dec 11 12:32:27 2012 From: Andrew.Roe at rbs.com (Andrew.Roe at rbs.com) Date: Tue, 11 Dec 2012 11:32:27 +0000 Subject: [docs] FOO and BAR Message-ID: <2909FBF83F969348A18C741AC256468307299079E1@LONMC01034.rbsres07.net> Do you think it would be possible to write your documentation avoiding the silly usage of FOO and BAR everywhere? This is a very very old and boring joke, and does nothing to clarify what you are trying to clarify. If you could include real-world examples in your documentation, rather than "clever" programmer "jokes", learners such as myself would have far more respect for the good work you are obviously doing here. For example, the section on argparser is full of this sort of rubbish: argparse.ArgumentParser(description='A foo that bars') Under what circumstances would you ever put that in a program? Are you mad? Please take this into consideration. Andrew Roe RAD Developer Markets & International Banking RBS 250 Bishopsgate, London, EC2M 4AA, GB Office: +44 20 7678 0425 *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 350, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland N.V. including its affiliates ("RBS group") does not accept responsibility for changes made to this message after it was sent. For the protection of RBS group and its clients and customers, and in compliance with regulatory requirements, the contents of both incoming and outgoing e-mail communications, which could include proprietary information and Non-Public Personal Information, may be read by authorised persons within RBS group other than the intended recipient(s). Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by the RBS group in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *********************************************************************************** -------------- next part -------------- An HTML attachment was scrubbed... URL: From cocoatomo77 at gmail.com Tue Dec 11 17:29:34 2012 From: cocoatomo77 at gmail.com (tomo cocoa) Date: Wed, 12 Dec 2012 01:29:34 +0900 Subject: [docs] typo in library reference Message-ID: Hello all, I am a japanese translator of Python documents. I found a typo in library reference of tzinfo. http://docs.python.org/3/library/datetime.html#tzinfo-objects In the first paragraph, "reprsent" may be a typo of "represent". Regards cocoatomo -- class Cocoatomo: name = 'cocoatomo' email_address = 'cocoatomo77 at gmail.com' twitter_id = '@cocoatomo' -------------- next part -------------- An HTML attachment was scrubbed... URL: From michellebarton39 at gmail.com Wed Dec 12 20:03:01 2012 From: michellebarton39 at gmail.com (Michelle Barton) Date: Wed, 12 Dec 2012 11:03:01 -0800 Subject: [docs] Checking in on a Broken Link on Your Site About Geany and GTK Message-ID: Hi Administrator, I've reported a broken link on your site pythonexperts.com/_sources/using/unix.txt that links to http://geany.uvena.de/ and haven't heard back, so I just wanted to verify whether you're the right person to contact? If not, could you direct me to the person maintaining the website? If you would be interested in updating your website, I have a similar resource that you are more than welcome to use to update. Let me know! Link Replacement Option: http://www.onlinecomputersciencedegree.com/resources/geany-and-gtk/ Best, Michelle Barton From mybiz at toeai.com Sat Dec 15 02:32:58 2012 From: mybiz at toeai.com (mybiz at toeai.com) Date: Fri, 14 Dec 2012 18:32:58 -0700 Subject: [docs] single quotes encoding problem with pdf versions Message-ID: Hi, I noticed while reading through the PDF version of the Tutorial (tutorial.pdf) that there is something which could be confusing because it doesn't come through from the source encoded properly. The problem doesn't affect the text and HTML versions, but it does affect both the A4 and Letter formatted PDF versions. There are likely other places where this error occurs, but if you fix whatever is making your source produce the wrong characters, it should fix them too. On page 12 when talking about strings, you find the sentence: Or, strings can be surrounded in a pair of matching triple-quotes: """ or ??. What it should read is of course: Or, strings can be surrounded in a pair of matching triple-quotes: """ or '''. In the PDF versions, the three single quotes (aka apostrophes U+0027 (39)) are swapped out with a double right quote (U+201D) followed by a single right quote (U+2019). I hope this explanation is quite clear and that you'll have an easy time fixing the problem. Feel free to contact me with any follow-up. Thanks. From peter.dyson at geekpete.com Sun Dec 16 05:04:13 2012 From: peter.dyson at geekpete.com (Peter Dyson) Date: Sun, 16 Dec 2012 14:04:13 +1000 Subject: [docs] ebook formats would be nice for the python documentation Message-ID: <50CD483D.6040209@geekpete.com> If there was an easy way to convert the html into standard ebook formats, that'd be a nice addition to the available documentation. Formats such as: -epub -mobi (kindle readers) -others? Cheers. -- Regards, Peter Dyson peter.dyson at geekpete.com From chris.jerdonek at gmail.com Mon Dec 17 11:45:46 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Mon, 17 Dec 2012 02:45:46 -0800 Subject: [docs] FOO and BAR Message-ID: > Date: Tue, 11 Dec 2012 11:32:27 +0000 > From: > Do you think it would be possible to write your documentation avoiding the silly usage of FOO and BAR everywhere? Sure, it's possible. However, we're volunteers, and it may take a fair bit of time: there is a lot of documentation along with many competing things to do, and it's not necessarily trivial to come up with real-world examples that are also simple, effective, neutral, and illustrative. I think as a group we're aware of this issue. For example, the following issue is in the tracker (which includes your example): http://bugs.python.org/issue11176 > This is a very very old and boring joke, and does nothing to clarify what you are trying to clarify. If you could include real-world examples in your documentation, rather than "clever" programmer "jokes", learners such as myself would have far more respect for the good work you are obviously doing here. I wouldn't say that it's a joke or an attempt to be funny or silly. Names like "foo" and "bar" are simply widely-used neutral placeholder names, in the same way that "lorem ipsum..." is used as sample text in many illustrations or that "John Doe" is used as a sample name. Read here, for example, for more information: http://en.wikipedia.org/wiki/Foobar It's just a convenience for the writer (albeit at the expense of being "real-world"). > For example, the section on argparser is full of this sort of rubbish: > argparse.ArgumentParser(description='A foo that bars') > > Under what circumstances would you ever put that in a program? Are you mad? No, we're certainly not. Also note that it helps to be kind when writing to people -- especially to volunteers. --Chris > Please take this into consideration. > > Andrew Roe > RAD Developer > Markets & International Banking > RBS > 250 Bishopsgate, London, EC2M 4AA, GB > Office: +44 20 7678 0425 > > > *********************************************************************************** > The Royal Bank of Scotland plc. Registered in Scotland No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. The > Royal Bank of Scotland N.V. is authorised and regulated by the > De Nederlandsche Bank and has its seat at Amsterdam, the > Netherlands, and is registered in the Commercial Register under > number 33002587. Registered Office: Gustav Mahlerlaan 350, > Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and > The Royal Bank of Scotland plc are authorised to act as agent for each > other in certain jurisdictions. > > This e-mail message is confidential and for use by the addressee only. > If the message is received by anyone other than the addressee, please > return the message to the sender by replying to it and then delete the > message from your computer. Internet e-mails are not necessarily > secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland > N.V. including its affiliates ("RBS group") does not accept responsibility > for changes made to this message after it was sent. For the protection > of RBS group and its clients and customers, and in compliance with > regulatory requirements, the contents of both incoming and outgoing > e-mail communications, which could include proprietary information and > Non-Public Personal Information, may be read by authorised persons > within RBS group other than the intended recipient(s). > > Whilst all reasonable care has been taken to avoid the transmission of > viruses, it is the responsibility of the recipient to ensure that the onward > transmission, opening or use of this message and any attachments will > not adversely affect its systems or data. No responsibility is accepted > by the RBS group in this regard and the recipient should carry out such > virus and other checks as it considers appropriate. > > Visit our website at www.rbs.com > > *********************************************************************************** > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ From report at bugs.python.org Mon Dec 17 11:49:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 17 Dec 2012 10:49:18 +0000 Subject: [docs] [issue11176] give more meaningful argument names in argparse documentation In-Reply-To: <1297352937.46.0.470038569364.issue11176@psf.upfronthosting.co.za> Message-ID: <1355741358.27.0.0235217231344.issue11176@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Also see this e-mail to docs@: http://mail.python.org/pipermail/docs/2012-December/012028.html > Subject: [docs] FOO and BAR > > Do you think it would be possible to write your documentation avoiding the silly usage of FOO and BAR everywhere? This is a very very old and boring joke, and does nothing to clarify what you are trying to clarify. If you could include real-world examples in your documentation, rather than "clever" programmer "jokes", learners such as myself would have far more respect for the good work you are obviously doing here. > > For example, the section on argparser is full of this sort of rubbish: > argparse.ArgumentParser(description='A foo that bars') > > Under what circumstances would you ever put that in a program? Are you mad? > > Please take this into consideration. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From andrew.svetlov at gmail.com Mon Dec 17 12:44:00 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Mon, 17 Dec 2012 13:44:00 +0200 Subject: [docs] typo in library reference In-Reply-To: References: Message-ID: Fixed. Thanks! On Tue, Dec 11, 2012 at 6:29 PM, tomo cocoa wrote: > reprsent -- Thanks, Andrew Svetlov From andrew.svetlov at gmail.com Mon Dec 17 13:02:19 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Mon, 17 Dec 2012 14:02:19 +0200 Subject: [docs] Minor bug in the documentation of collections.Counter.subtract In-Reply-To: References: Message-ID: Fixed. Thanks, Lev! On Wed, Dec 5, 2012 at 7:38 PM, Lev Levitsky wrote: > Hello everyone, > > I'd like to report a minor inaccuracy in the documentation of > collections.Counter.subtract that I found here: > http://docs.python.org/2/library/collections.html#collections.Counter.subtract > (and its Python3 analog): > > The code sample provided there suggests that c.subtract(d) returns a new > object: > > >>>> c = Counter(a=4, b=2, c=0, d=-2) >>>> d = Counter(a=1, b=2, c=3, d=4) >>>> c.subtract(d) > Counter({'a': 3, 'b': 0, 'c': -3, 'd': -6}) > > In reality, it modifies `c` in place similar to dict.update, and nothing is > returned. A possible fix would be: > >>>> c = Counter(a=4, b=2, c=0, d=-2) >>>> d = Counter(a=1, b=2, c=3, d=4) >>>> c.subtract(d) >>>> c > Counter({'a': 3, 'b': 0, 'c': -3, 'd': -6}) > > Best regards, > > Lev > > -- > Lev Levitsky > Institute for Energy Problems of Chemical Physics RAS > Laboratory of Physical and Chemical Methods for Structure Analysis > Leninsky pr. 38, bld. 2 119334 Moscow Russia > tel: +7 499 1378257 fax: +7 499 1378257, +7 499 1378258 > > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- Thanks, Andrew Svetlov From andrew.svetlov at gmail.com Mon Dec 17 13:10:36 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Mon, 17 Dec 2012 14:10:36 +0200 Subject: [docs] http://docs.python.org/2/library/string.html#format-string-syntax In-Reply-To: <20121203214007.2575b904@lenovo> References: <20121203214007.2575b904@lenovo> Message-ID: Python examples should reflect new use cases and best practices. They are should not be backward-compatible. Omitting of positional argument numbers is directly mentioned at this page: Changed in version 2.7: The positional argument specifiers can be omitted, so '{} {}' is equivalent to '{0} {1}'. On Mon, Dec 3, 2012 at 10:40 PM, Martin Herweg wrote: > > http://docs.python.org/2/library/string.html#format-string-syntax > > I suggest to change the examples so that they also work in Python 2.6 > or add a comment to each line that it requires Python 2.7 > > It did bite me on android: PythonAPK is 2.7 but Py4A is still 2.6 > > > > Aligning the text and specifying a width: > >>>> '{:<30}'.format('left aligned') > 'left aligned ' >>>> '{:>30}'.format('right aligned') > ' right aligned' >>>> '{:^30}'.format('centered') > ' centered ' >>>> '{:*^30}'.format('centered') # use '*' as a fill char > '***********centered***********' > > > > > thank you! > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs -- Thanks, Andrew Svetlov From report at bugs.python.org Mon Dec 17 17:44:29 2012 From: report at bugs.python.org (Claude Paroz) Date: Mon, 17 Dec 2012 16:44:29 +0000 Subject: [docs] [issue16679] Wrong URL path decoding In-Reply-To: <1355473710.36.0.278942451351.issue16679@psf.upfronthosting.co.za> Message-ID: <1355762669.31.0.647751212254.issue16679@psf.upfronthosting.co.za> Claude Paroz added the comment: Thanks for the explanations (and history). I realize that changing the behaviour is probably not an option. As an example in a framework, we are currently discussing how we will cope with this in Django: https://code.djangoproject.com/ticket/19468 On the Python side, it might be worth adding an admonition about PATH_INFO and non-ascii URLs on the wsgiref docs. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 11:17:19 2012 From: report at bugs.python.org (INADA Naoki) Date: Tue, 18 Dec 2012 10:17:19 +0000 Subject: [docs] [issue16711] s/next()/__next__/ in collections.abc.Iterator document. Message-ID: <1355825815.83.0.808882740221.issue16711@psf.upfronthosting.co.za> New submission from INADA Naoki: http://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator > ABC for classes that provide the __iter__() and next() methods. "next()" should be "__next__()" for Python 3. ---------- assignee: docs at python components: Documentation messages: 177681 nosy: docs at python, naoki priority: normal severity: normal status: open title: s/next()/__next__/ in collections.abc.Iterator document. versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 14:53:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Dec 2012 13:53:52 +0000 Subject: [docs] [issue16711] s/next()/__next__/ in collections.abc.Iterator document. In-Reply-To: <1355825815.83.0.808882740221.issue16711@psf.upfronthosting.co.za> Message-ID: <3YQggd4bWvzQPB@mail.python.org> Roundup Robot added the comment: New changeset 259516fddb6c by Andrew Svetlov in branch '3.2': Issue #16711: Fix required method names for collections.Iterator http://hg.python.org/cpython/rev/259516fddb6c New changeset 864bb05be215 by Andrew Svetlov in branch '3.3': Issue #16711: Fix required method names for collections.Iterator http://hg.python.org/cpython/rev/864bb05be215 New changeset 85127ec7d724 by Andrew Svetlov in branch 'default': Issue #16711: Fix required method names for collections.Iterator http://hg.python.org/cpython/rev/85127ec7d724 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 14:54:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 13:54:26 +0000 Subject: [docs] [issue16711] s/next()/__next__/ in collections.abc.Iterator document. In-Reply-To: <1355825815.83.0.808882740221.issue16711@psf.upfronthosting.co.za> Message-ID: <1355838866.4.0.533424589631.issue16711@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:16:20 2012 From: report at bugs.python.org (Jan Lachnitt) Date: Tue, 18 Dec 2012 16:16:20 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1355847379.74.0.595505492306.issue15533@psf.upfronthosting.co.za> Jan Lachnitt added the comment: Hi, I am using Python 3.2.3 on Windows XP. I encountered a problem with subprocess.call when using the cwd parameter. I used Google to look for a solution and I found this issue in Python tracker. But this issue seems absolutely reversed! The subprocess documentation says this: "In particular, the function looks for executable (or for the first item in args) relative to cwd if the executable path is a relative path." But this is NOT true. If I use the path relative to cwd, I get Windows Error 2 (system cannot find the file). If I change the executable's path to be relative to the current directory, where the script is running (i.e. NOT the cwd parameter passed to subprocess.call), it works fine. ---------- nosy: +pepalogik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:40:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 18 Dec 2012 16:40:27 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1355848731.83.0.855811873805.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Hi Jan, yes, the documentation now describes the non-Windows behavior, which is different from the Windows behavior. See the comment just before yours on what still needs to be done to resolve this issue. I was in the middle of creating a bunch of test cases for the various combinations, as well as documenting the results. But I got busy with other things. I will see if I can revisit my work on this sometime soon and upload a diff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:42:33 2012 From: report at bugs.python.org (Jan Lachnitt) Date: Tue, 18 Dec 2012 16:42:33 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1355848921.71.0.414354262008.issue15533@psf.upfronthosting.co.za> Jan Lachnitt added the comment: EDIT: No, it doesn't work fine: the executable reports stack overflow. I thought this had nothing to do with Python, hence I didn't mention it. But If I run the executable without Python, THEN it works fine. But this may be another issue. I'll update to 3.3.0 and then tell you if this has changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:53:17 2012 From: report at bugs.python.org (Jan Lachnitt) Date: Tue, 18 Dec 2012 16:53:17 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1355849596.08.0.0133662038336.issue15533@psf.upfronthosting.co.za> Jan Lachnitt added the comment: Hi Chris, thank for your reply, I didn't see it while writing the edit. Does it mean that on Linux, it will use the cwd? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:11:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 18:11:29 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw Message-ID: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch fixes wording of documentation, comments, etc which use the term 'throw' instead of 'raise' in context of exception raising. ---------- assignee: docs at python components: Documentation files: raise-3.3.patch keywords: patch messages: 177698 nosy: asvetlov, docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Raise exceptions, don't throw type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28347/raise-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:12:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 18:12:15 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355854334.54.0.119602666589.issue16714@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28348/raise-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:13:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 18:13:13 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355854393.2.0.558623971054.issue16714@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28349/raise-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:17:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 18 Dec 2012 18:17:21 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355854641.59.0.965048139344.issue16714@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:41:26 2012 From: report at bugs.python.org (Georg Brandl) Date: Tue, 18 Dec 2012 18:41:26 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355856086.03.0.903512642.issue16714@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM, except for: diff -r 907d71668d3c Python/pythonrun.c --- a/Python/pythonrun.c Sun Dec 16 21:10:35 2012 +0100 +++ b/Python/pythonrun.c Tue Dec 18 19:35:27 2012 +0200 @@ -2518,7 +2518,7 @@ PyOS_CheckStack(void) { __try { - /* alloca throws a stack overflow exception if there's + /* alloca raises a stack overflow exception if there's not enough space left on the stack */ alloca(PYOS_STACK_MARGIN * sizeof(void*)); return 0; This is talking about a C++ exception and therefore "throw" is correct. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 20:27:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Dec 2012 19:27:57 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <3YQq582ZRDzNjw@mail.python.org> Roundup Robot added the comment: New changeset fdf907708f49 by Andrew Svetlov in branch '3.2': Issue #16714: use 'raise' exceptions, don't 'throw'. http://hg.python.org/cpython/rev/fdf907708f49 New changeset 15a391919deb by Andrew Svetlov in branch '3.3': Issue #16714: use 'raise' exceptions, don't 'throw'. http://hg.python.org/cpython/rev/15a391919deb New changeset 7260cf668dd7 by Andrew Svetlov in branch 'default': Issue #16714: use 'raise' exceptions, don't 'throw'. http://hg.python.org/cpython/rev/7260cf668dd7 New changeset 8c2635afbfe1 by Andrew Svetlov in branch '2.7': Issue #16714: use 'raise' exceptions, don't 'throw'. http://hg.python.org/cpython/rev/8c2635afbfe1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 20:28:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 19:28:42 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355858922.8.0.742529551033.issue16714@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Serhiy. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 10:36:38 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 19 Dec 2012 09:36:38 +0000 Subject: [docs] [issue16724] Rename `data` argument names to `bytes` Message-ID: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> New submission from anatoly techtonik: http://docs.python.org/3/library/binascii - binascii.hexlify(data) + binascii.hexlify(bytes) tag:easy ---------- assignee: docs at python components: Documentation messages: 177727 nosy: docs at python, techtonik priority: normal severity: normal status: open title: Rename `data` argument names to `bytes` versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 10:41:21 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 09:41:21 +0000 Subject: [docs] [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355910081.04.0.508115059351.issue16724@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Why? The binascii module consistently uses "data" to refer to binary data. For example: "Return the hexadecimal representation of the binary data. Every byte of data is converted ..." ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 16:28:49 2012 From: report at bugs.python.org (Jan Lachnitt) Date: Wed, 19 Dec 2012 15:28:49 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1355930927.89.0.939273235877.issue15533@psf.upfronthosting.co.za> Jan Lachnitt added the comment: Hi all, I have solved the problem by using absolute path of the executable. The reason why the executable didn't work properly may be that the executable's relative path was inconsistent with current directory. See the following example (I have made an executable which shows its argv and cwd). If it is called normally, then: argv[0] = phsh0.exe cwd = D:\Jenda\AutoLEED\TESTING\default But if it is called by Python's subprocess.call from "D:\Jenda\AutoLEED\TESTING" as I want, then: argv[0] = default\phsh0.exe cwd = D:\Jenda\AutoLEED\TESTING\default The executable may be confused by this inconsistency. So it is not the documentation, but Python itself what should be changed. The executable should be searched in cwd on any platform to avoid the inconsistency. I have not yet updated my Python installation, so my results apply to 3.2.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 16:51:41 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 19 Dec 2012 15:51:41 +0000 Subject: [docs] [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355932301.18.0.48188686616.issue16724@psf.upfronthosting.co.za> anatoly techtonik added the comment: In Python 2 there was no 'binary data' type - everything was a string. Now we have string, str, bytearray, array, list of ints. If hexlify is not accepting anything except bytes, it is better be explicit. When porting code from Python 2 the argument was passed as a string with escapes inside, so it took some time to figure out why it didn't work in Py3k (actually it took a lot of time, because the research path turned wrong way at this point). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:04:00 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 16:04:00 +0000 Subject: [docs] [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355933006.68.0.348076921618.issue16724@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > If hexlify is not accepting anything except bytes, it is better be explicit. But it is very explicit in the link you provided: both a note at the top, and the words "binary data" in the description of every function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:17:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 16:17:59 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw In-Reply-To: <1355858922.8.0.742529551033.issue16714@psf.upfronthosting.co.za> Message-ID: <1355934256.5826.5.camel@raxxla> Serhiy Storchaka added the comment: I found one error. In Lib/email/header.py for 2.7 'raise' should be reverted to 'throw'. Also I miss a past form. Second patch replaces 'threw' with 'raised'. ---------- Added file: http://bugs.python.org/file28360/throw_away.patch Added file: http://bugs.python.org/file28361/throw2raised.patch Added file: http://bugs.python.org/file28362/throw2raised-3.2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 8c2635afbfe1 Lib/email/header.py --- a/Lib/email/header.py Tue Dec 18 21:27:37 2012 +0200 +++ b/Lib/email/header.py Wed Dec 19 18:00:22 2012 +0200 @@ -103,7 +103,7 @@ dec = email.base64mime.decode(encoded) except binascii.Error: # Turn this into a higher level exception. BAW: Right - # now we raise the lower level exception away but + # now we throw the lower level exception away but # when/if we get exception chaining, we'll preserve it. raise HeaderParseError if dec is None: -------------- next part -------------- diff -r bb94f6222fef Lib/pkgutil.py --- a/Lib/pkgutil.py Wed Dec 19 14:33:35 2012 +0200 +++ b/Lib/pkgutil.py Wed Dec 19 18:11:03 2012 +0200 @@ -503,7 +503,7 @@ except (ImportError, AttributeError, TypeError, ValueError) as ex: # This hack fixes an impedance mismatch between pkgutil and # importlib, where the latter raises other errors for cases where - # pkgutil previously threw ImportError + # pkgutil previously raised ImportError msg = "Error while finding loader for {!r} ({}: {})" raise ImportError(msg.format(fullname, type(ex), ex)) from ex diff -r bb94f6222fef Lib/test/test_urllib2.py --- a/Lib/test/test_urllib2.py Wed Dec 19 14:33:35 2012 +0200 +++ b/Lib/test/test_urllib2.py Wed Dec 19 18:11:03 2012 +0200 @@ -1302,7 +1302,7 @@ ) def test_basic_and_digest_auth_handlers(self): - # HTTPDigestAuthHandler threw an exception if it couldn't handle a 40* + # HTTPDigestAuthHandler raised an exception if it couldn't handle a 40* # response (http://python.org/sf/1479302), where it should instead # return None to allow another handler (especially # HTTPBasicAuthHandler) to handle the response. diff -r bb94f6222fef Lib/test/test_winreg.py --- a/Lib/test/test_winreg.py Wed Dec 19 14:33:35 2012 +0200 +++ b/Lib/test/test_winreg.py Wed Dec 19 18:11:03 2012 +0200 @@ -277,7 +277,7 @@ def test_long_key(self): # Issue2810, in 2.6 and 3.1 when the key name was exactly 256 - # characters, EnumKey threw "WindowsError: More data is + # characters, EnumKey raised "WindowsError: More data is # available" name = 'x'*256 try: -------------- next part -------------- diff -r cf62fbf2171a Lib/test/test_urllib2.py --- a/Lib/test/test_urllib2.py Fri Nov 02 07:34:37 2012 +0100 +++ b/Lib/test/test_urllib2.py Wed Dec 19 18:15:49 2012 +0200 @@ -1252,7 +1252,7 @@ ) def test_basic_and_digest_auth_handlers(self): - # HTTPDigestAuthHandler threw an exception if it couldn't handle a 40* + # HTTPDigestAuthHandler raised an exception if it couldn't handle a 40* # response (http://python.org/sf/1479302), where it should instead # return None to allow another handler (especially # HTTPBasicAuthHandler) to handle the response. diff -r cf62fbf2171a Lib/test/test_winreg.py --- a/Lib/test/test_winreg.py Fri Nov 02 07:34:37 2012 +0100 +++ b/Lib/test/test_winreg.py Wed Dec 19 18:15:49 2012 +0200 @@ -277,7 +277,7 @@ def test_long_key(self): # Issue2810, in 2.6 and 3.1 when the key name was exactly 256 - # characters, EnumKey threw "WindowsError: More data is + # characters, EnumKey raised "WindowsError: More data is # available" name = 'x'*256 try: From report at bugs.python.org Wed Dec 19 17:21:24 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 19 Dec 2012 16:21:24 +0000 Subject: [docs] [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355934084.84.0.00821761402121.issue16724@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I agree: the docs is good and don't needed to be modified. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:32:51 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 19 Dec 2012 16:32:51 +0000 Subject: [docs] [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355934771.53.0.916230762434.issue16724@psf.upfronthosting.co.za> anatoly techtonik added the comment: Fact no.1: When people use docs as a reference, they don't read top notes. Face no.2: This is not explicit: binascii.hexlify(data) This is: binascii.hexlify(bytes) I understand that you like the wording in description, but can't understand why don't want to fix this stuff above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:38:49 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 16:38:49 +0000 Subject: [docs] [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355935129.52.0.842583692866.issue16724@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > When people use docs as a reference, they don't read top notes. Maybe, but they can read some words beyond the function name, can't they? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:52:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 16:52:05 +0000 Subject: [docs] [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355935925.26.0.622495427888.issue16724@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > If hexlify is not accepting anything except bytes, it is better be explicit. However hexlify is accepting something except bytes. It is accepting any object which supports buffer protocol. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:52:45 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Dec 2012 16:52:45 +0000 Subject: [docs] [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355935964.83.0.763869854735.issue16724@psf.upfronthosting.co.za> R. David Murray added the comment: We do not use data type names as formal parameter names. You will realize this is sensible if you consider that in most cases in Python the formal parameter name is something gets used in more than just the documentation, and that using a type name would shadow the type name, which is something we prefer to avoid. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 18:10:59 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 19 Dec 2012 17:10:59 +0000 Subject: [docs] [issue16724] Define `binary data` representation in Python In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355937021.74.0.00983163862873.issue16724@psf.upfronthosting.co.za> anatoly techtonik added the comment: The fact that array.array, bytearray and memoryview are also accepted is a surprise for me. It will help if Python docs contained a definition of what can be considered 'binary data' and link this term from hexlify description to this definition. ---------- resolution: invalid -> status: closed -> open title: Rename `data` argument names to `bytes` -> Define `binary data` representation in Python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 18:27:42 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 17:27:42 +0000 Subject: [docs] [issue16724] Define `binary data` representation in Python In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355938039.77.0.626337335863.issue16724@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Isn't such a definition already present in the top-level paragraphs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 20:50:46 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Wed, 19 Dec 2012 19:50:46 +0000 Subject: [docs] [issue16731] xxlimited/xxmodule docstrings ambiguous Message-ID: <1355946646.69.0.259699636535.issue16731@psf.upfronthosting.co.za> New submission from Daniel Shahaf: Tweak the docstrings of xxmodule and xxlimited to clarify the difference between them (as derived from setup.py). While at it also add a defensive coding guard to xxlimited to ensure it remains Py_LIMITED_API-safe. ---------- assignee: docs at python components: Documentation, Extension Modules files: xxdocstrings.diff keywords: patch messages: 177774 nosy: danielsh, docs at python priority: normal severity: normal status: open title: xxlimited/xxmodule docstrings ambiguous versions: Python 3.4 Added file: http://bugs.python.org/file28367/xxdocstrings.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 21:47:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Dec 2012 20:47:15 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <3YRSpB338rzRky@mail.python.org> Roundup Robot added the comment: New changeset 0a5c5399f638 by Andrew Svetlov in branch '2.7': revert comment wording (#16714) http://hg.python.org/cpython/rev/0a5c5399f638 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 21:55:54 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Dec 2012 20:55:54 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <3YRT095TDvzRjv@mail.python.org> Roundup Robot added the comment: New changeset b227f8f7242d by Andrew Svetlov in branch '2.7': replace threw with raised (#16714) http://hg.python.org/cpython/rev/b227f8f7242d New changeset 74da2dbb5e50 by Andrew Svetlov in branch '3.2': replace threw with raised (#16714) http://hg.python.org/cpython/rev/74da2dbb5e50 New changeset 55d86476d048 by Andrew Svetlov in branch '3.3': replace threw with raised (#16714) http://hg.python.org/cpython/rev/55d86476d048 New changeset 3594175c6860 by Andrew Svetlov in branch 'default': replace threw with raised (#16714) http://hg.python.org/cpython/rev/3594175c6860 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 21:56:38 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 19 Dec 2012 20:56:38 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355950598.47.0.70912178299.issue16714@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Thanks again, Serhiy! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 22:19:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 21:19:56 +0000 Subject: [docs] [issue16724] Define `binary data` representation in Python In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355951996.49.0.827563428016.issue16724@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: -serhiy.storchaka versions: -Python 3.1, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 04:52:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 20 Dec 2012 03:52:45 +0000 Subject: [docs] [issue16724] Define `binary data` representation in Python In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355975564.71.0.00354183459845.issue16724@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > It will help if Python docs contained a definition of what can be considered 'binary data' and link this term from hexlify description to this definition. I believe this is part of the goal of issue 16518, where "bytes-like object" is being proposed as one of the terms for addition to the glossary. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:12:22 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 20 Dec 2012 05:12:22 +0000 Subject: [docs] [issue16724] Define `binary data` representation in Python In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355980342.87.0.71456981668.issue16724@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Amaury and Andrew. The docs are fine as-is. ---------- nosy: +rhettinger resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 08:39:34 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 20 Dec 2012 07:39:34 +0000 Subject: [docs] [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1355989174.21.0.702469696025.issue16518@psf.upfronthosting.co.za> Chris Jerdonek added the comment: After this issue is resolved, the binascii docs can be updated as suggested in issue 16724. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:29:12 2012 From: report at bugs.python.org (Ashish Nitin Patil) Date: Thu, 20 Dec 2012 15:29:12 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1356017352.33.0.670628749451.issue14901@psf.upfronthosting.co.za> Ashish Nitin Patil added the comment: Always happy to contribute! My first! Looking forward to getting accustomed to it & doing my part for python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 20:48:21 2012 From: report at bugs.python.org (Jeff Knupp) Date: Thu, 20 Dec 2012 19:48:21 +0000 Subject: [docs] [issue16687] Fix small gramatical error and add reference link in hashlib documentation In-Reply-To: <1355518554.59.0.0791078366076.issue16687@psf.upfronthosting.co.za> Message-ID: <1356032901.85.0.757723935774.issue16687@psf.upfronthosting.co.za> Jeff Knupp added the comment: Previous patch had unintentional local changes. Uploaded correct patch. ---------- Added file: http://bugs.python.org/file28382/new_patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 20:48:45 2012 From: report at bugs.python.org (Jeff Knupp) Date: Thu, 20 Dec 2012 19:48:45 +0000 Subject: [docs] [issue16687] Fix small gramatical error and add reference link in hashlib documentation In-Reply-To: <1355518554.59.0.0791078366076.issue16687@psf.upfronthosting.co.za> Message-ID: <1356032925.79.0.600478171753.issue16687@psf.upfronthosting.co.za> Changes by Jeff Knupp : Removed file: http://bugs.python.org/file28318/patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 03:20:16 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 21 Dec 2012 02:20:16 +0000 Subject: [docs] [issue16687] Fix small gramatical error and add reference link in hashlib documentation In-Reply-To: <1355518554.59.0.0791078366076.issue16687@psf.upfronthosting.co.za> Message-ID: <1356056416.96.0.316542301068.issue16687@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- versions: +Python 3.3, Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 03:25:18 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Dec 2012 02:25:18 +0000 Subject: [docs] [issue16687] Fix small gramatical error and add reference link in hashlib documentation In-Reply-To: <1355518554.59.0.0791078366076.issue16687@psf.upfronthosting.co.za> Message-ID: <3YSDFm5hmbzQsY@mail.python.org> Roundup Robot added the comment: New changeset abfd3bc38b5d by Benjamin Peterson in branch '3.3': fix typo (#16687) http://hg.python.org/cpython/rev/abfd3bc38b5d New changeset 95cb2f09ac50 by Benjamin Peterson in branch 'default': merge 3.3 (closes #16687) http://hg.python.org/cpython/rev/95cb2f09ac50 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 09:27:27 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 21 Dec 2012 08:27:27 +0000 Subject: [docs] [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356078447.89.0.237014851516.issue16728@psf.upfronthosting.co.za> Nick Coghlan added the comment: Many algorithms that require a sequence only need __len__ and __getitem__. The term "sequence" is used to distinguish such containers from mere iterables that only provide "__iter__" (and may be consumed by iteration). The glossary entry covers this use of the term. collections.abc.Sequence is a much richer interface, which defines many additional operations beyond those iteration, indexing and slicing. Types which implement that full API can be registered explicitly (or else an application can define it's own custom ABC for a subset of the Sequence API). However, the glossary entry should link to http://docs.python.org/3.3/library/stdtypes#sequence-types-list-tuple-range to expand on the second meaning of the term. PySequence_Check is an unreliable guide (albeit not quite as unreliable as PyMapping_Check) that checks a CPython implementation detail. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, ncoghlan stage: -> needs patch title: collections.abc.Sequence shoud provide __subclasshook__ -> Missing cross-reference in sequence glossary entry type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 09:29:00 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 21 Dec 2012 08:29:00 +0000 Subject: [docs] [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356078540.07.0.269596402655.issue16728@psf.upfronthosting.co.za> Nick Coghlan added the comment: As Amaury notes, implicit ducktyping is not feasible for sequences or mappings, as the method names overlap - you have to add explicit semantic information to say which kind of container you're implementing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 10:24:04 2012 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Dec 2012 09:24:04 +0000 Subject: [docs] [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356081844.01.0.948537096226.issue16728@psf.upfronthosting.co.za> INADA Naoki added the comment: Thanks, Nick. I see that the "sequence" doesn't have strict definition. Though, I think collections.abc module's document should describe this manner. For example: "But checking type with these abc may be too strict for most case. For example, some user defined sequence class may not cover :class:`Sequence` abc. Using :term:`EAFP` manner is preferred in Python." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 11:22:46 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 21 Dec 2012 10:22:46 +0000 Subject: [docs] [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356085366.76.0.292066406706.issue16728@psf.upfronthosting.co.za> Nick Coghlan added the comment: No, that runs counter to the purpose of ABCs. If you have a type that is "good enough" for your purposes, then you can just register it. ---------- _______________________________________ Python tracker _______________________________________ From berker.peksag at gmail.com Fri Dec 21 12:37:17 2012 From: berker.peksag at gmail.com (berker.peksag at gmail.com) Date: Fri, 21 Dec 2012 11:37:17 -0000 Subject: [docs] xxlimited/xxmodule docstrings ambiguous (issue 16731) Message-ID: <20121221113717.31454.26069@psf.upfronthosting.co.za> http://bugs.python.org/review/16731/diff/6854/Modules/xxlimited.c File Modules/xxlimited.c (right): http://bugs.python.org/review/16731/diff/6854/Modules/xxlimited.c#newcode15 Modules/xxlimited.c:15: This example uses the Py_LIMITED_API API. See xxlimited.c for a version I think there is a typo here: s/xxlimited.c/xxmodule.c/ (or maybe better named Modules/xxmodule.c) http://bugs.python.org/review/16731/ From report at bugs.python.org Fri Dec 21 14:55:42 2012 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Dec 2012 13:55:42 +0000 Subject: [docs] [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356098142.15.0.508267053823.issue16728@psf.upfronthosting.co.za> INADA Naoki added the comment: So, I feel the 2nd meaning of "sequence" should be collections.abc.(Mutable)Sequence. "sequence types in stdlib" have richer API then the ABC. (e.g. comparison, +, *, etc...) They are "APIs that sequence may have" but not "APIs makes the type sequence." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 14:57:56 2012 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Dec 2012 13:57:56 +0000 Subject: [docs] [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356098276.76.0.0971414708861.issue16728@psf.upfronthosting.co.za> INADA Naoki added the comment: And nice symmetry with mapping entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 17:03:07 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Fri, 21 Dec 2012 16:03:07 +0000 Subject: [docs] [issue16731] xxlimited/xxmodule docstrings ambiguous In-Reply-To: <1355946646.69.0.259699636535.issue16731@psf.upfronthosting.co.za> Message-ID: <1356105787.41.0.184576701601.issue16731@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Re the review, yes there is a typo in the comment: the comment in xxlimited.c should say "xxmodule.c" rather than "xxlimited.c". (Got a traceback from the review app) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:17:09 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 21 Dec 2012 17:17:09 +0000 Subject: [docs] [issue16731] xxlimited/xxmodule docstrings ambiguous In-Reply-To: <1355946646.69.0.259699636535.issue16731@psf.upfronthosting.co.za> Message-ID: <1356110229.33.0.812047766244.issue16731@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 23:59:13 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Dec 2012 22:59:13 +0000 Subject: [docs] [issue16682] Document that audioop works with bytes, not strings In-Reply-To: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> Message-ID: <1356130753.65.0.444039789456.issue16682@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Patch looks good to me, all three occurrences of 'string' are fixed. ---------- nosy: +terry.reedy stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:06:53 2012 From: report at bugs.python.org (Zachary Ware) Date: Sat, 22 Dec 2012 00:06:53 +0000 Subject: [docs] [issue16747] Remove 'file' type reference from 'iterable' glossary entry Message-ID: <1356134813.58.0.26000957124.issue16747@psf.upfronthosting.co.za> New submission from Zachary Ware: Here's a patch that changes the reference to :class:`file` in the iterable entry in Doc/glossary.rst to :term:`file objects `, along with minor grammatical fixes to make it fit, and reflowing of the text. ---------- assignee: docs at python components: Documentation files: iterable_glossary.diff keywords: patch messages: 177911 nosy: docs at python, zach.ware priority: normal severity: normal status: open title: Remove 'file' type reference from 'iterable' glossary entry versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28392/iterable_glossary.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 09:34:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 08:34:04 +0000 Subject: [docs] [issue16751] Using modern unittest asserts in the documentation Message-ID: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch update the documentation examples to use more modern unittest asserts. ---------- assignee: docs at python components: Documentation, Tests files: docs_unittest_assert.patch keywords: easy, patch messages: 177924 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Using modern unittest asserts in the documentation type: enhancement versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28394/docs_unittest_assert.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 12:38:00 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 22 Dec 2012 11:38:00 +0000 Subject: [docs] [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1356176280.52.0.963613630429.issue16581@psf.upfronthosting.co.za> Nick Coghlan added the comment: Committed, along with a few other changes, as http://hg.python.org/peps/rev/24d5623ab21e Subsequent commit addresses Ezio's comment by changing the phrase to "list for contacting the PEP editors". The attitude I mainly take to PEP 1 now is that if I notice cases where what it says and what we actually do really don't match, I update the PEP accordingly. If I get anything glaringly wrong, I trust people will yell at me on python-checkins about it :) ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 13:33:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Dec 2012 12:33:38 +0000 Subject: [docs] [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1356179618.12.0.470134486093.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks a lot, Nick. It looks like you also went ahead and took care of issue 16746. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 15:54:17 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 22 Dec 2012 14:54:17 +0000 Subject: [docs] [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356188057.65.0.668747892501.issue16751@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 22:05:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Dec 2012 21:05:18 +0000 Subject: [docs] [issue16747] Remove 'file' type reference from 'iterable' glossary entry In-Reply-To: <1356134813.58.0.26000957124.issue16747@psf.upfronthosting.co.za> Message-ID: <1356210318.18.0.837218307631.issue16747@psf.upfronthosting.co.za> Chris Jerdonek added the comment: If you are changing just a few minor things, can you resubmit the patch without reflowing? It will be easier to see what minor things have changed. (It is okay to have the occasional short line to avoid having long lines. Reflowing can be done as part of a separate commit if it is severe.) ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:37:24 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 23 Dec 2012 10:37:24 +0000 Subject: [docs] [issue11379] Remove "lightweight" from minidom description In-Reply-To: <1299093908.17.0.828802315354.issue11379@psf.upfronthosting.co.za> Message-ID: <1356259044.78.0.90984192961.issue11379@psf.upfronthosting.co.za> Stefan Behnel added the comment: Any news on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 12:56:43 2012 From: report at bugs.python.org (Anton Kasyanov) Date: Sun, 23 Dec 2012 11:56:43 +0000 Subject: [docs] [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <1356263803.62.0.573122786753.issue16443@psf.upfronthosting.co.za> Anton Kasyanov added the comment: Created a patch with docstrings for match objects. Also added empty lines in pattern object docstrings according to http://www.python.org/dev/peps/pep-0007/#id7 ---------- keywords: +patch nosy: +a.kasyanov, asvetlov versions: -Python 2.7 Added file: http://bugs.python.org/file28403/issue-16443.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 19:01:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Dec 2012 18:01:11 +0000 Subject: [docs] [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <3YTrwk31SvzRTL@mail.python.org> Roundup Robot added the comment: New changeset e4f1b3565509 by Andrew Svetlov in branch '3.2': Issue #16443: Add docstrings to regular expression match objects. http://hg.python.org/cpython/rev/e4f1b3565509 New changeset 64e050c2d010 by Andrew Svetlov in branch '3.3': Issue #16443: Add docstrings to regular expression match objects. http://hg.python.org/cpython/rev/64e050c2d010 New changeset e3d0417d8266 by Andrew Svetlov in branch 'default': Issue #16443: Add docstrings to regular expression match objects. http://hg.python.org/cpython/rev/e3d0417d8266 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 19:09:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Dec 2012 18:09:10 +0000 Subject: [docs] [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <3YTs5x3cz7zM2d@mail.python.org> Roundup Robot added the comment: New changeset c390dc999fcc by Andrew Svetlov in branch '2.7': Issue #16443: Add docstrings to regular expression match objects. http://hg.python.org/cpython/rev/c390dc999fcc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 19:14:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 23 Dec 2012 18:14:40 +0000 Subject: [docs] [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <1356286480.0.0.52790407616.issue16443@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Pushed. Thank you, Anton! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 06:04:17 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2012 05:04:17 +0000 Subject: [docs] [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356325457.08.0.201142613708.issue16751@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Please don't change the Basic Example section. It is designed to get people up and running with a minimal set of asserts (including assertEqual, assertTrue, and the two ways of using assertRaises). "Modernizing" the example will defeat its purpose. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:08:53 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 07:08:53 +0000 Subject: [docs] [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356332933.38.0.58467007403.issue16751@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #11468. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:22:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 07:22:56 +0000 Subject: [docs] [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356333776.01.0.775694190852.issue16751@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But with the patch the minimal set of asserts will be assertEqual, assertIn, and assertRaises. The example is just too old (assertIn was added in 3.1). If you want to minimize assert's set, you can get rid of assertEqual too (using only assertTrue). But I don't think it is a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:01:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 08:01:07 +0000 Subject: [docs] [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <1356336067.18.0.0396900328163.issue16443@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: `MatchObject` term is not defined anywhere in the documentation. It will be better to use `match object` instead. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:35:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 08:35:55 +0000 Subject: [docs] [issue16760] Get rid of MatchObject in regex HOWTO Message-ID: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: MatchObject is not defined anywhere and is not used except HOWTO (see issue6538). ---------- assignee: docs at python components: Documentation, Regular Expressions messages: 178036 nosy: asvetlov, docs at python, ezio.melotti, mrabarnett, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Get rid of MatchObject in regex HOWTO type: enhancement versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:38:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 08:38:54 +0000 Subject: [docs] [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <1356338334.09.0.479725849595.issue16760@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:39:48 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2012 08:39:48 +0000 Subject: [docs] [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356338388.24.0.0458600668157.issue16751@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, I'm going to reject this one. FWIW, I'm working on revising the example anyway (to not use the random module and instead test something more straight-forward). ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:47:56 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 08:47:56 +0000 Subject: [docs] [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356338875.94.0.820346964038.issue16751@psf.upfronthosting.co.za> Ezio Melotti added the comment: Raymond, the changes in the "mock" documentation look good to me, and I think they can be applied. Regarding the basic example in the "unittest" doc, I think the patch attached to #11468 (or something similar) should be applied instead. That patch uses straight-forward string methods and the basic assertEqual/True/False/Raises. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:00:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 09:00:09 +0000 Subject: [docs] [issue11468] Improve unittest basic example in the doc In-Reply-To: <1299867342.41.0.388080450116.issue11468@psf.upfronthosting.co.za> Message-ID: <1356339609.41.0.168123702031.issue11468@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think `self.assertRaises(TypeError, s.split, 2)` looks simpler. In any case two examples for assertRaises needed, simple inlined and more complicated use as context manager. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:02:52 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 09:02:52 +0000 Subject: [docs] [issue11468] Improve unittest basic example in the doc In-Reply-To: <1299867342.41.0.388080450116.issue11468@psf.upfronthosting.co.za> Message-ID: <1356339772.69.0.392621876128.issue11468@psf.upfronthosting.co.za> Ezio Melotti added the comment: Given that this is a basic example, it's not necessary to introduce both the forms of assertRaises. I personally find the context manager form more readable, and I prefer it to the regular one even if it takes two lines instead of one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 20:09:09 2012 From: report at bugs.python.org (rurpy) Date: Mon, 24 Dec 2012 19:09:09 +0000 Subject: [docs] [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1356376149.32.0.681533936893.issue16665@psf.upfronthosting.co.za> rurpy added the comment: I would like to submit the following post made to c.l.p in support of my claim that a cross-reference to the string formatting "x" format specifier would be desireable in the documentation for the hex() builtin: Newsgroups: comp.lang.python Subject: Re: Integer as raw hex string? Date: Mon, 24 Dec 2012 11:21:15 -0500 https://groups.google.com/group/comp.lang.python/msg/054706d112f6385d?hl=en (In case the link goes away... the post asks how to get the same results as hex() but without the leading "0x".) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 21:40:15 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Mon, 24 Dec 2012 20:40:15 +0000 Subject: [docs] [issue16774] Additional recipes for itertools docs Message-ID: <1356381615.1.0.91798699559.issue16774@psf.upfronthosting.co.za> New submission from Alexey Kachayev: Additional recipes for itertools documentation (widespread functions in other programming languages): * drop * split-at * split-by ---------- assignee: docs at python components: Documentation files: itertools.doc.diff keywords: patch messages: 178098 nosy: asvetlov, docs at python, kachayev priority: normal severity: normal status: open title: Additional recipes for itertools docs versions: Python 3.4 Added file: http://bugs.python.org/file28427/itertools.doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 21:41:36 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 20:41:36 +0000 Subject: [docs] [issue16774] Additional recipes for itertools docs In-Reply-To: <1356381615.1.0.91798699559.issue16774@psf.upfronthosting.co.za> Message-ID: <1356381696.11.0.855340837955.issue16774@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> rhettinger nosy: +ezio.melotti, rhettinger stage: -> patch review type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 12:15:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 11:15:54 +0000 Subject: [docs] [issue16776] Document PyCFunction_New and PyCFunction_NewEx functions Message-ID: <1356434154.16.0.0981038830976.issue16776@psf.upfronthosting.co.za> New submission from Andrew Svetlov: c-api docs has no documentation for those public API functions. ---------- assignee: docs at python components: Documentation keywords: easy messages: 178115 nosy: asvetlov, docs at python priority: normal severity: normal status: open title: Document PyCFunction_New and PyCFunction_NewEx functions type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 13:46:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 12:46:29 +0000 Subject: [docs] [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <3YVxrh2gYwzRlj@mail.python.org> Roundup Robot added the comment: New changeset 1e5e7064e872 by Ezio Melotti in branch '2.7': #16666: document default values for socket.getaddrinfo in the text to clarify that it doesn't accept keyword args. http://hg.python.org/cpython/rev/1e5e7064e872 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 13:47:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 12:47:59 +0000 Subject: [docs] [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1356439679.79.0.969347765854.issue16666@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:47:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 13:47:57 +0000 Subject: [docs] [issue16677] Hard to find operator precedence in Lang Ref. In-Reply-To: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> Message-ID: <3YVzCd076CzRm5@mail.python.org> Roundup Robot added the comment: New changeset a0f6c68ea12f by Ezio Melotti in branch '2.7': #16677: rename section header and fix markup. http://hg.python.org/cpython/rev/a0f6c68ea12f New changeset 2eab4f7b7280 by Ezio Melotti in branch '3.2': #16677: rename section header and fix markup. http://hg.python.org/cpython/rev/2eab4f7b7280 New changeset 356af3fc6471 by Ezio Melotti in branch '3.3': #16677: merge with 3.2. http://hg.python.org/cpython/rev/356af3fc6471 New changeset 9a65501a71e6 by Ezio Melotti in branch 'default': #16677: merge with 3.3. http://hg.python.org/cpython/rev/9a65501a71e6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:58:30 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 13:58:30 +0000 Subject: [docs] [issue16677] Hard to find operator precedence in Lang Ref. In-Reply-To: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> Message-ID: <1356443910.26.0.865144423055.issue16677@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think it's better to keep the two sections separate, so I just changed the title from "Summary" to "Operator precedence". While I was at it I also fixed the markup in a few places in the section and noticed a mistake in the "Evaluation order" (reported in #16777). Regarding the index entries I don't see anything wrong with the current ones, but I'm not sure how they are supposed to work and I generally find Google more reliable than the Sphinx search. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:16:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 16:16:56 +0000 Subject: [docs] [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <3YW2WW5ZVBzRkS@mail.python.org> Roundup Robot added the comment: New changeset b11f98872c0f by Ezio Melotti in branch '2.7': #16760: use ref:`match-objects` instead of :class:`MatchObject`. http://hg.python.org/cpython/rev/b11f98872c0f New changeset 7c4ef8faeb4a by Ezio Melotti in branch '3.2': #16760: use ref:`match-objects` instead of :class:`MatchObject`. http://hg.python.org/cpython/rev/7c4ef8faeb4a New changeset 4ba1e90e0119 by Ezio Melotti in branch '3.3': #16760: merge with 3.2. http://hg.python.org/cpython/rev/4ba1e90e0119 New changeset f2222684dd2d by Ezio Melotti in branch 'default': #16760: merge with 3.3. http://hg.python.org/cpython/rev/f2222684dd2d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:21:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 16:21:01 +0000 Subject: [docs] [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <1356452461.09.0.0447278896331.issue16760@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:44:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 16:44:51 +0000 Subject: [docs] [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <1356453891.9.0.69574312364.issue16760@psf.upfronthosting.co.za> Andrew Svetlov added the comment: We need to rename MatchObject to match object than (see #16443) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:49:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 16:49:35 +0000 Subject: [docs] [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <3YW3FC0YTBzRhg@mail.python.org> Roundup Robot added the comment: New changeset 3bee420d400f by Andrew Svetlov in branch '3.2': rename MathcObject to match object in doctrings for re module (#16760) http://hg.python.org/cpython/rev/3bee420d400f New changeset 73b24ee09e0a by Andrew Svetlov in branch '3.3': rename MathcObject to match object in doctrings for re module (#16760) http://hg.python.org/cpython/rev/73b24ee09e0a New changeset 8ebbab768e1b by Andrew Svetlov in branch 'default': rename MathcObject to match object in doctrings for re module (#16760) http://hg.python.org/cpython/rev/8ebbab768e1b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:50:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 16:50:14 +0000 Subject: [docs] [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <3YW3Fx3bnZzRhg@mail.python.org> Roundup Robot added the comment: New changeset 6ca8f965fd65 by Andrew Svetlov in branch '2.7': rename MathcObject to match object in doctrings for re module (#16760) http://hg.python.org/cpython/rev/6ca8f965fd65 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:53:28 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 16:53:28 +0000 Subject: [docs] [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <1356454408.06.0.683693091472.issue16443@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed in #16760 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:53:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 16:53:54 +0000 Subject: [docs] [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <1356454434.15.0.0840882147382.issue16760@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Done ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:54:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 16:54:22 +0000 Subject: [docs] [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <1356454462.44.0.843250618774.issue16760@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 22:23:31 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Tue, 25 Dec 2012 21:23:31 +0000 Subject: [docs] [issue16774] Additional recipes for itertools docs In-Reply-To: <1356381615.1.0.91798699559.issue16774@psf.upfronthosting.co.za> Message-ID: <1356470611.03.0.391169969501.issue16774@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Added: * takelast * droplast ---------- Added file: http://bugs.python.org/file28433/itertools.doc.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 23:10:59 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Dec 2012 22:10:59 +0000 Subject: [docs] [issue16677] Hard to find operator precedence in Lang Ref. In-Reply-To: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> Message-ID: <1356473459.76.0.133983642781.issue16677@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Changing 'datum' to 'value' is a nice touch that I overlooked. It is definitely friendlier to people whose native language is not latin-infested. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 00:00:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 23:00:52 +0000 Subject: [docs] [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <3YWCTc1K1WzRp0@mail.python.org> Roundup Robot added the comment: New changeset ecf3cd3af502 by Chris Jerdonek in branch '2.7': Add additional links and index entries for "argument" and "parameter". http://hg.python.org/cpython/rev/ecf3cd3af502 New changeset 31e1f0b7f42e by Chris Jerdonek in branch '3.2': Add additional links and index entries for "argument" and "parameter". http://hg.python.org/cpython/rev/31e1f0b7f42e New changeset 7a4a1fc6b3ee by Chris Jerdonek in branch '3.3': Merge from 3.2: add links and index entries for "argument" and "parameter." http://hg.python.org/cpython/rev/7a4a1fc6b3ee New changeset 10e4d28d0090 by Chris Jerdonek in branch 'default': Merge from 3.3: add links and index entries for "argument" and "parameter." http://hg.python.org/cpython/rev/10e4d28d0090 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 00:29:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 23:29:37 +0000 Subject: [docs] [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <3YWD6l3fhqzRlr@mail.python.org> Roundup Robot added the comment: New changeset e8793c5f0ebc by Chris Jerdonek in branch '3.2': Fix Sphinx warning (missing "setting-envvars" reference). http://hg.python.org/cpython/rev/e8793c5f0ebc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 03:49:02 2012 From: report at bugs.python.org (Thomas Ballinger) Date: Wed, 26 Dec 2012 02:49:02 +0000 Subject: [docs] [issue16782] No curses.initwin: Incorrect package docstring for curses Message-ID: <1356490142.44.0.537785717498.issue16782@psf.upfronthosting.co.za> New submission from Thomas Ballinger: Lib/curses/__init__.py has `curses.initwin()` in the docstring example code, but this function does not exist (should be `initscr()`) Bad in at least back to 2.4 ---------- assignee: docs at python components: Documentation files: docfix.patch keywords: patch messages: 178183 nosy: Thomas.Ballinger, docs at python priority: normal severity: normal status: open title: No curses.initwin: Incorrect package docstring for curses versions: Python 3.3 Added file: http://bugs.python.org/file28437/docfix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 12:35:12 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2012 11:35:12 +0000 Subject: [docs] [issue16785] Document the fact that constructing OSError with erron returns subclass if possible Message-ID: <1356521712.57.0.0819210166931.issue16785@psf.upfronthosting.co.za> New submission from Andrew Svetlov: I mean adding examples for constructions like this: >>> OSError(errno.ENOENT, 'error msg') FileNotFoundError(2, 'error msg') ---------- assignee: docs at python components: Documentation keywords: easy messages: 178204 nosy: asvetlov, docs at python priority: normal severity: normal status: open title: Document the fact that constructing OSError with erron returns subclass if possible versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 12:44:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 11:44:12 +0000 Subject: [docs] [issue16785] Document the fact that constructing OSError with erron returns subclass if possible In-Reply-To: <1356521712.57.0.0819210166931.issue16785@psf.upfronthosting.co.za> Message-ID: <1356522252.6.0.280769633169.issue16785@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: However >>> OSError(errno.ENOENT) OSError(2,) >>> OSError(errno.ENOENT, 'error msg', 'filename', 'spam') OSError(2, 'error msg', 'filename', 'spam') ---------- nosy: +serhiy.storchaka stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Wed Dec 26 14:47:17 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 26 Dec 2012 14:47:17 +0100 Subject: [docs] ebook formats would be nice for the python documentation In-Reply-To: <50CD483D.6040209@geekpete.com> References: <50CD483D.6040209@geekpete.com> Message-ID: Hello Peter, thanks for your email. On Sun, Dec 16, 2012 at 5:04 AM, Peter Dyson wrote: > If there was an easy way to convert the html into standard ebook > formats, that'd be a nice addition to the available documentation. > > Formats such as: > -epub The documentation is already available in EPUB format: http://docs.python.org/3/download.html > -mobi (kindle readers) In order to get this format available, the tool we use to create our documentation (sphinx) needs to be enhanced; there is already an issue to track this request https://bitbucket.org/birkenfeld/sphinx/issue/739/please-add-a-mobi-builder where you can provide comments (or even code :) ). Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Wed Dec 26 14:51:06 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 26 Dec 2012 14:51:06 +0100 Subject: [docs] threading.Timer In-Reply-To: <000001cdd445$81ad1b90$850752b0$@com> References: <000001cdd445$81ad1b90$850752b0$@com> Message-ID: Hello XU, thanks for your email. On Fri, Dec 7, 2012 at 7:38 AM, ??? wrote: > Hi Ladies/Gentleman, > > I am new in python. Here is a question, could I ask? [8<] > Is there a good way to get a accurate timer by python, just like tasks in > OS? this mailing list is about bugs/enhancements to CPython documentation, and your email doesn't fit this description. I'd suggest to contact a user support forum, such as http://mail.python.org/mailman/listinfo/python-list Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From benincasad at macomb.edu Wed Dec 19 22:29:28 2012 From: benincasad at macomb.edu (Benincasa, Dennis) Date: Wed, 19 Dec 2012 21:29:28 +0000 Subject: [docs] Python on Windows 8 Message-ID: <7A357067D884D748B006069198ED108B03C98EFB@S-EX2010-0001.mcc.local> I am trying to get Python 3.2 or 3.3 installed on Windows 8. The command line interface will work but not the GUI. You have any ideas how I can get it to work? Thanks Dennis Benincasa Macomb Community College -------------- next part -------------- An HTML attachment was scrubbed... URL: From garvey.nick at gmail.com Mon Dec 17 20:45:02 2012 From: garvey.nick at gmail.com (Nick Garvey) Date: Mon, 17 Dec 2012 14:45:02 -0500 Subject: [docs] Minor Typo on Copy Module Documentation Message-ID: http://docs.python.org/2/library/copy.html http://docs.python.org/3/library/copy.html The line "Because deep copy copies everything it may copy too much, e.g., administrative data structures that should be shared even between copies." should read "Because deep copy copies everything it may copy too much, e.g., administrative data structures that *shouldn't* be shared even between copies." Thanks, Nick Garvey -------------- next part -------------- An HTML attachment was scrubbed... URL: From jakejeckel358 at roadrunner.com Wed Dec 19 19:47:14 2012 From: jakejeckel358 at roadrunner.com (jakejeckel358 at roadrunner.com) Date: Wed, 19 Dec 2012 13:47:14 -0500 Subject: [docs] test_urlwithfrag failed on Python 3.3 Message-ID: <20121219184714.IJBFC.501.root@cdptpa-web11-z01> I'm trying to install python 3.3 on Ubuntu and in the terminal I used "make test" and one of the tests failed. I used ./python -m test -v test_urlwithfrag which gave me: == CPython 3.3.0 (default, Dec 19 2012, 11:13:20) [GCC 4.6.3] == Linux-3.2.0-35-generic-pae-i686-with-debian-wheezy-sid little-endian == /home/bud/Desktop/Python-3.3.0/build/test_python_32101 Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0, hash_randomization=1) [1/1] test_urlwithfrag test test_urlwithfrag crashed -- Traceback (most recent call last): File "/home/bud/Desktop/Python-3.3.0/Lib/test/regrtest.py", line 1213, in runtest_inner the_package = __import__(abstest, globals(), locals(), []) ImportError: No module named 'test.test_urlwithfrag' 1 test failed: test_urlwithfrag I'm not sure if this is needed but in the last few lines of "make test": ====================================================================== FAIL: test_urlwithfrag (test.test_urllib2net.OtherNetworkTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/bud/Desktop/Python-3.3.0/Lib/test/test_urllib2net.py", line 165, in test_urlwithfrag "http://docs.python.org/glossary.html#glossary") AssertionError: 'http://docs.python.org/2/glossary.html' != 'http://docs.python.org/glossary.html#glossary' - http://docs.python.org/2/glossary.html ? -- + http://docs.python.org/glossary.html#glossary ? +++++++++ Thank you. From ozgulfirat at gmail.com Mon Dec 17 14:58:57 2012 From: ozgulfirat at gmail.com (Firat Ozgul) Date: Mon, 17 Dec 2012 15:58:57 +0200 Subject: [docs] Turkish Translation for 'unicode.html' Message-ID: Hello, At http://ceviriler.istihza.com/unicode.html, I maintain the Turkish translation of 'unicode.html' (http://docs.python.org/3/howto/unicode.html). If possible, I would appreciate it if you could include the address of the translation somewhere on the original text, for easier access by Turkish Python learners. Regards, Firat Ozgul www.istihza.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rahulkay at hotmail.com Sun Dec 23 11:59:43 2012 From: rahulkay at hotmail.com (Rahul) Date: Sun, 23 Dec 2012 16:29:43 +0530 Subject: [docs] bug in range function in python 3.2-3.3 Message-ID: Hi, I am Rahul. This is my first letter to you. I have been tinkering with 'Python' from days of ver2.2. Though I am not any professional programmer yet I like this Language & like to play with it. Recently I downloaded the latest ver3.2 on my machine which runs on "Linux" while I was writing a program. I noticed that one of my function was misbehaving as I ran the program again & again, discovered that the built in function "range()" was not doing what it was supposed to do. Forcing me to revert back to "Python ver2.7x". I tried both of your versions 3.3 on 'windows' & 3.2 on 'Mint Linux'. I noticed the same bug. I don't know any intricacies of python but things worked just right after falling back to older version. As this is a basic function I thought worth of reporting it. What it normally does is generate a 'list' within the bound range of mentioned arguments. While older versions(2.7x) had no problem & worked fine but newer versions(3.2-3.3) did not. This is normal output of the function, >>> range(5) >>> [0, 1, 2, 3, 4] but later version does it like this, >>> range(5) >>> [1,5] What is that? Even better, >>> range(1,5,1) >>> range(1,5) # that is the actual output of interpreter. I tried this on two different machines & in different OSes (Windows/ windows7/ mint Linux). Showing same results. I also tried in 'IDLE' & 'command line' but to no avail. May be I don't know if there are any additional libraries have been added & I need to import them. I would be very obliged if you people can point out the mistake & guide me, or if it is really a bug I would like it to be gone. This a really an easy to learn, yet powerful OOP based language. I like to see it grow & remain that way. Thankfully, Rahul rahulkay at hotmail.com From report at bugs.python.org Tue Dec 18 20:02:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 19:02:47 +0000 Subject: [docs] [issue16714] Raise exceptions, don't throw In-Reply-To: <1355856086.03.0.903512642.issue16714@psf.upfronthosting.co.za> Message-ID: <201212182101.54155.storchaka@gmail.com> Serhiy Storchaka added the comment: Indeed. Here are updated patches. ---------- Added file: http://bugs.python.org/file28350/raise-2.7_2.patch Added file: http://bugs.python.org/file28351/raise-3.3_2.patch Added file: http://bugs.python.org/file28352/raise-3.2_2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r b0935ef48186 Doc/howto/cporting.rst --- a/Doc/howto/cporting.rst Sun Dec 16 13:55:47 2012 +0100 +++ b/Doc/howto/cporting.rst Tue Dec 18 20:06:01 2012 +0200 @@ -253,7 +253,7 @@ * :c:func:`PyCapsule_GetName` always returns NULL. - * :c:func:`PyCapsule_SetName` always throws an exception and + * :c:func:`PyCapsule_SetName` always raises an exception and returns failure. (Since there's no way to store a name in a CObject, noisy failure of :c:func:`PyCapsule_SetName` was deemed preferable to silent failure here. If this is diff -r b0935ef48186 Lib/asyncore.py --- a/Lib/asyncore.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/asyncore.py Tue Dec 18 20:06:01 2012 +0200 @@ -393,7 +393,7 @@ else: return data except socket.error, why: - # winsock sometimes throws ENOTCONN + # winsock sometimes raises ENOTCONN if why.args[0] in _DISCONNECTED: self.handle_close() return '' diff -r b0935ef48186 Lib/distutils/tests/test_msvc9compiler.py --- a/Lib/distutils/tests/test_msvc9compiler.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/distutils/tests/test_msvc9compiler.py Tue Dec 18 20:06:01 2012 +0200 @@ -104,7 +104,7 @@ unittest.TestCase): def test_no_compiler(self): - # makes sure query_vcvarsall throws + # makes sure query_vcvarsall raises # a DistutilsPlatformError if the compiler # is not found from distutils.msvc9compiler import query_vcvarsall diff -r b0935ef48186 Lib/email/feedparser.py --- a/Lib/email/feedparser.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/email/feedparser.py Tue Dec 18 20:06:01 2012 +0200 @@ -13,7 +13,7 @@ data. When you have no more data to push into the parser, call .close(). This completes the parsing and returns the root message object. -The other advantage of this parser is that it will never throw a parsing +The other advantage of this parser is that it will never raise a parsing exception. Instead, when it finds something unexpected, it adds a 'defect' to the current message. Defects are just instances that live on the message object's .defects attribute. @@ -214,7 +214,7 @@ # supposed to see in the body of the message. self._parse_headers(headers) # Headers-only parsing is a backwards compatibility hack, which was - # necessary in the older parser, which could throw errors. All + # necessary in the older parser, which could raise errors. All # remaining lines in the input are thrown into the message body. if self._headersonly: lines = [] diff -r b0935ef48186 Lib/email/header.py --- a/Lib/email/header.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/email/header.py Tue Dec 18 20:06:01 2012 +0200 @@ -103,7 +103,7 @@ dec = email.base64mime.decode(encoded) except binascii.Error: # Turn this into a higher level exception. BAW: Right - # now we throw the lower level exception away but + # now we raise the lower level exception away but # when/if we get exception chaining, we'll preserve it. raise HeaderParseError if dec is None: diff -r b0935ef48186 Lib/httplib.py --- a/Lib/httplib.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/httplib.py Tue Dec 18 20:06:01 2012 +0200 @@ -1068,7 +1068,7 @@ if port == 0: port = None - # Note that we may pass an empty string as the host; this will throw + # Note that we may pass an empty string as the host; this will raise # an error when we attempt to connect. Presumably, the client code # will call connect before then, with a proper host. self._setup(self._connection_class(host, port, strict)) diff -r b0935ef48186 Lib/io.py --- a/Lib/io.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/io.py Tue Dec 18 20:06:01 2012 +0200 @@ -4,7 +4,7 @@ At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; implementations are -allowed to throw an IOError if they do not support a given operation. +allowed to raise an IOError if they do not support a given operation. Extending IOBase is RawIOBase which deals simply with the reading and writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide diff -r b0935ef48186 Lib/lib-tk/Tkinter.py --- a/Lib/lib-tk/Tkinter.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/lib-tk/Tkinter.py Tue Dec 18 20:06:01 2012 +0200 @@ -155,7 +155,7 @@ pass def _exit(code=0): - """Internal function. Calling it will throw the exception SystemExit.""" + """Internal function. Calling it will raise the exception SystemExit.""" try: code = int(code) except ValueError: diff -r b0935ef48186 Lib/logging/__init__.py --- a/Lib/logging/__init__.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/logging/__init__.py Tue Dec 18 20:06:01 2012 +0200 @@ -1251,7 +1251,7 @@ all the handlers of this logger to handle the record. """ if _srcfile: - #IronPython doesn't track Python frames, so findCaller throws an + #IronPython doesn't track Python frames, so findCaller raises an #exception on some versions of IronPython. We trap it here so that #IronPython can use logging. try: diff -r b0935ef48186 Lib/runpy.py --- a/Lib/runpy.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/runpy.py Tue Dec 18 20:06:01 2012 +0200 @@ -200,7 +200,7 @@ pass else: # The following check looks a bit odd. The trick is that - # NullImporter throws ImportError if the supplied path is a + # NullImporter raises ImportError if the supplied path is a # *valid* directory entry (and hence able to be handled # by the standard import machinery) try: diff -r b0935ef48186 Lib/test/test_codeop.py --- a/Lib/test/test_codeop.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_codeop.py Tue Dec 18 20:06:01 2012 +0200 @@ -50,7 +50,7 @@ '''succeed iff str is the start of an invalid piece of code''' try: compile_command(str,symbol=symbol) - self.fail("No exception thrown for invalid code") + self.fail("No exception raised for invalid code") except SyntaxError: self.assertTrue(is_syntax) except OverflowError: diff -r b0935ef48186 Lib/test/test_docxmlrpc.py --- a/Lib/test/test_docxmlrpc.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_docxmlrpc.py Tue Dec 18 20:06:01 2012 +0200 @@ -100,7 +100,7 @@ self.assertEqual(response.status, 200) self.assertEqual(response.getheader("Content-type"), "text/html") - # Server throws an exception if we don't start to read the data + # Server raises an exception if we don't start to read the data response.read() def test_invalid_get_response(self): diff -r b0935ef48186 Lib/test/test_imaplib.py --- a/Lib/test/test_imaplib.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_imaplib.py Tue Dec 18 20:06:01 2012 +0200 @@ -79,7 +79,7 @@ return line += part except IOError: - # ..but SSLSockets throw exceptions. + # ..but SSLSockets raise exceptions. return if line.endswith('\r\n'): break diff -r b0935ef48186 Lib/test/test_minidom.py --- a/Lib/test/test_minidom.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_minidom.py Tue Dec 18 20:06:01 2012 +0200 @@ -1060,7 +1060,7 @@ '\xa4', "testEncodings - encoding EURO SIGN") - # Verify that character decoding errors throw exceptions instead + # Verify that character decoding errors raise exceptions instead # of crashing self.assertRaises(UnicodeDecodeError, parseString, 'Comment \xe7a va ? Tr\xe8s bien ?') diff -r b0935ef48186 Lib/test/test_os.py --- a/Lib/test/test_os.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_os.py Tue Dec 18 20:06:01 2012 +0200 @@ -214,33 +214,33 @@ try: result[200] - self.fail("No exception thrown") + self.fail("No exception raised") except IndexError: pass # Make sure that assignment fails try: result.st_mode = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except (AttributeError, TypeError): pass try: result.st_rdev = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except (AttributeError, TypeError): pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the stat_result constructor with a too-short tuple. try: result2 = os.stat_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass @@ -274,20 +274,20 @@ # Make sure that assignment really fails try: result.f_bfree = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the constructor with a too-short tuple. try: result2 = os.statvfs_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass diff -r b0935ef48186 Lib/test/test_pty.py --- a/Lib/test/test_pty.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_pty.py Tue Dec 18 20:06:01 2012 +0200 @@ -152,7 +152,7 @@ # platform-dependent amount of data is written to its fd. On # Linux 2.6, it's 4000 bytes and the child won't block, but on OS # X even the small writes in the child above will block it. Also - # on Linux, the read() will throw an OSError (input/output error) + # on Linux, the read() will raise an OSError (input/output error) # when it tries to read past the end of the buffer but the child's # already exited, so catch and discard those exceptions. It's not # worth checking for EIO. diff -r b0935ef48186 Lib/test/test_sax.py --- a/Lib/test/test_sax.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_sax.py Tue Dec 18 20:06:01 2012 +0200 @@ -294,7 +294,7 @@ def test_5027_1(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by parsing a document. @@ -320,7 +320,7 @@ def test_5027_2(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by direct manipulation of the diff -r b0935ef48186 Lib/test/test_signal.py --- a/Lib/test/test_signal.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_signal.py Tue Dec 18 20:06:01 2012 +0200 @@ -109,7 +109,7 @@ # This wait should be interrupted by the signal's exception. self.wait(child) time.sleep(1) # Give the signal time to be delivered. - self.fail('HandlerBCalled exception not thrown') + self.fail('HandlerBCalled exception not raised') except HandlerBCalled: self.assertTrue(self.b_called) self.assertFalse(self.a_called) @@ -148,7 +148,7 @@ # test-running process from all the signals. It then # communicates with that child process over a pipe and # re-raises information about any exceptions the child - # throws. The real work happens in self.run_test(). + # raises. The real work happens in self.run_test(). os_done_r, os_done_w = os.pipe() with closing(os.fdopen(os_done_r)) as done_r, \ closing(os.fdopen(os_done_w, 'w')) as done_w: diff -r b0935ef48186 Lib/test/test_socketserver.py --- a/Lib/test/test_socketserver.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_socketserver.py Tue Dec 18 20:06:01 2012 +0200 @@ -58,7 +58,7 @@ def simple_subprocess(testcase): pid = os.fork() if pid == 0: - # Don't throw an exception; it would be caught by the test harness. + # Don't raise an exception; it would be caught by the test harness. os._exit(72) yield None pid2, status = os.waitpid(pid, 0) diff -r b0935ef48186 Lib/test/test_sys_settrace.py --- a/Lib/test/test_sys_settrace.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_sys_settrace.py Tue Dec 18 20:06:01 2012 +0200 @@ -417,7 +417,7 @@ except ValueError: pass else: - self.fail("exception not thrown!") + self.fail("exception not raised!") except RuntimeError: self.fail("recursion counter not reset") diff -r b0935ef48186 Lib/test/test_time.py --- a/Lib/test/test_time.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_time.py Tue Dec 18 20:06:01 2012 +0200 @@ -106,7 +106,7 @@ def test_strptime(self): # Should be able to go round-trip from strftime to strptime without - # throwing an exception. + # raising an exception. tt = time.gmtime(self.t) for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', diff -r b0935ef48186 Lib/test/test_uu.py --- a/Lib/test/test_uu.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_uu.py Tue Dec 18 20:06:01 2012 +0200 @@ -48,7 +48,7 @@ out = cStringIO.StringIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error, e: self.assertEqual(str(e), "Truncated input file") @@ -57,7 +57,7 @@ out = cStringIO.StringIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error, e: self.assertEqual(str(e), "No valid begin line found in input file") diff -r b0935ef48186 Lib/test/test_winreg.py --- a/Lib/test/test_winreg.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_winreg.py Tue Dec 18 20:06:01 2012 +0200 @@ -234,7 +234,7 @@ def test_changing_value(self): # Issue2810: A race condition in 2.6 and 3.1 may cause - # EnumValue or QueryValue to throw "WindowsError: More data is + # EnumValue or QueryValue to raise "WindowsError: More data is # available" done = False @@ -282,7 +282,7 @@ def test_dynamic_key(self): # Issue2810, when the value is dynamically generated, these - # throw "WindowsError: More data is available" in 2.6 and 3.1 + # raise "WindowsError: More data is available" in 2.6 and 3.1 try: EnumValue(HKEY_PERFORMANCE_DATA, 0) except OSError as e: diff -r b0935ef48186 Lib/test/test_zipfile.py --- a/Lib/test/test_zipfile.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_zipfile.py Tue Dec 18 20:06:01 2012 +0200 @@ -811,7 +811,7 @@ with zipfile.ZipFile(data, mode="w") as zipf: zipf.writestr("foo.txt", "O, for a Muse of Fire!") - # This is correct; calling .read on a closed ZipFile should throw + # This is correct; calling .read on a closed ZipFile should raise # a RuntimeError, and so should calling .testzip. An earlier # version of .testzip would swallow this exception (and any other) # and report that the first file in the archive was corrupt. diff -r b0935ef48186 Lib/traceback.py --- a/Lib/traceback.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/traceback.py Tue Dec 18 20:06:01 2012 +0200 @@ -166,7 +166,7 @@ # >>> raise string1, string2 # deprecated # # Clear these out first because issubtype(string1, SyntaxError) - # would throw another exception and mask the original problem. + # would raise another exception and mask the original problem. if (isinstance(etype, BaseException) or isinstance(etype, types.InstanceType) or etype is None or type(etype) is str): diff -r b0935ef48186 Lib/unittest/case.py --- a/Lib/unittest/case.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/unittest/case.py Tue Dec 18 20:06:01 2012 +0200 @@ -447,10 +447,10 @@ def assertRaises(self, excClass, callableObj=None, *args, **kwargs): - """Fail unless an exception of class excClass is thrown + """Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is - thrown, it will not be caught, and the test case will be + raised, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception. diff -r b0935ef48186 Lib/wsgiref/validate.py --- a/Lib/wsgiref/validate.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/wsgiref/validate.py Tue Dec 18 20:06:01 2012 +0200 @@ -134,9 +134,9 @@ When applied between a WSGI server and a WSGI application, this middleware will check for WSGI compliancy on a number of levels. This middleware does not modify the request or response in any - way, but will throw an AssertionError if anything seems off + way, but will raise an AssertionError if anything seems off (except for a failure to close the application iterator, which - will be printed to stderr -- there's no way to throw an exception + will be printed to stderr -- there's no way to raise an exception at that point). """ diff -r b0935ef48186 Lib/xml/sax/_exceptions.py --- a/Lib/xml/sax/_exceptions.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/xml/sax/_exceptions.py Tue Dec 18 20:06:01 2012 +0200 @@ -12,7 +12,7 @@ the application: you can subclass it to provide additional functionality, or to add localization. Note that although you will receive a SAXException as the argument to the handlers in the - ErrorHandler interface, you are not actually required to throw + ErrorHandler interface, you are not actually required to raise the exception; instead, you can simply read the information in it.""" @@ -50,7 +50,7 @@ the original XML document. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required - to throw the exception; instead, it can simply read the + to raise the exception; instead, it can simply read the information in it and take a different action. Since this exception is a subclass of SAXException, it inherits @@ -62,7 +62,7 @@ self._locator = locator # We need to cache this stuff at construction time. - # If this exception is thrown, the objects through which we must + # If this exception is raised, the objects through which we must # traverse to get this information may be deleted by the time # it gets caught. self._systemId = self._locator.getSystemId() diff -r b0935ef48186 Lib/xml/sax/xmlreader.py --- a/Lib/xml/sax/xmlreader.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/xml/sax/xmlreader.py Tue Dec 18 20:06:01 2012 +0200 @@ -68,7 +68,7 @@ SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, - however, they must throw a SAX exception. Applications may + however, they must raise a SAX exception. Applications may request a locale change in the middle of a parse.""" raise SAXNotSupportedException("Locale support not implemented") diff -r b0935ef48186 Lib/xmlrpclib.py --- a/Lib/xmlrpclib.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/xmlrpclib.py Tue Dec 18 20:06:01 2012 +0200 @@ -945,7 +945,7 @@ class MultiCallIterator: """Iterates over the results of a multicall. Exceptions are - thrown in response to xmlrpc faults.""" + raised in response to xmlrpc faults.""" def __init__(self, results): self.results = results diff -r b0935ef48186 Modules/_io/_iomodule.c --- a/Modules/_io/_iomodule.c Sun Dec 16 13:55:47 2012 +0100 +++ b/Modules/_io/_iomodule.c Tue Dec 18 20:06:01 2012 +0200 @@ -59,7 +59,7 @@ "At the top of the I/O hierarchy is the abstract base class IOBase. It\n" "defines the basic interface to a stream. Note, however, that there is no\n" "separation between reading and writing to streams; implementations are\n" -"allowed to throw an IOError if they do not support a given operation.\n" +"allowed to raise an IOError if they do not support a given operation.\n" "\n" "Extending IOBase is RawIOBase which deals simply with the reading and\n" "writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide\n" diff -r b0935ef48186 Modules/parsermodule.c --- a/Modules/parsermodule.c Sun Dec 16 13:55:47 2012 +0100 +++ b/Modules/parsermodule.c Tue Dec 18 20:06:01 2012 +0200 @@ -698,7 +698,7 @@ err_string("parse tree does not use a valid start symbol"); } } - /* Make sure we throw an exception on all errors. We should never + /* Make sure we raise an exception on all errors. We should never * get this, but we'd do well to be sure something is done. */ if (st == NULL && !PyErr_Occurred()) @@ -813,7 +813,7 @@ else if (!ISNONTERMINAL(type)) { /* * It has to be one or the other; this is an error. - * Throw an exception. + * Raise an exception. */ PyObject *err = Py_BuildValue("os", elem, "unknown node type."); PyErr_SetObject(parser_error, err); @@ -863,7 +863,7 @@ if (ISTERMINAL(num)) { /* * The tuple is simple, but it doesn't start with a start symbol. - * Throw an exception now and be done with it. + * Raise an exception now and be done with it. */ tuple = Py_BuildValue("os", tuple, "Illegal syntax-tree; cannot start with terminal symbol."); diff -r b0935ef48186 Modules/posixmodule.c --- a/Modules/posixmodule.c Sun Dec 16 13:55:47 2012 +0100 +++ b/Modules/posixmodule.c Tue Dec 18 20:06:01 2012 +0200 @@ -349,7 +349,7 @@ #if defined _MSC_VER && _MSC_VER >= 1400 /* Microsoft CRT in VS2005 and higher will verify that a filehandle is - * valid and throw an assertion if it isn't. + * valid and raise an assertion if it isn't. * Normally, an invalid fd is likely to be a C program error and therefore * an assertion can be useful, but it does contradict the POSIX standard * which for write(2) states: diff -r b0935ef48186 Tools/scripts/serve.py --- a/Tools/scripts/serve.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Tools/scripts/serve.py Tue Dec 18 20:06:01 2012 +0200 @@ -2,7 +2,7 @@ ''' Small wsgiref based web server. Takes a path to serve from and an optional port number (defaults to 8000), then tries to serve files. -Mime types are guessed from the file names, 404 errors are thrown +Mime types are guessed from the file names, 404 errors are raised if the file is not found. Used for the make serve target in Doc. ''' import sys -------------- next part -------------- diff -r 907d71668d3c Doc/howto/cporting.rst --- a/Doc/howto/cporting.rst Sun Dec 16 21:10:35 2012 +0100 +++ b/Doc/howto/cporting.rst Tue Dec 18 19:35:27 2012 +0200 @@ -253,7 +253,7 @@ * :c:func:`PyCapsule_GetName` always returns NULL. - * :c:func:`PyCapsule_SetName` always throws an exception and + * :c:func:`PyCapsule_SetName` always raises an exception and returns failure. (Since there's no way to store a name in a CObject, noisy failure of :c:func:`PyCapsule_SetName` was deemed preferable to silent failure here. If this is diff -r 907d71668d3c Doc/library/contextlib.rst --- a/Doc/library/contextlib.rst Sun Dec 16 21:10:35 2012 +0100 +++ b/Doc/library/contextlib.rst Tue Dec 18 19:35:27 2012 +0200 @@ -184,7 +184,7 @@ files = [stack.enter_context(open(fname)) for fname in filenames] # All opened files will automatically be closed at the end of # the with statement, even if attempts to open files later - # in the list throw an exception + # in the list raise an exception Each instance maintains a stack of registered callbacks that are called in reverse order when the instance is closed (either explicitly or implicitly diff -r 907d71668d3c Doc/library/imaplib.rst --- a/Doc/library/imaplib.rst Sun Dec 16 21:10:35 2012 +0100 +++ b/Doc/library/imaplib.rst Tue Dec 18 19:35:27 2012 +0200 @@ -75,7 +75,7 @@ :class:`ssl.SSLContext` object which allows bundling SSL configuration options, certificates and private keys into a single (potentially long-lived) structure. Note that the *keyfile*/*certfile* parameters are mutually exclusive with *ssl_context*, - a :class:`ValueError` is thrown if *keyfile*/*certfile* is provided along with *ssl_context*. + a :class:`ValueError` is raised if *keyfile*/*certfile* is provided along with *ssl_context*. .. versionchanged:: 3.3 *ssl_context* parameter added. diff -r 907d71668d3c Doc/library/os.rst --- a/Doc/library/os.rst Sun Dec 16 21:10:35 2012 +0100 +++ b/Doc/library/os.rst Tue Dec 18 19:35:27 2012 +0200 @@ -1171,7 +1171,7 @@ output) specifies which file descriptor should be queried. If the file descriptor is not connected to a terminal, an :exc:`OSError` - is thrown. + is raised. :func:`shutil.get_terminal_size` is the high-level function which should normally be used, ``os.get_terminal_size`` is the low-level @@ -1945,7 +1945,7 @@ :mod:`os` module permit use of their *dir_fd* parameter. Different platforms provide different functionality, and an option that might work on one might be unsupported on another. For consistency's sakes, functions that support - *dir_fd* always allow specifying the parameter, but will throw an exception + *dir_fd* always allow specifying the parameter, but will raise an exception if the functionality is not actually available. To check whether a particular function permits use of its *dir_fd* @@ -1986,7 +1986,7 @@ descriptor. Different platforms provide different functionality, and an option that might work on one might be unsupported on another. For consistency's sakes, functions that support *fd* always allow specifying - the parameter, but will throw an exception if the functionality is not + the parameter, but will raise an exception if the functionality is not actually available. To check whether a particular function permits specifying an open file @@ -2007,7 +2007,7 @@ platforms provide different functionality, and an option that might work on one might be unsupported on another. For consistency's sakes, functions that support *follow_symlinks* always allow specifying the parameter, but will - throw an exception if the functionality is not actually available. + raise an exception if the functionality is not actually available. To check whether a particular function permits use of its *follow_symlinks* parameter, use the ``in`` operator on ``supports_follow_symlinks``. As an diff -r 907d71668d3c Lib/asyncore.py --- a/Lib/asyncore.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/asyncore.py Tue Dec 18 19:35:27 2012 +0200 @@ -385,7 +385,7 @@ else: return data except socket.error as why: - # winsock sometimes throws ENOTCONN + # winsock sometimes raises ENOTCONN if why.args[0] in _DISCONNECTED: self.handle_close() return b'' diff -r 907d71668d3c Lib/contextlib.py --- a/Lib/contextlib.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/contextlib.py Tue Dec 18 19:35:27 2012 +0200 @@ -151,7 +151,7 @@ files = [stack.enter_context(open(fname)) for fname in filenames] # All opened files will automatically be closed at the end of # the with statement, even if attempts to open files later - # in the list throw an exception + # in the list raise an exception """ def __init__(self): diff -r 907d71668d3c Lib/distutils/tests/test_msvc9compiler.py --- a/Lib/distutils/tests/test_msvc9compiler.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/distutils/tests/test_msvc9compiler.py Tue Dec 18 19:35:27 2012 +0200 @@ -104,7 +104,7 @@ unittest.TestCase): def test_no_compiler(self): - # makes sure query_vcvarsall throws + # makes sure query_vcvarsall raises # a DistutilsPlatformError if the compiler # is not found from distutils.msvc9compiler import query_vcvarsall diff -r 907d71668d3c Lib/email/feedparser.py --- a/Lib/email/feedparser.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/email/feedparser.py Tue Dec 18 19:35:27 2012 +0200 @@ -13,7 +13,7 @@ data. When you have no more data to push into the parser, call .close(). This completes the parsing and returns the root message object. -The other advantage of this parser is that it will never throw a parsing +The other advantage of this parser is that it will never raise a parsing exception. Instead, when it finds something unexpected, it adds a 'defect' to the current message. Defects are just instances that live on the message object's .defects attribute. @@ -228,7 +228,7 @@ # supposed to see in the body of the message. self._parse_headers(headers) # Headers-only parsing is a backwards compatibility hack, which was - # necessary in the older parser, which could throw errors. All + # necessary in the older parser, which could raise errors. All # remaining lines in the input are thrown into the message body. if self._headersonly: lines = [] diff -r 907d71668d3c Lib/email/header.py --- a/Lib/email/header.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/email/header.py Tue Dec 18 19:35:27 2012 +0200 @@ -298,7 +298,7 @@ else: s = s.decode(input_charset, errors) # Ensure that the bytes we're storing can be decoded to the output - # character set, otherwise an early error is thrown. + # character set, otherwise an early error is raised. output_charset = charset.output_codec or 'us-ascii' if output_charset != _charset.UNKNOWN8BIT: try: diff -r 907d71668d3c Lib/email/utils.py --- a/Lib/email/utils.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/email/utils.py Tue Dec 18 19:35:27 2012 +0200 @@ -83,7 +83,7 @@ 'utf-8'. """ name, address = pair - # The address MUST (per RFC) be ascii, so throw a UnicodeError if it isn't. + # The address MUST (per RFC) be ascii, so raise an UnicodeError if it isn't. address.encode('ascii') if name: try: diff -r 907d71668d3c Lib/imaplib.py --- a/Lib/imaplib.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/imaplib.py Tue Dec 18 19:35:27 2012 +0200 @@ -1178,7 +1178,7 @@ ssl_context - a SSLContext object that contains your certificate chain and private key (default: None) Note: if ssl_context is provided, then parameters keyfile or - certfile should not be set otherwise ValueError is thrown. + certfile should not be set otherwise ValueError is raised. for more documentation see the docstring of the parent class IMAP4. """ diff -r 907d71668d3c Lib/io.py --- a/Lib/io.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/io.py Tue Dec 18 19:35:27 2012 +0200 @@ -4,7 +4,7 @@ At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; implementations are -allowed to throw an IOError if they do not support a given operation. +allowed to raise an IOError if they do not support a given operation. Extending IOBase is RawIOBase which deals simply with the reading and writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide diff -r 907d71668d3c Lib/logging/__init__.py --- a/Lib/logging/__init__.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/logging/__init__.py Tue Dec 18 19:35:27 2012 +0200 @@ -1349,7 +1349,7 @@ """ sinfo = None if _srcfile: - #IronPython doesn't track Python frames, so findCaller throws an + #IronPython doesn't track Python frames, so findCaller raises an #exception on some versions of IronPython. We trap it here so that #IronPython can use logging. try: @@ -1671,7 +1671,7 @@ Added the ``style`` parameter. .. versionchanged:: 3.3 - Added the ``handlers`` parameter. A ``ValueError`` is now thrown for + Added the ``handlers`` parameter. A ``ValueError`` is now raised for incompatible arguments (e.g. ``handlers`` specified together with ``filename``/``filemode``, or ``filename``/``filemode`` specified together with ``stream``, or ``handlers`` specified together with diff -r 907d71668d3c Lib/multiprocessing/util.py --- a/Lib/multiprocessing/util.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/multiprocessing/util.py Tue Dec 18 19:35:27 2012 +0200 @@ -290,7 +290,7 @@ if current_process() is not None: # We check if the current process is None here because if - # it's None, any call to ``active_children()`` will throw + # it's None, any call to ``active_children()`` will raise # an AttributeError (active_children winds up trying to # get attributes from util._current_process). One # situation where this can happen is if someone has diff -r 907d71668d3c Lib/pkgutil.py --- a/Lib/pkgutil.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/pkgutil.py Tue Dec 18 19:35:27 2012 +0200 @@ -504,7 +504,7 @@ return importlib.find_loader(fullname, path) except (ImportError, AttributeError, TypeError, ValueError) as ex: # This hack fixes an impedance mismatch between pkgutil and - # importlib, where the latter throws other errors for cases where + # importlib, where the latter raises other errors for cases where # pkgutil previously threw ImportError msg = "Error while finding loader for {!r} ({}: {})" raise ImportError(msg.format(fullname, type(ex), ex)) from ex diff -r 907d71668d3c Lib/tempfile.py --- a/Lib/tempfile.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/tempfile.py Tue Dec 18 19:35:27 2012 +0200 @@ -621,7 +621,7 @@ def __init__(self, suffix="", prefix=template, dir=None): self._closed = False - self.name = None # Handle mkdtemp throwing an exception + self.name = None # Handle mkdtemp raising an exception self.name = mkdtemp(suffix, prefix, dir) def __repr__(self): diff -r 907d71668d3c Lib/test/test_codeop.py --- a/Lib/test/test_codeop.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_codeop.py Tue Dec 18 19:35:27 2012 +0200 @@ -50,7 +50,7 @@ '''succeed iff str is the start of an invalid piece of code''' try: compile_command(str,symbol=symbol) - self.fail("No exception thrown for invalid code") + self.fail("No exception raised for invalid code") except SyntaxError: self.assertTrue(is_syntax) except OverflowError: diff -r 907d71668d3c Lib/test/test_docxmlrpc.py --- a/Lib/test/test_docxmlrpc.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_docxmlrpc.py Tue Dec 18 19:35:27 2012 +0200 @@ -100,7 +100,7 @@ self.assertEqual(response.status, 200) self.assertEqual(response.getheader("Content-type"), "text/html") - # Server throws an exception if we don't start to read the data + # Server raises an exception if we don't start to read the data response.read() def test_invalid_get_response(self): diff -r 907d71668d3c Lib/test/test_imaplib.py --- a/Lib/test/test_imaplib.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_imaplib.py Tue Dec 18 19:35:27 2012 +0200 @@ -115,7 +115,7 @@ return line += part except IOError: - # ..but SSLSockets throw exceptions. + # ..but SSLSockets raise exceptions. return if line.endswith(b'\r\n'): break diff -r 907d71668d3c Lib/test/test_minidom.py --- a/Lib/test/test_minidom.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_minidom.py Tue Dec 18 19:35:27 2012 +0200 @@ -1073,7 +1073,7 @@ '' '\u20ac'.encode('utf-16')) - # Verify that character decoding errors throw exceptions instead + # Verify that character decoding errors raise exceptions instead # of crashing self.assertRaises(UnicodeDecodeError, parseString, b'Comment \xe7a va ? Tr\xe8s bien ?') diff -r 907d71668d3c Lib/test/test_os.py --- a/Lib/test/test_os.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_os.py Tue Dec 18 19:35:27 2012 +0200 @@ -202,33 +202,33 @@ try: result[200] - self.fail("No exception thrown") + self.fail("No exception raised") except IndexError: pass # Make sure that assignment fails try: result.st_mode = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass try: result.st_rdev = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except (AttributeError, TypeError): pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the stat_result constructor with a too-short tuple. try: result2 = os.stat_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass @@ -273,20 +273,20 @@ # Make sure that assignment really fails try: result.f_bfree = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the constructor with a too-short tuple. try: result2 = os.statvfs_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass @@ -2018,7 +2018,7 @@ size = os.get_terminal_size() except OSError as e: if sys.platform == "win32" or e.errno in (errno.EINVAL, errno.ENOTTY): - # Under win32 a generic OSError can be thrown if the + # Under win32 a generic OSError can be raised if the # handle cannot be retrieved self.skipTest("failed to query terminal size") raise @@ -2043,7 +2043,7 @@ actual = os.get_terminal_size(sys.__stdin__.fileno()) except OSError as e: if sys.platform == "win32" or e.errno in (errno.EINVAL, errno.ENOTTY): - # Under win32 a generic OSError can be thrown if the + # Under win32 a generic OSError can be raised if the # handle cannot be retrieved self.skipTest("failed to query terminal size") raise diff -r 907d71668d3c Lib/test/test_posix.py --- a/Lib/test/test_posix.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_posix.py Tue Dec 18 19:35:27 2012 +0200 @@ -824,7 +824,7 @@ posix.rename(support.TESTFN + 'ren', support.TESTFN) raise else: - posix.stat(support.TESTFN) # should not throw exception + posix.stat(support.TESTFN) # should not raise exception finally: posix.close(f) @@ -842,7 +842,7 @@ def test_unlink_dir_fd(self): f = posix.open(posix.getcwd(), posix.O_RDONLY) support.create_empty_file(support.TESTFN + 'del') - posix.stat(support.TESTFN + 'del') # should not throw exception + posix.stat(support.TESTFN + 'del') # should not raise exception try: posix.unlink(support.TESTFN + 'del', dir_fd=f) except: diff -r 907d71668d3c Lib/test/test_pty.py --- a/Lib/test/test_pty.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_pty.py Tue Dec 18 19:35:27 2012 +0200 @@ -152,7 +152,7 @@ # platform-dependent amount of data is written to its fd. On # Linux 2.6, it's 4000 bytes and the child won't block, but on OS # X even the small writes in the child above will block it. Also - # on Linux, the read() will throw an OSError (input/output error) + # on Linux, the read() will raise an OSError (input/output error) # when it tries to read past the end of the buffer but the child's # already exited, so catch and discard those exceptions. It's not # worth checking for EIO. diff -r 907d71668d3c Lib/test/test_sax.py --- a/Lib/test/test_sax.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_sax.py Tue Dec 18 19:35:27 2012 +0200 @@ -389,7 +389,7 @@ def test_5027_1(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by parsing a document. @@ -415,7 +415,7 @@ def test_5027_2(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by direct manipulation of the diff -r 907d71668d3c Lib/test/test_signal.py --- a/Lib/test/test_signal.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_signal.py Tue Dec 18 19:35:27 2012 +0200 @@ -107,7 +107,7 @@ # This wait should be interrupted by the signal's exception. self.wait(child) time.sleep(1) # Give the signal time to be delivered. - self.fail('HandlerBCalled exception not thrown') + self.fail('HandlerBCalled exception not raised') except HandlerBCalled: self.assertTrue(self.b_called) self.assertFalse(self.a_called) @@ -143,7 +143,7 @@ # test-running process from all the signals. It then # communicates with that child process over a pipe and # re-raises information about any exceptions the child - # throws. The real work happens in self.run_test(). + # raises. The real work happens in self.run_test(). os_done_r, os_done_w = os.pipe() with closing(os.fdopen(os_done_r, 'rb')) as done_r, \ closing(os.fdopen(os_done_w, 'wb')) as done_w: diff -r 907d71668d3c Lib/test/test_socketserver.py --- a/Lib/test/test_socketserver.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_socketserver.py Tue Dec 18 19:35:27 2012 +0200 @@ -58,7 +58,7 @@ def simple_subprocess(testcase): pid = os.fork() if pid == 0: - # Don't throw an exception; it would be caught by the test harness. + # Don't raise an exception; it would be caught by the test harness. os._exit(72) yield None pid2, status = os.waitpid(pid, 0) diff -r 907d71668d3c Lib/test/test_sys_settrace.py --- a/Lib/test/test_sys_settrace.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_sys_settrace.py Tue Dec 18 19:35:27 2012 +0200 @@ -422,7 +422,7 @@ except ValueError: pass else: - self.fail("exception not thrown!") + self.fail("exception not raised!") except RuntimeError: self.fail("recursion counter not reset") diff -r 907d71668d3c Lib/test/test_time.py --- a/Lib/test/test_time.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_time.py Tue Dec 18 19:35:27 2012 +0200 @@ -175,7 +175,7 @@ def test_strptime(self): # Should be able to go round-trip from strftime to strptime without - # throwing an exception. + # raising an exception. tt = time.gmtime(self.t) for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', diff -r 907d71668d3c Lib/test/test_uu.py --- a/Lib/test/test_uu.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_uu.py Tue Dec 18 19:35:27 2012 +0200 @@ -80,7 +80,7 @@ out = io.BytesIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error as e: self.assertEqual(str(e), "Truncated input file") @@ -89,7 +89,7 @@ out = io.BytesIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error as e: self.assertEqual(str(e), "No valid begin line found in input file") diff -r 907d71668d3c Lib/test/test_winreg.py --- a/Lib/test/test_winreg.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_winreg.py Tue Dec 18 19:35:27 2012 +0200 @@ -245,7 +245,7 @@ def test_changing_value(self): # Issue2810: A race condition in 2.6 and 3.1 may cause - # EnumValue or QueryValue to throw "WindowsError: More data is + # EnumValue or QueryValue to raise "WindowsError: More data is # available" done = False @@ -291,7 +291,7 @@ def test_dynamic_key(self): # Issue2810, when the value is dynamically generated, these - # throw "WindowsError: More data is available" in 2.6 and 3.1 + # raise "WindowsError: More data is available" in 2.6 and 3.1 try: EnumValue(HKEY_PERFORMANCE_DATA, 0) except OSError as e: diff -r 907d71668d3c Lib/test/test_zipfile.py --- a/Lib/test/test_zipfile.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_zipfile.py Tue Dec 18 19:35:27 2012 +0200 @@ -1024,7 +1024,7 @@ with zipfile.ZipFile(data, mode="w") as zipf: zipf.writestr("foo.txt", "O, for a Muse of Fire!") - # This is correct; calling .read on a closed ZipFile should throw + # This is correct; calling .read on a closed ZipFile should raise # a RuntimeError, and so should calling .testzip. An earlier # version of .testzip would swallow this exception (and any other) # and report that the first file in the archive was corrupt. diff -r 907d71668d3c Lib/tkinter/__init__.py --- a/Lib/tkinter/__init__.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/tkinter/__init__.py Tue Dec 18 19:35:27 2012 +0200 @@ -149,7 +149,7 @@ pass def _exit(code=0): - """Internal function. Calling it will throw the exception SystemExit.""" + """Internal function. Calling it will raise the exception SystemExit.""" try: code = int(code) except ValueError: diff -r 907d71668d3c Lib/unittest/case.py --- a/Lib/unittest/case.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/unittest/case.py Tue Dec 18 19:35:27 2012 +0200 @@ -542,10 +542,10 @@ return '%s : %s' % (safe_repr(standardMsg), safe_repr(msg)) def assertRaises(self, excClass, callableObj=None, *args, **kwargs): - """Fail unless an exception of class excClass is thrown + """Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is - thrown, it will not be caught, and the test case will be + raised, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception. diff -r 907d71668d3c Lib/wsgiref/validate.py --- a/Lib/wsgiref/validate.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/wsgiref/validate.py Tue Dec 18 19:35:27 2012 +0200 @@ -139,9 +139,9 @@ When applied between a WSGI server and a WSGI application, this middleware will check for WSGI compliancy on a number of levels. This middleware does not modify the request or response in any - way, but will throw an AssertionError if anything seems off + way, but will raise an AssertionError if anything seems off (except for a failure to close the application iterator, which - will be printed to stderr -- there's no way to throw an exception + will be printed to stderr -- there's no way to raise an exception at that point). """ diff -r 907d71668d3c Lib/xml/sax/_exceptions.py --- a/Lib/xml/sax/_exceptions.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/xml/sax/_exceptions.py Tue Dec 18 19:35:27 2012 +0200 @@ -12,7 +12,7 @@ the application: you can subclass it to provide additional functionality, or to add localization. Note that although you will receive a SAXException as the argument to the handlers in the - ErrorHandler interface, you are not actually required to throw + ErrorHandler interface, you are not actually required to raise the exception; instead, you can simply read the information in it.""" @@ -50,7 +50,7 @@ the original XML document. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required - to throw the exception; instead, it can simply read the + to raise the exception; instead, it can simply read the information in it and take a different action. Since this exception is a subclass of SAXException, it inherits @@ -62,7 +62,7 @@ self._locator = locator # We need to cache this stuff at construction time. - # If this exception is thrown, the objects through which we must + # If this exception is raised, the objects through which we must # traverse to get this information may be deleted by the time # it gets caught. self._systemId = self._locator.getSystemId() diff -r 907d71668d3c Lib/xml/sax/xmlreader.py --- a/Lib/xml/sax/xmlreader.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/xml/sax/xmlreader.py Tue Dec 18 19:35:27 2012 +0200 @@ -68,7 +68,7 @@ SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, - however, they must throw a SAX exception. Applications may + however, they must raise a SAX exception. Applications may request a locale change in the middle of a parse.""" raise SAXNotSupportedException("Locale support not implemented") diff -r 907d71668d3c Lib/xmlrpc/client.py --- a/Lib/xmlrpc/client.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/xmlrpc/client.py Tue Dec 18 19:35:27 2012 +0200 @@ -811,7 +811,7 @@ class MultiCallIterator: """Iterates over the results of a multicall. Exceptions are - thrown in response to xmlrpc faults.""" + raised in response to xmlrpc faults.""" def __init__(self, results): self.results = results diff -r 907d71668d3c Modules/_io/_iomodule.c --- a/Modules/_io/_iomodule.c Sun Dec 16 21:10:35 2012 +0100 +++ b/Modules/_io/_iomodule.c Tue Dec 18 19:35:27 2012 +0200 @@ -60,7 +60,7 @@ "At the top of the I/O hierarchy is the abstract base class IOBase. It\n" "defines the basic interface to a stream. Note, however, that there is no\n" "separation between reading and writing to streams; implementations are\n" -"allowed to throw an IOError if they do not support a given operation.\n" +"allowed to raise an IOError if they do not support a given operation.\n" "\n" "Extending IOBase is RawIOBase which deals simply with the reading and\n" "writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide\n" diff -r 907d71668d3c Modules/parsermodule.c --- a/Modules/parsermodule.c Sun Dec 16 21:10:35 2012 +0100 +++ b/Modules/parsermodule.c Tue Dec 18 19:35:27 2012 +0200 @@ -696,7 +696,7 @@ err_string("parse tree does not use a valid start symbol"); } } - /* Make sure we throw an exception on all errors. We should never + /* Make sure we raise an exception on all errors. We should never * get this, but we'd do well to be sure something is done. */ if (st == NULL && !PyErr_Occurred()) @@ -802,7 +802,7 @@ else if (!ISNONTERMINAL(type)) { /* * It has to be one or the other; this is an error. - * Throw an exception. + * Raise an exception. */ PyObject *err = Py_BuildValue("os", elem, "unknown node type."); PyErr_SetObject(parser_error, err); @@ -854,7 +854,7 @@ if (ISTERMINAL(num)) { /* * The tuple is simple, but it doesn't start with a start symbol. - * Throw an exception now and be done with it. + * Raise an exception now and be done with it. */ tuple = Py_BuildValue("os", tuple, "Illegal syntax-tree; cannot start with terminal symbol."); diff -r 907d71668d3c Modules/posixmodule.c --- a/Modules/posixmodule.c Sun Dec 16 21:10:35 2012 +0100 +++ b/Modules/posixmodule.c Tue Dec 18 19:35:27 2012 +0200 @@ -798,7 +798,7 @@ #if defined _MSC_VER && _MSC_VER >= 1400 /* Microsoft CRT in VS2005 and higher will verify that a filehandle is - * valid and throw an assertion if it isn't. + * valid and raise an assertion if it isn't. * Normally, an invalid fd is likely to be a C program error and therefore * an assertion can be useful, but it does contradict the POSIX standard * which for write(2) states: @@ -2716,7 +2716,7 @@ result = fchmodat(dir_fd, path.narrow, mode, follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW); /* - * But wait! We can't throw the exception without allowing threads, + * But wait! We can't raise the exception without allowing threads, * and we can't do that in this nested scope. (Macro trickery, sigh.) */ fchmodat_nofollow_unsupported = @@ -10617,7 +10617,7 @@ "which file descriptor should be queried.\n" \ "\n" \ "If the file descriptor is not connected to a terminal, an OSError\n" \ - "is thrown.\n" \ + "is raised.\n" \ "\n" \ "This function will only be defined if an implementation is\n" \ "available for this system.\n" \ diff -r 907d71668d3c Tools/scripts/find_recursionlimit.py --- a/Tools/scripts/find_recursionlimit.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Tools/scripts/find_recursionlimit.py Tue Dec 18 19:35:27 2012 +0200 @@ -92,7 +92,7 @@ def test_compiler_recursion(): # The compiler uses a scaling factor to support additional levels # of recursion. This is a sanity check of that scaling to ensure - # it still throws RuntimeError even at higher recursion limits + # it still raises RuntimeError even at higher recursion limits compile("()" * (10 * sys.getrecursionlimit()), "", "single") def check_limit(n, test_func_name): diff -r 907d71668d3c Tools/scripts/serve.py --- a/Tools/scripts/serve.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Tools/scripts/serve.py Tue Dec 18 19:35:27 2012 +0200 @@ -2,7 +2,7 @@ ''' Small wsgiref based web server. Takes a path to serve from and an optional port number (defaults to 8000), then tries to serve files. -Mime types are guessed from the file names, 404 errors are thrown +Mime types are guessed from the file names, 404 errors are raised if the file is not found. Used for the make serve target in Doc. ''' import sys -------------- next part -------------- diff -r 2ecea81adab0 Doc/howto/cporting.rst --- a/Doc/howto/cporting.rst Sun Dec 16 16:09:11 2012 +0100 +++ b/Doc/howto/cporting.rst Tue Dec 18 20:05:46 2012 +0200 @@ -253,7 +253,7 @@ * :c:func:`PyCapsule_GetName` always returns NULL. - * :c:func:`PyCapsule_SetName` always throws an exception and + * :c:func:`PyCapsule_SetName` always raises an exception and returns failure. (Since there's no way to store a name in a CObject, noisy failure of :c:func:`PyCapsule_SetName` was deemed preferable to silent failure here. If this is diff -r 2ecea81adab0 Lib/asyncore.py --- a/Lib/asyncore.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/asyncore.py Tue Dec 18 20:05:46 2012 +0200 @@ -393,7 +393,7 @@ else: return data except socket.error as why: - # winsock sometimes throws ENOTCONN + # winsock sometimes raises ENOTCONN if why.args[0] in _DISCONNECTED: self.handle_close() return b'' diff -r 2ecea81adab0 Lib/distutils/tests/test_msvc9compiler.py --- a/Lib/distutils/tests/test_msvc9compiler.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/distutils/tests/test_msvc9compiler.py Tue Dec 18 20:05:46 2012 +0200 @@ -104,7 +104,7 @@ unittest.TestCase): def test_no_compiler(self): - # makes sure query_vcvarsall throws + # makes sure query_vcvarsall raises # a DistutilsPlatformError if the compiler # is not found from distutils.msvc9compiler import query_vcvarsall diff -r 2ecea81adab0 Lib/email/feedparser.py --- a/Lib/email/feedparser.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/email/feedparser.py Tue Dec 18 20:05:46 2012 +0200 @@ -13,7 +13,7 @@ data. When you have no more data to push into the parser, call .close(). This completes the parsing and returns the root message object. -The other advantage of this parser is that it will never throw a parsing +The other advantage of this parser is that it will never raise a parsing exception. Instead, when it finds something unexpected, it adds a 'defect' to the current message. Defects are just instances that live on the message object's .defects attribute. @@ -214,7 +214,7 @@ # supposed to see in the body of the message. self._parse_headers(headers) # Headers-only parsing is a backwards compatibility hack, which was - # necessary in the older parser, which could throw errors. All + # necessary in the older parser, which could raise errors. All # remaining lines in the input are thrown into the message body. if self._headersonly: lines = [] diff -r 2ecea81adab0 Lib/email/header.py --- a/Lib/email/header.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/email/header.py Tue Dec 18 20:05:46 2012 +0200 @@ -280,7 +280,7 @@ else: s = s.decode(input_charset, errors) # Ensure that the bytes we're storing can be decoded to the output - # character set, otherwise an early error is thrown. + # character set, otherwise an early error is raised. output_charset = charset.output_codec or 'us-ascii' if output_charset != _charset.UNKNOWN8BIT: try: diff -r 2ecea81adab0 Lib/importlib/_bootstrap.py --- a/Lib/importlib/_bootstrap.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/importlib/_bootstrap.py Tue Dec 18 20:05:46 2012 +0200 @@ -415,7 +415,7 @@ source_mtime is not None): # If e.g. Jython ever implements imp.cache_from_source to have # their own cached file format, this block of code will most likely - # throw an exception. + # raise an exception. data = bytearray(imp.get_magic()) data.extend(marshal._w_long(source_mtime)) data.extend(marshal.dumps(code_object)) diff -r 2ecea81adab0 Lib/importlib/test/import_/test_fromlist.py --- a/Lib/importlib/test/import_/test_fromlist.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/importlib/test/import_/test_fromlist.py Tue Dec 18 20:05:46 2012 +0200 @@ -39,7 +39,7 @@ If a package is being imported, then what is listed in fromlist may be treated as a module to be imported [module]. But once again, even if - something in fromlist does not exist as a module, no error is thrown + something in fromlist does not exist as a module, no error is raised [no module]. And this extends to what is contained in __all__ when '*' is imported [using *]. And '*' does not need to be the only name in the fromlist [using * with others]. diff -r 2ecea81adab0 Lib/io.py --- a/Lib/io.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/io.py Tue Dec 18 20:05:46 2012 +0200 @@ -4,7 +4,7 @@ At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; implementations are -allowed to throw an IOError if they do not support a given operation. +allowed to raise an IOError if they do not support a given operation. Extending IOBase is RawIOBase which deals simply with the reading and writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide diff -r 2ecea81adab0 Lib/logging/__init__.py --- a/Lib/logging/__init__.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/logging/__init__.py Tue Dec 18 20:05:46 2012 +0200 @@ -1355,7 +1355,7 @@ """ sinfo = None if _srcfile: - #IronPython doesn't track Python frames, so findCaller throws an + #IronPython doesn't track Python frames, so findCaller raises an #exception on some versions of IronPython. We trap it here so that #IronPython can use logging. try: diff -r 2ecea81adab0 Lib/multiprocessing/util.py --- a/Lib/multiprocessing/util.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/multiprocessing/util.py Tue Dec 18 20:05:46 2012 +0200 @@ -301,7 +301,7 @@ _run_finalizers(0) if current_process() is not None: # We check if the current process is None here because if - # it's None, any call to ``active_children()`` will throw an + # it's None, any call to ``active_children()`` will raise an # AttributeError (active_children winds up trying to get # attributes from util._current_process). This happens in a # variety of shutdown circumstances that are not well-understood diff -r 2ecea81adab0 Lib/runpy.py --- a/Lib/runpy.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/runpy.py Tue Dec 18 20:05:46 2012 +0200 @@ -211,7 +211,7 @@ pass else: # The following check looks a bit odd. The trick is that - # NullImporter throws ImportError if the supplied path is a + # NullImporter raises ImportError if the supplied path is a # *valid* directory entry (and hence able to be handled # by the standard import machinery) try: diff -r 2ecea81adab0 Lib/tempfile.py --- a/Lib/tempfile.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/tempfile.py Tue Dec 18 20:05:46 2012 +0200 @@ -625,7 +625,7 @@ def __init__(self, suffix="", prefix=template, dir=None): self._closed = False - self.name = None # Handle mkdtemp throwing an exception + self.name = None # Handle mkdtemp raising an exception self.name = mkdtemp(suffix, prefix, dir) def __repr__(self): diff -r 2ecea81adab0 Lib/test/test_codeop.py --- a/Lib/test/test_codeop.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_codeop.py Tue Dec 18 20:05:46 2012 +0200 @@ -50,7 +50,7 @@ '''succeed iff str is the start of an invalid piece of code''' try: compile_command(str,symbol=symbol) - self.fail("No exception thrown for invalid code") + self.fail("No exception raised for invalid code") except SyntaxError: self.assertTrue(is_syntax) except OverflowError: diff -r 2ecea81adab0 Lib/test/test_docxmlrpc.py --- a/Lib/test/test_docxmlrpc.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_docxmlrpc.py Tue Dec 18 20:05:46 2012 +0200 @@ -100,7 +100,7 @@ self.assertEqual(response.status, 200) self.assertEqual(response.getheader("Content-type"), "text/html") - # Server throws an exception if we don't start to read the data + # Server raises an exception if we don't start to read the data response.read() def test_invalid_get_response(self): diff -r 2ecea81adab0 Lib/test/test_imaplib.py --- a/Lib/test/test_imaplib.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_imaplib.py Tue Dec 18 20:05:46 2012 +0200 @@ -99,7 +99,7 @@ return line += part except IOError: - # ..but SSLSockets throw exceptions. + # ..but SSLSockets raise exceptions. return if line.endswith(b'\r\n'): break diff -r 2ecea81adab0 Lib/test/test_minidom.py --- a/Lib/test/test_minidom.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_minidom.py Tue Dec 18 20:05:46 2012 +0200 @@ -1085,7 +1085,7 @@ self.assertEqual(doc.toxml('iso-8859-15'), b'\xa4') - # Verify that character decoding errors throw exceptions instead + # Verify that character decoding errors raise exceptions instead # of crashing self.assertRaises(UnicodeDecodeError, parseString, b'Comment \xe7a va ? Tr\xe8s bien ?') diff -r 2ecea81adab0 Lib/test/test_os.py --- a/Lib/test/test_os.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_os.py Tue Dec 18 20:05:46 2012 +0200 @@ -164,33 +164,33 @@ try: result[200] - self.fail("No exception thrown") + self.fail("No exception raised") except IndexError: pass # Make sure that assignment fails try: result.st_mode = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass try: result.st_rdev = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except (AttributeError, TypeError): pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the stat_result constructor with a too-short tuple. try: result2 = os.stat_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass @@ -233,20 +233,20 @@ # Make sure that assignment really fails try: result.f_bfree = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the constructor with a too-short tuple. try: result2 = os.statvfs_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass diff -r 2ecea81adab0 Lib/test/test_pty.py --- a/Lib/test/test_pty.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_pty.py Tue Dec 18 20:05:46 2012 +0200 @@ -152,7 +152,7 @@ # platform-dependent amount of data is written to its fd. On # Linux 2.6, it's 4000 bytes and the child won't block, but on OS # X even the small writes in the child above will block it. Also - # on Linux, the read() will throw an OSError (input/output error) + # on Linux, the read() will raise an OSError (input/output error) # when it tries to read past the end of the buffer but the child's # already exited, so catch and discard those exceptions. It's not # worth checking for EIO. diff -r 2ecea81adab0 Lib/test/test_sax.py --- a/Lib/test/test_sax.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_sax.py Tue Dec 18 20:05:46 2012 +0200 @@ -389,7 +389,7 @@ def test_5027_1(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by parsing a document. @@ -415,7 +415,7 @@ def test_5027_2(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by direct manipulation of the diff -r 2ecea81adab0 Lib/test/test_signal.py --- a/Lib/test/test_signal.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_signal.py Tue Dec 18 20:05:46 2012 +0200 @@ -113,7 +113,7 @@ # This wait should be interrupted by the signal's exception. self.wait(child) time.sleep(1) # Give the signal time to be delivered. - self.fail('HandlerBCalled exception not thrown') + self.fail('HandlerBCalled exception not raised') except HandlerBCalled: self.assertTrue(self.b_called) self.assertFalse(self.a_called) @@ -152,7 +152,7 @@ # test-running process from all the signals. It then # communicates with that child process over a pipe and # re-raises information about any exceptions the child - # throws. The real work happens in self.run_test(). + # raises. The real work happens in self.run_test(). os_done_r, os_done_w = os.pipe() with closing(os.fdopen(os_done_r, 'rb')) as done_r, \ closing(os.fdopen(os_done_w, 'wb')) as done_w: diff -r 2ecea81adab0 Lib/test/test_socketserver.py --- a/Lib/test/test_socketserver.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_socketserver.py Tue Dec 18 20:05:46 2012 +0200 @@ -58,7 +58,7 @@ def simple_subprocess(testcase): pid = os.fork() if pid == 0: - # Don't throw an exception; it would be caught by the test harness. + # Don't raise an exception; it would be caught by the test harness. os._exit(72) yield None pid2, status = os.waitpid(pid, 0) diff -r 2ecea81adab0 Lib/test/test_sys_settrace.py --- a/Lib/test/test_sys_settrace.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_sys_settrace.py Tue Dec 18 20:05:46 2012 +0200 @@ -418,7 +418,7 @@ except ValueError: pass else: - self.fail("exception not thrown!") + self.fail("exception not raised!") except RuntimeError: self.fail("recursion counter not reset") diff -r 2ecea81adab0 Lib/test/test_time.py --- a/Lib/test/test_time.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_time.py Tue Dec 18 20:05:46 2012 +0200 @@ -106,7 +106,7 @@ def test_strptime(self): # Should be able to go round-trip from strftime to strptime without - # throwing an exception. + # raising an exception. tt = time.gmtime(self.t) for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', diff -r 2ecea81adab0 Lib/test/test_uu.py --- a/Lib/test/test_uu.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_uu.py Tue Dec 18 20:05:46 2012 +0200 @@ -80,7 +80,7 @@ out = io.BytesIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error as e: self.assertEqual(str(e), "Truncated input file") @@ -89,7 +89,7 @@ out = io.BytesIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error as e: self.assertEqual(str(e), "No valid begin line found in input file") diff -r 2ecea81adab0 Lib/test/test_winreg.py --- a/Lib/test/test_winreg.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_winreg.py Tue Dec 18 20:05:46 2012 +0200 @@ -245,7 +245,7 @@ def test_changing_value(self): # Issue2810: A race condition in 2.6 and 3.1 may cause - # EnumValue or QueryValue to throw "WindowsError: More data is + # EnumValue or QueryValue to raise "WindowsError: More data is # available" done = False @@ -291,7 +291,7 @@ def test_dynamic_key(self): # Issue2810, when the value is dynamically generated, these - # throw "WindowsError: More data is available" in 2.6 and 3.1 + # raise "WindowsError: More data is available" in 2.6 and 3.1 try: EnumValue(HKEY_PERFORMANCE_DATA, 0) except OSError as e: diff -r 2ecea81adab0 Lib/test/test_zipfile.py --- a/Lib/test/test_zipfile.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_zipfile.py Tue Dec 18 20:05:46 2012 +0200 @@ -873,7 +873,7 @@ with zipfile.ZipFile(data, mode="w") as zipf: zipf.writestr("foo.txt", "O, for a Muse of Fire!") - # This is correct; calling .read on a closed ZipFile should throw + # This is correct; calling .read on a closed ZipFile should raise # a RuntimeError, and so should calling .testzip. An earlier # version of .testzip would swallow this exception (and any other) # and report that the first file in the archive was corrupt. diff -r 2ecea81adab0 Lib/tkinter/__init__.py --- a/Lib/tkinter/__init__.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/tkinter/__init__.py Tue Dec 18 20:05:46 2012 +0200 @@ -147,7 +147,7 @@ pass def _exit(code=0): - """Internal function. Calling it will throw the exception SystemExit.""" + """Internal function. Calling it will raise the exception SystemExit.""" try: code = int(code) except ValueError: diff -r 2ecea81adab0 Lib/unittest/case.py --- a/Lib/unittest/case.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/unittest/case.py Tue Dec 18 20:05:46 2012 +0200 @@ -528,10 +528,10 @@ def assertRaises(self, excClass, callableObj=None, *args, **kwargs): - """Fail unless an exception of class excClass is thrown + """Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is - thrown, it will not be caught, and the test case will be + raised, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception. diff -r 2ecea81adab0 Lib/wsgiref/validate.py --- a/Lib/wsgiref/validate.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/wsgiref/validate.py Tue Dec 18 20:05:46 2012 +0200 @@ -139,9 +139,9 @@ When applied between a WSGI server and a WSGI application, this middleware will check for WSGI compliancy on a number of levels. This middleware does not modify the request or response in any - way, but will throw an AssertionError if anything seems off + way, but will raise an AssertionError if anything seems off (except for a failure to close the application iterator, which - will be printed to stderr -- there's no way to throw an exception + will be printed to stderr -- there's no way to raise an exception at that point). """ diff -r 2ecea81adab0 Lib/xml/sax/_exceptions.py --- a/Lib/xml/sax/_exceptions.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/xml/sax/_exceptions.py Tue Dec 18 20:05:46 2012 +0200 @@ -12,7 +12,7 @@ the application: you can subclass it to provide additional functionality, or to add localization. Note that although you will receive a SAXException as the argument to the handlers in the - ErrorHandler interface, you are not actually required to throw + ErrorHandler interface, you are not actually required to raise the exception; instead, you can simply read the information in it.""" @@ -50,7 +50,7 @@ the original XML document. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required - to throw the exception; instead, it can simply read the + to raise the exception; instead, it can simply read the information in it and take a different action. Since this exception is a subclass of SAXException, it inherits @@ -62,7 +62,7 @@ self._locator = locator # We need to cache this stuff at construction time. - # If this exception is thrown, the objects through which we must + # If this exception is raised, the objects through which we must # traverse to get this information may be deleted by the time # it gets caught. self._systemId = self._locator.getSystemId() diff -r 2ecea81adab0 Lib/xml/sax/xmlreader.py --- a/Lib/xml/sax/xmlreader.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/xml/sax/xmlreader.py Tue Dec 18 20:05:46 2012 +0200 @@ -68,7 +68,7 @@ SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, - however, they must throw a SAX exception. Applications may + however, they must raise a SAX exception. Applications may request a locale change in the middle of a parse.""" raise SAXNotSupportedException("Locale support not implemented") diff -r 2ecea81adab0 Lib/xmlrpc/client.py --- a/Lib/xmlrpc/client.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/xmlrpc/client.py Tue Dec 18 20:05:46 2012 +0200 @@ -800,7 +800,7 @@ class MultiCallIterator: """Iterates over the results of a multicall. Exceptions are - thrown in response to xmlrpc faults.""" + raised in response to xmlrpc faults.""" def __init__(self, results): self.results = results diff -r 2ecea81adab0 Modules/_io/_iomodule.c --- a/Modules/_io/_iomodule.c Sun Dec 16 16:09:11 2012 +0100 +++ b/Modules/_io/_iomodule.c Tue Dec 18 20:05:46 2012 +0200 @@ -59,7 +59,7 @@ "At the top of the I/O hierarchy is the abstract base class IOBase. It\n" "defines the basic interface to a stream. Note, however, that there is no\n" "separation between reading and writing to streams; implementations are\n" -"allowed to throw an IOError if they do not support a given operation.\n" +"allowed to raise an IOError if they do not support a given operation.\n" "\n" "Extending IOBase is RawIOBase which deals simply with the reading and\n" "writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide\n" diff -r 2ecea81adab0 Modules/parsermodule.c --- a/Modules/parsermodule.c Sun Dec 16 16:09:11 2012 +0100 +++ b/Modules/parsermodule.c Tue Dec 18 20:05:46 2012 +0200 @@ -718,7 +718,7 @@ err_string("parse tree does not use a valid start symbol"); } } - /* Make sure we throw an exception on all errors. We should never + /* Make sure we raise an exception on all errors. We should never * get this, but we'd do well to be sure something is done. */ if (st == NULL && !PyErr_Occurred()) @@ -824,7 +824,7 @@ else if (!ISNONTERMINAL(type)) { /* * It has to be one or the other; this is an error. - * Throw an exception. + * Raise an exception. */ PyObject *err = Py_BuildValue("os", elem, "unknown node type."); PyErr_SetObject(parser_error, err); @@ -876,7 +876,7 @@ if (ISTERMINAL(num)) { /* * The tuple is simple, but it doesn't start with a start symbol. - * Throw an exception now and be done with it. + * Raise an exception now and be done with it. */ tuple = Py_BuildValue("os", tuple, "Illegal syntax-tree; cannot start with terminal symbol."); diff -r 2ecea81adab0 Modules/posixmodule.c --- a/Modules/posixmodule.c Sun Dec 16 16:09:11 2012 +0100 +++ b/Modules/posixmodule.c Tue Dec 18 20:05:46 2012 +0200 @@ -349,7 +349,7 @@ #if defined _MSC_VER && _MSC_VER >= 1400 /* Microsoft CRT in VS2005 and higher will verify that a filehandle is - * valid and throw an assertion if it isn't. + * valid and raise an assertion if it isn't. * Normally, an invalid fd is likely to be a C program error and therefore * an assertion can be useful, but it does contradict the POSIX standard * which for write(2) states: diff -r 2ecea81adab0 Tools/scripts/serve.py --- a/Tools/scripts/serve.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Tools/scripts/serve.py Tue Dec 18 20:05:46 2012 +0200 @@ -2,7 +2,7 @@ ''' Small wsgiref based web server. Takes a path to serve from and an optional port number (defaults to 8000), then tries to serve files. -Mime types are guessed from the file names, 404 errors are thrown +Mime types are guessed from the file names, 404 errors are raised if the file is not found. Used for the make serve target in Doc. ''' import sys From zachary.ware at gmail.com Fri Dec 21 18:34:46 2012 From: zachary.ware at gmail.com (Zachary Ware) Date: Fri, 21 Dec 2012 11:34:46 -0600 Subject: [docs] Checking in on a Broken Link on Your Site About Geany and GTK In-Reply-To: References: Message-ID: On Dec 17, 2012 1:20 AM, "Michelle Barton" wrote: > > Hi Administrator, > > I've reported a broken link on your site pythonexperts.com/_sources/using/unix.txt that links to http://geany.uvena.de/ and haven't heard back, so I just wanted to verify whether you're the right person to contact? If not, could you direct me to the person maintaining the website? If you would be interested in updating your website, I have a similar resource that you are more than welcome to use to update. Let me know! > > Link Replacement Option: http://www.onlinecomputersciencedegree.com/resources/geany-and-gtk/ > > Best, > Michelle Barton > Hi Michelle, Please refer to the reply I sent you on November 18th. pythonexperts.com is not affiliated with python.org, and, furthermore, appears to be merely publishing an outdated version of the docs with an advertisement attached. I would encourage you to use docs.python.org/2/ instead. Note that emails sent to docs at python.org, which is a public mailing list for the discussion of docs.python.org, are unlikely to reach whoever runs pythonexperts.com. Thanks, Zach -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Wed Dec 26 16:01:06 2012 From: report at bugs.python.org (Dan Kenigsberg) Date: Wed, 26 Dec 2012 15:01:06 +0000 Subject: [docs] [issue16789] :meth:`quit` links to constants instead of own module Message-ID: <1356534065.91.0.932847817194.issue16789@psf.upfronthosting.co.za> New submission from Dan Kenigsberg: ftplib, poplib and smtplib modules define a "quit" function. But when it is refered by :meth:`quit` in the documentation, a reference to constants.quit is generated. The suggested patch spells out the module-specific "quit" function. ---------- assignee: docs at python components: Documentation files: meth:quit.patch keywords: patch messages: 178222 nosy: danken, docs at python priority: normal severity: normal status: open title: :meth:`quit` links to constants instead of own module type: behavior Added file: http://bugs.python.org/file28445/meth:quit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:43:08 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 26 Dec 2012 15:43:08 +0000 Subject: [docs] [issue16789] :meth:`quit` links to constants instead of own module In-Reply-To: <1356534065.91.0.932847817194.issue16789@psf.upfronthosting.co.za> Message-ID: <1356536588.66.0.394076504055.issue16789@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I take care of this. ---------- assignee: docs at python -> jcea nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:49:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 15:49:23 +0000 Subject: [docs] [issue16789] :meth:`quit` links to constants instead of own module In-Reply-To: <1356534065.91.0.932847817194.issue16789@psf.upfronthosting.co.za> Message-ID: <3YWdsG6l94zRhC@mail.python.org> Roundup Robot added the comment: New changeset 0ffaf1079a7a by Jesus Cea in branch '2.7': Closes #16789: :meth:`quit` links to constants instead of own module http://hg.python.org/cpython/rev/0ffaf1079a7a New changeset 3801ee5d5d73 by Jesus Cea in branch '3.2': Closes #16789: :meth:`quit` links to constants instead of own module http://hg.python.org/cpython/rev/3801ee5d5d73 New changeset b6a9f8fd9443 by Jesus Cea in branch '3.3': MERGE: Closes #16789: :meth:`quit` links to constants instead of own module http://hg.python.org/cpython/rev/b6a9f8fd9443 New changeset 3f7d5c235d82 by Jesus Cea in branch 'default': MERGE: Closes #16789: :meth:`quit` links to constants instead of own module http://hg.python.org/cpython/rev/3f7d5c235d82 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:53:57 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 26 Dec 2012 15:53:57 +0000 Subject: [docs] [issue16789] :meth:`quit` links to constants instead of own module In-Reply-To: <1356534065.91.0.932847817194.issue16789@psf.upfronthosting.co.za> Message-ID: <1356537237.54.0.356303723743.issue16789@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Thanks!. ---------- _______________________________________ Python tracker _______________________________________ From senthil at uthcode.com Wed Dec 26 17:59:12 2012 From: senthil at uthcode.com (Senthil Kumaran) Date: Wed, 26 Dec 2012 08:59:12 -0800 Subject: [docs] test_urlwithfrag failed on Python 3.3 In-Reply-To: <20121219184714.IJBFC.501.root@cdptpa-web11-z01> References: <20121219184714.IJBFC.501.root@cdptpa-web11-z01> Message-ID: The test to run would be: ./python Lib/test/test_urllib2net.py Could you run that and see if all is well? You could also unset HTTP_PROXY and unset HTTPS_PROXY if that matters. On Wed, Dec 19, 2012 at 10:47 AM, wrote: > ./python -m test -v test_urlwithfrag -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Wed Dec 26 19:14:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 18:14:38 +0000 Subject: [docs] [issue16413] Non cross-platform behavior of os.path.split In-Reply-To: <1352114668.34.0.500502059895.issue16413@psf.upfronthosting.co.za> Message-ID: <1356545678.18.0.518122448955.issue16413@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From andrew.svetlov at gmail.com Wed Dec 26 20:22:58 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Wed, 26 Dec 2012 21:22:58 +0200 Subject: [docs] bug in range function in python 3.2-3.3 In-Reply-To: References: Message-ID: Hi. In python3 range() call returns iterablerange object, not list. On Sun, Dec 23, 2012 at 12:59 PM, Rahul wrote: > Hi, > > I am Rahul. This is my first letter to you. I have been tinkering with > 'Python' from days of ver2.2. Though I am not any professional programmer > yet I like this Language & like to play with it. Recently I downloaded the > latest ver3.2 on my machine which runs on "Linux" while I was writing a > program. I noticed that one of my function was misbehaving as I ran the > program again & again, discovered that the built in function "range()" was > not doing what it was supposed to do. Forcing me to revert back to "Python > ver2.7x". > I tried both of your versions 3.3 on 'windows' & 3.2 on 'Mint Linux'. I > noticed the same bug. I don't know any intricacies of python but things > worked just right after falling back to older version. As this is a basic > function I thought worth of reporting it. > What it normally does is generate a 'list' within the bound range of > mentioned arguments. While older versions(2.7x) had no problem & worked fine > but newer versions(3.2-3.3) did not. > This is normal output of the function, > > >>> range(5) > >>> [0, 1, 2, 3, 4] > > but later version does it like this, > > >>> range(5) > >>> [1,5] > What is that? > Even better, > > >>> range(1,5,1) > >>> range(1,5) # that is the actual output of > interpreter. > > I tried this on two different machines & in different OSes (Windows/ > windows7/ mint Linux). Showing same results. I also tried in 'IDLE' & > 'command line' but to no avail. > > May be I don't know if there are any additional libraries have been > added & I need to import them. > I would be very obliged if you people can point out the mistake & guide > me, or if it is really a bug I would like it to be gone. This a really an > easy to learn, yet powerful OOP based language. I like to see it grow & > remain that way. > > Thankfully, > > Rahul > rahulkay at hotmail.com > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs -- Thanks, Andrew Svetlov From andrew.svetlov at gmail.com Wed Dec 26 20:36:33 2012 From: andrew.svetlov at gmail.com (Andrew Svetlov) Date: Wed, 26 Dec 2012 21:36:33 +0200 Subject: [docs] Minor Typo on Copy Module Documentation In-Reply-To: References: Message-ID: Don't understand your change clean. On Mon, Dec 17, 2012 at 9:45 PM, Nick Garvey wrote: > http://docs.python.org/2/library/copy.html > http://docs.python.org/3/library/copy.html > > The line > > "Because deep copy copies everything it may copy too much, e.g., > administrative data structures that should be shared even between copies." > > should read > > "Because deep copy copies everything it may copy too much, e.g., > administrative data structures that shouldn't be shared even between > copies." > > Thanks, > Nick Garvey > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- Thanks, Andrew Svetlov From report at bugs.python.org Thu Dec 27 10:48:01 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Thu, 27 Dec 2012 09:48:01 +0000 Subject: [docs] [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance In-Reply-To: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> Message-ID: <1356601681.62.0.964045973414.issue15840@psf.upfronthosting.co.za> Hynek Schlawack added the comment: I agree that standardize behavior here would be useful. But it sounds like a candidate for 3.4. Unifying/changing it for existing releases appears rather hairy to me? ---------- assignee: docs at python -> type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:05:03 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Thu, 27 Dec 2012 10:05:03 +0000 Subject: [docs] [issue14870] Descriptions of os.utime() and os.utimensat() use wrong notation In-Reply-To: <1337601006.45.0.685713178373.issue14870@psf.upfronthosting.co.za> Message-ID: <1356602703.78.0.299118128065.issue14870@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Turns out, Larry fixed these two while working on #14626. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 18:27:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 17:27:27 +0000 Subject: [docs] [issue16682] Document that audioop works with bytes, not strings In-Reply-To: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> Message-ID: <1356629247.62.0.191912715708.issue16682@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 19:51:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 18:51:01 +0000 Subject: [docs] [issue16682] Document that audioop works with bytes, not strings In-Reply-To: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> Message-ID: <3YXKrN6GzQzQxk@mail.python.org> Roundup Robot added the comment: New changeset cd2b4074a2d9 by Serhiy Storchaka in branch '3.2': Issue #16682: Replace "Python string" to "bytes object" in audioop documentation. http://hg.python.org/cpython/rev/cd2b4074a2d9 New changeset e8248e597060 by Serhiy Storchaka in branch '3.3': Issue #16682: Replace "Python string" to "bytes object" in audioop documentation. http://hg.python.org/cpython/rev/e8248e597060 New changeset f68aeab64356 by Serhiy Storchaka in branch 'default': Issue #16682: Replace "Python string" to "bytes object" in audioop documentation. http://hg.python.org/cpython/rev/f68aeab64356 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 19:54:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 18:54:15 +0000 Subject: [docs] [issue16682] Document that audioop works with bytes, not strings In-Reply-To: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> Message-ID: <1356634455.69.0.0641874307064.issue16682@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 19:56:46 2012 From: report at bugs.python.org (vertograd phrokhladny) Date: Thu, 27 Dec 2012 18:56:46 +0000 Subject: [docs] [issue16794] Can't get a list of modules in Python's help system Message-ID: <1356634606.34.0.441472301894.issue16794@psf.upfronthosting.co.za> New submission from vertograd phrokhladny: Ubuntu 12.4 LTS ---------- assignee: docs at python components: Documentation files: modules_command_crash.log messages: 178310 nosy: docs at python, vertograd.phrokhladny priority: normal severity: normal status: open title: Can't get a list of modules in Python's help system type: crash versions: Python 2.7 Added file: http://bugs.python.org/file28460/modules_command_crash.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 20:07:07 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 27 Dec 2012 19:07:07 +0000 Subject: [docs] [issue16794] Can't get a list of modules in Python's help system In-Reply-To: <1356634606.34.0.441472301894.issue16794@psf.upfronthosting.co.za> Message-ID: <1356635227.67.0.572870359389.issue16794@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of issue 10060, and as indicated there there really isn't much Python can do about this. You should report the bug to Ubuntu, but I'm pretty sure there is already a bug in their system for it (which I believe has been fixed). ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> python.exe crashes or hangs on help() modules when bad modules found _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:15:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:15:50 +0000 Subject: [docs] [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1356639350.0.0.100464035308.issue11908@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: commit review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:51:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 21:51:30 +0000 Subject: [docs] [issue16642] Mention new "kwargs" named tuple parameter in sched module In-Reply-To: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> Message-ID: <1356645090.2.0.522982217777.issue16642@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Thu Dec 27 22:53:33 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 27 Dec 2012 22:53:33 +0100 Subject: [docs] Python on Windows 8 In-Reply-To: <7A357067D884D748B006069198ED108B03C98EFB@S-EX2010-0001.mcc.local> References: <7A357067D884D748B006069198ED108B03C98EFB@S-EX2010-0001.mcc.local> Message-ID: Hello Dennis, this mailing list is about bugs/enhancements to CPython documentation, and your email doesn't fit this description. I'd suggest to contact a user support forum, such as http://mail.python.org/mailman/listinfo/python-list Regards, Sandro On Wed, Dec 19, 2012 at 10:29 PM, Benincasa, Dennis wrote: > I am trying to get Python 3.2 or 3.3 installed on Windows 8. The command > line interface will work but not the GUI. You have any ideas how I can get > it to work? > > Thanks > > Dennis Benincasa > > Macomb Community College > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Fri Dec 28 00:57:45 2012 From: report at bugs.python.org (Michael Schurter) Date: Thu, 27 Dec 2012 23:57:45 +0000 Subject: [docs] [issue16796] Fix argparse docs typo: "an special action" to "a special action" In-Reply-To: <1356652657.93.0.879833521932.issue16796@psf.upfronthosting.co.za> Message-ID: <1356652665.24.0.41790510803.issue16796@psf.upfronthosting.co.za> Changes by Michael Schurter : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:00:54 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Dec 2012 00:00:54 +0000 Subject: [docs] [issue16796] Fix argparse docs typo: "an special action" to "a special action" In-Reply-To: <1356652657.93.0.879833521932.issue16796@psf.upfronthosting.co.za> Message-ID: <3YXSjx57bKzNvj@mail.python.org> Roundup Robot added the comment: New changeset c1623a032adf by Ezio Melotti in branch '2.7': #16796: fix typo. Patch by Michael Schurter. http://hg.python.org/cpython/rev/c1623a032adf New changeset f348a3110a85 by Ezio Melotti in branch '3.2': #16796: fix typo. Patch by Michael Schurter. http://hg.python.org/cpython/rev/f348a3110a85 New changeset 1e35d1f514b3 by Ezio Melotti in branch '3.3': #16796: merge with 3.2. http://hg.python.org/cpython/rev/1e35d1f514b3 New changeset 07421f9fcfb0 by Ezio Melotti in branch 'default': #16796: merge with 3.3. http://hg.python.org/cpython/rev/07421f9fcfb0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:01:26 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 28 Dec 2012 00:01:26 +0000 Subject: [docs] [issue16796] Fix argparse docs typo: "an special action" to "a special action" In-Reply-To: <1356652657.93.0.879833521932.issue16796@psf.upfronthosting.co.za> Message-ID: <1356652886.07.0.486939333719.issue16796@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:49:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 19:49:46 +0000 Subject: [docs] [issue16642] Mention new "kwargs" named tuple parameter in sched module In-Reply-To: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> Message-ID: <1356724186.1.0.876178700594.issue16642@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What anyone can say about this doc changes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:52:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 28 Dec 2012 19:52:21 +0000 Subject: [docs] [issue16642] Mention new "kwargs" named tuple parameter in sched module In-Reply-To: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> Message-ID: <1356724341.27.0.93465238181.issue16642@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM. ---------- nosy: +ezio.melotti, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:12:05 2012 From: report at bugs.python.org (vertograd phrokhladny) Date: Fri, 28 Dec 2012 20:12:05 +0000 Subject: [docs] [issue16794] Can't get a list of modules in Python's help system In-Reply-To: <1356635227.67.0.572870359389.issue16794@psf.upfronthosting.co.za> Message-ID: vertograd phrokhladny added the comment: Re: 2012/12/27 R. David Murray > > R. David Murray added the comment: > > This is a duplicate of issue 10060, and as indicated there there really > isn't much Python can do about this. You should report the bug to Ubuntu, > but I'm pretty sure there is already a bug in their system for it (which I > believe has been fixed). > > Thanks for your comment. I've looked through that very continuous thread (issue 10060) and than went to Ubuntu.You're right , there's bug #896836 (and several duplicates) reported on 2011-11-27 (for Oneiric) with confirmed status. As I understood from recommended reading the segmentation fault occurs because of the conflict between loading dynamic and static bindings in C based modules.Unfortunately there's no fix for it yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:00:20 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 00:00:20 +0000 Subject: [docs] [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356739220.85.0.384771041255.issue16781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is at most a further doc clarification issue as the code is working as documented. In a previous issue, I added the following sentence to all current versions to try to clarify this type of behavior: " If exec gets two separate objects as globals and locals, the code will be executed as if it were embedded in a class definition." (This follows " Remember that at module level, globals and locals are the same dictionary") Let's try it: class Dummy: from ctypes import wintypes print(wintypes.LONG) class LOGFONT(object): field = wintypes.LONG >>> Traceback (most recent call last): ... File "F:\Python\mypy\tem.py", line 6, in LOGFONT field = wintypes.LONG NameError: name 'wintypes' is not defined Bingo! Anatoly's result is just as documented. The doc later says "modifications to the default locals dictionary should not be attempted." Anatoly's result is an example of why not. Lets distill the situation: 1. The globals dict and locals mapping passed to exec are either the same object or different objects. This relation determines the execution behavior. 2. If they are the same object, the code is executed as if at module scope. They are the same if exec is called with both defaults at module scope, where globals() is locals(), or if they are explicitly made the same ("globals = locals()", "locals = globals()", or "globals=dic, locals=dic"). 3. If they are different objects, the code is executed as if embedded in a (dummy) class definition. They are different if exec is called with both defaults within a class or function scope*, where globals() is not locals(), or if explicit settings leave them different ("globals = dic" where dic is not locals(), "locals=map", where map is not globals, or "globals=dic, locals=map", where dic is not map). I believe this nails the situation#. * In 2.x, comprehensions do not create a function scope, but in 3.x, they do. Lambda expressions always do. This is why I did not write 'within a class or function definition', as some might not see that as including comprehensions. # The new last sentence of the second paragraph, quoted above, contradicts the older first sentence: "In all cases, if the optional parts are omitted, the code is executed in the current scope." Before 2.2, when the 'current scope' of a function was limited to global and local namespaces, that sentence was true. Indeed, it summarized points 1,2,3 above. I believe that it is not true now, and should be revised, as nonlocal namespaces cannot be seen by exec'ed code. I believe I checked that before adding the new sentence, but I would recheck before revising. I am thinking about how to perhaps rewrite the paragraph. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, terry.reedy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:03:56 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 00:03:56 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive Message-ID: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> New submission from Tshepang Lekhonkhobe: I am running Debian 7, which has sphinx is1.1.3+dfsg-4. When I run $ python tools/sphinx-build.py -bhtml . build/ I get a whole bunch of errors: Making output directory... Running Sphinx v1.1.3 loading pickled environment... not yet created building [html]: targets for 435 source files that are out of date updating environment: 435 added, 0 changed, 0 removed reading sources... [100%] whatsnew/index /home/wena/src/python/cpython/Doc/c-api/arg.rst:47: ERROR: Error in "note" directive: invalid option block. .. note:: For all ``#`` variants of formats (``s#``, ``y#``, etc.), the type of the length argument (int or :c:type:`Py_ssize_t`) is controlled by defining the macro :c:macro:`PY_SSIZE_T_CLEAN` before including :file:`Python.h`. If the macro was defined, length is a :c:type:`Py_ssize_t` rather than an :c:type:`int`. This behavior will change in a future Python version to only support :c:type:`Py_ssize_t` and drop :c:type:`int` support. It is best to always define :c:macro:`PY_SSIZE_T_CLEAN`. /home/wena/src/python/cpython/Doc/c-api/init.rst:547: ERROR: Error in "note" directive: invalid option block. .. note:: When only the main thread exists, no GIL operations are needed. This is a common situation (most Python programs do not use threads), and the lock operations slow the interpreter down a bit. Therefore, the lock is not created initially. This situation is equivalent to having acquired the lock: when there is only a single thread, all object accesses are safe. Therefore, when this function initializes the global interpreter lock, it also acquires it. Before the Python :mod:`_thread` module creates a new thread, knowing that either it has the lock or the lock hasn't been created yet, it calls :c:func:`PyEval_InitThreads`. When this call returns, it is guaranteed that the lock has been created and that the calling thread has acquired it. It is **not** safe to call this function when it is unknown which thread (if any) currently has the global interpreter lock. This function is not available when thread support is disabled at compile time. /home/wena/src/python/cpython/Doc/faq/library.rst:513: ERROR: Error in "note" directive: invalid option block. .. note:: To read and write binary data, it is mandatory to open the file in binary mode (here, passing ``"rb"`` to :func:`open`). If you use ``"r"`` instead (the default), the file will be open in text mode and ``f.read()`` will return :class:`str` objects rather than :class:`bytes` objects. /home/wena/src/python/cpython/Doc/library/fractions.rst:93: ERROR: Error in "note" directive: invalid option block. .. note:: From Python 3.2 onwards, you can also construct a :class:`Fraction` instance directly from a :class:`float`. /home/wena/src/python/cpython/Doc/library/fractions.rst:102: ERROR: Error in "note" directive: invalid option block. .. note:: From Python 3.2 onwards, you can also construct a :class:`Fraction` instance directly from a :class:`decimal.Decimal` instance. /home/wena/src/python/cpython/Doc/library/getopt.rst:12: ERROR: Error in "note" directive: invalid option block. .. note:: The :mod:`getopt` module is a parser for command line options whose API is designed to be familiar to users of the C :c:func:`getopt` function. Users who are unfamiliar with the C :c:func:`getopt` function or who would like to write less code and get better help and error messages should consider using the :mod:`argparse` module instead. /home/wena/src/python/cpython/Doc/library/io.rst:678: ERROR: Error in "warning" directive: invalid option block. .. warning:: :class:`BufferedRWPair` does not attempt to synchronize accesses to its underlying raw streams. You should not pass it the same object as reader and writer; use :class:`BufferedRandom` instead. /home/wena/src/python/cpython/Doc/library/logging.config.rst:144: ERROR: Error in "note" directive: invalid option block. .. note:: Because portions of the configuration are passed through :func:`eval`, use of this function may open its users to a security risk. While the function only binds to a socket on ``localhost``, and so does not accept connections from remote machines, there are scenarios where untrusted code could be run under the account of the process which calls :func:`listen`. Specifically, if the process calling :func:`listen` runs on a multi-user machine where users cannot trust each other, then a malicious user could arrange to run essentially arbitrary code in a victim user's process, simply by connecting to the victim's :func:`listen` socket and sending a configuration which runs whatever code the attacker wants to have executed in the victim's process. This is especially easy to do if the default port is used, but not hard even if a different port is used). To avoid the risk of this happening, use the ``verify`` argument to :func:`listen` to prevent unrecognised configurations from being applied. /home/wena/src/python/cpython/Doc/library/logging.config.rst:747: ERROR: Error in "note" directive: invalid option block. .. note:: Due to the use of :func:`eval` as described above, there are potential security risks which result from using the :func:`listen` to send and receive configurations via sockets. The risks are limited to where multiple users with no mutual trust run code on the same machine; see the :func:`listen` documentation for more information. /home/wena/src/python/cpython/Doc/library/os.rst:263: ERROR: Error in "note" directive: invalid option block. .. note:: On Mac OS X, :func:`getgroups` behavior differs somewhat from other Unix platforms. If the Python interpreter was built with a deployment target of :const:`10.5` or earlier, :func:`getgroups` returns the list of effective group ids associated with the current user process; this list is limited to a system-defined number of entries, typically 16, and may be modified by calls to :func:`setgroups` if suitably privileged. If built with a deployment target greater than :const:`10.5`, :func:`getgroups` returns the current group access list for the user associated with the effective user id of the process; the group access list may change over the lifetime of the process, it is not affected by calls to :func:`setgroups`, and its length is not limited to 16. The deployment target value, :const:`MACOSX_DEPLOYMENT_TARGET`, can be obtained with :func:`sysconfig.get_config_var`. /home/wena/src/python/cpython/Doc/library/pkgutil.rst:148: ERROR: Error in "note" directive: invalid option block. .. note:: Only works for a :term:`finder` which defines an ``iter_modules()`` method. This interface is non-standard, so the module also provides implementations for :class:`importlib.machinery.FileFinder` and :class:`zipimport.zipimporter`. /home/wena/src/python/cpython/Doc/library/pkgutil.rst:186: ERROR: Error in "note" directive: invalid option block. .. note:: Only works for a :term:`finder` which defines an ``iter_modules()`` method. This interface is non-standard, so the module also provides implementations for :class:`importlib.machinery.FileFinder` and :class:`zipimport.zipimporter`. /home/wena/src/python/cpython/Doc/library/socket.rst:728: ERROR: Error in "note" directive: invalid option block. .. note:: :meth:`close()` releases the resource associated with a connection but does not necessarily close the connection immediately. If you want to close the connection in a timely fashion, call :meth:`shutdown()` before :meth:`close()`. /home/wena/src/python/cpython/Doc/library/ssl.rst:609: ERROR: Error in "note" directive: invalid option block. .. note:: To validate a certificate for a particular service, you can use the :func:`match_hostname` function. /home/wena/src/python/cpython/Doc/library/sys.rst:245: ERROR: Error in "note" directive: invalid option block. .. note:: If a :ref:`virtual environment ` is in effect, this value will be changed in ``site.py`` to point to the virtual environment. The value for the Python installation will still be available, via :data:`base_exec_prefix`. /home/wena/src/python/cpython/Doc/library/test.rst:201: ERROR: Error in "note" directive: invalid option block. .. note:: :mod:`test.support` is not a public module. It is documented here to help Python developers write tests. The API of this module is subject to change without backwards compatibility concerns between releases. looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] whatsnew/index writing additional files... genindex py-modindex search download index opensearch copying images... [100%] library/turtle-star.png copying static files... done dumping search index... done dumping object inventory... done build succeeded, 16 warnings. ---------- assignee: docs at python components: Documentation messages: 178443 nosy: docs at python, tshepang priority: normal severity: normal status: open title: when building docs on Debian 7 --> ERROR: Error in "note" directive versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:40:00 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sat, 29 Dec 2012 00:40:00 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356741600.75.0.313132418006.issue16805@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hello Tshepang, the documentation is not compatible with Sphinx versions different than the one the Makefile will download (in this case it's 1.0.7 for all active branches). I'd suggest to build the doc with just $ make -C Doc html and it will fetch the needed modules (at the correct version) and build the html version of the documentation in Doc/build/html/. I'm inclined to close this issue as invalid, but I'd like to hear from your first. Regards, Sandro ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:26:47 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Dec 2012 01:26:47 +0000 Subject: [docs] [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356744379.85.0.560416939649.issue16781@psf.upfronthosting.co.za> R. David Murray added the comment: It looks like you are correct Terry. The problem, I think, is that the behavior of name spaces inside a class definition is probably the least intuitive aspect of python scoping, so that sentence, while technically complete, doesn't provide enough guidance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:33:41 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 01:33:41 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356741600.75.0.313132418006.issue16805@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: It is my preference to be able to build all of CPython with the already-installed distro packages, instead of pulling in foreign ones. Any reason why not use later versions? Can't the docs be written such that they can run on various versions of these tools anyway? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:41:48 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 02:41:48 +0000 Subject: [docs] [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance In-Reply-To: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> Message-ID: <1356748908.47.0.663220621743.issue15840@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:34:36 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 29 Dec 2012 03:34:36 +0000 Subject: [docs] [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance In-Reply-To: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> Message-ID: <1356752075.98.0.0427100810977.issue15840@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Agree with you, Hynek. It should be fixed in 3.4 only (and change should be well documented). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 05:45:39 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 04:45:39 +0000 Subject: [docs] [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356756339.72.0.116060261021.issue16781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I suppose you could say that I kicked that particular can over to the class doc ;-). The fundamental problem with exec is that it is at least as complicated as Python, since it executes any legal python code, and in fact is even more complicated* because there are various possible relationships with the calling context. Moreover, it always returns None, so that *any* effect is a side-effect, which tends to be 'magical'. * For one thing, people can write and run normal python code without knowing that a = b (and other binding statements, like import) at module scope means locals()['a'] rather than globals()['a']. At module scope, there are the same because globals() is locals(). Within exec'ed code, they may not be the same thing even for 'top level' code. This is exactly what tripped up Anatoly in his example with the import. I am thinking that a short How To Exec() might be a good idea, since a real explanation is too much for even a half-page entry in the built-ins chapter. Note: the following doc statement "Be aware that the return and yield statements may not be used outside of function definitions" needs to have nonlocal added. >>> nonlocal a SyntaxError: nonlocal declaration not allowed at module level >>> exec('nonlocal a') Traceback (most recent call last): File "", line 1, in exec('nonlocal a') File "", line None SyntaxError: nonlocal declaration not allowed at module level >>> def f(): exec('nonlocal a') f() ... SyntaxError: nonlocal declaration not allowed at module level This again points to why exec can be confusing. compile() considers the string it compiles to be top-level code without any surrounding context. However, exec() enables one to run 'top level' code with different globals and locals. There is no exact precedent for this in normal operation. The closest is execution of code within a class statement (before the type(name, dic, bases) part). But even that is not absolutely the same for nonlocal (though this could be the only exception ;-). >>> >>> class C: nonlocal a SyntaxError: no binding for nonlocal 'a' found A different error here (arguably not the best) -- the same as >>> def f(): nonlocal a SyntaxError: no binding for nonlocal 'a' found ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 06:58:19 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 29 Dec 2012 05:58:19 +0000 Subject: [docs] [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356760699.19.0.214695340403.issue16781@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 07:54:21 2012 From: report at bugs.python.org (Glenn Linderman) Date: Sat, 29 Dec 2012 06:54:21 +0000 Subject: [docs] [issue16810] inconsistency in weekday Message-ID: <1356764061.7.0.32287825168.issue16810@psf.upfronthosting.co.za> New submission from Glenn Linderman: Docs say: date.timetuple() Return a time.struct_time such as returned by time.localtime(). The hours, minutes and seconds are 0, and the DST flag is -1. d.timetuple() is equivalent to time.struct_time((d.year, d.month, d.day, 0, 0, 0, d.weekday(), yday, -1)), where yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1 is the day number within the current year starting with 1 for January 1st. However, timetuple's 7th element has a range of 0-6 where 0 is Sunday, and d.weekday has a range of 0-6 where 0 is Monday. So the claim of equivalence is false. "d.weekday()" in the above could be replaced by "( d.weekday() + 1 ) % 7" I guess datetime consistently uses 0==Monday, and weeks starting on Monday, except for the timetuple (which probably has compatibility constraints which force it to return a different value, which I consider to be more correct). ---------- assignee: docs at python components: Documentation messages: 178477 nosy: docs at python, v+python priority: normal severity: normal status: open title: inconsistency in weekday versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 09:10:08 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 29 Dec 2012 08:10:08 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356768608.74.0.768872922572.issue16805@psf.upfronthosting.co.za> Georg Brandl added the comment: In this case it's more of a docutils version problem, I would guess. Tshepang, can you find out your docutils version? But "proper" use of the note directive is with an empty line, so we should fix these instances anyway. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 13:42:16 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 12:42:16 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356768608.74.0.768872922572.issue16805@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: docutils 0.8.1-8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 13:57:52 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sat, 29 Dec 2012 12:57:52 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: Message-ID: Sandro Tosi added the comment: On Sat, Dec 29, 2012 at 4:33 AM, Tshepang Lekhonkhobe wrote: > It is my preference to be able to build all of CPython with the > already-installed distro packages, instead of pulling in foreign ones. IMO, I think with a project as bit as CPython, you should leave you personal preferences apart and use (as much as possible) the tools the project has decided to use: having a consistent set of tools to build doc across everyone/everything (like auto-build doc machines) trying to generate the doc is the proper way to handle it. > Any reason why not use later versions? no-one has done the work of testing, preparation and migration: do you volunteer? :) > Can't the docs be written such > that they can run on various versions of these tools anyway? Not always, but of course, as Georg said, if for note directive we can have a syntax working with current and higher versions of sphinx/docutils, that's ok to do it. I only think that using a non-standard set of doc-build-tools is to be discouraged, and sticking to what Makefile will fetch is the proper way to build the doc and contribute to it. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:07:06 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 13:07:06 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: Message-ID: Tshepang Lekhonkhobe added the comment: > no-one has done the work of testing, preparation and migration: do you > volunteer? :) What needs doing exactly? I would volunteer if guided. I normally build with the Debian-provided tools, and the docs look good, all but those note directive errors. Also, can I submit a patch that adds the missing newlines, or will some committer take care of it, or does this need further discussion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:23:01 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sat, 29 Dec 2012 13:23:01 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: Message-ID: Sandro Tosi added the comment: On Sat, Dec 29, 2012 at 4:07 PM, Tshepang Lekhonkhobe wrote: >> no-one has done the work of testing, preparation and migration: do you >> volunteer? :) > > What needs doing exactly? I would volunteer if guided. I normally (you always can't expect to be guided) it's not much more than - update sphinx (and the other tools it depends on, if needed). - fix what's broken or what needs updating - verify the doc is ok for any supported branches. > Also, can I submit a patch that adds the missing newlines, or will > some committer take care of it, or does this need further discussion? it won't hurt to have a patch. But please build the doc it with the CPython selected tools before submitting the patch, and verifying the doc sections you've changed are still ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 15:05:58 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 14:05:58 +0000 Subject: [docs] [issue16813] use paths relative to CPython root Message-ID: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> New submission from Tshepang Lekhonkhobe: I think it's a good idea to simply list the 'full' path. ---------- assignee: docs at python components: Devguide, Documentation files: use-paths-relative-to-root.diff keywords: patch messages: 178494 nosy: docs at python, ezio.melotti, tshepang priority: normal severity: normal status: open title: use paths relative to CPython root Added file: http://bugs.python.org/file28479/use-paths-relative-to-root.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:27:23 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 15:27:23 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356794843.26.0.553083533701.issue16805@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: I have tested the attached patch using official tools (make -C Doc html) and the only differences, between before and after, are: * The genindex files, where some of the keywords that are duplicated in the documentation would end up getting randomly swapped around. An example is "DEDENT token", which appears twice in the documentation (see http://docs.python.org/3/genindex-D.html). In its case, the 1st url points to where the 2nd url used to point and vice versa. * objects.inv: related to genindex changes? * searchindex.js: also related to genindex changes? I suspect these differences do not matter though, since these are just indexes. ---------- keywords: +patch Added file: http://bugs.python.org/file28481/remove-directives-warnings.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:43:05 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Dec 2012 15:43:05 +0000 Subject: [docs] [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <1356795785.22.0.0602457151982.issue16813@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the suggestion, but the context is that you are in the Doc directory in order to run make, so I think the existing documentation is preferable. I'd let George decide, though. ---------- nosy: +georg.brandl, r.david.murray title: use paths relative to CPython root -> use paths relative to CPython root in documentation building instructions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:52:07 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 15:52:07 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356796327.54.0.484754818829.issue16805@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: The previous patch applies cleanly to 3.3 and 3.4. I am now attaching one that applies cleanly to 3.2. ---------- versions: +Python 3.3 Added file: http://bugs.python.org/file28482/remove-directives-warnings-3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:59:07 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 15:59:07 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356796747.11.0.649329107828.issue16805@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: And this one patch applies to 2.7. ---------- versions: +Python 2.7, Python 3.2 Added file: http://bugs.python.org/file28483/remove-directives-warnings-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 18:50:14 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 29 Dec 2012 17:50:14 +0000 Subject: [docs] [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <1356803414.83.0.455091860576.issue16813@psf.upfronthosting.co.za> Georg Brandl added the comment: Fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 18:52:08 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 29 Dec 2012 17:52:08 +0000 Subject: [docs] [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356803528.83.0.35607756781.issue16805@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:33:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 18:33:33 +0000 Subject: [docs] [issue16810] inconsistency in weekday In-Reply-To: <1356764061.7.0.32287825168.issue16810@psf.upfronthosting.co.za> Message-ID: <1356806013.39.0.507323491041.issue16810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I?don't see a difference. $ ./python -c 'import time; print(time.localtime())' time.struct_time(tm_year=2012, tm_mon=12, tm_mday=29, tm_hour=19, tm_min=36, tm_sec=35, tm_wday=5, tm_yday=364, tm_isdst=0) $ ./python -c 'import datetime; print(datetime.date.today().timetuple())' time.struct_time(tm_year=2012, tm_mon=12, tm_mday=29, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=5, tm_yday=364, tm_isdst=-1) Can you please provide a full code which demonstrate a problem? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:53:21 2012 From: report at bugs.python.org (Glenn Linderman) Date: Sat, 29 Dec 2012 18:53:21 +0000 Subject: [docs] [issue16810] inconsistency in weekday In-Reply-To: <1356764061.7.0.32287825168.issue16810@psf.upfronthosting.co.za> Message-ID: <1356807201.52.0.743549146686.issue16810@psf.upfronthosting.co.za> Glenn Linderman added the comment: Thanks for the response, Serhiy. I misreported, but there is still a bug in this area, it seems. Attached is some code. I was printing out (too) many values from datetime to learn how it worked. I got confused on which ones were printed in which order. The attached code reduces the number of values printed to just those that should be consistent, but according to the docs, aren't. However, now that I figured out which ones were printed by which code, I no longer find a discrepancy between code and documentation, just a confusing interface whereby weekday can be obtained in three different forms. ---------- Added file: http://bugs.python.org/file28485/t38.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:54:37 2012 From: report at bugs.python.org (Glenn Linderman) Date: Sat, 29 Dec 2012 18:54:37 +0000 Subject: [docs] [issue16810] inconsistency in weekday In-Reply-To: <1356764061.7.0.32287825168.issue16810@psf.upfronthosting.co.za> Message-ID: <1356807277.69.0.363768934346.issue16810@psf.upfronthosting.co.za> Changes by Glenn Linderman : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:00:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 19:00:47 +0000 Subject: [docs] [issue16642] Mention new "kwargs" named tuple parameter in sched module In-Reply-To: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> Message-ID: <3YYYyk43kgzRrs@mail.python.org> Roundup Robot added the comment: New changeset 5db0833f135b by Serhiy Storchaka in branch '3.3': Issue #16642: Document kwargs field in sched.Event named tuple. http://hg.python.org/cpython/rev/5db0833f135b New changeset cf6425df1cb8 by Serhiy Storchaka in branch 'default': Issue #16642: Document kwargs field in sched.Event named tuple. http://hg.python.org/cpython/rev/cf6425df1cb8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:51:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 19:51:07 +0000 Subject: [docs] [issue16642] Mention new "kwargs" named tuple parameter in sched module In-Reply-To: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> Message-ID: <1356810667.26.0.446035105548.issue16642@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:01:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 20:01:38 +0000 Subject: [docs] [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <3YYbJy0Wf6zRwT@mail.python.org> Roundup Robot added the comment: New changeset 20333d160f4e by Chris Jerdonek in branch 'default': Issue #16813: Use the full relative path in the documentation-building instructions. http://hg.python.org/devguide/rev/20333d160f4e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:07:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Dec 2012 20:07:32 +0000 Subject: [docs] [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <1356811652.1.0.918241725051.issue16813@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the patch. Out of curiosity, does anyone know if the following works on all or most systems? $ open _build/html/index.html That could also be added to save time for people that don't already know. ---------- nosy: +chris.jerdonek resolution: -> fixed stage: -> patch review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:12:31 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sat, 29 Dec 2012 20:12:31 +0000 Subject: [docs] [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356811652.1.0.918241725051.issue16813@psf.upfronthosting.co.za> Message-ID: Sandro Tosi added the comment: > Out of curiosity, does anyone know if the following works on all or most systems? > > $ open _build/html/index.html it doesn't work on my Debian system: $ open _build/html/index.html Couldn't get a file descriptor referring to the console as open is a link to "openvt - start a program on a new virtual terminal (VT)." ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:23:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Dec 2012 20:23:58 +0000 Subject: [docs] [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <1356812638.66.0.51201728407.issue16813@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks. Btw, it works for me on Mac OS X I believe out of the box: Help: Open opens files from a shell. By default, opens each file using the default application for that file. If the file is in the form of a URL, the file will be opened as a URL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:26:31 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 20:26:31 +0000 Subject: [docs] [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356812638.66.0.51201728407.issue16813@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: The Linux (and Unix?) equivalent is xdg-open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:41:06 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 29 Dec 2012 20:41:06 +0000 Subject: [docs] [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <1356813666.49.0.856565603524.issue16813@psf.upfronthosting.co.za> Ezio Melotti added the comment: FTR there's also "make htmlview" that already opens a browser to the index of the locally built docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:47:53 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 20:47:53 +0000 Subject: [docs] [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356813666.49.0.856565603524.issue16813@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: Nice. Didn't know about that one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:11:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 21:11:31 +0000 Subject: [docs] [issue16782] No curses.initwin: Incorrect package docstring for curses In-Reply-To: <1356490142.44.0.537785717498.issue16782@psf.upfronthosting.co.za> Message-ID: <3YYcsZ4VF4zP0M@mail.python.org> Roundup Robot added the comment: New changeset cbee422ca727 by Andrew Svetlov in branch '3.2': Fix docstring in curses (#16782) http://hg.python.org/cpython/rev/cbee422ca727 New changeset e9cbe583156f by Andrew Svetlov in branch '3.3': Fix docstring in curses (#16782) http://hg.python.org/cpython/rev/e9cbe583156f New changeset 2cae7bde45ef by Andrew Svetlov in branch 'default': Fix docstring in curses (#16782) http://hg.python.org/cpython/rev/2cae7bde45ef New changeset 52900f205e6e by Andrew Svetlov in branch '2.7': Fix docstring in curses (#16782) http://hg.python.org/cpython/rev/52900f205e6e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:13:10 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 29 Dec 2012 21:13:10 +0000 Subject: [docs] [issue16782] No curses.initwin: Incorrect package docstring for curses In-Reply-To: <1356490142.44.0.537785717498.issue16782@psf.upfronthosting.co.za> Message-ID: <1356815590.14.0.89099833157.issue16782@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed in active development branches. Thanks. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:13:43 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 29 Dec 2012 21:13:43 +0000 Subject: [docs] [issue16782] No curses.initwin: Incorrect package docstring for curses In-Reply-To: <1356490142.44.0.537785717498.issue16782@psf.upfronthosting.co.za> Message-ID: <1356815623.34.0.109914573205.issue16782@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:12:11 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 30 Dec 2012 00:12:11 +0000 Subject: [docs] [issue16731] xxlimited/xxmodule docstrings ambiguous In-Reply-To: <1355946646.69.0.259699636535.issue16731@psf.upfronthosting.co.za> Message-ID: <1356826331.59.0.0520721660846.issue16731@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 09:28:54 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Dec 2012 08:28:54 +0000 Subject: [docs] [issue13951] Seg Fault in .so called by ctypes causes the interpreter to Seg Fault In-Reply-To: <1328535030.63.0.73417525944.issue13951@psf.upfronthosting.co.za> Message-ID: <1356856133.97.0.875772158403.issue13951@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Bump. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 09:29:12 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Dec 2012 08:29:12 +0000 Subject: [docs] [issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault In-Reply-To: <1328535030.63.0.73417525944.issue13951@psf.upfronthosting.co.za> Message-ID: <1356856152.11.0.0899061490419.issue13951@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- title: Seg Fault in .so called by ctypes causes the interpreter to Seg Fault -> Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 10:20:05 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 30 Dec 2012 09:20:05 +0000 Subject: [docs] [issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault In-Reply-To: <1328535030.63.0.73417525944.issue13951@psf.upfronthosting.co.za> Message-ID: <1356859205.84.0.78484807004.issue13951@psf.upfronthosting.co.za> Georg Brandl added the comment: The reference to faulthandler is a good addition. The other added sentence reads repetitive and can be left out. Proposal: There are, however, enough ways to crash Python with :mod:`ctypes`, so you should be careful anyway. The :mod:`faulthandler` module can be helpful in debugging crashes, e.g. from segmentation faults produced by erroneous C library calls. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:57:12 2012 From: report at bugs.python.org (Meador Inge) Date: Mon, 31 Dec 2012 00:57:12 +0000 Subject: [docs] [issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault In-Reply-To: <1328535030.63.0.73417525944.issue13951@psf.upfronthosting.co.za> Message-ID: <1356915431.57.0.480995878657.issue13951@psf.upfronthosting.co.za> Meador Inge added the comment: Georg's proposal seems reasonable to me sans one very minor nit. I think the e.g. bit is better off parenthesized: There are, however, enough ways to crash Python with :mod:`ctypes`, so you -should be careful anyway. +should be careful anyway. The :mod:`faulthandler` module can be helpful in +debugging crashes (e.g. from segmentation faults produced by erroneous C +library calls). If there are no objections, then I will go ahead and commit this version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:58:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 31 Dec 2012 00:58:59 +0000 Subject: [docs] [issue16747] Remove 'file' type reference from 'iterable' glossary entry In-Reply-To: <1356134813.58.0.26000957124.issue16747@psf.upfronthosting.co.za> Message-ID: <1356915539.62.0.806559330858.issue16747@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:16:30 2012 From: report at bugs.python.org (Georg Brandl) Date: Mon, 31 Dec 2012 08:16:30 +0000 Subject: [docs] [issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault In-Reply-To: <1328535030.63.0.73417525944.issue13951@psf.upfronthosting.co.za> Message-ID: <1356941790.23.0.431220051514.issue13951@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:58:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 09:58:52 +0000 Subject: [docs] [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356947932.84.0.177295547636.issue16802@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The fileno parameter was added in the changeset 8e062e572ea4. It was mentioned in comments at the top of Modules/socketmodule.c, but not in the documentation or docstrings (nor for _socket.socket, nor for socket.socket). ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, pitrou, serhiy.storchaka type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 12:16:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 31 Dec 2012 11:16:42 +0000 Subject: [docs] [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356952602.17.0.856090016623.issue16802@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The "fileno" argument looks like an implementation detail to me. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 12:40:52 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 31 Dec 2012 11:40:52 +0000 Subject: [docs] [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356954052.43.0.633061110097.issue16802@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > The "fileno" argument looks like an implementation detail to me. It has at least one potential use. On Windows socket.detach() returns a socket handle but there is no documented way to close it -- os.close() will not work. The only way to close it that I can see (without resorting to ctypes) is with something like socket.socket(fileno=handle).close() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:11:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 14:11:18 +0000 Subject: [docs] [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356954052.43.0.633061110097.issue16802@psf.upfronthosting.co.za> Message-ID: <201212311610.52216.storchaka@gmail.com> Serhiy Storchaka added the comment: > It has at least one potential use. On Windows socket.detach() returns a > socket handle but there is no documented way to close it -- os.close() > will not work. The only way to close it that I can see (without resorting > to ctypes) is with something like > > socket.socket(fileno=handle).close() There is an alternative (documented) interface: socket.fromfd(handle, socket.AF_INET, socket.SOCK_STREAM).close() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:41:36 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 31 Dec 2012 14:41:36 +0000 Subject: [docs] [issue16827] Remove the relatively advanced content from section 2 in tutorial Message-ID: <1356964896.19.0.673901752517.issue16827@psf.upfronthosting.co.za> New submission from Ramchandra Apte: Most of the content in section 2 in the tutorial, http://docs.python.org/3/tutorial/interpreter.html , is relatively advanced and doesn't belong in, at least, the beginning of the tutorial. Only 2.1. Invoking the Interpreter, and 2.2.3. Source Code Encoding should be in section 2. The rest can be moved outside the tutorial, or in later portions. Thanks to Ezio Melotti for helping me overcome my laziness in filing this bug. ---------- assignee: docs at python components: Documentation messages: 178680 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: Remove the relatively advanced content from section 2 in tutorial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:45:51 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 31 Dec 2012 14:45:51 +0000 Subject: [docs] [issue16827] Remove the relatively advanced content from section 2 in tutorial In-Reply-To: <1356964896.19.0.673901752517.issue16827@psf.upfronthosting.co.za> Message-ID: <1356965151.7.0.115661636962.issue16827@psf.upfronthosting.co.za> Ezio Melotti added the comment: +1 ---------- keywords: +easy nosy: +chris.jerdonek, ezio.melotti stage: -> needs patch type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:50:30 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 31 Dec 2012 14:50:30 +0000 Subject: [docs] [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356965430.1.0.329003300148.issue16802@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > There is an alternative (documented) interface: > > socket.fromfd(handle, socket.AF_INET, socket.SOCK_STREAM).close() socket.fromfd() duplicates the handle, so that does not close the original handle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:19:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 15:19:13 +0000 Subject: [docs] [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356967153.3.0.453339320289.issue16802@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed. In any case, if this idiom is widely used, we can't hide this parameter and should document it (and perhaps document this idiom). If BDFL not want this parameter was made public, he would not have added it as an keyword argument. However, may be to ask him? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:22:29 2012 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 31 Dec 2012 16:22:29 +0000 Subject: [docs] [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356967153.3.0.453339320289.issue16802@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I recommend documenting it. On Monday, December 31, 2012, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Indeed. In any case, if this idiom is widely used, we can't hide this > parameter and should document it (and perhaps document this idiom). > > If BDFL not want this parameter was made public, he would not have added > it as an keyword argument. However, may be to ask him? > > ---------- > > _______________________________________ > Python tracker > > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 21:59:05 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 31 Dec 2012 20:59:05 +0000 Subject: [docs] [issue16827] Remove the relatively advanced content from section 2 in tutorial In-Reply-To: <1356964896.19.0.673901752517.issue16827@psf.upfronthosting.co.za> Message-ID: <1356987545.14.0.00521261969477.issue16827@psf.upfronthosting.co.za> Senthil Kumaran added the comment: +1 from me as well. I am also adding Eric who might have views on the customization part which added by him. ---------- nosy: +eric.araujo, orsenthil _______________________________________ Python tracker _______________________________________ From mybiz at toeai.com Thu Dec 27 03:38:39 2012 From: mybiz at toeai.com (mybiz at toeai.com) Date: Thu, 27 Dec 2012 02:38:39 -0000 Subject: [docs] Mistake in library section 16.2.2 Lock Objects Message-ID: <79577a3f3d866c6fbc815321c9930c66.squirrel@host230.hostmonster.com> In the documentation for Python 2.7.3 (looking at 14 Dec version) under section 16.2.2, entitled "Lock Objects", in the second paragraph is the sentence: If an attempt is made to release an unlocked lock, a RuntimeError will be raised. This is not true. As it says farther down under "Lock.release()": When invoked on an unlocked lock, a ThreadError is raised. So it may be a "runtime error" as opposed to a syntax error, but it isn't a RuntimeError. It's a threading.ThreadError, which doesn't inherit from RuntimeError or even StandardError, but from Exception. Feel free to contact me if this is unclear. From jmdyck at ibiblio.org Fri Dec 28 09:30:15 2012 From: jmdyck at ibiblio.org (Michael Dyck) Date: Fri, 28 Dec 2012 00:30:15 -0800 Subject: [docs] 'new' module has unhelpful deprecation warning Message-ID: <50DD5897.1020801@ibiblio.org> At http://docs.python.org/2/library/new.html (8.16. new ? Creation of runtime internal objects), it says: Deprecated since version 2.6: The 'new' module has been removed in Python 3. Use the 'types' module?s classes instead. But the 'types' module doesn't export any classes, and the page at http://docs.python.org/2/library/types.html doesn't indicate how it could be used to replace the functionality of the 'new' module. -Michael From juan_benavente_ponce at yahoo.es Sat Dec 29 01:54:22 2012 From: juan_benavente_ponce at yahoo.es (Juan) Date: Sat, 29 Dec 2012 00:54:22 -0000 Subject: [docs] Minor addition to Multiprocessing doc Message-ID: Hello! I use Python 3.3, and I have noticed that nowhere in the on-line documentation it is mentioned that a multiprocessing.Manager() object has a JoinableQueue method. Maybe it is a good idea to include this information, both for Python 3.3 and Python 2.7, like this: Python 3.3: Original text 1: A manager returned by :func:`Manager` will support types :class:`list`, :class:`dict`, :class:`Namespace`, :class:`Lock`, :class:`RLock`, :class:`Semaphore`, :class:`BoundedSemaphore`, :class:`Condition`, :class:`Event`, :class:`Barrier`, :class:`Queue`, :class:`Value` and :class:`Array`. For example, :: New text 1: A manager returned by :func:`Manager` will support types :class:`list`, :class:`dict`, :class:`Namespace`, :class:`Lock`, :class:`RLock`, :class:`Semaphore`, :class:`BoundedSemaphore`, :class:`Condition`, :class:`Event`, :class:`Barrier`, :class:`Queue`, :class:`JoinableQueue`, :class:`Value` and :class:`Array`. For example, :: Original text 2: .. method:: Event() Create a shared :class:`threading.Event` object and return a proxy for it. .. method:: Lock() Create a shared :class:`threading.Lock` object and return a proxy for it. New text 2: .. method:: Event() Create a shared :class:`threading.Event` object and return a proxy for it. .. method:: JoinableQueue() Create a shared :class:`JoinableQueue` object and return a proxy for it. .. method:: Lock() Create a shared :class:`threading.Lock` object and return a proxy for it. Python 2.7 docs: Original text 1: A manager returned by :func:`Manager` will support types :class:`list`, :class:`dict`, :class:`Namespace`, :class:`Lock`, :class:`RLock`, :class:`Semaphore`, :class:`BoundedSemaphore`, :class:`Condition`, :class:`Event`, :class:`~multiprocessing.Queue`, :class:`Value` and :class:`Array`. For example, :: New text 1: A manager returned by :func:`Manager` will support types :class:`list`, :class:`dict`, :class:`Namespace`, :class:`Lock`, :class:`RLock`, :class:`Semaphore`, :class:`BoundedSemaphore`, :class:`Condition`, :class:`Event`, :class:`~multiprocessing.Queue`, :class:`~multiprocessing.JoinableQueue`, `:class:`Value` and :class:`Array`. For example, :: Original text 2: .. method:: Event() Create a shared :class:`threading.Event` object and return a proxy for it. .. method:: Lock() Create a shared :class:`threading.Lock` object and return a proxy for it. New text 2: .. method:: Event() Create a shared :class:`threading.Event` object and return a proxy for it. .. method:: JoinableQueue() Create a shared :class:`JoinableQueue` object and return a proxy for it. .. method:: Lock() Create a shared :class:`threading.Lock` object and return a proxy for it. Thanks for your work and the time you have spent reading this mail. Happy new year! Juan. -------------- next part -------------- An HTML attachment was scrubbed... URL: