From report at bugs.python.org Tue Feb 1 05:27:05 2011 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 01 Feb 2011 04:27:05 +0000 Subject: [docs] [issue1215] Python hang when catching a segfault In-Reply-To: <1190912724.9.0.418130471784.issue1215@psf.upfronthosting.co.za> Message-ID: <1296534425.38.0.180268016903.issue1215@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The consensus is that this is not a crash (and not even a bug). I am not sure what is the proper type for doc enhancement, but is certainly should not show up in a search for crashers. ---------- components: -Interpreter Core nosy: +belopolsky type: crash -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 01:13:38 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Feb 2011 00:13:38 +0000 Subject: [docs] [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1296692018.64.0.656659405111.issue9264@psf.upfronthosting.co.za> ?ric Araujo added the comment: Backported in r88324 and r88328. ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 06:14:40 2011 From: report at bugs.python.org (Ross Lagerwall) Date: Thu, 03 Feb 2011 05:14:40 +0000 Subject: [docs] [issue9127] subprocess.Popen.communicate() and SIGCHLD handlers In-Reply-To: <1277913297.34.0.963310724242.issue9127@psf.upfronthosting.co.za> Message-ID: <1296710080.42.0.44898963839.issue9127@psf.upfronthosting.co.za> Ross Lagerwall added the comment: This has been fixed in 2.7 and 3.2 so I think that this issue can be closed. ---------- nosy: +rosslagerwall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 08:55:02 2011 From: report at bugs.python.org (Ned Deily) Date: Thu, 03 Feb 2011 07:55:02 +0000 Subject: [docs] [issue9127] subprocess.Popen.communicate() and SIGCHLD handlers In-Reply-To: <1277913297.34.0.963310724242.issue9127@psf.upfronthosting.co.za> Message-ID: <1296719702.57.0.49759247432.issue9127@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the problem report. And thanks for noticing the fix. ---------- nosy: +ned.deily resolution: -> out of date stage: -> committed/rejected status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 3 11:01:32 2011 From: report at bugs.python.org (Ross Lagerwall) Date: Thu, 03 Feb 2011 10:01:32 +0000 Subject: [docs] [issue7678] subprocess.Popen pipeline example code in the documentation is lacking In-Reply-To: <1263245210.2.0.116487607425.issue7678@psf.upfronthosting.co.za> Message-ID: <1296727292.25.0.826363818484.issue7678@psf.upfronthosting.co.za> Ross Lagerwall added the comment: The docs should be updated. This has been noted in msg54949 and http://www.enricozini.org/2009/debian/python-pipes/ Perhaps this example will make it clear: import subprocess p1 = subprocess.Popen(["yes"], stdout=subprocess.PIPE) p2 = subprocess.Popen(["head"], stdin=p1.stdout, stdout=subprocess.PIPE) #p1.stdout.close() p1.wait() This example hangs. "yes" writes to "head" and head reads the first 10 lines and then exits. But, "yes" does not receive a SIGPIPE because the python process still has a p1.stdout open. Thus, p1.stdout should be closed after being passed to p2. ---------- nosy: +rosslagerwall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 00:50:53 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Feb 2011 23:50:53 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1296777053.67.0.310167453376.issue9364@psf.upfronthosting.co.za> ?ric Araujo added the comment: >> In the Python interpreter, do "from pydoc import help" to provide online >> help. Calling help(thing) on a Python object documents the object. > Which is no longer accurate, because the help() function has long ago > become a built-in. To be pedantic, help is not available if python was started with -S. (The docs for site and -S are cross-linked, so that should be discoverable easily enough.) +1 on removing the outdated piece of advice. > 1. The output from help(help) could be made more clear. Agreed. > Why should help special-case itself (with a slightly garbled line?) > This would be a code patch to pydoc.help I haven?t found any special-casing code. Quick testing shows it?s just how pydoc displays help for instances of Python classes. I think making the docstring of site._Helper better (i.e. explain what the class is for + tell people to call help() to access the doc system) would be enough, nothing to change in pydoc.py unless I?ve missed something. (BTW, pydoc code is quite intricated, reminds me a bit of distutils! Who wants to make a graph explaining how help works?) > "This is a wrapper around pydoc.help" good so far "(with a twist)" thanks a lot. > I think the comment should be either removed or explained. Agreed. I think the ?twist? is that the import is lazy and that help has a useful repr (wow, talk about a twist!). Those details need not be alluded to, just remove the comment (?wrapper? is IMO enough to raise curiosity, the source is here to find what?s the wrapping). > Replace "Define the built-in 'help'." with something clearer and more accurate, > such as "The name 'help' is injected in module builtins after being bound > to an instance of this class.". I think that?s too much detail. ?Class used to implement the built-in help function? is enough for my taste. > 2. Improve manual chapter for site module. +1 on better explaining behavior where needed, -1 on documenting implementation details starting with underscores. > Add "inject 'help' into builtins and " after append. -1. help is documented in http://docs.python.org/dev/library/functions#help ; quit, exit, license, copyright and credits are documented in http://docs.python.org/dev/library/constants#constants-added-by-the-site-module (see #652749). To prevent duplication, let?s just add a link from site to constants. (You don?t want to know how much time the previous paragraph has cost me.) > "This module contains a class (_Helper) that wraps function pydoc.help. > An instance of the class is bound to name 'help' in the builtins module." -1. Counter-proposal: Add a link to library/functions#help from library/constants; add a link from library/site to library/constants. > A recent discussion on pydev or maybe python-list (in the thread mentioned > above?) implied that one could usefully make another instance of _Helper or maybe a > subclass thereof. I did not pay enough attention, though, to really get it. I?m curious about the use cases. Eli, can you give us the date of the private email from Terry so that someone can dig up the thread? > "XXX Update documentation" This comment refers to new functions in site to support PEP 370. > "XXX document python -m site --user-base --user-site" We can reuse the example written by Raymond for the whatsnew/3.2 document. To sum up: needs one patch for Lib/site.py, one to add cross-links in Doc/library, one to add missing functions/data from PEP 370 in Doc/library/site.rst, another one to the same file to document the command-line interface of site (those last two may be one, if the contributor is motivated). I suggest to wait for replies to my points above, and if there is consensus or lack of disagreement, someone can turn my suggestions into patches. ---------- nosy: +eric.araujo versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From merwok at netwok.org Fri Feb 4 05:23:18 2011 From: merwok at netwok.org (=?UTF-8?B?w4lyaWMgQXJhdWpv?=) Date: Fri, 04 Feb 2011 05:23:18 +0100 Subject: [docs] curses page doesn't mention the resize method In-Reply-To: <4D365259.2030505@louiz.org> References: <4D365259.2030505@louiz.org> Message-ID: <4D4B7F36.8060904@netwok.org> > On the curses page [0], there is no mention of the window.resize() > method, though it exists. Public functions or methods that are missing from the docs are a bug. Do you want to propose a patch? Regards From report at bugs.python.org Fri Feb 4 10:42:10 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 04 Feb 2011 09:42:10 +0000 Subject: [docs] [issue10994] implementation details in sys module In-Reply-To: <1295876620.3.0.027428786588.issue10994@psf.upfronthosting.co.za> Message-ID: <1296812530.11.0.800709911594.issue10994@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I can propose a specification of getsizeof: if you somehow manage to traverse all objects (without considering an object twice), and sum up the getsizeof results, you should end up with something close to, but smaller than the actual memory consumption. How close is a quality-of-implementation issue (so always returning 0 would be correct-but-useless). It may be that implementations can also support counting certain hidden memory usage (headers, blocks shared across instances that are not objects themselves). Such functions would should have different names and interfaces (e.g. sys.gethiddenblocks(o) may return a list of (address, size) pairs); CPython doesn't provide any such function (although sys.mallocoverhead might be useful). In any case: I'm not convinced that it is useful to mark functions as CPython-specific in the documentation. This clutters the documentation, and is of interest only for language lawyers. So if implementation details are to be documented, I'd prefer this to happen in a separate document. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 17:22:14 2011 From: report at bugs.python.org (Armin Rigo) Date: Fri, 04 Feb 2011 16:22:14 +0000 Subject: [docs] [issue10994] implementation details in sys module In-Reply-To: <1295876620.3.0.027428786588.issue10994@psf.upfronthosting.co.za> Message-ID: <1296836534.74.0.427166827903.issue10994@psf.upfronthosting.co.za> Armin Rigo added the comment: Martin: I kind of agree with you, although I guess that for pratical reasons if you don't have a reasonable sys.getsizeof() implementation then it's better to raise TypeError than return 0 (like CPython, which may raise "TypeError: Type %.100s doesn't define __sizeof__"). I agree that it's not really useful to mark functions as CPython-specific in the documentation, if only because whenever a new implementation like PyPy comes along, then it's going to have a rather different set of functions that it wants to consider implementation details. I would say that more than half the functions in the sys module marked CPython-specific in the doc are implemented in PyPy just fine, and there is an equal number of functions not marked CPython-specific that have no chance to be implemented in PyPy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 17:28:30 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 04 Feb 2011 16:28:30 +0000 Subject: [docs] [issue10891] Tweak sorting howto to eliminate redundancy In-Reply-To: <1294828188.31.0.578827978132.issue10891@psf.upfronthosting.co.za> Message-ID: <1296836910.39.0.277388570065.issue10891@psf.upfronthosting.co.za> Georg Brandl added the comment: I do think that "list.sort() method of a list" is a bit too much. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From jam at massa.com Tue Feb 1 17:28:41 2011 From: jam at massa.com (Joe McDonald) Date: Tue, 1 Feb 2011 11:28:41 -0500 Subject: [docs] Tutorial problem Message-ID: Hello, I don't know if I'm emailing the right place, but in the Python Tutorial 2.7.1 by Guido van Rossum, Chapter 7, I tried the examples on the interpreter and got: >>> print 'This {food} is {adjective}.'.format(food='spam', adjective='absolutely horrible') Traceback (most recent call last): File "", line 1, in -toplevel- print 'This {food} is {adjective}.'.format(food='spam', adjective='absolutely horrible') AttributeError: 'str' object has no attribute 'format' Other examples from this chapter gave similar results. Am I missing something? I had tried "import string", but that didn't affect the result. Joe McDonald This email message, including any attachments, may contain company confidential and proprietary information for the sole use of the intended recipient. If you are not the intended recipient, you are hereby notified that any use, copying or dissemination of this message is strictly prohibited. If you received this message in error, please notify Massa Products Corporation immediately by reply email or by calling Massa Products Corporation at 800-962-7543. Then delete this message from your system, without making any copy or distribution. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dmills2632 at yahoo.com Tue Feb 1 17:32:44 2011 From: dmills2632 at yahoo.com (David Mills) Date: Tue, 1 Feb 2011 08:32:44 -0800 Subject: [docs] Order Request... Message-ID: Hello This is David and I will like to order ( Generators ).Do get back to me with the types and cost for the ones you do carry and let me know if there is an extra cost when using visa or master Card.Kindly get back to me with your name Are you the sales manager or the Owner? Regards. David Mills. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jehod at vestas.com Wed Feb 2 14:17:44 2011 From: jehod at vestas.com (Jens Hvelplund Odborg) Date: Wed, 2 Feb 2011 14:17:44 +0100 Subject: [docs] list of depricate function on http://docs.python.org/library/string.html Message-ID: <592EE73350A70C43AE0ED25314DBA3BD9AC84A0E46@DKRDSEXC014.vestas.net> Hi On the http://docs.python.org/library/string.html the section 7.1.6 is some what confusing in that some function is marked explicit whith a red box and a replacemen while other are not futher more many of those not marked with a red box are quite commonly used in other languages so a replacement would be nice for new commers to Python Yours sincerely, Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From pederick at gmail.com Wed Feb 2 16:20:15 2011 From: pederick at gmail.com (Timothy Pederick) Date: Wed, 2 Feb 2011 23:20:15 +0800 Subject: [docs] Bug in locale module docs Message-ID: The following text appears to be in error: locale.ERA_D_FMT Get a format string for strftime() to represent time in a locale-specific era-based way. (Note the mismatch between "D" in the constant name and "time" in its description.) This text is present in the same form in at least the 2.7, 3.1 and 3.2 docs. Checking with Python 3.1.2, it would appear that both ERA_D_FMT and ERA_T_FMT exist. Thus, the text should probably read something like: locale.ERA_D_FMT Get a format string for strftime() to represent a date in a locale-specific era-based way. locale.ERA_T_FMT Get a format string for strftime() to represent a time in a locale-specific era-based way. (The wording "a date", "a time" instead of just "time" is the same as that used for the D_FMT and T_FMT constants earlier in the page.) -- Tim Pederick -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Fri Feb 4 18:17:54 2011 From: report at bugs.python.org (Ron Adam) Date: Fri, 04 Feb 2011 17:17:54 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1296839874.79.0.171019954308.issue9364@psf.upfronthosting.co.za> Changes by Ron Adam : ---------- nosy: +ron_adam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 18:43:51 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 17:43:51 +0000 Subject: [docs] [issue11090] Doc errors for unittest in Python 3.1 In-Reply-To: <1296573823.39.0.448811226108.issue11090@psf.upfronthosting.co.za> Message-ID: <1296841431.77.0.584163127105.issue11090@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 4 20:48:16 2011 From: report at bugs.python.org (cardinalbiggles) Date: Fri, 04 Feb 2011 19:48:16 +0000 Subject: [docs] [issue11120] threading.Thread.daemon Documentation Incomplete In-Reply-To: <1296848896.87.0.703380092713.issue11120@psf.upfronthosting.co.za> Message-ID: <1296848896.87.0.703380092713.issue11120@psf.upfronthosting.co.za> New submission from cardinalbiggles : In the threading module, the documentation for Thread.isDaemon()/Thread.setDaemon() indicates they are the old API for Thread.daemon, which does not indicate the version in which it was introduced (2.6 I believe). Additionally, the documentation for Thread.setDaemon() should at least include the daemonic parameter, if not the full usage documentation for those targeting older versions. Targeting Python 2.4, and being unable to (as) efficiently navigate the old documentation site, I have come to rely on the various 'Changed/New in version 2.X' messages in the current documentation. This caused some confusion on my part. ---------- assignee: docs at python components: Documentation messages: 127927 nosy: cardinalbiggles, docs at python priority: normal severity: normal status: open title: threading.Thread.daemon Documentation Incomplete type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 5 00:47:22 2011 From: report at bugs.python.org (Eric Smith) Date: Fri, 04 Feb 2011 23:47:22 +0000 Subject: [docs] [issue11125] csv documentation should not use open() without close() In-Reply-To: <1296863241.98.0.986933657012.issue11125@psf.upfronthosting.co.za> Message-ID: <1296863241.98.0.986933657012.issue11125@psf.upfronthosting.co.za> New submission from Eric Smith : Many places open() is shown as a parameter to a csv method, but close() can't be called. This is not a practice we should be advocating. Better would be to show a 'with' statement, or at least a note explaining this isn't an ideal usage. ---------- assignee: docs at python components: Documentation keywords: easy messages: 127954 nosy: docs at python, eric.smith priority: normal severity: normal status: open title: csv documentation should not use open() without close() versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 5 00:50:35 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Feb 2011 23:50:35 +0000 Subject: [docs] [issue11125] csv documentation should not use open() without close() In-Reply-To: <1296863241.98.0.986933657012.issue11125@psf.upfronthosting.co.za> Message-ID: <1296863435.66.0.730549965321.issue11125@psf.upfronthosting.co.za> ?ric Araujo added the comment: Agreed. I have to take some time to update my patch on the other bug. Hope you won?t mind me closing this one as duplicate. ---------- nosy: +eric.araujo resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Use with statement throughout the docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 5 06:49:50 2011 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 05 Feb 2011 05:49:50 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1296884990.41.0.657078676528.issue9364@psf.upfronthosting.co.za> Eli Bendersky added the comment: ?ric - your suggestions look good to me. The correspondence with Terry was on July 16th, 2010 - maybe he can remember which thread in pydev it was exactly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 5 10:50:00 2011 From: report at bugs.python.org (Ned Deily) Date: Sat, 05 Feb 2011 09:50:00 +0000 Subject: [docs] [issue1227748] subprocess: inheritance of std descriptors inconsistent Message-ID: <1296899400.43.0.708750764937.issue1227748@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: astrand -> docs at python nosy: +docs at python stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 5 18:47:54 2011 From: report at bugs.python.org (yeswanth) Date: Sat, 05 Feb 2011 17:47:54 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1296928074.43.0.11788006116.issue9364@psf.upfronthosting.co.za> yeswanth added the comment: Suggestions are good . One thing I came across when going through the doc is that when you run help(help) after importing help from pydoc , i noticed that the first line of the help utility is """ Welcome to Python 3.2! This is the online help utility. """ which could be changed to "Welcome to Python help utility" as the help utility is already inbuilt . ---------- nosy: +swamiyeswanth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 5 19:43:43 2011 From: report at bugs.python.org (yeswanth) Date: Sat, 05 Feb 2011 18:43:43 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1296931423.38.0.898701186538.issue9364@psf.upfronthosting.co.za> yeswanth added the comment: Patch for the change i have suggested in pydoc . @Eric I will try to implement the patch suggestions you have made. I still have to figure out how to make crosslinks ---------- keywords: +patch Added file: http://bugs.python.org/file20686/pydoc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 5 22:49:28 2011 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 05 Feb 2011 21:49:28 +0000 Subject: [docs] [issue7678] subprocess.Popen pipeline example code in the documentation is lacking In-Reply-To: <1263245210.2.0.116487607425.issue7678@psf.upfronthosting.co.za> Message-ID: <1296942568.49.0.676537094545.issue7678@psf.upfronthosting.co.za> Gregory P. Smith added the comment: documentation updated in r88352. thanks! ---------- assignee: docs at python -> gregory.p.smith resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 06:17:10 2011 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Sun, 06 Feb 2011 05:17:10 +0000 Subject: [docs] [issue8691] Doc: left alignment is not the default for numbers In-Reply-To: <1273609278.89.0.493567914757.issue8691@psf.upfronthosting.co.za> Message-ID: <1296969429.91.0.897900404787.issue8691@psf.upfronthosting.co.za> Westley Mart?nez added the comment: It seems > is only the default for numbers. < is the default for strings, lists, sets, dicts, etc. I have made a patch, though Eric knows the exact semantics. I wonder what the rationale for having numbers use < is. ---------- keywords: +patch nosy: +anikom15 Added file: http://bugs.python.org/file20694/py3k-8691.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 07:16:45 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 06 Feb 2011 06:16:45 +0000 Subject: [docs] [issue10891] Tweak sorting howto to eliminate redundancy In-Reply-To: <1294828188.31.0.578827978132.issue10891@psf.upfronthosting.co.za> Message-ID: <1296973005.81.0.113612574509.issue10891@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Made some tweaks r88358. Sorry, I'm leaving the list.sort references as-is. I consider them to be important in a document that needs to clearly differentiate list.sort from __builtin__.sorted(). ---------- assignee: eric.araujo -> rhettinger resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 13:30:52 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Feb 2011 12:30:52 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1296995452.91.0.569303172916.issue9364@psf.upfronthosting.co.za> ?ric Araujo added the comment: > Welcome to Python 3.2! This is the online help utility. > which could be changed to > Welcome to Python help utility Agreed. I assume this dates back to a time where ?online help? meant available on this computer, not on some global network. I?d keep the version in the string, though: Welcome to Python 3.2's help utility! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 15:30:04 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 06 Feb 2011 14:30:04 +0000 Subject: [docs] [issue8691] Doc: left alignment is not the default for numbers In-Reply-To: <1273609278.89.0.493567914757.issue8691@psf.upfronthosting.co.za> Message-ID: <1297002604.08.0.723793159947.issue8691@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Georg & Eric, I believe this simple patch is correct, and should go in 3.2. Westley, thanks for the patch. Numbers are right-aligned because that is the traditional default. The committer should add Westley Martinez to misc/ACKS ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 16:36:22 2011 From: report at bugs.python.org (yeswanth) Date: Sun, 06 Feb 2011 15:36:22 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1297006582.5.0.306922647546.issue9364@psf.upfronthosting.co.za> Changes by yeswanth : Removed file: http://bugs.python.org/file20686/pydoc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 16:38:45 2011 From: report at bugs.python.org (yeswanth) Date: Sun, 06 Feb 2011 15:38:45 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1297006725.75.0.949318405875.issue9364@psf.upfronthosting.co.za> Changes by yeswanth : Added file: http://bugs.python.org/file20699/pydoc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 16:47:34 2011 From: report at bugs.python.org (yeswanth) Date: Sun, 06 Feb 2011 15:47:34 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1297007254.58.0.232337898613.issue9364@psf.upfronthosting.co.za> yeswanth added the comment: Completely agreed with you on having "Welcome to python 3.2 help!".. made the changes. Uploaded site.py as suggested by you . I will try to create the patch for the links , but i am not sure how to .Could use some help if you can provide me any website link.Thanks ---------- Added file: http://bugs.python.org/file20700/site.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 17:00:47 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Feb 2011 16:00:47 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1297008047.75.0.835854769904.issue9364@psf.upfronthosting.co.za> ?ric Araujo added the comment: See http://docs.python.org/dev/documenting/ (see also http://docs.python.org/devguide/patch for process guidelines). Note about site.diff: - """Define the builtin 'help'. - This is a wrapper around pydoc.help (with a twist). + """Class used to implement the built-in help function I suggested to remove ?with a twist?, not the other part of the line. The other patch is fine, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 17:01:02 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Feb 2011 16:01:02 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1297008062.97.0.672077848892.issue9364@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: docs at python -> eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 17:13:51 2011 From: report at bugs.python.org (yeswanth) Date: Sun, 06 Feb 2011 16:13:51 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1297008831.68.0.311277434808.issue9364@psf.upfronthosting.co.za> Changes by yeswanth : Removed file: http://bugs.python.org/file20700/site.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 17:14:11 2011 From: report at bugs.python.org (yeswanth) Date: Sun, 06 Feb 2011 16:14:11 +0000 Subject: [docs] [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1297008851.31.0.422787208023.issue9364@psf.upfronthosting.co.za> Changes by yeswanth : Added file: http://bugs.python.org/file20703/site.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 18:40:30 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Feb 2011 17:40:30 +0000 Subject: [docs] [issue8691] Doc: left alignment is not the default for numbers In-Reply-To: <1273609278.89.0.493567914757.issue8691@psf.upfronthosting.co.za> Message-ID: <1297014030.54.0.884556228801.issue8691@psf.upfronthosting.co.za> ?ric Araujo added the comment: Or to Doc/ACKS.txt, which I?ve recently discovered. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 20:42:29 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Feb 2011 19:42:29 +0000 Subject: [docs] [issue11090] Doc errors for unittest in Python 3.1 In-Reply-To: <1296573823.39.0.448811226108.issue11090@psf.upfronthosting.co.za> Message-ID: <1297021349.03.0.255235826299.issue11090@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hm, my patch removes too much. The part that was mistakenly added by me is the command-line interface doc, but I also removed other parts for things noted with versionadded: 3.2. Those indications are wrong: They were noted added in 2.7 before r79167 (Ezio). ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 22:09:17 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Feb 2011 21:09:17 +0000 Subject: [docs] [issue11090] Doc errors for unittest in Python 3.1 In-Reply-To: <1296573823.39.0.448811226108.issue11090@psf.upfronthosting.co.za> Message-ID: <1297026557.92.0.598024818646.issue11090@psf.upfronthosting.co.za> ?ric Araujo added the comment: It looks like the doc snippets are actually new in 3.1, so we should not remove them but just fix the versionadded. The change I wrongly added is the part about command-line use. That can go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 6 22:09:21 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Feb 2011 21:09:21 +0000 Subject: [docs] [issue11090] Doc errors for unittest in Python 3.1 In-Reply-To: <1296573823.39.0.448811226108.issue11090@psf.upfronthosting.co.za> Message-ID: <1297026561.19.0.035669967143.issue11090@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file20657/fix-11090.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 7 03:18:52 2011 From: report at bugs.python.org (John) Date: Mon, 07 Feb 2011 02:18:52 +0000 Subject: [docs] [issue11137] clarify use of imaplib IMAP4(_SSL) shutdown In-Reply-To: <1297045132.5.0.369740718147.issue11137@psf.upfronthosting.co.za> Message-ID: <1297045132.5.0.369740718147.issue11137@psf.upfronthosting.co.za> New submission from John : Attempting IMAP4_SSL.shutdown() after IMAP4_SSL.logout() throws an error because the socket is already closed. (I cannot test with plain IMAP4.) Please add appropriate notice, perhaps under IMAP4.shutdown(). Perhaps something like "If you do not use open(), and do only login() and logout(), you do not need shutdown(), as logout() does it for you." -- jh ---------- assignee: docs at python components: Documentation messages: 128096 nosy: docs at python, jh45 priority: normal severity: normal status: open title: clarify use of imaplib IMAP4(_SSL) shutdown versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 7 04:43:45 2011 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Mon, 07 Feb 2011 03:43:45 +0000 Subject: [docs] [issue11137] clarify use of imaplib IMAP4(_SSL) shutdown In-Reply-To: <1297045132.5.0.369740718147.issue11137@psf.upfronthosting.co.za> Message-ID: <1297050225.91.0.278669032569.issue11137@psf.upfronthosting.co.za> Westley Mart?nez added the comment: Perhaps we should say something regarding that shutdown, and similar methods, must be called after open. ---------- nosy: +anikom15 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 7 05:41:27 2011 From: report at bugs.python.org (Urago Keisuke) Date: Mon, 07 Feb 2011 04:41:27 +0000 Subject: [docs] [issue11138] Docs: incollect example: "fill" and "align" In-Reply-To: <1297053687.75.0.437678029921.issue11138@psf.upfronthosting.co.za> Message-ID: <1297053687.75.0.437678029921.issue11138@psf.upfronthosting.co.za> New submission from Urago Keisuke : "Nesting arguments and more complex examples" at http://docs.python.org/library/string.html#format-examples Below example code is no errors: >>> for align, text in zip('<^>', ['left', 'center', 'right']): ... '{0:{align}{fill}16}'.format(text, fill=align, align=align) I think meaning is as follows: ... '{0:{fill}{align}16}'.format(text, fill=align, align=align) ---------- assignee: docs at python components: Documentation messages: 128099 nosy: Urago.Keisuke, docs at python priority: normal severity: normal status: open title: Docs: incollect example: "fill" and "align" 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 Feb 7 13:11:10 2011 From: report at bugs.python.org (Georg Brandl) Date: Mon, 07 Feb 2011 12:11:10 +0000 Subject: [docs] [issue11138] Docs: incollect example: "fill" and "align" In-Reply-To: <1297053687.75.0.437678029921.issue11138@psf.upfronthosting.co.za> Message-ID: <1297080669.96.0.820517980666.issue11138@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r88364. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 7 13:15:43 2011 From: report at bugs.python.org (Georg Brandl) Date: Mon, 07 Feb 2011 12:15:43 +0000 Subject: [docs] [issue8691] Doc: left alignment is not the default for numbers In-Reply-To: <1273609278.89.0.493567914757.issue8691@psf.upfronthosting.co.za> Message-ID: <1297080943.33.0.0785658053207.issue8691@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r88365. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 7 17:04:20 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Feb 2011 16:04:20 +0000 Subject: [docs] [issue11137] clarify use of imaplib IMAP4(_SSL) shutdown In-Reply-To: <1297045132.5.0.369740718147.issue11137@psf.upfronthosting.co.za> Message-ID: <1297094660.37.0.547228000423.issue11137@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, clarified in r88371. Thank you! ---------- nosy: +pitrou resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 7 18:03:03 2011 From: report at bugs.python.org (Daniel Urban) Date: Mon, 07 Feb 2011 17:03:03 +0000 Subject: [docs] [issue11141] 2.x range() in 3.x shelve documentation In-Reply-To: <1297098183.14.0.0535108956136.issue11141@psf.upfronthosting.co.za> Message-ID: <1297098183.14.0.0535108956136.issue11141@psf.upfronthosting.co.za> New submission from Daniel Urban : The example in the shelve documentation (http://docs.python.org/dev/py3k/library/shelve.html#example) uses the old range() (which returned a list): d['xx'] = range(4) # this works as expected, but... d['xx'].append(5) # *this doesn't!* -- d['xx'] is STILL range(4)! ---------- assignee: docs at python components: Documentation messages: 128138 nosy: docs at python, durban priority: normal severity: normal status: open title: 2.x range() in 3.x shelve documentation versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 7 18:14:59 2011 From: report at bugs.python.org (SilentGhost) Date: Mon, 07 Feb 2011 17:14:59 +0000 Subject: [docs] [issue11141] 2.x range() in 3.x shelve documentation In-Reply-To: <1297098183.14.0.0535108956136.issue11141@psf.upfronthosting.co.za> Message-ID: <1297098899.66.0.444691416732.issue11141@psf.upfronthosting.co.za> SilentGhost added the comment: Here is the patch. ---------- keywords: +needs review, patch nosy: +SilentGhost versions: +Python 3.3 Added file: http://bugs.python.org/file20713/shelve.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 7 18:53:05 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 07 Feb 2011 17:53:05 +0000 Subject: [docs] [issue11141] 2.x range() in 3.x shelve documentation In-Reply-To: <1297098183.14.0.0535108956136.issue11141@psf.upfronthosting.co.za> Message-ID: <1297101185.96.0.688236847659.issue11141@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 8 00:19:28 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 07 Feb 2011 23:19:28 +0000 Subject: [docs] [issue11141] 2.x range() in 3.x shelve documentation In-Reply-To: <1297098183.14.0.0535108956136.issue11141@psf.upfronthosting.co.za> Message-ID: <1297120768.91.0.521221229609.issue11141@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r88377, thank you! ---------- nosy: +pitrou resolution: accepted -> fixed stage: -> committed/rejected status: open -> closed versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 8 14:09:55 2011 From: report at bugs.python.org (Noufal) Date: Tue, 08 Feb 2011 13:09:55 +0000 Subject: [docs] [issue11151] Arguments to various types not specified in types module In-Reply-To: <1297170595.74.0.556473568639.issue11151@psf.upfronthosting.co.za> Message-ID: <1297170595.74.0.556473568639.issue11151@psf.upfronthosting.co.za> New submission from Noufal : The documentation for the types module seems to have an obvious bug. The arguments to create the various types are not mentioned in the docs page on http://docs.python.org/library/types.html This came to my attention from a stack overflow question here http://stackoverflow.com/questions/4933325/where-can-i-find-documentation-for-calling-the-various-types-in-pythons-types-mo ---------- assignee: docs at python components: Documentation messages: 128175 nosy: docs at python, noufal priority: normal severity: normal status: open title: Arguments to various types not specified in types module type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 8 14:16:53 2011 From: report at bugs.python.org (Michael Foord) Date: Tue, 08 Feb 2011 13:16:53 +0000 Subject: [docs] [issue11151] Arguments to various types not specified in types module In-Reply-To: <1297170595.74.0.556473568639.issue11151@psf.upfronthosting.co.za> Message-ID: <1297171013.33.0.463608852643.issue11151@psf.upfronthosting.co.za> Michael Foord added the comment: Care to provide a patch Noufal? ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 8 23:52:34 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 08 Feb 2011 22:52:34 +0000 Subject: [docs] [issue11151] Arguments to various types not specified in types module In-Reply-To: <1297170595.74.0.556473568639.issue11151@psf.upfronthosting.co.za> Message-ID: <1297205554.49.0.643066152981.issue11151@psf.upfronthosting.co.za> ?ric Araujo added the comment: Remember that the types module is mostly obsolete now: a type like IntType is described as alias for the builtin int, with a link to the comprehensive document of said int. (On an unrelated note, the types module may encourage type-checking, which is not common or generally useful in Python. Too bad it couldn?t be removed wholesale in 3.x.) That said, adding documentation for other cases like ModuleType and CodeType that aren?t defined anywhere else in the stdlib is indeed a good idea. ---------- nosy: +eric.araujo versions: +Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 9 01:35:47 2011 From: report at bugs.python.org (Erik Cederstrand) Date: Wed, 09 Feb 2011 00:35:47 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> New submission from Erik Cederstrand : In Python 2.6.6 on OSX: >>> import inspect >>> from multiprocessing import Queue >>> q = Queue() >>> print(inspect.getargspec(q.put)) ArgSpec(args=['self', 'obj', 'block', 'timeout'], varargs=None, keywords=None, defaults=(True, None)) >>> from Queue import Queue >>> q = Queue() >>> print(inspect.getargspec(q.put)) ArgSpec(args=['self', 'item', 'block', 'timeout'], varargs=None, keywords=None, defaults=(True, None)) Notice the 'obj' argument in the multiprocessing version and the 'item' argument in the Queue version. I think 'obj' should be renamed to 'item' to be in line with the other implementation and to agree with the docs: (http://docs.python.org/library/multiprocessing.html?highlight=multiprocessing#multiprocessing.Queue.put): put(item[, block[, timeout]]) ---------- assignee: docs at python components: Documentation messages: 128200 nosy: Erik.Cederstrand, docs at python priority: normal severity: normal status: open title: multiprocessing.Queue's put() signature differs from docs versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 9 01:56:08 2011 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Wed, 09 Feb 2011 00:56:08 +0000 Subject: [docs] [issue11155] multiprocessing.Queue's put() signature differs from docs In-Reply-To: <1297211747.04.0.707896670759.issue11155@psf.upfronthosting.co.za> Message-ID: <1297212967.67.0.860677116212.issue11155@psf.upfronthosting.co.za> Westley Mart?nez added the comment: I've gone through Lib/multiproccing/queues.py and have replaced obj with item. Here's the patch. ---------- keywords: +patch nosy: +anikom15 Added file: http://bugs.python.org/file20720/multiprocessing-11155.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 9 16:09:01 2011 From: report at bugs.python.org (Xuanji Li) Date: Wed, 09 Feb 2011 15:09:01 +0000 Subject: [docs] [issue11160] ZipFile.comment expects bytes In-Reply-To: <1297264140.97.0.306129367766.issue11160@psf.upfronthosting.co.za> Message-ID: <1297264140.97.0.306129367766.issue11160@psf.upfronthosting.co.za> New submission from Xuanji Li : The documentation for zipfile describes ZipFile.comment as "The comment text associated with the ZIP file." From reading this I expect that setting it to a string is ok; however ZipFile.comment must actually be set to bytes (or a bytes-like object, I am not very sure). This may also unexpectedly affect old code because I saw one patch on the bug tracker that was written just last year that set ZipFile.comment to a string. IMO there are 2 ways to fix: 1) Change docs to mention that ZipFile.comment only accepts bytes 2) Patch zipfile.py to accept string and try to convert, throwing an error if the conversion fails ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 128217 nosy: docs at python, haypo, xuanji priority: normal severity: normal status: open title: ZipFile.comment expects bytes versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 9 21:40:45 2011 From: report at bugs.python.org (Michael Grazebrook) Date: Wed, 09 Feb 2011 20:40:45 +0000 Subject: [docs] [issue11163] iter() documentation code doesn't work In-Reply-To: <1297284045.4.0.795458647498.issue11163@psf.upfronthosting.co.za> Message-ID: <1297284045.4.0.795458647498.issue11163@psf.upfronthosting.co.za> New submission from Michael Grazebrook : This code fragment from the documentation of iter() doesn't work as intended. Change "STOP" to "STOP\n". Maybe also check for EOF as it hangs. with open("mydata.txt") as fp: for line in iter(fp.readline, "STOP"): process_line(line) Or maybe this makes a better example because it's clearer wha'ts going on: square_generator = (i * i for i in range(100000)) for n in iter( square_generator.next, 144): print n ---------- assignee: docs at python components: Documentation messages: 128238 nosy: docs at python, mgrazebrook priority: normal severity: normal status: open title: iter() documentation code doesn't work type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 9 23:21:43 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 09 Feb 2011 22:21:43 +0000 Subject: [docs] [issue8652] Minor improvements to the "Handling Exceptions" part of the tutorial In-Reply-To: <1273253134.08.0.147248211976.issue8652@psf.upfronthosting.co.za> Message-ID: <1297290103.75.0.0503800363153.issue8652@psf.upfronthosting.co.za> ?ric Araujo added the comment: > Removes the two instances I noticed of treating exception instances as sequences. Looks good. > Adds a warning explaining ``except FooException, BarException:`` does not do what you might think. Ditto. > There are two things I'm not entirely happy about: > I initially wrote ``print "I/O error({0.errno}): {0.strerror}".format(e)``, > but then noticed this string formatting trick is not mentioned in the previous chapter > of the tutorial. Dict access (``"{0[foo]}".format(d)``) is, but attribute access > is not. Is this worth adding to that chapter, so it can be used here? It?s not at all a trick :) Given that item access is already covered, I don?t think your use of attribute access would make the example harder for beginners, but I may not be the best judge. > Binding an exception instance to a variable (using "as") is explained near the bottom > of the section on catching exceptions, well before it is used. > Perhaps this could do with a bit of reordering? +1. A note about workflow: patches should usually apply to the py3k branch, the person who commits takes care of backporting to 3.1 and 2.7. In this case, some of your editions are not relevant for 3.x, so I suggest you use one of those workflows: 1) Make one patch for py3k and one for 2.7 2) Make one for 2.7, with comments indicating parts that apply to py3k too 3) Make one patch with edits relevant for py3k and 2.7, and another one for 2.7-only edits ---------- nosy: +terry.reedy stage: -> patch review versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 9 23:56:11 2011 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 09 Feb 2011 22:56:11 +0000 Subject: [docs] [issue11165] Document PyEval_Call* functions In-Reply-To: <1297292171.0.0.0899611103523.issue11165@psf.upfronthosting.co.za> Message-ID: <1297292171.0.0.0899611103523.issue11165@psf.upfronthosting.co.za> New submission from Nick Coghlan : There are currently undocumented PyEval_Call* equivalents to a number of the PyObject_Call* functions. Since there are resources out there on the web that direct people to use the currently undocumented PyEval functions, it would be good to document those properly, and recommend people typically use the PyObject_Call* variants instead (as the latter include all the stack and interpreter state integrity protection code, while the PyEval variants assume that has all already been handled). ---------- assignee: docs at python components: Documentation keywords: easy messages: 128248 nosy: docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Document PyEval_Call* functions versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 9 23:57:51 2011 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 09 Feb 2011 22:57:51 +0000 Subject: [docs] [issue11165] Document PyEval_Call* functions In-Reply-To: <1297292171.0.0.0899611103523.issue11165@psf.upfronthosting.co.za> Message-ID: <1297292271.88.0.28701233186.issue11165@psf.upfronthosting.co.za> Nick Coghlan added the comment: Removed the easy tag, since this may involve some python-dev discussion as to where to put them in C API docs (they don't really fit in any of the current sections). Perhaps an "advanced APIs" section, for things that most C extensions or embedding applications really shouldn't be using. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 10 00:06:10 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Feb 2011 23:06:10 +0000 Subject: [docs] [issue11163] iter() documentation code doesn't work In-Reply-To: <1297284045.4.0.795458647498.issue11163@psf.upfronthosting.co.za> Message-ID: <1297292770.19.0.0322871835977.issue11163@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 10 11:54:14 2011 From: report at bugs.python.org (=?utf-8?b?U8OpYmFzdGllbiBTYWJsw6k=?=) Date: Thu, 10 Feb 2011 10:54:14 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1297335254.26.0.215653949732.issue10709@psf.upfronthosting.co.za> S?bastien Sabl? added the comment: Yes I will do that. I am currently reinstalling some buildbot environments for Python on AIX 5.3 and AIX 6.1 and once that is done, I will rewrite the note. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 10 16:19:16 2011 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 10 Feb 2011 15:19:16 +0000 Subject: [docs] [issue11173] Undocumented public APIs in Python 3.2 In-Reply-To: <1297351155.94.0.957592646254.issue11173@psf.upfronthosting.co.za> Message-ID: <1297351155.94.0.957592646254.issue11173@psf.upfronthosting.co.za> New submission from Marc-Andre Lemburg : Mark Shannon on python-dev: The following API functions were removed from 3.1.3: PyAST_Compile PyCObject_AsVoidPtr PyCObject_FromVoidPtr PyCObject_FromVoidPtrAndDesc PyCObject_GetDesc PyCObject_Import PyCObject_SetVoidPtr PyCode_CheckLineNumber Py_CompileStringFlags PyEval_CallObject PyOS_ascii_atof PyOS_ascii_formatd PyOS_ascii_strtod PyThread_exit_prog PyThread__PyThread_exit_prog PyThread__PyThread_exit_thread PyUnicode_SetDefaultEncoding And the following were added to 3.2, of which only 2 are documented: PyArg_ValidateKeywordArguments PyAST_CompileEx Py_CompileString Py_CompileStringExFlags PyErr_NewExceptionWithDoc (documented) PyErr_SyntaxLocationEx PyErr_WarnFormat PyFrame_GetLineNumber PyImport_ExecCodeModuleWithPathnames PyImport_GetMagicTag PyLong_AsLongLongAndOverflow (documented) PyModule_GetFilenameObject Py_SetPath PyStructSequence_GetItem PyStructSequence_NewType PyStructSequence_SetItem PySys_AddWarnOptionUnicode PySys_AddXOption PySys_FormatStderr PySys_FormatStdout PySys_GetXOptions PyThread_acquire_lock_timed PyType_FromSpec PyUnicode_AsUnicodeCopy PyUnicode_AsWideCharString PyUnicode_EncodeFSDefault PyUnicode_FSDecoder Py_UNICODE_strcat Py_UNICODE_strncmp Py_UNICODE_strrchr PyUnicode_TransformDecimalToASCII For added confusion PySys_SetArgvEx is documented as new in 3.2, but exists in 3.1.3 Note that this only include functions. The API also includes a number of macros such as Py_False and Py_RETURN_FALSE, types , and data like PyBool_Type. ---------- assignee: docs at python components: Documentation messages: 128294 nosy: docs at python, lemburg priority: normal severity: normal status: open title: Undocumented public APIs in Python 3.2 versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 10 16:34:07 2011 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 10 Feb 2011 15:34:07 +0000 Subject: [docs] [issue11173] Undocumented public APIs in Python 3.2 In-Reply-To: <1297351155.94.0.957592646254.issue11173@psf.upfronthosting.co.za> Message-ID: <1297352047.05.0.707762685014.issue11173@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 10 16:42:47 2011 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Feb 2011 15:42:47 +0000 Subject: [docs] [issue11173] Undocumented public APIs in Python 3.2 In-Reply-To: <1297351155.94.0.957592646254.issue11173@psf.upfronthosting.co.za> Message-ID: <1297352567.33.0.838202322016.issue11173@psf.upfronthosting.co.za> STINNER Victor added the comment: > PyErr_WarnFormat is already documented in Doc/c-api/exceptions.rst > PyImport_ExecCodeModuleWithPathnames is already documented in Doc/c-api/import.rst > PyModule_GetFilenameObject is already documented in Doc/c-api/module.rst > PySys_AddWarnOptionUnicode, PySys_FormatStderr and PySys_FormatStdout are already documented in Doc/c-api/sys.rst > PyUnicode_AsUnicodeCopy, PyUnicode_AsWideCharString, PyUnicode_EncodeFSDefault and PyUnicode_FSDecoder are already documented in Doc/c-api/unicode.rst Mark Shannon should read the documentation more carefuly. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 10 16:44:54 2011 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Feb 2011 15:44:54 +0000 Subject: [docs] [issue11173] Undocumented public APIs in Python 3.2 In-Reply-To: <1297351155.94.0.957592646254.issue11173@psf.upfronthosting.co.za> Message-ID: <1297352694.16.0.229937350305.issue11173@psf.upfronthosting.co.za> STINNER Victor added the comment: > Py_UNICODE_strcat, Py_UNICODE_strncmp, Py_UNICODE_strrchr See issue #10435 (with a patch) for these functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 10 16:48:57 2011 From: report at bugs.python.org (Steven Bethard) Date: Thu, 10 Feb 2011 15:48:57 +0000 Subject: [docs] [issue11176] give more meaningful argument names in argparse documentation In-Reply-To: <1297352937.46.0.470038569364.issue11176@psf.upfronthosting.co.za> Message-ID: <1297352937.46.0.470038569364.issue11176@psf.upfronthosting.co.za> New submission from Steven Bethard : Suggestion from a personal email: I personally am not keen on the foo/bar/baz examples. I know that you're trying to be generic but IMO it would be much easier to understand if you used meaningful names. Also, I think that the very first example you give (which does use meaningful names:-) is too clever. I'd suggest using something simpler: in fact I'd use exactly the same example that optparse uses (--file && --quiet) since that is easy to understand and relate to straight away, and maybe add a --line option that takes a list of ints (ostensibly line numbers of lines to extract from the file) if you want to show that argparse leaves optparse in the dust. And you can always show how to get actual file objects later on. ---------- assignee: docs at python components: Documentation messages: 128302 nosy: bethard, docs at python priority: normal severity: normal stage: needs patch status: open title: give more meaningful argument names in argparse documentation type: feature request versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 10 17:04:04 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Feb 2011 16:04:04 +0000 Subject: [docs] [issue11173] Undocumented public APIs in Python 3.2 In-Reply-To: <1297351155.94.0.957592646254.issue11173@psf.upfronthosting.co.za> Message-ID: <1297353844.54.0.647538403676.issue11173@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > PyThread_acquire_lock_timed It's on purpose that I didn't document this one. I'm not sure the PyThread_ APIs should be used by third-party extensions; so I'd prefer to hear about potential users before starting documenting it (and being tied by compatibility issues). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 10 19:07:06 2011 From: report at bugs.python.org (Georg Brandl) Date: Thu, 10 Feb 2011 18:07:06 +0000 Subject: [docs] [issue11173] Undocumented public APIs in Python 3.2 In-Reply-To: <1297351155.94.0.957592646254.issue11173@psf.upfronthosting.co.za> Message-ID: <1297361226.71.0.981888594423.issue11173@psf.upfronthosting.co.za> Georg Brandl added the comment: In fact, most of the functions are documented. (Mark S. apparently referred to the "What's new" document when talking about "documented" functions.) Missing are: PyAST_CompileEx (because PyAST_Compile wasn't documented either) PyStructSequence_* PyType_FromSpec and the PyThread one which Antoine already mentioned. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 10 23:12:44 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 10 Feb 2011 22:12:44 +0000 Subject: [docs] [issue11076] Iterable argparse Namespace In-Reply-To: <1296461103.49.0.397676179483.issue11076@psf.upfronthosting.co.za> Message-ID: <1297375964.25.0.370806331764.issue11076@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 for this patch. Documentation fixes are backported from the development branch to stable branches, so yes, this will land in 3.1 too. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python type: feature request -> versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 10 23:21:50 2011 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 10 Feb 2011 22:21:50 +0000 Subject: [docs] [issue10423] s/args/options in arpgarse "Upgrading optparse code" In-Reply-To: <1289817035.63.0.362408496183.issue10423@psf.upfronthosting.co.za> Message-ID: <1297376510.52.0.558444178279.issue10423@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hi Steven, I'm not exactly getting what you're meaning here: are you actually saying to replace every occurrence of 'option' with 'argument' in the whole argparse module doc, or just make it stronger in the mentioned line that what was called previously 'option' is now called 'args' ? PS: wouldn't it be better to use this form "(options, args) = parser.parse_args()" instead of "options, args = parser.parse_args()" ? optparse doc uses the former, so it should be easy to recognize for those willing to migrate to argparse ---------- nosy: +sandro.tosi versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 11 01:23:44 2011 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Fri, 11 Feb 2011 00:23:44 +0000 Subject: [docs] [issue11176] give more meaningful argument names in argparse documentation In-Reply-To: <1297352937.46.0.470038569364.issue11176@psf.upfronthosting.co.za> Message-ID: <1297383824.59.0.911519169932.issue11176@psf.upfronthosting.co.za> Westley Mart?nez added the comment: I agree; it's too artsy. I'll see if I can come up with a relevant and clever alternative. ---------- nosy: +anikom15 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 11 11:48:39 2011 From: report at bugs.python.org (Steven Bethard) Date: Fri, 11 Feb 2011 10:48:39 +0000 Subject: [docs] [issue11076] Iterable argparse Namespace In-Reply-To: <1296461103.49.0.397676179483.issue11076@psf.upfronthosting.co.za> Message-ID: <1297421319.19.0.640444185202.issue11076@psf.upfronthosting.co.za> Steven Bethard added the comment: There's no argparse in 3.1, so it should only go into 2.7, 3.2 and 3.3. But yes, the patch looks great to me too. ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 11 11:52:10 2011 From: report at bugs.python.org (Steven Bethard) Date: Fri, 11 Feb 2011 10:52:10 +0000 Subject: [docs] [issue10423] s/args/options in arpgarse "Upgrading optparse code" In-Reply-To: <1289817035.63.0.362408496183.issue10423@psf.upfronthosting.co.za> Message-ID: <1297421530.41.0.622752576568.issue10423@psf.upfronthosting.co.za> Steven Bethard added the comment: The request was for the latter: "just make it stronger in the mentioned line that what was called previously 'option' is now called 'args'". As far as adding the parentheses or not, I never once used the parentheses back when I was using optparse, so it didn't even strike me to put them in there. But you're right - the optparse docs do that, so I'm fine if you'd like to make the argparse discussion of optparse match up better with the optparse docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 11 13:55:09 2011 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Feb 2011 12:55:09 +0000 Subject: [docs] [issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383 In-Reply-To: <1297428909.69.0.247564466299.issue11186@psf.upfronthosting.co.za> Message-ID: <1297428909.69.0.247564466299.issue11186@psf.upfronthosting.co.za> New submission from STINNER Victor : If you have an undecodable filenames on UNIX, Python 3 escapes undecodable bytes using surrogates. pydoc: HTMLDoc.index() uses indirectly os.listdir() which does such operation, and later filenames are encoded to UTF-8 (the whole HTML content is encoded to UTF-8). In practice, you cannot import such .py file, you run them using "python script.py", so we can maybe just ignore modules with undecodable filenames. For example: def isUndecodableFilename(filename): return any((0xD800 <= ord(ch) <= 0xDFFF) for ch in filename) Or we can escape the surrogate characters, but I don't know how. Write "\uDC80" in a HTML document is not a good idea, especially in an URL (e.g. Firefox replaces \ by / in URLs). ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 128382 nosy: docs at python, haypo priority: normal severity: normal status: open title: pydoc: HTMLDoc.index() doesn't support PEP 383 versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 11 13:56:53 2011 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Feb 2011 12:56:53 +0000 Subject: [docs] [issue11186] pydoc: HTMLDoc.index() doesn't support PEP 383 In-Reply-To: <1297428909.69.0.247564466299.issue11186@psf.upfronthosting.co.za> Message-ID: <1297429013.87.0.0532788337313.issue11186@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, my isUndecodableFilename() example is wrong. PEP 383 only uses U+DC80..U+DCFF range: def isUndecodableFilename(filename): return any((0xDC80 <= ord(ch) <= 0xDCFF) for ch in filename) Example of undecodable filename: b'bla\xe9\xff.py' with UTF-8 filesystem encoding is decoded as 'bla\uDCE9\uDCFF.py'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 11 19:41:56 2011 From: report at bugs.python.org (Sandro Tosi) Date: Fri, 11 Feb 2011 18:41:56 +0000 Subject: [docs] [issue10423] s/args/options in arpgarse "Upgrading optparse code" In-Reply-To: <1289817035.63.0.362408496183.issue10423@psf.upfronthosting.co.za> Message-ID: <1297449716.33.0.54708037976.issue10423@psf.upfronthosting.co.za> Sandro Tosi added the comment: I've prepared a simple patch: what do you think about it? ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 11 19:42:21 2011 From: report at bugs.python.org (Sandro Tosi) Date: Fri, 11 Feb 2011 18:42:21 +0000 Subject: [docs] [issue10423] s/args/options in arpgarse "Upgrading optparse code" In-Reply-To: <1289817035.63.0.362408496183.issue10423@psf.upfronthosting.co.za> Message-ID: <1297449741.6.0.648787010611.issue10423@psf.upfronthosting.co.za> Sandro Tosi added the comment: now even with patch attached :) ---------- keywords: +patch Added file: http://bugs.python.org/file20747/issue10423.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 11 21:01:24 2011 From: report at bugs.python.org (Steven Bethard) Date: Fri, 11 Feb 2011 20:01:24 +0000 Subject: [docs] [issue10423] s/args/options in arpgarse "Upgrading optparse code" In-Reply-To: <1289817035.63.0.362408496183.issue10423@psf.upfronthosting.co.za> Message-ID: <1297454483.97.0.199321921764.issue10423@psf.upfronthosting.co.za> Steven Bethard added the comment: Looks good to me. This is a doc fix, so it could go into 3.2 and 2.7 as well as 3.3. ---------- versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 12 06:46:21 2011 From: report at bugs.python.org (Michal Nowikowski) Date: Sat, 12 Feb 2011 05:46:21 +0000 Subject: [docs] [issue10999] os.chflags refers to stat constants, but the constants are not documented in the stat module In-Reply-To: <1295898075.1.0.406467023745.issue10999@psf.upfronthosting.co.za> Message-ID: <1297489581.5.0.590943529861.issue10999@psf.upfronthosting.co.za> Michal Nowikowski added the comment: Is this patch ok? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 12 16:38:20 2011 From: report at bugs.python.org (R. David Murray) Date: Sat, 12 Feb 2011 15:38:20 +0000 Subject: [docs] [issue10999] os.chflags refers to stat constants, but the constants are not documented in the stat module In-Reply-To: <1295898075.1.0.406467023745.issue10999@psf.upfronthosting.co.za> Message-ID: <1297525100.33.0.987113433305.issue10999@psf.upfronthosting.co.za> R. David Murray added the comment: Looks good to me. I wonder if the existing example should be moved up above the description of the chmod flags, though. This update puts it even farther away from the functions it is an example of. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 12 20:40:32 2011 From: report at bugs.python.org (K Richard Pixley) Date: Sat, 12 Feb 2011 19:40:32 +0000 Subject: [docs] [issue11203] gzip doc is behind In-Reply-To: <1297539632.81.0.320134391105.issue11203@psf.upfronthosting.co.za> Message-ID: <1297539632.81.0.320134391105.issue11203@psf.upfronthosting.co.za> New submission from K Richard Pixley : The documentation for gzip should include the "close" method. It's use in the 2.7 documentation implies it's existence but it should also be stated explicitly that it exists. In the 3.x documentation, the use of "close" not in the examples since the examples use context manager. For 3.x documentation there should be both an explicit mention of the "close" method as well as an explicit mention that GzipFile supports the context manager protocol. Yes, the use of the context manager in the examples implies that this is true but documentation on other modules states so explicitly so this module should too. ---------- assignee: docs at python components: Documentation messages: 128460 nosy: docs at python, teamnoir priority: normal severity: normal status: open title: gzip doc is behind type: feature request versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 13 05:36:40 2011 From: report at bugs.python.org (yeswanth) Date: Sun, 13 Feb 2011 04:36:40 +0000 Subject: [docs] [issue11160] ZipFile.comment expects bytes In-Reply-To: <1297264140.97.0.306129367766.issue11160@psf.upfronthosting.co.za> Message-ID: <1297571800.83.0.849756028759.issue11160@psf.upfronthosting.co.za> yeswanth added the comment: IMO the Zipfile.comment should accept strings too instead of just accepting bytes , so patching should help i guess ---------- nosy: +swamiyeswanth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 13 05:41:52 2011 From: report at bugs.python.org (yeswanth) Date: Sun, 13 Feb 2011 04:41:52 +0000 Subject: [docs] [issue11160] ZipFile.comment expects bytes In-Reply-To: <1297264140.97.0.306129367766.issue11160@psf.upfronthosting.co.za> Message-ID: <1297572111.99.0.991684632692.issue11160@psf.upfronthosting.co.za> yeswanth added the comment: can we use str.encode() function to convert string into bytes ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 13 10:59:46 2011 From: report at bugs.python.org (STINNER Victor) Date: Sun, 13 Feb 2011 09:59:46 +0000 Subject: [docs] [issue11160] ZipFile.comment expects bytes In-Reply-To: <1297264140.97.0.306129367766.issue11160@psf.upfronthosting.co.za> Message-ID: <1297591186.26.0.64487247089.issue11160@psf.upfronthosting.co.za> STINNER Victor added the comment: > can we use str.encode() function to convert string into bytes ? Can you try different ZIP archivers to check which encoding is expected? WinZip, WinRAR, 7-zip, "zip" command line program on Linux, etc. And do you have any reference into a ZIP documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 13 15:36:42 2011 From: report at bugs.python.org (Alexis Metaireau) Date: Sun, 13 Feb 2011 14:36:42 +0000 Subject: [docs] [issue901727] extra_path kwarg to setup() undocumented Message-ID: <1297607802.74.0.461705955919.issue901727@psf.upfronthosting.co.za> Alexis Metaireau added the comment: I've applied the patch on distutils2. This can now be closed. ---------- nosy: +alexis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 13 16:44:22 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 13 Feb 2011 15:44:22 +0000 Subject: [docs] [issue901727] extra_path kwarg to setup() undocumented Message-ID: <1297611862.01.0.754401381782.issue901727@psf.upfronthosting.co.za> ?ric Araujo added the comment: You shouldn?t have :) apiref.rst is very outdated in d2, because the setup function does not exist. The docs could be adjusted to document Distribution instead of setup, but we?re not even sure Distribution will stay. I think I will make a compromise here and apply the patch to distutils1 doc, so that the information is found on the official docs. ---------- components: +Distutils -Distutils2 versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3 -3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 13 16:46:44 2011 From: report at bugs.python.org (Alexis Metaireau) Date: Sun, 13 Feb 2011 15:46:44 +0000 Subject: [docs] [issue901727] extra_path kwarg to setup() undocumented In-Reply-To: <1297611862.01.0.754401381782.issue901727@psf.upfronthosting.co.za> Message-ID: <4D57FCE0.2030507@notmyidea.org> Alexis Metaireau added the comment: Still, the extra_path argument exists and can be used, it's worth to have it documented somewhere, especially if someone have done it. That's also true that apiref.rst is outdated in d2, and will need a complete reshape :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 14 00:04:57 2011 From: report at bugs.python.org (July Tikhonov) Date: Sun, 13 Feb 2011 23:04:57 +0000 Subject: [docs] [issue11208] example misprint in documentation whatsnew/3.2 In-Reply-To: <1297638296.9.0.737008909299.issue11208@psf.upfronthosting.co.za> Message-ID: <1297638296.9.0.737008909299.issue11208@psf.upfronthosting.co.za> New submission from July Tikhonov : >>> list(accumulate(8, 2, 50)) fails. Correct version is >>> list(accumulate([8, 2, 50])) ---------- assignee: docs at python components: Documentation files: whatsnew.3.2.accumulate.example.diff keywords: patch messages: 128529 nosy: docs at python, july priority: normal severity: normal status: open title: example misprint in documentation whatsnew/3.2 versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20757/whatsnew.3.2.accumulate.example.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 14 06:17:50 2011 From: report at bugs.python.org (Johannes Ammon) Date: Mon, 14 Feb 2011 05:17:50 +0000 Subject: [docs] [issue11209] Example for itertools.count is misleading In-Reply-To: <1297660670.65.0.462812812654.issue11209@psf.upfronthosting.co.za> Message-ID: <1297660670.65.0.462812812654.issue11209@psf.upfronthosting.co.za> New submission from Johannes Ammon : The example code for itertools.count (http://docs.python.org/library/itertools.html#itertools.count) says # count(2.5, 0.5) -> 3.5 3.0 4.5 ... I think that should read # count(2.5, 0.5) -> 2.5 3.0 3.5 ... ---------- assignee: docs at python components: Documentation messages: 128533 nosy: docs at python, jammon priority: normal severity: normal status: open title: Example for itertools.count is misleading versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 14 06:56:57 2011 From: report at bugs.python.org (Alex) Date: Mon, 14 Feb 2011 05:56:57 +0000 Subject: [docs] [issue11209] Example for itertools.count is misleading In-Reply-To: <1297660670.65.0.462812812654.issue11209@psf.upfronthosting.co.za> Message-ID: <1297663017.85.0.994724659053.issue11209@psf.upfronthosting.co.za> Alex added the comment: Patch for 2.7. ---------- keywords: +patch nosy: +alex Added file: http://bugs.python.org/file20758/python-11209.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 14 07:05:34 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Feb 2011 06:05:34 +0000 Subject: [docs] [issue11209] Example for itertools.count is misleading In-Reply-To: <1297660670.65.0.462812812654.issue11209@psf.upfronthosting.co.za> Message-ID: <1297663534.19.0.301948093353.issue11209@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed in 2.7 and 3.1. Was already fixed in 3.2. Thanks for the report. ---------- nosy: +rhettinger resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From thefruitstandman at gmail.com Sun Feb 6 04:30:09 2011 From: thefruitstandman at gmail.com (Cameron Campos) Date: Sat, 05 Feb 2011 22:30:09 -0500 Subject: [docs] Tutorial Documentation Message-ID: <4D4E15C1.3@gmail.com> There is a sentence in the first chapter's fifth paragraph that needs to have a comma placed in here: ...Because of its more general data types, Python is applicable to a much larger problem domain than ... Like such ^^^ Just putting it out there because I am a grammar freak at times. Cameron -------------- next part -------------- An HTML attachment was scrubbed... URL: From wout at bliepbliep.net Sun Feb 6 05:16:54 2011 From: wout at bliepbliep.net (Wout van Albada) Date: Sun, 6 Feb 2011 09:46:54 +0530 Subject: [docs] function os.lchmod() does not seem to exist Message-ID: Hi, I tried to use the os.lchmod() function documented here: http://docs.python.org/library/os.html#os.lchmod However, it doesn't exist in my version of Python: wout at zoot ~ 549>python Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.lchmod('blabla', 0) Traceback (most recent call last): File "", line 1, in AttributeError: 'module' object has no attribute 'lchmod' >>> So either the documentation is wrong or my version of Python is bad (in which case I have contact the distributor - Debian). But since the system chmod manual page says that permissions on symbolic links cannot be changed, I figured the function should probably not exist. Best regards, Wout -------------- next part -------------- An HTML attachment was scrubbed... URL: From neil.vass at gmail.com Tue Feb 8 12:01:13 2011 From: neil.vass at gmail.com (Neil Vass) Date: Tue, 8 Feb 2011 11:01:13 +0000 Subject: [docs] =?windows-1252?q?Examples_in_=2213=2E1=2E_csv_=97_CSV_File?= =?windows-1252?q?_Reading_and_Writing=22_don=27t_close_files?= Message-ID: Hi, I have a suggestion for the csv module's documentation. The examples in http://docs.python.org/library/csv.html show file reading like this: reader = csv.reader(open("some.csv", "rb")) This leaves the file handle open after use, without a way to close it. A better example might be ifile = open("some.csv", "rb") reader = csv.reader(ifile) * ... process file ...* ifile.close() Thanks for all your good work, Neil -------------- next part -------------- An HTML attachment was scrubbed... URL: From jongoldsteinis at yahoo.com Wed Feb 9 05:21:01 2011 From: jongoldsteinis at yahoo.com (Jon) Date: Tue, 8 Feb 2011 20:21:01 -0800 (PST) Subject: [docs] Prime num bug Message-ID: <85995.87460.qm@web39323.mail.mud.yahoo.com> Hi there The prime number function in 4.4 breaks and continue statements is wrong. Jon Sent from my iPad ____________________________________________________________________________________ 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news From oktay_erden at wheatonma.edu Wed Feb 9 22:02:26 2011 From: oktay_erden at wheatonma.edu (Erden Oktay) Date: Wed, 09 Feb 2011 16:02:26 -0500 Subject: [docs] insort-insert Message-ID: > import bisect >>> scores = [(100, 'perl'), (200, 'tcl'), (400, 'lua'), (500, 'python')] >>> bisect.insort(scores, (300, 'ruby')) >>> scores [(100, 'perl'), (200, 'tcl'), (300, 'ruby'), (400, 'lua'), (500, 'python')] I thought instead of insort you meant insert. erden From k at limist.com Thu Feb 10 20:52:42 2011 From: k at limist.com (Kai) Date: Thu, 10 Feb 2011 14:52:42 -0500 Subject: [docs] Error on distutils/uploading.html? Message-ID: <4D54420A.7090707@limist.com> Hi, On this page/URL, http://docs.python.org/distutils/uploading.html In 7.1, "PyPI package display" there's an example of how to use a file for the long_description field: setup(name='Distutils', long_description=open('README.txt')) This did not work for me, when I use setup.py register it just gives the __repr__ object instance string. I had to use something like, setup(name='Distutils', long_description=open('README.txt').read()) And then the properly marked up README content will show up on PyPI. Thanks, K From davide.del.vento at gmail.com Fri Feb 11 18:20:46 2011 From: davide.del.vento at gmail.com (Davide Del Vento) Date: Fri, 11 Feb 2011 10:20:46 -0700 Subject: [docs] Set documentation bug In-Reply-To: References: Message-ID: Hi, I'd like to suggest a little but IMO important improvement for this page: http://docs.python.org/library/sets.html The sentence "Deprecated since version 2.6: The built-in set/frozenset types replace this module." should link to http://docs.python.org/library/stdtypes.html#set etc. The following patch would do the job. Thanks and Regards, Davide --- sets.txt 2011-02-11 17:15:05.833691409 +0000 +++ sets.txt.orig 2011-02-11 17:14:30.282993805 +0000 @@ -14,7 +14,7 @@ .. versionadded:: 2.3 .. deprecated:: 2.6 - The built-in :class:`set`\/\ :class:`frozenset` types replace this module. + The built-in ``set``/``frozenset`` types replace this module. The :mod:`sets` module provides classes for constructing and manipulating unordered collections of unique elements. Common uses include membership From laughingman182 at gmail.com Sat Feb 12 18:32:16 2011 From: laughingman182 at gmail.com (Lee Savide) Date: Sat, 12 Feb 2011 11:32:16 -0600 Subject: [docs] Python 3.2rc2 Documentation Message-ID: Hello. Just wanted to notify you that the current ePub of the documentation doesn't load properly on Sony Readers. I'm not sure if it's a problem with my device, but for all I know it could be the ePub itself. Just giving you a heads up. -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Mon Feb 14 14:57:01 2011 From: report at bugs.python.org (R. David Murray) Date: Mon, 14 Feb 2011 13:57:01 +0000 Subject: [docs] [issue11208] example misprint in documentation whatsnew/3.2 In-Reply-To: <1297638296.9.0.737008909299.issue11208@psf.upfronthosting.co.za> Message-ID: <1297691821.87.0.686026742518.issue11208@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 14 19:21:16 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 14 Feb 2011 18:21:16 +0000 Subject: [docs] [issue11208] example misprint in documentation whatsnew/3.2 In-Reply-To: <1297638296.9.0.737008909299.issue11208@psf.upfronthosting.co.za> Message-ID: <1297707676.76.0.64874622395.issue11208@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed. Thank for the report. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 15 09:33:27 2011 From: report at bugs.python.org (Martin von Gagern) Date: Tue, 15 Feb 2011 08:33:27 +0000 Subject: [docs] [issue11218] pattern=None when following documentation for load_tests and unittest.main() In-Reply-To: <1297758807.39.0.713611114484.issue11218@psf.upfronthosting.co.za> Message-ID: <1297758807.39.0.713611114484.issue11218@psf.upfronthosting.co.za> New submission from Martin von Gagern : If I follow the documentation at http://docs.python.org/library/unittest.html#unittest.main by putting the following two snippets of code in my module file: def load_tests(loader, standard_tests, pattern='test*.py'): # top level directory cached on loader instance this_dir = os.path.dirname(__file__) package_tests = loader.discover(start_dir=this_dir, pattern=pattern) standard_tests.addTests(package_tests) return standard_tests if __name__ == "__main__": unittest.main() then the application will fail with an obscure error message: ====================================================================== ERROR: __main__ (unittest.loader.LoadTestsFailure) ---------------------------------------------------------------------- TypeError: object of type 'NoneType' has no len() ---------------------------------------------------------------------- Ran 1 test in 0.000s Monkeypatching unittest.loader._make_failed_load_tests to display a stack trace, I got this: Traceback (most recent call last): File "/usr/lib64/python2.7/unittest/loader.py", line 71, in loadTestsFromModule return load_tests(self, tests, None) File "tester.py", line 15, in load_tests package_tests = loader.discover(start_dir=this_dir, pattern=pattern) File "/usr/lib64/python2.7/unittest/loader.py", line 204, in discover tests = list(self._find_tests(start_dir, pattern)) File "/usr/lib64/python2.7/unittest/loader.py", line 247, in _find_tests if not self._match_path(path, full_path, pattern): File "/usr/lib64/python2.7/unittest/loader.py", line 235, in _match_path return fnmatch(path, pattern) File "/usr/lib64/python2.7/fnmatch.py", line 43, in fnmatch return fnmatchcase(name, pat) File "/usr/lib64/python2.7/fnmatch.py", line 75, in fnmatchcase res = translate(pat) File "/usr/lib64/python2.7/fnmatch.py", line 87, in translate i, n = 0, len(pat) TypeError: object of type 'NoneType' has no len() The error is due to the fact that pattern is passed as None to load_tests, but apparently loader.discover doesn't loke a None pattern. I would suggest that a) discover internally translates None to the default of 'test*.py' or b) the documentation is changed to cater for this common use case, i.e. by including a "pattern is None" case distinction in its load_tests snippet. In case b) is implemented but not a), it would be nice to have a more expressive error message by catching the error somewhat sooner. ---------- assignee: docs at python components: Documentation, Library (Lib) files: tester.py messages: 128579 nosy: docs at python, gagern priority: normal severity: normal status: open title: pattern=None when following documentation for load_tests and unittest.main() type: feature request versions: Python 2.7 Added file: http://bugs.python.org/file20763/tester.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 15 19:59:24 2011 From: report at bugs.python.org (=?utf-8?b?U8OpYmFzdGllbiBTYWJsw6k=?=) Date: Tue, 15 Feb 2011 18:59:24 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1297796364.92.0.0431052446329.issue10709@psf.upfronthosting.co.za> S?bastien Sabl? added the comment: Antoine, can you take a look at issue 730467? That's a trivial patch to correct a compilation issue on AIX with a C++ compiler; and that means one less entry in the AIX-NOTES file to write before the 3.2 release... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 15 20:00:48 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 15 Feb 2011 19:00:48 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1297796448.78.0.0872995635512.issue10709@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > can you take a look at issue 730467? Yes, this is in my bug queue. But unless Georg decides otherwise, this will go in after 3.2 is released (in 3.2.1 probably). ---------- _______________________________________ Python tracker _______________________________________ From scaven at bk.ru Mon Feb 14 15:31:20 2011 From: scaven at bk.ru (scaven) Date: Mon, 14 Feb 2011 19:31:20 +0500 Subject: [docs] Library Reference, asyncore module, basic echo server Message-ID: Hello Could you please make a little change in Library Reference, asyncore module http://docs.python.org/library/asyncore.html#asyncore-example-basic-echo-server change self.send(data) to if data!='': self.send(data) this will prevent error messages about sending to a closed client socket thx From scaven at bk.ru Mon Feb 14 16:15:52 2011 From: scaven at bk.ru (scaven) Date: Mon, 14 Feb 2011 20:15:52 +0500 Subject: [docs] Library Reference, asyncore module, basic HTTP client Message-ID: re the less important addition to my prev mail in http://docs.python.org/library/asyncore.html#asyncore-example-basic-http-client change self.buffer = 'GET %s HTTP/1.0\r\n\r\n' % path to self.buffer = 'GET {0} HTTP/1.0\r\nHOST: {1}\r\n\r\n'.format(path, host) this will get the real page (status 200) instead of "found" (302) page From artur.m at samsung.com Tue Feb 15 10:57:00 2011 From: artur.m at samsung.com (Artur Mazurek) Date: Tue, 15 Feb 2011 10:57:00 +0100 Subject: [docs] Bug in documentation Message-ID: Hi, I found a minor bug in documentation in paragraph 17.6.2. asyncore Example basic echo server. In description: Here is abasic echo Should be: Here is a basic echo Great documentation anyway, thanks for it. Best Regards, Artur Mazurek -------------- next part -------------- An HTML attachment was scrubbed... URL: From mathewchao at gmail.com Wed Feb 16 05:47:27 2011 From: mathewchao at gmail.com (matthew chao) Date: Wed, 16 Feb 2011 12:47:27 +0800 Subject: [docs] BUG: A wrong result of computation in python2.6 Message-ID: version: Python 2.6 OS : Windows 7 The variable x below should have been 10(integer) after the expression evaluates. It ,however, gets the value 10.000000000000002 (float) , as follows, -------------------------------------------- >>> x=math.exp ( math.log(10.0)) >>> x 10.000000000000002 >>> x=math.exp ( math.log(10)) >>> x 10.000000000000002 -------------------------------------------- In mathematics, the result is not right. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jalphen2001 at yahoo.com Wed Feb 16 09:08:33 2011 From: jalphen2001 at yahoo.com (Jurgen van Alphen) Date: Wed, 16 Feb 2011 00:08:33 -0800 (PST) Subject: [docs] howto-regex.pdf Message-ID: <532610.10421.qm@web38801.mail.mud.yahoo.com> Hi, Could it be that the } character is missing in the list of the metacharacters in par 2.1 machting characters of the howto-regex.pdf? Regards, Jurgen From report at bugs.python.org Wed Feb 16 13:52:43 2011 From: report at bugs.python.org (=?utf-8?b?U8OpYmFzdGllbiBTYWJsw6k=?=) Date: Wed, 16 Feb 2011 12:52:43 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1297860763.34.0.258416362219.issue10709@psf.upfronthosting.co.za> S?bastien Sabl? added the comment: Here is a first version of this doc for Python 3.2. It would be great if someone could proof read it since I am not a native english speaker (though it is not high level literature...). ---------- Added file: http://bugs.python.org/file20770/AIX-NOTES _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Wed Feb 16 23:37:05 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 16 Feb 2011 23:37:05 +0100 Subject: [docs] Python 3.2rc2 Documentation In-Reply-To: References: Message-ID: Hi Lee, thanks for your feedback. On Sat, Feb 12, 2011 at 18:32, Lee Savide wrote: > Hello. Just wanted to notify you that the current ePub of the documentation > doesn't load properly on Sony Readers. I'm not sure if it's a problem with > my device, but for all I know it could be the ePub itself. Just giving you a > heads up. Let me just state that 3.2 (the on-development and hopefully soon to be released python version) will be the first version to ship doc in EPUB format, so there might be something to fine tune on the run, and of course any input is much welcome! We don't own any sony ebook reader where we can test the generated EPUB and we usually use Calibre (a wonderful ebook reader for pc, funnily written in python) where we can see the doc just fine. Do you have a more detailed error your reader returns (either a description of what's not working or a real error message from the software)? In case is non-trivial to obtain one, could you be so kind to ask on a user support forum how to obtain such errors messages and/or debug it a bit further on your side? As a sony customer, do you have access to a sony customer care service where you can ask support/guidance/maybe even an update of the reader to see if a new version fix the problem? Any help is really appreciate since we're surfing in the dark :) Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Wed Feb 16 23:49:26 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 16 Feb 2011 23:49:26 +0100 Subject: [docs] insort-insert In-Reply-To: References: Message-ID: Hi Erden, thanks for your email On Wed, Feb 9, 2011 at 22:02, Erden Oktay wrote: >> import bisect >>>> >>>> scores = [(100, 'perl'), (200, 'tcl'), (400, 'lua'), (500, 'python')] >>>> bisect.insort(scores, (300, 'ruby')) >>>> scores > > [(100, 'perl'), (200, 'tcl'), (300, 'ruby'), (400, 'lua'), (500, 'python')] > > I thought instead of insort you meant insert. I see why you think it's a typo, but bisect module has a 'insort()' method for real :) it inserts an element in an already sorted sequence, keeping it sorted. you can refer for a more detailed description to the online doc[1]. [1] http://docs.python.org/library/bisect.html#bisect.insort Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Wed Feb 16 23:59:51 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 16 Feb 2011 23:59:51 +0100 Subject: [docs] BUG: A wrong result of computation in python2.6 In-Reply-To: References: Message-ID: Hi Matthew, thanks for your email. On Wed, Feb 16, 2011 at 05:47, matthew chao wrote: > version: Python 2.6 > OS : Windows 7 > > The variable x below should have been 10(integer) after the expression > evaluates. It ,however, gets the value 10.000000000000002 (float) , as > follows, > -------------------------------------------- >>>> x=math.exp ( math.log(10.0)) >>>> x > 10.000000000000002 > > >>>> x=math.exp ( math.log(10)) >>>> x > 10.000000000000002 > -------------------------------------------- > > In mathematics, the result is not right. I could try to explain why this is "expected" on a computer, but I could never do it even near as good as David Goldberg in his famous paper "what every scientist should know about floating-point arithmetic"[1] [1] http://cr.yp.to/2005-590/goldberg.pdf Cheers, -- 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 Thu Feb 17 00:27:51 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 17 Feb 2011 00:27:51 +0100 Subject: [docs] Library Reference, asyncore module, basic HTTP client In-Reply-To: References: Message-ID: Hi scaven, thanks for your email. On Mon, Feb 14, 2011 at 16:15, scaven wrote: > re > > the less important addition to my prev mail > in > http://docs.python.org/library/asyncore.html#asyncore-example-basic-http-client > > change > ? ? ? ?self.buffer = 'GET %s HTTP/1.0\r\n\r\n' % path > > to > ? ? ? ?self.buffer = 'GET {0} HTTP/1.0\r\nHOST: {1}\r\n\r\n'.format(path, > host) > > this will get the real page (status 200) instead of "found" (302) page I've opened a new issue[1] on the tracker with a patch to fix what you've reported. [1] http://bugs.python.org/issue11227 Cheers, -- 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 Thu Feb 17 00:36:31 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 17 Feb 2011 00:36:31 +0100 Subject: [docs] Library Reference, asyncore module, basic echo server In-Reply-To: References: Message-ID: Hi scaven, On Mon, Feb 14, 2011 at 15:31, scaven wrote: > Hello > Could you please make a little change in Library Reference, asyncore module > http://docs.python.org/library/asyncore.html#asyncore-example-basic-echo-server > > change > ? ? ? ?self.send(data) > > to > ? ? ? ?if data!='': self.send(data) > > this will prevent error messages about sending to a closed client socket I'm a bit unsure about this change: what's the exact problem you're trying to fix? That is an example, and one of the virtue an example has to have is the simplicity and compactness while showing the concept if wants to explain, so you have to convince us this change is worth. 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 Thu Feb 17 08:10:36 2011 From: report at bugs.python.org (John) Date: Thu, 17 Feb 2011 07:10:36 +0000 Subject: [docs] [issue11230] "Full unicode import system" not in 3.2 In-Reply-To: <1297926635.95.0.756299771372.issue11230@psf.upfronthosting.co.za> Message-ID: <1297926635.95.0.756299771372.issue11230@psf.upfronthosting.co.za> New submission from John : A few months ago I read that in 3.2 it will be possible to import modules that are located on paths containing any unicode character. (more precisely, with chars not in the local code page) After an hour or two trying to get this to work in 3.2rc3, I went looking for clues, and found these 2 messages in which Victor Stinner says this feature is delayed until Python 3.3: http://bugs.python.org/issue3080#msg126514 http://bugs.python.org/issue10828#msg125787 Could you please make it clear in documentation and web pages, that this feature is not working yet. The Python 3.2 download page includes this: "countless fixes regarding bytes/string issues; among them full support for a bytes environment (filenames, environment variables)" and I guessed this must cover importing from any unicode path, as there was no mention that such importing had been abandoned for this version. -- jh ---------- assignee: docs at python components: Documentation messages: 128711 nosy: docs at python, jh45 priority: normal severity: normal status: open title: "Full unicode import system" not in 3.2 versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 12:18:48 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Feb 2011 11:18:48 +0000 Subject: [docs] [issue11230] "Full unicode import system" not in 3.2 In-Reply-To: <1297926635.95.0.756299771372.issue11230@psf.upfronthosting.co.za> Message-ID: <1297941528.3.0.192619679052.issue11230@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 12:29:46 2011 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Feb 2011 11:29:46 +0000 Subject: [docs] [issue11230] "Full unicode import system" not in 3.2 In-Reply-To: <1297926635.95.0.756299771372.issue11230@psf.upfronthosting.co.za> Message-ID: <1297942186.17.0.881583604641.issue11230@psf.upfronthosting.co.za> STINNER Victor added the comment: Short answer: In Python 3.2, ??import h?h? ??doesn't work on Windows, but you can have non-ASCII paths in sys.path. Longer answer: I fixed the import machinery to handle correctly non-ASCII characters in module *paths*. But the import machinery is unable to handle non-ASCII characters in module *names*: it fails if the filesystem encoding is not UTF-8 (eg. it fails on Windows). There is another exception: Python doesn't support (yet) non encodable module paths on Windows. On Windows, you can use any character in directory names, but Python 3.2 encodes paths to the filesystem encoding (ANSI code page) which is a smaller charset. In practical, this Windows specific limitation on module paths doesn't really matter. I plan to fix all these issues in Python 3.3: see #3080. -- > Could you please make it clear in documentation and web pages, > that this feature is not working yet. What's New in Python 3.2 documentation has this sentence: "Python?s import mechanism can now load modules installed in directories with non-ASCII characters in the path name. This solved an aggravating problem with home directories for users with non-ASCII characters in their usernames." which is correct. Which web page should updated/fixed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 15:57:57 2011 From: report at bugs.python.org (=?utf-8?b?U8OpYmFzdGllbiBTYWJsw6k=?=) Date: Thu, 17 Feb 2011 14:57:57 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1297954677.49.0.0928335929671.issue10709@psf.upfronthosting.co.za> S?bastien Sabl? added the comment: Could this doc be added before the 3.2 release? I think it is convenient for the (few) AIX users and harmless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 16:05:06 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Feb 2011 15:05:06 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1297955106.78.0.42359631699.issue10709@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 17:40:38 2011 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Feb 2011 16:40:38 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1297960838.18.0.680577176041.issue10709@psf.upfronthosting.co.za> R. David Murray added the comment: Here is a proofread diff. I did make one substantive change: I added a comment about the test suite not running with the default maxdata and not raising memory errors with 512MB. Is that correct? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 17:41:03 2011 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Feb 2011 16:41:03 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1297960863.37.0.26196396099.issue10709@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- keywords: +patch Added file: http://bugs.python.org/file20777/aix-notes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 17:42:50 2011 From: report at bugs.python.org (=?utf-8?b?U8OpYmFzdGllbiBTYWJsw6k=?=) Date: Thu, 17 Feb 2011 16:42:50 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1297960970.0.0.762300891777.issue10709@psf.upfronthosting.co.za> S?bastien Sabl? added the comment: Yes it is correct. And thank you for proof reading it too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 17:46:44 2011 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Feb 2011 16:46:44 +0000 Subject: [docs] [issue11231] bytes() constructor is not correctly documented In-Reply-To: <1297961204.12.0.402679870877.issue11231@psf.upfronthosting.co.za> Message-ID: <1297961204.12.0.402679870877.issue11231@psf.upfronthosting.co.za> New submission from STINNER Victor : There are 5 different usages of the bytes() constructor: 1) bytes(iterable_of_ints) -> bytes 2) bytes(string, encoding[, errors]) -> bytes 3) bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer 4) bytes(memory_view) -> bytes 5) bytes(int) <=> b'\0' * size The docstring describes the four first usages, the documentation only (3). http://docs.python.org/dev/library/functions.html#bytes Note: bytes(3) accepts 2 other arguments, but I don't think that they are used: bytes(3, 'unused encoding', 'unused errors'). ---------- assignee: docs at python components: Documentation messages: 128739 nosy: docs at python, haypo priority: normal severity: normal status: open title: bytes() constructor is not correctly documented versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 17:52:18 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Feb 2011 16:52:18 +0000 Subject: [docs] [issue11231] bytes() constructor is not correctly documented In-Reply-To: <1297961204.12.0.402679870877.issue11231@psf.upfronthosting.co.za> Message-ID: <1297961538.52.0.983933962197.issue11231@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > 3) bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer > 4) bytes(memory_view) -> bytes These are AFAIR the same. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 17:55:39 2011 From: report at bugs.python.org (STINNER Victor) Date: Thu, 17 Feb 2011 16:55:39 +0000 Subject: [docs] [issue11231] bytes() constructor is not correctly documented In-Reply-To: <1297961204.12.0.402679870877.issue11231@psf.upfronthosting.co.za> Message-ID: <1297961739.93.0.395063422111.issue11231@psf.upfronthosting.co.za> STINNER Victor added the comment: > These are AFAIR the same. So the docstring should also maybe be updated too: $ python >>> help(bytes) Help on class bytes in module builtins: class bytes(object) | bytes(iterable_of_ints) -> bytes | bytes(string, encoding[, errors]) -> bytes | bytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer | bytes(memory_view) -> bytes | | Construct an immutable array of bytes from: | - an iterable yielding integers in range(256) | - a text string encoded using the specified encoding | - a bytes or a buffer object | - any object implementing the buffer API. | ... ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Thu Feb 17 19:25:18 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 17 Feb 2011 19:25:18 +0100 Subject: [docs] Library Reference, asyncore module, basic echo server In-Reply-To: References: Message-ID: > I'm a bit unsure about this change: what's the exact problem you're > trying to fix? > > That is an example, and one of the virtue an example has to have is > the simplicity and compactness while showing the concept if wants to > explain, so you have to convince us this change is worth. Ok, I saw the problem (thanks for the private explanation) and I've opened http://bugs.python.org/issue11232 . 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 Thu Feb 17 20:03:19 2011 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 17 Feb 2011 19:03:19 +0000 Subject: [docs] [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> New submission from Sandro Tosi : Hi, following up http://mail.python.org/pipermail/docs/2011-February/003083.html we have a chat on #python-dev on the topic, the situation is - all started with os.lchmod() and as.lchflags() methods not available on a Debian system - that's because POSIX does not require those functions and then Linux systems don't provide them - so we then thought about clarifying, only for those 2 methods, that they might not be available with a format like "availability: some unix systems" - then we noticed that on top of os doc there's a notice "An ?Availability: Unix? note means that this function is commonly found on Unix systems. It does not make any claims about its existence on a specific operating system." and so we thought about linking every 'Availability: Unix' to that note - or transform that not in a footnote and link every 'Availability: Unix' for functions that might not be present to that footnote. It's enough for the conversation dump: ideas/suggestions? :) ---------- assignee: docs at python components: Documentation messages: 128746 nosy: docs at python, sandro.tosi priority: normal severity: normal status: open title: clarifying Availability: Unix _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Thu Feb 17 20:05:24 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 17 Feb 2011 20:05:24 +0100 Subject: [docs] function os.lchmod() does not seem to exist In-Reply-To: References: Message-ID: Hi Wout, thanks for your email. On Sun, Feb 6, 2011 at 05:16, Wout van Albada wrote: > Hi, > > I tried to use the os.lchmod() function documented here: > http://docs.python.org/library/os.html#os.lchmod > > However, it doesn't exist in my version of Python: > > wout at zoot ~ 549>python > Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48) > [GCC 4.4.5] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import os >>>> os.lchmod('blabla', 0) > Traceback (most recent call last): > ? File "", line 1, in > AttributeError: 'module' object has no attribute 'lchmod' >>>> this happens because POSIX doesn't require lchmod (and lchfalgs) and so Linux systems doesn't provide them. I just opened an issue[1] to discuss about how to handle documentation for these cases. [1] http://bugs.python.org/issue11233 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 Feb 17 20:22:35 2011 From: report at bugs.python.org (Carl Chenet) Date: Thu, 17 Feb 2011 19:22:35 +0000 Subject: [docs] [issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var) In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> New submission from Carl Chenet : Hi, It seems a mistake could be in the "What's new in Python 3.2" (rc3) documentation in the sysconfig.get_config_var('SO') example : >>> sysconfig.get_config_var('SO') # find the full filename extension 'cpython-32mu.so' On my system (Debian GNU/Linux, Python3.2rc3), the same command gives : >>> sysconfig.get_config_var('SO') '.cpython-32m.so' A dot at the beginning of the string could be missing in the example of the current documentation. This dot also appears in the example of the PEP 3149. Regards, Carl Chenet ---------- assignee: docs at python components: Documentation messages: 128747 nosy: chaica_, docs at python priority: normal severity: normal status: open title: Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var) versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 20:26:29 2011 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 17 Feb 2011 19:26:29 +0000 Subject: [docs] [issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var) In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: Sandro Tosi added the comment: On Thu, Feb 17, 2011 at 20:22, Carl Chenet wrote: >>>> sysconfig.get_config_var('SO') > '.cpython-32m.so' > > A dot at the beginning of the string could be missing in the example of the current documentation. This dot also appears in the example of the PEP 3149. and also in a freshly built python from last checkout. ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 20:27:46 2011 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 17 Feb 2011 19:27:46 +0000 Subject: [docs] [issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var) In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: <1297970866.51.0.74563692339.issue11234@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 21:05:09 2011 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Feb 2011 20:05:09 +0000 Subject: [docs] [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1297973109.03.0.0386501107431.issue11233@psf.upfronthosting.co.za> R. David Murray added the comment: I like the footnote idea. I wonder if it would also be worth marking which functions are Posix (Availability: posix) and therefore likely to be available on all unix systems. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 21:09:50 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 17 Feb 2011 20:09:50 +0000 Subject: [docs] [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1297973390.61.0.651689820186.issue11233@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I like the footnote idea. Me too. > I wonder if it would also be worth marking which functions are Posix > (Availability: posix) and therefore likely to be available on all unix > systems. POSIX has optional APIs, hasn't it? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 17 21:19:57 2011 From: report at bugs.python.org (R. David Murray) Date: Thu, 17 Feb 2011 20:19:57 +0000 Subject: [docs] [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1297973997.73.0.658767424037.issue11233@psf.upfronthosting.co.za> R. David Murray added the comment: Good point :( ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Thu Feb 17 21:33:07 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 17 Feb 2011 21:33:07 +0100 Subject: [docs] Prime num bug In-Reply-To: <85995.87460.qm@web39323.mail.mud.yahoo.com> References: <85995.87460.qm@web39323.mail.mud.yahoo.com> Message-ID: Hi Jon, On Wed, Feb 9, 2011 at 05:21, Jon wrote: > Hi there > > The prime number function in 4.4 breaks and continue statements is wrong. Care to explain why? I can see it works as expected: $ ./python Python 3.2rc3+ (py3k, Feb 17 2011, 21:31:25) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> for n in range(2, 10): ... for x in range(2, n): ... if n % x == 0: ... print(n, 'equals', x, '*', n//x) ... break ... else: ... # loop fell through without finding a factor ... print(n, 'is a prime number') ... 2 is a prime number 3 is a prime number 4 equals 2 * 2 5 is a prime number 6 equals 2 * 3 7 is a prime number 8 equals 2 * 4 9 equals 3 * 3 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 Thu Feb 17 21:59:05 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 17 Feb 2011 21:59:05 +0100 Subject: [docs] Tutorial Documentation In-Reply-To: <4D4E15C1.3@gmail.com> References: <4D4E15C1.3@gmail.com> Message-ID: Hi Cameron, On Sun, Feb 6, 2011 at 04:30, Cameron Campos wrote: > There is a sentence in the first chapter's fifth paragraph that needs to > have a comma placed in here: Thanks for your suggestion, I just submitted the change to a nice devel (thanks ?ric!) to be submitted after 3.2 will be released. 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 Thu Feb 17 22:33:30 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 17 Feb 2011 22:33:30 +0100 Subject: [docs] Set documentation bug In-Reply-To: References: Message-ID: Hi Davide, thanks for your email. On Fri, Feb 11, 2011 at 18:20, Davide Del Vento wrote: > Hi, > I'd like to suggest a little but IMO important improvement for this > page: http://docs.python.org/library/sets.html > > The sentence "Deprecated since version 2.6: The built-in set/frozenset > types replace this module." should link to > http://docs.python.org/library/stdtypes.html#set etc. absolutely, nice catch > The following patch would do the job. > > Thanks and Regards, > Davide > > --- sets.txt ? ?2011-02-11 17:15:05.833691409 +0000 > +++ sets.txt.orig ? ? ? 2011-02-11 17:14:30.282993805 +0000 > @@ -14,7 +14,7 @@ > .. versionadded:: 2.3 > > .. deprecated:: 2.6 > - ? The built-in :class:`set`\/\ :class:`frozenset` types replace this module. > + ? The built-in ``set``/``frozenset`` types replace this module. > > The :mod:`sets` module provides classes for constructing and manipulating > unordered collections of unique elements. ?Common uses include membership thanks for the patch (even if it's in reverse :) - I just submitted http://bugs.python.org/issue11238 to have this fixed. Cheers, -- 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 Thu Feb 17 23:02:43 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 17 Feb 2011 23:02:43 +0100 Subject: [docs] Bug in documentation In-Reply-To: References: Message-ID: Hi Artur, On Tue, Feb 15, 2011 at 10:57, Artur Mazurek wrote: > Hi, > > > > I found a minor bug in documentation in paragraph 17.6.2. asyncore Example > basic echo server. > > > > In description: > > Here is abasic echo > > > > Should be: > > Here is a basic echo nice catch, I just notified[1] an existing bug about it to get this fixed along with it. [1] http://bugs.python.org/msg128760 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 Fri Feb 18 00:09:09 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 18 Feb 2011 00:09:09 +0100 Subject: [docs] howto-regex.pdf In-Reply-To: <532610.10421.qm@web38801.mail.mud.yahoo.com> References: <532610.10421.qm@web38801.mail.mud.yahoo.com> Message-ID: Hi Jurgen, On Wed, Feb 16, 2011 at 09:08, Jurgen van Alphen wrote: > Hi, > > Could it be that the } character is missing in the list of the metacharacters in par 2.1 machting characters of the howto-regex.pdf? yes indeed, it's missing: I've just reported http://bugs.python.org/issue11239 with a patch for 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 Fri Feb 18 05:45:49 2011 From: report at bugs.python.org (John) Date: Fri, 18 Feb 2011 04:45:49 +0000 Subject: [docs] [issue11230] "Full unicode import system" not in 3.2 In-Reply-To: <1297926635.95.0.756299771372.issue11230@psf.upfronthosting.co.za> Message-ID: <1298004349.6.0.0419339272787.issue11230@psf.upfronthosting.co.za> John added the comment: Victor asked "Which web page should updated/fixed?" Answer: The Python 3.2 download page. But what should it say? The main point is that people like me, who remember seeing a statement about this a few months ago, may expect unicode to work in every conceivable situation, and a prominent warning that it's not *all* fixed yet, with a link to details in the documentation, would save them from trying things that don't work. By the way, I hadn't grasped a simple point from issue 3080: I tested on *English* Windows by putting a Greek character in the path to some python modules. But the usual situation is where a *Greek* version of Windows has some Greek characters in the path, and from what you just wrote, that's OK now. -- jh ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 18 10:59:22 2011 From: report at bugs.python.org (=?utf-8?b?U8OpYmFzdGllbiBTYWJsw6k=?=) Date: Fri, 18 Feb 2011 09:59:22 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1298023161.92.0.201809784755.issue10709@psf.upfronthosting.co.za> S?bastien Sabl? added the comment: Here is a new version of the file: It integrates the corrections by R. David, and I also modified the "memory limitations" section in order to use ldedit rather than some flags for the linker. ---------- Added file: http://bugs.python.org/file20782/AIX-NOTES _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 18 18:49:09 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 18 Feb 2011 17:49:09 +0000 Subject: [docs] [issue11238] sets - refer to sets/frozenset in stdtypes In-Reply-To: <1297978055.74.0.115599030243.issue11238@psf.upfronthosting.co.za> Message-ID: <1298051349.63.0.270169062791.issue11238@psf.upfronthosting.co.za> ?ric Araujo added the comment: Good catch, done in r88436. Thanks Sandro and Davide, if you?re subscribed to the docs at python mailing-list and can read this. ---------- assignee: sandro.tosi -> eric.araujo nosy: +docs at python, eric.araujo resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 18 18:58:51 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 18 Feb 2011 17:58:51 +0000 Subject: [docs] [issue11203] gzip doc is behind In-Reply-To: <1297539632.81.0.320134391105.issue11203@psf.upfronthosting.co.za> Message-ID: <1298051931.66.0.943600917224.issue11203@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. Would you like to propose a patch? ---------- nosy: +eric.araujo versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 18 20:35:25 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 18 Feb 2011 19:35:25 +0000 Subject: [docs] [issue11231] bytes() constructor is not correctly documented In-Reply-To: <1297961204.12.0.402679870877.issue11231@psf.upfronthosting.co.za> Message-ID: <1298057725.37.0.325171908478.issue11231@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 18 21:00:33 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 18 Feb 2011 20:00:33 +0000 Subject: [docs] [issue11231] bytes() constructor is not correctly documented In-Reply-To: <1297961204.12.0.402679870877.issue11231@psf.upfronthosting.co.za> Message-ID: <1298059233.24.0.62042808043.issue11231@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You sort of left out bytes() == bytes(0) == b''. I did not know about case 5 -- not surprisingly ;-). ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 18 22:19:09 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 18 Feb 2011 21:19:09 +0000 Subject: [docs] [issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var) In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: <1298063949.24.0.687747105069.issue11234@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: docs at python -> rhettinger nosy: +georg.brandl priority: normal -> release blocker resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 18 23:27:49 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 18 Feb 2011 22:27:49 +0000 Subject: [docs] [issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var) In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: <1298068069.69.0.24366747714.issue11234@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll look at this later tonight. Eric, no marking "accepted" for tracker items without a patch. "Accepted" means that a patch has been reviewed and is okay to apply. ---------- priority: release blocker -> high resolution: accepted -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 18 23:32:42 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 18 Feb 2011 22:32:42 +0000 Subject: [docs] [issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var) In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: <1298068362.31.0.787651144455.issue11234@psf.upfronthosting.co.za> ?ric Araujo added the comment: In this case, I thought that the suggested addition of one dot in one place was equivalent to a patch, and maybe more useful (we don?t know if you have local edits in your file that would make the diff fuzzy). Anyway, I?m attaching the same fix in a diff form, for your convenience. ---------- keywords: +patch nosy: +eric.araujo Added file: http://bugs.python.org/file20788/fix-11234.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 06:40:26 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 19 Feb 2011 05:40:26 +0000 Subject: [docs] [issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var) In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: <1298094026.0.0.0180510857577.issue11234@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Antoine, I'm traveling and don't have immediate access to my svn checkout. Can you fix this please? ---------- assignee: rhettinger -> pitrou nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 09:40:27 2011 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Feb 2011 08:40:27 +0000 Subject: [docs] [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1298104827.83.0.122171966958.issue11233@psf.upfronthosting.co.za> Georg Brandl added the comment: The "Notes on availability" bullet list at the top of docs.python.org/library/os should already say everything that there is to say here... ---------- nosy: +georg.brandl resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From apstrinka at gmail.com Fri Feb 18 13:05:43 2011 From: apstrinka at gmail.com (Alex Strinka) Date: Fri, 18 Feb 2011 07:05:43 -0500 Subject: [docs] Omission in Curses Documentation Message-ID: On the page 15.9 curses - Terminal handling for character-cell displays, in the character-cell attributes table, A_REVERSE is missing. The A_REVERSE attribute switches background and foreground colors. -Alex Strinka -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat Feb 19 09:45:12 2011 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Feb 2011 08:45:12 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1298105112.02.0.384734508367.issue10709@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed as r88438. Thanks! Please indicate how much of this needs to be backported to 2.7 and 3.1. ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 16:40:28 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Feb 2011 15:40:28 +0000 Subject: [docs] [issue11234] Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var) In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: <1298130028.05.0.441280355957.issue11234@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, it's up to Georg to decide if it goes before 3.2. But I don't see the hurry: the online docs are rebuilt daily anyway. ---------- assignee: pitrou -> georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 16:51:00 2011 From: report at bugs.python.org (=?utf-8?b?U8OpYmFzdGllbiBTYWJsw6k=?=) Date: Sat, 19 Feb 2011 15:51:00 +0000 Subject: [docs] [issue10709] Misc/AIX-NOTES needs updating In-Reply-To: <1292428256.05.0.89055748757.issue10709@psf.upfronthosting.co.za> Message-ID: <1298130660.64.0.969020685761.issue10709@psf.upfronthosting.co.za> S?bastien Sabl? added the comment: Great! I intend to check that branch 2.7 works fine on AIX once I will have finished with 3.x (which should be soon). I will then update this file for Python 2.7 (there shouldn't be much changes hopefully). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 16:59:21 2011 From: report at bugs.python.org (R. David Murray) Date: Sat, 19 Feb 2011 15:59:21 +0000 Subject: [docs] [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1298131161.61.0.167681859681.issue11233@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, but when you jump directly to one of the functions, you don't see that bullet list. Whereas if it were a footnote on the 'avaiability: unix" statement, the natural thing would be to follow the footnote and thus learn the limitations on that statement. Thus I think the footnote would be better than the bullet list at the top. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 18:27:03 2011 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Feb 2011 17:27:03 +0000 Subject: [docs] [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1298136423.49.0.444001490977.issue11233@psf.upfronthosting.co.za> Georg Brandl added the comment: That's a good point, indeed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 18:39:34 2011 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 19 Feb 2011 17:39:34 +0000 Subject: [docs] [issue11233] clarifying Availability: Unix In-Reply-To: <1297969399.53.0.187875867799.issue11233@psf.upfronthosting.co.za> Message-ID: <1298137174.07.0.475811643223.issue11233@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 19:15:21 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 19 Feb 2011 18:15:21 +0000 Subject: [docs] [issue11234] Error in What's new 3.2rc3 with sysconfig.get_config_var('SO') In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: <1298139321.45.0.838917959323.issue11234@psf.upfronthosting.co.za> ?ric Araujo added the comment: The online docs are rebuilt, but people may read the version bundled with a tarball or installer and wonder at the discrepancy, if they notice it. ---------- title: Possible error in What's new Python3.2(rc3) documentation (sysconfig.get_config_var) -> Error in What's new 3.2rc3 with sysconfig.get_config_var('SO') _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 19:18:48 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 19 Feb 2011 18:18:48 +0000 Subject: [docs] [issue11234] Error in What's new 3.2rc3 with sysconfig.get_config_var('SO') In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: <1298139528.09.0.493905289069.issue11234@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 19:38:38 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 19 Feb 2011 18:38:38 +0000 Subject: [docs] [issue11234] Error in What's new 3.2rc3 with sysconfig.get_config_var('SO') In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: <1298140718.14.0.643369553317.issue11234@psf.upfronthosting.co.za> Raymond Hettinger added the comment: ?ric, go ahead and fix this please. ---------- assignee: georg.brandl -> eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 19:47:15 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 19 Feb 2011 18:47:15 +0000 Subject: [docs] [issue11234] Error in What's new 3.2rc3 with sysconfig.get_config_var('SO') In-Reply-To: <1298140718.14.0.643369553317.issue11234@psf.upfronthosting.co.za> Message-ID: <4D601031.6040607@netwok.org> ?ric Araujo added the comment: Done in r88442. I found a missing closing quote and fixed it too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 20:16:44 2011 From: report at bugs.python.org (Georg Brandl) Date: Sat, 19 Feb 2011 19:16:44 +0000 Subject: [docs] [issue11248] Tails of generator get lost under zip() In-Reply-To: <1298112645.15.0.0904865308119.issue11248@psf.upfronthosting.co.za> Message-ID: <1298143004.15.0.203959090784.issue11248@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> docs at python components: +Documentation -None nosy: +docs at python stage: committed/rejected -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 19 22:34:37 2011 From: report at bugs.python.org (Daniel Urban) Date: Sat, 19 Feb 2011 21:34:37 +0000 Subject: [docs] [issue11248] Tails of generator get lost under zip() In-Reply-To: <1298112645.15.0.0904865308119.issue11248@psf.upfronthosting.co.za> Message-ID: <1298151277.56.0.765727313078.issue11248@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 20 00:26:13 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 19 Feb 2011 23:26:13 +0000 Subject: [docs] [issue11248] Tails of generator get lost under zip() In-Reply-To: <1298112645.15.0.0904865308119.issue11248@psf.upfronthosting.co.za> Message-ID: <1298157973.87.0.475325053153.issue11248@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This is not a bug. It is an implementation specific detail and is not guaranteed behavior. The submitted "example bug" is horrible code that makes unwarranted assumptions about the implementation -- it is an anti-pattern to write generators that assume that their consumers will run them to exhaustion so that cleanup code will be executed -- a number of tools violate this assumption. If you're relying on this technique for cleanup, you're doing it wrong. I'll look at this again after the 3.2 release. When it was discussed before, the outcome was to introduce itertools.zip_longest() and to not over-document non-guaranteed implementation specific details (lest people rely on them and write code even worse than the OP's example). ---------- assignee: docs at python -> rhettinger nosy: +rhettinger priority: normal -> low type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 20 02:41:44 2011 From: report at bugs.python.org (Greg Kochanski) Date: Sun, 20 Feb 2011 01:41:44 +0000 Subject: [docs] [issue11248] Tails of generator get lost under zip() In-Reply-To: <1298112645.15.0.0904865308119.issue11248@psf.upfronthosting.co.za> Message-ID: <1298166104.1.0.316331314972.issue11248@psf.upfronthosting.co.za> Greg Kochanski added the comment: The code (bug312.py) was not submitted as a "pattern", but rather as an example of a trap into which it is easy to fall, at least for the 99% of programmers who are users of the language rather than its implementers. The basic difference is that while one can write a function that is guaranteed to execute to the end of its body[*]; one cannot do that with a generator function. This point ought to be made in the documentation. [* Neglecting SIGKILL and perhaps a few abnormal cases.] The current documentation emphasizes the analogy to functions (which can be misleading) and (in section 6.8) explictly says that the normal behaviour of a generator function is to run all the way to completion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 20 06:32:54 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 20 Feb 2011 05:32:54 +0000 Subject: [docs] [issue11248] Tails of generator get lost under zip() In-Reply-To: <1298112645.15.0.0904865308119.issue11248@psf.upfronthosting.co.za> Message-ID: <1298179974.42.0.254926794123.issue11248@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I've looked at the docs again and think they're fine. And in the 3.x docs, the iterator version of zip() specifies its implementation with a pure python equivalent that makes it clear that the iterator is not run to exhaustion. Note that zip() has existed since 2.0 and iterators/generators since 2.2. The docs for them have worked just fine, so I wouldn't worry too much about their being a "trap for 99% of programmers who aren't implementers." GPK, I can see that you're wound-up about this, but you seem to have a profound misunderstanding about iterators/generators and have incorrectly assumed an implied contract for consumer functions to completely consume their inputs. Sorry, but I'm going to close this one. For further discussion, I recommend the python tutor mailing list. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 20 07:13:46 2011 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 20 Feb 2011 06:13:46 +0000 Subject: [docs] [issue11253] autodocument first appearance of ctypes.wintypes constants In-Reply-To: <1298182426.14.0.687578094658.issue11253@psf.upfronthosting.co.za> Message-ID: <1298182426.14.0.687578094658.issue11253@psf.upfronthosting.co.za> New submission from anatoly techtonik : I've just noticed that my application is incompatible with Python 2.5, because ctypes.wintypes is missing SHORT constants. However, I can't find the information when these symbols were introduced first. To prevent such confusion in future it would be nice to extract symbol information for each Python release and automatically include the version of the first appearance in documentation. ---------- assignee: docs at python components: Documentation messages: 128893 nosy: docs at python, techtonik priority: normal severity: normal status: open title: autodocument first appearance of ctypes.wintypes constants versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 20 21:03:51 2011 From: report at bugs.python.org (Xavier Morel) Date: Sun, 20 Feb 2011 20:03:51 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> New submission from Xavier Morel : argparse has been merged to the standard library in 3.2, and (tell me if I'm wrong) would therefore be the "best-practices" way to parse command-line arguments. Numerous stdlib modules can be used as scripts, but they tend to have ad-hoc documentation (if they are at all documented) and arguments parsing (using any of the 4 available methods in Python: straight from sys.argv, getopt, optparse and argparse). I picked smtpd as a first shot since it does something useful (SMTP proxy) and has a pretty good (if ad-hoc) command-line documentation. smtpd is currently using getopt for its options parsing and the argument parsing is very cleanly factored: the port only had to replace the implementation of the `parseargs` function (and add and remove some helpers). * The port keeps the existing arguments semantics (including the mandatory host:port syntax for the local and remote specs if overridden) * The port tries to maintain the old error messages, but due to the way argparse works (or the way I used it for the specs) the parity is not perfect when providing incorrect specs * The CLI help uses argparse's formatting, and the documentation for the local and remote specs was set on these arguments rather than as an epilog. The version string was also removed from the help screen * Because they are set by argparse's arguments validation, the status codes on incorrect arguments are slightly different: - running smtpd.py as a regular user without the `--nosetuid` flag still exits with status 1 - providing incorrect spec formats (missing or non-int port) or providing too many positional arguments (3 or more) now exits with status 2 (formerly 1) ---------- assignee: docs at python components: Documentation, Library (Lib) files: smtpd-to-argparse.diff keywords: patch messages: 128917 nosy: barry, docs at python, xmorel priority: normal severity: normal status: open title: smtpd-as-a-script feature should be documented and should use argparse versions: Python 3.3 Added file: http://bugs.python.org/file20812/smtpd-to-argparse.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 20 21:06:11 2011 From: report at bugs.python.org (Xavier Morel) Date: Sun, 20 Feb 2011 20:06:11 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298232371.33.0.593051659.issue11260@psf.upfronthosting.co.za> Xavier Morel added the comment: Second patch: documenting smtpd-as-a-script in the module's rst ---------- Added file: http://bugs.python.org/file20813/smtpd-as-script-doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 21 00:02:10 2011 From: report at bugs.python.org (Reiner Gerecke) Date: Sun, 20 Feb 2011 23:02:10 +0000 Subject: [docs] [issue11263] Wrong link to source code of ftplib In-Reply-To: <1298242930.32.0.19382495718.issue11263@psf.upfronthosting.co.za> Message-ID: <1298242930.32.0.19382495718.issue11263@psf.upfronthosting.co.za> New submission from Reiner Gerecke : The link to the source code of the ftp module at the top of the documentation (http://docs.python.org/release/3.2/library/ftplib.html) points to a non-existant page. **Source code:** :source:`Lib/ftp.py` It is referencing ftp.py, but needs to be ftplib.py. ---------- assignee: docs at python components: Documentation messages: 128926 nosy: Reiner.Gerecke, docs at python priority: normal severity: normal status: open title: Wrong link to source code of ftplib versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 21 00:10:41 2011 From: report at bugs.python.org (SilentGhost) Date: Sun, 20 Feb 2011 23:10:41 +0000 Subject: [docs] [issue11263] Wrong link to source code of ftplib In-Reply-To: <1298242930.32.0.19382495718.issue11263@psf.upfronthosting.co.za> Message-ID: <1298243441.47.0.786148422465.issue11263@psf.upfronthosting.co.za> SilentGhost added the comment: here is the patch ---------- keywords: +patch nosy: +SilentGhost stage: -> patch review Added file: http://bugs.python.org/file20816/ftplib.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 21 06:50:40 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Feb 2011 05:50:40 +0000 Subject: [docs] [issue11263] Wrong link to source code of ftplib In-Reply-To: <1298242930.32.0.19382495718.issue11263@psf.upfronthosting.co.za> Message-ID: <1298267440.11.0.288517334292.issue11263@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 21 07:58:10 2011 From: report at bugs.python.org (Georg Brandl) Date: Mon, 21 Feb 2011 06:58:10 +0000 Subject: [docs] [issue11261] urlopen breaks when data parameter is used. In-Reply-To: <1298239651.85.0.222287222979.issue11261@psf.upfronthosting.co.za> Message-ID: <1298271490.04.0.154909357462.issue11261@psf.upfronthosting.co.za> Georg Brandl added the comment: Quite a few docs still say "string" where in fact bytes are expected in Python 3.x; we're updating these as we go along. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 21 07:58:17 2011 From: report at bugs.python.org (Georg Brandl) Date: Mon, 21 Feb 2011 06:58:17 +0000 Subject: [docs] [issue11261] urlopen breaks when data parameter is used. In-Reply-To: <1298239651.85.0.222287222979.issue11261@psf.upfronthosting.co.za> Message-ID: <1298271497.07.0.252697996777.issue11261@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- type: crash -> behavior versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 21 20:59:00 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 21 Feb 2011 19:59:00 +0000 Subject: [docs] [issue11263] Wrong link to source code of ftplib In-Reply-To: <1298242930.32.0.19382495718.issue11263@psf.upfronthosting.co.za> Message-ID: <1298318340.59.0.906331029441.issue11263@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the report. Fixed in r88473 and r88474. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 21 22:32:17 2011 From: report at bugs.python.org (R. David Murray) Date: Mon, 21 Feb 2011 21:32:17 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298323936.96.0.486295212559.issue11260@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for taking an interest in this and working up a patch. Unfortunately I do have some concerns. As far as I know the only module that currently uses argparse is compileall, which was only changed recently. Do tests currently exist for smtpd run as a script? If not, our experience with converting compileall to argparse indicates a thorough test suite is needed (and even so we missed some things we hadn't thought to test). We converted compileall because its help output was broken, but in retrospect it might have been better to fix the help output in the existing code. In other words, if the current code works, is "updating" it a sufficient reason to change it, considering the chances of introducing new bugs? The answer might be yes, but I don't think it is obviously yes. ---------- nosy: +r.david.murray type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 22 07:09:59 2011 From: report at bugs.python.org (Ray.Allen) Date: Tue, 22 Feb 2011 06:09:59 +0000 Subject: [docs] [issue11282] unittest document not keep consist with code In-Reply-To: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> Message-ID: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> New submission from Ray.Allen : r88451: Remove unittest methods scheduled for removal in 3.3 This commit remove assertSameElements() and assertDictContainsSubset(). But shouldn't some modification be done in the unittest library documentation? I wonder if we should remove the docs about the two methods. Now the doc only said "Deprecated since version 3.2." ---------- assignee: docs at python components: Documentation messages: 129036 nosy: docs at python, ysj.ray priority: normal severity: normal status: open title: unittest document not keep consist with code versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 22 09:48:20 2011 From: report at bugs.python.org (wesley chun) Date: Tue, 22 Feb 2011 08:48:20 +0000 Subject: [docs] [issue11283] incorrect pattern in the re module docs for conditional regex In-Reply-To: <1298364500.67.0.815268640848.issue11283@psf.upfronthosting.co.za> Message-ID: <1298364500.67.0.815268640848.issue11283@psf.upfronthosting.co.za> New submission from wesley chun : In the re docs, it states the following for the conditional regular expression syntax: (?(id/name)yes-pattern|no-pattern) Will try to match with yes-pattern if the group with given id or name exists, and with no-pattern if it doesn?t. no-pattern is optional and can be omitted. For example, (<)?(\w+@\w+(?:\.\w+)+)(?(1)>) is a poor email matching pattern, which will match with '' as well as 'user at host.com', but not with '': >>> bool(re.match(r'(<)?(\w+@\w+(?:\.\w+)+)(?(1)>)', '')) True >>> bool(re.match(r'(<)?(\w+@\w+(?:\.\w+)+)(?(1)>)', 'user at host.com')) True >>> bool(re.match(r'(<)?(\w+@\w+(?:\.\w+)+)(?(1)>)', '>> bool(re.match(r'(<)?(\w+@\w+(?:\.\w+)+)(?(1)>)', 'user at host.com>')) True This error has existed since this feature was added in 2.4... http://docs.python.org/release/2.4.4/lib/re-syntax.html ... through the 3.3. docs... http://docs.python.org/dev/py3k/library/re.html#regular-expression-syntax The fix is to add the end char '$' to the regex to get all 4 working: >>> bool(re.match(r'(<)?(\w+@\w+(?:\.\w+)+)(?(1)>|$)', '')) True >>> bool(re.match(r'(<)?(\w+@\w+(?:\.\w+)+)(?(1)>|$)', 'user at host.com')) True >>> bool(re.match(r'(<)?(\w+@\w+(?:\.\w+)+)(?(1)>|$)', '>> bool(re.match(r'(<)?(\w+@\w+(?:\.\w+)+)(?(1)>|$)', 'user at host.com>')) False If accepted, I propose this patch (also attached): $ svn diff re.rst Index: re.rst =================================================================== --- re.rst (revision 88499) +++ re.rst (working copy) @@ -297,9 +297,9 @@ ``(?(id/name)yes-pattern|no-pattern)`` Will try to match with ``yes-pattern`` if the group with given *id* or *name* exists, and with ``no-pattern`` if it doesn't. ``no-pattern`` is optional and - can be omitted. For example, ``(<)?(\w+@\w+(?:\.\w+)+)(?(1)>)`` is a poor email + can be omitted. For example, ``(<)?(\w+@\w+(?:\.\w+)+)(?(1)>|$)`` is a poor email matching pattern, which will match with ``''`` as well as - ``'user at host.com'``, but not with ``''`` . ---------- assignee: docs at python components: Documentation, Regular Expressions files: re.rst messages: 129041 nosy: docs at python, wesley.chun priority: normal severity: normal status: open title: incorrect pattern in the re module docs for conditional regex versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20833/re.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 22 09:50:04 2011 From: report at bugs.python.org (Xavier Morel) Date: Tue, 22 Feb 2011 08:50:04 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298364604.48.0.805340517281.issue11260@psf.upfronthosting.co.za> Xavier Morel added the comment: > Do tests currently exist for smtpd run as a script? I have to confess I didn't think to check. > If not, our experience with converting compileall to argparse indicates a thorough test suite is needed (and even so we missed some things we hadn't thought to test). OK, so if there is no test suite currently I should create one, and if there is one I should ensure it's complete? I guess I should use compileall as an example of how to test modules-as-scripts if the former? Overall, smtpd-as-a-script is really pretty simple, it totals 28 lines apart from the argument parsing itself (which is a bit under 60 lines ignoring the help text/pattern and gets a bit under 50 including it post-patch), and as I mentioned the only part which actually needed changing is the arguments parsing, which was very well factored out. > In other words, if the current code works, is "updating" it a sufficient reason to change it, considering the chances of introducing new bugs? I'm not sure, but one of the ways I see standard libraries is not just as "ready to use" code, it's also as a repository of how to do things. And to that end, if argparse is now considered the canonical way to parse command-line arguments (which I would expect), there are very few examples of how to do things in the stdlib itself (though there are examples outside of it, due to the life argparse had pre-stdlib). It also rose to the occasion as I was wondering about the numerous standard library modules-as-scripts which are either undocumented or under-documented: because it had a good command-line documentation and a clean separation between the configuration (options parsing) and the actual execution, but no module documentation (in Doc/) it seemed like a good starting point: if it's not feasible to correctly convert "best cases" (and smtpd is probably one, short of modules using optparse probably) then the whole idea is stillborn: I do not see how it would be possible to fare better on some of the fully undocumented modules using manual options parsing, yet it would have to be expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 22 10:48:20 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 Feb 2011 09:48:20 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298368100.63.0.393873042639.issue11260@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Xavier, I think these efforts are misguided in several ways: * Many of the undocumented command-line interfaces are intentionally undocumented -- they were there for the convenience of the developer for exercising the module as it was being developed and are not part of the official API. Most are not production quality and would have been done much differently if that had been the intent. * The standard library's primary purpose is to be a library for use in user programs, not to serve as a suite of applications. We do have a few applications such as pydoc that assist development, but that is not what we want to do for most modules. Real apps need more features than we usually offer and they need much faster development cycles than supported by our 18-24 month release cycle. * To the extent the standard library serves as a set of examples, that is just side benefit. There are other ways to make code specifically for examples (we include tons of examples in the documentation; we had a Demos directory; there is the wiki; and there is the ASPN Cookbook site; etc) * David Murray is correct is pointing-out that converting to argparse risks changing the semantics and possibly breaking someone's existing uses of the current interface. * Though argparse is the shiny new kid on the block and it should be used for new code, there is no imperative to go change all existing command-line scripts. We haven't even done that same exercise for the new string formatting. * All that being said, there are some exceptions and it make may sense to document the interface in some where we really do want a command-line app. I'll look at any patches you want to submit, but try to not go wild turning the library into a suite of applications. For the most part, that is not what the standard library is about. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 22 11:43:44 2011 From: report at bugs.python.org (Xavier Morel) Date: Tue, 22 Feb 2011 10:43:44 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298371423.53.0.918838339669.issue11260@psf.upfronthosting.co.za> Xavier Morel added the comment: > any of the undocumented command-line interfaces are intentionally undocumented -- they were there for the convenience of the developer for exercising the module as it was being developed and are not part of the official API. I can understand that, but it's not clear from the source code which is which, and for several of them third-parties have taken up the convenience. Maybe a more formal process of defining which tools are to be considered "official" and which are easter-eggs is needed? In any case, even for "easter eggs" surely a good command-line documentation is a good idea (even if the module documentation side is not added due to the "easter egg" status) isn't it? > The standard library's primary purpose is to be a library for use in user programs, not to serve as a suite of applications. Sure, and I don't think most of the module-as-scripts have what it takes to be seen as applications, but many are useful and/or interesting helpers/shortcuts for day to day tasks. http.server and smtpd are good examples of useful modules-as-scripts (http.server being the exact opposite of smtpd in that it has a module-as-script documentation but no documentation whatsoever on the command-line) > Real apps need more features than we usually offer and they need much faster development cycles than supported by our 18-24 month release cycle. I think my suggestion has been misunderstood: I don't want to turn these into real apps, they're fine as basic scripts/helpers to spend 5mn on a task instead of half an hour. I think they deserve better than to be documented and known through StackOverflow or Reddit "what are the -m stdlib features" lists. > To the extent the standard library serves as a set of examples, that is just side benefit. There are other ways to make code specifically for examples (we include tons of examples in the documentation; we had a Demos directory; there is the wiki; and there is the ASPN Cookbook site; etc) Sure, but I think it's still an important driver of how things "are done" in that they're *concrete* examples, not abstract (of course the Cookbook is generally concrete as well). I'm not discounting the importance or quality of the rest of the documentation at all, or at least that was not my intention. > All that being said, there are some exceptions and it make may sense to document the interface in some where we really do want a command-line app. I'll look at any patches you want to submit, but try to not go wild turning the library into a suite of applications. For the most part, that is not what the standard library is about. As I said, my only intention here is be to document (and argparsify/formalize) what is already there. I considered doing more (e.g. for the specific case of smtpd-as-a-script making ports optional even when hosts are specified, that kind of things) but decided against this distraction, I really just want to make existing module-as-script features simpler to discover and use. That said, do you have guidelines of which areas this idea would be most interestingly/efficiently applied? Maybe a list of modules-as-scripts you know are used regularly and could benefit from some improvements in their interface or documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 22 11:46:14 2011 From: report at bugs.python.org (Xavier Morel) Date: Tue, 22 Feb 2011 10:46:14 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298371574.32.0.360743729648.issue11260@psf.upfronthosting.co.za> Xavier Morel added the comment: One more note I forgot previously: the conversion of as much scripts as possible to argparse would be for three reasons: * Make behavior consistent across the board (e.g. -h/--help) * Make CLI documentation format consistent across the board either so users know what to expect and when * Provide easy to reach (for users) examples of using argparse ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 22 16:02:11 2011 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 22 Feb 2011 15:02:11 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298386931.62.0.306503287479.issue11260@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'd support updating to argparse *if* you write a test suite for full coverage of the existing cli first. Once that passes, you'll have more confidence in your port. Modernizing the argument parsing in that case would be a useful addition. Not critical, but on the whole I think a good thing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 22 21:15:37 2011 From: report at bugs.python.org (Xavier Morel) Date: Tue, 22 Feb 2011 20:15:37 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298405737.14.0.965633494802.issue11260@psf.upfronthosting.co.za> Xavier Morel added the comment: Barry, do I correctly understand your comment to mean I should write end-to-end tests of the CLI (until reaching the already tested "meat" of smtpd), not just the CLI options parsing? ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue Feb 22 21:26:37 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Feb 2011 20:26:37 +0000 Subject: [docs] Omission in Curses Documentation In-Reply-To: References: Message-ID: Hi Alex, thanks for your bug report. On Fri, Feb 18, 2011 at 12:05, Alex Strinka wrote: > On the page 15.9 curses - Terminal handling for character-cell displays, in > the character-cell attributes table, A_REVERSE is missing. The A_REVERSE > attribute switches background and foreground colors. I just filed http://bugs.python.org/issue11292 to fix what you've reported. 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 Tue Feb 22 21:31:05 2011 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 22 Feb 2011 20:31:05 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298405737.14.0.965633494802.issue11260@psf.upfronthosting.co.za> Message-ID: <20110222153059.7ddcbaef@python.org> Barry A. Warsaw added the comment: On Feb 22, 2011, at 08:15 PM, Xavier Morel wrote: >Barry, do I correctly understand your comment to mean I should write >end-to-end tests of the CLI (until reaching the already tested "meat" of >smtpd), not just the CLI options parsing? Given the way the __main__ is written, that's probably more thorough. Testing just the parsing alone would be uninteresting I think. ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue Feb 22 21:58:35 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Feb 2011 20:58:35 +0000 Subject: [docs] Error on distutils/uploading.html? In-Reply-To: <4D54420A.7090707@limist.com> References: <4D54420A.7090707@limist.com> Message-ID: Hi Kai, thanks for your email. On Thu, Feb 10, 2011 at 19:52, Kai wrote: > Hi, > > On this page/URL, > > http://docs.python.org/distutils/uploading.html > > In 7.1, "PyPI package display" there's an example of how to use a file for > the long_description field: > > setup(name='Distutils', > ? ? ?long_description=open('README.txt')) > > > This did not work for me, when I use setup.py register it just gives the > __repr__ object instance string. ?I had to use something like, > > setup(name='Distutils', > ? ? ?long_description=open('README.txt').read()) > > And then the properly marked up README content will show up on PyPI. Thanks, You're right, so I just opened http://bugs.python.org/issue11293 to fix this error. 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 Tue Feb 22 22:23:04 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 22 Feb 2011 21:23:04 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298409784.53.0.410672954296.issue11260@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > As I said, my only intention here is be to document > (and argparsify/formalize) what is already there. In a handful of cases, that would be useful; however, for the most part, these APIs were undocumented for a reason. Some of the command-line interfaces were slapped together without much of a design effort; some were little more than quick-and-dirty ad-hoc tests. It would be a mistake to "document and formalize" accidental mini-apps. There's no harm in adding --help or a usage example, but please avoid making behavior guarantees that we really don't want to have to live with. Only "document and formalize" the parts that are well thought out. ---------- _______________________________________ Python tracker _______________________________________ From pierre.quentel at gmail.com Mon Feb 21 10:30:30 2011 From: pierre.quentel at gmail.com (Pierre Quentel) Date: Mon, 21 Feb 2011 10:30:30 +0100 Subject: [docs] Update doc for the cgi module in version 3.2 In-Reply-To: References: Message-ID: Hi, In the final version of Python 3.2 the documentation of the cgi module has not been changed, so it's not in line with what the module does It was my first contribution to the documentation so maybe I missed something ? Best regards, Pierre 2011/1/23 Pierre Quentel > Hi, > > I wrote a patch for the cgi module in version 3.2rc1. Small changes should > be done to the documentation of this module to reflect the changes in the > module API : > > - in section "20.2.2. Using the cgi module" > > original text : > "If a field represents an uploaded file, accessing the value via the value > attribute or the getvalue() method reads the entire file in memory as a > string. This may not be what you want. You can test for an uploaded file by > testing either the filename attribute or the file attribute. You can then > read the data at leisure from the file attribute:" > > proposed new text (for files, value is bytes, not string, and the read() > method on file also returns bytes) : > "If a field represents an uploaded file, accessing the value via the value > attribute or the getvalue() method reads the entire file in memory as bytes. > This may not be what you want. You can test for an uploaded file by testing > either the filename attribute or the file attribute. You can then read the > data at leisure from the file attribute (the read() and readline() methods > will return bytes) :" > > - version 2.1 introduced a parameter "encoding" for the FieldStorage > constructor, used to decode the bytes received on the HTTP connection for > fields other than files. This encoding must the one defined in the HTML > document holding the form submitted to the CGI script ; it is usually > defined by a meta tag : > > or by the Content-Type header for this document > > I'm not sure where this should be mentioned in the documentation. Maybe in > "20.2.9. Common problems and solutions" for the moment. But there are plans > to introduce another interface to change the encoding of sys.stdout in the > CGI script itself, so another option would be to open a specific section > about encodings > > Hope it's clear enough > Pierre > -------------- next part -------------- An HTML attachment was scrubbed... URL: From tim at behrsin.com Tue Feb 22 19:05:06 2011 From: tim at behrsin.com (Tim Behrsin) Date: Tue, 22 Feb 2011 10:05:06 -0800 Subject: [docs] confusing statement in python docs Message-ID: <7BF6C7C7-6EC5-40E0-A42C-B88723B9C277@behrsin.com> In section 9.3.4 it states that the following snippet: xf = x.f while True: print xf() will print "hello world" until 'the end of time'. I find this statement to be rather confusing.... If indeed, Python has the ability to generate it's own power, avert natural and societal disasters, and generally be a God, then I think it would be worth stating this in the documentation's foreword. While it is clear that Python is God-like, with its metaprogramming capabilities and other such goodies, able to create order out of chaos, I feel that to actually be God is something quite revolutionary. It would be worth, for example, informing the mass media of such knowledge - they will be highly appreciative of learning the truth, I am sure. From sandro.tosi at gmail.com Tue Feb 22 23:21:27 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Feb 2011 22:21:27 +0000 Subject: [docs] Bug in locale module docs In-Reply-To: References: Message-ID: Hi Timothy, thanks for your email. On Wed, Feb 2, 2011 at 15:20, Timothy Pederick wrote: > The following text appears to be in error: > > locale.ERA_D_FMT > > Get a format string for strftime() to represent time in a locale-specific > era-based way. > > (Note the mismatch between "D" in the constant name and "time" in its > description.) > > This text is present in the same form in at least the 2.7, 3.1 and 3.2 docs. > Checking with Python 3.1.2, it would appear that both ERA_D_FMT and > ERA_T_FMT exist. Thus, the text should probably read something like: > > locale.ERA_D_FMT > > Get a format string for strftime() to represent a date in a locale-specific > era-based way. > > locale.ERA_T_FMT > > Get a format string for strftime() to represent a time in a locale-specific > era-based way. > > (The wording "a date", "a time" instead of just "time" is the same as that > used for the D_FMT and T_FMT constants earlier in the page.) I just opened http://bugs.python.org/issue11294 to resolve this problems. Thanks for your time, -- 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 Feb 23 00:04:20 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 22 Feb 2011 23:04:20 +0000 Subject: [docs] [issue11283] incorrect pattern in the re module docs for conditional regex In-Reply-To: <1298364500.67.0.815268640848.issue11283@psf.upfronthosting.co.za> Message-ID: <1298415860.18.0.661690275423.issue11283@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 00:04:53 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 22 Feb 2011 23:04:53 +0000 Subject: [docs] [issue11282] unittest document not keep consist with code In-Reply-To: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> Message-ID: <1298415893.32.0.2284343452.issue11282@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 00:05:14 2011 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 22 Feb 2011 23:05:14 +0000 Subject: [docs] [issue11282] unittest document not keep consist with code In-Reply-To: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> Message-ID: <1298415914.23.0.814517267165.issue11282@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Wed Feb 23 00:28:34 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Feb 2011 23:28:34 +0000 Subject: [docs] list of depricate function on http://docs.python.org/library/string.html In-Reply-To: <592EE73350A70C43AE0ED25314DBA3BD9AC84A0E46@DKRDSEXC014.vestas.net> References: <592EE73350A70C43AE0ED25314DBA3BD9AC84A0E46@DKRDSEXC014.vestas.net> Message-ID: Hi Jens, thanks for your email. On Wed, Feb 2, 2011 at 13:17, Jens Hvelplund Odborg wrote: > Hi > > On the http://docs.python.org/library/string.html the section 7.1.6 is some > what confusing in that some function is marked explicit whith a red box and > a replacemen while other are not > futher more many of those not marked with a red box are quite commonly used > in other languages so a replacement would be nice for new commers to Python I traced back the red boxes to this[1] commit. [1] http://svn.python.org/view?view=revision&revision=17867 I actually don't know what to do exactly here: those functions are deprecated from string module but they are still available in string/unicode objects, so I'm inclined to leave things as they are, unless you can show us a strong opinion on that along with a detailed plan of how you'd like to see the doc to be change in this regards. Cheers, PS: resent to both recipients. -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Wed Feb 23 00:43:01 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 22 Feb 2011 23:43:01 +0000 Subject: [docs] Tutorial problem In-Reply-To: References: Message-ID: Hi Joe, thanks for your email, On Tue, Feb 1, 2011 at 16:28, Joe McDonald wrote: >>>> print 'This {food} is {adjective}.'.format(food='spam', >>>> adjective='absolutely horrible') > > > > Traceback (most recent call last): > > ? File "", line 1, in -toplevel- > > ??? print 'This {food} is {adjective}.'.format(food='spam', > adjective='absolutely horrible') > > AttributeError: 'str' object has no attribute 'format' On what interpreters are you running that example? I just built a 2.7 from the VCS branch and I can run it with no problem: $ ./python Python 2.7.1+ (release27-maint, Feb 23 2011, 00:40:53) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print 'This {food} is {adjective}.'.format(food='spam', adjective='absolutely horrible') This spam is absolutely horrible. [38484 refs] >>> 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 Feb 23 02:10:29 2011 From: report at bugs.python.org (Carl Chenet) Date: Wed, 23 Feb 2011 01:10:29 +0000 Subject: [docs] [issue11296] Possible error in What's new in Python 3.2 : duplication of rsplit() mention In-Reply-To: <1298423429.64.0.239185638784.issue11296@psf.upfronthosting.co.za> Message-ID: <1298423429.64.0.239185638784.issue11296@psf.upfronthosting.co.za> New submission from Carl Chenet : Hi, Could the rsplit() method be mentioned mistakenly two times in the following sentence of the current What's new in Python 3.2 ? "The fast-search algorithm in stringlib is now used by the split(), rsplit(), splitlines() and replace() methods on bytes, bytearray and str objects. Likewise, the algorithm is also used by rfind(), rindex(), rsplit() and rpartition()." Regards, Carl Chenet ---------- assignee: docs at python components: Documentation messages: 129146 nosy: chaica_, docs at python priority: normal severity: normal status: open title: Possible error in What's new in Python 3.2 : duplication of rsplit() mention versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 08:21:24 2011 From: report at bugs.python.org (Xavier Morel) Date: Wed, 23 Feb 2011 07:21:24 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298445683.97.0.335534363184.issue11260@psf.upfronthosting.co.za> Xavier Morel added the comment: > Only "document and formalize" the parts that are well thought out. I don't believe I have the knowledge, right or ability to make that call for any module or package but a pair of extremely obvious ones (http.server seems a pretty good candidate as it's documented in the module doc, and is just missing a CLI help). Should I create a bug and nosy the people who have been involved in the module to get their opinion for each one? (as with this one, but maybe with a different wording/initial proposal) For this one, David expresses concerns on the stability on the interface (and the point of the idea), you express even bigger concerns with the idea itself and more generally modules-as-scripts in the stdlib (not their existence so much as their official support, which full documentation would imply, if I didn't misunderstand you), and Barry seems to okay the idea as long as an extensive test suite is created beforehand to ensure there is no regression, is that sufficient to go ahead with more work and defer the final decision for when that will be done? Also, if this is to become an actual project if the smtpd stuff ever reaches fruition (though not necessarily a big or impactful one), should there be a meta-bug? (I know they're used in many bugzilla projects and I see the tracker handles dependencies) > There's no harm in adding --help or a usage example, but please avoid making behavior guarantees that we really don't want to have to live with. I'm not sure what that results in: for "quick hacks" which are not to be officially supported, does this mean fixing the CLI (adding a help for tools missing one) is OK but no more? Is an argparse switch still acceptable? Tests for the CLI tool? I'm guessing documentation in the module would definitely be off limits for those, is my interpretation correct? And again, who would be allowed to make the call on which modules-as-scripts may be considered supported, and can't be? With this one, I created separate patches for the documentation and the CLI parsing alterations, which would allow merging the CLI without adding it to the official documentation (which would I think imply a lack of official support), would that be OK for future works, if this one pans out? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 12:42:53 2011 From: report at bugs.python.org (blokeley) Date: Wed, 23 Feb 2011 11:42:53 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> New submission from blokeley : `python -m unittest discover` caught me out. I had a test module called `test-foo.py` and no test was loaded. When I renamed to `test_foo.py` it worked. The documentation says "For a project?s tests to be compatible with test discovery they must all be importable". I didn't realise that test-foo would not be importable. Could the documentation say "For a project?s tests to be compatible with test discovery they must all be importable, so ensure that the module names are valid Python identifiers." Stackoverflow question is here: http://stackoverflow.com/questions/5088960/python-unittest-discovery-does-not-discover-tests ---------- assignee: docs at python components: Documentation messages: 129176 nosy: blokeley, docs at python priority: normal severity: normal status: open title: unittest discovery needs better explanation type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 13:06:18 2011 From: report at bugs.python.org (Michael Foord) Date: Wed, 23 Feb 2011 12:06:18 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298462778.69.0.593005246127.issue11298@psf.upfronthosting.co.za> Michael Foord added the comment: Sounds like a good change to the docs. Care to provide a patch? ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 13:08:32 2011 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 23 Feb 2011 12:08:32 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298462912.05.0.00303509643176.issue11298@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 14:18:05 2011 From: report at bugs.python.org (blokeley) Date: Wed, 23 Feb 2011 13:18:05 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298467085.09.0.511905272218.issue11298@psf.upfronthosting.co.za> blokeley added the comment: Will do but I haven't submitted a patch before and it's impossible to tell from python.org/dev whether to use the svn or hg repositories. If possible, please just let me know the URL of the hg repository against which I should make the patch (I don't currently have an svn client). I tried using hg convert on http://svn.python.org/projects/python/branches/py3k but my company firewall blocked that from working (too many HTTP requests per minute). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 14:30:42 2011 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 23 Feb 2011 13:30:42 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298467842.15.0.582463268528.issue11298@psf.upfronthosting.co.za> Ezio Melotti added the comment: http://code.python.org/hg/branches/py3k/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 15:23:14 2011 From: report at bugs.python.org (blokeley) Date: Wed, 23 Feb 2011 14:23:14 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298470994.2.0.886687965857.issue11298@psf.upfronthosting.co.za> Changes by blokeley : ---------- keywords: +patch Added file: http://bugs.python.org/file20862/py3k_rev9921_issue11298.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 15:24:27 2011 From: report at bugs.python.org (blokeley) Date: Wed, 23 Feb 2011 14:24:27 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298471067.0.0.627289577745.issue11298@psf.upfronthosting.co.za> Changes by blokeley : Removed file: http://bugs.python.org/file20862/py3k_rev9921_issue11298.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 15:28:00 2011 From: report at bugs.python.org (blokeley) Date: Wed, 23 Feb 2011 14:28:00 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298471280.34.0.707504773718.issue11298@psf.upfronthosting.co.za> Changes by blokeley : Added file: http://bugs.python.org/file20863/py3k_rev9921_issue11298.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 15:29:14 2011 From: report at bugs.python.org (Michael Foord) Date: Wed, 23 Feb 2011 14:29:14 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298471354.82.0.564722680093.issue11298@psf.upfronthosting.co.za> Michael Foord added the comment: Thanks blokely, looks good. Needs applying to 2.7 / 3.2 and 3.3 branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 16:40:35 2011 From: report at bugs.python.org (blokeley) Date: Wed, 23 Feb 2011 15:40:35 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298475634.93.0.633219113585.issue11298@psf.upfronthosting.co.za> blokeley added the comment: Added release2.7-maint patch. ---------- Added file: http://bugs.python.org/file20864/py2.7-maint_rev45852_issue11298.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 16:41:19 2011 From: report at bugs.python.org (blokeley) Date: Wed, 23 Feb 2011 15:41:19 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298475679.69.0.650373193311.issue11298@psf.upfronthosting.co.za> Changes by blokeley : Removed file: http://bugs.python.org/file20864/py2.7-maint_rev45852_issue11298.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 16:46:13 2011 From: report at bugs.python.org (blokeley) Date: Wed, 23 Feb 2011 15:46:13 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298475973.7.0.158617191012.issue11298@psf.upfronthosting.co.za> blokeley added the comment: Added release2.7-maint patch. ---------- Added file: http://bugs.python.org/file20865/py2.7-maint_rev45852_issue11298.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 16:49:24 2011 From: report at bugs.python.org (blokeley) Date: Wed, 23 Feb 2011 15:49:24 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298476164.3.0.643748253084.issue11298@psf.upfronthosting.co.za> blokeley added the comment: Added release3.2-maint patch. I created the patches by cloning the corresponding hg repo from http://code.python.org/hg If this is the wrong thing to do, let me know. I have no idea where the 3.3 branch is. Please advise. ---------- Added file: http://bugs.python.org/file20866/py3.2-maint_rev9895_issue11298.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 16:50:33 2011 From: report at bugs.python.org (Michael Foord) Date: Wed, 23 Feb 2011 15:50:33 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298476233.31.0.531067825606.issue11298@psf.upfronthosting.co.za> Michael Foord added the comment: Hey, blokeley the same patch will apply cleanly against 3.2 / 3.3 so no worries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 19:44:11 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 23 Feb 2011 18:44:11 +0000 Subject: [docs] [issue11227] [DOC] asyncore - use 'Host' header in HTTP example In-Reply-To: <1297898789.12.0.318094407747.issue11227@psf.upfronthosting.co.za> Message-ID: <1298486651.61.0.304588163881.issue11227@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- assignee: sandro.tosi -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 19:44:17 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 23 Feb 2011 18:44:17 +0000 Subject: [docs] [issue11239] regexp-howto - add missing } to metachars In-Reply-To: <1297984111.53.0.588454087377.issue11239@psf.upfronthosting.co.za> Message-ID: <1298486657.73.0.694350076541.issue11239@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- assignee: sandro.tosi -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 19:44:24 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 23 Feb 2011 18:44:24 +0000 Subject: [docs] [issue11232] asyncore - don't throw a traceback when a client disconnects in echo server example In-Reply-To: <1297966962.24.0.99288850645.issue11232@psf.upfronthosting.co.za> Message-ID: <1298486664.75.0.56170783706.issue11232@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- assignee: sandro.tosi -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 19:44:30 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 23 Feb 2011 18:44:30 +0000 Subject: [docs] [issue11292] Curses - add A_REVERSE to attributes table In-Reply-To: <1298406350.63.0.533877508283.issue11292@psf.upfronthosting.co.za> Message-ID: <1298486670.88.0.382118713577.issue11292@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- assignee: sandro.tosi -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 19:44:36 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 23 Feb 2011 18:44:36 +0000 Subject: [docs] [issue11293] Distutils - read the file when using it in long_description In-Reply-To: <1298408262.52.0.851871312997.issue11293@psf.upfronthosting.co.za> Message-ID: <1298486676.91.0.351680391486.issue11293@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- assignee: sandro.tosi -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 19:44:45 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 23 Feb 2011 18:44:45 +0000 Subject: [docs] [issue11294] Locale - update & uniform ERA_*_FMT doc In-Reply-To: <1298413244.48.0.422350536879.issue11294@psf.upfronthosting.co.za> Message-ID: <1298486685.37.0.398895958581.issue11294@psf.upfronthosting.co.za> Changes by Sandro Tosi : ---------- assignee: sandro.tosi -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Wed Feb 23 20:22:09 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 23 Feb 2011 19:22:09 +0000 Subject: [docs] pythonS60-5thED colors In-Reply-To: References: Message-ID: Hi Jan, On Mon, Jan 31, 2011 at 09:55, Jan Hollerer wrote: > dear all > > i managed to install pythonS60 version on my new nokia device. > unfortunately it doesnt seem possible to change the background or the font > color of the python console after looking through the web. > > so i would like to ask directly if it is possible to change these colors > like os.system("color 0F")??? This mailing list is about the documentation of python (as released at python.org). I don't know how pythonS60 is compatible with vanilla python, but there's for sure no problem with the documentation in your email. I'd suggest to contact a user support forum, like [1], or something more specific to S60. [1] 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 Wed Feb 23 20:30:46 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 23 Feb 2011 19:30:46 +0000 Subject: [docs] tkinter messagebox In-Reply-To: <728D995326EBD042AFDA3CF28821DE65457837@rif-ex02.skf-rif.nl> References: <728D995326EBD042AFDA3CF28821DE65457837@rif-ex02.skf-rif.nl> Message-ID: Hi Theo, Please let me clarify this mailing list is about the documentation of python, and discussions about it. On Mon, Jan 31, 2011 at 11:21, Theo Mars wrote: > calling the tkinter ?messagebox in a shellwindow works fine but when I run > the application as a .pyw application > > the application crashes. Does anyone has a suggestion what is going wrong > here? > > > > The code to test is (file test.pyw): > > > > from tkinter import * > > from tkinter import ttk > > > > root = Tk() > > messagebox.showwarning(title='title', message='message') > > root.mainloop() In your message I can't find anything that's actually about documentation, so I suggest you to contact a user support forum like 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 report at bugs.python.org Wed Feb 23 21:34:52 2011 From: report at bugs.python.org (Steffen Daode Nurpmeso) Date: Wed, 23 Feb 2011 20:34:52 +0000 Subject: [docs] [issue11300] mmap() large file failures on Mac OS X docfix In-Reply-To: <1298493292.2.0.2203680343.issue11300@psf.upfronthosting.co.za> Message-ID: <1298493292.2.0.2203680343.issue11300@psf.upfronthosting.co.za> New submission from Steffen Daode Nurpmeso : Issue 11277 was closed upon the generally accepted conclusion that the failure is that mmap(2) on Mac OS X has a long time known bug (see msg129107, or directly http://lists.apple.com/archives/darwin-development/2003/Jun/msg00141.html). Issue 11277 fixed the problem in the test suite, but it does give end-users no hint that such a problem exists (on the documentation side). And it's my believe that a beginner or even a non-low-level programmer may be lost in an equal situation. (Though one could argue that such a HE should not use mmap(2), but everyone has a first-time somewhen, say.) In addition, there are many people who don't have the chance to work/test on multiple operating systems and/or hardware, and who need the hand of people who are experienced and can give hints on stupidiness or however this word is correctly spelled. (Am i preaching already?) Because Python is expected to be a user-friendly language i do request a documentation patch which gives a hint. I'll apply a patch, but i'm somewhat new to Python and rST etc., so it surely needs a hand. (Maybe even its speech is too aggressive??) ---------- assignee: docs at python components: Documentation files: doc_lib_mmap.patch keywords: patch messages: 129221 nosy: docs at python, sdaoden priority: normal severity: normal status: open title: mmap() large file failures on Mac OS X docfix type: feature request versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20867/doc_lib_mmap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 23 23:58:11 2011 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 23 Feb 2011 22:58:11 +0000 Subject: [docs] [issue11304] Input/output tutorial - PI is rounded not truncated In-Reply-To: <1298501891.64.0.374042391138.issue11304@psf.upfronthosting.co.za> Message-ID: <1298501891.64.0.374042391138.issue11304@psf.upfronthosting.co.za> New submission from Sandro Tosi : Following up http://mail.python.org/pipermail/docs/2011-January/002974.html here's a patch to fix it. ---------- assignee: docs at python components: Documentation keywords: patch messages: 129228 nosy: docs at python, sandro.tosi priority: low severity: normal stage: patch review status: open title: Input/output tutorial - PI is rounded not truncated versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Wed Feb 23 23:59:21 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 23 Feb 2011 22:59:21 +0000 Subject: [docs] Documentation Bug In-Reply-To: <4D4490AB.1030202@estudiantes.uci.cu> References: <4D4490AB.1030202@estudiantes.uci.cu> Message-ID: Hi Alexis, On Sat, Jan 29, 2011 at 22:11, Alexis L?pez Zubieta wrote: > Were it says "truncates" should say "rounds". > Because: > pi truncated to 3 decimal positions is 3.141 and pi rounded to 3 decimal > positions is 3.142. Indeed, I just filed http://bugs.python.org/issue11304 to fix 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 Thu Feb 24 00:10:29 2011 From: report at bugs.python.org (SilentGhost) Date: Wed, 23 Feb 2011 23:10:29 +0000 Subject: [docs] [issue11304] Input/output tutorial - PI is rounded not truncated In-Reply-To: <1298501891.64.0.374042391138.issue11304@psf.upfronthosting.co.za> Message-ID: <1298502629.27.0.739034738841.issue11304@psf.upfronthosting.co.za> SilentGhost added the comment: Sandro, you didn't attach anything. ---------- nosy: +SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 24 00:57:51 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 23 Feb 2011 23:57:51 +0000 Subject: [docs] [issue11304] Input/output tutorial - PI is rounded not truncated In-Reply-To: <1298501891.64.0.374042391138.issue11304@psf.upfronthosting.co.za> Message-ID: <1298505471.15.0.779672813908.issue11304@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 24 01:08:39 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Feb 2011 00:08:39 +0000 Subject: [docs] [issue11304] Input/output tutorial - PI is rounded not truncated In-Reply-To: <1298501891.64.0.374042391138.issue11304@psf.upfronthosting.co.za> Message-ID: <1298506119.59.0.143387191301.issue11304@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed in r88356, r88537, and r88538. Thanks for the report. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 24 01:18:03 2011 From: report at bugs.python.org (SilentGhost) Date: Thu, 24 Feb 2011 00:18:03 +0000 Subject: [docs] [issue11304] Input/output tutorial - PI is rounded not truncated In-Reply-To: <1298501891.64.0.374042391138.issue11304@psf.upfronthosting.co.za> Message-ID: <1298506683.25.0.210181094795.issue11304@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- Removed message: http://bugs.python.org/msg129230 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 24 01:18:30 2011 From: report at bugs.python.org (SilentGhost) Date: Thu, 24 Feb 2011 00:18:30 +0000 Subject: [docs] [issue11304] Input/output tutorial - PI is rounded not truncated In-Reply-To: <1298501891.64.0.374042391138.issue11304@psf.upfronthosting.co.za> Message-ID: <1298506710.74.0.588395368224.issue11304@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: -SilentGhost _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 24 03:45:04 2011 From: report at bugs.python.org (R. David Murray) Date: Thu, 24 Feb 2011 02:45:04 +0000 Subject: [docs] [issue11305] TextIOWrapper.readline and str.splitlines have different behavior In-Reply-To: <1298513992.9.0.559771255242.issue11305@psf.upfronthosting.co.za> Message-ID: <1298515504.28.0.984800250555.issue11305@psf.upfronthosting.co.za> R. David Murray added the comment: "newline controls how universal newlines works (it only applies to text mode). It can be None, '', '\n', '\r', and '\r\n'..." Whereas splitlines says: "Return a list of the lines in the string, breaking at line boundaries." So if we are fixing docs, we need to add that "line boundaries" are based on the relevant unicode properties (see issue 7643). And, indeed, Antoine has already pronounced on this in issue 6664. Since this has come up more than once, adding a note that they are not recognized by design in the io module to the io docs might be a good idea. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, pitrou stage: -> needs patch type: -> behavior versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 24 12:16:53 2011 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 24 Feb 2011 11:16:53 +0000 Subject: [docs] [issue11296] Possible error in What's new in Python 3.2 : duplication of rsplit() mention In-Reply-To: <1298423429.64.0.239185638784.issue11296@psf.upfronthosting.co.za> Message-ID: <1298546213.65.0.20201449916.issue11296@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Okay fixed. The rsplit() method was mentioned in both underlying tracker issues, so it got mentioned twice when once would have been enough :-) ---------- assignee: docs at python -> rhettinger nosy: +rhettinger priority: normal -> low resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 24 17:48:53 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 24 Feb 2011 16:48:53 +0000 Subject: [docs] [issue11234] Error in What's new 3.2rc3 with sysconfig.get_config_var('SO') In-Reply-To: <1297970555.01.0.618977465642.issue11234@psf.upfronthosting.co.za> Message-ID: <1298566133.87.0.393395227526.issue11234@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 24 19:28:59 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 24 Feb 2011 18:28:59 +0000 Subject: [docs] [issue11310] Document byte[s|array]() and byte[s|array](count) in docstrings In-Reply-To: <1298572139.69.0.327669775377.issue11310@psf.upfronthosting.co.za> Message-ID: <1298572139.69.0.327669775377.issue11310@psf.upfronthosting.co.za> New submission from Terry J. Reedy : The entry for bytearray(source...) says " The optional source parameter can be used to initialize the array in a few different ways: ... If it is an integer, the array will have that size and will be initialized with null bytes. ... Without an argument, an array of size 0 is created. " [integer must be non-negative -- patch adds this] The entry for bytes(source...) refers back to the bytearray entry. The docstrings for bytes and bytearray omit both possibilities. Attached is a possible patch to include them. ---------- assignee: docs at python components: Documentation files: zbytes.diff keywords: patch messages: 129299 nosy: docs at python, terry.reedy priority: normal severity: normal status: open title: Document byte[s|array]() and byte[s|array](count) in docstrings versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20877/zbytes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 24 22:41:48 2011 From: report at bugs.python.org (=?utf-8?q?Ville_Skytt=C3=A4?=) Date: Thu, 24 Feb 2011 21:41:48 +0000 Subject: [docs] [issue11312] Confusing sentence in file.readline() doc In-Reply-To: <1298583708.57.0.612051612173.issue11312@psf.upfronthosting.co.za> Message-ID: <1298583708.57.0.612051612173.issue11312@psf.upfronthosting.co.za> New submission from Ville Skytt? : http://docs.python.org/library/stdtypes.html#file.readline "An empty string is returned only when EOF is encountered immediately." I think this sentence is misleading especially because the word "only" in it is emphasized, because an empty string is also returned when the size argument is 0 (except for StringIO but I think that's a bug, see #11311). I suggest rephrasing it as: "An empty string is returned only when EOF is encountered immediately or the size argument is zero." ...or just removing the sentence altogether. Text before it already covers the size=0 case. ---------- assignee: docs at python components: Documentation messages: 129316 nosy: docs at python, scop priority: normal severity: normal status: open title: Confusing sentence in file.readline() doc versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Thu Feb 24 23:47:49 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Thu, 24 Feb 2011 22:47:49 +0000 Subject: [docs] confusing statement in python docs In-Reply-To: <7BF6C7C7-6EC5-40E0-A42C-B88723B9C277@behrsin.com> References: <7BF6C7C7-6EC5-40E0-A42C-B88723B9C277@behrsin.com> Message-ID: Hi Tim, thanks for your email. On Tue, Feb 22, 2011 at 18:05, Tim Behrsin wrote: > In section 9.3.4 it states that the following snippet: > > xf = x.f > while True: > ? ? ? ?print xf() > > will print "hello world" until 'the end of time'. > > I find this statement to be rather confusing.... I think you find it confusing since you're not reporting also the paragraph above the code snippet: "In the MyClass example, this will return the string 'hello world'. However, it is not necessary to call a method right away: x.f is a method object, and can be stored away and called at a later time. For example:" that means.. the code snippet is a continuation of the MyClass example given above, so just taken outside its context it doesn't make any sense, but putting it back inside the page (that's actually a tutorial, so something we can expect to be followed from the first line to the last one, without too much jumping around) it gains the needed details. 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 Feb 25 08:36:34 2011 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 25 Feb 2011 07:36:34 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1298619394.22.0.176823122667.issue11015@psf.upfronthosting.co.za> Eli Bendersky added the comment: Following the python-dev discussion, attaching a patch for removing fcmp and replacing its uses with assertAlmostEqual when needed. All tests pass and patchcheck is clean. Please review before I commit. ---------- nosy: +terry.reedy Added file: http://bugs.python.org/file20884/issue11015.py3k.remove_fcmp.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 09:08:40 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 25 Feb 2011 08:08:40 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1298621320.41.0.351652990717.issue11015@psf.upfronthosting.co.za> Georg Brandl added the comment: The divmod() part of the patch is wrong: assertAlmostEqual does not support tuple arguments. The test succeeds because it first does an exact equality check, which apparently is true on your platform. But if it wasn't, you'd get TypeErrors. Also, fcmp() has a different definition of what "almost equal" means, but I assume this has been regarded in the discussion. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From jehod at vestas.com Wed Feb 23 09:54:43 2011 From: jehod at vestas.com (Jens Hvelplund Odborg) Date: Wed, 23 Feb 2011 09:54:43 +0100 Subject: [docs] list of depricate function on http://docs.python.org/library/string.html In-Reply-To: References: <592EE73350A70C43AE0ED25314DBA3BD9AC84A0E46@DKRDSEXC014.vestas.net> Message-ID: <592EE73350A70C43AE0ED25314DBA3BD9DA7399579@DKRDSEXC014.vestas.net> Hi Sandro I am not really the one to ask what to do about this since I fall in to the category "new commers to Python" however I took a second glanze at this page and the section start with "The following list of functions are also defined as methods of string and Unicode objects; ..." so it seems like "string.capitalize(word)" should be replaced with "word.capitalize()" where word in both cases are of type str Yours sincerely, Jens Hvelplund Odborg Consultant Generic Systems Technology R&D jehod at vestas.com http://www.vestas.com Company reg. name: Vestas This e-mail is subject to our e-mail disclaimer statement. Please refer to www.vestas.com/legal/notice If you have received this e-mail in error please contact the sender. -----Original Message----- From: matrixhasu at gmail.com [mailto:matrixhasu at gmail.com] On Behalf Of Sandro Tosi Sent: 23. februar 2011 00:29 To: Jens Hvelplund Odborg Cc: docs at python.org Subject: Re: [docs] list of depricate function on http://docs.python.org/library/string.html Hi Jens, thanks for your email. On Wed, Feb 2, 2011 at 13:17, Jens Hvelplund Odborg wrote: > Hi > > On the http://docs.python.org/library/string.html the section 7.1.6 is some > what confusing in that some function is marked explicit whith a red box and > a replacemen while other are not > futher more many of those not marked with a red box are quite commonly used > in other languages so a replacement would be nice for new commers to Python I traced back the red boxes to this[1] commit. [1] http://svn.python.org/view?view=revision&revision=17867 I actually don't know what to do exactly here: those functions are deprecated from string module but they are still available in string/unicode objects, so I'm inclined to leave things as they are, unless you can show us a strong opinion on that along with a detailed plan of how you'd like to see the doc to be change in this regards. Cheers, PS: resent to both recipients. -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From pierre.quentel at gmail.com Fri Feb 25 09:28:11 2011 From: pierre.quentel at gmail.com (Pierre Quentel) Date: Fri, 25 Feb 2011 09:28:11 +0100 Subject: [docs] Bug in the cgi module documentation Message-ID: Hi, I post this message again : the documentation of the cgi module is not in line with the changes introduced in version 3.2 Best regards, Pierre 2011/1/23 Pierre Quentel > Hi, > > I wrote a patch for the cgi module in version 3.2rc1. Small changes should > be done to the documentation of this module to reflect the changes in the > module API : > > - in section "20.2.2. Using the cgi module" > > original text : > "If a field represents an uploaded file, accessing the value via the value > attribute or the getvalue() method reads the entire file in memory as a > string. This may not be what you want. You can test for an uploaded file by > testing either the filename attribute or the file attribute. You can then > read the data at leisure from the file attribute:" > > proposed new text (for files, value is bytes, not string, and the read() > method on file also returns bytes) : > "If a field represents an uploaded file, accessing the value via the value > attribute or the getvalue() method reads the entire file in memory as bytes. > This may not be what you want. You can test for an uploaded file by testing > either the filename attribute or the file attribute. You can then read the > data at leisure from the file attribute (the read() and readline() methods > will return bytes) :" > > - version 3.2 introduced a parameter "encoding" for the FieldStorage > constructor, used to decode the bytes received on the HTTP connection for > fields other than files. This encoding must the one defined in the HTML > document holding the form submitted to the CGI script ; it is usually > defined by a meta tag : > > or by the Content-Type header for this document > > I'm not sure where this should be mentioned in the documentation. Maybe in > "20.2.9. Common problems and solutions" for the moment. But there are plans > to introduce another interface to change the encoding of sys.stdout in the > CGI script itself, so another option would be to open a specific section > about encodings > > Hope it's clear enough > Pierre > -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Fri Feb 25 10:30:01 2011 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 25 Feb 2011 09:30:01 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1298626201.02.0.0537082771643.issue11015@psf.upfronthosting.co.za> Eli Bendersky added the comment: Georg, Good catch on the tuples in assertAlmostEqual, thanks! I see three methods of resolution: 1. Since the floats in this case are powers of 1/2, they could be tested for exact equality, or do you figure there are platforms where this is not guaranteed? 2. I can make a local change in the test to assertAlmostEqual on each member of the tuple 3. assertAlmostEqual on tuples can be added to the unittest module Any ideas? I can also commit (2) for the time being since it's the least dubious, and leave the resolution on 1 & 3 for later (and/or in separate issues). Regarding fcmp being not exactly assertAlmostEqual - it was discussed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 10:36:53 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 25 Feb 2011 09:36:53 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1298626613.72.0.825083812537.issue11015@psf.upfronthosting.co.za> Georg Brandl added the comment: (2) would be my choice. (1) *should* be true, but this is a change in the test semantics. (3) would be feature creep and I don't think it's a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 10:48:54 2011 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 25 Feb 2011 09:48:54 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1298627334.08.0.292194098351.issue11015@psf.upfronthosting.co.za> Eli Bendersky added the comment: Attaching a revised patch with (2) implemented. ---------- Added file: http://bugs.python.org/file20885/issue11015.py3k.remove_fcmp.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 10:57:02 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 25 Feb 2011 09:57:02 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1296009969.38.0.282241852849.issue11015@psf.upfronthosting.co.za> Message-ID: <1298627822.58.0.957412344243.issue11015@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, that looks good now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 11:15:44 2011 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 25 Feb 2011 10:15:44 +0000 Subject: [docs] [issue11015] Bring test.support docs up to date In-Reply-To: <1298627822.58.0.957412344243.issue11015@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: > Georg Brandl added the comment: > > Yes, that looks good now. > Thanks. fcmp & FUZZ removal committed in revision 88558 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 12:14:02 2011 From: report at bugs.python.org (Laurence Rowe) Date: Fri, 25 Feb 2011 11:14:02 +0000 Subject: [docs] [issue11317] Documentation not updated to show string exceptions have been deprecated In-Reply-To: <1298632442.51.0.260664855458.issue11317@psf.upfronthosting.co.za> Message-ID: <1298632442.51.0.260664855458.issue11317@psf.upfronthosting.co.za> New submission from Laurence Rowe : The documentation at http://docs.python.org/c-api/exceptions.html#deprecation-of-string-exceptions states that "String exceptions are still supported in the interpreter to allow existing code to run unmodified, but this will also change in a future release." String exceptions were removed in 2.6. ---------- assignee: docs at python components: Documentation messages: 129353 nosy: docs at python, lrowe priority: normal severity: normal status: open title: Documentation not updated to show string exceptions have been deprecated versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 12:20:29 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 25 Feb 2011 11:20:29 +0000 Subject: [docs] [issue11317] Documentation not updated to show string exceptions have been deprecated In-Reply-To: <1298632442.51.0.260664855458.issue11317@psf.upfronthosting.co.za> Message-ID: <1298632829.37.0.677375027595.issue11317@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r88571. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 13:25:15 2011 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 25 Feb 2011 12:25:15 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> New submission from Bo?tjan Mejak : I have found a possible typo in an example code of Python 3.2. It's located on page 32 in the PDF version of the FAQ document. The code is: class C: count = 0 # number of times C.__init__ called def __init__(self): C.count = C.count + 1 def getcount(self): return C.count # or return self.count The code block of the __init__ method is the thing that has the typo. Shouldn't C.count = C.count + 1 be c.count = C.count + 1 ? Because the text after this code example says: c.count also refers to C.count for any c such that isinstance(c, C) holds /.../. How can c.count also refer to C.count if there is no c.count in the present code example in the FAQ of Python 3.2? If this is a typo, please fix it for Python 3.2 and also for other Python versions with the same typo. Else if this is not a typo, explain how can c.count refer to C.count if there is no c.count in the code example. ---------- assignee: docs at python components: Documentation messages: 129357 nosy: Retro, docs at python priority: normal severity: normal status: open title: Python 3.2 FAQ example code typo? versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 14:23:29 2011 From: report at bugs.python.org (R. David Murray) Date: Fri, 25 Feb 2011 13:23:29 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298640208.93.0.850735850736.issue11318@psf.upfronthosting.co.za> R. David Murray added the comment: Read a little further: Caution: within a method of C, an assignment like ``self.count = 42`` creates a new and unrelated instance named "count" in ``self``'s own dict. That is, c.count refers to C.count right up until the point where c.count is assigned a value. So, c.count = c.count + 1 will add one to the current value of C.count, and assign it to the *instance* variable c.count. c.count at that point no longer refers to the *class* variable C.count. Thus your change to the __init__ function would completely defeat the purpose of the example (which is to show how to use a *class* variable. If you can suggest a concise wording that would have made this clearer to you, we can consider a doc patch. ---------- nosy: +r.david.murray type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 14:27:40 2011 From: report at bugs.python.org (R. David Murray) Date: Fri, 25 Feb 2011 13:27:40 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298640460.0.0.502426791959.issue11318@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. Rereading your message, is seems like you just didn't understand the statement "c.count refers to C.count for any...". That is a statement about how the language behaves. If there is not yet an instance variable 'count', but a class variable 'count' exists, then the value of the class variable is used when c.count is evaluated. A class is a two level nested name space with a couple of special properties. I don't really see any way to make that statement clearer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 14:57:40 2011 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 25 Feb 2011 13:57:40 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298640460.0.0.502426791959.issue11318@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: > > Caution: within a method of C, an assignment like ``self.count = 42`` > creates a new and unrelated instance named "count" in ``self``'s own dict. More clear is to say *Caution: within a method of class C, an assignment like ``self.count = 42`` creates a new and unrelated instance named "count" in ``self``'s own dict.* * * ---------- Added file: http://bugs.python.org/file20888/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
Caution: within a method of C, an assignment like ``self.count = 42`` creates a new and unrelated instance named "count" in ``self``'s own dict.

More clear is to say Caution: within a method of class C, an assignment like ``self.count = 42`` creates a new and unrelated instance named "count" in ``self``'s own dict.

From report at bugs.python.org Fri Feb 25 15:24:34 2011 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 25 Feb 2011 14:24:34 +0000 Subject: [docs] [issue11253] autodocument first appearance of ctypes.wintypes constants In-Reply-To: <1298182426.14.0.687578094658.issue11253@psf.upfronthosting.co.za> Message-ID: <1298643874.75.0.741568182299.issue11253@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Can you provide a patch, or show how to do it concretely? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 15:56:12 2011 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 25 Feb 2011 14:56:12 +0000 Subject: [docs] [issue11232] asyncore - don't throw a traceback when a client disconnects in echo server example In-Reply-To: <1297966962.24.0.99288850645.issue11232@psf.upfronthosting.co.za> Message-ID: <1298645772.76.0.216003717708.issue11232@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 16:16:56 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 25 Feb 2011 15:16:56 +0000 Subject: [docs] [issue11232] asyncore - don't throw a traceback when a client disconnects in echo server example In-Reply-To: <1297966962.24.0.99288850645.issue11232@psf.upfronthosting.co.za> Message-ID: <1298647016.66.0.471829766565.issue11232@psf.upfronthosting.co.za> Georg Brandl added the comment: Please add the revision number when fixing. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 17:54:30 2011 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 25 Feb 2011 16:54:30 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: Message-ID: Bo??tjan Mejak added the comment: So you're saying that if a class' name is C, then c.count is the same as C.count? I thought Python is case-sensitive. You know: c (small letter c) is not equal to C (big letter C) in Python. I don't understand what you mean by c.count because my intepreter always throws an exception that c is not defined if I feed it with this code example and do >>> c.count ---------- Added file: http://bugs.python.org/file20890/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- So you're saying that if a class' name is C, then c.count is the same as C.count? I thought Python is case-sensitive. You know: c (small letter c) is not equal to C (big letter C) in Python. I don't understand what you mean by c.count because my intepreter always throws an exception that c is not defined if I feed it with this code example and do ?? >>> c.count From report at bugs.python.org Fri Feb 25 18:06:21 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 25 Feb 2011 17:06:21 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298653581.7.0.559370481093.issue11318@psf.upfronthosting.co.za> Georg Brandl added the comment: Now it's clear that David is right -- what "c" refers to is defined in this very sentence. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 18:24:00 2011 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 25 Feb 2011 17:24:00 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298653581.7.0.559370481093.issue11318@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: I don't understand it. My bad. Please explain to me exactly what "c" refers to. ---------- Added file: http://bugs.python.org/file20891/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- I don't understand it. My bad. Please explain to me exactly what "c" refers to. From report at bugs.python.org Fri Feb 25 18:25:58 2011 From: report at bugs.python.org (R. David Murray) Date: Fri, 25 Feb 2011 17:25:58 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298654757.99.0.698293539874.issue11318@psf.upfronthosting.co.za> R. David Murray added the comment: Please consult the python tutor's list, the bug tracker is not the place to get introductory help with Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 20:27:31 2011 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 25 Feb 2011 19:27:31 +0000 Subject: [docs] [issue11232] asyncore - don't throw a traceback when a client disconnects in echo server example In-Reply-To: <1297966962.24.0.99288850645.issue11232@psf.upfronthosting.co.za> Message-ID: <1298662051.71.0.0721924950523.issue11232@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Sorry: fixed in r88581. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 20:47:41 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Feb 2011 19:47:41 +0000 Subject: [docs] [issue11283] incorrect pattern in the re module docs for conditional regex In-Reply-To: <1298364500.67.0.815268640848.issue11283@psf.upfronthosting.co.za> Message-ID: <1298663261.85.0.408308250566.issue11283@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +pitrou stage: -> patch review versions: -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 20:57:52 2011 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 25 Feb 2011 19:57:52 +0000 Subject: [docs] [issue11282] 3.3 unittest document not kept consist with code In-Reply-To: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> Message-ID: <1298663872.36.0.741658838148.issue11282@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Georg, what is policy on removed features? Remove doc or leave and state removed? "Deprecated in version 3.2 and removed in 3.3." or just "Removed in version 3.3" (Once removed, does it really matter when deprecated?) If left, should they be moved to separate section, especially when multiple? It could be a bit annoying for newcomers starting with 3.3 to read and struggle to understand and then read that they just wasted their time. There enough things already to learn and remember. ---------- nosy: +georg.brandl, terry.reedy stage: -> needs patch title: unittest document not keep consist with code -> 3.3 unittest document not kept consist with code _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 21:03:09 2011 From: report at bugs.python.org (Michael Foord) Date: Fri, 25 Feb 2011 20:03:09 +0000 Subject: [docs] [issue11282] 3.3 unittest document not kept consist with code In-Reply-To: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> Message-ID: <1298664189.14.0.101399203602.issue11282@psf.upfronthosting.co.za> Michael Foord added the comment: Actually I think these methods are going back in and staying deprecated, so hold off for a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 21:04:03 2011 From: report at bugs.python.org (Michael Foord) Date: Fri, 25 Feb 2011 20:04:03 +0000 Subject: [docs] [issue11282] 3.3 unittest document not kept consist with code In-Reply-To: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> Message-ID: <1298664243.3.0.137103765776.issue11282@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- assignee: docs at python -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 21:08:00 2011 From: report at bugs.python.org (Georg Brandl) Date: Fri, 25 Feb 2011 20:08:00 +0000 Subject: [docs] [issue11282] 3.3 unittest document not kept consist with code In-Reply-To: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> Message-ID: <1298664480.51.0.77124524874.issue11282@psf.upfronthosting.co.za> Georg Brandl added the comment: Removed things are also removed from the doc. I just committed as much as was necessary to stop buildbot breakage, and notified Michael to take care of the rest (which he did, by explaining I removed the wrong thing :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 21:13:15 2011 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 25 Feb 2011 20:13:15 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298654757.99.0.698293539874.issue11318@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: How awful! A little pointer to the tutorial where this is explained would be also quite smashing. ---------- Added file: http://bugs.python.org/file20893/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- How awful! A little pointer to the tutorial where this is explained would be also quite smashing. From report at bugs.python.org Fri Feb 25 21:50:15 2011 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 25 Feb 2011 20:50:15 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: Message-ID: Bo??tjan Mejak added the comment: "c.count also refers to C.count" Where in the code is "c.count"? Please explain this for the sake of really closing this issue. ---------- Added file: http://bugs.python.org/file20896/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- "c.count also refers to C.count" ??Where in the code is "c.count"? Please explain this for the sake of really closing this issue. From report at bugs.python.org Fri Feb 25 22:53:03 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Feb 2011 21:53:03 +0000 Subject: [docs] [issue11293] Distutils - read the file when using it in long_description In-Reply-To: <1298408262.52.0.851871312997.issue11293@psf.upfronthosting.co.za> Message-ID: <1298670783.21.0.999618586411.issue11293@psf.upfronthosting.co.za> ?ric Araujo added the comment: I had a better patch pending for that, thanks for the reminder. Fixed in r88613 (py3k), r88614 (3.2), r88615 (3.1) and r88617 (2.7). I took the time machine and fixed it six months ago in distutils2 in [c03dd6283e94]. ---------- assignee: docs at python -> eric.araujo nosy: +eric.araujo resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 23:00:01 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Feb 2011 22:00:01 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298671201.33.0.127297511733.issue11298@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m not sure what?s best between the proposed addition and a link to the definition of module/importable. I think that programmers should know that not all file names are valid module names, so I wouldn?t want us to copy the definition all over the docs. Thoughts? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 23:15:31 2011 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 25 Feb 2011 22:15:31 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298672131.58.0.548882693596.issue11298@psf.upfronthosting.co.za> Ezio Melotti added the comment: What about something like """ In order to be compatible with test discovery, all the test modules must be importable from the top level directory of the project (in other words, they must be part of the project :ref:`package `, and their name must be valid :ref:`identifiers `). """ ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 23:51:30 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Feb 2011 22:51:30 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298674290.18.0.490095324172.issue11318@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file20888/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 23:51:32 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Feb 2011 22:51:32 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298674292.92.0.80822947668.issue11318@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file20890/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 23:51:38 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Feb 2011 22:51:38 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298674298.3.0.754562630384.issue11318@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file20891/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 23:51:40 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Feb 2011 22:51:40 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298674300.57.0.760532064993.issue11318@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file20893/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 23:51:42 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Feb 2011 22:51:42 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298674302.86.0.639619091086.issue11318@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file20896/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 23:53:18 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Feb 2011 22:53:18 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298674398.58.0.375533475235.issue11318@psf.upfronthosting.co.za> ?ric Araujo added the comment: If the tutorial is not clear enough, try for example . Please ask on a suitable venue if you don?t understand instead of this tracker. (Please don?t send HTML email to this tracker, it creates false attachments.) ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 25 23:55:46 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Feb 2011 22:55:46 +0000 Subject: [docs] [issue11253] autodocument first appearance of ctypes.wintypes constants In-Reply-To: <1298182426.14.0.687578094658.issue11253@psf.upfronthosting.co.za> Message-ID: <1298674546.03.0.082352278386.issue11253@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 00:13:51 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 25 Feb 2011 23:13:51 +0000 Subject: [docs] [issue11260] smtpd-as-a-script feature should be documented and should use argparse In-Reply-To: <1298232231.08.0.088023732748.issue11260@psf.upfronthosting.co.za> Message-ID: <1298675631.81.0.638688523505.issue11260@psf.upfronthosting.co.za> ?ric Araujo added the comment: Meta-bugs are useful for bookkeeping purposes like the implementation of a PEP or a broad feature like ?bytes/text model in email? . Just open one report for each module you want to add doc for. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 00:42:58 2011 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 25 Feb 2011 23:42:58 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298677378.58.0.246555506386.issue11318@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: Eric, the thing I don't understand is why is there that "c.count" thing. How is it possible for "c.count" to be the same reference as "C.count"? Where is "c" defined? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 00:55:51 2011 From: report at bugs.python.org (wesley chun) Date: Fri, 25 Feb 2011 23:55:51 +0000 Subject: [docs] [issue11283] incorrect pattern in the re module docs for conditional regex In-Reply-To: <1298663261.85.0.408308250566.issue11283@psf.upfronthosting.co.za> Message-ID: wesley chun added the comment: i wanted to add one additional comment that it would be nice to have a regex that works with search() (in addition to match()) because such an email address may appear in the middle of a line, say a From: or To: email header. the fix of using a '$' prevents this from happening, so i'm not 100% satisfied with the patch although it does fix the regex to get it working with match(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 02:28:56 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 26 Feb 2011 01:28:56 +0000 Subject: [docs] [issue11318] Python 3.2 FAQ example code typo? In-Reply-To: <1298636715.79.0.945833742805.issue11318@psf.upfronthosting.co.za> Message-ID: <1298683736.1.0.728046989161.issue11318@psf.upfronthosting.co.za> ?ric Araujo added the comment: What this part means is: ?If you create an instance of C named c, and get c.count, it will get the attribute count defined on C.? IOW: You can get a class variable from any instance. In the example, the code in __init__ cannot assign to self.count, because it wants to increment the attribute on the class, not on the instance. This is very well explained in Dive Into Python. Please experiment in a shell and ask on appropriate venues after this message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 02:30:36 2011 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 26 Feb 2011 01:30:36 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298683836.22.0.0535273662759.issue11298@psf.upfronthosting.co.za> ?ric Araujo added the comment: I like that. Is it true that test discovery requires tests to be in a Python package, as opposed to top-level modules? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 11:01:54 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Feb 2011 10:01:54 +0000 Subject: [docs] [issue11329] PyEval_InitThreads() not safe before Py_Initialize() In-Reply-To: <1298713807.05.0.622715753988.issue11329@psf.upfronthosting.co.za> Message-ID: <1298714514.34.0.192806357972.issue11329@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Given the way the new GIL works, I'm afraid it's not really possible to support this (it needs some thread-state to be available). Note that there is no reason, AFAIK, why you would want to call PyEval_InitThreads() before Py_Initialize(). ---------- assignee: -> docs at python components: +Documentation nosy: +amaury.forgeotdarc, docs at python, pitrou type: crash -> behavior versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 11:52:27 2011 From: report at bugs.python.org (akira) Date: Sat, 26 Feb 2011 10:52:27 +0000 Subject: [docs] [issue11330] logging doesn't support format flags for asctime keyword, but the docs use them In-Reply-To: <1298717547.6.0.165595547047.issue11330@psf.upfronthosting.co.za> Message-ID: <1298717547.6.0.165595547047.issue11330@psf.upfronthosting.co.za> New submission from akira <4kir4.1i at gmail.com>: Since Python 3.2 logging package doesn't support formatting flags for the `asctime` keyword, but the documentation uses them. For example in Doc/library/logging.rst: FORMAT = '%(asctime)-15s %(clientip)s %(user)-8s %(message)s' should be replaced by: FORMAT = '%(asctime)s %(clientip)s %(user)-8s %(message)s' The attached file 'doc-logging-asctime-r88640.patch' contains necessary changes. An alternative solution would be to fix the logging package to restore the support. ---------- assignee: docs at python components: Documentation files: doc-logging-asctime-r88640.patch keywords: patch messages: 129524 nosy: akira, docs at python priority: normal severity: normal status: open title: logging doesn't support format flags for asctime keyword, but the docs use them type: behavior versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20906/doc-logging-asctime-r88640.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 11:54:14 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Feb 2011 10:54:14 +0000 Subject: [docs] [issue11330] logging doesn't support format flags for asctime keyword, but the docs use them In-Reply-To: <1298717547.6.0.165595547047.issue11330@psf.upfronthosting.co.za> Message-ID: <1298717654.23.0.0705294355992.issue11330@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: docs at python -> vinay.sajip nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 12:06:15 2011 From: report at bugs.python.org (akira) Date: Sat, 26 Feb 2011 11:06:15 +0000 Subject: [docs] [issue11331] unused line in the logging-cookbook example In-Reply-To: <1298718374.95.0.797465744013.issue11331@psf.upfronthosting.co.za> Message-ID: <1298718374.95.0.797465744013.issue11331@psf.upfronthosting.co.za> New submission from akira <4kir4.1i at gmail.com>: The line with `LoggerAdapter` is not used in http://docs.python.org/dev/howto/logging-cookbook.html#using-filters-to-impart-contextual-information Here's a patch for Doc/howto/logging-cookbook.rst: doc-logging-cookbook-unused-line-r88640.patch ---------- assignee: docs at python components: Documentation files: doc-logging-cookbook-unused-line-r88640.patch keywords: patch messages: 129527 nosy: akira, docs at python priority: normal severity: normal status: open title: unused line in the logging-cookbook example versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file20907/doc-logging-cookbook-unused-line-r88640.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 12:16:11 2011 From: report at bugs.python.org (SilentGhost) Date: Sat, 26 Feb 2011 11:16:11 +0000 Subject: [docs] [issue11331] unused line in the logging-cookbook example In-Reply-To: <1298718374.95.0.797465744013.issue11331@psf.upfronthosting.co.za> Message-ID: <1298718971.11.0.175192116046.issue11331@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- assignee: docs at python -> vinay.sajip nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 14:04:15 2011 From: report at bugs.python.org (Michael Foord) Date: Sat, 26 Feb 2011 13:04:15 +0000 Subject: [docs] [issue11298] unittest discovery needs better explanation In-Reply-To: <1298461373.56.0.0867432714067.issue11298@psf.upfronthosting.co.za> Message-ID: <1298725455.78.0.483904637562.issue11298@psf.upfronthosting.co.za> Michael Foord added the comment: No, tests as top level modules work fine too. Importability is the only requirement. (Projects themselves are not typically packages but contain packages - so the wording needs to change slightly but I like the rest.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 15:18:29 2011 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 26 Feb 2011 14:18:29 +0000 Subject: [docs] [issue11330] logging doesn't support format flags for asctime keyword, but the docs use them In-Reply-To: <1298717547.6.0.165595547047.issue11330@psf.upfronthosting.co.za> Message-ID: <1298729909.12.0.991162883756.issue11330@psf.upfronthosting.co.za> Vinay Sajip added the comment: Fix checked into py3k and release32-maint (r88644). Support was reinstated - the docs weren't changed. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 15:25:56 2011 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 26 Feb 2011 14:25:56 +0000 Subject: [docs] [issue11331] unused line in the logging-cookbook example In-Reply-To: <1298718374.95.0.797465744013.issue11331@psf.upfronthosting.co.za> Message-ID: <1298730356.74.0.876437903257.issue11331@psf.upfronthosting.co.za> Vinay Sajip added the comment: Fix checked into py3k and release32-maint (r88645), thanks. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 19:35:16 2011 From: report at bugs.python.org (blokeley) Date: Sat, 26 Feb 2011 18:35:16 +0000 Subject: [docs] [issue11336] Typo in patch.rst In-Reply-To: <1298745316.5.0.407434560155.issue11336@psf.upfronthosting.co.za> Message-ID: <1298745316.5.0.407434560155.issue11336@psf.upfronthosting.co.za> New submission from blokeley : I think that a typographical error was made in patch.rst. Should "(do not that not all checks apply to non-core developers)" read "(note that not all checks apply to non-core developers)"? Patch attached. ---------- assignee: docs at python components: Documentation files: grammar_fix.patch keywords: patch messages: 129583 nosy: blokeley, docs at python priority: normal severity: normal status: open title: Typo in patch.rst type: behavior Added file: http://bugs.python.org/file20921/grammar_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 19:37:39 2011 From: report at bugs.python.org (Mitchell Model) Date: Sat, 26 Feb 2011 18:37:39 +0000 Subject: [docs] [issue11337] Nothing refers to footnote [1] on page "6. Simple Statements" in Language Reference In-Reply-To: <1298745459.54.0.732710965592.issue11337@psf.upfronthosting.co.za> Message-ID: <1298745459.54.0.732710965592.issue11337@psf.upfronthosting.co.za> New submission from Mitchell Model : I can't find a reference to footnote [1] on page "6. Simple Statements" in Language Reference. Either the footnote should be removed or a [1] link to it should appear on the page. ---------- assignee: docs at python components: Documentation messages: 129584 nosy: MLModel, docs at python priority: normal severity: normal status: open title: Nothing refers to footnote [1] on page "6. Simple Statements" in Language Reference versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 20:13:47 2011 From: report at bugs.python.org (blokeley) Date: Sat, 26 Feb 2011 19:13:47 +0000 Subject: [docs] [issue11338] No list of Python hg repositories In-Reply-To: <1298747627.22.0.769234647511.issue11338@psf.upfronthosting.co.za> Message-ID: <1298747627.22.0.769234647511.issue11338@psf.upfronthosting.co.za> New submission from blokeley : Recently, I've logged a few issues on http://bugs.python.org/ and tried to submit patches where possible. However, I have not been able to find any documentation that states where the hg repositories are. There are some under http://hg.python.org/ and some under http://code.python.org/hg Please could the documentation somewhere list the official repos and what they are used for. I have attached a patch to the devguide repo which probably has: * The wrong list of repos (I still don't know what the correct list is); and * The list in the wrong part of the documentation. Nevertheless, I hope this helps. ---------- assignee: docs at python components: Documentation files: repo_locations.patch keywords: patch messages: 129585 nosy: blokeley, docs at python priority: normal severity: normal status: open title: No list of Python hg repositories type: behavior Added file: http://bugs.python.org/file20922/repo_locations.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 20:35:14 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 26 Feb 2011 19:35:14 +0000 Subject: [docs] [issue11338] No list of Python hg repositories In-Reply-To: <1298747627.22.0.769234647511.issue11338@psf.upfronthosting.co.za> Message-ID: <1298748914.07.0.509755119079.issue11338@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you for the suggestion. We are actually starting our official transition to hg, which makes things a bit unstable. The final URL (http://hg.python.org/cpython/) is currently a test repo, while the "usable for work right now" (http://code.python.org/hg/) repositories are temporary mirrors which will get dismantled once the transition is over. Meaning we probably want to adapt your patch a bit, once the dust settles ;) ---------- nosy: +brett.cannon, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 21:32:08 2011 From: report at bugs.python.org (Brett Cannon) Date: Sat, 26 Feb 2011 20:32:08 +0000 Subject: [docs] [issue11336] Typo in patch.rst In-Reply-To: <1298745316.5.0.407434560155.issue11336@psf.upfronthosting.co.za> Message-ID: <1298752328.61.0.592783707898.issue11336@psf.upfronthosting.co.za> Brett Cannon added the comment: Thanks for the patch, but the wording was completely changed a little while ago so the error has been dealt with. ---------- nosy: +brett.cannon resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 26 21:51:02 2011 From: report at bugs.python.org (blokeley) Date: Sat, 26 Feb 2011 20:51:02 +0000 Subject: [docs] [issue11336] Typo in patch.rst In-Reply-To: <1298745316.5.0.407434560155.issue11336@psf.upfronthosting.co.za> Message-ID: <1298753462.24.0.634359564849.issue11336@psf.upfronthosting.co.za> blokeley added the comment: I updated to the tip of http://hg.python.org/devguide on the hg_transition branch. If this isn't the latest dev guide, what is? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 27 07:28:39 2011 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 27 Feb 2011 06:28:39 +0000 Subject: [docs] [issue11338] No list of Python hg repositories In-Reply-To: <1298747627.22.0.769234647511.issue11338@psf.upfronthosting.co.za> Message-ID: <1298788119.23.0.215855447089.issue11338@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Just for the record: at the moment, Python's source code isn't maintained in Mercurial at all, but in subversion. Therefore, there are no official repos - it's no surprise you didn't find any documentation what they were. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 27 15:35:07 2011 From: report at bugs.python.org (STINNER Victor) Date: Sun, 27 Feb 2011 14:35:07 +0000 Subject: [docs] [issue11329] PyEval_InitThreads() not safe before Py_Initialize() In-Reply-To: <1298713807.05.0.622715753988.issue11329@psf.upfronthosting.co.za> Message-ID: <1298817307.92.0.406186532336.issue11329@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 27 15:35:21 2011 From: report at bugs.python.org (STINNER Victor) Date: Sun, 27 Feb 2011 14:35:21 +0000 Subject: [docs] [issue11329] PyEval_InitThreads() not safe before Py_Initialize() In-Reply-To: <1298713807.05.0.622715753988.issue11329@psf.upfronthosting.co.za> Message-ID: <1298817321.38.0.348723617448.issue11329@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you write a patch for the documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 27 15:54:40 2011 From: report at bugs.python.org (Jonas H.) Date: Sun, 27 Feb 2011 14:54:40 +0000 Subject: [docs] [issue11345] Fix a link in library/json docs In-Reply-To: <1298818480.03.0.395520184392.issue11345@psf.upfronthosting.co.za> Message-ID: <1298818480.03.0.395520184392.issue11345@psf.upfronthosting.co.za> New submission from Jonas H. : I guess this should be a link. ---------- assignee: docs at python components: Documentation files: fix-json-link.diff keywords: patch messages: 129629 nosy: docs at python, jonash priority: normal severity: normal status: open title: Fix a link in library/json docs versions: Python 3.3 Added file: http://bugs.python.org/file20932/fix-json-link.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 27 16:03:13 2011 From: report at bugs.python.org (Atsuo Ishimoto) Date: Sun, 27 Feb 2011 15:03:13 +0000 Subject: [docs] [issue11346] Generator object should be mentioned in gc module document In-Reply-To: <1298818993.14.0.492098392223.issue11346@psf.upfronthosting.co.za> Message-ID: <1298818993.14.0.492098392223.issue11346@psf.upfronthosting.co.za> New submission from Atsuo Ishimoto : In the gc.garbage of the library ref of gc module, ... this list contains only objects with __del__() methods. This is not true, since gc.garbage will contain generator object with try-finally block. ---------- assignee: docs at python components: Documentation messages: 129631 nosy: docs at python, ishimoto priority: normal severity: normal status: open title: Generator object should be mentioned in gc module document _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 27 16:07:17 2011 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 27 Feb 2011 15:07:17 +0000 Subject: [docs] [issue11345] Fix a link in library/json docs In-Reply-To: <1298818480.03.0.395520184392.issue11345@psf.upfronthosting.co.za> Message-ID: <1298819237.3.0.380632873275.issue11345@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r88668 ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 27 17:04:58 2011 From: report at bugs.python.org (Daniel Stutzbach) Date: Sun, 27 Feb 2011 16:04:58 +0000 Subject: [docs] [issue4600] __class__ assignment: new-style? heap? == confusing In-Reply-To: <1228771522.72.0.688992536212.issue4600@psf.upfronthosting.co.za> Message-ID: <1298822698.84.0.155986993449.issue4600@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : ---------- nosy: +stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 27 17:14:25 2011 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Sun, 27 Feb 2011 16:14:25 +0000 Subject: [docs] [issue4600] __class__ assignment: new-style? heap? == confusing In-Reply-To: <1228771522.72.0.688992536212.issue4600@psf.upfronthosting.co.za> Message-ID: <1298823265.83.0.189944451178.issue4600@psf.upfronthosting.co.za> Changes by Andreas St?hrk : ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 27 18:21:09 2011 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 27 Feb 2011 17:21:09 +0000 Subject: [docs] [issue11282] 3.3 unittest document not kept consist with code In-Reply-To: <1298354999.37.0.375525915954.issue11282@psf.upfronthosting.co.za> Message-ID: <1298827269.29.0.500254177224.issue11282@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 27 19:00:32 2011 From: report at bugs.python.org (Jonas H.) Date: Sun, 27 Feb 2011 18:00:32 +0000 Subject: [docs] [issue4600] __class__ assignment: new-style? heap? == confusing In-Reply-To: <1228771522.72.0.688992536212.issue4600@psf.upfronthosting.co.za> Message-ID: <1298829632.48.0.301800168145.issue4600@psf.upfronthosting.co.za> Jonas H. added the comment: Here comes a patch, changing the behaviour to: ./python -q >>> class C: ... pass ... >>> (1).__class__ = 1 Traceback (most recent call last): File "", line 1, in TypeError: __class__ must be set to a class defined by a class statement, not 'int' object >>> (1).__class__ = object Traceback (most recent call last): File "", line 1, in TypeError: class__ must be set to a class defined by a class statement, not 'object' >>> (1).__class__ = C Traceback (most recent call last): File "", line 1, in TypeError: __class__ assignment: only for instances of classes defined by class statements ---------- keywords: +patch nosy: +jonash Added file: http://bugs.python.org/file20937/4600.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 27 19:25:43 2011 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 27 Feb 2011 18:25:43 +0000 Subject: [docs] [issue4600] __class__ assignment: new-style? heap? == confusing In-Reply-To: <1228771522.72.0.688992536212.issue4600@psf.upfronthosting.co.za> Message-ID: <1298831143.53.0.0710531390524.issue4600@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is not really accurate: >>> class x(int): pass ... >>> class y(object): pass ... >>> x().__class__ = y Traceback (most recent call last): File "", line 1, in TypeError: __class__ assignment: 'x' object layout differs from 'y' >>> y().__class__ = x Traceback (most recent call last): File "", line 1, in TypeError: __class__ assignment: 'y' object layout differs from 'x' ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 28 00:28:45 2011 From: report at bugs.python.org (Atsuo Ishimoto) Date: Sun, 27 Feb 2011 23:28:45 +0000 Subject: [docs] [issue11346] Generator object should be mentioned in gc module document In-Reply-To: <1298818993.14.0.492098392223.issue11346@psf.upfronthosting.co.za> Message-ID: <1298849325.08.0.830105850756.issue11346@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: Oh, Not only try-finally block, generators contains try-except or with block will be added to gc.garbage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 28 04:42:15 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 28 Feb 2011 03:42:15 +0000 Subject: [docs] [issue11283] incorrect pattern in the re module docs for conditional regex In-Reply-To: <1298364500.67.0.815268640848.issue11283@psf.upfronthosting.co.za> Message-ID: <20110228034156.GA2521@kevin> Senthil Kumaran added the comment: On Tue, Feb 22, 2011 at 08:48:20AM +0000, wesley chun wrote: > > The fix is to add the end char '$' to the regex to get all 4 working: Better would be a regex for white-space '\s' which would achieve the same purpose plus it would satisfy the other requirement for using it with search and can do the search in-middle of the document too. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From tw-public at gmx.de Sat Feb 26 23:28:24 2011 From: tw-public at gmx.de (Thomas Waldmann) Date: Sat, 26 Feb 2011 23:28:24 +0100 Subject: [docs] Bug in "re.sub" docs Message-ID: <1298759304.2883.3.camel@x300> http://docs.python.org/library/re.html#re.sub a) flags param seems to be not there in the implementation b) "That is, \n is converted to a single newline character, \r is converted to a linefeed, and so forth." Obviously, \r is NOT linefeed, but carriage return. From report at bugs.python.org Mon Feb 28 10:31:06 2011 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 28 Feb 2011 09:31:06 +0000 Subject: [docs] [issue11283] incorrect pattern in the re module docs for conditional regex In-Reply-To: <1298364500.67.0.815268640848.issue11283@psf.upfronthosting.co.za> Message-ID: <1298885466.88.0.42994658146.issue11283@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Thinking about the regex pattern again. The example given is not really wrong. It does what it claims to match, that is '' and 'user at example.com' and reject ' kind of string. Also, this is not an example of validating an email address or finding an email address pattern in text data. A good regex for that purposes would be more complex[1][2]. Having said that, if example of conditional regex has been given - the current one is sufficient (in which case no change is required) or a simpler one can be presented, which may not like matching a email address and thus devoid of any expectations of valid patterns. Also, if we 'really' think that rejecting 'user at example>' is good idea in the example documentation, then having '$' in no-pattern of regex is good enough. No need to think for regex search cases for the explanation given about. 1: http://www.regular-expressions.info/email.html 2: http://ex-parrot.com/~pdw/Mail-RFC822-Address.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 28 13:14:22 2011 From: report at bugs.python.org (Pierre Quentel) Date: Mon, 28 Feb 2011 12:14:22 +0000 Subject: [docs] [issue11352] Buf in cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> New submission from Pierre Quentel : Hi, I wrote a patch for the cgi module in version 3.2rc1 (#4953). Small changes should be done to the documentation of this module to reflect the changes in the module API : - in section "20.2.2. Using the cgi module" original text : "If a field represents an uploaded file, accessing the value via the value attribute or the getvalue() method reads the entire file in memory as a string. This may not be what you want. You can test for an uploaded file by testing either the filename attribute or the file attribute. You can then read the data at leisure from the file attribute:" proposed new text (for files, value is bytes, not string, and the read() method on file also returns bytes) : "If a field represents an uploaded file, accessing the value via the value attribute or the getvalue() method reads the entire file in memory as bytes. This may not be what you want. You can test for an uploaded file by testing either the filename attribute or the file attribute. You can then read the data at leisure from the file attribute (the read() and readline() methods will return bytes) :" - version 3.2 introduced a parameter "encoding" for the FieldStorage constructor, used to decode the bytes received on the HTTP connection for fields other than files. This encoding must the one defined in the HTML document holding the form submitted to the CGI script ; it is usually defined by a meta tag : or by the Content-Type header for this document I'm not sure where this should be mentioned in the module documentation. Maybe in "20.2.9. Common problems and solutions" for the moment. But there are plans (#11066) to introduce another interface to change the encoding of sys.stdout in the CGI script itself, so another option would be to open a specific section about encodings Hope it's clear enough Pierre ---------- assignee: docs at python components: Documentation messages: 129691 nosy: docs at python, quentel priority: normal severity: normal status: open title: Buf in cgi module doc type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 28 13:16:33 2011 From: report at bugs.python.org (Pierre Quentel) Date: Mon, 28 Feb 2011 12:16:33 +0000 Subject: [docs] [issue11352] Bug in cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1298895393.7.0.435409107098.issue11352@psf.upfronthosting.co.za> Pierre Quentel added the comment: "bug", not "buf"... ---------- title: Buf in cgi module doc -> Bug in cgi module doc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 28 14:10:31 2011 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 28 Feb 2011 13:10:31 +0000 Subject: [docs] [issue1720250] PyGILState_Ensure does not acquires GIL Message-ID: <1298898631.6.0.682809660577.issue1720250@psf.upfronthosting.co.za> Nick Coghlan added the comment: Given the deprecation of PyEval_ReleaseLock in issue10913, should this be closed as "out of date"? ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 28 15:48:10 2011 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 28 Feb 2011 14:48:10 +0000 Subject: [docs] [issue1720250] PyGILState_Ensure does not acquires GIL Message-ID: <1298904490.63.0.387876815283.issue1720250@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Given the deprecation of PyEval_ReleaseLock in issue10913, should this > be closed as "out of date"? Indeed :) ---------- resolution: -> out of date stage: test needed -> status: open -> closed _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Mon Feb 28 20:32:45 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 28 Feb 2011 19:32:45 +0000 Subject: [docs] Bug in "re.sub" docs In-Reply-To: <1298759304.2883.3.camel@x300> References: <1298759304.2883.3.camel@x300> Message-ID: Hi Thomas, thanks for your email. On Sat, Feb 26, 2011 at 22:28, Thomas Waldmann wrote: > http://docs.python.org/library/re.html#re.sub > > a) flags param seems to be not there in the implementation could you please give us more details? are you talking about a specific method (or a set of them)? If so, what is it? > b) "That is, \n is converted to a single newline character, \r is > converted to a linefeed, and so forth." > > Obviously, \r is NOT linefeed, but carriage return. You're right about that (I'll prepare a patch once a) is clear). Cheers. -- 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 Mon Feb 28 21:23:09 2011 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 28 Feb 2011 20:23:09 +0000 Subject: [docs] =?windows-1252?q?Examples_in_=2213=2E1=2E_csv_=97_CSV_File?= =?windows-1252?q?_Reading_and_Writing=22_don=27t_close_files?= In-Reply-To: References: Message-ID: Hi Neil, thanks for your email. On Tue, Feb 8, 2011 at 11:01, Neil Vass wrote: > Hi, > I have a suggestion for the csv module's documentation. The examples > in?http://docs.python.org/library/csv.html show file reading like this: > reader = csv.reader(open("some.csv", "rb")) > This leaves the file handle open after use, without a way to close it. A > better example might be > ifile =?open("some.csv", "rb") > reader = csv.reader(ifile) > ?... process file ... > ifile.close() I can see your point, and f.e. in Python3 I'd rather use the with statement to open the file, but I fear that reformatting the examples as you propose will make them too big and they'll loose their compactness and easy-to-get-to-the-point. Maybe a warning at the beginning of the examples section that they are just \examples\ and so file handling is not done in a state-of-the-art manner? What other readers of docs@ think? Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi