From report at bugs.python.org Sun Apr 1 01:18:54 2012 From: report at bugs.python.org (Sven Marnach) Date: Sat, 31 Mar 2012 23:18:54 +0000 Subject: [docs] [issue14456] Relation between threads and signals unclear In-Reply-To: <1333149178.59.0.333821086904.issue14456@psf.upfronthosting.co.za> Message-ID: <1333235934.72.0.768799459203.issue14456@psf.upfronthosting.co.za> Sven Marnach added the comment: Thanks, Antoine! It's perfectly clear now, and the newly introduces headlines are a definite improvement. ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Sun Apr 1 01:54:09 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 1 Apr 2012 01:54:09 +0200 Subject: [docs] Error(s)/omissions on glossary page In-Reply-To: References: Message-ID: Hello Robert, thanks for your email On Wed, Jan 18, 2012 at 16:38, Robert Bardos/ansys wrote: > Item 'key function': ?paragraph 3: ?"constructors" is misspelled as > "constuctors" This has now been fixed with: http://hg.python.org/cpython/rev/3623c3e6c049 http://hg.python.org/cpython/rev/0a4a6f98bd8e http://hg.python.org/cpython/rev/51b5f2b90df2 Regards, -- 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 Sun Apr 1 10:12:00 2012 From: report at bugs.python.org (py.user) Date: Sun, 01 Apr 2012 08:12:00 +0000 Subject: [docs] [issue14461] In re's positive lookbehind assertion documentation match() cannot match Message-ID: <1333267920.68.0.0890741084259.issue14461@psf.upfronthosting.co.za> New submission from py.user : http://docs.python.org/py3k/library/re.html "Note that patterns which start with positive lookbehind assertions will never match at the beginning of the string being searched; you will most likely want to use the search() function rather than the match() function:" >>> re.match(r'(?<=^)abc', 'abc').group() 'abc' >>> re.match(r'(?<=\b)abc', 'abc').group() 'abc' >>> re.match(r'(?<=\A)abc', 'abc').group() 'abc' >>> re.match(r'(?<=\A)abc', 'abc', re.DEBUG).group() assert -1 at at_beginning_string literal 97 literal 98 literal 99 'abc' >>> in some cases match() can match ---------- assignee: docs at python components: Documentation, Regular Expressions messages: 157265 nosy: docs at python, ezio.melotti, mrabarnett, py.user priority: normal severity: normal status: open title: In re's positive lookbehind assertion documentation match() cannot match versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 1 10:16:48 2012 From: report at bugs.python.org (py.user) Date: Sun, 01 Apr 2012 08:16:48 +0000 Subject: [docs] [issue14462] In re's named group the name cannot contain unicode characters Message-ID: <1333268208.65.0.802050679023.issue14462@psf.upfronthosting.co.za> New submission from py.user : http://docs.python.org/py3k/library/re.html "(?P...) Similar to regular parentheses, but the substring matched by the group is accessible within the rest of the regular expression via the symbolic group name name. Group names must be valid Python identifiers, and each group name must be defined only once within a regular expression." >>> chr(255) '?' >>> '?'.isidentifier() True >>> import re >>> re.search(r'(?Pa)', 'abc') Traceback (most recent call last): File "/usr/local/lib/python3.2/functools.py", line 176, in wrapper result = cache[key] KeyError: (, '(?Pa)', 0) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.2/re.py", line 158, in search return _compile(pattern, flags).search(string) File "/usr/local/lib/python3.2/re.py", line 255, in _compile return _compile_typed(type(pattern), pattern, flags) File "/usr/local/lib/python3.2/functools.py", line 180, in wrapper result = user_function(*args, **kwds) File "/usr/local/lib/python3.2/re.py", line 267, in _compile_typed return sre_compile.compile(pattern, flags) File "/usr/local/lib/python3.2/sre_compile.py", line 491, in compile p = sre_parse.parse(p, flags) File "/usr/local/lib/python3.2/sre_parse.py", line 692, in parse p = _parse_sub(source, pattern, 0) File "/usr/local/lib/python3.2/sre_parse.py", line 315, in _parse_sub itemsappend(_parse(source, state)) File "/usr/local/lib/python3.2/sre_parse.py", line 552, in _parse raise error("bad character in group name") sre_constants.error: bad character in group name >>> also: (?P=name) (?(name)yes|no) \g ---------- assignee: docs at python components: Documentation, Regular Expressions messages: 157266 nosy: docs at python, ezio.melotti, mrabarnett, py.user priority: normal severity: normal status: open title: In re's named group the name cannot contain unicode characters type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 1 13:08:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 Apr 2012 11:08:49 +0000 Subject: [docs] [issue14394] missing links on performance claims of cdecimal In-Reply-To: <1332496271.62.0.623566153633.issue14394@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 6ba569924986 by Stefan Krah in branch 'default': Issue #14394: Use elaborate phrases that boil down to "one to two orders http://hg.python.org/cpython/rev/6ba569924986 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 1 13:17:46 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 01 Apr 2012 11:17:46 +0000 Subject: [docs] [issue14394] Add speed improvement note to the decimal docs. In-Reply-To: <1332496271.62.0.623566153633.issue14394@psf.upfronthosting.co.za> Message-ID: <1333279066.77.0.304714918179.issue14394@psf.upfronthosting.co.za> Stefan Krah added the comment: Leaving this open since a "New in version 3.3" speed improvement note in the docs would be useful. ---------- title: missing links on performance claims of cdecimal -> Add speed improvement note to the decimal docs. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 1 18:43:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Apr 2012 16:43:00 +0000 Subject: [docs] [issue14469] Python 3 documentation links Message-ID: <1333298580.51.0.119482106967.issue14469@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : "Other resources" links in the Python 3 documentation refer to the Python 2.7 online documentation. It is also strange that http://python.org/doc (for example from issue tracker sidebar) refer to the Python 2.7 documentation. ---------- assignee: docs at python components: Documentation messages: 157316 nosy: docs at python, storchaka priority: normal severity: normal status: open title: Python 3 documentation links versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 1 18:51:48 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 01 Apr 2012 16:51:48 +0000 Subject: [docs] [issue14469] Python 3 documentation links In-Reply-To: <1333298580.51.0.119482106967.issue14469@psf.upfronthosting.co.za> Message-ID: <1333299108.43.0.728144361406.issue14469@psf.upfronthosting.co.za> R. David Murray added the comment: The FAQ link (and removing the new style class link, but I think there is already an issue for that) is the only one I see that should be pointing to 3.x that isn't. python.org/doc and docs.python.org is intentionally the 2.7 docs for now. We haven't decided when we are going to change it. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 1 19:38:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 01 Apr 2012 17:38:16 +0000 Subject: [docs] [issue14469] Python 3 documentation links In-Reply-To: <1333298580.51.0.119482106967.issue14469@psf.upfronthosting.co.za> Message-ID: <1333301896.02.0.353681172217.issue14469@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think that it would be appropriate to start redirect (HTTP 302) http://docs.python.org/something/ to the http://docs.python.org/2.7/something/. Today, the situation is Vice versa. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 1 23:00:48 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 01 Apr 2012 21:00:48 +0000 Subject: [docs] [issue14394] Add speed improvement note to the decimal docs. In-Reply-To: <1332496271.62.0.623566153633.issue14394@psf.upfronthosting.co.za> Message-ID: <1333314048.59.0.37197571039.issue14394@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The correct place for the note is in the "optimizations" section of whatsnew. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 2 13:51:32 2012 From: report at bugs.python.org (Federico Reghenzani) Date: Mon, 02 Apr 2012 11:51:32 +0000 Subject: [docs] [issue14473] Regex Howto error Message-ID: <1333367492.14.0.400451963757.issue14473@psf.upfronthosting.co.za> New submission from Federico Reghenzani : There's an error in Regex Howto, when explain the operator '?', I attached the patch. ---------- assignee: docs at python components: Documentation files: regex_doc.diff keywords: patch messages: 157348 nosy: docs at python, federico.reghenzani priority: normal severity: normal status: open title: Regex Howto error versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file25097/regex_doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 2 13:58:00 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 02 Apr 2012 11:58:00 +0000 Subject: [docs] [issue14473] Regex Howto error In-Reply-To: <1333367492.14.0.400451963757.issue14473@psf.upfronthosting.co.za> Message-ID: <1333367880.74.0.963586940124.issue14473@psf.upfronthosting.co.za> Senthil Kumaran added the comment: That's not an error, but in fact a correct statement. Please test it in the interpreter. ---------- nosy: +orsenthil resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 2 14:35:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 02 Apr 2012 12:35:07 +0000 Subject: [docs] [issue14405] Some "Other Resources" in the sidebar are hopelessly out of date In-Reply-To: <1332696210.48.0.175266420412.issue14405@psf.upfronthosting.co.za> Message-ID: <1333370107.67.0.845137044753.issue14405@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 3 10:12:24 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 03 Apr 2012 08:12:24 +0000 Subject: [docs] [issue14481] trivial formatting error in subprocess docs Message-ID: <1333440744.26.0.476663601501.issue14481@psf.upfronthosting.co.za> New submission from Chris Rebert : The final line under "17.1.4.2. Replacing shell pipeline" (http://docs.python.org/dev/library/subprocess.html#replacing-shell-pipeline ) isn't formatted as code (e.g. monospaced); it should be. ---------- assignee: docs at python components: Documentation messages: 157401 nosy: cvrebert, docs at python priority: normal severity: normal status: open title: trivial formatting error in subprocess docs versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 3 11:06:21 2012 From: report at bugs.python.org (Berker Peksag) Date: Tue, 03 Apr 2012 09:06:21 +0000 Subject: [docs] [issue14481] trivial formatting error in subprocess docs In-Reply-To: <1333440744.26.0.476663601501.issue14481@psf.upfronthosting.co.za> Message-ID: <1333443981.58.0.80321968016.issue14481@psf.upfronthosting.co.za> Berker Peksag added the comment: Attached a patch. ---------- keywords: +patch nosy: +berker.peksag Added file: http://bugs.python.org/file25106/issue14481.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 3 14:47:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 03 Apr 2012 12:47:32 +0000 Subject: [docs] [issue14481] trivial formatting error in subprocess docs In-Reply-To: <1333440744.26.0.476663601501.issue14481@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 2c1ce04ded55 by R David Murray in branch '2.7': #14481: fix formatting of example in subprocess docs. http://hg.python.org/cpython/rev/2c1ce04ded55 New changeset e5f5652bfe91 by R David Murray in branch '3.2': #14481: fix formatting of example in subprocess docs. http://hg.python.org/cpython/rev/e5f5652bfe91 New changeset 9599f091faa6 by R David Murray in branch 'default': Merge #14481: fix formatting of example in subprocess docs. http://hg.python.org/cpython/rev/9599f091faa6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 3 14:48:13 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 03 Apr 2012 12:48:13 +0000 Subject: [docs] [issue14481] trivial formatting error in subprocess docs In-Reply-To: <1333440744.26.0.476663601501.issue14481@psf.upfronthosting.co.za> Message-ID: <1333457293.71.0.713921465663.issue14481@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 4 03:05:22 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 04 Apr 2012 01:05:22 +0000 Subject: [docs] [issue14486] Add some versionchanged notes in threading docs Message-ID: <1333501522.24.0.791616845298.issue14486@psf.upfronthosting.co.za> New submission from Nick Coghlan : A (very) minor irritation discovered today - the PEP 8 style names were added to the threading.Thread API in 2.6, but the only notice of this is up at the top of the module docs. Some embedded notices like: ..versionchanged:: 2.6 Added PEP 8 compliant interfaces. See note at top of page. might be helpful. ---------- assignee: docs at python components: Documentation keywords: easy messages: 157451 nosy: docs at python, ncoghlan priority: low severity: normal stage: needs patch status: open title: Add some versionchanged notes in threading docs type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 4 08:24:39 2012 From: report at bugs.python.org (H Xu) Date: Wed, 04 Apr 2012 06:24:39 +0000 Subject: [docs] [issue14489] repr() function link on the built-in function documentation is incorrect Message-ID: <1333520679.63.0.90940412535.issue14489@psf.upfronthosting.co.za> New submission from H Xu : The `repr()` built-in function link in this page [ http://docs.python.org/library/functions.html ] should link to the built-in version of `repr()`. It should link to: http://docs.python.org/library/functions.html#repr However, it links to here: http://docs.python.org/library/repr.html#module-repr ---------- assignee: docs at python components: Documentation messages: 157462 nosy: H.Xu, docs at python priority: normal severity: normal status: open title: repr() function link on the built-in function documentation is incorrect versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 4 14:53:06 2012 From: report at bugs.python.org (Sven Marnach) Date: Wed, 04 Apr 2012 12:53:06 +0000 Subject: [docs] [issue14494] __future__.py and its documentation claim absolute imports became mandatory in 2.7, but they didn't Message-ID: <1333543986.45.0.920300905324.issue14494@psf.upfronthosting.co.za> New submission from Sven Marnach : As has been pointed out before on python-dev [1], the mandatory version of '__future__.absolute_import' does not match reality. In Python 2.7, absolute imports are not the default. [1]: http://article.gmane.org/gmane.comp.python.devel/125446 The attached patch should fix the documentation and Lib/__future__.py. I set the mandatory version to (3, 0, 0, "alpha", 0), in accordance with other features that became mandatory in Py3k, though there never was a 3.0a0 release. I double-checked that absolute imports already were the default in 3.0a1. The patch should probably be applied to all branches. ---------- assignee: docs at python components: Documentation, Library (Lib) files: absolute_import.patch keywords: patch messages: 157474 nosy: docs at python, smarnach priority: normal severity: normal status: open title: __future__.py and its documentation claim absolute imports became mandatory in 2.7, but they didn't type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file25118/absolute_import.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 4 16:19:03 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 04 Apr 2012 14:19:03 +0000 Subject: [docs] [issue14489] repr() function link on the built-in function documentation is incorrect In-Reply-To: <1333520679.63.0.90940412535.issue14489@psf.upfronthosting.co.za> Message-ID: <1333549143.35.0.708373380599.issue14489@psf.upfronthosting.co.za> R. David Murray added the comment: This is only a problem in the 2.7 docs. I tried adding a .. py:currentmodule:: builtins directive to the page, hoping that would make all unqualified links local, but it didn't work. I think the fix will require someone with more Sphinx-foo than I have. ---------- nosy: +r.david.murray type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 4 16:29:12 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 04 Apr 2012 14:29:12 +0000 Subject: [docs] [issue14494] __future__.py and its documentation claim absolute imports became mandatory in 2.7, but they didn't In-Reply-To: <1333543986.45.0.920300905324.issue14494@psf.upfronthosting.co.za> Message-ID: <1333549752.29.0.299200033498.issue14494@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: -> patch review versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 4 16:59:24 2012 From: report at bugs.python.org (Zachary Ware) Date: Wed, 04 Apr 2012 14:59:24 +0000 Subject: [docs] [issue14495] Minor typo in tkinter.ttk.Treeview.exists docstring Message-ID: <1333551564.21.0.378637170829.issue14495@psf.upfronthosting.co.za> New submission from Zachary Ware : I found a very very minor typo in the docstring of tkinter.ttk.Treeview.exists: "Returns True if the specified item is present in the *three*" I assume that should be "tree". The attached patch removes the "h". Thanks! --Note: This is the first time I've done anything on bugs.python.org, so if there's anything I've done wrong or could do better, please let me know! Thanks, Zach ---------- assignee: docs at python components: Documentation files: Treeview.exists docstring.diff keywords: patch messages: 157483 nosy: docs at python, eric.araujo, ezio.melotti, georg.brandl, gpolo, zach.ware priority: normal severity: normal status: open title: Minor typo in tkinter.ttk.Treeview.exists docstring versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file25119/Treeview.exists docstring.diff _______________________________________ Python tracker _______________________________________ From austin.roberts at propylon.com Wed Apr 4 17:51:25 2012 From: austin.roberts at propylon.com (W. Austin Roberts) Date: Wed, 04 Apr 2012 10:51:25 -0500 Subject: [docs] threading.Lock.release Documentation Message-ID: <4F7C6DFD.8000100@propylon.com> I recently ran into a situation where I could not be certain that a lock was currently in the acquired state. I checked the documentation to determine what would happen if I attempted to release a lock that was already released, and saw an ominous warning of "Do not call this method when the lock is unlocked." Needing to know what would happen, I cautiously tested it out. I half expected my computer to explode as I released a lock for the second time, but was pleased to see it raise a 'thread.error' exception which could be caught and handled. I generally expect the documentation to tell me what will happen if I do something invalid. In this case the documentation should indicate that a thread.error will be raised if you release an unlocked lock. Thanks for your time. -- Austin Roberts Technical Team Lead Propylon, Inc. http://www.propylon.com From report at bugs.python.org Wed Apr 4 20:17:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 04 Apr 2012 18:17:24 +0000 Subject: [docs] [issue14495] Minor typo in tkinter.ttk.Treeview.exists docstring In-Reply-To: <1333551564.21.0.378637170829.issue14495@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 45287f2799f5 by Georg Brandl in branch '3.2': Closes #14495: fix typo. http://hg.python.org/cpython/rev/45287f2799f5 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From kogelnik at gmail.com Wed Apr 4 21:23:28 2012 From: kogelnik at gmail.com (Chris Kogelnik) Date: Wed, 04 Apr 2012 12:23:28 -0700 Subject: [docs] string reverse In-Reply-To: References: <4F6A1CFD.3010101@gmail.com> Message-ID: <4F7C9FB0.5070902@gmail.com> Hi Sandro, I realize it's mentioned in the how-to docs. I just felt it was such a fundamental operation that is easily overlooked, that having it mentioned in both the library and in the online docs, which are referenced more, would be beneficial. I've missed it on occasion. Thanks, Chris On 3/31/12 1:31 PM, Sandro Tosi wrote: > Hello Chris, > > On Wed, Mar 21, 2012 at 19:25, Chris Kogelnik wrote: >> Hi, >> >> There is no string reverse method in Python, but there is an easy way to do >> it using negative stepping in the extended slice syntax, ie. >> some_string[::-1]. Since this is somewhat non-intuitive, I think adding a >> note to the String Methods section under Built-in Types will spare a lot of >> people the time of implementing such a method. > > It is already mentioned at: > http://docs.python.org/faq/programming.html#how-do-i-iterate-over-a-sequence-in-reverse-order > > Regards, From trmokwena at gmail.com Wed Apr 4 21:40:46 2012 From: trmokwena at gmail.com (Tebogo Mokwena) Date: Wed, 4 Apr 2012 21:40:46 +0200 Subject: [docs] Request for python programming assistance Message-ID: Hi My name is Tebogo Mokwena, a South African first year computer science student at the University of Cape Town and a first time programmer. I have downloaded almost all the tutorials on u-tube and I am very thsnkful that you are helping so much in the tutorials. I still need to master tricks when dealing with loops because I can analyse them but creating my own programs with loops is sometimes a problem. I specifically need help with creating programs that draws shapes as the output for example: >>Enter height: >>6 expected output: ********* ******* ***** *** ** * or >>Enter height: 5 expected output: * *** ***** ******** *********** or >>Enter height: >>9 oexpected output: * *** ***** ******* ********* ******* ***** *** * >>Enter height: 5 expected output * *** ***** *** * >> Enter height: 7 * *** ***** ******* ***** *** * Ultimately I would like your help in order to find a precise formula or at least a technique on how to determine a formula to derive any shape as an ouput like above. Please help me find the codes and please include detailed comments for me to undestand how you found the formulas. I also attached a document of an expected output of a function called forest and the task is to find the codes for the function which should yield the exact output attached Your assistance with enormously be appreciated With great thanks Tebogo -------------- next part -------------- An HTML attachment was scrubbed... URL: From trmokwena at gmail.com Wed Apr 4 21:58:05 2012 From: trmokwena at gmail.com (Tebogo Mokwena) Date: Wed, 4 Apr 2012 21:58:05 +0200 Subject: [docs] Request for assistance in testing Message-ID: Hi, I'm Tebogo from South Africa and I kindly request your assistance with the following python programs. In the first program, I am supposed to give the output and to also state what the program does: def mystery(a,b): if a>b or a<=0: print("Can't run mystery with these values!") for i in range(a,b+1): count = 0 for j in range(1,i+1): if i%j ==0: count = count + 1 if count%2 != 0: print(i) mystery(15, 20) mystery(15, 10) For the following program (below) , I was asked to: - What is an* equivalent class?* - Provide a minimal set of test values to support *statement coverage *testing of this function [1 mark] - If we use an exhaustive testing method, we will find that there are *2 errors* in this program. Explain what they are; whether each is a *syntax error or logic error*; and *how to fix* each error. [6 marks] - What does the search function do? [1 mark] def search(word): the_list = [ 'i', 'love', 'computer', 'science' ] position = 1 while the_list[position] != word and position From georg at python.org Wed Apr 4 22:12:13 2012 From: georg at python.org (Georg Brandl) Date: Wed, 04 Apr 2012 22:12:13 +0200 Subject: [docs] Request for assistance in testing In-Reply-To: References: Message-ID: <4F7CAB1D.3090407@python.org> Am 04.04.2012 21:58, schrieb Tebogo Mokwena: > Hi, I'm Tebogo from South Africa and I kindly request your assistance with the > following python programs. In the first program, I am supposed to give the > output and to also state what the program does: Hi Tebogo, I'm sorry, but we can't help you. This list is for reporting and discussing bugs and improvements to the Python documentation. For beginners' help there is the tutor mailing list (tutor at python.org), and for general questions we have python-list at python.org. But on any list, it is bad behavior to just copy-paste homework and expect people to solve it. They can only help you understanding how to solve it, after all it's you who should do the homework :) best regards, Georg From report at bugs.python.org Thu Apr 5 00:07:15 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 04 Apr 2012 22:07:15 +0000 Subject: [docs] [issue14318] clarify "may not" in time.steady docs In-Reply-To: <1331829668.71.0.947018206764.issue14318@psf.upfronthosting.co.za> Message-ID: <1333577235.89.0.519207373712.issue14318@psf.upfronthosting.co.za> STINNER Victor added the comment: I close this issue as a duplicate because it is now discussed in the PEP 418 and this PEP is going to change the new time functions (time.highres and time.monotonic/steady). ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 02:58:11 2012 From: report at bugs.python.org (Eric Snow) Date: Thu, 05 Apr 2012 00:58:11 +0000 Subject: [docs] [issue14494] __future__.py and its documentation claim absolute imports became mandatory in 2.7, but they didn't In-Reply-To: <1333543986.45.0.920300905324.issue14494@psf.upfronthosting.co.za> Message-ID: <1333587491.21.0.532975270747.issue14494@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 05:02:34 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 Apr 2012 03:02:34 +0000 Subject: [docs] [issue14362] No mention of collections.ChainMap in What's New for 3.3 In-Reply-To: <1332069504.3.0.514334264343.issue14362@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset deadd0823ab3 by ?ric Araujo in branch 'default': A few tweaks to whatsnew/3.3 (fixes #14362) http://hg.python.org/cpython/rev/deadd0823ab3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 05:03:37 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 05 Apr 2012 03:03:37 +0000 Subject: [docs] [issue14362] No mention of collections.ChainMap in What's New for 3.3 In-Reply-To: <1332069504.3.0.514334264343.issue14362@psf.upfronthosting.co.za> Message-ID: <1333595017.23.0.282643637487.issue14362@psf.upfronthosting.co.za> ?ric Araujo added the comment: Done. ---------- assignee: docs at python -> eric.araujo resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 05:06:31 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 05 Apr 2012 03:06:31 +0000 Subject: [docs] [issue14362] No mention of collections.ChainMap in What's New for 3.3 In-Reply-To: <1332069504.3.0.514334264343.issue14362@psf.upfronthosting.co.za> Message-ID: <1333595191.22.0.148205599569.issue14362@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 09:04:17 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Apr 2012 07:04:17 +0000 Subject: [docs] [issue14489] repr() function link on the built-in function documentation is incorrect In-Reply-To: <1333520679.63.0.90940412535.issue14489@psf.upfronthosting.co.za> Message-ID: <1333609457.72.0.0819022684504.issue14489@psf.upfronthosting.co.za> Georg Brandl added the comment: Shows how it's a bad thing to have a builtin function and a module of the same name :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 09:04:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 Apr 2012 07:04:33 +0000 Subject: [docs] [issue14489] repr() function link on the built-in function documentation is incorrect In-Reply-To: <1333520679.63.0.90940412535.issue14489@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 4416efeb0163 by Georg Brandl in branch '2.7': Closes #14489: correct link target. http://hg.python.org/cpython/rev/4416efeb0163 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 09:06:56 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Apr 2012 07:06:56 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock Message-ID: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> New submission from Georg Brandl : >From docs at python.org: """ I recently ran into a situation where I could not be certain that a lock was currently in the acquired state. I checked the documentation to determine what would happen if I attempted to release a lock that was already released, and saw an ominous warning of "Do not call this method when the lock is unlocked." Needing to know what would happen, I cautiously tested it out. I half expected my computer to explode as I released a lock for the second time, but was pleased to see it raise a 'thread.error' exception which could be caught and handled. I generally expect the documentation to tell me what will happen if I do something invalid. In this case the documentation should indicate that a thread.error will be raised if you release an unlocked lock. """ I agree: if we know that a ThreadError will always be raised in this instance, we should document it as such. ---------- assignee: docs at python components: Documentation messages: 157544 nosy: docs at python, georg.brandl, pitrou priority: normal severity: normal status: open title: Document better what happens on releasing an unacquired lock versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From georg at python.org Thu Apr 5 09:09:02 2012 From: georg at python.org (Georg Brandl) Date: Thu, 05 Apr 2012 09:09:02 +0200 Subject: [docs] threading.Lock.release Documentation In-Reply-To: <4F7C6DFD.8000100@propylon.com> References: <4F7C6DFD.8000100@propylon.com> Message-ID: <4F7D450E.2070606@python.org> Am 04.04.2012 17:51, schrieb W. Austin Roberts: > I recently ran into a situation where I could not be certain that a lock > was currently in the acquired state. I checked the documentation to > determine what would happen if I attempted to release a lock that was > already released, and saw an ominous warning of "Do not call this method > when the lock is unlocked." > > Needing to know what would happen, I cautiously tested it out. I half > expected my computer to explode as I released a lock for the second > time, but was pleased to see it raise a 'thread.error' exception which > could be caught and handled. > > I generally expect the documentation to tell me what will happen if I do > something invalid. In this case the documentation should indicate that a > thread.error will be raised if you release an unlocked lock. > > Thanks for your time. > Thanks for the note, Austin. I agree with you and I've opened #14502 at bugs.python.org to track the issue. cheers, Georg From report at bugs.python.org Thu Apr 5 09:09:02 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Apr 2012 07:09:02 +0000 Subject: [docs] [issue14486] Add some versionchanged notes in threading docs In-Reply-To: <1333501522.24.0.791616845298.issue14486@psf.upfronthosting.co.za> Message-ID: <1333609742.27.0.304326115946.issue14486@psf.upfronthosting.co.za> Georg Brandl added the comment: +1. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 09:37:37 2012 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 05 Apr 2012 07:37:37 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: Sandro Tosi added the comment: On Thu, Apr 5, 2012 at 09:06, Georg Brandl wrote: > I agree: if we know that a ThreadError will always be raised in this instance, we should document it as such. I've already prepared a small patch for that (every supported release has a different exception raised..) I'll be fixing it this evening at home. ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 09:48:22 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Apr 2012 07:48:22 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1333612102.94.0.495397684059.issue14502@psf.upfronthosting.co.za> Georg Brandl added the comment: What different exceptions are they? Note that thread.error == _thread.error == threading.ThreadError. The docs should always use the last one (ThreadError). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 09:53:16 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 05 Apr 2012 07:53:16 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1333612396.86.0.912273046396.issue14502@psf.upfronthosting.co.za> Georg Brandl added the comment: Ah, and I missed that apparently on 3.3, _thread.Error is aliased to RuntimeError. In that case you should use RuntimeError of course :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 10:04:13 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 05 Apr 2012 08:04:13 +0000 Subject: [docs] [issue14503] docs:Code not highlighted Message-ID: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> New submission from Ramchandra Apte : In http://docs.python.org/dev/whatsnew/3.3.html#pep-380-syntax-for-delegating-to-a-subgenerator , two code samples ---------- assignee: docs at python components: Documentation messages: 157551 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: docs:Code not highlighted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 10:04:50 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Thu, 05 Apr 2012 08:04:50 +0000 Subject: [docs] [issue14503] docs:Code not highlighted In-Reply-To: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> Message-ID: <1333613090.39.0.582183476565.issue14503@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Whoops - In http://docs.python.org/dev/whatsnew/3.3.html#pep-380-syntax-for-delegating-to-a-subgenerator , two code samples are not highlighted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 14:59:14 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 05 Apr 2012 12:59:14 +0000 Subject: [docs] [issue14503] docs:Code not highlighted In-Reply-To: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> Message-ID: <1333630754.51.0.410019437544.issue14503@psf.upfronthosting.co.za> R. David Murray added the comment: I'm not seeing any unhighlighted examples in that section. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 15:07:32 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 05 Apr 2012 13:07:32 +0000 Subject: [docs] [issue14503] docs:Code not highlighted In-Reply-To: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> Message-ID: <1333631252.48.0.765851885489.issue14503@psf.upfronthosting.co.za> Berker Peksag added the comment: I can reproduce. See screenshot.png. ---------- nosy: +berker.peksag Added file: http://bugs.python.org/file25135/screenshot.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 15:47:42 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 05 Apr 2012 13:47:42 +0000 Subject: [docs] [issue14503] docs:Code not highlighted In-Reply-To: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> Message-ID: <1333633662.72.0.740281252309.issue14503@psf.upfronthosting.co.za> R. David Murray added the comment: Berker: you can reproduce the bug, or the fact that they are highlighted? The png looks like they are highlighted, so I assume the latter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 15:56:59 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 05 Apr 2012 13:56:59 +0000 Subject: [docs] [issue14503] docs:Code not highlighted In-Reply-To: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> Message-ID: <1333634219.67.0.951617093793.issue14503@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > they are highlighted No. Keywords normally appear in bold font, and with another color. This is not the case in these blocks. Probably because the language detection does not work with the new "yield from" construct. Sphinx should always use the latest Python... ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 16:11:25 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 05 Apr 2012 14:11:25 +0000 Subject: [docs] [issue14503] docs:Code not highlighted In-Reply-To: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> Message-ID: <1333635085.55.0.825657269337.issue14503@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, you mean they are not *syntax* highlighted. Now I understand. Sorry for missing that. My understanding is that Sphinx does not use Python directly to parse the code and highlight it, it uses pygments, which uses regexes. So this basically amounts to a feature request for pygments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 16:32:18 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 05 Apr 2012 14:32:18 +0000 Subject: [docs] [issue14503] docs:Code not highlighted In-Reply-To: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> Message-ID: <1333636338.81.0.0113462934221.issue14503@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Not exactly. Sphinx first tries to see if the block is a Python script, and to do so it uses the Python compiler: https://bitbucket.org/birkenfeld/sphinx/src/164f59b2d946/sphinx/highlighting.py#cl-117 In case of SyntaxError, it treats the whole block as plain text and does not try to use pygmentq at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 16:44:59 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 05 Apr 2012 14:44:59 +0000 Subject: [docs] [issue14503] docs:Code not highlighted In-Reply-To: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> Message-ID: <1333637099.28.0.172929663931.issue14503@psf.upfronthosting.co.za> R. David Murray added the comment: Huh. Well, in another issue Georg said it was now possible to upgrade the doc build toolchain to Python3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 17:33:55 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 05 Apr 2012 15:33:55 +0000 Subject: [docs] [issue14511] _static/opensearch.xml for Python 3.2 docs directs searches to 3.3 docs Message-ID: <1333640035.04.0.466278675781.issue14511@psf.upfronthosting.co.za> New submission from Zachary Ware : Adding the search plugin for the 3.2 docs to Firefox and then searching from it returns results from the 3.3 dev docs, despite everything saying it should be for searching "Python v3.2.2 documentation". If my understanding of how it all works is correct, the attached patch should fix the issue. It simply removes 'dev/' from the html_use_opensearch assignment in Doc\conf.py in the 3.2 branch. Thanks, Zach ---------- assignee: docs at python components: Documentation files: 3.2 conf.py opensearch.diff keywords: patch messages: 157599 nosy: docs at python, eric.araujo, ezio.melotti, georg.brandl, zach.ware priority: normal severity: normal status: open title: _static/opensearch.xml for Python 3.2 docs directs searches to 3.3 docs type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file25137/3.2 conf.py opensearch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 19:07:05 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 05 Apr 2012 17:07:05 +0000 Subject: [docs] [issue14512] Pydocs module docs server not working on Windows. Message-ID: <1333645625.74.0.578211515784.issue14512@psf.upfronthosting.co.za> New submission from Terry J. Reedy : 3.2.3rc2 and 3.3.0a2, freshly downloaded and installed, Win7, 64 bit Start Menue/Pythonxx/Module Docs Brings up tkinter pydoc box. [open browser] brings up *empty* localhost:7464 window. Search 'tkinter' and double-click tkinter entry or select and [go to selected] opens empty localhost:7464/tkinter.html window. This worked sometime last year on earlier 3.2, maybe on xp box. I thought there might be an issue already, but I searched for 'pydoc' and 'modole docs' and found nothing. ---------- assignee: docs at python components: Documentation, Installation, Library (Lib) messages: 157606 nosy: docs at python, georg.brandl, loewis, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Pydocs module docs server not working on Windows. type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 22:50:14 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 05 Apr 2012 20:50:14 +0000 Subject: [docs] [issue7057] tkinter doc: more 3.x updates In-Reply-To: <1254697168.63.0.205098696566.issue7057@psf.upfronthosting.co.za> Message-ID: <1333659014.87.0.115707066258.issue7057@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- assignee: gpolo -> asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 23:01:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 Apr 2012 21:01:59 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset efeca6ff2751 by Sandro Tosi in branch '2.7': Issue #14502: release() and unlocked lock generates a ThreadError http://hg.python.org/cpython/rev/efeca6ff2751 New changeset acea9d95a6d8 by Sandro Tosi in branch '3.2': Issue #14502: release() and unlocked lock generates a ThreadError http://hg.python.org/cpython/rev/acea9d95a6d8 New changeset c10a0f93544e by Sandro Tosi in branch 'default': Issue #14502: merge with 3.2 http://hg.python.org/cpython/rev/c10a0f93544e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 23:05:47 2012 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 05 Apr 2012 21:05:47 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1333659947.14.0.331684506752.issue14502@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 23:35:14 2012 From: report at bugs.python.org (Jim Jewett) Date: Thu, 05 Apr 2012 21:35:14 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1333661714.57.0.492844768267.issue14502@psf.upfronthosting.co.za> Jim Jewett added the comment: At least put the information inside some disclaimers about "normally"; even the stdlib has some fake locks that let you release a lock someone else holds. (I think I found them in in workarounds for threading not being available, such as the dummy_* modules, but still, it is possible.) ---------- nosy: +Jim.Jewett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 5 23:38:18 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 05 Apr 2012 21:38:18 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333661714.57.0.492844768267.issue14502@psf.upfronthosting.co.za> Message-ID: <1333661578.3326.12.camel@localhost.localdomain> Antoine Pitrou added the comment: > At least put the information inside some disclaimers about "normally"; > even the stdlib has some fake locks that let you release a lock > someone else holds. Not sure what you're talking about. The doc patch is about unacquired locks, not locks that someone else (another thread) holds. Indeed the standard Lock object (but not the RLock) does allow releasing from another thread. It's a feature (which makes it serve as a binary semaphore). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 04:07:48 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 06 Apr 2012 02:07:48 +0000 Subject: [docs] [issue14515] tempfile.TemporaryDirectory documented as returning object but returns name Message-ID: <1333678068.19.0.790451967958.issue14515@psf.upfronthosting.co.za> New submission from R. David Murray : The title pretty much says it all. I believe the behavior is correct (more useful than returning an object that is only useful for obtaining the name) even though it is unusual for context managers. In any case there is plenty of code using the existing behavior, so I think this is a doc bug. ---------- assignee: docs at python components: Documentation messages: 157635 nosy: docs at python, r.david.murray priority: normal severity: normal stage: needs patch status: open title: tempfile.TemporaryDirectory documented as returning object but returns name type: behavior versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 06:52:40 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Fri, 06 Apr 2012 04:52:40 +0000 Subject: [docs] [issue7057] tkinter doc: more 3.x updates In-Reply-To: <1254697168.63.0.205098696566.issue7057@psf.upfronthosting.co.za> Message-ID: <1333687960.73.0.477855761907.issue7057@psf.upfronthosting.co.za> Ramchandra Apte added the comment: "Tkinter uses the Xlib library to draw graphics on the screen" should be "Tkinter uses the Xlib library on Linux to draw graphics on the screen" ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 06:59:34 2012 From: report at bugs.python.org (Jim Jewett) Date: Fri, 06 Apr 2012 04:59:34 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333661578.3326.12.camel@localhost.localdomain> Message-ID: Jim Jewett added the comment: On Thu, Apr 5, 2012 at 5:38 PM, Antoine Pitrou wrote: > Antoine Pitrou added the comment: > Not sure what you're talking about. The doc patch is about unacquired > locks, not locks that someone else (another thread) holds. Isn't one common reason for not being able to acquire a lock that someone else was already holding it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 07:31:24 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 06 Apr 2012 05:31:24 +0000 Subject: [docs] [issue7057] tkinter doc: more 3.x updates In-Reply-To: <1254697168.63.0.205098696566.issue7057@psf.upfronthosting.co.za> Message-ID: <1333690284.75.0.137966416626.issue7057@psf.upfronthosting.co.za> Ned Deily added the comment: The use of Xlib is not limited to Linux; most Unix-y platforms supported by Python have Xlib-based Tk versions available. But it is correct that there are Tk implementations that do not use X11 as their window server, for example, the native Tk implementations on Windows and Mac OS X. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 10:16:32 2012 From: report at bugs.python.org (py.user) Date: Fri, 06 Apr 2012 08:16:32 +0000 Subject: [docs] =?utf-8?q?=5Bissue14236=5D_re=3A_Docstring_for_=5Cs_and_?= =?utf-8?q?=5CS_doesn=E2=80=99t_mention_Unicode?= In-Reply-To: <1331273217.26.0.527770128505.issue14236@psf.upfronthosting.co.za> Message-ID: <1333700192.15.0.382637449062.issue14236@psf.upfronthosting.co.za> Changes by py.user : ---------- title: re: Docstring for \s and \S don?t mention Unicode -> re: Docstring for \s and \S doesn?t mention Unicode _______________________________________ Python tracker _______________________________________ From benzolius at yahoo.com Thu Apr 5 17:41:16 2012 From: benzolius at yahoo.com (Benedek Zoltan) Date: Thu, 5 Apr 2012 08:41:16 -0700 (PDT) Subject: [docs] typo in PyPNG docs Message-ID: <1333640476.82936.YahooMailNeo@web161405.mail.bf1.yahoo.com> Hi, There is a typo in the PyPNG page: http://packages.python.org/pypng/ex.html Section: A Palette Example code: "# Assume f and s have been set up as per previous example palette=[(0x55,0x55,0x55), (0xff,0x99,0x99)] w = png.Writer(len(s[0]), len(s), palette=palette, bitdepth=1) f.write(f, s)" the last line should be: "w.write(f, s)" Regards -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.tosi at gmail.com Fri Apr 6 10:32:49 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 6 Apr 2012 10:32:49 +0200 Subject: [docs] typo in PyPNG docs In-Reply-To: <1333640476.82936.YahooMailNeo@web161405.mail.bf1.yahoo.com> References: <1333640476.82936.YahooMailNeo@web161405.mail.bf1.yahoo.com> Message-ID: Hello Benedek, thanks for your email. On Thu, Apr 5, 2012 at 17:41, Benedek Zoltan wrote: > Hi, > > There is a typo in the PyPNG page: http://packages.python.org/pypng/ex.html As described at http://packages.python.org/ those are docs uploaded by PyPI modules authors, so your should contact PyPNG author asking him to fix the typo. Regards, -- 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 Apr 6 11:15:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 06 Apr 2012 09:15:49 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 068a614e9d97 by Sandro Tosi in branch 'default': Issue #14502: it's RuntimeError on 3.3 http://hg.python.org/cpython/rev/068a614e9d97 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 11:57:33 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 06 Apr 2012 09:57:33 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: Message-ID: <1333705934.3395.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > On Thu, Apr 5, 2012 at 5:38 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > Not sure what you're talking about. The doc patch is about unacquired > > locks, not locks that someone else (another thread) holds. > > Isn't one common reason for not being able to acquire a lock that > someone else was already holding it? We're talking about *releasing* an (un)acquired lock, not acquiring it again... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 19:10:46 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 Apr 2012 17:10:46 +0000 Subject: [docs] [issue14469] Python 3 documentation links In-Reply-To: <1333298580.51.0.119482106967.issue14469@psf.upfronthosting.co.za> Message-ID: <1333732246.76.0.492795505117.issue14469@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 21:37:14 2012 From: report at bugs.python.org (Jim Jewett) Date: Fri, 06 Apr 2012 19:37:14 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333705934.3395.0.camel@localhost.localdomain> Message-ID: Jim Jewett added the comment: On Fri, Apr 6, 2012 at 5:57 AM, Antoine Pitrou wrote: > Antoine Pitrou added the comment: >> > Not sure what you're talking about. The doc patch is about unacquired >> > locks, not locks that someone else (another thread) holds. >> Isn't one common reason for not being able to acquire a lock that >> someone else was already holding it? > We're talking about *releasing* an (un)acquired lock, not acquiring it > again... Right, but I thought the original motivation was concern over a race condition in the lock acquisition. lock.acquire() try: # What if something happens here, during try setup? Leak? foo() finally: lock.release() vs try: lock.acquire() foo() finally: lock.release() # But what if the acquire failed? -jJ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 21:43:47 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 06 Apr 2012 19:43:47 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1333741427.67.0.875101874385.issue14502@psf.upfronthosting.co.za> R. David Murray added the comment: It doesn't matter *how* you get to the situation where you are releasing a lock that hasn't been acquired, the point is to document what actually happens when you do the release. And just yesterday I needed to know this, since I have a lock that may or may not be currently held when I release it, and now I know I can just catch RuntimeError in that case. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 22:28:48 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 06 Apr 2012 20:28:48 +0000 Subject: [docs] [issue14511] _static/opensearch.xml for Python 3.2 docs directs searches to 3.3 docs In-Reply-To: <1333640035.04.0.466278675781.issue14511@psf.upfronthosting.co.za> Message-ID: <1333744128.33.0.96221345364.issue14511@psf.upfronthosting.co.za> ?ric Araujo added the comment: Will fix, thanks for the report. ---------- assignee: docs at python -> eric.araujo versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 23:37:34 2012 From: report at bugs.python.org (Jim Jewett) Date: Fri, 06 Apr 2012 21:37:34 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1333748254.68.0.124351557565.issue14502@psf.upfronthosting.co.za> Jim Jewett added the comment: > I have a lock that may or may not be currently held when I release it, > and now I know I can just catch RuntimeError in that case. Only if you're willing to make assumptions about the threading model and the source of locks. And I fear the current change overpromises. For example, the LockType from _dummy_thread raises an error not based on RuntimeError, and has comments suggesting it might stop raising entirely. I believe I have seen other Lock-emulation code which also does not raise an error, though the closest I can come to finding it right now is logging_releaseLock() when the import of either _thread or threading failed. Starting with http://hg.python.org/cpython/file/acea9d95a6d8/Doc/library/threading.rst I would prefer to change to following two sentences: If an attempt is made to release an unlocked lock, a :exc:`RuntimeError` will be raised. ... When invoked on an unlocked lock, a :exc:`ThreadError` is raised. in any of the following ways: (a) Change "will be"/"is" --> "may be", so it isn't promised: If an attempt is made to release an unlocked lock, a :exc:`RuntimeError` may be raised. ... When invoked on an unlocked lock, a :exc:`ThreadError` may be raised. (b) Clarify that it is implementation-specific If an attempt is made to release an unlocked _thread.lock, a :exc:`RuntimeError` will be raised. ... When invoked on an unlocked _thread.lock, a :exc:`ThreadError` is raised. (and add to the caveats) Locks provided by other modules may have slightly different behavior, particularly when an an operation fails. For example, unlocking without first acquiring may raise a different error, or may not raise at all. (c) Clarify that alternatives are buggy (and fix those in the stdlib) If an attempt is made to release an unlocked lock, a :exc:`RuntimeError` will be raised. ... When invoked on an unlocked lock, a :exc:`ThreadError` is be raised. (and add to the caveats) Historically, many Locks have followed a slightly different contract, particularly when an an operation fails. For example, unlocking without first acquiring might raise a different error, or might not even raise at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 6 23:47:50 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 06 Apr 2012 21:47:50 +0000 Subject: [docs] [issue14503] docs: 2 code examples not Pygmented (syntax color coded) In-Reply-To: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> Message-ID: <1333748870.68.0.453044166846.issue14503@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> needs patch title: docs:Code not highlighted -> docs: 2 code examples not Pygmented (syntax color coded) type: -> behavior versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 7 02:19:56 2012 From: report at bugs.python.org (py.user) Date: Sat, 07 Apr 2012 00:19:56 +0000 Subject: [docs] [issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers Message-ID: <1333757996.58.0.360922081437.issue14519@psf.upfronthosting.co.za> New submission from py.user : http://docs.python.org/py3k/library/re.html#simulating-scanf 0[xX][\dA-Fa-f]+ -> (0[xX])?[\dA-Fa-f]+ ---------- assignee: docs at python components: Documentation, Regular Expressions messages: 157711 nosy: docs at python, ezio.melotti, mrabarnett, py.user priority: normal severity: normal status: open title: In re's examples the example with scanf() contains wrong analog for %x, %X specifiers versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 7 04:32:17 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 07 Apr 2012 02:32:17 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1333765937.29.0.197499608927.issue14502@psf.upfronthosting.co.za> R. David Murray added the comment: I, on the other hand, would prefer if it were made part of the API contract that an error is raised, and to fix any stdlib implementations *of that API* that don't conform to that. (That is, locks from other modules may well not follow that API, and their documentation should cover their API.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 7 04:53:30 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 07 Apr 2012 02:53:30 +0000 Subject: [docs] [issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers In-Reply-To: <1333757996.58.0.360922081437.issue14519@psf.upfronthosting.co.za> Message-ID: <1333767210.2.0.654825041536.issue14519@psf.upfronthosting.co.za> R. David Murray added the comment: The documentation appears to be correct to me. Can you demonstrate your suggestion with some examples? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 7 05:17:38 2012 From: report at bugs.python.org (py.user) Date: Sat, 07 Apr 2012 03:17:38 +0000 Subject: [docs] [issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers In-Reply-To: <1333757996.58.0.360922081437.issue14519@psf.upfronthosting.co.za> Message-ID: <1333768658.65.0.282231880942.issue14519@psf.upfronthosting.co.za> py.user added the comment: the prefix "0x" is not necessary for the %x specifier in C if the pattern will see "ABC", it will not match with it, but it should match ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 7 05:19:41 2012 From: report at bugs.python.org (py.user) Date: Sat, 07 Apr 2012 03:19:41 +0000 Subject: [docs] [issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers In-Reply-To: <1333757996.58.0.360922081437.issue14519@psf.upfronthosting.co.za> Message-ID: <1333768781.49.0.129115613351.issue14519@psf.upfronthosting.co.za> py.user added the comment: #include int main(void) { unsigned n; scanf("%x", &n); printf("%u\n", n); return 0; } [guest at localhost c]$ .ansi t.c -o t [guest at localhost c]$ ./t 0xa 10 [guest at localhost c]$ ./t a 10 [guest at localhost c]$ [guest at localhost c]$ alias .ansi alias .ansi='gcc -ansi -pedantic -Wall' [guest at localhost c]$ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 7 06:14:28 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 07 Apr 2012 04:14:28 +0000 Subject: [docs] [issue13708] Document ctypes.wintypes In-Reply-To: <1325644438.51.0.00118311970114.issue13708@psf.upfronthosting.co.za> Message-ID: <1333772068.04.0.762826991116.issue13708@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 7 19:23:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 07 Apr 2012 17:23:06 +0000 Subject: [docs] [issue14511] _static/opensearch.xml for Python 3.2 docs directs searches to 3.3 docs In-Reply-To: <1333640035.04.0.466278675781.issue14511@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 7f123dec2731 by Georg Brandl in branch '3.2': Closes #14511: fix wrong opensearch link for 3.2 docs. http://hg.python.org/cpython/rev/7f123dec2731 New changeset 57a8a8f5e0bc by Georg Brandl in branch 'default': Closes #14511: merge with 3.2 http://hg.python.org/cpython/rev/57a8a8f5e0bc ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 7 19:59:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 07 Apr 2012 17:59:01 +0000 Subject: [docs] [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1333821541.99.0.813560733812.issue10376@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 8 12:05:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 08 Apr 2012 10:05:38 +0000 Subject: [docs] [issue14528] Document whether strings implement __iter__ Message-ID: <1333879538.06.0.592518387164.issue14528@psf.upfronthosting.co.za> New submission from Chris Jerdonek : While converting code from Python 2 to Python 3, I came across the "gotcha" that strings implement __iter__ in Python 3 but not in Python 2. Looking through the documentation, I don't seem to see anything like this mentioned in the library portion of either Python 2 or 3's documentation: http://docs.python.org/library/stdtypes.html#iterator-types http://docs.python.org/py3k/library/stdtypes.html#iterator-types Or in the documentation describing differences between 2 and 3: http://docs.python.org/release/3.0.1/whatsnew/3.0.html In fact, the Python 2 and 3 sections on iterator types seem largely the same. Python 2's documentation even seems a bit misleading in this regard. At the beginning of this section, it says, "Sequences, described below in more detail, always support the iteration methods [of which __iter__() is the main one]." And str and unicode are the first two types mentioned in that next section on sequence types. Here is a blog post I came across about this issue: http://plope.com/Members/chrism/python_2_vs_python_3_str_iter I think it would be worth highlighting this issue somewhere in the Python documentation, or at least acknowledging the change (unless I'm simply looking in the wrong place, in which case maybe it should be made more visible). ---------- assignee: docs at python components: Documentation messages: 157783 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: Document whether strings implement __iter__ type: enhancement 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 Sun Apr 8 12:16:36 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 08 Apr 2012 10:16:36 +0000 Subject: [docs] [issue14528] Document whether strings implement __iter__ In-Reply-To: <1333879538.06.0.592518387164.issue14528@psf.upfronthosting.co.za> Message-ID: <1333880196.2.0.181569517585.issue14528@psf.upfronthosting.co.za> Georg Brandl added the comment: Why is it so important if strings implement __iter__? They are iterable in both versions, since iteration falls back on __getitem__ if no __iter__ is defined. For user code it is irrelevant which of the iteration protocols is present. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 8 12:39:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 08 Apr 2012 10:39:17 +0000 Subject: [docs] [issue14528] Document whether strings implement __iter__ In-Reply-To: <1333879538.06.0.592518387164.issue14528@psf.upfronthosting.co.za> Message-ID: <1333881557.53.0.0156906866109.issue14528@psf.upfronthosting.co.za> Chris Jerdonek added the comment: It is not "so important." I just feel that the change should be acknowledged somewhere -- insofar as the existing user documentation on iterator types already discusses __iter__(). As it stands now, the Python 2 documentation is a bit misleading because it seems to suggest that strings implement __iter__(). With regard to falling back to __getitem__(), that might actually be worth mentioning in the section on iterator types. Up until today, I didn't know there was a distinction between a "sequence protocol" and an "iterator protocol," as discussed here, for example-- http://blog.axant.it/archives/306 For user code, the user might want different behavior depending on whether something behaves like a list. For that, they might be relying on something like the presence of __iter__(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 8 12:43:42 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 08 Apr 2012 10:43:42 +0000 Subject: [docs] [issue14528] Document whether strings implement __iter__ In-Reply-To: <1333879538.06.0.592518387164.issue14528@psf.upfronthosting.co.za> Message-ID: <1333881822.06.0.516190442809.issue14528@psf.upfronthosting.co.za> Georg Brandl added the comment: "behaves like a list" is misleading. If you mean checking for iterable-ness, calling iter() on the object is the way to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 8 13:04:02 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 08 Apr 2012 11:04:02 +0000 Subject: [docs] [issue14528] Document whether strings implement __iter__ In-Reply-To: <1333879538.06.0.592518387164.issue14528@psf.upfronthosting.co.za> Message-ID: <1333883042.23.0.670586533695.issue14528@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Okay, then that also might be worth mentioning. As it stands now, the emphasis in the section on iterator types is on __iter__() (e.g. it is the main focus of the introduction), whereas iter() is barely mentioned (only in the sections on dicts and file objects). So in addition to the suggestions above, perhaps the introduction to the section on iterator types could include a link to the iter() function with a description of its relationship to iterator types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 8 22:13:20 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 08 Apr 2012 20:13:20 +0000 Subject: [docs] [issue14528] Document whether strings implement __iter__ In-Reply-To: <1333879538.06.0.592518387164.issue14528@psf.upfronthosting.co.za> Message-ID: <1333916000.81.0.272624275655.issue14528@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, I agree with Georg, this isn't a bug, not even a documentation bug. A type is free to implement iteration either by way of __iter__ or by way of __getitem__. How it chooses to do so is an implementation detail (and different implementations have made different choices). ---------- nosy: +rhettinger resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 9 00:05:12 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 08 Apr 2012 22:05:12 +0000 Subject: [docs] [issue14528] Document whether strings implement __iter__ In-Reply-To: <1333879538.06.0.592518387164.issue14528@psf.upfronthosting.co.za> Message-ID: <1333922712.86.0.44243689005.issue14528@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Is there a mechanism for suggesting improvements to the documentation (e.g. for pedagogical reasons)? I tried to classify this as an enhancement request rather than as a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 9 01:59:03 2012 From: report at bugs.python.org (Jim Jewett) Date: Sun, 08 Apr 2012 23:59:03 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333765937.29.0.197499608927.issue14502@psf.upfronthosting.co.za> Message-ID: Jim Jewett added the comment: On Fri, Apr 6, 2012 at 10:32 PM, R. David Murray wrote: > R. David Murray added the comment: > I, on the other hand, would prefer if it were made part of the API contract that an > error is raised, and to fix any stdlib implementations *of that API* that don't conform > to that. ?(That is, locks from other modules may well not follow that API, and their > documentation should cover their API.) Do you consider it reasonable that all stdlib Locks follow that API, and change to raise either RuntimeError or a subclass? I don't feel comfortable declaring that (not even only for future feature releases), but if you do, or Guido does, or ... etc ... I'll submit patches for at least dummy_threading and logging. -jJ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 9 03:58:19 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 09 Apr 2012 01:58:19 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1333936698.99.0.254633014301.issue14502@psf.upfronthosting.co.za> R. David Murray added the comment: I think dummy_threading should be fixed (but only in 3.3, just in case it causes any backward compatibility issues with someone's code). Logging I'd leave to Vinay to decide about. I'm assuming that if any of the others devs nosy on this issue disagree with me that they will speak up :) ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 9 16:27:45 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 09 Apr 2012 14:27:45 +0000 Subject: [docs] [issue14535] three code examples in docs are not syntax highlighted Message-ID: <1333981665.2.0.806826898617.issue14535@psf.upfronthosting.co.za> New submission from Ramchandra Apte : Three code examples in http://docs.python.org/py3k/library/multiprocessing.html#examples are not syntax highlighted. ---------- assignee: docs at python components: Documentation messages: 157845 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: three code examples in docs are not syntax highlighted versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 9 20:57:48 2012 From: report at bugs.python.org (Vinay Sajip) Date: Mon, 09 Apr 2012 18:57:48 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1333997868.57.0.617708026995.issue14502@psf.upfronthosting.co.za> Vinay Sajip added the comment: Re. logging, logging._acquireLock and logging._releaseLock are not part of the public API and are undocumented at present. The case when _releaseLock does not raise an error is when threading couldn't be imported, so the _lock variable is None. I don't see the need for adding any documentation for this. Logging doesn't use dummy_thread: if threading isn't available, all lock acquisition and release operations become no-ops. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 9 21:26:27 2012 From: report at bugs.python.org (Jim Jewett) Date: Mon, 09 Apr 2012 19:26:27 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333997868.57.0.617708026995.issue14502@psf.upfronthosting.co.za> Message-ID: Jim Jewett added the comment: Vinay, The current question is what contract locks should follow, and whether all locks should follow it. Would it be acceptable for logging._releaseLock to raise a RuntimeError if the lock hadn't previously been acquired? In other words, would it be acceptable to replace the current None with a counter (and to note in comments that it should be safe from race conditions because it is only used when threading isn't available). -jJ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 9 21:31:04 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 09 Apr 2012 19:31:04 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: Message-ID: <1333999534.3379.31.camel@localhost.localdomain> Antoine Pitrou added the comment: > The current question is what contract locks should follow, and whether > all locks should follow it. Would it be acceptable for > logging._releaseLock to raise a RuntimeError if the lock hadn't > previously been acquired? I don't see the point of this discussion. We are talking about threading.Lock (and, possibly, multiprocessing.Lock), not every lock API under the sun. Especially when it's a private API... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 9 22:58:19 2012 From: report at bugs.python.org (Georg Brandl) Date: Mon, 09 Apr 2012 20:58:19 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1334005098.99.0.521723231025.issue14502@psf.upfronthosting.co.za> Georg Brandl added the comment: Agreed. Jim, I think you're trying to get consistency where none is required. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 10 04:45:34 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 10 Apr 2012 02:45:34 +0000 Subject: [docs] [issue14512] Pydocs module docs server not working on Windows. In-Reply-To: <1333645625.74.0.578211515784.issue14512@psf.upfronthosting.co.za> Message-ID: <1334025934.38.0.829383653052.issue14512@psf.upfronthosting.co.za> Nick Coghlan added the comment: Hmm, we changed a few things with the way the back end server for pydoc works in 3.2. I didn't realise there was a Windows shortcut though, and I don't know how it gets generated. It sounds like it is still using the "-g" option, which is now deprecated. If you run "pydoc -b" from a command line window, does that work correctly? ("-g" should still work as well, even though it's deprecated, but knowing whether or not "-b" is also broken may help diagnose the problem) ---------- assignee: docs at python -> components: -Documentation nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 10 08:47:03 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 10 Apr 2012 06:47:03 +0000 Subject: [docs] [issue14512] Pydocs module docs server not working on Windows. In-Reply-To: <1333645625.74.0.578211515784.issue14512@psf.upfronthosting.co.za> Message-ID: <1334040422.82.0.89261153976.issue14512@psf.upfronthosting.co.za> Terry J. Reedy added the comment: C:\Programs\Python32\Tools\Scripts>..\..\pythonw pydocgui.pyw -b has the same behavior I described. So does -g. The shortcut has been part of the Windows installation for many versions. It obviously uses pydocgui.py. C:\Programs\Python32\Lib>pydoc.py -b # starts one python.exe process # prints on the next lines in the command window Server ready at http://localhost:50695/ Server commands: [b]rowser, [q]uit server> # and opens blank localhost:50695 browser window after asking for permission for python to access local network (which I gave). 'b' at prompt opens another blank window. C:\Programs\Python32\Lib>pydoc.py -w difflib #prints wrote difflib.html #which it did, looking as expected when opened in browser, with lots of cross-links. So what it seems is not working in either case is opening the html page in the browser or connecting it to the server. C:\Programs\Python32\Lib>webbrowser.py python.org opens the page in *Internet Explorer* rather than Firefox (my default browser). pydoc tried to connect to the server in a new FF tab. When I re-ran pydoc and tried to open localhost:50695 in IE, it gave me the result of a Bing search (one help forum post), so neither browser can find anything at that url. ---------- _______________________________________ Python tracker _______________________________________ From mwd at cert.org Fri Apr 6 18:31:12 2012 From: mwd at cert.org (Michael Welsh Duggan) Date: Fri, 06 Apr 2012 12:31:12 -0400 Subject: [docs] Error in Python 3 docs for PyMethodDef Message-ID: In the Python 3.2.2 documentation (and earlier Python 3 versions), in the Python/C API Reference Manual, chapter Object Implementation Support, the documentation for PyMethodDef says: The ml_flags field is a bitfield which can include the following flags. The individual flags indicate either a calling convention or a binding convention. Of the calling convention flags, only METH_VARARGS and METH_KEYWORDS can be combined (but note that METH_KEYWORDS alone is equivalent to METH_VARARGS | METH_KEYWORDS). The bit in the parenthetical is incorrect. If you take a look at PyCFunction_Call in Objects/methodobject.c, you will find a switch for METH_VARARGS | METH_KEYWORDS, but no switch for METH_KEYWORDS. Hence, using METH_KEYWORDS will land you with a SystemError that complains about METH_OLDARGS. This is either a bug in the documentation, or a bug in Python. In this case, since the code has persisted through three major revisions of Python 3, I suggest that the bug _is_ in the documentation (whether it should be or not), since changing the code for this at this late date means a programmer has to use METH_VARARGS | METH_KEYWORDS anyway for compatibility. It may be work pointing out specifically in the documentation that just using METH_KEYWORDS will not work. -- Michael Welsh Duggan (mwd at cert.org) From bluejag69 at gmail.com Sat Apr 7 02:03:41 2012 From: bluejag69 at gmail.com (Jeff Little) Date: Fri, 6 Apr 2012 17:03:41 -0700 Subject: [docs] Ipython intalll problems Message-ID: <02f001cd1451$e53e3c20$afbab460$@gmail.com> Hello I am attempting to install ipython. I am using windows 7 I have downloaded the program a few times, and cannot get to the ipython window. Can you point me in the right direction? Best Regards Jeff JD Little Bakersfield California, 93309 Phone: 661-864-4710(direct), 661-864-4705(fax) e-mail address bluejag69 at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From mdesm2005 at yahoo.com Sun Apr 8 20:49:58 2012 From: mdesm2005 at yahoo.com (marc desmarais) Date: Sun, 8 Apr 2012 11:49:58 -0700 (PDT) Subject: [docs] Should I remove previous versions of python before installing a newer one? Message-ID: <1333910998.38323.YahooMailNeo@web126102.mail.ne1.yahoo.com> I can't seem to find any advice regarding the installation of new versions of python. Should I remove previous versions of python before installing a newer one? For instance, should I remove 2.5 before installing 2.7? I would recommend that this advice be added to the "download" web page ? Marc Desmarais -------------- next part -------------- An HTML attachment was scrubbed... URL: From sateeshpyper at gmail.com Tue Apr 10 19:38:58 2012 From: sateeshpyper at gmail.com (Sateesh Kumar) Date: Tue, 10 Apr 2012 23:08:58 +0530 Subject: [docs] In unittest module name of the parameters for assert* methods can be descriptive Message-ID: In the unittest module name of parameters passed to many of the 'assert*' methods can be descriptive. For example the signature of the method 'assertEqual' is as below: assertEqual(first,?second,?msg=None) For users of this method, the above signature leads to the question in what order the arguments needs to be passed. Does the first argument be 'expected' result and second be 'actual' result or is it vice-versa. This probable confusion for the users of this method can be reduced if the names of parameters is descriptive. For example the above method signature can be modified as: assertEqual(expected,?actual,?msg=None) This conveys clearly to the user that the first argument should be the expected result and the second argument should be the actual result. The signature of the following assert* methods : assertNotEqual, assertIs, assertIsNot, assertAlmostEqual, assertNotAlmostEqual, assertCountEqual, assertMultiLineEqual, assertSequenceEqual, assertListEqual, assertTupleEqual, assertSetEqual, assertDictEqual can be modified in a similar manner. thanks and regards, sateesh From sandro.tosi at gmail.com Tue Apr 10 23:36:28 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 10 Apr 2012 23:36:28 +0200 Subject: [docs] Ipython intalll problems In-Reply-To: <02f001cd1451$e53e3c20$afbab460$@gmail.com> References: <02f001cd1451$e53e3c20$afbab460$@gmail.com> Message-ID: Hello Jeff, On Sat, Apr 7, 2012 at 02:03, Jeff Little wrote: > I am attempting to install ipython. this mailing list is about bugs/enhancements to the Python documentation, and your report is not matching the description. I suggest to seek help in a users support forum like python-lists at 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 sandro.tosi at gmail.com Tue Apr 10 23:38:31 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 10 Apr 2012 23:38:31 +0200 Subject: [docs] Should I remove previous versions of python before installing a newer one? In-Reply-To: <1333910998.38323.YahooMailNeo@web126102.mail.ne1.yahoo.com> References: <1333910998.38323.YahooMailNeo@web126102.mail.ne1.yahoo.com> Message-ID: Hello Marc, On Sun, Apr 8, 2012 at 20:49, marc desmarais wrote: > I can't seem to find any advice regarding the installation of new versions > of python. > > Should I remove previous versions of python before installing a newer one? > > For instance, should I remove 2.5 before installing 2.7? Nope. > I would recommend that this advice be added to the "download" web page Personally I don't find the need to specify it, as I generally take that's allowed what's not explicitly forbidden. Regards, -- 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 Wed Apr 11 08:01:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 11 Apr 2012 06:01:21 +0000 Subject: [docs] [issue14545] html module should not be available in Python 3.1 In-Reply-To: <1334121971.71.0.628267633735.issue14545@psf.upfronthosting.co.za> Message-ID: <1334124081.69.0.648927886112.issue14545@psf.upfronthosting.co.za> Ezio Melotti added the comment: The doc for the html module was added in 5633af590057 (see #2830) and it was previously undocumented even if it was importable. Moving the versionadded under html.escape sounds good to me. As a side note, it would be better to do try: # Python 3.2 deprecates cgi.escape() and adds html.escape() as a replacement. from html import escape except ImportError: from cgi import escape rather than importing the whole cgi module as "html" just to use the escape function. ---------- assignee: -> docs at python components: +Documentation -None keywords: +easy nosy: +docs at python, ezio.melotti stage: -> needs patch versions: +Python 3.2, Python 3.3 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 11 08:50:45 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 11 Apr 2012 06:50:45 +0000 Subject: [docs] [issue14545] html module should not be available in Python 3.1 In-Reply-To: <1334121971.71.0.628267633735.issue14545@psf.upfronthosting.co.za> Message-ID: <1334127045.13.0.350786543149.issue14545@psf.upfronthosting.co.za> Georg Brandl added the comment: "html" is a package. The "html.parser" module, which was already in 3.0, cannot be importable without a "html" package, so in all 3.x versions there was at least an empty html/__init__.py. That said, I have no objection to Ezio's suggestion. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 11 11:23:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 11 Apr 2012 09:23:38 +0000 Subject: [docs] [issue14545] html module should not be available in Python 3.1 In-Reply-To: <1334121971.71.0.628267633735.issue14545@psf.upfronthosting.co.za> Message-ID: <1334136218.27.0.366398968097.issue14545@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Ezio, I appreciate the suggestion/tip. Thanks. Regarding Georg's clarification that '"html" is a package,' I don't know if that was intended to correct my comment, Ezio's comment, the docs, or all of the above. In any case, that point should also be corrected in the docs as the docs currently say about html, "This *module* defines utilities to manipulate HTML." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 11 11:38:51 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 11 Apr 2012 09:38:51 +0000 Subject: [docs] [issue14545] html module should not be available in Python 3.1 In-Reply-To: <1334121971.71.0.628267633735.issue14545@psf.upfronthosting.co.za> Message-ID: <1334137131.8.0.13368758329.issue14545@psf.upfronthosting.co.za> Georg Brandl added the comment: The comment that "html" was a package was not meant as a correction, but as an explanation why it already exists previous to its status as an official "module" in 3.2. No correction to "package"is needed. ---------- _______________________________________ Python tracker _______________________________________ From cclauss at me.com Wed Apr 11 12:41:35 2012 From: cclauss at me.com (Christian Clauss) Date: Wed, 11 Apr 2012 12:41:35 +0200 Subject: [docs] Suggestion on docs for webbrowser Message-ID: <14C0BC82-E12F-4FEB-B554-FC6A800C2224@me.com> On http://docs.python.org/library/webbrowser.html There is the text: The script webbrowser can be used as a command-line interface for the module. It accepts an URL as the argument. It accepts the following optional parameters: -n opens the URL in a new browser window, if possible; -t opens the URL in a new browser page (?tab?). The options are, naturally, mutually exclusive. It might be helpful to readers if you could add some sample syntax such as: $ python -m webbrowser -t "http://www.python.org" -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Wed Apr 11 18:36:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 11 Apr 2012 16:36:49 +0000 Subject: [docs] [issue14545] html module should not be available in Python 3.1 In-Reply-To: <1334121971.71.0.628267633735.issue14545@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 2776ccf003cc by Georg Brandl in branch '3.2': Closes #14545: make clearer what was added. http://hg.python.org/cpython/rev/2776ccf003cc New changeset f5f8a7fd881c by Georg Brandl in branch 'default': #14545: merge 3.2 http://hg.python.org/cpython/rev/f5f8a7fd881c ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 11 19:48:07 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 11 Apr 2012 17:48:07 +0000 Subject: [docs] [issue14515] tempfile.TemporaryDirectory documented as returning object but returns name In-Reply-To: <1333678068.19.0.790451967958.issue14515@psf.upfronthosting.co.za> Message-ID: <1334166487.84.0.640101436272.issue14515@psf.upfronthosting.co.za> R. David Murray added the comment: I misread the docs. They aren't wrong, but it is still the case that they don't mention that the directory name is what you get on entry to the context, which is what led to my confusion. Here's a patch. ---------- keywords: +patch nosy: +ncoghlan Added file: http://bugs.python.org/file25179/tempdir-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 11 23:35:55 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Wed, 11 Apr 2012 21:35:55 +0000 Subject: [docs] [issue14552] test module: remove repetition Message-ID: <1334180155.5.0.714693409312.issue14552@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- assignee: docs at python components: Documentation files: repetition.diff keywords: patch nosy: docs at python, tshepang priority: normal severity: normal status: open title: test module: remove repetition Added file: http://bugs.python.org/file25182/repetition.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 11 23:38:40 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Wed, 11 Apr 2012 21:38:40 +0000 Subject: [docs] [issue14553] http.server module: grammar fix Message-ID: <1334180320.05.0.950165070722.issue14553@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- assignee: docs at python components: Documentation files: grammar.diff keywords: patch nosy: docs at python, tshepang priority: normal severity: normal status: open title: http.server module: grammar fix versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file25183/grammar.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 12 00:02:35 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Wed, 11 Apr 2012 22:02:35 +0000 Subject: [docs] [issue14554] test module: correction Message-ID: <1334181755.32.0.776262768406.issue14554@psf.upfronthosting.co.za> New submission from Tshepang Lekhonkhobe : add missing '\n' ---------- assignee: docs at python components: Documentation messages: 158082 nosy: docs at python, tshepang priority: normal severity: normal status: open title: test module: correction versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 12 01:16:06 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 11 Apr 2012 23:16:06 +0000 Subject: [docs] [issue14554] test module: correction In-Reply-To: <1334181755.32.0.776262768406.issue14554@psf.upfronthosting.co.za> Message-ID: <1334186166.63.0.475087340919.issue14554@psf.upfronthosting.co.za> Georg Brandl added the comment: I think a patch is missing :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 12 02:41:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 12 Apr 2012 00:41:07 +0000 Subject: [docs] [issue14553] http.server module: grammar fix Message-ID: New submission from Roundup Robot : New changeset ed5788424c34 by R David Murray in branch '3.2': #14553: fix word order. http://hg.python.org/cpython/rev/ed5788424c34 New changeset bd353f12c007 by R David Murray in branch 'default': Merge doc fixes #14553 and #14552. http://hg.python.org/cpython/rev/bd353f12c007 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 12 02:43:06 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 12 Apr 2012 00:43:06 +0000 Subject: [docs] [issue14553] http.server module: grammar fix In-Reply-To: Message-ID: <1334191386.23.0.426687314459.issue14553@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks. ---------- nosy: +r.david.murray resolution: -> fixed status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 12 02:44:48 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 12 Apr 2012 00:44:48 +0000 Subject: [docs] [issue14552] test module: remove repetition Message-ID: <1334191488.24.0.83173188602.issue14552@psf.upfronthosting.co.za> New submission from R. David Murray : 2.7 d60ef141e090 3.2 f25fb7e1d076 3.3 bd353f12c007 Thanks. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 12 03:31:16 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 12 Apr 2012 01:31:16 +0000 Subject: [docs] [issue14547] Python symlink to script behaves unexpectedly In-Reply-To: <1334155369.29.0.554259242167.issue14547@psf.upfronthosting.co.za> Message-ID: <1334194276.8.0.515224055782.issue14547@psf.upfronthosting.co.za> Nick Coghlan added the comment: Specifically, we end up calling os.realpath() (or the C level equivalent) when initialising __main__.__file__ and sys.path[0]. Agreed this behaviour should be documented (and tested!) explicitly. ---------- assignee: -> docs at python components: +Documentation, Tests nosy: +docs at python stage: -> needs patch type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 12 04:09:55 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 12 Apr 2012 02:09:55 +0000 Subject: [docs] [issue14515] tempfile.TemporaryDirectory documented as returning object but returns name In-Reply-To: <1333678068.19.0.790451967958.issue14515@psf.upfronthosting.co.za> Message-ID: <1334196595.93.0.670255266904.issue14515@psf.upfronthosting.co.za> Nick Coghlan added the comment: Change looks fine to me - go ahead and commit it :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 12 07:26:15 2012 From: report at bugs.python.org (Jeffrey Finkelstein) Date: Thu, 12 Apr 2012 05:26:15 +0000 Subject: [docs] [issue14558] Documentation for unittest.main does not describe some keyword arguments. Message-ID: <1334208375.3.0.0230518732022.issue14558@psf.upfronthosting.co.za> New submission from Jeffrey Finkelstein : Documentation for unittest.main, at , does not describe the keyword arguments 'module', 'argv', or 'testLoader'. ---------- assignee: docs at python components: Documentation messages: 158104 nosy: docs at python, jfinkels priority: normal severity: normal status: open title: Documentation for unittest.main does not describe some keyword arguments. type: enhancement 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 Thu Apr 12 07:52:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 12 Apr 2012 05:52:49 +0000 Subject: [docs] [issue14558] Documentation for unittest.main does not describe some keyword arguments. In-Reply-To: <1334208375.3.0.0230518732022.issue14558@psf.upfronthosting.co.za> Message-ID: <1334209969.41.0.596334158132.issue14558@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, michael.foord stage: -> needs patch versions: -Python 2.6, Python 3.1, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 12 09:42:10 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Thu, 12 Apr 2012 07:42:10 +0000 Subject: [docs] [issue14554] test module: correction In-Reply-To: <1334181755.32.0.776262768406.issue14554@psf.upfronthosting.co.za> Message-ID: <1334216530.63.0.859128516145.issue14554@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- keywords: +patch Added file: http://bugs.python.org/file25187/correction.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 13 04:42:27 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 13 Apr 2012 02:42:27 +0000 Subject: [docs] [issue14570] Document json "sort_keys" parameter properly Message-ID: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> New submission from Nick Coghlan : The json "sort_keys" parameter is actually supported as an argument to dump() and dumps() (and is used that way in the examples), but is only documented as an argument to the JSONEncoder constructor. ---------- assignee: docs at python components: Documentation keywords: easy messages: 158194 nosy: docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Document json "sort_keys" parameter properly type: enhancement versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 13 08:38:27 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 13 Apr 2012 06:38:27 +0000 Subject: [docs] [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1334299107.57.0.396015589023.issue14570@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 13 19:02:38 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 13 Apr 2012 17:02:38 +0000 Subject: [docs] [issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers In-Reply-To: <1333757996.58.0.360922081437.issue14519@psf.upfronthosting.co.za> Message-ID: <1334336557.92.0.180780675871.issue14519@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I checked Standard C by Plauger & Brodie and as I read it, it agrees with py.user and his C compiler. For stdlib strtol() and strtoul(), the 0x/0X prefixes are accepted but optional for explicit base 16. If base is given as 0, they are accepted and set the base to 16 (which is otherwise 10). Except for %i, Xscanf functions apparently call either of the above with an explicit base, which is 16 for the %x specifiers. ---------- keywords: +easy, patch nosy: +terry.reedy stage: -> needs patch versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 13 19:22:03 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 13 Apr 2012 17:22:03 +0000 Subject: [docs] [issue14535] three code examples in docs are not syntax highlighted In-Reply-To: <1333981665.2.0.806826898617.issue14535@psf.upfronthosting.co.za> Message-ID: <1334337723.52.0.837181150054.issue14535@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 13 19:42:27 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 13 Apr 2012 17:42:27 +0000 Subject: [docs] [issue14535] three code examples in docs are not syntax highlighted In-Reply-To: <1333981665.2.0.806826898617.issue14535@psf.upfronthosting.co.za> Message-ID: <1334338947.07.0.037753074095.issue14535@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: This is probably because Sphinx can't detect that those are Python sources, so my patch forces it to recognize it as such. ---------- keywords: +patch Added file: http://bugs.python.org/file25204/highlight-code.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 13 19:44:05 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 13 Apr 2012 17:44:05 +0000 Subject: [docs] [issue14554] test module: correction In-Reply-To: <1334181755.32.0.776262768406.issue14554@psf.upfronthosting.co.za> Message-ID: <1334339045.09.0.984836602645.issue14554@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 13 19:44:53 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 13 Apr 2012 17:44:53 +0000 Subject: [docs] [issue14547] Python symlink to script behaves unexpectedly In-Reply-To: <1334155369.29.0.554259242167.issue14547@psf.upfronthosting.co.za> Message-ID: <1334339093.84.0.0515952326493.issue14547@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 13 19:52:02 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 13 Apr 2012 17:52:02 +0000 Subject: [docs] [issue14535] three code examples in docs are not syntax highlighted In-Reply-To: <1333981665.2.0.806826898617.issue14535@psf.upfronthosting.co.za> Message-ID: <1334339522.56.0.459026707125.issue14535@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM ---------- nosy: +eric.araujo stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 14 04:52:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 14 Apr 2012 02:52:43 +0000 Subject: [docs] [issue14535] three code examples in docs are not syntax highlighted In-Reply-To: <1333981665.2.0.806826898617.issue14535@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 635966f6d3de by Ezio Melotti in branch '3.2': #14535: fix code highlight in multiprocessing examples. Patch by Tshepang Lekhonkhobe. http://hg.python.org/cpython/rev/635966f6d3de New changeset 957e2c71beef by Ezio Melotti in branch 'default': #14535: merge with 3.2. http://hg.python.org/cpython/rev/957e2c71beef ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 14 04:56:04 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 14 Apr 2012 02:56:04 +0000 Subject: [docs] [issue14535] three code examples in docs are not syntax highlighted In-Reply-To: <1333981665.2.0.806826898617.issue14535@psf.upfronthosting.co.za> Message-ID: <1334372164.17.0.668884056455.issue14535@psf.upfronthosting.co.za> Ezio Melotti added the comment: I tried the attached patch but it didn't work for me. Using "python3" instead of "python" seemed to fix the problem. I also updated another "python" to use "python3". Thanks for the report and the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 14 06:10:34 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 14 Apr 2012 04:10:34 +0000 Subject: [docs] [issue14554] test module: correction In-Reply-To: <1334181755.32.0.776262768406.issue14554@psf.upfronthosting.co.za> Message-ID: <1334376634.15.0.683110836945.issue14554@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> commit review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 14 06:34:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 14 Apr 2012 04:34:59 +0000 Subject: [docs] [issue14393] Incorporate Guide to Magic Methods? In-Reply-To: <1332493295.71.0.816804721304.issue14393@psf.upfronthosting.co.za> Message-ID: <1334378099.91.0.961615494539.issue14393@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 14 08:40:06 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 14 Apr 2012 06:40:06 +0000 Subject: [docs] [issue14535] three code examples in docs are not syntax highlighted In-Reply-To: <1333981665.2.0.806826898617.issue14535@psf.upfronthosting.co.za> Message-ID: <1334385606.68.0.622606588036.issue14535@psf.upfronthosting.co.za> Georg Brandl added the comment: Ezio: That's a "bug" in Sphinx; even when the language is selected explicitly as "python", it will try to parse the code. It is fixed in a later Sphinx version. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From aaqqxx1910 at gmail.com Wed Apr 11 16:45:13 2012 From: aaqqxx1910 at gmail.com (XingHua Ma) Date: Wed, 11 Apr 2012 22:45:13 +0800 Subject: [docs] Py_Initialize() , use matplotlib , Py_Finalize() then Py_Initialize() , then matplotlib , it doesn't works and go wrong Message-ID: ---------------------------------- test.cpp: #include void test2() { // int b; Py_Initialize(); PyRun_SimpleString(?from matplotlib.pyplot import plotfile\n? ?from pylab import show\n? ?plotfile(?/home/huskier/Desktop/data?)\n?//data file is just nums of 10 rows ?show()\n?); Py_Finalize(); } int main(int argc,char *argv[]) { test2(); test2(); return 0; } ------------------------ How to work well?And the memory cann't free when use test2() in QT,if you plot many times at once. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: draw_test.tar Type: application/x-tar Size: 266240 bytes Desc: not available URL: From mainka at antidot.net Wed Apr 11 23:16:30 2012 From: mainka at antidot.net (=?UTF-8?B?SsOpcsO0bWUgTWFpbmth?=) Date: Wed, 11 Apr 2012 23:16:30 +0200 Subject: [docs] Small typo in documentation Message-ID: <4F85F4AE.6000606@antidot.net> Hi, In http://docs.python.org/py3k/library/random.html A common task is to make a random.choice() with weighted probababilites. Should be A common task is to make a random.choice() with weighted probabilities. J. -- Antidot - Solutions de recherche et d'acc?s ? l'information T?l : +33 4 72 76 31 49 Gsm: +33 6 78 88 57 44 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sinic at sinic.name Thu Apr 12 19:39:25 2012 From: sinic at sinic.name (Simon Nicolussi) Date: Thu, 12 Apr 2012 19:39:25 +0200 Subject: [docs] Download links are broken for 2.6.8 documentation Message-ID: <20120412173925.GA2074@blues> Hello! All the downloads on http://docs.python.org/release/2.6.8/download.html are giving me a 404. Or maybe I'm too early, just thought I'll let you know. -- Simon Nicolussi, http://www.sinic.name/ -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 490 bytes Desc: not available URL: From johnhmcm at gmail.com Fri Apr 13 18:04:14 2012 From: johnhmcm at gmail.com (John McMicking) Date: Fri, 13 Apr 2012 12:04:14 -0400 Subject: [docs] Tutorial/Bug Report Message-ID: <004201cd198f$13a30180$3ae90480$@gmail.com> Well I can't report a bug with the program, because by trying to use your tutorial, I haven't gotten that far yet. That has got to be the absolute worst tutorial I have ever seen! It tells you how to end a program that it has not yet told you how to start! I installed Python on a Windows7 computer. On my start menu, I have three items in the Python folder. Which one of those was I learning how to end?! Before that, we are told how to add Python to the path. Why are we doing that? Why didn't the installer do that already? John -------------- next part -------------- An HTML attachment was scrubbed... URL: From morph at debian.org Sat Apr 14 12:56:09 2012 From: morph at debian.org (Sandro Tosi) Date: Sat, 14 Apr 2012 12:56:09 +0200 Subject: [docs] Py_Initialize() , use matplotlib , Py_Finalize() then Py_Initialize() , then matplotlib , it doesn't works and go wrong In-Reply-To: References: Message-ID: Hello XingHua, this mailing list is about bugs/enhancements to Python documentation, but your email doesn't fall into this description. I'd suggest to contact a users support forum, such as http://mail.python.org/mailman/listinfo/python-list Regards, Sandro On Wed, Apr 11, 2012 at 16:45, XingHua Ma wrote: > ---------------------------------- > > test.cpp: > > #include > void test2() > > { > // int b; > Py_Initialize(); > PyRun_SimpleString(?from matplotlib.pyplot import plotfile\n? > ?from pylab import show\n? > ?plotfile(?/home/huskier/Desktop/data?)\n?//data file is just nums of 10 > rows > ?show()\n?); > Py_Finalize(); > } > > int > main(int argc,char *argv[]) > { > test2(); > test2(); > return 0; > } > > ------------------------ > > How to work well?And the memory cann't free when use test2() in QT,if you > plot many times at once. > > > _______________________________________________ > 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 sandro.tosi at gmail.com Sat Apr 14 15:55:07 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sat, 14 Apr 2012 15:55:07 +0200 Subject: [docs] Download links are broken for 2.6.8 documentation In-Reply-To: <20120412173925.GA2074@blues> References: <20120412173925.GA2074@blues> Message-ID: Hello Simon, On Thu, Apr 12, 2012 at 19:39, Simon Nicolussi wrote: > Hello! > > All the downloads on http://docs.python.org/release/2.6.8/download.html > are giving me a 404. Or maybe I'm too early, just thought I'll let you > know. I'm now able to download all the archives listed there. 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 Sat Apr 14 16:03:09 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sat, 14 Apr 2012 16:03:09 +0200 Subject: [docs] Small typo in documentation In-Reply-To: <4F85F4AE.6000606@antidot.net> References: <4F85F4AE.6000606@antidot.net> Message-ID: hello J?r?me On Wed, Apr 11, 2012 at 23:16, J?r?me Mainka wrote: > Hi, > > In http://docs.python.org/py3k/library/random.html > > A common task is to make a random.choice() with weighted probababilites. > > Should be > > A common task is to make a random.choice() with weighted probabilities. Thanks for your email! this has now been fixed in: http://hg.python.org/cpython/rev/38f8c779f5f8 http://hg.python.org/cpython/rev/e730da0cd489 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 Sat Apr 14 16:07:03 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sat, 14 Apr 2012 16:07:03 +0200 Subject: [docs] Tutorial/Bug Report In-Reply-To: <004201cd198f$13a30180$3ae90480$@gmail.com> References: <004201cd198f$13a30180$3ae90480$@gmail.com> Message-ID: Hello John, On Fri, Apr 13, 2012 at 18:04, John McMicking wrote: > Well I can?t report a bug with the program, because by trying to use your > tutorial, I haven?t gotten that far yet.? That has got to be the absolute > worst tutorial I have ever seen!? It tells you how to end a program that it > has not yet told you how to start!? I installed Python on a Windows7 > computer. On my start menu, I have three items in the Python folder.? Which > one of those was I learning how to end?!? Before that, we are told how to > add Python to the path.? Why are we doing that?? Why didn?t the installer do > that already? I have to admit I don't understand exactly what are you talking about, for example: - what tutorial (link or precise reference are needed)? - what program is this about? - what version of python you have installed? - what is the program you want to report a bug with? More over, just blaming a tutorial to be imprecise, without giving details about how you would like to see fixed, won't help that much. Regards, -- 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 Sun Apr 15 00:10:06 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 14 Apr 2012 22:10:06 +0000 Subject: [docs] [issue14006] Improve the documentation of xml.etree.ElementTree In-Reply-To: <1329190125.69.0.69162565954.issue14006@psf.upfronthosting.co.za> Message-ID: <1334441406.86.0.401256601887.issue14006@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 15 02:18:43 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sun, 15 Apr 2012 00:18:43 +0000 Subject: [docs] [issue12436] Missing items in installation/setup instructions In-Reply-To: <1309305395.29.0.101516779086.issue12436@psf.upfronthosting.co.za> Message-ID: <1334449123.97.0.670398764435.issue12436@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 15 04:04:33 2012 From: report at bugs.python.org (Guy Taylor) Date: Sun, 15 Apr 2012 02:04:33 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments Message-ID: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> New submission from Guy Taylor : The Python docs suggest that io.IOBase.truncate' should take a keyword argument of 'size'. However this causes a 'TypeError': TypeError: truncate() takes no keyword arguments Suggest that the docs are changed to 'truncate(size)' or CPython is changed to allow the keyword. http://docs.python.org/py3k/library/io.html?highlight=truncate#io.IOBase.truncate http://docs.python.org/library/io.html?highlight=truncate#io.IOBase.truncate ---------- assignee: docs at python components: Documentation, Interpreter Core files: test.py messages: 158308 nosy: TheBiggerGuy, docs at python priority: normal severity: normal status: open title: TypeError: truncate() takes no keyword arguments type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file25219/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 15 05:58:31 2012 From: report at bugs.python.org (py.user) Date: Sun, 15 Apr 2012 03:58:31 +0000 Subject: [docs] [issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers In-Reply-To: <1333757996.58.0.360922081437.issue14519@psf.upfronthosting.co.za> Message-ID: <1334462311.71.0.967949320169.issue14519@psf.upfronthosting.co.za> py.user added the comment: the same problem in the %o analog valid strings for the %x specifier of scanf(): "+0xabc" "-0xabc" "+abc" "-abc" valid strings for the %o specifier of scanf(): "+0123" "-0123" "+123" "-123" how to patch the %x specifier: 0[xX][\dA-Fa-f]+ -> [-+]?(0[xX])?[\dA-Fa-f]+ the %o specifier: 0[0-7]* -> [-+]?[0-7]+ ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Sun Apr 15 12:46:55 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 15 Apr 2012 12:46:55 +0200 Subject: [docs] In unittest module name of the parameters for assert* methods can be descriptive In-Reply-To: References: Message-ID: Hello Sateesh, thanks for your email On Tue, Apr 10, 2012 at 19:38, Sateesh Kumar wrote: > In the unittest module name of parameters passed to many of the > 'assert*' methods can be descriptive. > > For example the signature of the method 'assertEqual' is as below: > ? ?assertEqual(first,?second,?msg=None) > > For users of this method, the above signature leads to the question > in what order the arguments needs to be passed. Does the first argument > be 'expected' result and second ?be 'actual' result or is it vice-versa. In an equality test, does it matter? if A=B, then B=A given it's a symmetric relation. > This probable confusion for the users of this method can be reduced if > the names of parameters is descriptive. For example the above method > signature can be modified as: > ? ? ?assertEqual(expected,?actual,?msg=None) I don't think it's the right change: this will give the false information that the first argument must be what you expect and the second what you got, which is not the case. > This conveys clearly to the user that the first argument should be the expected > result and the second argument should be the actual result. ditto Regards, -- 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 Mon Apr 16 03:07:06 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 16 Apr 2012 01:07:06 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments In-Reply-To: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> Message-ID: <1334538426.22.0.3250724947.issue14586@psf.upfronthosting.co.za> R. David Murray added the comment: The suggested doc change won't work, since that would imply that the size argument was required. We'd have to use the old truncate([size]) notation. Supporting it as a keyword argument is probably to be preferred, but someone will have to write the patch :) ---------- nosy: +pitrou, r.david.murray stage: -> needs patch versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 09:47:43 2012 From: report at bugs.python.org (Guy Taylor) Date: Mon, 16 Apr 2012 07:47:43 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments In-Reply-To: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> Message-ID: <1334562463.88.0.9542912452.issue14586@psf.upfronthosting.co.za> Guy Taylor added the comment: What ever change is made to the new CPythons the old docs should be updated to prevent confusion, with truncate([size]). On fixing it for the future I would agree that supporting it as a keyword argument is preferred, as it is more pythonic (in my opinion). However this would cause ether backwards incompatibility or ambiguity in the language (ie. truncate(0, size=1) or need the deprecate, warn then removal stages taken three release cycles). Maybe the less perfect but acceptable solution is just to change the docs and wait for Python 4k for the real fix....? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 13:34:36 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 16 Apr 2012 11:34:36 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments In-Reply-To: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> Message-ID: <1334576076.01.0.629107773857.issue14586@psf.upfronthosting.co.za> R. David Murray added the comment: There wouldn't be serious backward incompatibility. Truncate(0) would still mean the same thing as truncate(size=0). I don't remember if we treat supporting the keyword form when it is doced that as a bug or not, though, so you might be right that it can't be backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 13:44:44 2012 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 16 Apr 2012 11:44:44 +0000 Subject: [docs] [issue14594] document imp.load_dynamic() Message-ID: <1334576684.12.0.825511182603.issue14594@psf.upfronthosting.co.za> New submission from Stefan Behnel : The imp.load_dynamic() function is used by third party code (e.g. Cython's pyximport) but is not currently documented. http://docs.python.org/dev/library/imp.html The latest changes to the import mechanism suggest that it should better be documented to give a hint that users can rely on it. ---------- assignee: docs at python components: Documentation messages: 158412 nosy: docs at python, scoder priority: normal severity: normal status: open title: document imp.load_dynamic() type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 15:17:43 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 16 Apr 2012 13:17:43 +0000 Subject: [docs] [issue14594] document imp.load_dynamic() In-Reply-To: <1334576684.12.0.825511182603.issue14594@psf.upfronthosting.co.za> Message-ID: <1334582263.3.0.581320631905.issue14594@psf.upfronthosting.co.za> R. David Murray added the comment: This is essentially a duplicate of issue 14551, but perhaps with a bit more weight behind it. ---------- nosy: +brett.cannon, pitrou, r.david.murray versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 15:21:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 16 Apr 2012 13:21:56 +0000 Subject: [docs] [issue14594] document imp.load_dynamic() In-Reply-To: <1334576684.12.0.825511182603.issue14594@psf.upfronthosting.co.za> Message-ID: <1334582516.27.0.327318977112.issue14594@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, let's redocument them, then :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 16:22:56 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 16 Apr 2012 14:22:56 +0000 Subject: [docs] [issue14594] document imp.load_dynamic() In-Reply-To: <1334576684.12.0.825511182603.issue14594@psf.upfronthosting.co.za> Message-ID: <1334586176.11.0.365112907241.issue14594@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, they really need to be documented in order for us to document them as deprecated if we decide we really want to remove them later. "Obsolete" is not, I think, the same as "deprecated". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 17:41:35 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 16 Apr 2012 15:41:35 +0000 Subject: [docs] [issue14594] document imp.load_dynamic() In-Reply-To: <1334576684.12.0.825511182603.issue14594@psf.upfronthosting.co.za> Message-ID: <1334590895.07.0.889364789824.issue14594@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm fine w/ documenting load_dynamic() and leaving it as-is since importlib uses the function itself (plus the frozen/builtin functions, although the frozen stuff might be simplified since they can probably just return the bytes for the frozen module instead of doing as much work in C code). But load_package(), load_source(), and load_module() need to go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 18:20:03 2012 From: report at bugs.python.org (Eric Snow) Date: Mon, 16 Apr 2012 16:20:03 +0000 Subject: [docs] [issue14594] document imp.load_dynamic() In-Reply-To: <1334576684.12.0.825511182603.issue14594@psf.upfronthosting.co.za> Message-ID: <1334593203.38.0.281430650472.issue14594@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 21:48:15 2012 From: report at bugs.python.org (Guy Taylor) Date: Mon, 16 Apr 2012 19:48:15 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments In-Reply-To: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> Message-ID: <1334605695.74.0.787635944115.issue14586@psf.upfronthosting.co.za> Guy Taylor added the comment: @murray The thing I would be worried at in both supporting truncate(0) and truncate(size=0) would be truncate(0, size=1). This could throw an exception but causes the need for extra sanity checks and introduces ambiguity in the otherwise 'only one way to do something' Python style. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 22:01:57 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 16 Apr 2012 20:01:57 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments In-Reply-To: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> Message-ID: <1334606517.36.0.351603813773.issue14586@psf.upfronthosting.co.za> R. David Murray added the comment: I think you misunderstand the way that python arguments work. If you have a function so: def func(size=None): Then func(0) and func(size=0) are equivalent, and func(0, size=0) is a TypeError because you've provided two arguments instead of just one. The C code *can* emulate this, but often doesn't (it just accepts positional arguments instead). An issue was raised about changing most C functions to support the keyword syntax, but I believe it was decided that while in general doing so is good we'd only do it on a case by case basis as they came up. See issue 8706 for more details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 23:41:06 2012 From: report at bugs.python.org (Jim Jewett) Date: Mon, 16 Apr 2012 21:41:06 +0000 Subject: [docs] [issue14601] PEP sources not available as documented Message-ID: <1334612466.63.0.59561167474.issue14601@psf.upfronthosting.co.za> New submission from Jim Jewett : PEP 12 states: """ To get the source this (or any) PEP, look at the top of the HTML page and click on the date & time on the "Last-Modified" line. It is a link to the source text in the Python repository. """ Unfortunately, the link actually goes to SVN, which only works for (older copies of) older PEPs. Following that link in a newer PEP returns a 404. http://www.python.org/dev/peps/pep-0418/ ==> http://svn.python.org/view/*checkout*/peps/trunk/pep-0418.txt ---------- assignee: docs at python components: Documentation messages: 158506 nosy: Jim.Jewett, docs at python priority: normal severity: normal status: open title: PEP sources not available as documented type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 16 23:56:04 2012 From: report at bugs.python.org (Guy Taylor) Date: Mon, 16 Apr 2012 21:56:04 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments In-Reply-To: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> Message-ID: <1334613364.86.0.938020977252.issue14586@psf.upfronthosting.co.za> Guy Taylor added the comment: Looking through cpython and trying to form a patch I found several differing interpretations of truncate: Lib/_pyio.py def truncate(self, pos=None): Modules/_io/fileio.c PyDoc_STRVAR(truncate_doc, "truncate([size: int]) ..."); A first semi-working patch is attached. This will allow: truncate() truncate(x) truncate(size=x) and fail on: truncate(x, size=x) truncate(x, size=y) Thoughts? ps. fileio_truncate is defined as (PyCFunctionWithKeywords)fileio_truncate, METH_VARARGS | METH_KEYWORDS but fails with "takes no keyword arguments". How do I fix this? ---------- keywords: +patch Added file: http://bugs.python.org/file25246/truncate.ver1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 17 00:04:34 2012 From: report at bugs.python.org (Guy Taylor) Date: Mon, 16 Apr 2012 22:04:34 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments In-Reply-To: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> Message-ID: <1334613874.51.0.471655960935.issue14586@psf.upfronthosting.co.za> Guy Taylor added the comment: Sorry had not refreshed the page to pick up the last comment. After reading more the cpython code I get what you are saying now. Not a fan of that syntax but consistency is best. This is my first time working with cpython directly, I have only worked on small python to c modules before so please say if I am barking up the wrong tree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 17 00:58:43 2012 From: report at bugs.python.org (Georg Brandl) Date: Mon, 16 Apr 2012 22:58:43 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments In-Reply-To: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> Message-ID: <1334617123.53.0.80308519999.issue14586@psf.upfronthosting.co.za> Georg Brandl added the comment: The patch is wrong: PyArg_ParseTupleAndKeywords already handles the correct assignment of positional and keyword args, and raises exceptions accordingly. Did you test that code? The question is also: why only truncate()? There are several other fileio_* methods that take VARARGS only. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 17 01:47:12 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Apr 2012 23:47:12 +0000 Subject: [docs] [issue14601] PEP sources not available as documented In-Reply-To: <1334612466.63.0.59561167474.issue14601@psf.upfronthosting.co.za> Message-ID: <1334620032.5.0.681253002687.issue14601@psf.upfronthosting.co.za> STINNER Victor added the comment: The templates have been fixed 1 year ago, when we moved from SVN to HG. I suppose that the bot has an old local copy of the template (Python scripts to compile reST to HTML). But who owns the robot? :-) ---------- nosy: +haypo, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 17 01:52:59 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 16 Apr 2012 23:52:59 +0000 Subject: [docs] [issue14601] PEP sources not available as documented In-Reply-To: <1334612466.63.0.59561167474.issue14601@psf.upfronthosting.co.za> Message-ID: <1334620379.11.0.735487461918.issue14601@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 17 11:40:31 2012 From: report at bugs.python.org (Guy Taylor) Date: Tue, 17 Apr 2012 09:40:31 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments In-Reply-To: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> Message-ID: <1334655631.53.0.204372348534.issue14586@psf.upfronthosting.co.za> Guy Taylor added the comment: @Brandl truncate() was the issue I ran into, no other reason. I have started on the rest of the IO module tho. I know the patch is not working but I ran into problems with getting cpython to change functions from positional to keyword. @all cpython | Python | Status -----------------------+-------------------------------+------- iobase_readlines | readline(limit=-1) | patch v2 iobase_readline | readlines(hint=-1) | patch v2 iobase_seek | seek(offset, whence=SEEK_SET) | patch v2 iobase_truncate | truncate(size=None) | patch v2 fileio_seek | seek(offset, whence=SEEK_SET) | patch v2 fileio_read | read(n=-1) | patch v2 textiowrapper_read | read(n=-1) | ToDo textiowrapper_readline | readline(limit=-1) | ToDo textiowrapper_seek | seek(offset, whence=SEEK_SET) | ToDo textiowrapper_truncate | truncate(size=None) | ToDo textiobase_read | read(n=-1) | ToDo textiobase_readline | readline(limit=-1) | ToDo {bufferedio.c} | | ToDo {bytesio.c} | | ToDo {stringio.c} | | ToDo ps. I am using code from within other C files and http://docs.python.org/dev/extending/extending.html#keyword-parameters-for-extension-functions to base my patch on but I still get "x()" takes no keyword arguments". What have I missed/Are the docs correct? ---------- Added file: http://bugs.python.org/file25251/truncate.ver2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 17 14:13:31 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 17 Apr 2012 12:13:31 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments In-Reply-To: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> Message-ID: <1334664811.63.0.958330188955.issue14586@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I'm glad someone else chimed in. I was going to say that I was pretty sure we had a macro for doing this, but I don't do much C level coding so I didn't have a reference handy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 17 14:14:04 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 17 Apr 2012 12:14:04 +0000 Subject: [docs] [issue14586] TypeError: truncate() takes no keyword arguments In-Reply-To: <1334455473.06.0.710562653974.issue14586@psf.upfronthosting.co.za> Message-ID: <1334664844.71.0.831273350855.issue14586@psf.upfronthosting.co.za> R. David Murray added the comment: macro, function...something automated, anyway :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 18 10:55:01 2012 From: report at bugs.python.org (Stefano Taschini) Date: Wed, 18 Apr 2012 08:55:01 +0000 Subject: [docs] [issue12947] Examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1334739301.06.0.953247289767.issue12947@psf.upfronthosting.co.za> Stefano Taschini added the comment: Concrete examples can be seen in the section http://docs.python.org/library/doctest.html#option-flags-and-directives For instance at http://docs.python.org/library/doctest.html#doctest.IGNORE_EXCEPTION_DETAIL The doctest flags present in the sources in http://docs.python.org/_sources/library/doctest.txt are all stripped. ---------- nosy: +taschini _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 18 15:52:24 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 18 Apr 2012 13:52:24 +0000 Subject: [docs] [issue12947] Examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1334757144.39.0.1751632519.issue12947@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thank you. I think it?s clear that for the docs of the doctest flags we need to display snippets with the flags. ---------- resolution: invalid -> stage: committed/rejected -> test needed status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 18 18:29:57 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 18 Apr 2012 16:29:57 +0000 Subject: [docs] [issue12633] sys.modules doc entry should reflect restrictions In-Reply-To: <1311569390.98.0.906064511142.issue12633@psf.upfronthosting.co.za> Message-ID: <1334766597.04.0.551720613775.issue12633@psf.upfronthosting.co.za> Eric Snow added the comment: The original motivator: http://mail.python.org/pipermail/python-dev/2011-July/112497.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 18 18:34:16 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 18 Apr 2012 16:34:16 +0000 Subject: [docs] [issue12633] sys.modules doc entry should reflect restrictions In-Reply-To: <1311569390.98.0.906064511142.issue12633@psf.upfronthosting.co.za> Message-ID: <1334766856.25.0.109424863322.issue12633@psf.upfronthosting.co.za> Eric Snow added the comment: also, issue 14615 is related to making sys.modules authoritative. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 18 19:12:37 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 18 Apr 2012 17:12:37 +0000 Subject: [docs] [issue14616] subprocess docs should mention pipes.quote/shlex.quote Message-ID: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> New submission from ?ric Araujo : The warning at http://docs.python.org/library/subprocess#frequently-used-arguments should IMO recommend using shlex.quote. Even if it strongly advises against using shell=True, there are people who need or want to use it, so let?s give them a pointer to the quote function. For older versions, I think we should talk about pipes.quote; even if it?s not documented in library/pipes, it is there, it is known and it is used, so I see no harm in mentioning it (with due mention that it?s only semi-official and that it becomes public in 3.3). ---------- assignee: docs at python components: Documentation messages: 158641 nosy: docs at python, eric.araujo priority: normal severity: normal status: open title: subprocess docs should mention pipes.quote/shlex.quote versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From mihai at mihaic.ro Wed Apr 18 12:02:14 2012 From: mihai at mihaic.ro (=?UTF-8?Q?Mihai_Capot=C4=83?=) Date: Wed, 18 Apr 2012 12:02:14 +0200 Subject: [docs] Wrong reference in stdtypes Message-ID: Hello, The description of readlines in stdtypes mentions using the readline function, but the HTML link points to the readline module. I'm referring to the default docs, for Python 2.7.3. Regards, Mihai Capot? From relsqui at chiliahedron.com Wed Apr 18 19:50:56 2012 From: relsqui at chiliahedron.com (Fizz) Date: Wed, 18 Apr 2012 10:50:56 -0700 Subject: [docs] Small error in the time library documentation. Message-ID: Hi, I've found what looks like a bug in the docs for the time library. In the struct_time description, under tm_sec, the documentation refers the reader to note 1 under strftime(). I believe the intent was to refer to note 2, which discusses the behavior of leap seconds. (Note 1 has to do with format strings, which is relevant to strftime() but not to struct_time.tm_sec.) Thanks, Fizz -------------- next part -------------- An HTML attachment was scrubbed... URL: From sateeshpyper at gmail.com Mon Apr 16 20:13:15 2012 From: sateeshpyper at gmail.com (Sateesh Kumar) Date: Mon, 16 Apr 2012 23:43:15 +0530 Subject: [docs] In unittest module name of the parameters for assert* methods can be descriptive In-Reply-To: References: Message-ID: On Sun, Apr 15, 2012 at 4:16 PM, Sandro Tosi wrote: [...] > I don't think it's the right change: this will give the false > information that the first argument must be what you expect and the > second what you got, which is not the case. Thanks for your explanation. The suggestion I made was mostly influenced by python documentation for unit test module in Python 2.7.2 [1], where parameters are named as "actual", and "expected" in documentation of some of the assert* methods. Also having used Junit I was influenced by the way the assert methods are documented in Junit [2]. As you have explained this change doesn't help for user of unit test module. reg, sateesh 1. http://docs.python.org/library/unittest.html#module-unittest 2. http://kentbeck.github.com/junit/javadoc/latest/org/junit/Assert.html From shahidiqbal13 at gmail.com Tue Apr 17 21:44:46 2012 From: shahidiqbal13 at gmail.com (Shahid Iqbal) Date: Wed, 18 Apr 2012 01:14:46 +0530 Subject: [docs] Modules documentation procedure? Message-ID: Dear Sir , I just want to contribute a module by making/uploading it as i have numerous ideas and i can code a module in python easily but point is that what is the procedure to create documentation for it.Please give me the start up for writing or steps in order to create documentation and also where i can upload my modules , give me all details as soon as possible..Respond me same. -- *Regards, Shahid Iqbal New Delhi. * -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Wed Apr 18 19:55:28 2012 From: report at bugs.python.org (Ethan Furman) Date: Wed, 18 Apr 2012 17:55:28 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ Message-ID: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> New submission from Ethan Furman : >From http://docs.python.org/py3k/reference/datamodel.html#object.__hash__ ----------------------------------------------------------------------- Classes which inherit a __hash__() method from a parent class but change the meaning of __eq__() such that the hash value returned is no longer appropriate (e.g. by switching to a value-based concept of equality instead of the default identity based equality) can explicitly flag themselves as being unhashable by setting __hash__ = None in the class definition. Doing so means that not only will instances of the class raise an appropriate TypeError when a program attempts to retrieve their hash value, but they will also be correctly identified as unhashable when checking isinstance(obj, collections.Hashable) (unlike classes which define their own __hash__() to explicitly raise TypeError). If a class that overrides __eq__() needs to retain the implementation of __hash__() from a parent class, the interpreter must be told this explicitly by setting __hash__ = .__hash__. Otherwise the inheritance of __hash__() will be blocked, just as if __hash__ had been explicitly set to None. ----------------------------------------------------------------------- The first paragraph says the user has to change __hash__ if it's different because of changes to __eq__, the second paragraph says __hash__ is automatically removed if __eq__ is changed; the second paragraph reflects reality. Proposed change: ----------------------------------------------------------------------- Classes which change the meaning of __eq__() (thus losing automatic delegation to the parent class' __hash__) can explicitly flag themselves as being unhashable by setting __hash__ = None in the class definition (which is otherwise done implicity). Having __hash__ set to None, either explicitly or implicitly, means that not only will instances of the class raise an appropriate TypeError when a program attempts to retrieve their hash value, but they will also be correctly identified as unhashable when checking isinstance(obj, collections.Hashable) (unlike classes which define their own __hash__() to explicitly raise TypeError). If a class that overrides __eq__() needs to retain the implementation of __hash__() from a parent class, the interpreter must be told this explicitly by setting __hash__ = .__hash__. ----------------------------------------------------------------------- Patch attached. ---------- assignee: docs at python components: Documentation, Interpreter Core files: __hash__.diff keywords: patch messages: 158644 nosy: docs at python, stoneleaf priority: normal severity: normal status: open title: confusing docs with regard to __hash__ type: behavior versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file25261/__hash__.diff _______________________________________ Python tracker _______________________________________ From gene.saunders at idilia.com Wed Apr 18 20:01:56 2012 From: gene.saunders at idilia.com (Gene Saunders) Date: Wed, 18 Apr 2012 14:01:56 -0400 Subject: [docs] Omission in the documentation of uuid.uuid1() Message-ID: <201204181401.56217.gene.saunders@idilia.com> I found an omission in the uuid documentation: http://docs.python.org/library/uuid.htm The description of uuid.uuid1() does not describe the conditions under which the linux uuid functions will be used. The description should have an additional section something like the following: uuid.uuid1([node[, clock_seq]]) Generate a UUID from a host ID, sequence number, and the current time. NEW If both node and clock_seq are not given, and the system call "uuid_generate_time" is available, then the UUID is generated using this system call. In this case the resulting clock_seq field will the stable system wide value as described in RFC 4122. Otherwise if node is not given, getnode() is used to obtain the hardware address. If clock_seq is given, it is used as the sequence number; otherwise a random 14- bit sequence number is chosen. Thank you for your attention. Gene Saunders System designer, Idilia Inc. From clairev8 at gmail.com Wed Apr 18 20:44:22 2012 From: clairev8 at gmail.com (claire volpe) Date: Wed, 18 Apr 2012 19:44:22 +0100 Subject: [docs] python version Message-ID: Hello, Im writing with the hope of figuring out what version of python is currently installed on my computer. Could you tell me how I could possibly find out? Thanks, Claire -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Wed Apr 18 21:13:43 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 18 Apr 2012 19:13:43 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1334776423.1.0.0212691003677.issue14617@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: +Python 2.7 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 18 21:30:05 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 18 Apr 2012 19:30:05 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1334777405.07.0.146200683659.issue14617@psf.upfronthosting.co.za> ?ric Araujo added the comment: Some of the sentence phrasing still sounds a bit awkward to me (?[...], means that not only will instances? for example, and I would also remove the parens at the end), but globally I think this is an improvement. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 18 22:13:21 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 18 Apr 2012 20:13:21 +0000 Subject: [docs] [issue14601] PEP sources not available as documented In-Reply-To: <1334612466.63.0.59561167474.issue14601@psf.upfronthosting.co.za> Message-ID: <1334780001.67.0.184750887638.issue14601@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 18 22:34:49 2012 From: report at bugs.python.org (Ethan Furman) Date: Wed, 18 Apr 2012 20:34:49 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334776423.1.0.0212691003677.issue14617@psf.upfronthosting.co.za> Message-ID: <4F8F27A8.206@stoneleaf.us> Ethan Furman added the comment: ?ric Araujo wrote: > Changes by ?ric Araujo : > > > ---------- > versions: +Python 2.7 -Python 3.1 The docs for 2.7 are correct, as __hash__ is not automatically suppressed in that version. -- ~Ethan~ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 18 23:01:21 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 18 Apr 2012 21:01:21 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1334782881.76.0.980703320964.issue14617@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 18 23:38:08 2012 From: report at bugs.python.org (Ethan Furman) Date: Wed, 18 Apr 2012 21:38:08 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1334785088.38.0.358672769776.issue14617@psf.upfronthosting.co.za> Ethan Furman added the comment: More re-writing... ---------- Added file: http://bugs.python.org/file25264/__hash__2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 19 00:13:02 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 18 Apr 2012 22:13:02 +0000 Subject: [docs] [issue14601] PEP sources not available as documented In-Reply-To: <1334612466.63.0.59561167474.issue14601@psf.upfronthosting.co.za> Message-ID: <1334787182.87.0.761612947075.issue14601@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. www.python.org is not in a python-dev repository, so there is nothing the developers following bugs.python.org can do. Could you repost the problem to the pydotorg mailing list? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 19 00:21:05 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 18 Apr 2012 22:21:05 +0000 Subject: [docs] [issue14601] PEP sources not available as documented In-Reply-To: <1334612466.63.0.59561167474.issue14601@psf.upfronthosting.co.za> Message-ID: <1334787665.61.0.849710614587.issue14601@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It's fine now, anyway. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 19 00:23:27 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 18 Apr 2012 22:23:27 +0000 Subject: [docs] [issue14601] PEP sources not available as documented In-Reply-To: <1334612466.63.0.59561167474.issue14601@psf.upfronthosting.co.za> Message-ID: <1334787807.31.0.285332989418.issue14601@psf.upfronthosting.co.za> ?ric Araujo added the comment: How so? Links still point to the old Subversion server. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 19 10:39:37 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 19 Apr 2012 08:39:37 +0000 Subject: [docs] [issue14601] PEP sources not available as documented In-Reply-To: <1334612466.63.0.59561167474.issue14601@psf.upfronthosting.co.za> Message-ID: <1334824777.01.0.171476140676.issue14601@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Not sure how it was supposed to be fixed in the past, as the docutils formatter would happily use whatever URL the docutils release had in place. I now fixed it for real (I hope) in 34076bfed420 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 19 15:38:46 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 19 Apr 2012 13:38:46 +0000 Subject: [docs] [issue14601] PEP sources not available as documented In-Reply-To: <1334612466.63.0.59561167474.issue14601@psf.upfronthosting.co.za> Message-ID: <1334842726.77.0.451451026206.issue14601@psf.upfronthosting.co.za> ?ric Araujo added the comment: Confirmed, thanks! ---------- components: -Documentation stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 19 15:51:24 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 19 Apr 2012 13:51:24 +0000 Subject: [docs] [issue14601] PEP sources not available as documented In-Reply-To: <1334842726.77.0.451451026206.issue14601@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Martin> I now fixed it for real (I hope) in 34076bfed420 Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 19 16:32:44 2012 From: report at bugs.python.org (Stefano Taschini) Date: Thu, 19 Apr 2012 14:32:44 +0000 Subject: [docs] [issue12947] Examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1334845964.17.0.0394879643568.issue12947@psf.upfronthosting.co.za> Stefano Taschini added the comment: As far as I can see, Sphinx has a global setting for trim_doctest_flags but lacks the possibility of locally disabling the trimming. A quick workaround would be to have the following sphinx extension added: class ProxyLexer(object): def __init__(self, underlying): self.__underlying = underlying def __getattr__(self, attr): return getattr(self.__underlying, attr) def setup(app): from sphinx.highlighting import lexers if lexers is not None: lexers['pycon-literal'] = ProxyLexer(lexers['pycon']) lexers['pycon3-literal'] = ProxyLexer(lexers['pycon3']) That would allow blocks marked as .. code-block:: pycon-literal or preceded by .. highlight:: pycon-literal to escape the trimming of doctest flags. If that's of any interest I can submit a patch. ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Thu Apr 19 23:41:09 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 19 Apr 2012 23:41:09 +0200 Subject: [docs] python version In-Reply-To: References: Message-ID: Hello Claire, On Wed, Apr 18, 2012 at 20:44, claire volpe wrote: > Hello, > Im writing with the hope of figuring out what version of python is currently > installed on my computer. Could you tell me how I could possibly find out? Usually, just run "python" and it should print out its version in the lines generated before being able to enter any command. Please also note that your should post such questions to a general purpose mailing list, such as: http://mail.python.org/mailman/listinfo/python-list Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From jed.ludlow at gmail.com Thu Apr 19 22:31:17 2012 From: jed.ludlow at gmail.com (Jed Ludlow) Date: Thu, 19 Apr 2012 14:31:17 -0600 Subject: [docs] sys.getfilesystemencoding() changes for Python 3.3 Message-ID: The description of Unix behavior for sys.getfilesystemencoding() listed here: http://docs.python.org/dev/library/sys.html#sys.getfilesystemencoding should probably change for Python 3.3. The behavior on Unix is the only affected portion. According to the latest source at revision 293180d199f2 of the main hg repository, it is now a fatal error if the system call to nl_langinfo(CODESET) fails to return a valid result, so Python does not fall back to 'utf-8' encoding anymore. Instead, it aborts. In that light, the bullet for Unix could now read: - On Unix, the encoding is the user?s preference according to the result of nl_langinfo(CODESET). An applicable change note to replace the version 3.2 note would follow, maybe: Changed in version 3.3: On Unix, it is now a fatal error if nl_langinfo(CODESET) fails to return a valid result during interpreter initialization. The relevant source commits are revision e2ba1249a2f5 and 7ce685cda0ae if further verification is required. Hope this helps. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.tosi at gmail.com Fri Apr 20 00:15:02 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 20 Apr 2012 00:15:02 +0200 Subject: [docs] Modules documentation procedure? In-Reply-To: References: Message-ID: Hello Shahid, thanks for your interest in Python! On Tue, Apr 17, 2012 at 21:44, Shahid Iqbal wrote: > > Dear Sir , I just want to contribute a module by making/uploading it as i > have numerous ideas and i can code a module in python easily but point is > that? what is the procedure to create documentation for it.Please give me > the start up for writing or steps in order to create documentation and also > where i can upload my modules , give me all details as soon as > possible..Respond me same. it's not clear to me what is exactly your question about: do you want to write a module to be included in Python standard library? do you want to write a module to be uploaded to PyPI? Something else? If it's about how to write documentation for the Python project, then you should be able to find all the information you need at: http://docs.python.org/devguide/documenting.html#documenting Regards, -- 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 Apr 20 06:31:07 2012 From: report at bugs.python.org (Eric Snow) Date: Fri, 20 Apr 2012 04:31:07 +0000 Subject: [docs] [issue14628] Clarify import statement documentation regarding what gets bound Message-ID: <1334896267.8.0.0783452284973.issue14628@psf.upfronthosting.co.za> New submission from Eric Snow : (see #14609 and #14582) http://docs.python.org/dev/reference/simple_stmts.html#the-import-statement The specification for the import statement says the following: "The first form of import statement binds the module name in the local namespace to the module object". This is not the case and has not been the case perhaps ever. Instead of getting bound to the module (returned by loader.load_module() during import), the name is bound to the value at sys.modules[module_name]. Normally two approaches yield the same result. However, if during import the sys.modules value for the module is assigned to something else, the behavior deviates from the specfication. See #14609 for an example. Considering the backwards-compatibility issues, the language reference should be updated to reflect the actual behavior. ---------- assignee: docs at python components: Documentation messages: 158793 nosy: benjamin.peterson, brett.cannon, docs at python, eric.snow priority: normal severity: normal status: open title: Clarify import statement documentation regarding what gets bound versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 20 08:14:51 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 20 Apr 2012 06:14:51 +0000 Subject: [docs] [issue14628] Clarify import statement documentation regarding what gets bound In-Reply-To: <1334896267.8.0.0783452284973.issue14628@psf.upfronthosting.co.za> Message-ID: <1334902491.78.0.288769931922.issue14628@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 20 08:45:49 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 20 Apr 2012 06:45:49 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1334904349.95.0.458471638003.issue14617@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 20 17:13:52 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 20 Apr 2012 15:13:52 +0000 Subject: [docs] [issue14628] Clarify import statement documentation regarding what gets bound In-Reply-To: <1334896267.8.0.0783452284973.issue14628@psf.upfronthosting.co.za> Message-ID: <1334934832.28.0.0540702325702.issue14628@psf.upfronthosting.co.za> Brett Cannon added the comment: So I think the sentence is saying exactly what is going on, but you want clarification that the module object is originating from sys.modules specifically. So you could change the sentence to "The first form of import statement binds the module name in the local namespace to the module object as found in sys.modules." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 20 17:27:57 2012 From: report at bugs.python.org (Eric Snow) Date: Fri, 20 Apr 2012 15:27:57 +0000 Subject: [docs] [issue14628] Clarify import statement documentation regarding what gets bound In-Reply-To: <1334896267.8.0.0783452284973.issue14628@psf.upfronthosting.co.za> Message-ID: <1334935677.89.0.338946663768.issue14628@psf.upfronthosting.co.za> Eric Snow added the comment: Sounds mostly right. sys.modules[name] won't necessarily contain a module object, as Benjamin brought up in issue14609. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 20 17:34:08 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 20 Apr 2012 15:34:08 +0000 Subject: [docs] [issue14628] Clarify import statement documentation regarding what gets bound In-Reply-To: <1334896267.8.0.0783452284973.issue14628@psf.upfronthosting.co.za> Message-ID: <1334936048.02.0.911450737674.issue14628@psf.upfronthosting.co.za> Brett Cannon added the comment: OK, so you say "to the object found in sys.modules." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 20 21:58:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 20 Apr 2012 19:58:06 +0000 Subject: [docs] [issue14628] Clarify import statement documentation regarding what gets bound In-Reply-To: <1334896267.8.0.0783452284973.issue14628@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 150bd84e737e by Brett Cannon in branch 'default': Issue #14628: Document the fact that import always returns the module http://hg.python.org/cpython/rev/150bd84e737e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 20 21:58:32 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 20 Apr 2012 19:58:32 +0000 Subject: [docs] [issue14628] Clarify import statement documentation regarding what gets bound In-Reply-To: <1334896267.8.0.0783452284973.issue14628@psf.upfronthosting.co.za> Message-ID: <1334951912.23.0.184542685721.issue14628@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: docs at python -> brett.cannon resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 21 11:52:55 2012 From: report at bugs.python.org (Dionysios Kalofonos) Date: Sat, 21 Apr 2012 09:52:55 +0000 Subject: [docs] [issue14640] Typos in pyporting.rst Message-ID: <1335001975.37.0.452902157881.issue14640@psf.upfronthosting.co.za> New submission from Dionysios Kalofonos : See attached file. ---------- assignee: docs at python components: Documentation files: pyporting.diff keywords: patch messages: 158913 nosy: dk, docs at python priority: normal severity: normal status: open title: Typos in pyporting.rst versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file25299/pyporting.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 21 15:49:17 2012 From: report at bugs.python.org (Dionysios Kalofonos) Date: Sat, 21 Apr 2012 13:49:17 +0000 Subject: [docs] [issue14641] Minor fixes in sockets.rst Message-ID: <1335016157.05.0.701229655848.issue14641@psf.upfronthosting.co.za> New submission from Dionysios Kalofonos : See attached file. ---------- assignee: docs at python components: Documentation files: sockets.diff keywords: patch messages: 158919 nosy: dk, docs at python priority: normal severity: normal status: open title: Minor fixes in sockets.rst versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file25300/sockets.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 23 10:41:24 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 23 Apr 2012 08:41:24 +0000 Subject: [docs] [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1335170484.06.0.425745894205.issue14616@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 23 14:30:42 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 23 Apr 2012 12:30:42 +0000 Subject: [docs] [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1335184242.18.0.454177220558.issue14616@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 23 16:42:07 2012 From: report at bugs.python.org (Gunnar Eikman) Date: Mon, 23 Apr 2012 14:42:07 +0000 Subject: [docs] [issue10942] xml.etree.ElementTree.tostring returns type bytes, expected type str In-Reply-To: <1295395949.96.0.0409847573272.issue10942@psf.upfronthosting.co.za> Message-ID: <1335192127.32.0.976609832348.issue10942@psf.upfronthosting.co.za> Gunnar Eikman added the comment: I moved a working script from Ubuntu (Python 3.1.2) to Windows (Python 3.2.3) today. Had to revise script. The tostring method returns a string on Linux (contradicts this issue), but bytes on Windows (as described in this issue)... I used tostring with a single argument "tostring(theXml)" Is there an explanation for this? I am not an advanced Python hacker... Be careful when moving from one environment to another! ---------- nosy: +Gunnar.Eikman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 23 17:54:28 2012 From: report at bugs.python.org (Hobs) Date: Mon, 23 Apr 2012 15:54:28 +0000 Subject: [docs] [issue14650] 1-character typo in shutils doctext Message-ID: <1335196468.35.0.0445432965745.issue14650@psf.upfronthosting.co.za> New submission from Hobs : This patch fixes a 1-character typo in the docstring for shutil.disk_usage(). ---------- assignee: docs at python components: Documentation files: shutil_disk_usage_doc.patch keywords: patch messages: 159035 nosy: Hobson.Lane, docs at python, eric.araujo priority: normal severity: normal status: open title: 1-character typo in shutils doctext type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file25314/shutil_disk_usage_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 23 18:24:59 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 23 Apr 2012 16:24:59 +0000 Subject: [docs] [issue14650] 1-character typo in shutil docstring In-Reply-To: <1335196468.35.0.0445432965745.issue14650@psf.upfronthosting.co.za> Message-ID: <1335198299.4.0.256065457846.issue14650@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks. Can you check if the typo is also present in the documentation (i.e. in Doc/library)? ---------- title: 1-character typo in shutils doctext -> 1-character typo in shutil docstring _______________________________________ Python tracker _______________________________________ From chdb at blueyonder.co.uk Sun Apr 22 18:17:42 2012 From: chdb at blueyonder.co.uk (Colin Barnett) Date: Sun, 22 Apr 2012 17:17:42 +0100 Subject: [docs] typos etc at /howto/unicode.htm Message-ID: <587815F757624D399C673B8EB31C58DD@xxxhdf4eg9kxiv> Hi there I was reading http://docs.python.org/howto/unicode.html It's interesting and informative but I encountered some slightly peculiar or even misleading remarks In general, I try not to be pedantic, but I find that some technical topics, such this one on character and encodings, are so tricky and so inherently liable to be confusing, that the slightest peculiarity easily becomes a great distraction. EG in the 1st paragraph which I reproduce below (the bold face is mine) History of Character Codes . . . (Actually the missing accents matter for English, too, which contains words such as ?na?ve? and ?caf??, and some publications have house styles which require spellings such as ?co?perate?.) For a while people just wrote programs that didn?t display accents. I remember looking at Apple ][ BASIC programs, published in French-language publications in the mid-1980s, that had lines like these: PRINT "FICHIER EST COMPLETE." PRINT "CARACTERE NON ACCEPTE." Those messages should contain accents, and they just look wrong to someone who can read French. I would like to make the following points- 1. "some publications have house styles which require spellings such as ?co?perate? This example was unrecognisable and very surprising to me. After a little research I found that it is so vanishingly exceptional that the writer can only be referring to the New Yorker magazine, which is almost totally unique in insisting on this and similar spellings. Why not use straightforward examples that are actually recognisable across the English-speaking and Python-using world, like the names Andr?, Zo?, No?l or Ren?e ? After all, only a very small proportion of readers of Python documentation are also readers of New Yorker but all have surely encountered such names - for example among unfortunate but unavoidable celebrities. 2. "Apple ][ BASIC" I think this must be a typo for "Apple II BASIC" 3. Although I am not French and have a very basic knowledge of the language, I think the writer has again chosen poor examples - so poor that the last sentence is simply not true. No - these examples would be perfectly acceptable to French readers (especially in the mid 1980s). This is because, in French it is still perfectly normal to miss out all the accents on upper case letters, and this is why such messages were nearly always capitalised in the mid 1980s. Therefore, for the sake of the argument (as opposed to any historical accuracy of the anecdote), you need to quote these examples like this - PRINT "Fichier est complete." PRINT "Caractere non accepte." 4. The writer sometimes uses the term "base-16" (with hyphen) and sometimes "base 16" (no hyphen). The difference is trivial enough but I was momentarily a little thrown because I am used to the more usual term "hexadecimal". Is this term "base-16" the normal usage in the Python community or is the writer being a little obtuse? Kind regards Colin -------------- next part -------------- An HTML attachment was scrubbed... URL: From isurveyor at vianet.net.au Mon Apr 23 09:44:07 2012 From: isurveyor at vianet.net.au (Ivor Surveyor) Date: Mon, 23 Apr 2012 15:44:07 +0800 Subject: [docs] help with graphics Message-ID: <3Vbfvh0rVTzMZV@mail.python.org> I am new to programming and also Python. I have downloaded python 2.7.2. I am also reading Python Programming by John Zelle supplemented by the MIT lecture series for beginners. I have got as far as the chapter on graphics. This is my problem I can not locate the graphics module or find the file graphics.py. my version of Python responds "module unknown" to the command "import graphics." I have searched both the Python and Wing web sites but can not find a copy of the file to download. I would be grateful for any help in locating the file and I would be pleased to purchase the file, if required. regards, Ivor Surveyor isurveyor at vianet.net.au From report at bugs.python.org Mon Apr 23 19:47:25 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 23 Apr 2012 17:47:25 +0000 Subject: [docs] [issue14641] Minor fixes in sockets.rst In-Reply-To: <1335016157.05.0.701229655848.issue14641@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset f24d8dc1a986 by Sandro Tosi in branch '2.7': Issue #14641: minor fixes to sockets Howto; patch by Dionysios Kalofonos http://hg.python.org/cpython/rev/f24d8dc1a986 New changeset 9bb9604519ce by Sandro Tosi in branch '3.2': Issue #14641: minor fixes to sockets Howto; patch by Dionysios Kalofonos http://hg.python.org/cpython/rev/9bb9604519ce New changeset caf39de79819 by Sandro Tosi in branch 'default': Issue #14641: merge with 3.2 http://hg.python.org/cpython/rev/caf39de79819 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 23 19:48:06 2012 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 23 Apr 2012 17:48:06 +0000 Subject: [docs] [issue14641] Minor fixes in sockets.rst In-Reply-To: <1335016157.05.0.701229655848.issue14641@psf.upfronthosting.co.za> Message-ID: <1335203286.37.0.120935429001.issue14641@psf.upfronthosting.co.za> Sandro Tosi added the comment: Thanks for your contribution! ---------- nosy: +sandro.tosi resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 23 19:57:55 2012 From: report at bugs.python.org (Hobs) Date: Mon, 23 Apr 2012 17:57:55 +0000 Subject: [docs] [issue14650] 1-character typo in shutil docstring In-Reply-To: <1335196468.35.0.0445432965745.issue14650@psf.upfronthosting.co.za> Message-ID: <1335203875.28.0.0577401850184.issue14650@psf.upfronthosting.co.za> Hobs added the comment: Eric, the documentation (shutil.rst) looks fine. Just a code comment typo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 23 20:08:50 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 23 Apr 2012 18:08:50 +0000 Subject: [docs] [issue14650] 1-character typo in shutil docstring In-Reply-To: <1335196468.35.0.0445432965745.issue14650@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 629d4c2faa87 by Sandro Tosi in branch 'default': Issue #14650: fix typo in shutil.disk_usage() docstring; patch by Hobson Lane http://hg.python.org/cpython/rev/629d4c2faa87 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 23 20:09:35 2012 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 23 Apr 2012 18:09:35 +0000 Subject: [docs] [issue14650] 1-character typo in shutil docstring In-Reply-To: <1335196468.35.0.0445432965745.issue14650@psf.upfronthosting.co.za> Message-ID: <1335204575.16.0.791337924171.issue14650@psf.upfronthosting.co.za> Sandro Tosi added the comment: Thanks for your contribution! ---------- nosy: +sandro.tosi resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 23 20:47:17 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 23 Apr 2012 18:47:17 +0000 Subject: [docs] [issue14640] Typos in pyporting.rst In-Reply-To: <1335001975.37.0.452902157881.issue14640@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset f7b002e5cac7 by R David Murray in branch '3.2': #14640: Fix typos/syntax in pyporting.rst. http://hg.python.org/cpython/rev/f7b002e5cac7 New changeset 13c30fe3f427 by R David Murray in branch 'default': Merge #14640: Fix typos/syntax in pyporting.rst. http://hg.python.org/cpython/rev/13c30fe3f427 New changeset 758f5585ce52 by R David Murray in branch '2.7': #14640: Fix typos/syntax in pyporting.rst. http://hg.python.org/cpython/rev/758f5585ce52 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 23 20:48:31 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 23 Apr 2012 18:48:31 +0000 Subject: [docs] [issue14640] Typos in pyporting.rst In-Reply-To: <1335001975.37.0.452902157881.issue14640@psf.upfronthosting.co.za> Message-ID: <1335206911.88.0.044552905181.issue14640@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Dionysios. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Mon Apr 23 21:46:47 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 23 Apr 2012 21:46:47 +0200 Subject: [docs] help with graphics In-Reply-To: <3Vbfvh0rVTzMZV@mail.python.org> References: <3Vbfvh0rVTzMZV@mail.python.org> Message-ID: Hello Ivor, 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 Mon, Apr 23, 2012 at 09:44, Ivor Surveyor wrote: > I am new to programming and also Python. > > I have downloaded python 2.7.2. ? I am also reading Python Programming by > John Zelle supplemented by the MIT lecture series for beginners. > I have got as far as the chapter on graphics. ?This is my problem I can not > locate the graphics module or find the file graphics.py. > > my version of Python responds "module unknown" to the command "import > graphics." > > I have searched both the Python and Wing web sites but can not find a copy > of the file to download. ?I would be grateful for any help in locating the > file and I would be pleased to purchase the file, if required. > > regards, > > Ivor Surveyor > isurveyor at vianet.net.au > _______________________________________________ > 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 Tue Apr 24 17:38:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 24 Apr 2012 15:38:45 +0000 Subject: [docs] [issue13587] Correcting the typos error in Doc/howto/urllib2.rst In-Reply-To: <1323693654.01.0.260479490427.issue13587@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 4dda3000c932 by Sandro Tosi in branch '2.7': Issue #13587: use the right RFC2617 name for WWW-Authenticate; patch by Aaron Maenpaa http://hg.python.org/cpython/rev/4dda3000c932 New changeset 01abffa8842a by Sandro Tosi in branch '3.2': Issue #13587: use the right RFC2617 name for WWW-Authenticate; patch by Aaron Maenpaa http://hg.python.org/cpython/rev/01abffa8842a New changeset 798b9714777d by Sandro Tosi in branch 'default': Issue #13587: merge with 3.2 http://hg.python.org/cpython/rev/798b9714777d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 24 17:39:21 2012 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 24 Apr 2012 15:39:21 +0000 Subject: [docs] [issue13587] Correcting the typos error in Doc/howto/urllib2.rst In-Reply-To: <1323693654.01.0.260479490427.issue13587@psf.upfronthosting.co.za> Message-ID: <1335281961.29.0.356037579716.issue13587@psf.upfronthosting.co.za> Sandro Tosi added the comment: Aaron: thanks for the patch! ---------- nosy: +sandro.tosi resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 24 18:14:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 24 Apr 2012 16:14:01 +0000 Subject: [docs] [issue13478] No documentation for timeit.default_timer In-Reply-To: <1322208815.17.0.598781679655.issue13478@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 86b927859155 by Sandro Tosi in branch '2.7': Issue #13478: document timeit.default_timer() http://hg.python.org/cpython/rev/86b927859155 New changeset 8165b59a4000 by Sandro Tosi in branch '3.2': Issue #13478: document timeit.default_timer() http://hg.python.org/cpython/rev/8165b59a4000 New changeset e43ba06da592 by Sandro Tosi in branch 'default': Issue #13478: merge with 3.2 http://hg.python.org/cpython/rev/e43ba06da592 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 24 18:14:19 2012 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 24 Apr 2012 16:14:19 +0000 Subject: [docs] [issue13478] No documentation for timeit.default_timer In-Reply-To: <1322208815.17.0.598781679655.issue13478@psf.upfronthosting.co.za> Message-ID: <1335284059.52.0.574271817001.issue13478@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 24 18:41:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 24 Apr 2012 16:41:35 +0000 Subject: [docs] [issue14554] test module: correction In-Reply-To: <1334181755.32.0.776262768406.issue14554@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 22767284de99 by Sandro Tosi in branch '2.7': Issue #14554: correct example for captured_stdout() http://hg.python.org/cpython/rev/22767284de99 New changeset d1ba0421d65f by Sandro Tosi in branch '3.2': Issue #14554: correct example for captured_stdout(); patch by Tshepang Lekhonkhobe http://hg.python.org/cpython/rev/d1ba0421d65f New changeset 6f41f8ed87c8 by Sandro Tosi in branch 'default': Issue #14554: merge with 3.2 http://hg.python.org/cpython/rev/6f41f8ed87c8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 24 18:42:03 2012 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 24 Apr 2012 16:42:03 +0000 Subject: [docs] [issue14554] test module: correction In-Reply-To: <1334181755.32.0.776262768406.issue14554@psf.upfronthosting.co.za> Message-ID: <1335285723.55.0.321716582679.issue14554@psf.upfronthosting.co.za> Sandro Tosi added the comment: Thanks for the patch, Tshepang! ---------- nosy: +sandro.tosi resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 24 19:48:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 24 Apr 2012 17:48:11 +0000 Subject: [docs] [issue14448] Mention pytz in datetime's docs In-Reply-To: <1333056065.25.0.804124513061.issue14448@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset e0e421133d0f by Sandro Tosi in branch '2.7': Issue #14448: mention pytz; patch by Andrew Svetlov http://hg.python.org/cpython/rev/e0e421133d0f New changeset 3aec41794584 by Sandro Tosi in branch '3.2': Issue #14448: mention pytz; patch by Andrew Svetlov http://hg.python.org/cpython/rev/3aec41794584 New changeset b46fa7bc6710 by Sandro Tosi in branch 'default': Issue #14448: merge with 3.2 http://hg.python.org/cpython/rev/b46fa7bc6710 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 24 19:48:59 2012 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 24 Apr 2012 17:48:59 +0000 Subject: [docs] [issue14448] Mention pytz in datetime's docs In-Reply-To: <1333056065.25.0.804124513061.issue14448@psf.upfronthosting.co.za> Message-ID: <1335289739.17.0.0424749719405.issue14448@psf.upfronthosting.co.za> Sandro Tosi added the comment: I've reworded a bit the patch: thanks for it, Andrew ---------- nosy: +sandro.tosi resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 25 15:25:55 2012 From: report at bugs.python.org (Sye van der Veen) Date: Wed, 25 Apr 2012 13:25:55 +0000 Subject: [docs] [issue12488] multiprocessing.Connection does not communicate pipe closure between parent and child In-Reply-To: <1309779809.62.0.10199189289.issue12488@psf.upfronthosting.co.za> Message-ID: <1335360355.78.0.244713171331.issue12488@psf.upfronthosting.co.za> Sye van der Veen added the comment: This issue _does_ exist on Windows, and is not limited to the case where the master process exits before its children. The following code, which is almost exactly that from the 2.7.3 documentation, deadlocks on Win7 (Py3.2 and 2.7) and WinXP (Py3.2 and 2.6): from multiprocessing import Process, Pipe import sys def f(conn): #conn.send([42, None, 'hello']) # uncomment second conn.close() if __name__ == "__main__": parent_conn, child_conn = Pipe() p = Process(target=f, args=(child_conn,)) p.start() #child_conn.close() # uncomment first sys.stdout.write( "about to receive\n" ) sys.stdout.write( "%s\n"%parent_conn.recv() ) sys.stdout.write( "received\n" ) p.join() If you "uncomment first", recv raises an EOFError; if you also "uncomment second", recv succeeds. If this behaviour is the same on other platforms, then it seems all that is required is to update the documentation. ---------- nosy: +syeberman versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Wed Apr 25 19:58:23 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 25 Apr 2012 19:58:23 +0200 Subject: [docs] Small error in the time library documentation. In-Reply-To: References: Message-ID: Hello, thanks for your email On Wed, Apr 18, 2012 at 19:50, Fizz wrote: > Hi, > > I've found what looks like a bug in the docs for the time library. In the > struct_time description, under tm_sec, the documentation refers the reader > to note 1 under strftime(). I believe the intent was to refer to note 2, > which discusses the behavior of leap seconds. (Note 1 has to do with format > strings, which is relevant to strftime() but not to struct_time.tm_sec.) Thanks this has now fixed: http://hg.python.org/cpython/rev/4b101df1e9f7 (python 3.* already references the correct footnote) Cheers, -- 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 Thu Apr 26 10:20:57 2012 From: report at bugs.python.org (Balthazar Rouberol) Date: Thu, 26 Apr 2012 08:20:57 +0000 Subject: [docs] [issue10976] json.loads() throws TypeError on bytes object In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1335428457.49.0.702959754745.issue10976@psf.upfronthosting.co.za> Balthazar Rouberol added the comment: I know this does not fix anything at the core, but it would allow you to use json.loads() with python 3.2 (maybe 3.1?): Replace json.loads(raw_data) by raw_data = raw_data.decode('utf-8') # Or any other ISO format json.loads(raw_data) ---------- nosy: +Balthazar.Rouberol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 26 10:34:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Apr 2012 08:34:32 +0000 Subject: [docs] [issue10976] json.loads() throws TypeError on bytes object In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1335429272.37.0.0631322450766.issue10976@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > What if the returned JSON uses a charset other than utf-8 ? According to RFC 4627: "JSON text SHALL be encoded in Unicode. The default encoding is UTF-8." RFC 4627 also offers a way to autodetect other Unicode encodings. ---------- nosy: +storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 26 15:03:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 26 Apr 2012 13:03:56 +0000 Subject: [docs] [issue10976] json.loads() throws TypeError on bytes object In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1335445435.92.0.984730977708.issue10976@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, adding support for bytes objects using the spec from RFC 4627 (or at least with utf-8 as a default) may be an enhancement for 3.3. ---------- assignee: docs at python -> components: +Library (Lib) -Documentation stage: -> needs patch type: behavior -> enhancement versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 26 16:07:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Apr 2012 14:07:46 +0000 Subject: [docs] [issue10976] json.loads() throws TypeError on bytes object In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1335449266.36.0.187593044345.issue10976@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Things are a little more complicated. '123' is not a valid JSON according to RFC 4627 (the top-level element can only be an object or an array). This means that the autodetection algorithm will not always work for such non-standard data. If we can parse binary data, then there must be a way to generate binary data in at least one of the Unicode encodings. By the way, the documentation should give a link to RFC 4627 and explain the current implementation is different from it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 26 16:15:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Apr 2012 14:15:12 +0000 Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation Message-ID: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> New submission from Serhiy Storchaka : The json module documentation should give a link to RFC 4627 and explain the current implementation is different from it. For example, according to RFC 4627 only an object or an array can be top-level JSON element. ---------- assignee: docs at python components: Documentation messages: 159367 nosy: docs at python, storchaka priority: normal severity: normal status: open title: Add link to RFC 4627 from json documentation type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 26 16:21:40 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 26 Apr 2012 14:21:40 +0000 Subject: [docs] [issue10976] json.loads() throws TypeError on bytes object In-Reply-To: <1335449266.36.0.187593044345.issue10976@psf.upfronthosting.co.za> Message-ID: <1335450012.3421.4.camel@localhost.localdomain> Antoine Pitrou added the comment: > Things are a little more complicated. '123' is not a valid JSON > according to RFC 4627 (the top-level element can only be an object or > an array). This means that the autodetection algorithm will not always > work for such non-standard data. The autodetection algorithm needn't examine all 4 first bytes. If the 2 first bytes are non-zero, you have UTF-8 data. Otherwise, the JSON text will be at least 4 bytes long (since it's either UTF-16 or UTF-32). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 26 17:09:07 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 26 Apr 2012 15:09:07 +0000 Subject: [docs] [issue10976] json.loads() raises TypeError on bytes object In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1335452947.22.0.0962451818864.issue10976@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- title: json.loads() throws TypeError on bytes object -> json.loads() raises TypeError on bytes object _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 26 17:48:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Apr 2012 15:48:24 +0000 Subject: [docs] [issue10976] json.loads() raises TypeError on bytes object In-Reply-To: <1335450012.3421.4.camel@localhost.localdomain> Message-ID: <1335455452.2576.10.camel@raxxla> Serhiy Storchaka added the comment: I mean a string that starts with '\u0000'. b'"\x00...'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 26 18:12:45 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 26 Apr 2012 16:12:45 +0000 Subject: [docs] [issue10976] json.loads() raises TypeError on bytes object In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1335456765.14.0.898384239606.issue10976@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Le jeudi 26 avril 2012 ? 15:48 +0000, Serhiy Storchaka a ?crit : > > I mean a string that starts with '\u0000'. b'"\x00...'. According to the RFC, that should be escaped: All Unicode characters may be placed within the quotation marks except for the characters that must be escaped: quotation mark, reverse solidus, and the control characters (U+0000 through U+001F). And indeed: >>> json.loads('"\u0000"') Traceback (most recent call last): File "", line 1, in File "/home/antoine/opt/lib/python3.2/json/__init__.py", line 307, in loads return _default_decoder.decode(s) File "/home/antoine/opt/lib/python3.2/json/decoder.py", line 351, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/home/antoine/opt/lib/python3.2/json/decoder.py", line 367, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Invalid control character at: line 1 column 1 (char 1) >>> json.loads('"\\u0000"') '\x00' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 26 18:21:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 26 Apr 2012 16:21:35 +0000 Subject: [docs] [issue10976] json.loads() raises TypeError on bytes object In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za> Message-ID: <1335457295.36.0.339868654992.issue10976@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: According to current implementation this is acceptable. >>> json.loads('"\u0000"', strict=False) '\x00' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 26 18:49:12 2012 From: report at bugs.python.org (Peter Eisentraut) Date: Thu, 26 Apr 2012 16:49:12 +0000 Subject: [docs] [issue14676] DeprecationWarning missing in default warning filters documentation Message-ID: <1335458952.26.0.88746757742.issue14676@psf.upfronthosting.co.za> New submission from Peter Eisentraut : DeprecationWarning was disabled by default in Python 2.7, but the documentation section "Default Warning Filters" does not list it as ignored. In the 3.x branches, this was already fixed. Trivial patch attached. ---------- assignee: docs at python components: Documentation files: py27-default-warning-filters-doc.patch keywords: patch messages: 159398 nosy: docs at python, petere priority: normal severity: normal status: open title: DeprecationWarning missing in default warning filters documentation versions: Python 2.7 Added file: http://bugs.python.org/file25373/py27-default-warning-filters-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 27 00:11:12 2012 From: report at bugs.python.org (Gregor) Date: Thu, 26 Apr 2012 22:11:12 +0000 Subject: [docs] [issue14680] pydoc with -w option does not work for a lot of help topics Message-ID: <1335478272.08.0.215124599111.issue14680@psf.upfronthosting.co.za> New submission from Gregor : pydoc with pydoc with -w option (to write html files) does not work for a lot of help topics (e.g. EXPRESSIONS, FORMATTING, TUPLELITERALS, def, if, else...) If you look at the source you can see that when using the switch '-w' (http://hg.python.org/cpython/file/2.7/Lib/pydoc.py#l2311) pydoc uses the function writedoc, otherwise to the class Helper (http://hg.python.org/cpython/file/2.7/Lib/pydoc.py#l2325). In the Helper-class EXPRESSIONS is defined under line 1666 (http://hg.python.org/cpython/file/2.7/Lib/pydoc.py#l1666). The function writedoc does not utilize this nor does it use the Helper class. For dicussion see: http://stackoverflow.com/a/10333615/1318686 Example: pydoc EXPRESSIONS works perfectly fine but pydoc -w EXPRESSIONS does not. ---------- assignee: docs at python components: Documentation messages: 159428 nosy: docs at python, gregor.hoch priority: normal severity: normal status: open title: pydoc with -w option does not work for a lot of help topics versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From cfinnegn at udel.edu Tue Apr 24 05:14:43 2012 From: cfinnegn at udel.edu (Connor Finnegan) Date: Mon, 23 Apr 2012 23:14:43 -0400 Subject: [docs] bugs in hashlib Message-ID: Your entire hashlib section is broken. I have tried to use them but my interpreter informs me that every one of your provided methods does not exist. -------------- next part -------------- An HTML attachment was scrubbed... URL: From eugenevd at gmail.com Tue Apr 24 17:04:43 2012 From: eugenevd at gmail.com (Eugene) Date: Tue, 24 Apr 2012 17:04:43 +0200 Subject: [docs] Textbox sizing Message-ID: Quick seach textbox doesnt resize correct: Google Chrome (18.0.1025.162) on Mint (Ubuntu) Linux : [image: Inline image 1] The same section on 18.0.1025.142 (Developer Build 129054 Linux) Built on Ubuntu 11.04, running on LinuxMint 11 OR Firefox (11.0 Ubuntu): [image: Inline image 2] -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: textbox-chromiumAndFirefox.png Type: image/png Size: 18134 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: textbox-googlechrome.png Type: image/png Size: 33681 bytes Desc: not available URL: From hobsonlane at gmail.com Thu Apr 26 07:00:43 2012 From: hobsonlane at gmail.com (Hobson Lane) Date: Thu, 26 Apr 2012 13:00:43 +0800 Subject: [docs] doctest directives not displayed in online documentation for 2.7.3 Message-ID: The doctest directive example code blocks on the doctest documentation page do not contain the described directives ( http://docs.python.org/library/doctest.html) , approximately 1/3 of the way down the page. Perhaps sphinx or is hiding all python doctest string comments and processing the doctest directives rather than displaying the raw code block? The html source shows no sign of the mentioned directives:

For example, this test passes:

>>> print range(20)
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9,

But the rst file at cpython/Docs/Library/doctest.rst does contain the
doctest directive (as a comment):

For example, this test passes::

    >>> print(list(range(20))) #doctest: +NORMALIZE_WHITESPACE
    [0,   1,  2,  3,  4,  5,  6,  7,  8,  9,

Here's the faulty rendering on a Chrome browser in Ubuntu:

... Use + to enable the named behavior, or - to disable it.

For example, this test passes:
>>>

>>> print range(20) [0,   1,  2,  3,  4,  5,  6,  7,  8,  9,10,  11, 12, 13, 14, 15, 16, 17, 18, 19]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From cosmin.parvulescu at gmail.com  Thu Apr 26 08:58:28 2012
From: cosmin.parvulescu at gmail.com (Cosmin Parvulescu)
Date: Thu, 26 Apr 2012 09:58:28 +0300
Subject: [docs] Lambda Forms error
Message-ID: 

Greetings,

While skimming through the tutorial I came across this line "Here?s a
function that returns the sum of its two arguments: lambda a, b: a+b"
followed by this example

> def make_incrementor(n):
>     return lambda x: x + n
>
> I believe it is a mistake and the example should be changed to something
along the lines of

*f = lambda a, b:a + b*


Best regards
-- 
Cosmin-Alexandru Parvulescu

Facebook  |
LinkedIN|
G!Profiles 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From sdoyle at m4-engineering.com  Thu Apr 26 19:32:32 2012
From: sdoyle at m4-engineering.com (Steven Doyle)
Date: Thu, 26 Apr 2012 17:32:32 +0000
Subject: [docs] Python 2.6 Float Error
Message-ID: <0401593F527BAE4E977B1339449E740506E0FA@ARION.M4Engineering.local>

Hi,

I'm running:
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32

I was testing out some print functionality and I made an error in typing (I meant to use %8.8f), but is this behavior intentional or is it an error?
>> print '%8.8s' %(10000000001.)
>> '10000000'

I would expect this to return a TypeError.

Steve



Steven P. Doyle
Staff Engineer
M4 Engineering, Inc.


562.981.7797 x231
562.981.2127 fax
steve.doyle at m4-engineering.com




-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From report at bugs.python.org  Fri Apr 27 09:03:25 2012
From: report at bugs.python.org (Ezio Melotti)
Date: Fri, 27 Apr 2012 07:03:25 +0000
Subject: [docs] [issue14676] DeprecationWarning missing in default warning
	filters	documentation
In-Reply-To: <1335458952.26.0.88746757742.issue14676@psf.upfronthosting.co.za>
Message-ID: <1335510205.06.0.301201432982.issue14676@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
keywords: +easy
nosy: +ezio.melotti
stage:  -> patch review
type:  -> enhancement

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Apr 27 16:06:13 2012
From: report at bugs.python.org (Antoine Pitrou)
Date: Fri, 27 Apr 2012 14:06:13 +0000
Subject: [docs] [issue10976] json.loads() raises TypeError on bytes object
In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za>
Message-ID: <1335535573.29.0.108122670462.issue10976@psf.upfronthosting.co.za>


Antoine Pitrou  added the comment:

> According to current implementation this is acceptable.

Then perhaps auto-detection can be restricted to strict mode? Non-strict mode would always use utf-8.
Or we can just skip auto-detection altogether (I don't think many people produce utf-16 or utf-32 JSON; that would be a waste of bandwidth for no obvious benefit).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Apr 27 17:28:07 2012
From: report at bugs.python.org (Serhiy Storchaka)
Date: Fri, 27 Apr 2012 15:28:07 +0000
Subject: [docs] [issue10976] json.loads() raises TypeError on bytes object
In-Reply-To: <1295636509.41.0.0138366952356.issue10976@psf.upfronthosting.co.za>
Message-ID: <1335540487.2.0.657570914574.issue10976@psf.upfronthosting.co.za>


Serhiy Storchaka  added the comment:

Related to this question is a question about errors. How to inform the user, if an error occurred in the decoding with detected encoding? Leave UnicodeDecodeError or convert it to ValueError? If there is a syntax error in JSON -- exception will refer to the position in the decoded string, we should to translate it to the position in the original binary string?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Fri Apr 27 21:35:50 2012
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Fri, 27 Apr 2012 19:35:50 +0000
Subject: [docs] [issue14674] Add link to RFC 4627 from json documentation
In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za>
Message-ID: <1335555350.85.0.460300857676.issue14674@psf.upfronthosting.co.za>


Changes by ?ric Araujo :


----------
keywords: +easy
nosy: +eric.araujo
stage:  -> needs patch

_______________________________________
Python tracker 

_______________________________________

From sandro.tosi at gmail.com  Sat Apr 28 10:49:03 2012
From: sandro.tosi at gmail.com (Sandro Tosi)
Date: Sat, 28 Apr 2012 10:49:03 +0200
Subject: [docs] Python 2.6 Float Error
In-Reply-To: <0401593F527BAE4E977B1339449E740506E0FA@ARION.M4Engineering.local>
References: <0401593F527BAE4E977B1339449E740506E0FA@ARION.M4Engineering.local>
Message-ID: 

Hello Steven,
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 Thu, Apr 26, 2012 at 19:32, Steven Doyle wrote:

>  Hi,****
>
> ** **
>
> I?m running:****
>
> Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit
> (Intel)] on win32****
>
> ** **
>
> I was testing out some print functionality and I made an error in typing
> (I meant to use %8.8f), but is this behavior intentional or is it an error?
> ****
>
> >> print '%8.8s' %(10000000001.)****
>
> >> '10000000'****
>
> ** **
>
> I would expect this to return a TypeError.****
>
> ** **
>
> Steve****
>
> ** **
>
>  ****
>
> *Steven P. Doyle*
>
> Staff Engineer ****
>
> *M4 **Engineering, Inc.*****
>
> 562.981.7797 x231
> 562.981.2127 fax*
> *steve.doyle at m4-engineering.com ****
>
> ** **
>
> ** **
>
> _______________________________________________
> 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 

From sandro.tosi at gmail.com  Sat Apr 28 10:52:25 2012
From: sandro.tosi at gmail.com (Sandro Tosi)
Date: Sat, 28 Apr 2012 10:52:25 +0200
Subject: [docs] bugs in hashlib
In-Reply-To: 
References: 
Message-ID: 

Hello Connor,

On Tue, Apr 24, 2012 at 05:14, Connor Finnegan  wrote:
> Your entire hashlib section is broken. I have tried to use them but my
> interpreter informs me that every one of your provided methods does not
> exist.

I'm sorry to say that, but your report is of very poor quality.. You
didn't say, for example:

- what's the python version you're using
- the link to the documentation your reading
- what are exactly the code you're running
- what are the exact errors/tracebacks you're getting back.

It's high likely some sort of installation error, versions mismatch
between documentation and the version of python your using. I would
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 report at bugs.python.org  Sat Apr 28 11:21:58 2012
From: report at bugs.python.org (Roundup Robot)
Date: Sat, 28 Apr 2012 09:21:58 +0000
Subject: [docs] [issue14448] Mention pytz in datetime's docs
In-Reply-To: <1333056065.25.0.804124513061.issue14448@psf.upfronthosting.co.za>
Message-ID: 


Roundup Robot  added the comment:

New changeset 1e5a483248ce by Sandro Tosi in branch '2.7':
Issue #14448: add reference to IANA timezone database; thanks to Georg/Nick suggestions
http://hg.python.org/cpython/rev/1e5a483248ce

New changeset a5a0d47e6e78 by Sandro Tosi in branch '3.2':
Issue #14448: add reference to IANA timezone database; thanks to Georg/Nick suggestions
http://hg.python.org/cpython/rev/a5a0d47e6e78

New changeset c91ed8dacf38 by Sandro Tosi in branch 'default':
Issue #14448: merge with 3.2
http://hg.python.org/cpython/rev/c91ed8dacf38

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Apr 28 11:28:32 2012
From: report at bugs.python.org (Dionysios Kalofonos)
Date: Sat, 28 Apr 2012 09:28:32 +0000
Subject: [docs] [issue14688] Typos in sorting.rst
Message-ID: <1335605311.94.0.280572266619.issue14688@psf.upfronthosting.co.za>


New submission from Dionysios Kalofonos :

Please see the file attached.

----------
assignee: docs at python
components: Documentation
files: sorting.diff
keywords: patch
messages: 159513
nosy: dk, docs at python
priority: normal
severity: normal
status: open
title: Typos in sorting.rst
versions: Python 3.3
Added file: http://bugs.python.org/file25389/sorting.diff

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Apr 28 12:23:54 2012
From: report at bugs.python.org (Roundup Robot)
Date: Sat, 28 Apr 2012 10:23:54 +0000
Subject: [docs] [issue14676] DeprecationWarning missing in default warning
	filters	documentation
In-Reply-To: <1335458952.26.0.88746757742.issue14676@psf.upfronthosting.co.za>
Message-ID: 


Roundup Robot  added the comment:

New changeset 0ad724738f6a by Sandro Tosi in branch '2.7':
Issue #14676: DeprecationWarning is ignored too; patch by Peter Eisentraut
http://hg.python.org/cpython/rev/0ad724738f6a

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Apr 28 12:24:38 2012
From: report at bugs.python.org (Sandro Tosi)
Date: Sat, 28 Apr 2012 10:24:38 +0000
Subject: [docs] [issue14676] DeprecationWarning missing in default warning
	filters	documentation
In-Reply-To: <1335458952.26.0.88746757742.issue14676@psf.upfronthosting.co.za>
Message-ID: <1335608678.82.0.482799466498.issue14676@psf.upfronthosting.co.za>


Sandro Tosi  added the comment:

Peter: thanks for the patch!

----------
nosy: +sandro.tosi
resolution:  -> fixed
stage: patch review -> committed/rejected
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From sandro.tosi at gmail.com  Sat Apr 28 12:56:50 2012
From: sandro.tosi at gmail.com (Sandro Tosi)
Date: Sat, 28 Apr 2012 12:56:50 +0200
Subject: [docs] Wrong reference in stdtypes
In-Reply-To: 
References: 
Message-ID: 

Hello Mihai,
thanks for your email.

On Wed, Apr 18, 2012 at 12:02, Mihai Capot?  wrote:
> Hello,
>
> The description of readlines in stdtypes mentions using the readline
> function, but the HTML link points to the readline module. I'm
> referring to the default docs, for Python 2.7.3.

this has now been fixed: http://hg.python.org/cpython/rev/707905b3f8df

Thanks,
-- 
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  Sat Apr 28 13:13:02 2012
From: sandro.tosi at gmail.com (Sandro Tosi)
Date: Sat, 28 Apr 2012 13:13:02 +0200
Subject: [docs] Omission in the documentation of uuid.uuid1()
In-Reply-To: <201204181401.56217.gene.saunders@idilia.com>
References: <201204181401.56217.gene.saunders@idilia.com>
Message-ID: 

Hello Gene,
thanks for your email.

On Wed, Apr 18, 2012 at 20:01, Gene Saunders  wrote:
> I found an omission in the uuid documentation:
> http://docs.python.org/library/uuid.htm
>
> The description of uuid.uuid1() does not describe the conditions under which
> the linux uuid functions will be used. The description should have an
> additional section something like the following:
>
>
> uuid.uuid1([node[, clock_seq]])
> Generate a UUID from a host ID, sequence number, and the current time.
>
> NEW
> If both node and clock_seq are not given, and the system call
> "uuid_generate_time" is available, then the UUID is generated using this
> system call. In this case the resulting clock_seq field will the stable system
> wide value as described in RFC 4122. Otherwise
>
> if node is not given, getnode() is used to obtain the hardware address. If
> clock_seq is given, it is used as the sequence number; otherwise a random 14-
> bit sequence number is chosen.

I can see your point in adding it but I don't file qualified to
decide, and I'd like to have a wider audience to evaluate it. Could
you please file a bug report on http://bugs.python.org/ about it?

Regards,
-- 
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  Sat Apr 28 21:56:06 2012
From: report at bugs.python.org (Michal Nowikowski)
Date: Sat, 28 Apr 2012 19:56:06 +0000
Subject: [docs] [issue14427] urllib.request.Request get_header and
	header_items not	documented
In-Reply-To: <1332875424.01.0.0659150950753.issue14427@psf.upfronthosting.co.za>
Message-ID: <1335642966.19.0.468213686044.issue14427@psf.upfronthosting.co.za>


Michal Nowikowski  added the comment:

Attached a patch that adds description of get_header and header_items methods in Doc/library/urllib.request.rst.

----------
keywords: +patch
nosy: +godfryd
Added file: http://bugs.python.org/file25391/doc-urlib-request.patch

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Apr 28 22:10:55 2012
From: report at bugs.python.org (Michal Nowikowski)
Date: Sat, 28 Apr 2012 20:10:55 +0000
Subject: [docs] [issue13050] RLock support the context manager protocol but
	this is	not documented
In-Reply-To: <1318172715.77.0.360303466185.issue13050@psf.upfronthosting.co.za>
Message-ID: <1335643855.7.0.342443907342.issue13050@psf.upfronthosting.co.za>


Michal Nowikowski  added the comment:

It looks that it is already documented by 76228:2040842626ba changeset.
The bug can be closed.

----------
nosy: +godfryd

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Apr 28 22:16:20 2012
From: report at bugs.python.org (Michal Nowikowski)
Date: Sat, 28 Apr 2012 20:16:20 +0000
Subject: [docs] [issue14688] Typos in sorting.rst
In-Reply-To: <1335605311.94.0.280572266619.issue14688@psf.upfronthosting.co.za>
Message-ID: <1335644180.74.0.450345017109.issue14688@psf.upfronthosting.co.za>


Michal Nowikowski  added the comment:

The changes looks ok.

----------
nosy: +godfryd

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Apr 28 22:38:46 2012
From: report at bugs.python.org (Michal Nowikowski)
Date: Sat, 28 Apr 2012 20:38:46 +0000
Subject: [docs] [issue14570] Document json "sort_keys" parameter properly
In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za>
Message-ID: <1335645526.65.0.0444021981683.issue14570@psf.upfronthosting.co.za>


Michal Nowikowski  added the comment:

In json module there are dump/dumps methods which internally instantiate encoder class JSONEncoder (or some other user-defined encoder clas).
They look as follows:

json.dump(obj, fp, 
          skipkeys=False,
          ensure_ascii=True,
          check_circular=True, 
          allow_nan=True,
          cls=None,
          indent=None,
          separators=None,
          default=None, 
          **kw)

json.JSONEncoder(skipkeys=False, 
                 ensure_ascii=True,
                 check_circular=True,
                 allow_nan=True,
                 sort_keys=False,
                 indent=None,
                 separators=None,
                 default=None)

Some of dump/dumps arguments are passed to encoder class:
- skipkeys
- ensure_ascii
- check_circular
- allow_nan
- indent
- separators
- default

And it looks that sort_keys is just missing in keyword args in dump/dumps method.
But it still can be passed implicitly using **kw arg.

I would propose to do:
- add explicitly sort_keys keyword arg to dump/dumps methods
- add passing it to encoder class
- and adjust documentation accordingly.

----------
nosy: +godfryd

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sat Apr 28 23:06:50 2012
From: report at bugs.python.org (Raymond Hettinger)
Date: Sat, 28 Apr 2012 21:06:50 +0000
Subject: [docs] [issue14688] Typos in sorting.rst
In-Reply-To: <1335605311.94.0.280572266619.issue14688@psf.upfronthosting.co.za>
Message-ID: <1335647210.78.0.454212361896.issue14688@psf.upfronthosting.co.za>


Raymond Hettinger  added the comment:

The first and last change looks fine.

----------
assignee: docs at python -> rhettinger
nosy: +rhettinger

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Apr 29 01:36:26 2012
From: report at bugs.python.org (Senthil Kumaran)
Date: Sat, 28 Apr 2012 23:36:26 +0000
Subject: [docs] [issue14427] urllib.request.Request get_header and
	header_items not	documented
In-Reply-To: <1332875424.01.0.0659150950753.issue14427@psf.upfronthosting.co.za>
Message-ID: <1335656186.42.0.172073307015.issue14427@psf.upfronthosting.co.za>


Changes by Senthil Kumaran :


----------
assignee: docs at python -> orsenthil
nosy: +orsenthil

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Apr 29 03:53:29 2012
From: report at bugs.python.org (Roundup Robot)
Date: Sun, 29 Apr 2012 01:53:29 +0000
Subject: [docs] [issue14155] Deja vu in re's documentation
In-Reply-To: <1330481540.05.0.869825762197.issue14155@psf.upfronthosting.co.za>
Message-ID: 


Roundup Robot  added the comment:

New changeset 142297db28f1 by Ezio Melotti in branch '2.7':
#14155: add a note about \b.
http://hg.python.org/cpython/rev/142297db28f1

New changeset f4b167309bee by Ezio Melotti in branch '3.2':
#14155: add a note about \b.
http://hg.python.org/cpython/rev/f4b167309bee

New changeset b1f29667a3c7 by Ezio Melotti in branch 'default':
#14155: merge note about \b from 3.2.
http://hg.python.org/cpython/rev/b1f29667a3c7

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Apr 29 03:55:19 2012
From: report at bugs.python.org (Ezio Melotti)
Date: Sun, 29 Apr 2012 01:55:19 +0000
Subject: [docs] [issue14155] Deja vu in re's documentation
In-Reply-To: <1330481540.05.0.869825762197.issue14155@psf.upfronthosting.co.za>
Message-ID: <1335664519.62.0.782281772599.issue14155@psf.upfronthosting.co.za>


Ezio Melotti  added the comment:

I added a note about \b.  I don't think the duplicate description of the octal escapes is a problem.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Apr 29 04:03:51 2012
From: report at bugs.python.org (Ezio Melotti)
Date: Sun, 29 Apr 2012 02:03:51 +0000
Subject: [docs] [issue11379] Remove "lightweight" from minidom description
In-Reply-To: <1299093908.17.0.828802315354.issue11379@psf.upfronthosting.co.za>
Message-ID: <1335665031.72.0.551298264529.issue11379@psf.upfronthosting.co.za>


Ezio Melotti  added the comment:

Any news on this?

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Apr 29 04:08:17 2012
From: report at bugs.python.org (Ezio Melotti)
Date: Sun, 29 Apr 2012 02:08:17 +0000
Subject: [docs] [issue14009] Clearer documentation for cElementTree
In-Reply-To: <1329233203.38.0.944311933185.issue14009@psf.upfronthosting.co.za>
Message-ID: <1335665297.18.0.713198300159.issue14009@psf.upfronthosting.co.za>


Changes by Ezio Melotti :


----------
type:  -> enhancement

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Apr 29 04:38:36 2012
From: report at bugs.python.org (Ezio Melotti)
Date: Sun, 29 Apr 2012 02:38:36 +0000
Subject: [docs] [issue13850] Summary tables for argparse add_argument options
In-Reply-To: <1327384498.23.0.981832544617.issue13850@psf.upfronthosting.co.za>
Message-ID: <1335667115.93.0.00534388114674.issue13850@psf.upfronthosting.co.za>


Ezio Melotti  added the comment:

> * It's incredibly not helpful for people who don't know argparse

Indeed.  Maybe this should be moved down in the page, and possibly provide a link to the top (see e.g. the unittest doc [0] and the link on top to jump to the list of assert methods).  Once people know it's there they will find it easily, but opening the doc with this table is a bit confusing IMHO.  Adding a couple of line to explain what the table is for might also help.

> * I tried adding effects descriptions in the cells instead of mere
> tick marks, the table becomes completely unreadable.

In the rst source only latin-1 chars are allowed (otherwise `make pdf` breaks), so you should replace the tick marks with something else (e.g. "x" or "yes"/"no").

> I added a note directive below the table but it only lists a few 
> really important/weird things, and it really won't scale beyond the
> current 3 items (which might already be too much)

You can also add notes numbers just next to the "x"s and add a description below [1].  This could be applied to the "const" column as well if you want to save some horizontal space.  If you want to save even more space you could remove the version row/column and add a note about it.

> * I completely removed the ``help`` action from the table as it's 
> unlikely anyone will want to override it (and its row was completely blank)

Maybe you could add a note about this too.

> * Hyperlinking and cross-linking (to the params, the actions,
> footnotes) would probably be a good idea, although it would
> definitely make the "raw text" (in-rst) 

This might be useful (I did it in the assert methods' tables in the unittest doc [0]), and having links in the HTML probably outweighs the fact that the rst source becomes less readable.

Note that (depending on what you change), you might be able to use the lightweight syntax for tables if you prefer.

[0]: http://docs.python.org/library/unittest.html
[1]: e.g. http://docs.python.org/library/stdtypes.html#numeric-types-int-float-long-complex

----------
stage:  -> patch review
type:  -> enhancement

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Apr 29 05:53:22 2012
From: report at bugs.python.org (Roundup Robot)
Date: Sun, 29 Apr 2012 03:53:22 +0000
Subject: [docs] [issue14427] urllib.request.Request get_header and
	header_items not	documented
In-Reply-To: <1332875424.01.0.0659150950753.issue14427@psf.upfronthosting.co.za>
Message-ID: 


Roundup Robot  added the comment:

New changeset 6a9f100e138c by Senthil Kumaran in branch '3.2':
issue14427 - Document Request.get_header and Request.header_items
http://hg.python.org/cpython/rev/6a9f100e138c

New changeset 261de1701343 by Senthil Kumaran in branch 'default':
issue14427 - Document Request.get_header and Request.header_items
http://hg.python.org/cpython/rev/261de1701343

New changeset 9a1f525b98d9 by Senthil Kumaran in branch '2.7':
issue14427 - Document Request.get_header and Request.header_items
http://hg.python.org/cpython/rev/9a1f525b98d9

----------
nosy: +python-dev

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Apr 29 05:54:16 2012
From: report at bugs.python.org (Senthil Kumaran)
Date: Sun, 29 Apr 2012 03:54:16 +0000
Subject: [docs] [issue14427] urllib.request.Request get_header and
	header_items not	documented
In-Reply-To: <1332875424.01.0.0659150950753.issue14427@psf.upfronthosting.co.za>
Message-ID: <1335671656.78.0.88484885777.issue14427@psf.upfronthosting.co.za>


Senthil Kumaran  added the comment:

Just documented it. Surprising that it was not already! :(

----------
resolution:  -> fixed
stage:  -> committed/rejected
status: open -> closed

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Apr 29 05:58:19 2012
From: report at bugs.python.org (Ezio Melotti)
Date: Sun, 29 Apr 2012 03:58:19 +0000
Subject: [docs] [issue14034] Add argparse howto
In-Reply-To: <1329417262.26.0.419020263055.issue14034@psf.upfronthosting.co.za>
Message-ID: <1335671898.97.0.0289197934988.issue14034@psf.upfronthosting.co.za>


Ezio Melotti  added the comment:

> Would be nice to get another review.

I left several comments on rietveld.

Overall the tutorial seems really nice and easy to follow (except a couple of parts, noted in the comments).

I would replace all the uses of pow(x, y) with x**y in the code, and possibly with x^y in the output/descriptions (x**y is probably fine there too).

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Apr 29 06:19:00 2012
From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=)
Date: Sun, 29 Apr 2012 04:19:00 +0000
Subject: [docs] [issue11379] Remove "lightweight" from minidom description
In-Reply-To: <1299093908.17.0.828802315354.issue11379@psf.upfronthosting.co.za>
Message-ID: <1335673140.35.0.707327756203.issue11379@psf.upfronthosting.co.za>


?ric Araujo  added the comment:

I?ve been unresponsive of late, sorry, but I?m still here.  Will see if I have time tomorrow.

----------

_______________________________________
Python tracker 

_______________________________________

From report at bugs.python.org  Sun Apr 29 06:21:33 2012
From: report at bugs.python.org (Ezio Melotti)
Date: Sun, 29 Apr 2012 04:21:33 +0000
Subject: [docs] [issue14034] Add argparse howto
In-Reply-To: <1329417262.26.0.419020263055.issue14034@psf.upfronthosting.co.za>
Message-ID: <1335673293.49.0.412663048682.issue14034@psf.upfronthosting.co.za>


Ezio Melotti  added the comment:

A few more comments:

* in the review I mentioned highlighting specific code lines (this would be really great given the incremental nature of the howto), but apparently that requires a pygment 1.1 [0].

* all the output examples could use ".. highlightlang:: sh", but:
  1. the sh highlighter is not so good imho;
  2. you would have to switch back and forth from sh and python (unless there's a better way to do it);

* the sidebar box with the tutorial looks better if you put it between the 
and the introductory paragraph. Maybe Georg has something to say about the first two comments. [0]: see last example in http://sphinx.pocoo.org/markup/code.html#line-numbers ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 06:35:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 29 Apr 2012 04:35:39 +0000 Subject: [docs] [issue14461] In re's positive lookbehind assertion documentation match() cannot match In-Reply-To: <1333267920.68.0.0890741084259.issue14461@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 7c262962b681 by Ezio Melotti in branch '2.7': #14461: fix wording. http://hg.python.org/cpython/rev/7c262962b681 New changeset 7f35da912739 by Ezio Melotti in branch '3.2': #14461: fix wording. http://hg.python.org/cpython/rev/7f35da912739 New changeset d68b4885fc0f by Ezio Melotti in branch 'default': #14461: merge with 3.2. http://hg.python.org/cpython/rev/d68b4885fc0f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 06:40:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 Apr 2012 04:40:16 +0000 Subject: [docs] [issue14461] In re's positive lookbehind assertion documentation match() cannot match In-Reply-To: <1333267920.68.0.0890741084259.issue14461@psf.upfronthosting.co.za> Message-ID: <1335674416.6.0.211378204394.issue14461@psf.upfronthosting.co.za> Ezio Melotti added the comment: Technically you are correct, however using zero-width classes inside a lookbehind doesn't make much sense, because the result would be equivalent even without lookbehind. I replaced 'never' with 'not', because usually it will not match, except in these corner cases that can IMHO be ignored. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 06:54:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 Apr 2012 04:54:16 +0000 Subject: [docs] [issue14462] In re's named group the name cannot contain unicode characters In-Reply-To: <1333268208.65.0.802050679023.issue14462@psf.upfronthosting.co.za> Message-ID: <1335675256.73.0.663825304266.issue14462@psf.upfronthosting.co.za> Ezio Melotti added the comment: There are two options here: 1. fix the doc; 2. fix the code; Matthew, do you have any opinion on this? Does this work on regex? ---------- stage: -> needs patch type: behavior -> enhancement versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 07:10:06 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 Apr 2012 05:10:06 +0000 Subject: [docs] [issue14405] Some "Other Resources" in the sidebar are hopelessly out of date In-Reply-To: <1332696210.48.0.175266420412.issue14405@psf.upfronthosting.co.za> Message-ID: <1335676206.31.0.183244910924.issue14405@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a patch that removes a few links: * FAQs: the link is already in the page; * Guido's Essays: the content is outdated; * New-style Classes: the content is outdated; * Other Doc Collections: link is broken; * Report a Bug: the link is already in the page; Someone should also update the pages about New-style Classes and Guido's Essays. ---------- assignee: docs at python -> ezio.melotti keywords: +patch nosy: +eric.araujo, georg.brandl stage: -> patch review type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file25401/issue14405.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 07:17:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 Apr 2012 05:17:35 +0000 Subject: [docs] [issue14244] No information about behaviour with groups in pattern in the docstring for re.split In-Reply-To: <1331348902.51.0.968875082813.issue14244@psf.upfronthosting.co.za> Message-ID: <1335676655.33.0.568019358697.issue14244@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected type: -> enhancement versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 07:24:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 29 Apr 2012 05:24:12 +0000 Subject: [docs] =?utf-8?q?=5Bissue14236=5D_re=3A_Docstring_for_=5Cs_and_?= =?utf-8?q?=5CS_doesn=E2=80=99t_mention_Unicode?= In-Reply-To: <1331273217.26.0.527770128505.issue14236@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset da9179248118 by Ezio Melotti in branch '3.2': #14236: mention Unicode whitespace in \s documentation. http://hg.python.org/cpython/rev/da9179248118 New changeset db39b9513e71 by Ezio Melotti in branch 'default': #14236: merge with 3.2. http://hg.python.org/cpython/rev/db39b9513e71 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 07:24:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 Apr 2012 05:24:59 +0000 Subject: [docs] =?utf-8?q?=5Bissue14236=5D_re=3A_Docstring_for_=5Cs_and_?= =?utf-8?q?=5CS_doesn=E2=80=99t_mention_Unicode?= In-Reply-To: <1331273217.26.0.527770128505.issue14236@psf.upfronthosting.co.za> Message-ID: <1335677099.85.0.368783115889.issue14236@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 versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 10:25:51 2012 From: report at bugs.python.org (py.user) Date: Sun, 29 Apr 2012 08:25:51 +0000 Subject: [docs] =?utf-8?q?=5Bissue14236=5D_re=3A_Docstring_for_=5Cs_and_?= =?utf-8?q?=5CS_doesn=E2=80=99t_mention_Unicode?= In-Reply-To: <1331273217.26.0.527770128505.issue14236@psf.upfronthosting.co.za> Message-ID: <1335687950.93.0.357398596816.issue14236@psf.upfronthosting.co.za> py.user added the comment: \S is equivalent to [^\s] like \d with \D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 10:28:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 Apr 2012 08:28:14 +0000 Subject: [docs] [issue14558] Documentation for unittest.main does not describe some keyword arguments. In-Reply-To: <1334208375.3.0.0230518732022.issue14558@psf.upfronthosting.co.za> Message-ID: <1335688094.41.0.603102270213.issue14558@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a patch. ---------- assignee: docs at python -> ezio.melotti keywords: +patch stage: needs patch -> commit review Added file: http://bugs.python.org/file25404/issue14558.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 10:49:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 29 Apr 2012 08:49:04 +0000 Subject: [docs] [issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers In-Reply-To: <1333757996.58.0.360922081437.issue14519@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset b26471a2a115 by Ezio Melotti in branch '2.7': #14519: fix the regex used in the scanf example. http://hg.python.org/cpython/rev/b26471a2a115 New changeset e317d651ccf8 by Ezio Melotti in branch '3.2': #14519: fix the regex used in the scanf example. http://hg.python.org/cpython/rev/e317d651ccf8 New changeset 7cc1cddb378d by Ezio Melotti in branch 'default': #14519: merge with 3.2. http://hg.python.org/cpython/rev/7cc1cddb378d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 10:50:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 Apr 2012 08:50:58 +0000 Subject: [docs] [issue14519] In re's examples the example with scanf() contains wrong analog for %x, %X specifiers In-Reply-To: <1333757996.58.0.360922081437.issue14519@psf.upfronthosting.co.za> Message-ID: <1335689458.75.0.178850842943.issue14519@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the suggestions! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 10:57:30 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 29 Apr 2012 08:57:30 +0000 Subject: [docs] [issue14691] a code example not highlighted in http://docs.python.org/dev/library/stdtypes.html#memoryview Message-ID: <1335689850.36.0.828007836138.issue14691@psf.upfronthosting.co.za> New submission from Ramchandra Apte : A code example is not highlighted in the 3.3 docs for memoryview (http://docs.python.org/dev/library/stdtypes.html#memoryview) Only 3.3 is affected by this bug as the code example is for a feature in 3.3. ---------- assignee: docs at python components: Documentation messages: 159590 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: a code example not highlighted in http://docs.python.org/dev/library/stdtypes.html#memoryview versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 11:25:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 Apr 2012 09:25:22 +0000 Subject: [docs] [issue12947] Examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1335691522.74.0.302648951002.issue12947@psf.upfronthosting.co.za> Ezio Melotti added the comment: Is there a way to add a :keep-doctest-flags: options to literal blocks? ---------- stage: test needed -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 12:20:22 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 29 Apr 2012 10:20:22 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1335694822.08.0.77766789768.issue11352@psf.upfronthosting.co.za> Hynek Schlawack added the comment: What is the reason for this one to languish for over a year now? Lack of proper patch? It?s marked ?high priority?, so let?s get moving. ---------- nosy: +hynek, sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 12:37:18 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 Apr 2012 10:37:18 +0000 Subject: [docs] =?utf-8?q?=5Bissue14236=5D_re=3A_Docstring_for_=5Cs_and_?= =?utf-8?q?=5CS_doesn=E2=80=99t_mention_Unicode?= In-Reply-To: <1331273217.26.0.527770128505.issue14236@psf.upfronthosting.co.za> Message-ID: <1335695838.6.0.769638222157.issue14236@psf.upfronthosting.co.za> Ezio Melotti added the comment: Good point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 12:37:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 29 Apr 2012 10:37:26 +0000 Subject: [docs] =?utf-8?q?=5Bissue14236=5D_re=3A_Docstring_for_=5Cs_and_?= =?utf-8?q?=5CS_doesn=E2=80=99t_mention_Unicode?= In-Reply-To: <1331273217.26.0.527770128505.issue14236@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 23d5b457dc71 by Ezio Melotti in branch '3.2': #14236: fix docs for \S. http://hg.python.org/cpython/rev/23d5b457dc71 New changeset 9165774a8055 by Ezio Melotti in branch 'default': #14236: merge with 3.2. http://hg.python.org/cpython/rev/9165774a8055 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 13:25:05 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 29 Apr 2012 11:25:05 +0000 Subject: [docs] [issue14692] json.joads parse_constant callback not working anymore In-Reply-To: <1335695665.87.0.370023915793.issue14692@psf.upfronthosting.co.za> Message-ID: <1335698705.15.0.779994702943.issue14692@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Hi Jakob, parse_constant has been changed as of d95e5add3ca4 to be called only on "-Infinity, Infinity, NaN": ``parse_constant``, if specified, will be called with one of the following strings: -Infinity, Infinity, NaN. This can be used to raise an exception if invalid JSON numbers are encountered. And indeed, if you change your example to Infinity, it gets called. That said, neither the 2.7 nor the dev docs reflect that. So it seems like a documentation bug to me. ---------- assignee: -> docs at python components: +Documentation -Extension Modules nosy: +docs at python, eric.araujo, georg.brandl, hynek versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 13:33:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Apr 2012 11:33:53 +0000 Subject: [docs] [issue14692] json.joads parse_constant callback not working anymore In-Reply-To: <1335695665.87.0.370023915793.issue14692@psf.upfronthosting.co.za> Message-ID: <1335699233.44.0.0449423101876.issue14692@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +patch Added file: http://bugs.python.org/file25406/json_parse_constant_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 13:56:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 29 Apr 2012 11:56:58 +0000 Subject: [docs] [issue10376] ZipFile unzip is unbuffered In-Reply-To: <1289317915.09.0.657677437465.issue10376@psf.upfronthosting.co.za> Message-ID: <1335700618.41.0.601864632044.issue10376@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually reading from the zip file is buffered (at least 4 KiB of uncompressed data at a time). Can you give tests, scripts and data, which show the problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 14:51:25 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 29 Apr 2012 12:51:25 +0000 Subject: [docs] [issue14692] json.joads parse_constant callback not working anymore In-Reply-To: <1335695665.87.0.370023915793.issue14692@psf.upfronthosting.co.za> Message-ID: <1335703885.5.0.341809233311.issue14692@psf.upfronthosting.co.za> Ezio Melotti added the comment: The original changeset is at [0], and the commit message just says "even more decoder optimizations". The official website[1] and the RFC[2] don't list any constant, so I guess the definition of what a constant is is not well defined. [0]: http://code.google.com/p/simplejson/source/detail?spec=svn103&r=103 [1]: http://www.json.org/ [2]: http://tools.ietf.org/html/rfc4627 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 17:23:14 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 29 Apr 2012 15:23:14 +0000 Subject: [docs] [issue14691] a code example not highlighted in http://docs.python.org/dev/library/stdtypes.html#memoryview In-Reply-To: <1335689850.36.0.828007836138.issue14691@psf.upfronthosting.co.za> Message-ID: <1335712994.26.0.687284163876.issue14691@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Is it a sphinx version problem? I could not figure out why that particular code is not highlighted. The syntax looks correct. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 17:24:05 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 29 Apr 2012 15:24:05 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1335713045.62.0.555942438381.issue11352@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: docs at python -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 17:25:19 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 29 Apr 2012 15:25:19 +0000 Subject: [docs] [issue14462] In re's named group the name cannot contain unicode characters In-Reply-To: <1333268208.65.0.802050679023.issue14462@psf.upfronthosting.co.za> Message-ID: <1335713119.11.0.323934555298.issue14462@psf.upfronthosting.co.za> Matthew Barnett added the comment: It doesn't work in regex, but it probably should. IMHO, if it's a valid identifier, then it should be allowed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 18:06:23 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 29 Apr 2012 16:06:23 +0000 Subject: [docs] [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: <1335715583.77.0.590293967698.issue10433@psf.upfronthosting.co.za> Hynek Schlawack added the comment: This one LGTM, still applies cleanly against current tip and is languishing for a way to long time. Commit & close? ---------- nosy: +hynek versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 18:36:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 29 Apr 2012 16:36:09 +0000 Subject: [docs] [issue14688] Typos in sorting.rst In-Reply-To: <1335605311.94.0.280572266619.issue14688@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 295fec2cd5ed by Raymond Hettinger in branch '3.2': Issue 14688: Fix typo http://hg.python.org/cpython/rev/295fec2cd5ed ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 18:37:43 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 29 Apr 2012 16:37:43 +0000 Subject: [docs] [issue14688] Typos in sorting.rst In-Reply-To: <1335605311.94.0.280572266619.issue14688@psf.upfronthosting.co.za> Message-ID: <1335717463.67.0.0721855161676.issue14688@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 19:40:36 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sun, 29 Apr 2012 17:40:36 +0000 Subject: [docs] [issue14034] Add argparse howto In-Reply-To: <1329417262.26.0.419020263055.issue14034@psf.upfronthosting.co.za> Message-ID: <1335721234.1.0.968103972332.issue14034@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: addressing the bulk of your comments this does not address last message, where you want the lines highlighted; it will be rather tedious; to me the code snippets are short enough, removing the need for highlighting ---------- Added file: http://bugs.python.org/file25409/argparse_howto4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 20:35:17 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 29 Apr 2012 18:35:17 +0000 Subject: [docs] [issue14691] a code example not highlighted in http://docs.python.org/dev/library/stdtypes.html#memoryview In-Reply-To: <1335689850.36.0.828007836138.issue14691@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 925fbcfbbc45 by Sandro Tosi in branch 'default': Issue #14691: indent the traceback so the example is highlighted http://hg.python.org/cpython/rev/925fbcfbbc45 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 29 20:40:26 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sun, 29 Apr 2012 18:40:26 +0000 Subject: [docs] [issue14691] a code example not highlighted in http://docs.python.org/dev/library/stdtypes.html#memoryview In-Reply-To: <1335689850.36.0.828007836138.issue14691@psf.upfronthosting.co.za> Message-ID: <1335724826.74.0.136328617248.issue14691@psf.upfronthosting.co.za> Sandro Tosi added the comment: It's seems like a deja-vu: I thought I saw this problem once, and was already fixed - bah, it was tricky (traceback needs to be indented for the code to be highlighted), that's why I remember it ---------- nosy: +sandro.tosi resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 00:56:13 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 29 Apr 2012 22:56:13 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1335740172.93.0.913577185093.issue11352@psf.upfronthosting.co.za> STINNER Victor added the comment: > What is the reason for this one to languish for over a year now? Maybe because few people are concerned by the cgi module? > Lack of proper patch? It would help to have a patch attached to the issue, and a review of the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 09:47:56 2012 From: report at bugs.python.org (Pierre Quentel) Date: Mon, 30 Apr 2012 07:47:56 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1335772075.24.0.314233027309.issue11352@psf.upfronthosting.co.za> Pierre Quentel added the comment: Thanks Hynek for raising this issue from the dead Patch proposal attached. Sorry if there are markup errors, it's my first contact with rst ---------- Added file: http://bugs.python.org/file25416/cgi.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 09:48:14 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 30 Apr 2012 07:48:14 +0000 Subject: [docs] [issue14034] Add argparse howto In-Reply-To: <1329417262.26.0.419020263055.issue14034@psf.upfronthosting.co.za> Message-ID: <1335772094.16.0.420445225146.issue14034@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: Thanks so much for your thorough attention to detail. I've addressed all your latest comments. ---------- Added file: http://bugs.python.org/file25417/argparse_howto5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 10:05:28 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 30 Apr 2012 08:05:28 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1335773128.05.0.669370334615.issue11352@psf.upfronthosting.co.za> Hynek Schlawack added the comment: That?s not a patch. :) Posting whole files makes them very hard to review because you can?t spot the changes. The best thing would be to get a fresh clone of the repo: http://docs.python.org/devguide/setup.html#setup , copy your edited file to the appropriate place and run `hg diff`. If it looks okay, redirect the output into a file (something like `hg diff >cgi-doc-update.patch`) and attach it to this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 10:40:07 2012 From: report at bugs.python.org (Pierre Quentel) Date: Mon, 30 Apr 2012 08:40:07 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1335775207.55.0.821907367134.issue11352@psf.upfronthosting.co.za> Pierre Quentel added the comment: Sorry about that. I didn't dare to say I was also a Mercurial newbie ---------- Added file: http://bugs.python.org/file25421/cgi-doc-update.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 10:40:26 2012 From: report at bugs.python.org (Pierre Quentel) Date: Mon, 30 Apr 2012 08:40:26 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1335775226.5.0.545569229614.issue11352@psf.upfronthosting.co.za> Changes by Pierre Quentel : Removed file: http://bugs.python.org/file25416/cgi.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 10:41:30 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 30 Apr 2012 08:41:30 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1335775207.55.0.821907367134.issue11352@psf.upfronthosting.co.za> Message-ID: Senthil Kumaran added the comment: Not to worry about that Pierre. I shall review the patch (contents) in the evening (SGT) and I should be able to commit/close this issue. Thanks, Senthil ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 10:47:26 2012 From: report at bugs.python.org (Pierre Quentel) Date: Mon, 30 Apr 2012 08:47:26 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1335775646.45.0.600956023988.issue11352@psf.upfronthosting.co.za> Pierre Quentel added the comment: Thanks Senthil I spot a typo in the first modified paragraph : "cet" instead of "set" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 11:54:45 2012 From: report at bugs.python.org (Jakob Simon-Gaarde) Date: Mon, 30 Apr 2012 09:54:45 +0000 Subject: [docs] [issue14692] json.joads parse_constant callback not working anymore In-Reply-To: <1335695665.87.0.370023915793.issue14692@psf.upfronthosting.co.za> Message-ID: <1335779685.93.0.461711350228.issue14692@psf.upfronthosting.co.za> Jakob Simon-Gaarde added the comment: Ok, I accept that at some point it was decided to take away the call to parse_constant hook on "true" and "false" values. But how does it help me to know this, I still need to react on these values? It seems a little overkill to parse through all parsed values using object_pairs_hook. Best Regards Jakob Simon-Gaarde ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 16:15:04 2012 From: report at bugs.python.org (Stefano Taschini) Date: Mon, 30 Apr 2012 14:15:04 +0000 Subject: [docs] [issue12947] Examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1335795303.99.0.861044107124.issue12947@psf.upfronthosting.co.za> Stefano Taschini added the comment: Ezio, the patch I attached goes into that direction, by adding a ":trim-doctest-flags: disable" option to the code blocks. I thought I had a good reason for having the option worded as ":trim-doctest-flags: disable" instead of ":keep-doctest-flags:", now I'm not so sure. Note: the patch is against the 2.7 branch. ---------- keywords: +patch Added file: http://bugs.python.org/file25424/issue12947_v0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 16:44:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 30 Apr 2012 14:44:00 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset a54b6e321f1c by Senthil Kumaran in branch '3.2': Issue11352 - Update cgi module docs http://hg.python.org/cpython/rev/a54b6e321f1c New changeset 910a4b12c796 by Senthil Kumaran in branch 'default': Issue11352 - Update cgi module docs http://hg.python.org/cpython/rev/910a4b12c796 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 16:46:12 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 30 Apr 2012 14:46:12 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1335797172.38.0.0548119210356.issue11352@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I have made the suggested specific changes, but while reviewing the entire doc, I realized that much improvements can be made. Keeping the documentation more helpful aligned with the cgi.py APIs. I shall keep bug report to update the cgi docs further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 17:39:11 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 30 Apr 2012 15:39:11 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1335800351.5.0.00952608171587.issue11352@psf.upfronthosting.co.za> Changes by Hynek Schlawack : ---------- nosy: -hynek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 17:48:28 2012 From: report at bugs.python.org (Peter Kleiweg) Date: Mon, 30 Apr 2012 15:48:28 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1335800908.38.0.595092342063.issue11352@psf.upfronthosting.co.za> Changes by Peter Kleiweg : ---------- nosy: -pebbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 18:01:23 2012 From: report at bugs.python.org (Michael Foord) Date: Mon, 30 Apr 2012 16:01:23 +0000 Subject: [docs] [issue14558] Documentation for unittest.main does not describe some keyword arguments. In-Reply-To: <1334208375.3.0.0230518732022.issue14558@psf.upfronthosting.co.za> Message-ID: <1335801683.67.0.120366860855.issue14558@psf.upfronthosting.co.za> Michael Foord added the comment: A good change - thanks Ezio. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 18:11:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 30 Apr 2012 16:11:24 +0000 Subject: [docs] [issue14558] Documentation for unittest.main does not describe some keyword arguments. In-Reply-To: <1334208375.3.0.0230518732022.issue14558@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 55b2258c1c7c by Ezio Melotti in branch '2.7': #14558: document the module, argv, and testLoader args of unittest.main. http://hg.python.org/cpython/rev/55b2258c1c7c New changeset 06046a6943a7 by Ezio Melotti in branch '3.2': #14558: document the module, argv, and testLoader args of unittest.main. http://hg.python.org/cpython/rev/06046a6943a7 New changeset 6e541ed4e987 by Ezio Melotti in branch 'default': #14558: merge with 3.2. http://hg.python.org/cpython/rev/6e541ed4e987 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 18:12:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 30 Apr 2012 16:12:07 +0000 Subject: [docs] [issue14558] Documentation for unittest.main does not describe some keyword arguments. In-Reply-To: <1334208375.3.0.0230518732022.issue14558@psf.upfronthosting.co.za> Message-ID: <1335802327.2.0.661458780135.issue14558@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the review! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 18:43:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 30 Apr 2012 16:43:21 +0000 Subject: [docs] [issue10665] Expand unicodedata module documentation In-Reply-To: <1291930276.17.0.60709403086.issue10665@psf.upfronthosting.co.za> Message-ID: <1335804201.48.0.298149255545.issue10665@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> patch review type: -> enhancement versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 20:16:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 30 Apr 2012 18:16:22 +0000 Subject: [docs] [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: Roundup Robot added the comment: New changeset 2468b58f7fce by Ned Deily in branch '2.7': Issue #10433: Document unique behavior of 'os.getgroups' on Mac OS X. http://hg.python.org/cpython/rev/2468b58f7fce New changeset 5c801899cd6d by Ned Deily in branch '3.2': Issue #10433: Document unique behavior of 'os.getgroups' on Mac OS X. http://hg.python.org/cpython/rev/5c801899cd6d New changeset e7d545a5f6bc by Ned Deily in branch 'default': Issue #10433: merge http://hg.python.org/cpython/rev/e7d545a5f6bc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 20:17:46 2012 From: report at bugs.python.org (Michal Nowikowski) Date: Mon, 30 Apr 2012 18:17:46 +0000 Subject: [docs] [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1335809866.08.0.00542051962198.issue14570@psf.upfronthosting.co.za> Michal Nowikowski added the comment: Attached a patch. To preserve current order of arguments in dumps/dump functions sort_keys argument has been added to the end of arguments just before **kw. ---------- keywords: +patch Added file: http://bugs.python.org/file25427/json-sort-keys.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 30 20:19:23 2012 From: report at bugs.python.org (Ned Deily) Date: Mon, 30 Apr 2012 18:19:23 +0000 Subject: [docs] [issue10433] Document unique behavior of 'getgroups' on OSX In-Reply-To: <1289916367.38.0.763799196023.issue10433@psf.upfronthosting.co.za> Message-ID: <1335809963.19.0.652128508819.issue10433@psf.upfronthosting.co.za> Ned Deily added the comment: Committed with minor revisions for 2.7.4, 3.2.4, and 3.3.0a3. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________