From report at bugs.python.org Wed Aug 1 00:25:08 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 31 Jul 2012 22:25:08 +0000 Subject: [docs] [issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py In-Reply-To: <1341110073.6.0.573832115517.issue15231@psf.upfronthosting.co.za> Message-ID: <1343773508.18.0.40093645332.issue15231@psf.upfronthosting.co.za> ?ric Araujo added the comment: Please backport and leave open for distutils2. I much prefer that bugs stay open for months rather than porting to d2 be forgotten. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 09:24:24 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2012 07:24:24 +0000 Subject: [docs] [issue15213] _PyOS_URandom documentation In-Reply-To: <1340845023.83.0.143337072725.issue15213@psf.upfronthosting.co.za> Message-ID: <1343805864.77.0.229286171276.issue15213@psf.upfronthosting.co.za> STINNER Victor added the comment: So can we close this issue, or should we start to document private functions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 09:45:58 2012 From: report at bugs.python.org (Dirkjan Ochtman) Date: Wed, 01 Aug 2012 07:45:58 +0000 Subject: [docs] [issue15520] Document datetime.timestamp() in 3.3 What's New Message-ID: <1343807157.88.0.373148573533.issue15520@psf.upfronthosting.co.za> New submission from Dirkjan Ochtman: It seems nice if datetime.timestamp() would be mentioned in the What's New. Does that seem acceptable? I'm happy to whip up a patch. ---------- assignee: docs at python components: Documentation messages: 167096 nosy: djc, docs at python priority: normal severity: normal status: open title: Document datetime.timestamp() in 3.3 What's New versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 11:07:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 01 Aug 2012 09:07:48 +0000 Subject: [docs] [issue15521] Dev Guide should say how to run tests in 2.7 Message-ID: <1343812068.2.0.0173567393654.issue15521@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The Dev Guide should say the preferred way (or even a way) to run tests using the Python 2.7 build: http://docs.python.org/devguide/runtests.html This will help submitters who want to check that their patch works with 2.7. In Python 2.7, this did not work (for obvious reasons): $ ./python.exe -m test .../python.exe: No module named test.__main__; 'test' is a package and cannot be directly executed But this did: $ ./python.exe -m test.regrtest Is the latter the preferred way? ---------- assignee: docs at python components: Devguide, Documentation keywords: easy messages: 167099 nosy: cjerdonek, docs at python, ezio.melotti priority: normal severity: normal stage: needs patch status: open title: Dev Guide should say how to run tests in 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 11:17:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 01 Aug 2012 09:17:49 +0000 Subject: [docs] [issue15521] Dev Guide should say how to run tests in 2.7 In-Reply-To: <1343812068.2.0.0173567393654.issue15521@psf.upfronthosting.co.za> Message-ID: <1343812669.48.0.64640801298.issue15521@psf.upfronthosting.co.za> Ezio Melotti added the comment: FWIW this is already mentioned in the quick start [0]. Do you want to propose a patch for runtest.rst? [0]: http://docs.python.org/devguide/#quick-start ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 11:19:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 01 Aug 2012 09:19:39 +0000 Subject: [docs] [issue15521] Dev Guide should say how to run tests in 2.7 In-Reply-To: <1343812068.2.0.0173567393654.issue15521@psf.upfronthosting.co.za> Message-ID: <1343812778.99.0.340463656449.issue15521@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > FWIW this is already mentioned in the quick start [0]. I didn't catch that, thanks. > Do you want to propose a patch for runtest.rst? Sure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 11:58:44 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 01 Aug 2012 09:58:44 +0000 Subject: [docs] [issue15521] Dev Guide should say how to run tests in 2.7 In-Reply-To: <1343812068.2.0.0173567393654.issue15521@psf.upfronthosting.co.za> Message-ID: <1343815124.06.0.0570340510677.issue15521@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching a patch for review. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file26645/issue-15521-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 12:26:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 01 Aug 2012 10:26:49 +0000 Subject: [docs] [issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py In-Reply-To: <1341110073.6.0.573832115517.issue15231@psf.upfronthosting.co.za> Message-ID: <1343816809.49.0.833529458333.issue15231@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Please backport and leave open for distutils2. ?ric, is there a place where updates to the distutils2 docs can be viewed and made prior to reinclusion in the main Python repo? For example, the documentation here: http://packages.python.org/Distutils2/devresources.html#documentation suggests that the documentation is in a docs/source directory of this repo: http://hg.python.org/distutils2 but I don't seem to see the documentation there. Or do all changes need to wait for reinclusion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 14:11:31 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 01 Aug 2012 12:11:31 +0000 Subject: [docs] [issue15213] _PyOS_URandom documentation In-Reply-To: <1340845023.83.0.143337072725.issue15213@psf.upfronthosting.co.za> Message-ID: <1343823090.92.0.845394249899.issue15213@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The comment needs to be fixed before the issue is closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 16:08:38 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 01 Aug 2012 14:08:38 +0000 Subject: [docs] [issue15520] Document datetime.timestamp() in 3.3 What's New In-Reply-To: <1343807157.88.0.373148573533.issue15520@psf.upfronthosting.co.za> Message-ID: <1343830118.92.0.876120937862.issue15520@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, of course. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 17:05:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 01 Aug 2012 15:05:58 +0000 Subject: [docs] [issue15527] Double parents in functions references Message-ID: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: :c:func:`PyMem_Malloc(n)` on Doc/c-api/memory.rst:109 rendered in HTML as PyMem_Malloc(1)() (note double parents). There are many other examples on this and other pages. The issue is actual for all modern versions of Python. ---------- assignee: docs at python components: Documentation messages: 167137 nosy: docs at python, storchaka priority: normal severity: normal status: open title: Double parents in functions references versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 17:40:17 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 01 Aug 2012 15:40:17 +0000 Subject: [docs] [issue15521] Dev Guide should say how to run tests in 2.7 In-Reply-To: <1343812068.2.0.0173567393654.issue15521@psf.upfronthosting.co.za> Message-ID: <1343835616.44.0.37999507186.issue15521@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for the patch. I'm not sure it's necessary to add a new section though, unless you are planning to add more differences there. +base command instead of the one described above: :: You can just use "... above::" here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 17:41:15 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 01 Aug 2012 15:41:15 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1343835675.45.0.9610802122.issue15527@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- title: Double parents in functions references -> Double parens in functions references _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 1 20:03:57 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 01 Aug 2012 18:03:57 +0000 Subject: [docs] [issue15213] _PyOS_URandom documentation In-Reply-To: <1343823090.92.0.845394249899.issue15213@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > The comment needs to be fixed before the issue is closed. Ah yes, here is a patch updating the comment of _PyOS_URandom() and the doc of the os module. ---------- keywords: +patch Added file: http://bugs.python.org/file26650/urandom_doc.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 2dd1b056d663 Doc/library/os.rst --- a/Doc/library/os.rst Wed Aug 01 14:53:22 2012 +0200 +++ b/Doc/library/os.rst Wed Aug 01 15:34:07 2012 +0200 @@ -3331,5 +3331,5 @@ Miscellaneous Functions This function returns random bytes from an OS-specific randomness source. The returned data should be unpredictable enough for cryptographic applications, though its exact quality depends on the OS implementation. On a Unix-like - system this will query /dev/urandom, and on Windows it will use CryptGenRandom. - If a randomness source is not found, :exc:`NotImplementedError` will be raised. + system this will query ``/dev/urandom``, and on Windows it will use + :c:func:`CryptGenRandom`. diff -r 2dd1b056d663 Python/random.c --- a/Python/random.c Wed Aug 01 14:53:22 2012 +0200 +++ b/Python/random.c Wed Aug 01 15:34:07 2012 +0200 @@ -219,8 +219,9 @@ lcg_urandom(unsigned int x0, unsigned ch } } -/* Fill buffer with size pseudo-random bytes, not suitable for cryptographic - use, from the operating random number generator (RNG). +/* Fill buffer with size pseudo-random bytes from the operating random number + generator (RNG). It is suitable for for most cryptographic purposes except + long living private keys for asymmetric encryption. Return 0 on success, raise an exception and return -1 on error. */ int From report at bugs.python.org Wed Aug 1 21:00:03 2012 From: report at bugs.python.org (Dave Abrahams) Date: Wed, 01 Aug 2012 19:00:03 +0000 Subject: [docs] [issue15531] os.path symlink docs missing Message-ID: <1343847603.27.0.526292718618.issue15531@psf.upfronthosting.co.za> New submission from Dave Abrahams: the docs for os.path don't mention the following facts which I think are important (in fact I assumed the facts would be the reverse): os.path.realpath(l) works when l is a broken symbolic link, returning the path to the (missing) target os.path.readlink(l) causes an error when l is a broken symbolic link. ---------- assignee: docs at python components: Documentation messages: 167163 nosy: dabrahams, docs at python priority: normal severity: normal status: open title: os.path symlink docs missing type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:00:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 02 Aug 2012 00:00:59 +0000 Subject: [docs] [issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py In-Reply-To: <1341110073.6.0.573832115517.issue15231@psf.upfronthosting.co.za> Message-ID: <3WnWkJ4LBtzPfY@mail.python.org> Roundup Robot added the comment: New changeset 29bdbcadf299 by Eli Bendersky in branch '2.7': Issue #15231: update PyPI upload doc to say --no-raw passed to rst2html.py http://hg.python.org/cpython/rev/29bdbcadf299 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:01:35 2012 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 02 Aug 2012 00:01:35 +0000 Subject: [docs] [issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py In-Reply-To: <1341110073.6.0.573832115517.issue15231@psf.upfronthosting.co.za> Message-ID: <1343865695.07.0.964345000297.issue15231@psf.upfronthosting.co.za> Eli Bendersky added the comment: Backported in 014b36383a54 and 29bdbcadf299 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 02:36:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 02 Aug 2012 00:36:42 +0000 Subject: [docs] [issue15521] Dev Guide should say how to run tests in 2.7 In-Reply-To: <1343812068.2.0.0173567393654.issue15521@psf.upfronthosting.co.za> Message-ID: <1343867802.11.0.438949236533.issue15521@psf.upfronthosting.co.za> Chris Jerdonek added the comment: It is a relatively large section (nine paragraphs + six code snippets) and is primarily about the in-development branch, so I did not want to interrupt the flow with a remark specific to 2.7. I also liked that the instructions in a subsection could be linked to. But here is a new patch. ---------- Added file: http://bugs.python.org/file26652/issue-15521-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 07:44:33 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 02 Aug 2012 05:44:33 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation Message-ID: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The sentence describing Popen()'s cwd argument in the subprocess documentation seems reversed to me: http://docs.python.org/dev/library/subprocess.html#subprocess.Popen It says, "If cwd is not None, the child?s current directory will be changed to cwd before it is executed. Note that this directory is not considered when searching the executable, so you can?t specify the program?s path relative to cwd." However, when cwd is not None, it seems like you *must* specify the program's path relative to cwd. For example, when running a script containing the following using `./python.exe` from a source checkout-- p = Popen(['./python.exe', '-V'], stdout=PIPE, stderr=PIPE, cwd='temp') you get an: "OSError: [Errno 2] No such file or directory." In contrast, when you *do* specify the program's path relative to cwd, it works-- p = Popen(['../python.exe', '-V'], stdout=PIPE, stderr=PIPE, cwd='temp') Issue 6374 seems to have made the same point in its second bullet, but the issue was closed without addressing that part of it. ---------- assignee: docs at python components: Documentation keywords: easy messages: 167194 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: subprocess.Popen(cwd) documentation versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 09:21:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 02 Aug 2012 07:21:43 +0000 Subject: [docs] [issue15521] Dev Guide should say how to run tests in 2.7 In-Reply-To: <1343812068.2.0.0173567393654.issue15521@psf.upfronthosting.co.za> Message-ID: <3WnjVq0M5pzPfP@mail.python.org> Roundup Robot added the comment: New changeset 851adff2d434 by Ezio Melotti in branch 'default': #15521: mention that test.regrtest is necessary to run tests on 2.7. Patch by Chris Jerdonek. http://hg.python.org/devguide/rev/851adff2d434 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 2 09:23:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 02 Aug 2012 07:23:45 +0000 Subject: [docs] [issue15521] Dev Guide should say how to run tests in 2.7 In-Reply-To: <1343812068.2.0.0173567393654.issue15521@psf.upfronthosting.co.za> Message-ID: <1343892225.0.0.179808695986.issue15521@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From chris.jerdonek at gmail.com Thu Aug 2 15:53:09 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Thu, 2 Aug 2012 06:53:09 -0700 Subject: [docs] index directives for section text In-Reply-To: References: Message-ID: I sent the e-mail below to this list a week ago but didn't get a response. Are there any thoughts on it? Here are a few more examples where I feel displaying the header at the top might be a bit more useful. http://docs.python.org/dev/reference/datamodel.html#index-36 http://docs.python.org/dev/reference/simple_stmts.html#index-23 http://docs.python.org/dev/reference/expressions.html#index-16 (For future reference, these links point to the sections on generator functions, yield statements, and yield expressions, respectively.) On Thu, Jul 26, 2012 at 1:44 AM, Chris Jerdonek wrote: > When marking section text for inclusion in the index, is there a > preference for whether the index directive should occur immediately > before or after the section header? > > For example, "generator, function" in the index links here: > > http://docs.python.org/dev/reference/datamodel.html#index-36 > > But the "Generator functions" header is not visible after clicking the > link without scrolling (at least for me) because the directive appears > after the header in reference/datamodel.rst: > > Generator functions > .. index:: > single: generator; function > single: generator; iterator > > This seems like common practice in some areas of the documentation, > but it seems like the result might be less desirable. > > Thanks, > --Chris From report at bugs.python.org Fri Aug 3 00:23:44 2012 From: report at bugs.python.org (Aaron Staley) Date: Thu, 02 Aug 2012 22:23:44 +0000 Subject: [docs] [issue15542] Documentation incorrectly suggests __init__ called after direct __new__ call Message-ID: <1343946223.73.0.562621858875.issue15542@psf.upfronthosting.co.za> New submission from Aaron Staley: The documentation for __new__ at http://docs.python.org/reference/datamodel.html#object.__new__ is: """ object.__new__(cls[, ...]) Called to create a new instance of class cls. __new__() is a static method (special-cased so you need not declare it as such) that takes the class of which an instance was requested as its first argument. The remaining arguments are those passed to the object constructor expression (the call to the class). The return value of __new__() should be the new object instance (usually an instance of cls). Typical implementations create a new instance of the class by invoking the superclass?s __new__() method using super(currentclass, cls).__new__(cls[, ...]) with appropriate arguments and then modifying the newly-created instance as necessary before returning it. If __new__() returns an instance of cls, then the new instance?s __init__() method will be invoked like __init__(self[, ...]), where self is the new instance and the remaining arguments are the same as were passed to __new__(). If __new__() does not return an instance of cls, then the new instance?s __init__() method will not be invoked. __new__() is intended mainly to allow subclasses of immutable types (like int, str, or tuple) to customize instance creation. It is also commonly overridden in custom metaclasses in order to customize class creation. """ The problem is in this line: "If __new__() returns an instance of cls, then the new instance?s __init__() method will be invoked like __init__(self[, ...]), where self is the new instance and the remaining arguments are the same as were passed to __new__()." This is only true in the context of a constructor. In particular, directly calling cls.__new__(cls) will NOT call __init__. If I define a class: class C(object): def __new__(*args, **kwargs): print 'new', args, kwargs return object.__new__(*args,**kwargs) def __init__(self): print 'init' C() will result in __new__ and __init__ being both executed, but C.__new__(C) will only create the instance of C; it will not call __init__! The original documentation described in http://bugs.python.org/issue1123716 was more correct: "__new__ must return an object... If you return an existing object, the constructor call will still call its __init__ method unless the object is an instance of a different class..." That is __init__ is only being called in the context of an external constructor call. Proposed phrasing: "If __new__() is invoked during object construction (cls()) and it returns an instance of cls, then the new instance?s __init__() method will be invoked like __init__(self[, ...]), where self is the new instance and the remaining arguments are the same as were passed to the object constructor." ---------- assignee: docs at python components: Documentation messages: 167267 nosy: Aaron.Staley, docs at python priority: normal severity: normal status: open title: Documentation incorrectly suggests __init__ called after direct __new__ call versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 00:59:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 02 Aug 2012 22:59:20 +0000 Subject: [docs] [issue15542] Documentation incorrectly suggests __init__ called after direct __new__ call In-Reply-To: <1343946223.73.0.562621858875.issue15542@psf.upfronthosting.co.za> Message-ID: <1343948360.45.0.850646391039.issue15542@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Whether or not the current language is technically correct, I would support improving its clarity. Would you like to create a formal patch? Also, note that the newest documentation is published here: http://docs.python.org/dev/reference/datamodel.html#object.__new__ (Note that in the future, you do not need to post such full excerpts, just the key parts.) ---------- nosy: +cjerdonek stage: -> needs patch type: -> enhancement versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 02:20:34 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 03 Aug 2012 00:20:34 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' Message-ID: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> New submission from Chris Jerdonek: "Universal newlines" of PEP 278 does not seem to have a central, linkable description within the documentation. In particular, there does not seem to be a glossary entry or any index entries for it. The main documentation seems to be in the middle of the documentation for the open() built-in function: http://docs.python.org/dev/library/functions.html?highlight=open#open But this does not feature prominently when searching for universal newlines in the "Quick Search". This would allow us, for example, to reference and link to an explanation of universal newlines in the documentation for str.splitlines(): http://docs.python.org/dev/library/stdtypes.html#str.splitlines I would be happy to provide a patch. ---------- assignee: docs at python components: Documentation keywords: easy messages: 167279 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: central documentation for 'universal newlines' versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 09:42:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 03 Aug 2012 07:42:09 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1343979728.93.0.0876903194492.issue15543@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See issue15204. ---------- nosy: +storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 10:24:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 03 Aug 2012 08:24:06 +0000 Subject: [docs] [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1343982246.74.0.989513438754.issue15204@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 10:33:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 03 Aug 2012 08:33:25 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1343982805.17.0.873875622357.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Since universal newline mode is discouraged and getting deprecated in the built-in open() function, the "central" place for describing universal newlines should probably not be the documentation for the open() method. I am leaning towards a glossary entry. The io.TextIOWrapper class is another candidate: http://docs.python.org/dev/library/io.html#io.TextIOWrapper ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 14:26:00 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 03 Aug 2012 12:26:00 +0000 Subject: [docs] [issue15548] Mention all new os functions in What's New in Python 3.3 Message-ID: <1343996760.47.0.232563077305.issue15548@psf.upfronthosting.co.za> New submission from STINNER Victor: The os module has a lot of new functions in Python 3.3. It looks like only a few are documented in What's New in Python 3.3. Examples : truncate(), ftruncate() and sync() are not mentionned. Does Sphinx have a function to list of new functions added to Python 3.3? At least to check that the What's New in Python 3.3 is complete. I would like to have the full list to check that new functions are consistent. See for example the issue #15547. ---------- assignee: docs at python components: Documentation messages: 167315 nosy: docs at python, georg.brandl, haypo, larry, rhettinger priority: normal severity: normal status: open title: Mention all new os functions in What's New in Python 3.3 versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 14:59:07 2012 From: report at bugs.python.org (Ross Lagerwall) Date: Fri, 03 Aug 2012 12:59:07 +0000 Subject: [docs] [issue15548] Mention all new os functions in What's New in Python 3.3 In-Reply-To: <1343996760.47.0.232563077305.issue15548@psf.upfronthosting.co.za> Message-ID: <1343998747.06.0.260619070622.issue15548@psf.upfronthosting.co.za> Ross Lagerwall added the comment: Attached is a diff between dir(os) in 3.2 and 3.3 ---------- keywords: +patch nosy: +rosslagerwall Added file: http://bugs.python.org/file26676/oschanges.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 16:37:23 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 03 Aug 2012 14:37:23 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1344004642.86.0.797441715821.issue13498@psf.upfronthosting.co.za> R. David Murray added the comment: I want the opposite: a way to say I don't care what the mode is as long as it exists. Currently there is no way to do that, as far as I remember. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 3 21:27:29 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 03 Aug 2012 19:27:29 +0000 Subject: [docs] [issue15548] Mention all new os functions in What's New in Python 3.3 In-Reply-To: <1343996760.47.0.232563077305.issue15548@psf.upfronthosting.co.za> Message-ID: <1344022049.29.0.460402203978.issue15548@psf.upfronthosting.co.za> Georg Brandl added the comment: Victor: try "make changes". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 01:10:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 03 Aug 2012 23:10:05 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344035405.38.0.00382164562085.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: See also: f17a1410ebe5 ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 01:12:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 03 Aug 2012 23:12:54 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344035574.69.0.93128834228.issue15543@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Since universal newline mode is discouraged and getting deprecated in > the built-in open() function There may (or may not :-)) be a misunderstanding. Universal newlines are not discouraged; it's the legacy "U" flag which is deprecated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 01:33:09 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 03 Aug 2012 23:33:09 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344036789.25.0.970877724308.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > There may (or may not :-)) be a misunderstanding. Universal newlines are not discouraged; it's the legacy "U" flag which is deprecated. Already understood. :) (I said "in the built-in open() function" above and meant "mode" as in "flag".) I nosied you only because you copy and pasted information about universal newlines that might benefit from a glossary entry or some such about universal newlines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 02:44:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 04 Aug 2012 00:44:34 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344041074.54.0.285651693781.issue15543@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I nosied you only because you copy and pasted information about > universal newlines that might benefit from a glossary entry or some > such about universal newlines. Yes, it might benefit from a glossary entry. On the other hand, the details of the *newline* argument should probably remain in the API descriptions themselves. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 04:21:09 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 04 Aug 2012 02:21:09 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344046869.51.0.832702190683.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > On the other hand, the details of the *newline* argument should probably remain in the API descriptions themselves. Correct. It would be a high-level entry for "universal newlines" -- independent of any API and suitable for linking to wherever universal newlines are mentioned (e.g. in the documentation of str.splitlines()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 04:39:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 04 Aug 2012 02:39:38 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation Message-ID: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The documentation for str.splitlines()-- http://docs.python.org/dev/library/stdtypes.html#str.splitlines includes a statement that is not quite correct: "Unlike split(), if the string ends with line boundary characters the returned list does not have an empty last element." For example, >>> '\n'.splitlines() [''] >>> '\n\n'.splitlines() ['', ''] >>> '\r\n'.splitlines() [''] >>> '\n\r\n'.splitlines() ['', ''] >>> '\r'.splitlines() [''] >>> 'a\n\n'.splitlines() ['a', ''] Also, the note about split() only applies when split() is passed a separator. For example-- >>> 'a\n'.split('\n') ['a', ''] >>> 'a\n'.split() ['a'] Finally, the function's behavior on the empty string is another difference worth mentioning that is not covered by the existing note. I am attaching a patch that addresses these points. Notice also that the patch phrases it not as whether the list *has* an empty last element, but whether an *additional* last element should be added, which is the more important point. ---------- assignee: docs at python components: Documentation files: issue-splitlines-docs-1.patch keywords: easy, patch messages: 167394 nosy: cjerdonek, docs at python, jcea, pitrou priority: normal severity: normal stage: patch review status: open title: correct and clarify str.splitlines() documentation versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file26680/issue-splitlines-docs-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 12:59:54 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sat, 04 Aug 2012 10:59:54 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1344004642.86.0.797441715821.issue13498@psf.upfronthosting.co.za> Message-ID: Hynek Schlawack added the comment: do you want it by default or a new flag? default sounds like a source for obscure bugs to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 17:59:58 2012 From: report at bugs.python.org (Atsuo Ishimoto) Date: Sat, 04 Aug 2012 15:59:58 +0000 Subject: [docs] [issue15555] Default newlines of io.TextIOWrapper Message-ID: <1344095998.81.0.573935781933.issue15555@psf.upfronthosting.co.za> New submission from Atsuo Ishimoto: In http://docs.python.org/dev/library/io.html: "if newline is None, any '\n' characters written are translated to the system default line separator, os.linesep. " But os.linesep is not referred at all. On Windows default newline is always '\r\n' on Windows, '\n' otherwise. ---------- assignee: docs at python components: Documentation messages: 167413 nosy: docs at python, ishimoto priority: normal severity: normal status: open title: Default newlines of io.TextIOWrapper _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Sat Aug 4 19:43:48 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sat, 4 Aug 2012 19:43:48 +0200 Subject: [docs] Typo In-Reply-To: References: Message-ID: Hello Gaston, On Mon, Jul 23, 2012 at 5:58 PM, Gaston Fiore wrote: > Hello, > > There's a typo in the 3.2.3 Documentation, The Python Tutorial, 6.2. > Standard Modules. In line 3 of that section, there's a . missing right > after the word "platform". The tutorial currently reads: This has just been fixed on all active branches. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Sat Aug 4 21:28:24 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Aug 2012 19:28:24 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1344108503.77.0.969247417693.issue13498@psf.upfronthosting.co.za> R. David Murray added the comment: I *want* it to be the default, since I think that is the typical use case, but the existing default behavior means that such a backward incompatible change would not be acceptable for exactly the reason you state. So yes, I want it as a new flag. ("exist_really_ok", he says with tongue in cheek.) I haven't given much thought to the API, but perhaps there could be a value for the umask that means "don't care"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 4 22:56:34 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Aug 2012 20:56:34 +0000 Subject: [docs] [issue15531] os.path symlink docs missing In-Reply-To: <1343847603.27.0.526292718618.issue15531@psf.upfronthosting.co.za> Message-ID: <1344113794.75.0.924029348999.issue15531@psf.upfronthosting.co.za> R. David Murray added the comment: The first of those acts as I would expect: os.path.realpath is operating only on the path, so if the last element is a symbolic link it doesn't have any reason to look for the target of that link. The second one does seem less intuitive. I'm not sure the first case is worth a patch...I'd have to see a suggested wording. The second probably is, assuming it is not in fact a bug. ---------- nosy: +larry, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 00:13:55 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Aug 2012 22:13:55 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344118435.76.0.441695334299.issue15554@psf.upfronthosting.co.za> R. David Murray added the comment: Sigh. ;) At this point in my Python programming I intuitively understand what splitlines does, but every time we try to explain it in detail it gets messier and messier. I wasn't really happy with the addition of that sentence about split in the first place. I don't understand what your splitlines examples are trying to say, they all look clear to me based on the fact that we are splitting *lines*. I don't find your proposed language in the patch to be clearer. The existing sentence describes the concrete behavior, while your version is sort-of describing (ascribing?) some syntax to the line separators ("does not delimit"). The problem is that there *is* a syntax here, that of universal-newline-delimited-text, but that is too big a topic to explain in the splitlines doc. There's another issue for creating a central description of universal-newline parsing, perhaps this entry could link to that discussion (and that discussion could perhaps mention splitlines). The split behavior without a specified separator might actually be a bug (if so, it is not a fixable one), but in any case you are right that that clarification should be added if the existing sentence is kept. ---------- nosy: +ncoghlan, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 00:26:51 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 04 Aug 2012 22:26:51 +0000 Subject: [docs] [issue15555] Default newlines of io.TextIOWrapper In-Reply-To: <1344095998.81.0.573935781933.issue15555@psf.upfronthosting.co.za> Message-ID: <1344119211.02.0.225221175362.issue15555@psf.upfronthosting.co.za> R. David Murray added the comment: And that is the value of os.linesep at Python startup. I'm don't think that we really support the mutability of os.linesep, we just don't bother to make it immutable. I'm not sure how this would be documented, since code that does use "os.linesep" is indeed affected by changing it. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:36:24 2012 From: report at bugs.python.org (Larry Hastings) Date: Sun, 05 Aug 2012 00:36:24 +0000 Subject: [docs] [issue15531] os.path symlink docs missing In-Reply-To: <1343847603.27.0.526292718618.issue15531@psf.upfronthosting.co.za> Message-ID: <1344126984.43.0.669327729097.issue15531@psf.upfronthosting.co.za> Larry Hastings added the comment: I just tried it, and os.readlink('/tmp/broken-symlink') worked fine. What OS are you using? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:37:29 2012 From: report at bugs.python.org (Larry Hastings) Date: Sun, 05 Aug 2012 00:37:29 +0000 Subject: [docs] [issue15548] Mention all new os functions in What's New in Python 3.3 In-Reply-To: <1343996760.47.0.232563077305.issue15548@psf.upfronthosting.co.za> Message-ID: <1344127049.52.0.57729767268.issue15548@psf.upfronthosting.co.za> Larry Hastings added the comment: ftruncate isn't new. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:42:34 2012 From: report at bugs.python.org (Dave Abrahams) Date: Sun, 05 Aug 2012 00:42:34 +0000 Subject: [docs] [issue15531] os.path symlink docs missing In-Reply-To: <1343847603.27.0.526292718618.issue15531@psf.upfronthosting.co.za> Message-ID: <1344127354.58.0.204479632401.issue15531@psf.upfronthosting.co.za> Dave Abrahams added the comment: MacOS 10.7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 02:54:38 2012 From: report at bugs.python.org (Larry Hastings) Date: Sun, 05 Aug 2012 00:54:38 +0000 Subject: [docs] [issue15531] os.path symlink docs missing In-Reply-To: <1343847603.27.0.526292718618.issue15531@psf.upfronthosting.co.za> Message-ID: <1344128078.61.0.74577298399.issue15531@psf.upfronthosting.co.za> Larry Hastings added the comment: What does the following script print out? import os os.chdir('/tmp') os.symlink('--success--', 'foo') print("this should print --success-- :") print(os.readlink('foo')) os.unlink('foo') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 13:28:46 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 05 Aug 2012 11:28:46 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1344108503.77.0.969247417693.issue13498@psf.upfronthosting.co.za> Message-ID: Hynek Schlawack added the comment: How about something along of: new arg on_wrong_perm= 1. WRONG_PERM_IGNORE 2. WRONG_PERM_FAIL 3. callable that gets called with the directory name and maybe the existing perms to save stat call_ ? ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Sun Aug 5 13:36:00 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 5 Aug 2012 13:36:00 +0200 Subject: [docs] Layout problems at http://docs.python.org/library/re.html In-Reply-To: References: Message-ID: Hello Keith, On Fri, Jul 27, 2012 at 12:54 PM, wrote: > At section 7.2.5.2, everything goes black to the end of the document. > Tried on several different browsers and OSs. Can you still replicate this problem? I'm not able to on my Debian machine using Chromium or Firefox. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Sun Aug 5 16:00:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 05 Aug 2012 14:00:46 +0000 Subject: [docs] [issue15548] Mention all new os functions in What's New in Python 3.3 In-Reply-To: <1343996760.47.0.232563077305.issue15548@psf.upfronthosting.co.za> Message-ID: <3WqkCx3S8fzPl8@mail.python.org> Roundup Robot added the comment: New changeset b7b8e4ada3e5 by Victor Stinner in branch 'default': Issue #15548: Update and complete What's New in Python 3.3, especially the "os" section http://hg.python.org/cpython/rev/b7b8e4ada3e5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 19:32:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 05 Aug 2012 17:32:17 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344187937.0.0.747301031876.issue15554@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I wasn't really happy with the addition of that sentence about split in the first place. I think the instinct to put that sentence in there is a good one. It is a key, perhaps subtle difference. > I don't understand what your splitlines examples are trying to say, they all look clear to me based on the fact that we are splitting *lines*. I perhaps included too many examples and so clouded my point. :) I just needed one. The examples were simply to show why the existing language is not correct. The current language says, "if the string ends with line boundary characters the returned list does not have an empty last element." However, the examples are of strings that do end with line boundary characters but that *do* have an empty last element. The point is that splitlines() does not count a terminal line break as an additional line, while split('\n') (for example) does. But this is different from whether the returned list *has* an empty last element, which is what the current language says. The returned list can have empty last elements because of line breaks at the end. It's just that the one at the *very* end doesn't count towards that -- unlike the case for split(): >>> 'a'.splitlines() ['a'] >>> 'a\n'.splitlines() ['a'] >>> 'a\n\n'.splitlines() ['a', ''] >>> 'a\n\n\n'.splitlines() ['a', '', ''] >>> 'a\n\n\n'.split('\n') # counts terminal line break as an extra line ['a', '', '', ''] I'm open to improving the language. Maybe "does not count a terminal line break as an additional line" instead of the original "a terminal line break does not delimit an additional empty line"? > There's another issue for creating a central description of universal-newline parsing, perhaps this entry could link to that discussion (and that discussion could perhaps mention splitlines). I created that issue (issue 15543), and a patch is in the works along the lines you suggest. ;) > The split behavior without a specified separator might actually be a bug (if so, it is not a fixable one), but in any case you are right that that clarification should be added if the existing sentence is kept. Perhaps, but at least split() documents the behavior. :) "runs of consecutive whitespace are regarded as a single separator, and the result will contain no empty strings at the start or end if the string has leading or trailing whitespace." (from http://docs.python.org/dev/library/stdtypes.html#str.split ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 20:20:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 05 Aug 2012 18:20:25 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344190825.91.0.45065510021.issue15554@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching patch with simplified wording in response to R. David Murray's feedback. In particular, "a terminal line break does not delimit an additional empty line" -> "a terminal line break does not result in an extra line." ---------- Added file: http://bugs.python.org/file26702/issue-15554-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 21:02:57 2012 From: report at bugs.python.org (Dave Abrahams) Date: Sun, 05 Aug 2012 19:02:57 +0000 Subject: [docs] [issue15531] os.path symlink docs missing In-Reply-To: <1344128078.61.0.74577298399.issue15531@psf.upfronthosting.co.za> (Larry Hastings's message of "Sun, 05 Aug 2012 00:54:38 +0000") Message-ID: Dave Abrahams added the comment: on Sat Aug 04 2012, Larry Hastings wrote: > Larry Hastings added the comment: > > What does the following script print out? > > import os > > os.chdir('/tmp') > os.symlink('--success--', 'foo') > print("this should print --success-- :") > print(os.readlink('foo')) > os.unlink('foo') --8<---------------cut here---------------start------------->8--- this should print --success-- : --success-- --8<---------------cut here---------------end--------------->8--- So, I guess I don't know what was causing the symptom I observed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 21:51:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 05 Aug 2012 19:51:57 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper Message-ID: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This is an issue to update the subprocess module documentation after updates to io.TextIOWrapper's documentation here: http://hg.python.org/cpython/rev/f17a1410ebe5 This issue was discussed briefly on python-dev: http://mail.python.org/pipermail/python-dev/2012-August/121239.html Patch attached. ---------- assignee: docs at python components: Documentation files: issue-subprocess-docs-1.patch keywords: easy, patch messages: 167512 nosy: cjerdonek, docs at python, haypo priority: normal severity: normal stage: patch review status: open title: update subprocess docs to reference io.TextIOWrapper versions: Python 3.3 Added file: http://bugs.python.org/file26703/issue-subprocess-docs-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 5 23:19:07 2012 From: report at bugs.python.org (Larry Hastings) Date: Sun, 05 Aug 2012 21:19:07 +0000 Subject: [docs] [issue15531] os.path symlink docs missing In-Reply-To: <1343847603.27.0.526292718618.issue15531@psf.upfronthosting.co.za> Message-ID: <1344201547.89.0.88068300658.issue15531@psf.upfronthosting.co.za> Larry Hastings added the comment: Since everything is working fine, and the documentation arguably needs no update, I'm closing this. ---------- resolution: -> works for me stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 02:35:33 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Aug 2012 00:35:33 +0000 Subject: [docs] [issue15482] __import__() change between 3.2 and 3.3 In-Reply-To: <1343530510.61.0.113197969687.issue15482@psf.upfronthosting.co.za> Message-ID: <1344213332.92.0.912784107373.issue15482@psf.upfronthosting.co.za> Brett Cannon added the comment: I just realized my reply was unclear; I meant changing Doc/library/functions.rst, not the code. And 3.3 already has a versionchanged note about no longer accepting negative indexes, but I will update it to mention the new default as well explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 02:50:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 06 Aug 2012 00:50:15 +0000 Subject: [docs] [issue15482] __import__() change between 3.2 and 3.3 In-Reply-To: <1343530510.61.0.113197969687.issue15482@psf.upfronthosting.co.za> Message-ID: <3Wr0dF2ZqQzPlk@mail.python.org> Roundup Robot added the comment: New changeset 3fe01f7520e2 by Brett Cannon in branch '3.2': Issue #15482: Properly document the default 'level' parameter for http://hg.python.org/cpython/rev/3fe01f7520e2 New changeset 05bec2e78a5c by Brett Cannon in branch 'default': Issue #15482: Merge 78449:3fe01f7520e2 with a minor clarification. http://hg.python.org/cpython/rev/05bec2e78a5c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 02:50:38 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 06 Aug 2012 00:50:38 +0000 Subject: [docs] [issue15482] __import__() change between 3.2 and 3.3 In-Reply-To: <1343530510.61.0.113197969687.issue15482@psf.upfronthosting.co.za> Message-ID: <1344214238.65.0.256516807558.issue15482@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 03:59:02 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Aug 2012 01:59:02 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344218342.41.0.393067633887.issue15554@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, now I see what you are talking about. Yes, your revision in the comment is clearer; but, unless I read it wrong, in the patch it now sounds like you are saying that ''.splitlines() does not return the same result as ''.split() when in fact it does. I would also prefer that the "differences" discussion come in the separate paragraph after the specification of the behavior of the function, rather than the way you have it split up in the patch. I would include the mention of the lack-of-extra-line as part of the differences discussion: as I said I think that behavior follows logically from the fact that the function is splitting lines and so doesn't belong in the basic function description. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 04:13:38 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 06 Aug 2012 02:13:38 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344219218.43.0.605894555035.issue15554@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 05:44:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 06 Aug 2012 03:44:06 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344224645.94.0.549020629419.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching a patch for review. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file26706/issue-15543-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 07:01:44 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 06 Aug 2012 05:01:44 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344229303.88.0.945913987929.issue15554@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > in the patch it now sounds like you are saying that ''.splitlines() does not return the same result as ''.split() when in fact it does. The two differences occur only when split() is passed a separator. split() uses a different algorithm when no separator is specified. For example, for the empty string case: >>> ''.splitlines() [] >>> ''.split() [] >>> ''.split('\n') [''] That is why I used the phrase "Unlike split() when passed a separator" in the patch: + Unlike :meth:`~str.split` when passed a separator, this method returns + an empty list for the empty string, and a terminal line break does not I will change the language in the patch to parallel split()'s documentation more closely, to emphasize and make this distinction clearer: "when passed a separator" -> "when a delimiter string *sep* is given". > I would also prefer that the "differences" discussion come in the separate paragraph after the specification of the behavior of the function, Good point. I agree with you. That occurred to me while drafting the patch, but I was hesitant to change the existing structure too much. In the updated patch I am attaching, I have also made that change. Thanks a lot for reviewing! ---------- Added file: http://bugs.python.org/file26707/issue-15554-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 10:42:11 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 06 Aug 2012 08:42:11 +0000 Subject: [docs] [issue15520] Document datetime.timestamp() in 3.3 What's New In-Reply-To: <1343807157.88.0.373148573533.issue15520@psf.upfronthosting.co.za> Message-ID: <1344242531.37.0.310122025817.issue15520@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 10:43:24 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Mon, 06 Aug 2012 08:43:24 +0000 Subject: [docs] [issue15501] Document exception classes in subprocess module In-Reply-To: <1343655102.86.0.835171642678.issue15501@psf.upfronthosting.co.za> Message-ID: <1344242604.22.0.277817123928.issue15501@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 12:24:21 2012 From: report at bugs.python.org (Sebastian Ramacher) Date: Mon, 06 Aug 2012 10:24:21 +0000 Subject: [docs] [issue15566] tarfile.TarInfo.frombuf documentation is out of date Message-ID: <1344248661.48.0.873103438616.issue15566@psf.upfronthosting.co.za> New submission from Sebastian Ramacher: tarfile.TarInfo.frombuf has gained two more parameters: encoding and errors. The documentation of frombuf claims that the only parameter is buf, which is not true anymore. ---------- assignee: docs at python components: Documentation messages: 167553 nosy: docs at python, sebastinas priority: normal severity: normal status: open title: tarfile.TarInfo.frombuf documentation is out of date versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 15:05:19 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Aug 2012 13:05:19 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344258319.53.0.770959906115.issue15554@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I read too quickly before. But that expression "when a delimiter string *sep* is given" is hard to wrap ones head around in this context. I think the problem really is that 'split' has such radically different behavior when given an argument as opposed to when it isn't. I consider that a design flaw in strip, and always have. So, I suppose we can't do any better here because of that. Please move the keeplines discussion back up into the initial paragraph, and then I think we'll be good to go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 15:06:02 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Aug 2012 13:06:02 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344258362.22.0.773802306188.issue15554@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- Removed message: http://bugs.python.org/msg167557 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 15:06:21 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Aug 2012 13:06:21 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344258381.74.0.871682871391.issue15554@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I read too quickly before. But that expression "when a delimiter string *sep* is given" is hard to wrap ones head around in this context. I think the problem really is that 'split' has such radically different behavior when given an argument as opposed to when it isn't. I consider that a design flaw in split, and always have. So, I suppose we can't do any better here because of that. Please move the keeplines discussion back up into the initial paragraph, and then I think we'll be good to go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 20:10:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 06 Aug 2012 18:10:37 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344276636.93.0.787991588227.issue15554@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I think the problem really is that 'split' has such radically different behavior when given an argument as opposed to when it isn't. Yep, the split() documentation is much more involved because of that. > Please move the keeplines discussion back up into the initial paragraph, and then I think we'll be good to go. Sounds good. Would you also like me to move the example before the paragraph about differences, or should I leave the example at the end? Mention of the example may flow better after the keepends discussion, because the example is more about keepends rather than about the differences with split(). But it can go either way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 20:40:34 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Aug 2012 18:40:34 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344278433.94.0.734891612023.issue15554@psf.upfronthosting.co.za> R. David Murray added the comment: Good point. Difference paragraph after the example would be best, I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 21:50:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 06 Aug 2012 19:50:41 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344282641.78.0.874974784736.issue15554@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here you go. Thanks again. ---------- Added file: http://bugs.python.org/file26709/issue-15554-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 22:09:51 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 06 Aug 2012 20:09:51 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <3WrVMH0psNzPmb@mail.python.org> Roundup Robot added the comment: New changeset 768b188262e7 by R David Murray in branch '3.2': #15554: clarify splitlines/split differences. http://hg.python.org/cpython/rev/768b188262e7 New changeset 0d6eea2330d0 by R David Murray in branch 'default': Merge #15554: clarify splitlines/split differences. http://hg.python.org/cpython/rev/0d6eea2330d0 New changeset e057a7d18fa2 by R David Murray in branch '2.7': #15554: clarify splitlines/split differences. http://hg.python.org/cpython/rev/e057a7d18fa2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 22:10:31 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 06 Aug 2012 20:10:31 +0000 Subject: [docs] [issue15554] correct and clarify str.splitlines() documentation In-Reply-To: <1344047978.01.0.683229635888.issue15554@psf.upfronthosting.co.za> Message-ID: <1344283831.49.0.637333560834.issue15554@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for sticking with it. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 6 23:17:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 06 Aug 2012 21:17:58 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344287878.21.0.144084481817.issue15561@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Victor, would you be able to take a look at this minor documentation patch? It incorporates the change that you suggested we make on python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 00:31:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 06 Aug 2012 22:31:31 +0000 Subject: [docs] [issue15437] Merge Doc/ACKS.txt names into Misc/ACKS In-Reply-To: <1343074054.0.0.16855130631.issue15437@psf.upfronthosting.co.za> Message-ID: <1344292290.26.0.493645352765.issue15437@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Is this issue awaiting feedback from anyone else before it can proceed further? (Just this issue and not issue 15439 to make any adjustments to the docs.) I am attaching an updated diff after generating the script output again against the tip (modified to prefix matching last names with '>>> '). ---------- Added file: http://bugs.python.org/file26711/issue-15437-script-output-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 00:36:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 06 Aug 2012 22:36:42 +0000 Subject: [docs] [issue15437] Merge Doc/ACKS.txt names into Misc/ACKS In-Reply-To: <1343074054.0.0.16855130631.issue15437@psf.upfronthosting.co.za> Message-ID: <1344292602.58.0.10043700663.issue15437@psf.upfronthosting.co.za> Chris Jerdonek added the comment: For completeness, I am attaching the modified version of the script that was used to generate the latest output. ---------- Added file: http://bugs.python.org/file26712/merge-acks-2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 02:43:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 07 Aug 2012 00:43:58 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344300237.14.0.77066359312.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Updating patch to current tip. ---------- Added file: http://bugs.python.org/file26714/issue-15543-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 03:58:16 2012 From: report at bugs.python.org (Meador Inge) Date: Tue, 07 Aug 2012 01:58:16 +0000 Subject: [docs] [issue15566] tarfile.TarInfo.frombuf documentation is out of date In-Reply-To: <1344248661.48.0.873103438616.issue15566@psf.upfronthosting.co.za> Message-ID: <1344304696.81.0.937223532184.issue15566@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 12:58:46 2012 From: report at bugs.python.org (Cherniavsky Beni) Date: Tue, 07 Aug 2012 10:58:46 +0000 Subject: [docs] [issue15572] Python2 documentation of the file() built-in function Message-ID: <1344337126.35.0.910638419892.issue15572@psf.upfronthosting.co.za> New submission from Cherniavsky Beni: [followup for issue 12642 which only fixed it for open()] http://docs.python.org/library/functions.html#file says the arg names are: file(filename[, mode[, bufsize]]) but in practice they are: file(name[, mode[, buffering]]) ---------- assignee: docs at python components: Documentation messages: 167617 nosy: cben, docs at python priority: normal severity: normal status: open title: Python2 documentation of the file() built-in function versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 12:59:56 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 07 Aug 2012 10:59:56 +0000 Subject: [docs] [issue14870] Descriptions of os.utime() and os.utimensat() use wrong notation In-Reply-To: <1337601006.45.0.685713178373.issue14870@psf.upfronthosting.co.za> Message-ID: <1344337196.67.0.617216726473.issue14870@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 13:23:17 2012 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 07 Aug 2012 11:23:17 +0000 Subject: [docs] [issue15572] Python2 documentation of the file() built-in function In-Reply-To: <1344337126.35.0.910638419892.issue15572@psf.upfronthosting.co.za> Message-ID: <1344338597.62.0.173093447485.issue15572@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 15:33:34 2012 From: report at bugs.python.org (Daniel Ellis) Date: Tue, 07 Aug 2012 13:33:34 +0000 Subject: [docs] [issue15572] Python2 documentation of the file() built-in function In-Reply-To: <1344337126.35.0.910638419892.issue15572@psf.upfronthosting.co.za> Message-ID: <1344346414.73.0.438835481969.issue15572@psf.upfronthosting.co.za> Daniel Ellis added the comment: I've updated the documentation. This is my first patch, so please let me know if I've done something wrong. ---------- keywords: +patch nosy: +Daniel.Ellis Added file: http://bugs.python.org/file26721/file_update.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 20:11:03 2012 From: report at bugs.python.org (Roy Smith) Date: Tue, 07 Aug 2012 18:11:03 +0000 Subject: [docs] [issue15575] Tutorial is unclear on multiple imports of a module. Message-ID: <1344363062.87.0.467457264308.issue15575@psf.upfronthosting.co.za> New submission from Roy Smith: Opening this bug at Ben Finney's request. See https://groups.google.com/forum/?fromgroups#!topic/comp.lang.python/wmDUrpW2ZCU for the full thread discussing the problem. Here's a significant excerpt: ------------------------------------------------- The tutorial is misleading on this. It it says plainly: A module can contain executable statements as well as function definitions. [?] They are executed only the *first* time the module is imported somewhere. but it doesn't make clear that a module can exist in the ?sys.modules? list multiple times under different names. ------------------------------------------------- Also note: -------------------------------------------------- The footnote to that is wrong too: > [1] In fact function definitions are also ?statements? that are ?executed?; the execution of a module-level function enters the function name in the module?s global symbol table. I think what it's supposed to say is "... the execution of a module-level def statement ..." --------------------------------------------------- ---------- assignee: docs at python components: Documentation messages: 167628 nosy: docs at python, roysmith priority: normal severity: normal status: open title: Tutorial is unclear on multiple imports of a module. type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 20:29:48 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 07 Aug 2012 18:29:48 +0000 Subject: [docs] [issue15575] Tutorial is unclear on multiple imports of a module. In-Reply-To: <1344363062.87.0.467457264308.issue15575@psf.upfronthosting.co.za> Message-ID: <1344364188.69.0.0788156429759.issue15575@psf.upfronthosting.co.za> R. David Murray added the comment: Well, I don't think a full discussion of the subtlety about a module appearing under multiple names belongs in the tutorial, but I think the sentence could be amended to say "Statements in a module are executed only the *first* time the module name is encountered in an import statement". The other is indeed a bug (IMO the sentence is missing the word 'definition', as in 'execution of a function definition'). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 20:36:08 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 07 Aug 2012 18:36:08 +0000 Subject: [docs] [issue15501] Document exception classes in subprocess module In-Reply-To: <1343655102.86.0.835171642678.issue15501@psf.upfronthosting.co.za> Message-ID: <1344364568.07.0.584155808803.issue15501@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 7 20:57:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 07 Aug 2012 18:57:57 +0000 Subject: [docs] [issue15572] Python2 documentation of the file() built-in function In-Reply-To: <1344337126.35.0.910638419892.issue15572@psf.upfronthosting.co.za> Message-ID: <3Ws4jv0Kj5zQ04@mail.python.org> Roundup Robot added the comment: New changeset db1b4aab53eb by Benjamin Peterson in branch '2.7': make documented file() kw names and actual ones agree (closes #15572) http://hg.python.org/cpython/rev/db1b4aab53eb ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 03:49:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 08 Aug 2012 01:49:39 +0000 Subject: [docs] [issue15580] fix True/False/None reST markup Message-ID: <1344390578.71.0.326693298402.issue15580@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The Dev Guide says not to markup True, False, and None in the documentation in a way that generates a link (e.g. ":const:`True`") because "they?re fundamental to the language and should be known to any programmer": http://docs.python.org/devguide/documenting.html#documenting Rather, it says to use "``True``" (and similarly for False and None): This issue is to update the documentation to conform to this guidance. While working on the documentation, I noticed many occurrences of ":const:`True`", for example. See here for some examples, where you can see the hyperlinks: http://docs.python.org/dev/library/tarfile.html#tarfile.TarFile.add ---------- assignee: docs at python components: Documentation messages: 167648 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: fix True/False/None reST markup _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 03:53:23 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 08 Aug 2012 01:53:23 +0000 Subject: [docs] [issue15580] fix True/False/None reST markup In-Reply-To: <1344390578.71.0.326693298402.issue15580@psf.upfronthosting.co.za> Message-ID: <1344390802.48.0.296522668118.issue15580@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is a command to find the file names of all occurrences: find Doc -type f -name *.rst | xargs grep -ERl ":const:\`(True|False|None)\`" The occurrences are in the following directories: Doc/c-api/ Doc/library/ Doc/reference/ Doc/whatsnew/ And here are commands to do the replacement on a branch. # Replace the occurrences inside tables, to preserve table alignment. find Doc/c-api/ Doc/library/ Doc/reference/ -type f -name *.rst | \ xargs sed -i '' \ -e 's/\(\|.*\):const:`True`/\1``True`` /g' \ -e 's/\(\|.*\):const:`False`/\1``False`` /g' \ -e 's/\(\|.*\):const:`None`/\1``None`` /g' # Replace the rest of the occurrences. find Doc/c-api/ Doc/library/ Doc/reference/ -type f -name *.rst | \ xargs sed -i '' \ -e 's/:const:`True`/``True``/g' \ -e 's/:const:`False`/``False``/g' \ -e 's/:const:`None`/``None``/g' I left out Doc/whatsnew/ because the What's New is historical and because it includes entries describing the introduction of True/False, which may be considered special. Incidentally, the constants documentation of True/False/None link to the descriptions using ":data:`True`", etc, so they are not affected by this change: http://docs.python.org/dev/library/constants.html#built-in-constants To commit, the commands above could be run on a branch and committed, then merged forward to newer branches, and then the scripts re-run on the next newer branch to catch new introductions of True/False/None, and so on. For illustration purposes only, I'm attaching the patch that results from running the script on the default branch. ---------- keywords: +patch Added file: http://bugs.python.org/file26723/script-result-default-branch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 05:10:52 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 08 Aug 2012 03:10:52 +0000 Subject: [docs] [issue15580] fix True/False/None reST markup In-Reply-To: <1344390578.71.0.326693298402.issue15580@psf.upfronthosting.co.za> Message-ID: <1344395452.73.0.441841612382.issue15580@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- stage: -> patch review versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 06:27:01 2012 From: report at bugs.python.org (Sarbjit singh) Date: Wed, 08 Aug 2012 04:27:01 +0000 Subject: [docs] [issue15583] Provide examples in Python doc for usage of various modules Message-ID: <1344400021.49.0.93410153522.issue15583@psf.upfronthosting.co.za> New submission from Sarbjit singh: For beginners who are learning Python, it would be very helpful if Python doc could provide examples on usage of various methods/attributes of different modules. For eg: If you look at ElementTree XMl module or take any other standard module, examples which are provided are very limited making it hard for new users to learn those modules and have to search internet for its usage. Providing examples on usage of module attributes/methods will help users to quickly understand it. ---------- assignee: docs at python components: Documentation messages: 167657 nosy: Sarbjit.singh, docs at python priority: normal severity: normal status: open title: Provide examples in Python doc for usage of various modules type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 06:30:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 08 Aug 2012 04:30:41 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344400241.13.0.792041476284.issue15561@psf.upfronthosting.co.za> Chris Jerdonek added the comment: io module experts: Can one of you review this minor change to the subprocess documentation to make it reference the newly added io.TextIOWrapper documentation changes? For background purposes, digging back, it looks like the original change to subprocess was made here: 9ce8fa0a0899 ---------- nosy: +benjamin.peterson, hynek, pitrou, stutzbach versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 06:34:28 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 08 Aug 2012 04:34:28 +0000 Subject: [docs] [issue15583] Provide examples in Python doc for usage of various modules In-Reply-To: <1344400021.49.0.93410153522.issue15583@psf.upfronthosting.co.za> Message-ID: <1344400468.25.0.926899176785.issue15583@psf.upfronthosting.co.za> Ezio Melotti added the comment: > If you look at ElementTree XMl module or take any other > standard module, examples which are provided are very limited We already try to provide examples where/when appropriate, and several modules have examples showing the basic usage. Often, documenting all the methods will only make the documentation less readable, so only the most important/common functions/methods have examples. Some modules also have separate howtos that contain extensive examples. If you think some specific module (like ElementTree) needs more examples, feel free to open specific reports. ---------- nosy: +eli.bendersky, ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 07:03:25 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 08 Aug 2012 05:03:25 +0000 Subject: [docs] [issue15580] fix True/False/None reST markup In-Reply-To: <1344390578.71.0.326693298402.issue15580@psf.upfronthosting.co.za> Message-ID: <1344402205.84.0.582190784501.issue15580@psf.upfronthosting.co.za> R. David Murray added the comment: I think changing these is unnecessary churn. Change them when you change surrounding text, just like we refrain from refactoring for PEP 8 compliance, etc, unless we are changing the code for other reasons. There is nothing *wrong* with these being links, it just isn't necessary. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 07:07:47 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 08 Aug 2012 05:07:47 +0000 Subject: [docs] [issue15583] Provide examples in Python doc for usage of various modules In-Reply-To: <1344400021.49.0.93410153522.issue15583@psf.upfronthosting.co.za> Message-ID: <1344402467.4.0.589380432227.issue15583@psf.upfronthosting.co.za> R. David Murray added the comment: I'm closing this with no specific resolution because the real resolution is "this issue is too general" :) As Ezio said, specific suggestions are welcome, but should be in separate issues limited to the module/example proposed. ---------- nosy: +r.david.murray stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 07:17:07 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Wed, 08 Aug 2012 05:17:07 +0000 Subject: [docs] [issue15584] os.popen deprecation warning not in Python 3 docs Message-ID: <1344403027.9.0.851552943116.issue15584@psf.upfronthosting.co.za> New submission from Ramchandra Apte: The os.popen deprecation warning is not in the Python 3 docs! ---------- assignee: docs at python components: Documentation messages: 167662 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: os.popen deprecation warning not in Python 3 docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 08:04:38 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 08 Aug 2012 06:04:38 +0000 Subject: [docs] [issue15580] fix True/False/None reST markup In-Reply-To: <1344390578.71.0.326693298402.issue15580@psf.upfronthosting.co.za> Message-ID: <1344405872.82.0.828393243471.issue15580@psf.upfronthosting.co.za> Georg Brandl added the comment: Agreed with David. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 08:15:12 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 08 Aug 2012 06:15:12 +0000 Subject: [docs] [issue15580] fix True/False/None reST markup In-Reply-To: <1344390578.71.0.326693298402.issue15580@psf.upfronthosting.co.za> Message-ID: <1344406489.39.0.927319759555.issue15580@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Yes, I can see the trade off. However, is there a sense in which the situation for documentation could be different from the situation for code? With code, style and refactoring changes cause churn without directly benefiting the end user (because code is just a means and not the end). We can hold off on refactoring without impacting the end user. With documentation though, these are visible, albeit small changes that will directly improve the user's experience. We would be holding off on improving the pages for the sake of internal churn. (If it was refactoring reST in a way that didn't change the HTML output, it would be a different story.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 08:22:46 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 08 Aug 2012 06:22:46 +0000 Subject: [docs] [issue15580] fix True/False/None reST markup In-Reply-To: <1344390578.71.0.326693298402.issue15580@psf.upfronthosting.co.za> Message-ID: <1344406966.9.0.0743007101614.issue15580@psf.upfronthosting.co.za> Georg Brandl added the comment: We have to draw the line somewhere. Otherwise there will be dozens of issues like this, introducing potential breakage and costing developer time that can better be spent elsewhere. The rule in the devguide is mostly there so that developers don't bother writing more than they have to (since None/True/False occur so often typing the link every time will feel painful after a few times). If the link is already written, it does absolutely no harm, as David said. Therefore, there is no actual improvement as you claim. This is nothing against you and your efforts, Chris -- you've already helped improve the docs quite a lot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 08:34:39 2012 From: report at bugs.python.org (Sarbjit singh) Date: Wed, 08 Aug 2012 06:34:39 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes Message-ID: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> New submission from Sarbjit singh: Please provide some basic usage examples for ElementTree module documentation. While parsing an xml, most common scenarios will be reading elements from xml, modifying elements, removal of elements. Though there are few examples given for modification of xml element. But if you look from beginners learning point of view, its very hard to just get any idea from the example that is currently provided. There is lot of text there, but what would be more helpful is some small examples for each function so that user can quickly understand its usage there only. I myself is learning Python, but in order to start using this module, i had to search lot of articles on internet on usage of this module. If we could have provided some basic use cases in Python doc itself, user would not have to rely on external sources for learning its usage. Some Basic Scenarios: 1) Parsing an xml and finding some elements of xml 2) deletion of an element from an xml and writing back 3) Modification of an xml element 4) Usage of XPath queries (some basic usage) ---------- assignee: docs at python components: Documentation messages: 167670 nosy: Sarbjit.singh, docs at python, eli.bendersky priority: normal severity: normal status: open title: Provide some examples for usage of ElementTree methods/attributes type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 08:38:36 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 08 Aug 2012 06:38:36 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344407916.13.0.0706657408958.issue15586@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 09:30:59 2012 From: report at bugs.python.org (patrick vrijlandt) Date: Wed, 08 Aug 2012 07:30:59 +0000 Subject: [docs] [issue15588] quopri: encodestring and decodestring handle bytes, not strings Message-ID: <1344411059.45.0.404148694214.issue15588@psf.upfronthosting.co.za> New submission from patrick vrijlandt: quopri.py's functions encodestring and decodestring are documented to handle strings; and this is clearly suggested by their name. However, these functions accept and return bytes, not strings. This should be reflected in the documentation. Even better: deprecate these functions and introduce new ones with behaviour as suggested by their names: encode_string, encode_bytes etc. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 167672 nosy: docs at python, patrick.vrijlandt priority: normal severity: normal status: open title: quopri: encodestring and decodestring handle bytes, not strings type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 14:38:41 2012 From: report at bugs.python.org (Daniel Ellis) Date: Wed, 08 Aug 2012 12:38:41 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344429520.88.0.347264324613.issue15586@psf.upfronthosting.co.za> Daniel Ellis added the comment: I have been working with ElementTree for the last few months and would love to help out with this. ---------- nosy: +Daniel.Ellis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 18:07:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 08 Aug 2012 16:07:10 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344442029.94.0.342668698307.issue15586@psf.upfronthosting.co.za> Ezio Melotti added the comment: Daniel, I would suggest you to start with a basic example that gives an idea about how to use the module and its main functionalities. If necessary you could add a section at the bottom with more examples. You can also show how a method works with a short snippet (2-3 lines) just after the documentation of the method, but this doesn't mean that every method should have one. If you have lot of examples you might consider doing a separate tutorial/howto. As a reference see the examples in http://docs.python.org/py3k/library/html.parser.html and http://docs.python.org/py3k/library/unittest.html#basic-example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 18:33:29 2012 From: report at bugs.python.org (Daniel Ellis) Date: Wed, 08 Aug 2012 16:33:29 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344442029.94.0.342668698307.issue15586@psf.upfronthosting.co.za> Message-ID: Daniel Ellis added the comment: Thank you Ezio, I will use that as a reference. What is the general workflow for updating documentation across python versions? Should I check to see if the documentation for the module changes across python versions and create patches for each version? Or is it sufficient to create a patch for one version? On Wed, Aug 8, 2012 at 12:07 PM, Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Daniel, I would suggest you to start with a basic example that gives an > idea about how to use the module and its main functionalities. If > necessary you could add a section at the bottom with more examples. > You can also show how a method works with a short snippet (2-3 lines) just > after the documentation of the method, but this doesn't mean that every > method should have one. > If you have lot of examples you might consider doing a separate > tutorial/howto. > > As a reference see the examples in > http://docs.python.org/py3k/library/html.parser.html and > http://docs.python.org/py3k/library/unittest.html#basic-example. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 18:36:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 08 Aug 2012 16:36:47 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344443807.39.0.641868719512.issue15586@psf.upfronthosting.co.za> Ezio Melotti added the comment: Usually a patch against "default" (i.e. Python 3) is enough, if there are several differences with Python 2 you might want to provide one for 2.7 too. See also the devguide at http://docs.python.org/devguide/ for more information about the workflow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 19:30:00 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 08 Aug 2012 17:30:00 +0000 Subject: [docs] [issue15584] os.popen deprecation warning not in Python 3 docs In-Reply-To: <1344403027.9.0.851552943116.issue15584@psf.upfronthosting.co.za> Message-ID: <1344447000.09.0.839489873284.issue15584@psf.upfronthosting.co.za> R. David Murray added the comment: That's because we ultimately decided not to remove it. ---------- nosy: +r.david.murray resolution: -> duplicate status: open -> closed superseder: -> os.popen documentation is probably wrong _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 19:39:56 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 08 Aug 2012 17:39:56 +0000 Subject: [docs] [issue15588] quopri: encodestring and decodestring handle bytes, not strings In-Reply-To: <1344411059.45.0.404148694214.issue15588@psf.upfronthosting.co.za> Message-ID: <1344447596.35.0.422474719043.issue15588@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +email nosy: +barry, r.david.murray versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 19:51:53 2012 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 08 Aug 2012 17:51:53 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344448313.53.0.973070046747.issue15586@psf.upfronthosting.co.za> Eli Bendersky added the comment: Please note that the documentation of ET has been significantly improved in 3.3, with added examples, etc. You can start by backporting whatever is relevant to earlier versions (2.7/3.2) - do not add new documentation contents to 2.7/3.2 before the changes from 3.3 are backported, because we can't have divergent docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 20:34:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 08 Aug 2012 18:34:51 +0000 Subject: [docs] [issue15501] Document exception classes in subprocess module In-Reply-To: <1343655102.86.0.835171642678.issue15501@psf.upfronthosting.co.za> Message-ID: <1344450891.45.0.889055653541.issue15501@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Please update your patches: 1. use attribute:: 2. point base class for exception if it is not Exception 3. enumerate all attributes (`cmd` for CalledProcessError) Example: .. exception:: HTTPError Though being an exception (a subclass of :exc:`URLError`), an :exc:`HTTPError` can also function as a non-exceptional file-like return value (the same thing that :func:`urlopen` returns). This is useful when handling exotic HTTP errors, such as requests for authentication. .. attribute:: code An HTTP status code as defined in `RFC 2616 `_. This numeric value corresponds to a value found in the dictionary of codes as found in :attr:`BaseHTTPServer.BaseHTTPRequestHandler.responses`. Also please fill Contributor Agreement: http://www.python.org/psf/contrib/ ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 20:53:39 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 08 Aug 2012 18:53:39 +0000 Subject: [docs] [issue15151] Documentation for Signature, Parameter and signature in inspect module In-Reply-To: <1340432030.73.0.594662136445.issue15151@psf.upfronthosting.co.za> Message-ID: <1344452019.24.0.537001376646.issue15151@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Yury, please updete your patch to pass doctest: ./python -m doctest Doc/library/inspect.html ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From andrew.svetlov at gmail.com Wed Aug 8 21:14:48 2012 From: andrew.svetlov at gmail.com (andrew.svetlov at gmail.com) Date: Wed, 08 Aug 2012 19:14:48 -0000 Subject: [docs] Documentation for Signature, Parameter and signature in inspect module (issue 15151) Message-ID: <20120808191448.5814.51243@psf.upfronthosting.co.za> docs review http://bugs.python.org/review/15151/diff/5438/Doc/library/inspect.rst File Doc/library/inspect.rst (right): http://bugs.python.org/review/15151/diff/5438/Doc/library/inspect.rst#newcode432 Doc/library/inspect.rst:432: provide no metadata about their arguments. maybe "metadata for their arguments"? http://bugs.python.org/review/15151/diff/5438/Doc/library/inspect.rst#newcode442 Doc/library/inspect.rst:442: a modified copy put dot at end http://bugs.python.org/review/15151/diff/5438/Doc/library/inspect.rst#newcode547 Doc/library/inspect.rst:547: **Example** Just remove this line. Bold looks ugly from my perspective http://bugs.python.org/review/15151/diff/5438/Doc/library/inspect.rst#newcode607 Doc/library/inspect.rst:607: >>> def foo(a, b=10): Deindent example to avoid gray border around. Not sure. http://bugs.python.org/review/15151/ From report at bugs.python.org Wed Aug 8 21:47:51 2012 From: report at bugs.python.org (Rob Kinyon) Date: Wed, 08 Aug 2012 19:47:51 +0000 Subject: [docs] [issue15593] urlparse.parse_qs documentation wrong re: urlencode Message-ID: <1344455271.07.0.337513141168.issue15593@psf.upfronthosting.co.za> New submission from Rob Kinyon: This may appear to be a duplicate of http://bugs.python.org/issue12390 and http://bugs.python.org/issue833405, but it's not. The documentation of urlparse.parse_qs() should state that in order for urllib.urlencode to properly reverse its output, the doseq parameter must be set to True. Please amend the documentation to make this very clear. Ideally, the documentation of urlencode() would also make it clear that doseq=True is required if the output is from parse_qs(). ---------- assignee: docs at python components: Documentation messages: 167707 nosy: Rob.Kinyon, docs at python priority: normal severity: normal status: open title: urlparse.parse_qs documentation wrong re: urlencode versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 8 22:26:18 2012 From: report at bugs.python.org (Daniel Ellis) Date: Wed, 08 Aug 2012 20:26:18 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344457577.91.0.451583840796.issue15586@psf.upfronthosting.co.za> Daniel Ellis added the comment: I've made a couple more additions/changes to the documentation in the default branch, per Eli's recommendation, since there were already a lot of good examples added. I'd like to also backport this to 2.7 but wanted to make sure these changes were good before moving forward. I just saw Eli's message about doing the backporting before making further changes but had already been working on making these changes. I can go ahead and work on the backport if you feel this patch is too much to do first, but I believe every example I added is backwards compatible. ---------- keywords: +patch Added file: http://bugs.python.org/file26726/default_branch_etree_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 00:33:38 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 08 Aug 2012 22:33:38 +0000 Subject: [docs] [issue15569] Doc doc: incorrect description of some roles as format-only In-Reply-To: <1344302647.18.0.307450045197.issue15569@psf.upfronthosting.co.za> Message-ID: <1344465218.6.0.215742565599.issue15569@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> docs at python nosy: +docs at python, eric.araujo stage: -> needs patch title: Dev Guide format-only roles -> Doc doc: incorrect description of some roles as format-only _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 07:22:18 2012 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 09 Aug 2012 05:22:18 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344489738.95.0.308986936285.issue15586@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From eliben at gmail.com Thu Aug 9 09:44:44 2012 From: eliben at gmail.com (eliben at gmail.com) Date: Thu, 09 Aug 2012 07:44:44 -0000 Subject: [docs] Provide some examples for usage of ElementTree methods/attributes (issue 15586) Message-ID: <20120809074444.5895.70683@psf.upfronthosting.co.za> http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst File Doc/library/xml.etree.elementtree.rst (right): http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode40 Doc/library/xml.etree.elementtree.rst:40: .. code-block:: xml Nice! http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode69 Doc/library/xml.etree.elementtree.rst:69: tree = ET() Why are you calling the module here? Did you actually execute the examples? Please make sure all examples execute correctly. For loading data from the file, use ElementTree's constructor. No need to invoke the parse method as well. http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode73 Doc/library/xml.etree.elementtree.rst:73: Reading the file from a remote URL:: I don't think the urllib example belongs here. It's clear that if ET can build itself from files, streams and strings, than everything that produces those will work. http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode125 Doc/library/xml.etree.elementtree.rst:125: If a more strict reliance on tree structure is desired, :meth:`Element.findall` I'd remove the "if a more strict reliance..." part. I'm not sure what it means. The findall/find examples are good http://bugs.python.org/review/15586/ From report at bugs.python.org Thu Aug 9 09:45:50 2012 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 09 Aug 2012 07:45:50 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344498349.65.0.455737722523.issue15586@psf.upfronthosting.co.za> Eli Bendersky added the comment: I provided some comments on your patch in the code-review tool. Thanks for the contribution, Daniel. It's fine to first apply these changes to 3.3 and then backport to 2.7 (I don't think 3.2 is necessary because most users use the online docs anyway). ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 09:46:08 2012 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 09 Aug 2012 07:46:08 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344498368.79.0.548098803737.issue15586@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 09:47:47 2012 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 09 Aug 2012 07:47:47 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344498467.73.0.0850538261643.issue15586@psf.upfronthosting.co.za> Eli Bendersky added the comment: Sarbjit, if you look at the docs of 3.3, I think most of what you're asking for is there (especially once you count Daniel's commit). What else is missing in your opinion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 09:52:08 2012 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 09 Aug 2012 07:52:08 +0000 Subject: [docs] [issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py In-Reply-To: <1341110073.6.0.573832115517.issue15231@psf.upfronthosting.co.za> Message-ID: <1344498728.4.0.878268594421.issue15231@psf.upfronthosting.co.za> Eli Bendersky added the comment: My job is done here. ?ric - assigning to you for distutils2, once it becomes relevant. ---------- assignee: docs at python -> eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 09:52:29 2012 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 09 Aug 2012 07:52:29 +0000 Subject: [docs] [issue15231] update PyPI upload doc to say --no-raw passed to rst2html.py In-Reply-To: <1341110073.6.0.573832115517.issue15231@psf.upfronthosting.co.za> Message-ID: <1344498749.93.0.576315869215.issue15231@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: -eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 10:11:56 2012 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 09 Aug 2012 08:11:56 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344499916.61.0.398592354834.issue15586@psf.upfronthosting.co.za> Eli Bendersky added the comment: Sarbjit: first of all, look at the up-to-date documentation for 3.3 (it's available online at http://docs.python.org/dev/ Then, on a checkout of the 3.3 code (default branch) you can apply Daniel's patch (it's in the "Files" section in this Issue) and look at the updated documentation. MOST IMPORTANTLY: read http://docs.python.org/devguide/index.html thoroughly - it will answer most of your questions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 10:19:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 09 Aug 2012 08:19:48 +0000 Subject: [docs] [issue15457] consistent treatment of generator terminology In-Reply-To: <1343302676.51.0.168761959505.issue15457@psf.upfronthosting.co.za> Message-ID: <1344500387.93.0.362933816239.issue15457@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Note to reviewers: changing to "needs patch" because I want to make changes to the latest patch before this is reviewed (e.g. to the index directives). I should be able to do this by the end of the weekend. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 10:36:40 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 09 Aug 2012 08:36:40 +0000 Subject: [docs] [issue15355] generator docs should mention already-executing exception In-Reply-To: <1342312261.31.0.534711044354.issue15355@psf.upfronthosting.co.za> Message-ID: <1344501400.08.0.48755334652.issue15355@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Nick, would you be able to take a look at this minor documentation patch re: generators? Would you prefer this blanket statement, or an explicit (possibly repeated) statement inside the documentation of each method? ---------- versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From ezio.melotti at gmail.com Thu Aug 9 10:51:48 2012 From: ezio.melotti at gmail.com (ezio.melotti at gmail.com) Date: Thu, 09 Aug 2012 08:51:48 -0000 Subject: [docs] Provide some examples for usage of ElementTree methods/attributes (issue 15586) Message-ID: <20120809085148.5895.69140@psf.upfronthosting.co.za> http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst File Doc/library/xml.etree.elementtree.rst (right): http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode129 Doc/library/xml.etree.elementtree.rst:129: :meth:`Element.text` accesses the element's content:: I would rephrase this paragraph to have 3 sentences: the first about findall, the second about find and text, and the third about get. + :meth:`Element.get` safely accesses attributes. Why safely? What happens if the attribute is missing? (I'm not saying these should be answered here, but the use of "safely" makes me wonder). +:meth:`Element.text` accesses the element's content Is the "content" only text nodes? http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode133 Doc/library/xml.etree.elementtree.rst:133: ... print(country.get('name'), rank) I would change the last line to: name = country.get('name') print(name, rank) so that the methods used in the first 3 lines matches the 3 sentences in the previous paragraph. http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode137 Doc/library/xml.etree.elementtree.rst:137: 68 Panama If you printed name and rank, why are these showing rank and name? http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode153 Doc/library/xml.etree.elementtree.rst:153: Let's say we want to subtract one from each country's rank:: s/subtract/add/ http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode158 Doc/library/xml.etree.elementtree.rst:158: ... rank.set('updated', 'yes') I would add something like ", and add an ``updated`` attribute to the rank element" or ", and mark it with an ``updated`` attribute" to the previous sentence. http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode159 Doc/library/xml.etree.elementtree.rst:159: ... tree.write('output.xml') Leave an empty line before this (same with the following examples). http://bugs.python.org/review/15586/ From report at bugs.python.org Thu Aug 9 13:03:00 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Aug 2012 11:03:00 +0000 Subject: [docs] [issue15151] Documentation for Signature, Parameter and signature in inspect module In-Reply-To: <1340432030.73.0.594662136445.issue15151@psf.upfronthosting.co.za> Message-ID: <1344510180.33.0.279276102224.issue15151@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Update patch ---------- Added file: http://bugs.python.org/file26737/inspect.pep362.4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 13:26:49 2012 From: report at bugs.python.org (Anton Barkovsky) Date: Thu, 09 Aug 2012 11:26:49 +0000 Subject: [docs] [issue15501] Document exception classes in subprocess module In-Reply-To: <1343655102.86.0.835171642678.issue15501@psf.upfronthosting.co.za> Message-ID: <1344511609.91.0.0133580834007.issue15501@psf.upfronthosting.co.za> Changes by Anton Barkovsky : Added file: http://bugs.python.org/file26738/subprocess_doc_2.7_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 13:26:57 2012 From: report at bugs.python.org (Anton Barkovsky) Date: Thu, 09 Aug 2012 11:26:57 +0000 Subject: [docs] [issue15501] Document exception classes in subprocess module In-Reply-To: <1343655102.86.0.835171642678.issue15501@psf.upfronthosting.co.za> Message-ID: <1344511617.29.0.704663372874.issue15501@psf.upfronthosting.co.za> Changes by Anton Barkovsky : Added file: http://bugs.python.org/file26739/subprocess_doc_3.2_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 13:27:04 2012 From: report at bugs.python.org (Anton Barkovsky) Date: Thu, 09 Aug 2012 11:27:04 +0000 Subject: [docs] [issue15501] Document exception classes in subprocess module In-Reply-To: <1343655102.86.0.835171642678.issue15501@psf.upfronthosting.co.za> Message-ID: <1344511624.12.0.369217476602.issue15501@psf.upfronthosting.co.za> Changes by Anton Barkovsky : Added file: http://bugs.python.org/file26740/subprocess_doc_3.3_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 13:27:32 2012 From: report at bugs.python.org (Anton Barkovsky) Date: Thu, 09 Aug 2012 11:27:32 +0000 Subject: [docs] [issue15501] Document exception classes in subprocess module In-Reply-To: <1343655102.86.0.835171642678.issue15501@psf.upfronthosting.co.za> Message-ID: <1344511651.69.0.162930884196.issue15501@psf.upfronthosting.co.za> Anton Barkovsky added the comment: Updated. ---------- _______________________________________ Python tracker _______________________________________ From yselivanov.ml at gmail.com Thu Aug 9 13:44:00 2012 From: yselivanov.ml at gmail.com (yselivanov.ml at gmail.com) Date: Thu, 09 Aug 2012 11:44:00 -0000 Subject: [docs] Documentation for Signature, Parameter and signature in inspect module (issue 15151) Message-ID: <20120809114400.6063.2184@psf.upfronthosting.co.za> http://bugs.python.org/review/15151/diff/5438/Doc/library/inspect.rst File Doc/library/inspect.rst (right): http://bugs.python.org/review/15151/diff/5438/Doc/library/inspect.rst#newcode432 Doc/library/inspect.rst:432: provide no metadata about their arguments. On 2012/08/08 21:14:48, asvetlov wrote: > maybe "metadata for their arguments"? "about" is better. http://bugs.python.org/review/15151/diff/5438/Doc/library/inspect.rst#newcode442 Doc/library/inspect.rst:442: a modified copy On 2012/08/08 21:14:48, asvetlov wrote: > put dot at end agree http://bugs.python.org/review/15151/diff/5438/Doc/library/inspect.rst#newcode547 Doc/library/inspect.rst:547: **Example** On 2012/08/08 21:14:48, asvetlov wrote: > Just remove this line. Bold looks ugly from my perspective well, there needs to be some kind of header. http://bugs.python.org/review/15151/diff/5438/Doc/library/inspect.rst#newcode607 Doc/library/inspect.rst:607: >>> def foo(a, b=10): On 2012/08/08 21:14:48, asvetlov wrote: > Deindent example to avoid gray border around. Not sure. I actually like how grey borders separate examples from other content. Makes it easier to read http://bugs.python.org/review/15151/ From report at bugs.python.org Thu Aug 9 13:47:22 2012 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 09 Aug 2012 11:47:22 +0000 Subject: [docs] [issue15151] Documentation for Signature, Parameter and signature in inspect module In-Reply-To: <1340432030.73.0.594662136445.issue15151@psf.upfronthosting.co.za> Message-ID: <1344512842.58.0.765500370943.issue15151@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thanks a lot for the patch update, Andrew! Please let me glance over it once again today/tomorrow before you commit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 14:28:03 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 09 Aug 2012 12:28:03 +0000 Subject: [docs] [issue15501] Document exception classes in subprocess module In-Reply-To: <1343655102.86.0.835171642678.issue15501@psf.upfronthosting.co.za> Message-ID: <3Wt7z24nkPzQ26@mail.python.org> Roundup Robot added the comment: New changeset b863e231ad9f by Andrew Svetlov in branch 'default': Issue #15501: Document exception classes in subprocess module. http://hg.python.org/cpython/rev/b863e231ad9f New changeset 1e8f6d8e5c0e by Andrew Svetlov in branch '3.2': Issue #15501: Document exception classes in subprocess module. http://hg.python.org/cpython/rev/1e8f6d8e5c0e New changeset 9c99f31a9c2a by Andrew Svetlov in branch '2.7': Issue #15501: Document exception classes in subprocess module. http://hg.python.org/cpython/rev/9c99f31a9c2a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 14:34:07 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Aug 2012 12:34:07 +0000 Subject: [docs] [issue14966] Fully document subprocess.CalledProcessError In-Reply-To: <1338446762.96.0.360332771622.issue14966@psf.upfronthosting.co.za> Message-ID: <1344515647.09.0.389586767185.issue14966@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Documented in #15501. I like to close this issue as duplicate. If anybody don't agree with closing feel free to reopen this one. ---------- nosy: +asvetlov resolution: -> duplicate stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 14:35:14 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Aug 2012 12:35:14 +0000 Subject: [docs] [issue15501] Document exception classes in subprocess module In-Reply-To: <1343655102.86.0.835171642678.issue15501@psf.upfronthosting.co.za> Message-ID: <1344515714.7.0.495055669817.issue15501@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thank you, Anton. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed superseder: -> Fully document subprocess.CalledProcessError _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 15:14:48 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Aug 2012 13:14:48 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344518088.33.0.878374372478.issue15527@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 15:22:17 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 09 Aug 2012 13:22:17 +0000 Subject: [docs] [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1344518537.42.0.231579386942.issue4966@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 15:26:59 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Aug 2012 13:26:59 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344518819.57.0.312489771447.issue15561@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 15:28:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 09 Aug 2012 13:28:02 +0000 Subject: [docs] [issue10702] bytes and bytearray methods are not documented In-Reply-To: <1292347564.88.0.542769666771.issue10702@psf.upfronthosting.co.za> Message-ID: <1344518882.27.0.340109220467.issue10702@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, ncoghlan stage: -> needs patch type: -> enhancement versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 15:31:53 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 09 Aug 2012 13:31:53 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1344519113.26.0.351120053421.issue11643@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- type: -> enhancement versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From ellisd23 at gmail.com Thu Aug 9 15:36:03 2012 From: ellisd23 at gmail.com (ellisd23 at gmail.com) Date: Thu, 09 Aug 2012 13:36:03 -0000 Subject: [docs] Provide some examples for usage of ElementTree methods/attributes (issue 15586) Message-ID: <20120809133603.6063.98118@psf.upfronthosting.co.za> Thank you Eli and Ezio for your comments. I have made changes per your suggestions and will upload the patch now. http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst File Doc/library/xml.etree.elementtree.rst (right): http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode69 Doc/library/xml.etree.elementtree.rst:69: tree = ET() I apologize. I originally wrote examples that ran and then saw that the development version of the docs already had examples, so I attempted to change over mine to match. On 2012/08/09 09:44:44, eli.bendersky wrote: > Why are you calling the module here? Did you actually execute the examples? > Please make sure all examples execute correctly. > > For loading data from the file, use ElementTree's constructor. No need to invoke > the parse method as well. http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode73 Doc/library/xml.etree.elementtree.rst:73: Reading the file from a remote URL:: I guess the only point of confusion I saw is that when parsing from a file (as a above), rather than taking a file object, parse takes the filename in the current working directory. I'll go ahead and remove it though, unless you think this point is valid. On 2012/08/09 09:44:44, eli.bendersky wrote: > I don't think the urllib example belongs here. It's clear that if ET can build > itself from files, streams and strings, than everything that produces those will > work. http://bugs.python.org/review/15586/diff/5683/Doc/library/xml.etree.elementtree.rst#newcode159 Doc/library/xml.etree.elementtree.rst:159: ... tree.write('output.xml') I'm not sure from the code review tool which line you mean, though I think it is 159. Let me know if I'm wrong. On 2012/08/09 10:51:48, ezio.melotti wrote: > Leave an empty line before this (same with the following examples). http://bugs.python.org/review/15586/ From report at bugs.python.org Thu Aug 9 15:41:41 2012 From: report at bugs.python.org (Daniel Ellis) Date: Thu, 09 Aug 2012 13:41:41 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344519701.44.0.966525118285.issue15586@psf.upfronthosting.co.za> Daniel Ellis added the comment: Changes to documentation per Ezio and Eli's suggestions. ---------- Added file: http://bugs.python.org/file26741/default_branch_etree_doc_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 16:21:00 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 09 Aug 2012 14:21:00 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344522060.61.0.113264137853.issue15586@psf.upfronthosting.co.za> R. David Murray added the comment: My understanding is that we try to keep the documentation of all active branches (2.7, 3.2, and 3.3 currently) in sync except where there are new features/new deprecations in the development version. So if the 2.7 docs are update, I think the 3.2 docs should be too. There will be one more release of 3.2, and the Windows version will bundle the docs, so I think it is worthwhile to do. But I'm not going to do it, so if no one volunteers to do it and apply the patch, that's fine :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 16:44:01 2012 From: report at bugs.python.org (Daniel Ellis) Date: Thu, 09 Aug 2012 14:44:01 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344523440.85.0.843900868417.issue15586@psf.upfronthosting.co.za> Daniel Ellis added the comment: At the moment, the documentation for 2.7 is behind the documentation for 3.3. I will be working on backporting this next, but it will be a little more difficult than simply copying the existing documentation, since some key things in etree changed in the transition to 3.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 17:25:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 09 Aug 2012 15:25:54 +0000 Subject: [docs] [issue11643] Use |version| instead of X.Y in the doc In-Reply-To: <1300838111.66.0.617899175478.issue11643@psf.upfronthosting.co.za> Message-ID: <1344525954.69.0.436099884973.issue11643@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 17:32:23 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 09 Aug 2012 15:32:23 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344526343.04.0.144376466148.issue15561@psf.upfronthosting.co.za> Chris Jerdonek added the comment: In the process of working on issue 15595, I noticed that the documentation change will need to be slightly different for Python 3.2 than for 3.3. In 3.2, it is locale.getpreferredencoding() (which defaults to do_setlocale=True) instead of locale.getpreferredencoding(False). I will provide a patch adjusted for 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 17:35:48 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Aug 2012 15:35:48 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344526548.18.0.381969790049.issue15561@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Please do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 20:35:43 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Aug 2012 18:35:43 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344537343.47.0.041636432563.issue15527@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Sorry, I forgot to mention issue number in commit messages. So it's 9c99f31a9c2a 96cc3ab243e5 and 1e8f6d8e5c0e commits. Thanks for report. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 20:40:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Aug 2012 18:40:15 +0000 Subject: [docs] [issue15607] New print's argument "flush" is not mentioned in docstring Message-ID: <1344537615.2.0.181912402642.issue15607@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: New print's argument "flush" is not mentioned in docstring. ---------- assignee: docs at python components: Documentation keywords: easy messages: 167809 nosy: docs at python, storchaka priority: normal severity: normal stage: needs patch status: open title: New print's argument "flush" is not mentioned in docstring versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 20:51:02 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 09 Aug 2012 18:51:02 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344538262.15.0.0510768769297.issue15527@psf.upfronthosting.co.za> Georg Brandl added the comment: These commit hashes don't seem to match this issue. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 20:53:13 2012 From: report at bugs.python.org (Daniel Ellis) Date: Thu, 09 Aug 2012 18:53:13 +0000 Subject: [docs] [issue15607] New print's argument "flush" is not mentioned in docstring In-Reply-To: <1344537615.2.0.181912402642.issue15607@psf.upfronthosting.co.za> Message-ID: <1344538393.81.0.776008847341.issue15607@psf.upfronthosting.co.za> Daniel Ellis added the comment: I've updated the docstring. This is my first time editing a C module, so please let me know if I've done something egregiously wrong. ---------- keywords: +patch nosy: +Daniel.Ellis Added file: http://bugs.python.org/file26746/print_doc_add_flush.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 20:56:16 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Aug 2012 18:56:16 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344538576.29.0.946498087252.issue15527@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Sorry, Georg. A'm apologizing. Actual commit numbers are: 6dab233a115e a979b005a814 4787b9b2f860 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 21:02:41 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 09 Aug 2012 19:02:41 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344538961.76.0.227251990196.issue15527@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 21:05:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Aug 2012 19:05:40 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344539140.29.0.601620259813.issue15527@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thank you for reviewing every minor update. It's a big deal and heavy work! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 21:11:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 09 Aug 2012 19:11:18 +0000 Subject: [docs] [issue15555] Default newlines of io.TextIOWrapper In-Reply-To: <1344095998.81.0.573935781933.issue15555@psf.upfronthosting.co.za> Message-ID: <1344539478.2.0.877567820443.issue15555@psf.upfronthosting.co.za> Chris Jerdonek added the comment: What is the change to the documentation being suggested here? The code does reference os.linesep, so it seems like the documentation is correct, or am I missing something? self._writetranslate = newline != '' self._writenl = newline or os.linesep self._encoder = None http://hg.python.org/cpython/file/20a46c73855f/Lib/_pyio.py#l1501 ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 21:22:21 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 09 Aug 2012 19:22:21 +0000 Subject: [docs] [issue15555] Default newlines of io.TextIOWrapper In-Reply-To: <1344095998.81.0.573935781933.issue15555@psf.upfronthosting.co.za> Message-ID: <1344540141.81.0.0422018084178.issue15555@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think the C version does, though. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 21:34:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 09 Aug 2012 19:34:19 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344540859.33.0.931473927251.issue15527@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Hmm, I'm hoping that will be fixed by fixing of some markup words (:c:func:, :func:, :meth:, etc) processing, and not that they will simply be removed. :c:func: works only for function name without parameters or for function name with empty list of parameters inside the parentheses (:c:func:`PyMem_Malloc`, :c:func:`PyMem_Malloc()`, but not :c:func:`PyMem_Malloc(1)`). :c:macro: works also for non-empty list (:c:macro:`Py_CLEAR(obj)` for example). And Doc/c-api/memory.rst is not only one issue file. The list of suspicious places you can get by the followed command: find Doc/ -type f -name '*.rst' -exec egrep -n --color ':`\w+[(][^)]' '{}' + ---------- resolution: fixed -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 21:37:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 09 Aug 2012 19:37:19 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344541039.75.0.895090760145.issue15561@psf.upfronthosting.co.za> Changes by Chris Jerdonek : Added file: http://bugs.python.org/file26747/issue-15561-2-branch-32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 21:38:44 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 09 Aug 2012 19:38:44 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344541124.26.0.676070640068.issue15561@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I have uploaded updated patches for both 3.2 and the default branch. Thanks, Andrew. ---------- Added file: http://bugs.python.org/file26748/issue-15561-2-branch-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 21:42:40 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 09 Aug 2012 19:42:40 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344541360.91.0.652347212955.issue15527@psf.upfronthosting.co.za> Georg Brandl added the comment: The markup you mentioned will not be changed: these are two different usecases. Either you link to the function itself (:func:`blah`), or you show a piece of code (``blah(n)``). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 21:44:27 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 09 Aug 2012 19:44:27 +0000 Subject: [docs] [issue15608] Improve socketserver doc Message-ID: <1344541466.79.0.410789330017.issue15608@psf.upfronthosting.co.za> New submission from Terry J. Reedy: On Windows, 3.3 socketserver defines 12 classes in 3 categories: servers, server mixins, and handlers. (At least, these are the one listed with dir(socketserver). Only BaseServer is indexed. I think all should be. There are also a couple of text issues. BaseServer - indexed, doc is 20.19.2. Server Objects TCPServer - mentioned in diagram and text of 20.19.1 UDPServer - ditto (I presume *nix version have unixxxx classes also) ForkingMixIn - text of 20.19.1 ThreadingMixIn - ditto ForkingTCPServer ForkingUDPServer ThreadingTCPServer ThreadingUDPServer Text says "Forking and threading versions of each type of server can be created using the ForkingMixIn and ThreadingMixIn mix-in classes. For instance, a threading UDP server class is created as follows: class ThreadingUDPServer(ThreadingMixIn, UDPServer): pass The mix-in class must come first, since it overrides a method defined in UDPServer." "can be" means to me that user must create these. I am guessing that pre-defining them was added later. So text should change to 'have been'. The pre-created combinations should be listed. The last sentence could then say "Thhe mix-in class comes first since it overrides...". --- BaseRequestHandler This is documented in 20.19.2 RequestHandler Objects. But instead of starting with something like class socketserver.BaseRequestHandler This is the superclass of all RequestHandler objects. It defines the interface, given below, but does not implement most of the methods, which is done in subclasses. A new instance of the subclass is created for each request. analogous to the initial entry in 20.19.1, 20.19.2 starts with "The request handler class must define a new handle() method, and can override any of the following methods. A new instance is created for each request. I suggest that this be replaced with a standard class entry like the one above. If done, I resume the "RequestHandler" method prefix should be "BaseRequestHandler". StreamRequestHandler - these two are described in a paragraph DatagramRequestHandler - after the handle method entry --- In summary: 1. index all classes to point to locations indicated above. 2. state that mixin combinations are pre-defined. 3. give BaseRequestHandler a proper entry. 4. revise above as needed for *nix. 5. optionally adjust as needed for 2.7. ---------- assignee: docs at python components: Documentation messages: 167825 nosy: docs at python, terry.reedy priority: normal severity: normal status: open title: Improve socketserver doc versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 9 21:52:37 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 09 Aug 2012 19:52:37 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344541957.18.0.324979517511.issue15527@psf.upfronthosting.co.za> Andrew Svetlov added the comment: >From my perspective sphinx doesn't allow notations like :c:func:`PyMem_Malloc(1)` Do you want to publish bugfix for sphinx? Sounds like good idea, but that fix is out my current competence. I just fixed weird stuff which you pointed out. If you want to do more ? you are welcome. Please push a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 00:04:51 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 09 Aug 2012 22:04:51 +0000 Subject: [docs] [issue15608] Improve socketserver doc In-Reply-To: <1344541466.79.0.410789330017.issue15608@psf.upfronthosting.co.za> Message-ID: <1344549891.23.0.892964953014.issue15608@psf.upfronthosting.co.za> Terry J. Reedy added the comment: BaseRequestHandler.__init__(self, request) apparently attaches request to the instance as self.request. The methods are called in this order: setup, handle, finish. If they must be confusingly documented in the opposite order, it would be good for the head entry to state the correct order. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 00:07:10 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 09 Aug 2012 22:07:10 +0000 Subject: [docs] [issue15444] Incorrectly written contributor's names In-Reply-To: <1343161512.09.0.0619646494936.issue15444@psf.upfronthosting.co.za> Message-ID: <1344550030.08.0.717288503724.issue15444@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > While working on issue 15437, it occurred to me that storing the names in a structured form might come in handy. In a separate discussion, Ezio pointed out a case where we are already scraping data about members from doc files: http://hg.python.org/tracker/python-dev/file/69984a770ab5/extensions/jnosy.py So there is another case where we would benefit from storing names with associated attributes in a centralized, structured way. Sorry if this is a departure from the topic of this issue. I may create a separate issue for this or raise the idea in another forum. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 19:00:37 2012 From: report at bugs.python.org (Anton Barkovsky) Date: Fri, 10 Aug 2012 17:00:37 +0000 Subject: [docs] [issue15619] set.pop() documentation is confusing Message-ID: <1344618037.56.0.180857991175.issue15619@psf.upfronthosting.co.za> New submission from Anton Barkovsky: I've seen people being confused by the documentation for set.pop() method. It makes it look like the element is selected randomly while it's just unspecified. I'm attaching a patch that clarifies the doc, tested on 3.3, 3.2 and 2.7 ---------- assignee: docs at python components: Documentation files: set_pop_doc.patch keywords: patch messages: 167895 nosy: anton.barkovsky, docs at python priority: normal severity: normal status: open title: set.pop() documentation is confusing versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file26759/set_pop_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 19:14:18 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 10 Aug 2012 17:14:18 +0000 Subject: [docs] [issue15619] set.pop() documentation is confusing In-Reply-To: <1344618037.56.0.180857991175.issue15619@psf.upfronthosting.co.za> Message-ID: <1344618858.85.0.0163811307339.issue15619@psf.upfronthosting.co.za> Georg Brandl added the comment: Sorry, I don't see how "arbitrary" implies "random". So I'm -1 on making the docs more verbose for no apparent gain. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 19:40:16 2012 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 10 Aug 2012 17:40:16 +0000 Subject: [docs] [issue15619] set.pop() documentation is confusing In-Reply-To: <1344618037.56.0.180857991175.issue15619@psf.upfronthosting.co.za> Message-ID: <1344620416.35.0.529877050886.issue15619@psf.upfronthosting.co.za> Eli Bendersky added the comment: I agree with Georg. As far as I understand the word "arbitrary" - it describes the situation exactly. ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 19:55:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Aug 2012 17:55:03 +0000 Subject: [docs] [issue15444] Incorrectly written contributor's names In-Reply-To: <1343161512.09.0.0619646494936.issue15444@psf.upfronthosting.co.za> Message-ID: <1344621303.17.0.292931184532.issue15444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about patch review? ---------- keywords: +needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 19:56:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Aug 2012 17:56:12 +0000 Subject: [docs] [issue15444] Incorrectly written contributor's names In-Reply-To: <1343161512.09.0.0619646494936.issue15444@psf.upfronthosting.co.za> Message-ID: <1344621372.04.0.0419739225879.issue15444@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file26504/doc-nonascii-names.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 20:18:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Aug 2012 18:18:24 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344622704.44.0.0726340180796.issue15527@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, I don't know anything about the Sphinx, therefore, I do not know what is the problem and what the solution should be. 1) If this is the improper use of markup (the arguments are not supported and must not), we need to remove markup from other doc files (Doc/library/os.rst, Doc/library/platform.rst, Doc/library/unittest.rst, Doc/whatsnew/2.0.rst, Doc/whatsnew/2.1.rst, Doc/whatsnew/2.2.rst, Doc/whatsnew/2.3.rst, Doc/whatsnew/2.4.rst, Doc/whatsnew/2.5.rst, Doc/whatsnew/3.0.rst). 2) If the behaviour of the markup is controlled by configuration files, which are under the management of the CPython team, then these configuration files should be fixed. 3) If the behaviour of the markup is hardcoded inside the Sphinx, then it is the Sphinx bug and it should be reported to Sphinx team. I don't know what CPython team can/should do with it. Which of these variants is actual? Note, :c:macro: works for names with arguments, and :c:func:, :func:, :meth: did not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 20:22:34 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 10 Aug 2012 18:22:34 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344622954.71.0.756568130815.issue15527@psf.upfronthosting.co.za> Georg Brandl added the comment: 1) is correct. (And cmacro works because it's only for non-function macros anyway.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 20:27:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Aug 2012 18:27:03 +0000 Subject: [docs] [issue15607] New print's argument "flush" is not mentioned in docstring In-Reply-To: <1344537615.2.0.181912402642.issue15607@psf.upfronthosting.co.za> Message-ID: <1344623223.78.0.464933697124.issue15607@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 20:30:43 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 10 Aug 2012 18:30:43 +0000 Subject: [docs] [issue15607] New print's argument "flush" is not mentioned in docstring In-Reply-To: <1344537615.2.0.181912402642.issue15607@psf.upfronthosting.co.za> Message-ID: <1344623443.6.0.51233053263.issue15607@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 20:32:34 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 10 Aug 2012 18:32:34 +0000 Subject: [docs] [issue15619] set.pop() documentation is confusing In-Reply-To: <1344618037.56.0.180857991175.issue15619@psf.upfronthosting.co.za> Message-ID: <1344623554.2.0.353524877676.issue15619@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 21:40:02 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 10 Aug 2012 19:40:02 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344627602.31.0.85799452246.issue15527@psf.upfronthosting.co.za> Chris Jerdonek added the comment: - a distinct non-*NULL* pointer if possible, as if :c:func:`PyMem_Malloc(1)` had + a distinct non-*NULL* pointer if possible, as if ``PyMem_Malloc(1)`` had > From my perspective sphinx doesn't allow notations like :c:func:`PyMem_Malloc(1)` I believe that it does. Sphinx allows you to specify link text distinct from the target for various roles: http://docs.python.org/devguide/documenting.html#id3 So for the above, it would be-- :c:func:`PyMem_Malloc(1) ` I confirmed that this works. I think this is preferable to displaying the preferred text without any hyperlink. ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 22:55:53 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 10 Aug 2012 20:55:53 +0000 Subject: [docs] [issue15607] New print's argument "flush" is not mentioned in docstring In-Reply-To: <1344537615.2.0.181912402642.issue15607@psf.upfronthosting.co.za> Message-ID: <3WtzBY4yLwzQ4H@mail.python.org> Roundup Robot added the comment: New changeset e4877d59613d by Senthil Kumaran in branch 'default': Fix issue #15607: Update the print builtin function docstring with the new flush keyword. http://hg.python.org/cpython/rev/e4877d59613d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 23:03:37 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 10 Aug 2012 21:03:37 +0000 Subject: [docs] [issue15607] New print's argument "flush" is not mentioned in docstring In-Reply-To: <1344537615.2.0.181912402642.issue15607@psf.upfronthosting.co.za> Message-ID: <1344632617.02.0.300630500518.issue15607@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Thanks for raising this issue, Serhiy and thanks for the patch, Daniel. It is committed now. ---------- nosy: +orsenthil resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 23:05:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Aug 2012 21:05:59 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344632759.65.0.667311598784.issue15527@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks Chris. Here's the patch. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 23:06:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Aug 2012 21:06:40 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344632800.7.0.664952758509.issue15527@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 10 23:07:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 10 Aug 2012 21:07:45 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344632864.96.0.190907175043.issue15527@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file26760/doc_dbl_parens.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 08:32:20 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 11 Aug 2012 06:32:20 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344666740.22.0.0186868999048.issue15527@psf.upfronthosting.co.za> Georg Brandl added the comment: Is anyone even reading my messages...? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 09:54:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Aug 2012 07:54:38 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344671677.09.0.245959325266.issue15527@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Georg, I see that :meth: with arguments works in the form :meth:`name(args) `. I believe that the hyperlinks are helpful and it was designed that way. Replacing :meth:/:func:/:c:func: for names with arguments on double backquotes can be done almost automatically. Here's another patch (I like it less). ---------- Added file: http://bugs.python.org/file26763/doc_dbl_parens_drop_markup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 15:38:30 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 11 Aug 2012 13:38:30 +0000 Subject: [docs] [issue15444] Incorrectly written contributor's names In-Reply-To: <1343161512.09.0.0619646494936.issue15444@psf.upfronthosting.co.za> Message-ID: <1344692310.14.0.0360382868446.issue15444@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch looks ok to me so, unless someone is opposed to using utf-8 in the doc files, I think it can be committed in 3.x. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 16:48:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Aug 2012 14:48:23 +0000 Subject: [docs] [issue15444] Incorrectly written contributor's names In-Reply-To: <1343161512.09.0.0619646494936.issue15444@psf.upfronthosting.co.za> Message-ID: <1344696502.71.0.736540816983.issue15444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Non-ascii characters already used in a lot (43-50) of doc files. LC_ALL=C find Doc/ -type f -name '*.rst' -exec egrep --color "$(printf '[\x80-\xFF]+')" '{}' + All touched files already contains non-ascii characters (and Misc/HISTORY contains invalid UTF-8 sequence). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 16:57:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 11 Aug 2012 14:57:20 +0000 Subject: [docs] [issue15444] Incorrectly written contributor's names In-Reply-To: <1343161512.09.0.0619646494936.issue15444@psf.upfronthosting.co.za> Message-ID: <3WvRBQ6zmWzPpf@mail.python.org> Roundup Robot added the comment: New changeset 3654c711019a by Antoine Pitrou in branch '3.2': Issue #15444: Use proper spelling for non-ASCII contributor names. http://hg.python.org/cpython/rev/3654c711019a New changeset 867de88b69f0 by Antoine Pitrou in branch 'default': Issue #15444: Use proper spelling for non-ASCII contributor names. http://hg.python.org/cpython/rev/867de88b69f0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 16:59:00 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 11 Aug 2012 14:59:00 +0000 Subject: [docs] [issue15444] Incorrectly written contributor's names In-Reply-To: <1343161512.09.0.0619646494936.issue15444@psf.upfronthosting.co.za> Message-ID: <1344697140.77.0.806820987318.issue15444@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, then I've committed the patch. Closing the issue now, thank you. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 17:47:27 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 11 Aug 2012 15:47:27 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344700046.77.0.895657831033.issue15561@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Hmm. As I can see in subprocess.py TextIOWrapper is applied to stdin also in non-buffered (write_through=True) mode. So input will be converted to use '\n' as well. Can you reflect this fact in your patches? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 20:15:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 11 Aug 2012 18:15:13 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <3WvWZm0pp3zPhs@mail.python.org> Roundup Robot added the comment: New changeset 5e025dc7d728 by Andrew Svetlov in branch 'default': Issue #15527: fix docs, remove double parens by changing markup. http://hg.python.org/cpython/rev/5e025dc7d728 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 20:18:27 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 11 Aug 2012 18:18:27 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344709107.33.0.946471542071.issue15527@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Applied patch uses ``expr(n)`` as Georg prefer. Serhiy, please close the issue if you have not any upcoming patches. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 20:28:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 11 Aug 2012 18:28:30 +0000 Subject: [docs] [issue15527] Double parens in functions references In-Reply-To: <1343833557.96.0.948912415493.issue15527@psf.upfronthosting.co.za> Message-ID: <1344709710.27.0.951330941067.issue15527@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Andrew. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 21:08:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 11 Aug 2012 19:08:16 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344712096.6.0.597512138703.issue15561@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Can you reflect this fact in your patches? Sure. (Though for stdin '\n' is converted to os.linesep and no more.) Would you mind if I also updated the following part of the subprocess documentation to reference the part we are updating, so that the documentation is just in one place? "If universal_newlines is True, the file objects stdout and stderr are opened as text files, but lines may be terminated by any of '\n', the Unix end-of-line convention, '\r', the old Macintosh convention or '\r\n', the Windows convention. All of these external representations are seen as '\n' by the Python program." The part we're updating is in the "Frequently Used Arguments" section and so seems like the natural place for expanded details. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 21:14:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 11 Aug 2012 19:14:24 +0000 Subject: [docs] [issue15624] clarify io.TextIOWrapper newline documentation Message-ID: <1344712464.43.0.600420981046.issue15624@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The documentation of io.TextIOWrapper's newline argument is somewhat confusing and perhaps reversed from what was intended. (For example, the subprocess module uses the reverse terminology.) Either way, it can be improved somewhat. Currently, it says-- "* On input, if newline is None,... Lines in the input can end in '\n', '\r', or '\r\n', and these are translated into '\n' before being returned to the caller... * On output, if newline is None, any '\n' characters written are translated to the system default line separator, os.linesep..." (from http://docs.python.org/dev/library/io.html#io.TextIOWrapper ) It is somewhat confusing because "On input" does not mean "On input to the buffer," and "On output" does not mean "On output from the buffer." It is the reverse. A minimal change to address this would be something along the lines of-- "On input" -> "When reading input from the buffer" "On output" -> "When writing output to the buffer The same change could also be made to the open() documentation: http://docs.python.org/dev/library/functions.html#open I can prepare a patch for affected versions. ---------- assignee: docs at python components: Documentation keywords: easy messages: 167995 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: clarify io.TextIOWrapper newline documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 21:15:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 11 Aug 2012 19:15:27 +0000 Subject: [docs] [issue15624] clarify io.TextIOWrapper newline documentation In-Reply-To: <1344712464.43.0.600420981046.issue15624@psf.upfronthosting.co.za> Message-ID: <1344712527.37.0.659079654672.issue15624@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Andrew, I'm adding you because this is the documentation that the subprocess module will point to after issue 15561. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 21:27:40 2012 From: report at bugs.python.org (Steven Collins) Date: Sat, 11 Aug 2012 19:27:40 +0000 Subject: [docs] [issue15606] re.VERBOSE whitespace behavior not completely documented In-Reply-To: <1344534617.67.0.49137100671.issue15606@psf.upfronthosting.co.za> Message-ID: <1344713260.32.0.345872616023.issue15606@psf.upfronthosting.co.za> Steven Collins added the comment: Fair enough, but in that case I still think the current behavior should be documented. Attached is a possible patch. (This is my first interaction with the Python issue tracker, by the way; apologies if I ought to have set some field differently or left some other field alone.) ---------- assignee: -> docs at python components: +Documentation keywords: +patch nosy: +docs at python title: re.VERBOSE doesn't ignore certain whitespace -> re.VERBOSE whitespace behavior not completely documented type: behavior -> enhancement versions: +Python 3.3 -Python 2.7, Python 3.2 Added file: http://bugs.python.org/file26767/re_whitespace.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 21:37:59 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 11 Aug 2012 19:37:59 +0000 Subject: [docs] [issue15151] Documentation for Signature, Parameter and signature in inspect module In-Reply-To: <1340432030.73.0.594662136445.issue15151@psf.upfronthosting.co.za> Message-ID: <1344713879.13.0.723363671866.issue15151@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Slightly updated version ---------- Added file: http://bugs.python.org/file26768/inspect.pep362.5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 11 23:12:54 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 11 Aug 2012 21:12:54 +0000 Subject: [docs] [issue15593] urlparse.parse_qs documentation wrong re: urlencode In-Reply-To: <1344455271.07.0.337513141168.issue15593@psf.upfronthosting.co.za> Message-ID: <1344719574.33.0.74385750288.issue15593@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 04:08:45 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 12 Aug 2012 02:08:45 +0000 Subject: [docs] [issue15628] Add import ABC hierarchy to docs for importlib In-Reply-To: <1344737242.66.0.0570077478746.issue15628@psf.upfronthosting.co.za> Message-ID: <1344737325.58.0.268944408855.issue15628@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Brett, what do you think about? ---------- assignee: -> docs at python components: +Documentation keywords: +easy nosy: +brett.cannon, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 07:17:47 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 12 Aug 2012 05:17:47 +0000 Subject: [docs] [issue15619] set.pop() documentation is confusing In-Reply-To: <1344618037.56.0.180857991175.issue15619@psf.upfronthosting.co.za> Message-ID: <1344748667.23.0.269682059661.issue15619@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Georg and Eli. The word "arbitrary" was chosen intentionally. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From bingham at google.com Thu Aug 9 14:30:20 2012 From: bingham at google.com (Aaron Bingham) Date: Thu, 9 Aug 2012 14:30:20 +0200 Subject: [docs] Incorrect web docs for cgi.parse Message-ID: The web docs at http://docs.python.org/library/cgi.html give an incorrect signature for cgi.parse. The environ argument is missing. cgi.parse(fp[, keep_blank_values[, strict_parsing]]) Parse a query in the environment or from a file (the file defaults to sys.stdin). The keep_blank_values and strict_parsing parameters are passed to urlparse.parse_qs() unchanged. The docstring is correct. >>> import cgi >>> help(cgi.parse) Help on function parse in module cgi: parse(fp=None, environ={}, keep_blank_values=0, strict_parsing=0) Parse a query in the environment or from a file (default stdin) Arguments, all optional: fp : file pointer; default: sys.stdin environ : environment dictionary; default: os.environ keep_blank_values: flag indicating whether blank values in URL encoded forms should be treated as blank strings. A true value indicates that blanks should be retained as blank strings. The default false value indicates that blank values are to be ignored and treated as if they were not included. strict_parsing: flag indicating what to do with parsing errors. If false (the default), errors are silently ign Cheers, -- Aaron Bingham / Software Engineer / bingham at google.com / +41 (44) 668 1380 Google Switzerland GmbH / Brandschenkestrasse 110 / CH-8002 Zurich / Switzerland Identifikationsnummer: CH-020.4.028.116-1 From dario.damico at damix.it Sun Aug 5 18:57:36 2012 From: dario.damico at damix.it (dario.damico at damix.it) Date: Sun, 5 Aug 2012 18:57:36 +0200 Subject: [docs] Descriptor Example Message-ID: Hi everybody, first of all let me thank you for all the work on Python and its community. Regarding the Descriptor Example at http://docs.python.org/howto/descriptor.html I feel like there may be something wrong in the usage of self within setters and getters. According to the following sources: http://stackoverflow.com/questions/1915643/python-descriptors-sharing-values-across-classes http://martyalchin.com/2007/nov/23/python-descriptors-part-1-of-2/ http://martyalchin.com/2007/nov/24/python-descriptors-part-2-of-2/ It makes more sense to directly manipulate obj.__dict__ than altering the descriptor. I started studying Python today so I'm definitely a newbie. Sorry if this doesn't make sense. Best regards. Dario D'Amico From mpc4 at gmx.com Thu Aug 2 07:03:36 2012 From: mpc4 at gmx.com (Martin) Date: Thu, 02 Aug 2012 15:03:36 +1000 Subject: [docs] unnecessary coma in code-example Message-ID: <501A0A28.1060803@gmx.com> Hi, sorry to bother, i think i found an unecessary comma at: http://docs.python.org/py3k/tutorial/datastructures.html#nested-list-comprehensions in the first code-example after the last element in the list >>> matrix = [ ... [1, 2, 3, 4], ... [5, 6, 7, 8], ... [9, 10, 11, 12], ... ] Thanks for providing such a great website and the superb organized content! Regards Martin From mpc4 at gmx.com Thu Aug 2 08:11:38 2012 From: mpc4 at gmx.com (Martin) Date: Thu, 02 Aug 2012 16:11:38 +1000 Subject: [docs] code-example doesn't work as displayed in documentation Message-ID: <501A1A1A.9080104@gmx.com> http://docs.python.org/py3k/tutorial/datastructures.html#nested-list-comprehensions the code-example in the last paragraph of nested list comprehensions doesn't work like displayed. displayed: >>> zip(*matrix) [(1, 5, 9), (2, 6, 10), (3, 7, 11), (4, 8, 12)] but works like that: >>> zip(*matrix) to make it work like displayed i had to type: >>> list(zip(*matrix)) [(1, 5, 9), (2, 6, 10), (3, 7, 11), (4, 8, 12)] i guess the example was just copied from the 2.7.3 python documentation because it worked like displayed with Python 2.7.3, but not with Python 3.2.3 Regards Martin From mathprodigy20 at gmail.com Sat Aug 4 01:18:06 2012 From: mathprodigy20 at gmail.com (Scott Mancuso) Date: Fri, 3 Aug 2012 17:18:06 -0600 Subject: [docs] Bug in doctest documentation Message-ID: <81BEB228-8745-4E8E-BC62-85F7D03AA63C@gmail.com> This is an issue with the documentation of directives found at http://docs.python.org/library/doctest.html#option-flags-and-directives Quite a few examples of how to use the directives are included. Unfortunately, the actually directives aren't visible in the code examples given. For example, this: >>> print range(20) #doctest: +NORMALIZE_WHITESPACE [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] is rendered as >>> print range(20) [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] Scott Mancuso -------------- next part -------------- An HTML attachment was scrubbed... URL: From richardhendricks at yahoo.com Sun Aug 5 08:40:40 2012 From: richardhendricks at yahoo.com (Richard Hendricks) Date: Sat, 4 Aug 2012 23:40:40 -0700 (PDT) Subject: [docs] print "Hello World" not working Message-ID: <1344148840.14040.YahooMailNeo@web114601.mail.gq1.yahoo.com> Hello, ? Looks like there has been a format change in a recent version that has not propagated to documentation? http://docs.python.org/tutorial/introduction.html#strings has example hello = "This is a rather long string containing\n\ several lines of text just as you would do in C.\n\ Note that whitespace at the beginning of the line is\ significant." print hello However, when I try to use that in a plain 3.2.3 install on a PC: >>> hello = "This is a rather long string containing\n\ ... several lines of text just as you would do in C.\n\ ... Note that whitespace at the beginning of the line is\ ... significant." >>> >>> print hello File "", line 1 print hello ^ SyntaxError: invalid syntax >>> ...but this works... >>> print (hello) This is a rather long string containing several lines of text just as you would do in C. Note that whitespace at the beginning of the line is significant. >>> Thank you. ? -- "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children..." -- Dwight D Eisenhower -------------- next part -------------- An HTML attachment was scrubbed... URL: From jessebikman at gmail.com Sun Aug 5 20:35:56 2012 From: jessebikman at gmail.com (Jesse Bikman) Date: Sun, 5 Aug 2012 14:35:56 -0400 Subject: [docs] Missing example from code Message-ID: Hi, On this page, http://docs.python.org/tutorial/controlflow.html there is no example in the code of a "continue" statement (section 4.4). It is explained, but not actually used in code. It would be simple to include, I think. Hope this helps! -- Jesse Bikman Department of Marine Science Graduate Student/Graduate Teaching Assistant Luettich lab University of North Carolina at Chapel Hill LinkedIn -------------- next part -------------- An HTML attachment was scrubbed... URL: From jho1965us at gmail.com Mon Aug 6 12:11:36 2012 From: jho1965us at gmail.com (Jens Odborg) Date: Mon, 6 Aug 2012 12:11:36 +0200 Subject: [docs] documention of list member functions Message-ID: Hi Finding the documentaion of list functions can be a bit trikky You have to remember that members of list are documented not in library documentation but in tutorial It seems to me that more hypeer links are needed There are at least four enties 1) http://docs.python.org/tutorial/introduction.html#lists A general introduction to list No references here * Should also contain a final line like e.g.: "more info on lists in More on Lists" i.e. hyperlink to (2) 2) http://docs.python.org/tutorial/datastructures.html#more-on-lists List all member functions * Should also contain a final line like e.g.: "list creation are documented in Built-in Functions - list" i.e. hyperlink to (4) 3) http://docs.python.org/library/functions.html#list How to create a list This section references two places: a) it self (3) b) Sequence Types (4) * Maybe this should also contain a line in introduktion like e.g.: "lists members are documented in More on Lists" i.e. hyperlink to (2) 4) http://docs.python.org/library/stdtypes.html#typesseq This section reference one place related to list: a) in header list (1) * Should also contain a line like e.g.: "lists members are documented in More on Lists" i.e. hyperlink to (2) Regards Jens -------------- next part -------------- An HTML attachment was scrubbed... URL: From shawn.yh.kim at nhn.com Wed Aug 8 09:18:11 2012 From: shawn.yh.kim at nhn.com (=?utf-8?B?6rmA7JiB7ZyY?=) Date: Wed, 8 Aug 2012 16:18:11 +0900 Subject: [docs] A typo in an example code. Message-ID: Hi, An example logging server code in the following url gives an error: http://docs.python.org/howto/logging-cookbook.html#sending-and-receiving-logging-events-across-a-network It seems that the code has typos. import socketserver should be import SocketServer I am using Python 2.7.3, FYI. Regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From lipskathekat at yahoo.co.uk Fri Aug 10 16:03:26 2012 From: lipskathekat at yahoo.co.uk (Lipska TheCat) Date: Fri, 10 Aug 2012 15:03:26 +0100 (BST) Subject: [docs] socketserver documentation Message-ID: <1344607406.59247.YahooMailNeo@web133002.mail.ir2.yahoo.com> Hi I have recently begun to investigate Python and have come up against a number of apparent issues with the documentation 20.19.3. RequestHandler Objects investigating the socketserver.py code I believe the docs should be altered to refer to the class BaseRequestHandler and not RequestHandler. I also think that some class specific docs for StreamRequestHandler and DatagramRequestHandler would be useful. I don't know what system you use to maintain the documentation but I'd be happy to contribute some changes/additions Kind Regards lipska From rroyog at uoc.edu Fri Aug 10 21:53:47 2012 From: rroyog at uoc.edu (Ramon Royo Giner) Date: Fri, 10 Aug 2012 21:53:47 +0200 Subject: [docs] Typo in the String docs Message-ID: <980773001.961471.1344628354130.JavaMail.root@llavaneres> Hi,I found a typo in the following address, at the bottom:http://docs.python.org/library/string.html string.replace(str, old, new[, maxreplace])Should read: string.replace(old, new[, maxreplace])Thanks for all the work and effort you put into making Python better and better.Best regards,Ramon Royo i GinerEstudiant de Grau Multimèdiarroyog at uoc.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.tosi at gmail.com Sun Aug 12 09:37:41 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 09:37:41 +0200 Subject: [docs] A typo in an example code. In-Reply-To: References: Message-ID: On Wed, Aug 8, 2012 at 9:18 AM, ??? wrote: > Hi, > > An example logging server code in the following url gives an error: > http://docs.python.org/howto/logging-cookbook.html#sending-and-receiving-logging-events-across-a-network > > It seems that the code has typos. > > import socketserver > > > should be > > import SocketServer This has already been fixed with this revision: http://hg.python.org/cpython/rev/e06ef4881136 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 Sun Aug 12 09:41:25 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 09:41:25 +0200 Subject: [docs] Typo in the String docs In-Reply-To: <980773001.961471.1344628354130.JavaMail.root@llavaneres> References: <980773001.961471.1344628354130.JavaMail.root@llavaneres> Message-ID: Hello Ramon, On Fri, Aug 10, 2012 at 9:53 PM, Ramon Royo Giner wrote: > Hi, > > I found a typo in the following address, at the bottom: > > http://docs.python.org/library/string.html > > string.replace(str, old, new[, maxreplace]) > > Should read: > > string.replace(old, new[, maxreplace]) I don't think it's a typo: what's described here are the functions of the 'string' module, so string.replace() is really the function replace() of the module 'string' not 'asdfasdf'.replace() so the method replace() of a string object 'asdfasdf'. So 'str' is needed, because it's the argument the string.replace() function will work on. 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 Sun Aug 12 09:53:57 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 09:53:57 +0200 Subject: [docs] print "Hello World" not working In-Reply-To: <1344148840.14040.YahooMailNeo@web114601.mail.gq1.yahoo.com> References: <1344148840.14040.YahooMailNeo@web114601.mail.gq1.yahoo.com> Message-ID: Hello Richard, On Sun, Aug 5, 2012 at 8:40 AM, Richard Hendricks wrote: > Hello, > Looks like there has been a format change in a recent version that has not > propagated to documentation? > > http://docs.python.org/tutorial/introduction.html#strings This documentations is for Python 2.7, but... > has example > > hello = "This is a rather long string containing\n\ > several lines of text just as you would do in C.\n\ > Note that whitespace at the beginning of the line is\ > significant." > > print hello > > However, when I try to use that in a plain 3.2.3 install on a PC: ...you're running Python 3.2. First of all, you'd have to look at the right doc: http://docs.python.org/py3k/ >>>> hello = "This is a rather long string containing\n\ > ... several lines of text just as you would do in C.\n\ > ... Note that whitespace at the beginning of the line is\ > ... significant." >>>> >>>> print hello > File "", line 1 > print hello > ^ > SyntaxError: invalid syntax and to clarify, in Python 3.x print() has become a function, so you have to pass what you want to print as argument to print(). 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 Sun Aug 12 09:55:39 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 09:55:39 +0200 Subject: [docs] Bug in doctest documentation In-Reply-To: <81BEB228-8745-4E8E-BC62-85F7D03AA63C@gmail.com> References: <81BEB228-8745-4E8E-BC62-85F7D03AA63C@gmail.com> Message-ID: Hello Scott, On Sat, Aug 4, 2012 at 1:18 AM, Scott Mancuso wrote: > This is an issue with the documentation of directives found at > http://docs.python.org/library/doctest.html#option-flags-and-directives > Quite a few examples of how to use the directives are included. > Unfortunately, the actually directives aren't visible in the code examples > given. For example, this: > > >>> print range(20) #doctest: +NORMALIZE_WHITESPACE > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, > 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] > > is rendered as > >>>> print range(20) > [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, > 10, 11, 12, 13, 14, 15, 16, 17, 18, 19] Yes, this is a known problem of the tools we're using to highlight the code in the Python documentation, and we're already working on it to fix it asap - thanks for your report. 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 Sun Aug 12 10:00:04 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 10:00:04 +0200 Subject: [docs] unnecessary coma in code-example In-Reply-To: <501A0A28.1060803@gmx.com> References: <501A0A28.1060803@gmx.com> Message-ID: Hello Martin, On Thu, Aug 2, 2012 at 7:03 AM, Martin wrote: > Hi, sorry to bother, i think i found an unecessary comma at: > > http://docs.python.org/py3k/tutorial/datastructures.html#nested-list-comprehensions I think it's just an cosmetic "problem" and probably the extra comma is there for uniformity with the 2 lines above it - given it's a no-op in this case (it generates no error after all) I'm inclined not to change it. Also it might also be a standard for the person that wrote the example to add an extra comma at the end of lists or tuples, because sometimes it might be relevand (f.e. ('A',) is a tuple, and the extra comma is needed there). Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Sun Aug 12 10:26:17 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 10:26:17 +0200 Subject: [docs] code-example doesn't work as displayed in documentation In-Reply-To: <501A1A1A.9080104@gmx.com> References: <501A1A1A.9080104@gmx.com> Message-ID: Hello Martin, On Thu, Aug 2, 2012 at 8:11 AM, Martin wrote: >>>> zip(*matrix) > > > to make it work like displayed i had to type: > >>>> list(zip(*matrix)) > [(1, 5, 9), (2, 6, 10), (3, 7, 11), (4, 8, 12)] zip() in Python 3.x returns an iterator, so we need to make a list from it - I've just fixed for python 3.2 and 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 Sun Aug 12 10:37:51 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 10:37:51 +0200 Subject: [docs] New link for CodeTools In-Reply-To: References: Message-ID: Hello Robert, On Thu, Jul 12, 2012 at 12:08 PM, Robert Kern wrote: > The Python 3 docs > > link to a file in an old repository. > > * The `MultiContext class > `_ > in the Enthought `CodeTools package > `_ has options to support > writing to any mapping in the chain. > > Should be this: > > * The `MultiContext class > `_ > in the Enthought `CodeTools package > `_ has options to support > writing to any mapping in the chain. > > That link should persist more reliably in the future. Thanks for the heads up - i've just updated the link. 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 Sun Aug 12 10:50:32 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 10:50:32 +0200 Subject: [docs] Missing ')' in argparse docs In-Reply-To: References: Message-ID: Hello, On Thu, Jul 12, 2012 at 8:46 AM, kishkin wrote: > "values - The associated command-line arguments, with any type > conversions applied. (Type conversions are specified with the type > keyword argument to add_argument()." - here ')' is missing at the end. Thanks, I've just fixed this on all the active branches. 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 Sun Aug 12 11:02:52 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 11:02:52 +0200 Subject: [docs] broken link to Geany IDE In-Reply-To: References: Message-ID: Hello Karl, On Mon, Jul 2, 2012 at 8:43 PM, Tarbet, Karl L wrote: > Hello, > > The link http://geany.uvena.de/ on the page > http://docs.python.org/using/unix.html#editors seems to be broken. > > Google suggests to me that you could use http://www.geany.org/ instead. Thanks for noticing it - I've just fixed the URL in all the active branches. 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 Sun Aug 12 11:21:56 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 11:21:56 +0200 Subject: [docs] an offer of proofreading In-Reply-To: <20120705181034.22571.qmail@sjtufted.puffin.com> References: <20120705181034.22571.qmail@sjtufted.puffin.com> Message-ID: Hello Chris, Sorry for this late reply. On Thu, Jul 5, 2012 at 8:10 PM, Chris Jewell wrote: > Good day, > > I propose to read through at least the Library Reference (and perhaps > more of the documentation) for 3.2.3, and send suggested corrections. That would be awesome! > Will it be best to send diffs of the .html files (which I would > usually read anyway) or the plain text? Or are there source files > from which you generate all of the distributed docs, and for which the > diffs would be more useful? The most useful way for us is if you can generate diffs of the documentation source files. They are in the Doc directory of the source code repository, you can find references on how to get at: http://docs.python.org/devguide/ and more on documentation on http://docs.python.org/devguide/documenting.html - If you want more details, don't hesitate to ask. Please also note that documentation is updated on all the active branches, that are: 2.7, 3.2 and deafult - it would be nice if you could make (at least for the biggest patches) a version for all those branches. > I started the process with the Lib Ref for an earlier version of > Python 3 (as a way of learning the differences between Python 2 and > 3), but was interrupted before I got around to sending the > corrections, and never got back to it. I expect that many of the > issues with the earlier version have been corrected by now, but I'll > see what I can find. Thanks already! Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From georg at python.org Sun Aug 12 11:31:50 2012 From: georg at python.org (Georg Brandl) Date: Sun, 12 Aug 2012 11:31:50 +0200 Subject: [docs] unnecessary coma in code-example In-Reply-To: References: <501A0A28.1060803@gmx.com> Message-ID: <50277806.3000809@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/12/2012 10:00 AM, Sandro Tosi wrote: > Hello Martin, > > On Thu, Aug 2, 2012 at 7:03 AM, Martin wrote: >> Hi, sorry to bother, i think i found an unecessary comma at: >> >> http://docs.python.org/py3k/tutorial/datastructures.html#nested-list-comprehensions > >> > I think it's just an cosmetic "problem" and probably the extra comma is > there for uniformity with the 2 lines above it - given it's a no-op in this > case (it generates no error after all) I'm inclined not to change it. Also > it might also be a standard for the person that wrote the example to add an > extra comma at the end of lists or tuples, because sometimes it might be > relevand (f.e. ('A',) is a tuple, and the extra comma is needed there). Another good reason to keep the trailing commata in enumerations is that if you add another item, only one line of code will change. Having to add a comma in the previous line will generate a spuriously changed line in the diff that makes it harder to review. cheers, Georg -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlAneAUACgkQN9GcIYhpnLB8igCeO9YnnZTCm2Bw/aFR2FRUBtJ2 3d0AoKsc8ruZjRwOUKWE869z1Zp0+9Nt =tTQt -----END PGP SIGNATURE----- From sandro.tosi at gmail.com Sun Aug 12 12:09:25 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 12:09:25 +0200 Subject: [docs] Programing issues [HELP] In-Reply-To: <4FF7A9C4.7000501@gmail.com> References: <4FF7A9C4.7000501@gmail.com> Message-ID: Hello George, On Sat, Jul 7, 2012 at 5:15 AM, george wrote: > I had some problems with the tutorials so i've sent this screen shoot. Some > of the output didn't match what I saw on your tutorial. > > My python version is: Python 3.2.3 and its the 64bit type on my Windows 7 > (64bit) Home Premium. I suggest to write to a general support forum such as http://mail.python.org/mailman/listinfo/python-list . Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Sun Aug 12 12:11:30 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 12:11:30 +0200 Subject: [docs] Python tutorial required. In-Reply-To: References: Message-ID: On Sun, Jul 15, 2012 at 4:15 AM, Kishor Kp wrote: > Hi, > > Right now I would be learning Python Programming Language and I was > searching for > the best book on this. I found it to be from the author " Guido van Rossum". > > Could you please email the below book? It doesn't seem to be a free book, so if you want it you need to buy it. > Title Python Tutorial > Author(s) Guido van Rossum > Publisher: Iuniverse Inc (April 2000); eBook (updated June 11, 2012) > Hardcover/Paperback 140 pages > eBook HTML and PDF files > Language: English > ISBN-10: 1583483756 > ISBN-13: 978-1475234039 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 Sun Aug 12 12:15:45 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 12:15:45 +0200 Subject: [docs] About documentation In-Reply-To: <20120713211047.112863zjquac57gn@webmail.dcc.ufba.br> References: <20120713211047.112863zjquac57gn@webmail.dcc.ufba.br> Message-ID: Hello, On Sat, Jul 14, 2012 at 2:10 AM, IBIRISOL FONTES FERREIRA wrote: > For example, How work the parameter passing in Python? How work the name > space? How work memory allocation? I suggest to ask for help in a general support forum such as http://mail.python.org/mailman/listinfo/python-list . Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From georg at python.org Sun Aug 12 12:35:53 2012 From: georg at python.org (Georg Brandl) Date: Sun, 12 Aug 2012 12:35:53 +0200 Subject: [docs] Python tutorial required. In-Reply-To: References: Message-ID: <50278709.7020009@python.org> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/12/2012 12:11 PM, Sandro Tosi wrote: > On Sun, Jul 15, 2012 at 4:15 AM, Kishor Kp wrote: >> Hi, >> >> Right now I would be learning Python Programming Language and I was >> searching for the best book on this. I found it to be from the author " >> Guido van Rossum". >> >> Could you please email the below book? > > It doesn't seem to be a free book, so if you want it you need to buy it. Well, I assume that this is "our" tutorial, since AFAIK Guido has never written another version of it. As such, you can get it at http://docs.python.org/download as a PDF version. Georg >> Title Python Tutorial Author(s) Guido van Rossum Publisher: Iuniverse Inc >> (April 2000); eBook (updated June 11, 2012) Hardcover/Paperback 140 >> pages eBook HTML and PDF files Language: English ISBN-10: 1583483756 >> ISBN-13: 978-1475234039 > > Regards, > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlAnhwkACgkQN9GcIYhpnLB+0QCfRU1P+IzKtqFb3MeC6+KLQ6qC 3G8An1zlONAquHlvKxAwfc4JVlE7Pi7M =3egO -----END PGP SIGNATURE----- From sandro.tosi at gmail.com Sun Aug 12 12:36:05 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 12:36:05 +0200 Subject: [docs] missing quotation mark In-Reply-To: References: Message-ID: Hello Yevgen, On Mon, Jul 2, 2012 at 12:55 PM, Yevgen Yampolskiy wrote: > http://docs.python.org/library/stdtypes.html > > Written: > For example, 'ab c\n\nde fg\rkl\r\n'.splitlines() returns ['ab c', '', 'de > fg', 'kl'], while the same call with splitlines(True) returns ['ab c\n', > '\n, 'de fg\r', 'kl\r\n']. > > Should be: > > For example, 'ab c\n\nde fg\rkl\r\n'.splitlines() returns ['ab c', '', 'de > fg', 'kl'], while the same call with splitlines(True) returns ['ab c\n', > '\n', 'de fg\r', 'kl\r\n']. Thanks - i've just fixed it on all the active branches. 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 Sun Aug 12 12:37:27 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 12:37:27 +0200 Subject: [docs] Python tutorial required. In-Reply-To: <50278709.7020009@python.org> References: <50278709.7020009@python.org> Message-ID: On Sun, Aug 12, 2012 at 12:35 PM, Georg Brandl wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 08/12/2012 12:11 PM, Sandro Tosi wrote: >> On Sun, Jul 15, 2012 at 4:15 AM, Kishor Kp wrote: >>> Hi, >>> >>> Right now I would be learning Python Programming Language and I was >>> searching for the best book on this. I found it to be from the author " >>> Guido van Rossum". >>> >>> Could you please email the below book? >> >> It doesn't seem to be a free book, so if you want it you need to buy it. > > Well, I assume that this is "our" tutorial, since AFAIK Guido has never written > another version of it. Ah, I was looking at the ISBN and found out this: http://www.openisbn.com/isbn/1583483756/ - hence my comment > As such, you can get it at http://docs.python.org/download as a PDF version. > > Georg > >>> Title Python Tutorial Author(s) Guido van Rossum Publisher: Iuniverse Inc >>> (April 2000); eBook (updated June 11, 2012) Hardcover/Paperback 140 >>> pages eBook HTML and PDF files Language: English ISBN-10: 1583483756 >>> ISBN-13: 978-1475234039 >> >> Regards, >> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.19 (GNU/Linux) > > iEYEARECAAYFAlAnhwkACgkQN9GcIYhpnLB+0QCfRU1P+IzKtqFb3MeC6+KLQ6qC > 3G8An1zlONAquHlvKxAwfc4JVlE7Pi7M > =3egO > -----END PGP SIGNATURE----- -- 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 Sun Aug 12 15:13:07 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 15:13:07 +0200 Subject: [docs] minor documentation bug in random In-Reply-To: References: Message-ID: Hello Shaddi, On Mon, Jun 4, 2012 at 7:45 PM, Shaddi Hasan wrote: > I believe it should read: "state should have been obtained from a > previous call to getstate(), and setstate() restores the internal > state of the generator to what it was at the time **getstate()** was > called." Thanks - i've fixed it on all the active branches. 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 Sun Aug 12 15:36:13 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 15:36:13 +0200 Subject: [docs] Tiny docs bug In-Reply-To: <160B5C19-E27F-497C-8FBA-40C1202E90E3@holdenweb.com> References: <160B5C19-E27F-497C-8FBA-40C1202E90E3@holdenweb.com> Message-ID: Hello Steve, On Tue, Jul 24, 2012 at 9:15 AM, Steve Holden wrote: > the received_lines attribute of the SMTPChannel object uses "rn" for "\r\n" > and "n" for "\n". Probably just a stropping error. Thanks - I've just fixed it in 3.2 and default. 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 Sun Aug 12 15:51:15 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 15:51:15 +0200 Subject: [docs] http://docs.python.org/howto/urllib2.html#headers - error In-Reply-To: References: Message-ID: Hello Maxim, On Fri, Jul 27, 2012 at 11:16 AM, Maxim Boyarskiy wrote: > headers = { 'User-Agent' : user_agent } > req = urllib2.Request(url, data, headers) > > If you want to add header, you should use request.add_header method: > > req = urllib2.Request(url, data, headers) > req.add_header('User-Agent', user_agent) Are you sure about that? did you try and it failed? Because from urrlib2.Request doc at http://docs.python.org/library/urllib2.html#urllib2.Request we can read: "headers should be a dictionary, and will be treated as if add_header() was called with each key and value as arguments." Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Sun Aug 12 15:54:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 12 Aug 2012 13:54:20 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest Message-ID: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to start running (at least some of) the doctests in the Doc/ folder's *.rst files as part of regrtest. We will need a whitelist mechanism to tell regrtest which files to process since currently many doctests are not runnable (e.g. some kind of "doctest-safe" marker that can go in a file as suggested by Nick). See also the discussion thread started here: http://mail.python.org/pipermail/python-dev/2012-August/121304.html ---------- assignee: docs at python components: Documentation messages: 168036 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: Run doctests in Doc/*.rst as part of regrtest type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 16:00:08 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 12 Aug 2012 14:00:08 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344780008.33.0.441983446438.issue15629@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Might it be simpler to run doctest over the rst file from the relevant unittest? (Perhaps with help from test.support.) ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 16:04:02 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 12 Aug 2012 14:04:02 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344780242.45.0.913812867436.issue15629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: One option for whitelisting files would be to subclass doctest.DocTestParser and pass an instance as the parser argument to doctest.DocFileSuite: http://docs.python.org/dev/library/doctest.html#doctest.DocFileSuite The custom parser could look for the per-file marker before falling back to the usual parsing logic. This would give us the functionality we need without having to make changes to doctest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 16:13:33 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 12 Aug 2012 14:13:33 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344780813.18.0.630652368038.issue15629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Might it be simpler to run doctest over the rst file from the relevant unittest? (Perhaps with help from test.support.) If I understand correctly, do you mean for example that Lib/test/test_textwrap.py could be responsible for loading the doctests in Doc/library/textwrap.rst? One problem with this approach is that the *.rst files are not in one-to-one correspondence with unittest files in Lib/test, etc. For example, there are folders of *.rst files that may not correspond to any unit test files (e.g. the tutorial folder). It also introduces more coupling because the unit tests would now have to know about the existence of the Doc/*.rst files (though this could be a nice addition as it would let you run the doctests for a module along with its unit tests if you wanted to run tests only for a particular module). Or did you mean something else? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 16:26:09 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 12 Aug 2012 14:26:09 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344781569.69.0.155099367756.issue15629@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm not sure running these tests as part of regrtest is a good idea. Fixing and/or marking the doctests is a good idea, and having a `make doctest` that reports no error is a desirable goal. When `make doctest` works we could think about adding a regrtest option to run the doctests too, and if these tests don't take too much extra time to run we might even consider to run them by default (or at least when -uall is specified). Having an option to run individual doctests would be nice too, and would encourage developers to test their doctests. You should also see if there are more doctest-safe or more doctest-unsafe tests, and mark the ones in the smallest group. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 16:35:23 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 12 Aug 2012 14:35:23 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344782122.97.0.55534910852.issue15629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I'm not sure running these tests as part of regrtest is a good idea. Can you provide reasons? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 16:35:34 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 12 Aug 2012 14:35:34 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344782134.47.0.273788617967.issue15629@psf.upfronthosting.co.za> Ezio Melotti added the comment: > If I understand correctly, do you mean for example that > Lib/test/test_textwrap.py could be responsible for loading > the doctests in Doc/library/textwrap.rst? One advantage of this is that I could explicitly add a test in test_textwrap.py that loads the doctests in textwrap.rst and runs them. This would allow me to decide if those tests should be run or not, and which ones are runnable. If I know that textwrap.rst has no runnable tests I won't add the test, so by simply running test_textwrap I would be running all the tests I want/need to run. OTOH this has disadvantages too. If the tests are loaded explicitly it means that every test file that wants to load the doctests should be modified. Even if foo.rst has no runnable doctests and no test to load them is added to test_foo.py, a `make doctest` might still include the file unless we mark it in some way (either by a module-wide directive, or by marking all the individual snippets of code). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 16:44:50 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 12 Aug 2012 14:44:50 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344782690.13.0.227386426217.issue15629@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Can you provide reasons? Regrtest takes already a few minutes to run, adding these tests will make it even slower and the tradeoff might not be worthwhile (I'm assuming that most of the doctests are basic examples that are already well tested, and the occasional typos can be found by simply run `make doctest` every once in a while). The tests currently have many failures and output, so adding them now will make the regrtest output more confusing. Integrating this with regrtest requires some work, for example you would have to count successes/failures, add skips for certain tests and resources to control what tests should be run (there's currently a turtle going around on my screen when I run `make doctest`). This will make regrtest even more complex. People might not care to run these doctests if they are not touching the docs, and if they are, they might prefer to check only the specific doc file they changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 17:05:17 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Aug 2012 15:05:17 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344783917.06.0.509652908849.issue15629@psf.upfronthosting.co.za> Georg Brandl added the comment: One possibility to avoid tons and tons of failures that have to be fixed is to convert working doctests to the explicit syntax .. doctest:: blah and set doctest_test_doctest_blocks to False in the Sphinx conf.py. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 17:28:38 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 12 Aug 2012 15:28:38 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344785318.8.0.178920715365.issue15629@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > the occasional typos can be found by simply run `make doctest` every once > in a while). But doesn't "make doctest" attempt to run the doctests using Python 2.x (because Sphinx does not support Python 3.x). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 17:35:06 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 12 Aug 2012 15:35:06 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344785706.67.0.0912356561998.issue15629@psf.upfronthosting.co.za> Richard Oudkerk added the comment: An example from the output of "make doctest" which fails because Python 2.x is being used: ********************************************************************** File "library/multiprocessing.rst", line 453, in default Failed example: print(p, p.is_alive()) Expected: False Got: (, False) ********************************************************************** ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Sun Aug 12 17:34:45 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 17:34:45 +0200 Subject: [docs] Suggestion on docs for webbrowser In-Reply-To: <14C0BC82-E12F-4FEB-B554-FC6A800C2224@me.com> References: <14C0BC82-E12F-4FEB-B554-FC6A800C2224@me.com> Message-ID: Hello Christian, On Wed, Apr 11, 2012 at 12:41 PM, Christian Clauss wrote: > It might be helpful to readers if you could add some sample syntax such as: > $ python -m webbrowser -t "http://www.python.org" Indeed, thanks - I've added an example to all the active branches. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Sun Aug 12 17:38:48 2012 From: report at bugs.python.org (Daniel Ellis) Date: Sun, 12 Aug 2012 15:38:48 +0000 Subject: [docs] [issue15630] Missing "continue" example for "for" loop tutorial Message-ID: <1344785928.67.0.868408879756.issue15630@psf.upfronthosting.co.za> New submission from Daniel Ellis: Found by Jesse Bikman: On this page, http://docs.python.org/tutorial/controlflow.html there is no example in the code of a "continue" statement (section 4.4). It is explained, but not actually used in code. ---------- assignee: docs at python components: Documentation messages: 168049 nosy: Daniel.Ellis, docs at python priority: normal severity: normal status: open title: Missing "continue" example for "for" loop tutorial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 18:07:36 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 12 Aug 2012 16:07:36 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344787656.29.0.0751298664134.issue15629@psf.upfronthosting.co.za> Georg Brandl added the comment: Yeah, once we switch around to using the build Python for this... ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Sun Aug 12 18:07:35 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 18:07:35 +0200 Subject: [docs] Missing example from code In-Reply-To: References: Message-ID: Hello Jesse, On Sun, Aug 5, 2012 at 8:35 PM, Jesse Bikman wrote: > On this page, http://docs.python.org/tutorial/controlflow.html there is no > example in the code of a "continue" statement (section 4.4). It is > explained, but not actually used in code. This has just been reported at http://bugs.python.org/issue15630 Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Sun Aug 12 18:15:28 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 12 Aug 2012 16:15:28 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344788128.11.0.158205466055.issue15629@psf.upfronthosting.co.za> ?ric Araujo added the comment: Using Python 3 to run Sphinx is tracked in #10224. I thought there was already an issue to make the doctests runnable but can't find it, maybe it was only a discussion on a mailing list a year or two ago. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 18:44:25 2012 From: report at bugs.python.org (Daniel Ellis) Date: Sun, 12 Aug 2012 16:44:25 +0000 Subject: [docs] [issue15630] Missing "continue" example for "for" loop tutorial In-Reply-To: <1344785928.67.0.868408879756.issue15630@psf.upfronthosting.co.za> Message-ID: <1344789865.75.0.0653863389628.issue15630@psf.upfronthosting.co.za> Daniel Ellis added the comment: Added basic example for "continue". ---------- keywords: +patch Added file: http://bugs.python.org/file26775/for_continue_doc.patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Sun Aug 12 18:48:41 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sun, 12 Aug 2012 18:48:41 +0200 Subject: [docs] Incorrect web docs for cgi.parse In-Reply-To: References: Message-ID: Hello Aaron, On Thu, Aug 9, 2012 at 2:30 PM, Aaron Bingham wrote: > The web docs at http://docs.python.org/library/cgi.html give an > incorrect signature for cgi.parse. The environ argument is missing. Thanks - I've just fixed it in 2.7 (the other active branches have that already clear). Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Sun Aug 12 19:03:25 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 12 Aug 2012 17:03:25 +0000 Subject: [docs] [issue15630] Missing "continue" example for "for" loop tutorial In-Reply-To: <1344785928.67.0.868408879756.issue15630@psf.upfronthosting.co.za> Message-ID: <1344791004.91.0.478214197005.issue15630@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This looks good. Please remove the "... " prompt from the example so that the code is cut-and-pasteable by people who want to experiment with the example. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 19:08:13 2012 From: report at bugs.python.org (Daniel Ellis) Date: Sun, 12 Aug 2012 17:08:13 +0000 Subject: [docs] [issue15630] Missing "continue" example for "for" loop tutorial In-Reply-To: <1344785928.67.0.868408879756.issue15630@psf.upfronthosting.co.za> Message-ID: <1344791293.09.0.554631326281.issue15630@psf.upfronthosting.co.za> Daniel Ellis added the comment: Oh, I was keeping with the format of the other examples in the tutorial. Should I remove the prompts from all of them? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 19:19:26 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 12 Aug 2012 17:19:26 +0000 Subject: [docs] [issue15630] Missing "continue" example for "for" loop tutorial In-Reply-To: <1344785928.67.0.868408879756.issue15630@psf.upfronthosting.co.za> Message-ID: <1344791966.4.0.232307227575.issue15630@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Please remove the "... " prompt from the example so that the code is cut-and-pasteable by people who want to experiment with the example. That is the usual format for docstring examples. See, for example-- http://docs.python.org/dev/library/doctest.html#how-are-docstring-examples-recognized ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 20:16:49 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 12 Aug 2012 18:16:49 +0000 Subject: [docs] [issue15628] Add import ABC hierarchy to docs for importlib In-Reply-To: <1344737242.66.0.0570077478746.issue15628@psf.upfronthosting.co.za> Message-ID: <1344795409.06.0.433640216063.issue15628@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 21:15:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 12 Aug 2012 19:15:43 +0000 Subject: [docs] [issue15630] Missing "continue" example for "for" loop tutorial In-Reply-To: <1344785928.67.0.868408879756.issue15630@psf.upfronthosting.co.za> Message-ID: <3Ww8t56169zPm3@mail.python.org> Roundup Robot added the comment: New changeset a4d5ac78a76b by Senthil Kumaran in branch '2.7': Issue #15630: Add an example for "continue" statement in the tutorial. Patch by http://hg.python.org/cpython/rev/a4d5ac78a76b New changeset e855e6c26dfb by Senthil Kumaran in branch '3.2': Issue #15630: Add an example for "continue" statement in the tutorial. Patch by http://hg.python.org/cpython/rev/e855e6c26dfb New changeset dd41c287cf7c by Senthil Kumaran in branch 'default': merge from 3.2 http://hg.python.org/cpython/rev/dd41c287cf7c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 12 21:16:41 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 12 Aug 2012 19:16:41 +0000 Subject: [docs] [issue15630] Missing "continue" example for "for" loop tutorial In-Reply-To: <1344785928.67.0.868408879756.issue15630@psf.upfronthosting.co.za> Message-ID: <1344799001.04.0.290809172371.issue15630@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Thanks for the patch, Daniel. Fixed in all versions. ---------- nosy: +orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 01:49:38 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 12 Aug 2012 23:49:38 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344815378.77.0.55978989455.issue15629@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 02:58:39 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 13 Aug 2012 00:58:39 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344819519.47.0.999764124861.issue15629@psf.upfronthosting.co.za> R. David Murray added the comment: The point of running the doctests in the docs to to make sure the *docs* are correct, not to make sure Python is correct. So IMO adding them to regrtest is much more trouble than the tiny benefit it would produce for test coverage. On the other hand, having 'make doctest' run when '-uall' is specified would be cool, if the tests can thus be run by the buildbots. But I think should be 'make doctest', and not regrtest using doctest to process .rst files. The reason is that Sphinx has extra facilities that allow docttests to work without having to have "boilerplate" code in places where doing so would disrupt the narrative flow. I could be mis-remembering (and Georg will correct me if I am misremembering again :), but I don't think those work when doctest is used directly against the .rst file. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 04:26:41 2012 From: report at bugs.python.org (Glenn Linderman) Date: Mon, 13 Aug 2012 02:26:41 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344824801.65.0.584050534154.issue15629@psf.upfronthosting.co.za> Glenn Linderman added the comment: Another idea would be to make a notation that looks exactly* like doctests for documentation purposes, but that doctest would not run. Then, non-runnable doctests could be skipped, and runnable ones could be run. This would help keep the runnable code in the documentation validated, but would be on a test-by-test basis, rather than file by file. ---------- nosy: +v+python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 11:43:58 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 09:43:58 +0000 Subject: [docs] [issue15624] clarify io.TextIOWrapper newline documentation In-Reply-To: <1344712464.43.0.600420981046.issue15624@psf.upfronthosting.co.za> Message-ID: <1344851038.08.0.502151505573.issue15624@psf.upfronthosting.co.za> Andrew Svetlov added the comment: For me input means ?reading from? and output ? ?writing to?. Nevertheless I'm ok with you suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 11:57:15 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 09:57:15 +0000 Subject: [docs] [issue15624] clarify newline documentation for open and io.TextIOWrapper. In-Reply-To: <1344712464.43.0.600420981046.issue15624@psf.upfronthosting.co.za> Message-ID: <1344851835.99.0.0982153134298.issue15624@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- title: clarify io.TextIOWrapper newline documentation -> clarify newline documentation for open and io.TextIOWrapper. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 12:00:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 13 Aug 2012 10:00:06 +0000 Subject: [docs] [issue15624] clarify newline documentation for open and io.TextIOWrapper. In-Reply-To: <1344712464.43.0.600420981046.issue15624@psf.upfronthosting.co.za> Message-ID: <3WwXVX4FVszPjy@mail.python.org> Roundup Robot added the comment: New changeset 5b629e9fde61 by Andrew Svetlov in branch '3.2': Issue #15624: clarify newline documentation for open and io.TextIOWrapper http://hg.python.org/cpython/rev/5b629e9fde61 New changeset 9e098890ea2c by Andrew Svetlov in branch 'default': Issue #15624: clarify newline documentation for open and io.TextIOWrapper http://hg.python.org/cpython/rev/9e098890ea2c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 12:00:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 10:00:57 +0000 Subject: [docs] [issue15624] clarify newline documentation for open and io.TextIOWrapper. In-Reply-To: <1344712464.43.0.600420981046.issue15624@psf.upfronthosting.co.za> Message-ID: <1344852057.41.0.342248363532.issue15624@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Close as fixed. Thanks. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 12:11:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 10:11:40 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344852700.2.0.645544946271.issue15629@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 12:19:54 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 13 Aug 2012 10:19:54 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1344853194.47.0.215076877949.issue13498@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Silence means consent, so I will supply a patch as soon as 3.4 is open. Meanwhile, I reworded the docs for os.makedirs, the patch is attached. Please have a look at it so we can get it in for 3.3. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file26781/os-makedirs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 13:29:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 11:29:27 +0000 Subject: [docs] [issue15624] clarify newline documentation for open and io.TextIOWrapper. In-Reply-To: <1344712464.43.0.600420981046.issue15624@psf.upfronthosting.co.za> Message-ID: <1344857367.2.0.976125149927.issue15624@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks a lot, Andrew. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 13:47:10 2012 From: report at bugs.python.org (Andrew Scheller) Date: Mon, 13 Aug 2012 11:47:10 +0000 Subject: [docs] [issue15636] base64.decodebytes is only available in Python3.1+ Message-ID: <1344858430.17.0.615853795219.issue15636@psf.upfronthosting.co.za> New submission from Andrew Scheller: According to the documentation ( http://docs.python.org/py3k/library/base64.html#base64.decodebytes ) both the decodebytes and the deprecated decodestring methods are available in the base64 module in Python3.x However in Python3.0 (I'm testing with version 3.0.1 built from source) the base64 module only has the decodestring method, it doesn't have decodebytes. IMHO the documentation should be updated to reflect this. It looks like decodebytes was added to Python3.1 by http://bugs.python.org/issue3613 ---------- assignee: docs at python components: Documentation messages: 168080 nosy: docs at python, lurchman priority: normal severity: normal status: open title: base64.decodebytes is only available in Python3.1+ type: enhancement versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 14:04:59 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 12:04:59 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344859499.22.0.790395433734.issue15561@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Do you mean to mention stdin as well as stdout/stderr? It will be nice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 14:13:05 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 12:13:05 +0000 Subject: [docs] [issue15555] Default newlines of io.TextIOWrapper In-Reply-To: <1344095998.81.0.573935781933.issue15555@psf.upfronthosting.co.za> Message-ID: <1344859985.21.0.551049388001.issue15555@psf.upfronthosting.co.za> Andrew Svetlov added the comment: It doesn't. _io can be fixed to directly support os.linesep, but I doubt if anybody really need it. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 14:15:12 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 12:15:12 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344860112.65.0.643574835569.issue15561@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Yes, that too. :) I am working on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 14:19:14 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 12:19:14 +0000 Subject: [docs] [issue15555] Default newlines of io.TextIOWrapper In-Reply-To: <1344095998.81.0.573935781933.issue15555@psf.upfronthosting.co.za> Message-ID: <1344860354.67.0.206184423362.issue15555@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I think it can be useful for testing reasons (e.g. testing that os.linesep is respected by certain code). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 14:31:27 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 13 Aug 2012 12:31:27 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1344861087.0.0.077139111939.issue15629@psf.upfronthosting.co.za> R. David Murray added the comment: That's exactly what Georg's suggestion is about. Sphinx does have a way to mark doctest snippets as "run this", "don't run this". I believe that requires using 'make doctest' as the runner, but I already think that is the way to go, as I said before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 14:36:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 12:36:42 +0000 Subject: [docs] [issue15638] incorrect version info for TextIOWrapper write_through docs Message-ID: <1344861402.45.0.422601843379.issue15638@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The io.TextIOWrapper documentation says that the write_through argument was added in version 3.3: "Changed in version 3.3: The write_through argument has been added." http://docs.python.org/dev/library/io.html#io.TextIOWrapper However, it seems to be present in 3.2. Also, the 3.2 documentation does not mention the write_through argument. ---------- assignee: docs at python components: Documentation keywords: easy messages: 168092 nosy: asvetlov, cjerdonek, docs at python priority: normal severity: normal stage: needs patch status: open title: incorrect version info for TextIOWrapper write_through docs versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 14:40:20 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 13 Aug 2012 12:40:20 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1344861620.56.0.495491077768.issue13498@psf.upfronthosting.co.za> R. David Murray added the comment: Silence doesn't mean consent, but it does mean you can go ahead and see if anyone complains :) I think your proposal is fine, but I'd prefer making the sentinels just "IGNORE" and "FAIL". The module namespace means the names themselves don't have to be fully qualified. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 14:40:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 12:40:36 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344861636.11.0.531427110928.issue15561@psf.upfronthosting.co.za> Chris Jerdonek added the comment: For 3.2 to mention write_through, issue 15638 should probably be fixed first. I can create a patch for that first. ---------- dependencies: +incorrect version info for TextIOWrapper write_through docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 14:45:00 2012 From: report at bugs.python.org (Xavier Morel) Date: Mon, 13 Aug 2012 12:45:00 +0000 Subject: [docs] [issue15639] csv.Error description is incorrectly broad Message-ID: <1344861900.41.0.500081964818.issue15639@psf.upfronthosting.co.za> New submission from Xavier Morel: In both Python 2.7 and Python 3.x, csv.Error is documented as: Raised by any of the functions when an error is detected. As far as I can tell from using the module and looking at the code, this is completely incorrect. There is actually a single instance of csv.Error being used: the instantiation of csv.Dialect (which converts TypeError raised from _csv._Dialect() into csv.Error, a comment notes that this is "for compatibility with py 2.3"). And the only way to hit that code paths seems to be subclassing `Dialect` and putting incorrect values in the various attributes (providing them to `csv.reader` raises a TypeError). I believe the documentation to csv.Error should be changed to: 1. Mark it as effectively deprecated 2. Indicate that the only situation in which it it may be raised is when initializing a subclass of csv.Dialect ---------- assignee: docs at python components: Documentation messages: 168096 nosy: docs at python, xmorel priority: normal severity: normal status: open title: csv.Error description is incorrectly broad versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:01:10 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 13 Aug 2012 13:01:10 +0000 Subject: [docs] [issue15638] incorrect version info for TextIOWrapper write_through docs In-Reply-To: <1344861402.45.0.422601843379.issue15638@psf.upfronthosting.co.za> Message-ID: <1344862870.22.0.0799288486124.issue15638@psf.upfronthosting.co.za> R. David Murray added the comment: If I remember correctly it existed in one of the versions (python vs C) but not in both. Or, it existed but wasn't actually respected by one of the versions. ---------- nosy: +pitrou, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:12:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 13:12:05 +0000 Subject: [docs] [issue15638] incorrect version info for TextIOWrapper write_through docs In-Reply-To: <1344861402.45.0.422601843379.issue15638@psf.upfronthosting.co.za> Message-ID: <1344863525.86.0.740559564976.issue15638@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The C version seems to have it in 3.2 as well: http://hg.python.org/cpython/file/5b629e9fde61/Modules/_io/textio.c#l818 Is it possible you were thinking of issue 15571 (not "used" in Python version but still respected)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:14:23 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 13 Aug 2012 13:14:23 +0000 Subject: [docs] [issue15638] incorrect version info for TextIOWrapper write_through docs In-Reply-To: <1344861402.45.0.422601843379.issue15638@psf.upfronthosting.co.za> Message-ID: <1344863663.35.0.217671665625.issue15638@psf.upfronthosting.co.za> Antoine Pitrou added the comment: See 9144014028f3. It was part of a bugfix in the 3.2 branch, therefore it wasn't exposed as a public API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:15:26 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 13 Aug 2012 13:15:26 +0000 Subject: [docs] [issue15638] incorrect version info for TextIOWrapper write_through docs In-Reply-To: <1344861402.45.0.422601843379.issue15638@psf.upfronthosting.co.za> Message-ID: <1344863726.6.0.472924497357.issue15638@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> rejected stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:18:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 13:18:19 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344863899.27.0.401156213677.issue15561@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > As I can see in subprocess.py TextIOWrapper is applied to stdin also in non-buffered (write_through=True) mode. In 3.2, I will not mention the write_through argument based on Antoine's response to issue 15638. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:19:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 13:19:49 +0000 Subject: [docs] [issue15638] incorrect version info for TextIOWrapper write_through docs In-Reply-To: <1344861402.45.0.422601843379.issue15638@psf.upfronthosting.co.za> Message-ID: <1344863988.95.0.617531053232.issue15638@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Ah, thank you. I see. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 15:54:55 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 13:54:55 +0000 Subject: [docs] [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1344866095.53.0.820737549085.issue10224@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 16:10:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 13 Aug 2012 14:10:41 +0000 Subject: [docs] [issue15151] Documentation for Signature, Parameter and signature in inspect module In-Reply-To: <1340432030.73.0.594662136445.issue15151@psf.upfronthosting.co.za> Message-ID: <3Wwf3h2PCFzPlW@mail.python.org> Roundup Robot added the comment: New changeset 814462492fbd by Andrew Svetlov in branch 'default': Issue #15151: PEP 362 ? document signature and related classes for inspect.py http://hg.python.org/cpython/rev/814462492fbd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 16:14:33 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 14:14:33 +0000 Subject: [docs] [issue15151] Documentation for Signature, Parameter and signature in inspect module In-Reply-To: <1340432030.73.0.594662136445.issue15151@psf.upfronthosting.co.za> Message-ID: <1344867273.58.0.76639567547.issue15151@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Closing the issue. Feel free to reopen if you have some corrections. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 16:14:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 14:14:54 +0000 Subject: [docs] [issue15151] Documentation for Signature, Parameter and signature in inspect module In-Reply-To: <1340432030.73.0.594662136445.issue15151@psf.upfronthosting.co.za> Message-ID: <1344867294.8.0.737056040442.issue15151@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 16:49:38 2012 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 13 Aug 2012 14:49:38 +0000 Subject: [docs] [issue15151] Documentation for Signature, Parameter and signature in inspect module In-Reply-To: <1340432030.73.0.594662136445.issue15151@psf.upfronthosting.co.za> Message-ID: <1344869377.99.0.326802771375.issue15151@psf.upfronthosting.co.za> Yury Selivanov added the comment: Thank you, Andrew. One thing: can you please change: > Print all keyword-only arguments without default values: to > Example: print all keyword-only arguments without default values: ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 16:52:03 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 13 Aug 2012 14:52:03 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1344861620.56.0.495491077768.issue13498@psf.upfronthosting.co.za> Message-ID: <5029148C.8090704@ox.cx> Hynek Schlawack added the comment: > Silence doesn't mean consent, but it does mean you can go ahead and see if anyone complains :) Well that's what I meant. :) > I think your proposal is fine, but I'd prefer making the sentinels just "IGNORE" and "FAIL". The module namespace means the names themselves don't have to be fully qualified. I thought about that but found them pretty...generic. Anyway, that's 3.4-fodder. Could you have a look at the doc fix please? It applies against 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 17:13:45 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 13 Aug 2012 15:13:45 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1344870825.67.0.423527056442.issue13498@psf.upfronthosting.co.za> R. David Murray added the comment: English-wise I would drop the "Also". You say "differs from the one supplied", but given the rest of the text I would expect that it is really "differs from the supplied mode masked with the current umask, on systems where the mode is respected", which is a mouthful :(. Perhaps it would flow better if the discussion of exists_ok came after the discussion of mode (that is, as the last thing in the paragraph). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 17:24:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 15:24:57 +0000 Subject: [docs] [issue15151] Documentation for Signature, Parameter and signature in inspect module In-Reply-To: <1340432030.73.0.594662136445.issue15151@psf.upfronthosting.co.za> Message-ID: <1344871497.18.0.70249213011.issue15151@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Done in 843e0da7e91f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 17:33:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 15:33:31 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344872011.74.0.716612084565.issue15561@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Andrew, here is the new patch for 3.2. 3.3 will come shortly after. ---------- Added file: http://bugs.python.org/file26783/issue-15561-3-branch-32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 17:39:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 15:39:06 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344872346.16.0.554103698207.issue15561@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is the patch for the default/3.3 branch, which for convenience is a diff for the branch *after the 3.2 patch has been forward-ported to 3.3*. I did not think it was necessary to mention write_through specifically since it seems more like an implementation detail (though stdin as a whole is now documented). ---------- Added file: http://bugs.python.org/file26784/issue-15561-3-branch-default-delta.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 18:00:22 2012 From: report at bugs.python.org (Daniel Ellis) Date: Mon, 13 Aug 2012 16:00:22 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344873621.63.0.933247541963.issue15586@psf.upfronthosting.co.za> Daniel Ellis added the comment: I've updated 2.7 with the examples and made changes where backward compatibility was an issue. ---------- Added file: http://bugs.python.org/file26785/2.7_branch_etree_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 18:01:08 2012 From: report at bugs.python.org (Daniel Ellis) Date: Mon, 13 Aug 2012 16:01:08 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344873668.06.0.359446561068.issue15586@psf.upfronthosting.co.za> Daniel Ellis added the comment: Fixed typo I made in examples in default branch. ---------- Added file: http://bugs.python.org/file26786/default_branch_etree_doc_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 19:05:15 2012 From: report at bugs.python.org (Mike Hoy) Date: Mon, 13 Aug 2012 17:05:15 +0000 Subject: [docs] [issue12436] Missing items in installation/setup instructions In-Reply-To: <1309305395.29.0.101516779086.issue12436@psf.upfronthosting.co.za> Message-ID: <1344877515.08.0.129737014432.issue12436@psf.upfronthosting.co.za> Mike Hoy added the comment: >Thanks, I will take all contributions and suggestions and propose one patch. I am able to start working on this issue again, Eric. If you want to give me the status of your patch I can either help you finish it up or I can make one this week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 21:11:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 13 Aug 2012 19:11:27 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <3Wwmkj4kxjzPpc@mail.python.org> Roundup Robot added the comment: New changeset 381aaf79c254 by Andrew Svetlov in branch '3.2': Issue #15561: Update subprocess docs to reference io.TextIOWrapper. http://hg.python.org/cpython/rev/381aaf79c254 New changeset 0cd9423770fa by Andrew Svetlov in branch 'default': Issue #15561: Update subprocess docs to reference io.TextIOWrapper. http://hg.python.org/cpython/rev/0cd9423770fa ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 21:16:03 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 19:16:03 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344885363.25.0.168363673188.issue15561@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. BTW I prefer to use ?stream? as alias to file object it subprocess context. ?file? can clash with ?the real file in filesystem? for documentation reader. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 21:19:59 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 19:19:59 +0000 Subject: [docs] [issue15561] update subprocess docs to reference io.TextIOWrapper In-Reply-To: <1344196317.87.0.366111796882.issue15561@psf.upfronthosting.co.za> Message-ID: <1344885599.49.0.647167333551.issue15561@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Fixed. BTW I prefer to use ?stream? as alias to file object Thanks a lot, Andrew. Yes, I agree and actually contemplated doing that myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 21:27:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 19:27:42 +0000 Subject: [docs] [issue15497] correct characters in TextWrapper.replace_whitespace docs In-Reply-To: <1343621441.45.0.427004155003.issue15497@psf.upfronthosting.co.za> Message-ID: <1344886062.81.0.0747796910805.issue15497@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +asvetlov versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 21:32:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 19:32:56 +0000 Subject: [docs] [issue15437] Merge Doc/ACKS.txt names into Misc/ACKS In-Reply-To: <1343074054.0.0.16855130631.issue15437@psf.upfronthosting.co.za> Message-ID: <1344886376.78.0.315130684078.issue15437@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 21:33:53 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 19:33:53 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <1344886433.99.0.426876500748.issue14167@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 21:38:13 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 13 Aug 2012 19:38:13 +0000 Subject: [docs] [issue15628] Add import ABC hierarchy to docs for importlib In-Reply-To: <1344737242.66.0.0570077478746.issue15628@psf.upfronthosting.co.za> Message-ID: <1344886693.6.0.932196796483.issue15628@psf.upfronthosting.co.za> Brett Cannon added the comment: http://hg.python.org/cpython/rev/1c8a6df94602 seems to be commit this. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 22:26:49 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 13 Aug 2012 20:26:49 +0000 Subject: [docs] [issue15497] correct characters in TextWrapper.replace_whitespace docs In-Reply-To: <1343621441.45.0.427004155003.issue15497@psf.upfronthosting.co.za> Message-ID: <3WwpPg1B0kzPrd@mail.python.org> Roundup Robot added the comment: New changeset 90a8a462d2f7 by Andrew Svetlov in branch '3.2': Issue #15497: Correct characters in TextWrapper.replace_whitespace docs. http://hg.python.org/cpython/rev/90a8a462d2f7 New changeset edcbf3edf701 by Andrew Svetlov in branch 'default': Issue #15497: Correct characters in TextWrapper.replace_whitespace docs. http://hg.python.org/cpython/rev/edcbf3edf701 New changeset 3bddc965e2ea by Andrew Svetlov in branch '2.7': Issue #15497: Correct characters in TextWrapper.replace_whitespace docs. http://hg.python.org/cpython/rev/3bddc965e2ea ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 13 22:27:36 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 13 Aug 2012 20:27:36 +0000 Subject: [docs] [issue15497] correct characters in TextWrapper.replace_whitespace docs In-Reply-To: <1343621441.45.0.427004155003.issue15497@psf.upfronthosting.co.za> Message-ID: <1344889656.93.0.547307025444.issue15497@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Done. Thanks, Chris. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 01:48:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 13 Aug 2012 23:48:49 +0000 Subject: [docs] [issue15269] Document dircmp.left and dircmp.right In-Reply-To: <1341635280.22.0.709109531165.issue15269@psf.upfronthosting.co.za> Message-ID: <1344901729.56.0.290165031423.issue15269@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 03:02:22 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 14 Aug 2012 01:02:22 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344906141.72.0.635720898191.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Updating patch to latest again. ---------- nosy: +asvetlov Added file: http://bugs.python.org/file26792/issue-15543-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 04:02:31 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 14 Aug 2012 02:02:31 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344909751.41.0.801518829594.issue15543@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for working on this. I see nothing wrong with using 'universal newlines mode' as the term, which would simplify the markup. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 04:42:52 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 14 Aug 2012 02:42:52 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344912172.61.0.307225667782.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Sure, you're welcome. And sounds good, I'll change it. The singular was the prevailing form, but you're right that there is no reason we can't change it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 05:11:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 14 Aug 2012 03:11:36 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344913896.14.0.322005603879.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Is it worth standardizing on "universal newlines mode" in the code as well (docstrings, etc)? There are about ten occurrences of "universal newline mode" that would need to be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 05:41:55 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 14 Aug 2012 03:41:55 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344915715.16.0.885203798684.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is a new patch with David's suggested change (just for doc files though). ---------- Added file: http://bugs.python.org/file26796/issue-15543-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 06:21:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 14 Aug 2012 04:21:02 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <3Wx0ws3p1czPwJ@mail.python.org> Roundup Robot added the comment: New changeset fc66730dae4c by Eli Bendersky in branch 'default': Issue #15586: add some examples to ElementTree documentation. Patch by Daniel Ellis. http://hg.python.org/cpython/rev/fc66730dae4c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From eliben at gmail.com Tue Aug 14 06:29:38 2012 From: eliben at gmail.com (eliben at gmail.com) Date: Tue, 14 Aug 2012 04:29:38 -0000 Subject: [docs] Provide some examples for usage of ElementTree methods/attributes (issue 15586) Message-ID: <20120814042938.27026.51035@psf.upfronthosting.co.za> http://bugs.python.org/review/15586/diff/5726/Doc/library/xml.etree.elementtree.rst File Doc/library/xml.etree.elementtree.rst (right): http://bugs.python.org/review/15586/diff/5726/Doc/library/xml.etree.elementtree.rst#newcode102 Doc/library/xml.etree.elementtree.rst:102: import xml.etree.ElementTree as ET Please fix this similarly to my fix for the 3.3 patch The parse method you call returns an element, not a tree, and anyway there's a shorter way (ET.parse function) http://bugs.python.org/review/15586/diff/5726/Doc/library/xml.etree.elementtree.rst#newcode111 Doc/library/xml.etree.elementtree.rst:111: :func:`fromstring` parses XML from a string directly into an :class:`Element`, Please also align here for the fixed 3.3 patch http://bugs.python.org/review/15586/ From report at bugs.python.org Tue Aug 14 06:30:35 2012 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 14 Aug 2012 04:30:35 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344918635.32.0.955169376578.issue15586@psf.upfronthosting.co.za> Eli Bendersky added the comment: I committed your patch to default (3.3) with some minor fixes. Please go over them as you will need to apply them to the 2.7 patch. I've reviewed the 2.7 patch as well - it's an initial review. Did you execute all the code samples on 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 11:29:29 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 14 Aug 2012 09:29:29 +0000 Subject: [docs] [issue15269] Document dircmp.left and dircmp.right In-Reply-To: <1341635280.22.0.709109531165.issue15269@psf.upfronthosting.co.za> Message-ID: <1344936569.51.0.437033047797.issue15269@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Hi Chris & Eli, - Sorry that I missed this issue. Chris - agree to your rationale. I can see how having self.left and self.right documented can add value, The diff example was useful. Initially, I did have some doubts in terms how it could be useful when the args are sent by the user, your example clarified. Thanks!. As Eli has looked at this one too, I shall commit the patch. Everything is good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 11:39:31 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 14 Aug 2012 09:39:31 +0000 Subject: [docs] [issue15269] Document dircmp.left and dircmp.right In-Reply-To: <1341635280.22.0.709109531165.issue15269@psf.upfronthosting.co.za> Message-ID: <1344937170.98.0.654699695927.issue15269@psf.upfronthosting.co.za> Senthil Kumaran added the comment: As this is not adding any feature, but just an additional clarification to the existing attribute together with some useful documentation, I believe this can go in 2.7, 3.2 and 3.3 Please correct me if I am wrong here. ---------- versions: +Python 2.7, Python 3.2, Python 3.3 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 11:46:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 14 Aug 2012 09:46:45 +0000 Subject: [docs] [issue15269] Document dircmp.left and dircmp.right In-Reply-To: <1341635280.22.0.709109531165.issue15269@psf.upfronthosting.co.za> Message-ID: <1344937605.18.0.246038403593.issue15269@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks a lot, Senthil. I appreciate it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 12:00:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 14 Aug 2012 10:00:21 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344938420.52.0.743129941329.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Updating patch to tip again. ---------- Added file: http://bugs.python.org/file26799/issue-15543-5.patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue Aug 14 13:49:43 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 14 Aug 2012 13:49:43 +0200 Subject: [docs] Typo in the String docs In-Reply-To: <861590129.83729.1344859715519.JavaMail.root@llavaneres> References: <861590129.83729.1344859715519.JavaMail.root@llavaneres> Message-ID: Hello Ramon, On Mon, Aug 13, 2012 at 2:09 PM, Ramon Royo Giner wrote: > "Helloo".replace('oo', 'o') #does work -> "Hello" > "Helloo".replace('Helloo', 'oo', 'o') #doesnt work, throws a type error, > because 'o' is in the place of the third argument (maxreplace), which should > be an int I'm sorry, I could have used some examples to make my original email more clear. What you're doing is using the replace() method of the string object: >>> s = "Helloo" >>> type(s) which has the first argument already "filled": >>> s.replace('oo', 'o') 'Hello' so you don't need to specify once again the string it operates on. In the example you cited in the original email refers to the replace() function of the string module: >>> import string >>> string.replace('Helloo', 'oo', 'o') 'Hello' Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From b99902035 at csie.ntu.edu.tw Mon Aug 13 07:52:25 2012 From: b99902035 at csie.ntu.edu.tw (b99902035 at csie.ntu.edu.tw) Date: Mon, 13 Aug 2012 13:52:25 +0800 Subject: [docs] Grammatical error Message-ID: <20120813135225.24362clcds4qmgbd@webmail.csie.ntu.edu.tw> Under http://docs.python.org/py3k/tutorial/inputoutput.html#fancier-output-formatting, "(or will force a SyntaxError if there is not equivalent syntax)" should be "(or will force a SyntaxError if there is __no__ equivalent syntax)". Regards. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. From ls.sergey at gmail.com Tue Aug 14 12:16:09 2012 From: ls.sergey at gmail.com (Sergey Skovorodkin) Date: Tue, 14 Aug 2012 14:16:09 +0400 Subject: [docs] Bug in Functional Programming HOWTO Message-ID: Hi, http://docs.python.org/howto/functional.html#iterators > You?ll run into obvious problems if the iterator is infinite; max(), min(), and "not in" will never return, and if the element X never appears in the stream, the "in" operator won?t return either. "not in" returns False if the element X appears in the stream, so I think it's better to say > max() and min() will never return, and if the element X never appears in the stream, the "in" and "not in" operators won?t return either. -- Sergey Skovorodkin From ezio.melotti at gmail.com Tue Aug 14 14:13:17 2012 From: ezio.melotti at gmail.com (ezio.melotti at gmail.com) Date: Tue, 14 Aug 2012 12:13:17 -0000 Subject: [docs] re.VERBOSE whitespace behavior not completely documented (issue 15606) Message-ID: <20120814121317.29534.58793@psf.upfronthosting.co.za> http://bugs.python.org/review/15606/diff/5718/Doc/library/re.rst File Doc/library/re.rst (right): http://bugs.python.org/review/15606/diff/5718/Doc/library/re.rst#newcode540 Doc/library/re.rst:540: extension construct (so, for example, ``(?P a | b)`` is a Reading this it seems to me that ``( ?:`` is allowed. Maybe saying something like "within tokens like ``(?:`` or ``(?P<...>``" is better. http://bugs.python.org/review/15606/diff/5718/Doc/library/re.rst#newcode546 Doc/library/re.rst:546: the leftmost such ``'#'`` through the end of the line are ignored. I find this paragraph a bit confusing, and would rephrase it to something like: """ All the text after and including the ``'#'`` character is considered as comment and ignored, unless the ``'#'`` is in a character class or it's preceded by an unescaped backslash. """ http://bugs.python.org/review/15606/ From report at bugs.python.org Tue Aug 14 14:28:33 2012 From: report at bugs.python.org (Xavier Morel) Date: Tue, 14 Aug 2012 12:28:33 +0000 Subject: [docs] [issue15639] csv.Error description is incorrectly broad In-Reply-To: <1344861900.41.0.500081964818.issue15639@psf.upfronthosting.co.za> Message-ID: <1344947312.86.0.637810464409.issue15639@psf.upfronthosting.co.za> Xavier Morel added the comment: Correction: csv also seems to raise csv.Error if the file contains NUL bytes: Error: line contains NULL byte ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 14:45:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 14 Aug 2012 12:45:33 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <3WxD7012klzQ2j@mail.python.org> Roundup Robot added the comment: New changeset e0e8e70e4035 by Andrew Svetlov in branch '3.2': Issue #14167: Document return statement in finally blocks. http://hg.python.org/cpython/rev/e0e8e70e4035 New changeset 05714e9811fa by Andrew Svetlov in branch 'default': Issue #14167: Document return statement in finally blocks. http://hg.python.org/cpython/rev/05714e9811fa New changeset bef098bd3fa5 by Andrew Svetlov in branch '2.7': Issue #14167: Document return statement in finally blocks. http://hg.python.org/cpython/rev/bef098bd3fa5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 14:46:27 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 14 Aug 2012 12:46:27 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <1344948387.67.0.331434392406.issue14167@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 15:12:34 2012 From: report at bugs.python.org (Daniel Ellis) Date: Tue, 14 Aug 2012 13:12:34 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344949952.95.0.37554789938.issue15586@psf.upfronthosting.co.za> Daniel Ellis added the comment: Thank you for the review Eli. I've made your changes and attached the updated patch. I did run all of the code snippets that are being added on 2.7, and the only thing I found different was the changed print statement. I don't believe I overlooked anything, but I may have made a mistake. ---------- Added file: http://bugs.python.org/file26802/2.7_branch_etree_doc_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 14 18:01:23 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 14 Aug 2012 16:01:23 +0000 Subject: [docs] [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1344960083.18.0.770042926162.issue15204@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue Aug 14 19:52:31 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 14 Aug 2012 19:52:31 +0200 Subject: [docs] Grammatical error In-Reply-To: <20120813135225.24362clcds4qmgbd@webmail.csie.ntu.edu.tw> References: <20120813135225.24362clcds4qmgbd@webmail.csie.ntu.edu.tw> Message-ID: Hello, On Mon, Aug 13, 2012 at 7:52 AM, wrote: > Under > http://docs.python.org/py3k/tutorial/inputoutput.html#fancier-output-formatting, > "(or will force a SyntaxError if there is not equivalent syntax)" should be > "(or will force a SyntaxError if there is __no__ equivalent syntax)". Thanks - I've just fixed it on all the active branches. 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 Tue Aug 14 20:57:45 2012 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 14 Aug 2012 18:57:45 +0000 Subject: [docs] [issue15656] "Extending Python with C" page needs update for 3.x Message-ID: <1344970665.85.0.951420699824.issue15656@psf.upfronthosting.co.za> New submission from Sandro Tosi: Hello, this has been reported at http://mail.python.org/pipermail/docs/2012-July/009223.html but since I have no experience to judge if it's correct or not, i'll just report it: >>> I've recenty started to try using C code in python using the wonderful python API, although i have to say the learning curve was non neglectable :P I've spotted what I believe to be a small mistake in the documentation from this page: http://docs.python.org/release/3.2/extending/extending.html In paragraph 1.8 (http://docs.python.org/release/3.2/extending/extending.html#keyword-parameters-for-extension-functions), the code example given contains an error, which is actually obsolete code from python 2.7: void initkeywdarg(void) { /* Create the module and add the functions */ Py_InitModule("keywdarg", keywdarg_methods); } This doesn't work in Python3.2. It's supposed to be static struct PyModuleDef keywdargmodule = { PyModuleDef_HEAD_INIT, "keywdarg", /* name of module */ keywdarg_doc, /* module documentation, may be NULL */ -1, /* size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */ keywdarg_methods }; PyMODINIT_FUNC PyInit_keywdarg(void) { return PyModule_Create(&keywdargmodule); } As explained above (and confirmed by experience). <<< ---------- assignee: docs at python components: Documentation messages: 168223 nosy: docs at python, sandro.tosi priority: normal severity: normal stage: patch review status: open title: "Extending Python with C" page needs update for 3.x versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue Aug 14 20:58:27 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 14 Aug 2012 20:58:27 +0200 Subject: [docs] Small error in the "Extending Python with C" page In-Reply-To: <4FF82D02.8010304@gmail.com> References: <4FF82D02.8010304@gmail.com> Message-ID: Hello Hadrien, given I have no experience nor knowledge to judge the correctness of your proposed fix, I've just reported http://bugs.python.org/issue15656 . Regards, Sandro On Sat, Jul 7, 2012 at 2:35 PM, Hadrien Titeux wrote: > Hello, > > I've recenty started to try using C code in python using the wonderful > python API, although i have to say the learning curve was non neglectable :P > I've spotted what I believe to be a small mistake in the documentation from > this page: > http://docs.python.org/release/3.2/extending/extending.html > > In paragraph 1.8 > (http://docs.python.org/release/3.2/extending/extending.html#keyword-parameters-for-extension-functions), > the code example given contains an error, which is actually obsolete code > from python 2.7: > > void > initkeywdarg(void) > { > /* Create the module and add the functions */ > Py_InitModule("keywdarg", keywdarg_methods); > } > > > This doesn't work in Python3.2. It's supposed to be > > static struct PyModuleDef keywdargmodule = { > PyModuleDef_HEAD_INIT, > "keywdarg", /* name of module */ > keywdarg_doc, /* module documentation, may be NULL */ > -1, /* size of per-interpreter state of the module, > or -1 if the module keeps state in global variables. */ > keywdarg_methods > }; > > PyMODINIT_FUNC > PyInit_keywdarg(void) > { > return PyModule_Create(&keywdargmodule); > } > > As explained above (and confirmed by experience). > > Thanks for your work, > Hadrien. > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Aug 14 20:59:25 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 14 Aug 2012 20:59:25 +0200 Subject: [docs] Language Missing in Python In-Reply-To: References: Message-ID: Hello Isaac, On Mon, Jun 18, 2012 at 6:29 AM, Isaac Munjunga wrote: > I can't find my language every time I update my Ubuntu distro. Kindly > include and update locale: > > 'en_ZM': 'en_GB.ISO8859-1', > 'en_ZM.iso88591': 'en_GB.ISO8859-1', > > I manually include that, but I know someone people may not have the time to > do it. I'm not exactly sure what's the problem your facing, but I suspect you should seek for help in a ubuntu support forum. 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 Tue Aug 14 21:02:46 2012 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 14 Aug 2012 19:02:46 +0000 Subject: [docs] [issue15657] Error in Python 3 docs for PyMethodDef Message-ID: <1344970966.7.0.115664419243.issue15657@psf.upfronthosting.co.za> New submission from Sandro Tosi: Hello, it has been reported at http://mail.python.org/pipermail/docs/2012-April/008215.html but given it raises some question whether it's a bug in the doc or in the code, i'd rather report the issue here and hear what other think: >>> In the Python 3.2.2 documentation (and earlier Python 3 versions), in the Python/C API Reference Manual, chapter Object Implementation Support, the documentation for PyMethodDef says: The ml_flags field is a bitfield which can include the following flags. The individual flags indicate either a calling convention or a binding convention. Of the calling convention flags, only METH_VARARGS and METH_KEYWORDS can be combined (but note that METH_KEYWORDS alone is equivalent to METH_VARARGS | METH_KEYWORDS). The bit in the parenthetical is incorrect. If you take a look at PyCFunction_Call in Objects/methodobject.c, you will find a switch for METH_VARARGS | METH_KEYWORDS, but no switch for METH_KEYWORDS. Hence, using METH_KEYWORDS will land you with a SystemError that complains about METH_OLDARGS. This is either a bug in the documentation, or a bug in Python. In this case, since the code has persisted through three major revisions of Python 3, I suggest that the bug _is_ in the documentation (whether it should be or not), since changing the code for this at this late date means a programmer has to use METH_VARARGS | METH_KEYWORDS anyway for compatibility. It may be work pointing out specifically in the documentation that just using METH_KEYWORDS will not work. <<< ---------- assignee: docs at python components: Documentation messages: 168226 nosy: docs at python, sandro.tosi priority: normal severity: normal stage: patch review status: open title: Error in Python 3 docs for PyMethodDef versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue Aug 14 21:03:13 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 14 Aug 2012 21:03:13 +0200 Subject: [docs] Error in Python 3 docs for PyMethodDef In-Reply-To: References: Message-ID: Hello Michael, I've just reported http://bugs.python.org/issue15657 to track your request. Regards, Sandro On Fri, Apr 6, 2012 at 6:31 PM, Michael Welsh Duggan wrote: > In the Python 3.2.2 documentation (and earlier Python 3 versions), in > the Python/C API Reference Manual, chapter Object Implementation > Support, the documentation for PyMethodDef says: > > The ml_flags field is a bitfield which can include the following > flags. The individual flags indicate either a calling convention or a > binding convention. Of the calling convention flags, only METH_VARARGS > and METH_KEYWORDS can be combined (but note that METH_KEYWORDS alone > is equivalent to METH_VARARGS | METH_KEYWORDS). > > The bit in the parenthetical is incorrect. If you take a look at > PyCFunction_Call in Objects/methodobject.c, you will find a switch for > METH_VARARGS | METH_KEYWORDS, but no switch for METH_KEYWORDS. Hence, > using METH_KEYWORDS will land you with a SystemError that complains > about METH_OLDARGS. > > This is either a bug in the documentation, or a bug in Python. In this > case, since the code has persisted through three major revisions of > Python 3, I suggest that the bug _is_ in the documentation (whether it > should be or not), since changing the code for this at this late date > means a programmer has to use METH_VARARGS | METH_KEYWORDS anyway for > compatibility. > > It may be work pointing out specifically in the documentation that just > using METH_KEYWORDS will not work. > > -- > Michael Welsh Duggan > (mwd at cert.org) > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Tue Aug 14 21:42:18 2012 From: report at bugs.python.org (Michael Welsh Duggan) Date: Tue, 14 Aug 2012 19:42:18 +0000 Subject: [docs] [issue15657] Error in Python 3 docs for PyMethodDef In-Reply-To: <1344970966.7.0.115664419243.issue15657@psf.upfronthosting.co.za> Message-ID: <1344973338.81.0.516246531149.issue15657@psf.upfronthosting.co.za> Changes by Michael Welsh Duggan : ---------- nosy: +md5i _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 02:04:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 15 Aug 2012 00:04:51 +0000 Subject: [docs] [issue15269] Document dircmp.left and dircmp.right In-Reply-To: <1341635280.22.0.709109531165.issue15269@psf.upfronthosting.co.za> Message-ID: <1344989091.11.0.492420150672.issue15269@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Senthil, here is a recent e-mail and response in which I asked about documentation changes and adding tests during feature freeze: http://mail.python.org/pipermail/python-dev/2012-July/121138.html Also, here is a recent example of a documentation clarification that went into 2.7, 3.2, and tip: http://bugs.python.org/issue15554 Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 02:41:16 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 15 Aug 2012 00:41:16 +0000 Subject: [docs] [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1344991276.35.0.424135181559.issue15204@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The only people affected by deprecating "U" are the people who are currently using it for some reason -- presumably they are expecting that it does something useful for their code. Ideally, this proposed deprecation should be mentioned on python-dev so that those folks will have an opportunity to respond. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:01:26 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 15 Aug 2012 01:01:26 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344992486.77.0.0149070790513.issue15543@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, we might as well be consistent, though it's not a big deal either way. I'd prefer that as a separate patch. Any interest in backporting this to 2.7? Being so close to final release on 3.2 I think we can skip 3.2, unless you feel like doing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:09:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 15 Aug 2012 01:09:17 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1344992957.49.0.534350185573.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Sure, I'd be happy to do both 2.7 and 3.2. I can upload the patch for the default branch as a delta to apply after the 3.2 change has been forward-ported from 3.2 to default. Thanks for taking an interest in this! ---------- versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:51:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 15 Aug 2012 01:51:23 +0000 Subject: [docs] [issue15269] Document dircmp.left and dircmp.right In-Reply-To: <1341635280.22.0.709109531165.issue15269@psf.upfronthosting.co.za> Message-ID: <3WxYYj3WZfzQ7P@mail.python.org> Roundup Robot added the comment: New changeset 7590dec388a7 by R David Murray in branch '3.2': #15269: document dircmp.left and right, and add tests for them. http://hg.python.org/cpython/rev/7590dec388a7 New changeset c592e5a8fa4f by R David Murray in branch 'default': Merge #15269: document dircmp.left and right, and add tests for them. http://hg.python.org/cpython/rev/c592e5a8fa4f New changeset e64d4518b23c by R David Murray in branch '2.7': #15269: document dircmp.left and right. http://hg.python.org/cpython/rev/e64d4518b23c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 03:52:29 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 15 Aug 2012 01:52:29 +0000 Subject: [docs] [issue15269] Document dircmp.left and dircmp.right In-Reply-To: <1341635280.22.0.709109531165.issue15269@psf.upfronthosting.co.za> Message-ID: <1344995548.98.0.307497813562.issue15269@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Chris. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 04:01:05 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 15 Aug 2012 02:01:05 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1344996065.35.0.789490867813.issue15586@psf.upfronthosting.co.za> ?ric Araujo added the comment: I noticed a long-standing typo in the latest commit: the country is named Liechtenstein :) ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 04:51:26 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 15 Aug 2012 02:51:26 +0000 Subject: [docs] [issue15657] Error in Python 3 docs for PyMethodDef In-Reply-To: <1344970966.7.0.115664419243.issue15657@psf.upfronthosting.co.za> Message-ID: <1344999086.37.0.968037047753.issue15657@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 13:27:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 15 Aug 2012 11:27:28 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <3WxpLQ33kFzQBM@mail.python.org> Roundup Robot added the comment: New changeset 8d90fde35cc6 by Eli Bendersky in branch 'default': Issue #15586: typo fix. This commit is accompanied by an apology for all Liechtensteiners out there, and a thanks to Eric Araujo for noticing. http://hg.python.org/cpython/rev/8d90fde35cc6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 13:38:54 2012 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 15 Aug 2012 11:38:54 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1345030734.33.0.735511081438.issue15586@psf.upfronthosting.co.za> Eli Bendersky added the comment: Daniel, this looks good except that the section numbering is different from 3.3 where the object/function reference sections were nested under "Reference". Could you fix your patch to align the 2.7 doc to this structure? P.S. ?ric's comment also has to be fixed ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 13:41:31 2012 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 15 Aug 2012 11:41:31 +0000 Subject: [docs] [issue15656] "Extending Python with C" page needs update for 3.x In-Reply-To: <1344970665.85.0.951420699824.issue15656@psf.upfronthosting.co.za> Message-ID: <1345030891.7.0.348043402019.issue15656@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 13:52:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 15 Aug 2012 11:52:27 +0000 Subject: [docs] [issue15656] "Extending Python with C" page needs update for 3.x In-Reply-To: <1344970665.85.0.951420699824.issue15656@psf.upfronthosting.co.za> Message-ID: <3WxpvG4S07zQBV@mail.python.org> Roundup Robot added the comment: New changeset 599376deeeac by Eli Bendersky in branch '3.2': Issue #15656: fixing code sample in extending doc http://hg.python.org/cpython/rev/599376deeeac ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 13:53:25 2012 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 15 Aug 2012 11:53:25 +0000 Subject: [docs] [issue15656] "Extending Python with C" page needs update for 3.x In-Reply-To: <1344970665.85.0.951420699824.issue15656@psf.upfronthosting.co.za> Message-ID: <1345031605.26.0.917910194217.issue15656@psf.upfronthosting.co.za> Eli Bendersky added the comment: Fixed, thanks for the report. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 14:01:06 2012 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 15 Aug 2012 12:01:06 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1345032066.63.0.487233351032.issue15629@psf.upfronthosting.co.za> Eli Bendersky added the comment: I think implementing this is very important, and +1 to Georg's suggestion, because no one is suddenly going to convert KLOCs of code samples to be testable (many code samples are partial, and will need to be completed in one way or another to be actually runnable). However, do I understand correctly that this is blocked on #10224? ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 14:10:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 15 Aug 2012 12:10:28 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1345032628.71.0.83052233245.issue15629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I would like the chance to try implementing this without depending on Sphinx and "make doctest". I don't think it would take much work, and it would let us leverage and hook into regrtest's existing options (like test selection by name). I am also okay with exposing this via an option rather than including the doctests by default, which seemed to be the main concern expressed by others. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 15:02:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 15 Aug 2012 13:02:51 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1345035770.94.0.342514459623.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is the patch for 2.7. ---------- Added file: http://bugs.python.org/file26822/issue-15543-6-py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 16:04:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 15 Aug 2012 14:04:47 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1345039486.78.0.614035388556.issue15543@psf.upfronthosting.co.za> Changes by Chris Jerdonek : Added file: http://bugs.python.org/file26826/issue-15543-6-py32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 16:08:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 15 Aug 2012 14:08:32 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1345039712.45.0.161870590169.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: And here are the 3.2 patch and the 3.3 "delta" after forward-porting. Note that to forward-port the 3.2 patch to the default 3.3 branch, you can simply drop the changes to the file Doc/library/bz2.rst. I think that is the only conflict. ---------- Added file: http://bugs.python.org/file26827/issue-15543-6-py33-delta.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 17:23:53 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 15 Aug 2012 15:23:53 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <3WxvbD3R16zPl5@mail.python.org> Roundup Robot added the comment: New changeset 273df9789796 by R David Murray in branch '3.2': #15543: glossary entry for and 'universal newlines', and links to it. http://hg.python.org/cpython/rev/273df9789796 New changeset e67042b6ad02 by R David Murray in branch '3.2': #15543: reflow paragraphs. http://hg.python.org/cpython/rev/e67042b6ad02 New changeset 04a0255de9b8 by R David Murray in branch 'default': Merge #15543: glossary entry for and 'universal newlines', and links to it. http://hg.python.org/cpython/rev/04a0255de9b8 New changeset 37df50bc4ea0 by R David Murray in branch 'default': #15543: additional link in subprocess docs. http://hg.python.org/cpython/rev/37df50bc4ea0 New changeset a2efe5eeb876 by R David Murray in branch 'default': #15543: reflow paragraph. http://hg.python.org/cpython/rev/a2efe5eeb876 New changeset 8795cd3b4c8c by R David Murray in branch '2.7': #15543: glossary entry for and 'universal newlines', and links to it. http://hg.python.org/cpython/rev/8795cd3b4c8c New changeset 35d8a638b0e2 by R David Murray in branch '2.7': #15543: reflow paragraphs. http://hg.python.org/cpython/rev/35d8a638b0e2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 17:25:03 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 15 Aug 2012 15:25:03 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1345044303.55.0.450147265558.issue15543@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks Chris. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 17:30:41 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 15 Aug 2012 15:30:41 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1345044641.8.0.636701327415.issue15543@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Good work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 17:30:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 15 Aug 2012 15:30:45 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1345044645.6.0.269655469006.issue15543@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, David! Also, can/did you check that reflows like these still link to the glossary correctly? + :func:`input` function to allow opening files in binary or :term:`universal + newlines` mode. Another new parameter, *openhook*, lets you use a function I tried to avoid breaking role markups like these to be safe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 17:33:35 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 15 Aug 2012 15:33:35 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1345044815.05.0.532678069047.issue15543@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Yes, it is processed correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 21:12:49 2012 From: report at bugs.python.org (Daniel Swanson) Date: Wed, 15 Aug 2012 19:12:49 +0000 Subject: [docs] [issue15346] Tkinter extention modules no documentation In-Reply-To: <1342198047.2.0.619885102312.issue15346@psf.upfronthosting.co.za> Message-ID: <1345057969.91.0.300261350219.issue15346@psf.upfronthosting.co.za> Daniel Swanson added the comment: For that matter, none of the following have docs: tkinter.colorchooser tkinter.commondialog tkinter.filedialog tkinter.font tkinter.messagebox tkinter.simpledialog tkinter.dnd Perhaps this should be remidied? One sentence usualy does not describe the use of an entire module. ---------- title: Tkinter dnd has no documentation -> Tkinter extention modules no documentation type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 21:13:23 2012 From: report at bugs.python.org (Daniel Swanson) Date: Wed, 15 Aug 2012 19:13:23 +0000 Subject: [docs] [issue15346] Tkinter extention modules have no documentation In-Reply-To: <1342198047.2.0.619885102312.issue15346@psf.upfronthosting.co.za> Message-ID: <1345058003.48.0.0382360885092.issue15346@psf.upfronthosting.co.za> Changes by Daniel Swanson : ---------- title: Tkinter extention modules no documentation -> Tkinter extention modules have no documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 21:34:15 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 15 Aug 2012 19:34:15 +0000 Subject: [docs] [issue15656] "Extending Python with C" page needs update for 3.x In-Reply-To: <1344970665.85.0.951420699824.issue15656@psf.upfronthosting.co.za> Message-ID: <1345059255.12.0.205893400901.issue15656@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 15 21:35:52 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 15 Aug 2012 19:35:52 +0000 Subject: [docs] [issue15656] "Extending Python with C" page needs update for 3.x In-Reply-To: <1344970665.85.0.951420699824.issue15656@psf.upfronthosting.co.za> Message-ID: <1345059351.87.0.678713688739.issue15656@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Should this be applied to "default" (3.3) too? ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Wed Aug 15 21:38:27 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 15 Aug 2012 21:38:27 +0200 Subject: [docs] Bug in Functional Programming HOWTO In-Reply-To: References: Message-ID: Hello Sergey, On Tue, Aug 14, 2012 at 12:16 PM, Sergey Skovorodkin wrote: > Hi, > > http://docs.python.org/howto/functional.html#iterators >> You?ll run into obvious problems if the iterator is infinite; max(), min(), and "not in" will never return, and if the element X never appears in the stream, the "in" operator won?t return either. > > "not in" returns False if the element X appears in the stream, so I > think it's better to say > >> max() and min() will never return, and if the element X never appears in the stream, the "in" and "not in" operators won?t return either. Thanks - i've fixed it in all the active branches. 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 Aug 15 21:40:16 2012 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 15 Aug 2012 19:40:16 +0000 Subject: [docs] [issue15656] "Extending Python with C" page needs update for 3.x In-Reply-To: <1344970665.85.0.951420699824.issue15656@psf.upfronthosting.co.za> Message-ID: <1345059616.8.0.758940164798.issue15656@psf.upfronthosting.co.za> Sandro Tosi added the comment: It's fixed in default too: http://hg.python.org/cpython/rev/f46b4b7b817c It was not shown because the commit message misses the issue reference. ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Wed Aug 15 21:48:12 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 15 Aug 2012 21:48:12 +0200 Subject: [docs] Bug in part 5 of the Python 3 tutorial In-Reply-To: <5006BB59.5050008@antoneliasson.se> References: <5006BB59.5050008@antoneliasson.se> Message-ID: Hello Anton On Wed, Jul 18, 2012 at 3:34 PM, Anton Eliasson wrote: > >>> zip(*matrix) > > > However, in the tutorial the zip function returns a list of tuplets like > this: > > >>> zip(*matrix) > [(1, 5, 9), (2, 6, 10), (3, 7, 11), (4, 8, 12)] > > In order to get that result, I have to do this in my installation: > > >>> list(zip(*matrix)) > [(1, 5, 9), (2, 6, 10), (3, 7, 11), (4, 8, 12)] > Thanks - I've fixed this problem in the Python 3.x documentation some days ago. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From christoph.mueller7 at yahoo.com Tue Aug 14 18:50:37 2012 From: christoph.mueller7 at yahoo.com (=?ISO-8859-1?Q?Christoph_M=FCller?=) Date: Tue, 14 Aug 2012 18:50:37 +0200 Subject: [docs] Little mistake Message-ID: <502A81DD.3090405@yahoo.com> On http://docs.python.org/py3k/tutorial/introduction.html: *code * *prints * *instead of * word[4] 'p' 'A' word[0:2] 'AH' 'He' word[2:4] 'el' 'lp' -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.mueller7 at yahoo.com Tue Aug 14 18:54:55 2012 From: christoph.mueller7 at yahoo.com (=?ISO-8859-1?Q?Christoph_M=FCller?=) Date: Tue, 14 Aug 2012 18:54:55 +0200 Subject: [docs] Little mistake In-Reply-To: <502A81DD.3090405@yahoo.com> References: <502A81DD.3090405@yahoo.com> Message-ID: <502A82DF.1010704@yahoo.com> The same bug occurs in the following box. Am 14.08.2012 18:50, schrieb Christoph M?ller: > On http://docs.python.org/py3k/tutorial/introduction.html: > *code > * *prints > * *instead of > * > word[4] > > 'p' > > 'A' > word[0:2] > > 'AH' > > 'He' > word[2:4] > > 'el' > > 'lp' > > > *TODAY*/(Beta) /*.*Powered by Yahoo! > > How Aniston changed for her fianc?? > > > Get Yahoo Search App! > *. > *Privacy Policy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christoph.mueller7 at yahoo.com Tue Aug 14 19:05:19 2012 From: christoph.mueller7 at yahoo.com (=?ISO-8859-1?Q?Christoph_M=FCller?=) Date: Tue, 14 Aug 2012 19:05:19 +0200 Subject: [docs] Little mistake In-Reply-To: <502A82DF.1010704@yahoo.com> References: <502A81DD.3090405@yahoo.com> <502A82DF.1010704@yahoo.com> Message-ID: <502A854F.3050505@yahoo.com> No, sorry, I was wrong. Am 14.08.2012 18:54, schrieb Christoph M?ller: > The same bug occurs in the following box. > > Am 14.08.2012 18:50, schrieb Christoph M?ller: >> On http://docs.python.org/py3k/tutorial/introduction.html: >> *code >> * *prints >> * *instead of >> * >> word[4] >> >> 'p' >> >> 'A' >> word[0:2] >> >> 'AH' >> >> 'He' >> word[2:4] >> >> 'el' >> >> 'lp' >> >> >> *TODAY*/(Beta) /*.*Powered by Yahoo! >> >> How Aniston changed for her fianc?? >> >> >> Get Yahoo Search App! >> *. >> *Privacy Policy >> >> > > *TODAY*/(Beta) /*.*Powered by Yahoo! > > Signs that your relationship may fizzle > > > Get Yahoo Search App! > *. > *Privacy Policy > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From wolfgang at rohdewald.de Tue Aug 14 20:35:28 2012 From: wolfgang at rohdewald.de (Wolfgang Rohdewald) Date: Tue, 14 Aug 2012 20:35:28 +0200 Subject: [docs] gzip compression level Message-ID: <10593947.KBnWV5G9nf@i5> http://docs.python.org/library/gzip.html says level is 1..9 actually 0 works too - this the original uncompressed data but with a gzip header. I need level 0 for getting a smaller git repository with many svgz files which have often been edited (the file names and types cannot be changed) So - is this a documentation bug or have I just been lucky? -- Wolfgang From report at bugs.python.org Wed Aug 15 22:35:23 2012 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 15 Aug 2012 20:35:23 +0000 Subject: [docs] [issue15677] Gzip/zlib allows for compression level=0 Message-ID: <1345062923.32.0.954619584637.issue15677@psf.upfronthosting.co.za> New submission from Sandro Tosi: As reported at http://mail.python.org/pipermail/docs/2012-August/009837.html gzip/zlib allows for a compression level=0 (that's basically no compression) so the documentation should mention that possibility too. ---------- assignee: docs at python components: Documentation messages: 168332 nosy: docs at python, sandro.tosi priority: normal severity: normal stage: needs patch status: open title: Gzip/zlib allows for compression level=0 versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Wed Aug 15 22:35:59 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 15 Aug 2012 22:35:59 +0200 Subject: [docs] gzip compression level In-Reply-To: <10593947.KBnWV5G9nf@i5> References: <10593947.KBnWV5G9nf@i5> Message-ID: Hello Wolfgang, On Tue, Aug 14, 2012 at 8:35 PM, Wolfgang Rohdewald wrote: > http://docs.python.org/library/gzip.html > > says level is 1..9 > > actually 0 works too - this the original uncompressed data > but with a gzip header. > > I need level 0 for getting a smaller git repository with many > svgz files which have often been edited > (the file names and types cannot be changed) > > So - is this a documentation bug or have I just been lucky? You're right, it's a documentation bug; I've filed http://bugs.python.org/issue15677 to track 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 Aug 16 00:48:56 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 15 Aug 2012 22:48:56 +0000 Subject: [docs] [issue15543] central documentation for 'universal newlines' In-Reply-To: <1343953234.25.0.0555174882779.issue15543@psf.upfronthosting.co.za> Message-ID: <1345070936.44.0.439820558678.issue15543@psf.upfronthosting.co.za> ?ric Araujo added the comment: Great patch! ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 00:52:25 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 15 Aug 2012 22:52:25 +0000 Subject: [docs] [issue12436] Missing items in installation/setup instructions In-Reply-To: <1309305395.29.0.101516779086.issue12436@psf.upfronthosting.co.za> Message-ID: <1345071145.35.0.209216016756.issue12436@psf.upfronthosting.co.za> ?ric Araujo added the comment: My computer currently doesn?t boot so I can?t check if I had started or not. You can propose a patch incorporating the various suggestions, or give me some days to read this again and make a summary of what I would have done. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From ezio.melotti at gmail.com Thu Aug 16 03:44:21 2012 From: ezio.melotti at gmail.com (ezio.melotti at gmail.com) Date: Thu, 16 Aug 2012 01:44:21 -0000 Subject: [docs] Provide some examples for usage of ElementTree methods/attributes (issue 15586) Message-ID: <20120816014421.27027.53599@psf.upfronthosting.co.za> http://bugs.python.org/review/15586/diff/5727/Doc/library/xml.etree.elementtree.rst File Doc/library/xml.etree.elementtree.rst (right): http://bugs.python.org/review/15586/diff/5727/Doc/library/xml.etree.elementtree.rst#newcode155 Doc/library/xml.etree.elementtree.rst:155: ... tree.write('output.xml') This should now have the >>> prompt (same with the following examples). http://bugs.python.org/review/15586/ From ezio.melotti at gmail.com Thu Aug 16 03:44:45 2012 From: ezio.melotti at gmail.com (ezio.melotti at gmail.com) Date: Thu, 16 Aug 2012 01:44:45 -0000 Subject: [docs] Provide some examples for usage of ElementTree methods/attributes (issue 15586) Message-ID: <20120816014445.27027.25062@psf.upfronthosting.co.za> http://bugs.python.org/review/15586/ From report at bugs.python.org Thu Aug 16 17:29:37 2012 From: report at bugs.python.org (Daniel Ellis) Date: Thu, 16 Aug 2012 15:29:37 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <1345130976.94.0.332432000406.issue15586@psf.upfronthosting.co.za> Daniel Ellis added the comment: Made changes in structure in 2.7 branch to match 3.3 based on Eli's comments. Updated input prompt in examples per Ezio's review (though the default branch will still need this update). ---------- Added file: http://bugs.python.org/file26853/2.7_branch_etree_doc_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 17:48:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 16 Aug 2012 15:48:28 +0000 Subject: [docs] [issue15693] expose glossary link on hover Message-ID: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> New submission from Chris Jerdonek: It would be nice if hovering over the right side of the header to a glossary entry would expose a link in the same way that it does for function definitions, etc. http://docs.python.org/dev/glossary.html#glossary Otherwise, there doesn't seem to be a convenient way to get a direct link to a glossary entry. I'm not sure if this issue should also be filed with Sphinx. ---------- assignee: docs at python components: Documentation messages: 168388 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: expose glossary link on hover type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 17:51:19 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 16 Aug 2012 15:51:19 +0000 Subject: [docs] [issue15693] expose glossary link on hover In-Reply-To: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> Message-ID: <1345132279.09.0.222114763969.issue15693@psf.upfronthosting.co.za> R. David Murray added the comment: I think it probably should be filed with sphinx instead, rather than also. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:02:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 16 Aug 2012 16:02:05 +0000 Subject: [docs] [issue15693] expose glossary link on hover In-Reply-To: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> Message-ID: <1345132925.14.0.605228338539.issue15693@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Do we pin the version of Sphinx that we use to generate the documentation? If Sphinx fixes the issue, would we need to make a corresponding change here to reflect the fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:06:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 16 Aug 2012 16:06:31 +0000 Subject: [docs] [issue15694] link to "file object" glossary entry in open() and io docs Message-ID: <1345133191.76.0.682782918752.issue15694@psf.upfronthosting.co.za> New submission from Chris Jerdonek: It would be nice if the first sentence of the documentation for the open() built-in function: "Open file and return a corresponding stream. If the file cannot be opened, an OSError is raised." http://docs.python.org/dev/library/functions.html#open linked to the glossary entry for "file object": http://docs.python.org/dev/glossary.html#term-file-object Incidentally, this would be similar to what was done 2.7 documentation of open(): http://docs.python.org/library/functions.html#open Similarly, the introductory overview section of the io module should also link to the glossary entry for "file object": "Concrete objects belonging to any of these categories will often be called streams; another common term is file-like objects." (from http://docs.python.org/dev/library/io.html#overview ) ---------- assignee: docs at python components: Documentation messages: 168392 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: link to "file object" glossary entry in open() and io docs type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:06:44 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 16 Aug 2012 16:06:44 +0000 Subject: [docs] [issue15694] link to "file object" glossary entry in open() and io docs In-Reply-To: <1345133191.76.0.682782918752.issue15694@psf.upfronthosting.co.za> Message-ID: <1345133204.19.0.455604351178.issue15694@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:12:10 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 16 Aug 2012 16:12:10 +0000 Subject: [docs] [issue15693] expose glossary link on hover In-Reply-To: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> Message-ID: <1345133530.82.0.983839586419.issue15693@psf.upfronthosting.co.za> R. David Murray added the comment: We do pin it, but we generally have no problem with upgrading. I think we generally upgrade it exactly when there is a new Sphinx feature we want for our docs :) We don't maintain local patches to Sphinx (though we do have code that is specific to our docs, using Sphinx's extension mechanisms). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:18:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 16 Aug 2012 16:18:49 +0000 Subject: [docs] [issue15693] expose glossary link on hover In-Reply-To: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> Message-ID: <1345133929.43.0.823845880197.issue15693@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I think we generally upgrade it exactly when there is a new Sphinx feature we want for our docs :) :) Would the appropriate way to handle it be then to create an issue to "upgrade Sphinx when XXX issue is resolved" and link to the corresponding Sphinx issue? I also see value in Python being able to track and possibly assist Sphinx in fixing an issue that we want. Incidentally, issue 15455 may fall into the same category now that I know more. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 18:40:13 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 16 Aug 2012 16:40:13 +0000 Subject: [docs] [issue15693] expose glossary link on hover In-Reply-To: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> Message-ID: <1345135213.12.0.127011378241.issue15693@psf.upfronthosting.co.za> R. David Murray added the comment: Well, I think it depends on what we consider the priority of the issue. So, I personally would count this one as low, and would be happy that it gets fixed whenever we happen to upgrade to a version of Sphinx that fixes it. If it is an issue we consider higher priority, then yes linking to the corresponding Sphinx issue here would be appropriate, and we have done that in the past. (My notions are of course not the sole determining factor on the priority.) In case you don't know, Georg is the primary author/maintainer of Sphinx, and I'm sure he'll be happy for any help you (or others) want to provide :). By the way, although I use it on my own site I'm not by any means a Sphinx expert, so my thoughts about where this should be changed could be wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 21:10:30 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 16 Aug 2012 19:10:30 +0000 Subject: [docs] [issue15693] expose glossary link on hover In-Reply-To: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> Message-ID: <1345144230.77.0.297343157808.issue15693@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I created a Sphinx issue for this here: https://bitbucket.org/birkenfeld/sphinx/issue/996/expose-glossary-entry-link-on-hover ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 21:17:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 16 Aug 2012 19:17:27 +0000 Subject: [docs] [issue15455] index entries not showing up in glossary In-Reply-To: <1343292936.36.0.839564467916.issue15455@psf.upfronthosting.co.za> Message-ID: <1345144647.03.0.748807205622.issue15455@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I created a Sphinx issue for this here: https://bitbucket.org/birkenfeld/sphinx/issue/997/index-targets-not-getting-created-in ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 21:31:34 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 16 Aug 2012 19:31:34 +0000 Subject: [docs] [issue15694] link to "file object" glossary entry in open() and io docs In-Reply-To: <1345133191.76.0.682782918752.issue15694@psf.upfronthosting.co.za> Message-ID: <1345145494.59.0.875369672824.issue15694@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching patch. I also added two index entries for "file object" and made a couple wording adjustments to the intro paragraph of the io module. ---------- keywords: +patch stage: -> patch review versions: +Python 3.2 Added file: http://bugs.python.org/file26857/issue-15694-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 16 23:07:34 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 16 Aug 2012 21:07:34 +0000 Subject: [docs] [issue6696] Profile objects should be documented In-Reply-To: <1250182637.82.0.304646827828.issue6696@psf.upfronthosting.co.za> Message-ID: <1345151254.48.0.937145997408.issue6696@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 05:18:22 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 17 Aug 2012 03:18:22 +0000 Subject: [docs] [issue15355] generator docs should mention already-executing exception In-Reply-To: <1342312261.31.0.534711044354.issue15355@psf.upfronthosting.co.za> Message-ID: <1345173502.17.0.884510478474.issue15355@psf.upfronthosting.co.za> R. David Murray added the comment: Chris, if Nick is too busy to reply right now and you want to move this along, you could write some tests (not necessarily for inclusion in the test suite) to confirm that the doc you are adding is correct. I don't know enough about generators to comment myself, I'd have to write tests :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 13:17:59 2012 From: report at bugs.python.org (Rostyslav Dzinko) Date: Fri, 17 Aug 2012 11:17:59 +0000 Subject: [docs] [issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function) Message-ID: <1345202279.02.0.767068523185.issue15718@psf.upfronthosting.co.za> New submission from Rostyslav Dzinko: I've encountered that OverflowError which can happen in __len__ method is still undocumented, though one issue on this problem: http://bugs.python.org/issue12159 ended up with "need to be documented" comment. Link to documentation: http://docs.python.org/reference/datamodel.html#object.__len__ I think it must be clarified that __len__ return value is constrained to upper boundary (Py_ssize_t c type) when you plan to call it via len() built-in function. ---------- assignee: docs at python components: Documentation messages: 168439 nosy: Rostyslav.Dzinko, docs at python priority: normal severity: normal status: open title: Possible OverflowError in __len__ method undocumented (when called via len() function) versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 13:18:15 2012 From: report at bugs.python.org (Rostyslav Dzinko) Date: Fri, 17 Aug 2012 11:18:15 +0000 Subject: [docs] [issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function) In-Reply-To: <1345202279.02.0.767068523185.issue15718@psf.upfronthosting.co.za> Message-ID: <1345202295.63.0.628953450908.issue15718@psf.upfronthosting.co.za> Changes by Rostyslav Dzinko : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 16:06:50 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 17 Aug 2012 14:06:50 +0000 Subject: [docs] [issue15412] Note in documentation for weakrefs In-Reply-To: <1342863718.26.0.49587627068.issue15412@psf.upfronthosting.co.za> Message-ID: <3Wz5nN6ZKmzQ0J@mail.python.org> Roundup Robot added the comment: New changeset 78b0f294674c by Richard Oudkerk in branch '2.7': Issue #15412: Remove erroneous note about weakrefs http://hg.python.org/cpython/rev/78b0f294674c New changeset 24b13be81d61 by Richard Oudkerk in branch '3.2': Issue #15412: Remove erroneous note about weakrefs http://hg.python.org/cpython/rev/24b13be81d61 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 16:08:30 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 17 Aug 2012 14:08:30 +0000 Subject: [docs] [issue15412] Note in documentation for weakrefs In-Reply-To: <1342863718.26.0.49587627068.issue15412@psf.upfronthosting.co.za> Message-ID: <1345212510.19.0.0963000155063.issue15412@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 18:39:29 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 17 Aug 2012 16:39:29 +0000 Subject: [docs] [issue15657] Error in Python 3 docs for PyMethodDef In-Reply-To: <1344970966.7.0.115664419243.issue15657@psf.upfronthosting.co.za> Message-ID: <1345221569.64.0.269804413776.issue15657@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 19:54:10 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 17 Aug 2012 17:54:10 +0000 Subject: [docs] [issue15694] link to "file object" glossary entry in open() and io docs In-Reply-To: <1345133191.76.0.682782918752.issue15694@psf.upfronthosting.co.za> Message-ID: <1345226050.48.0.890584087034.issue15694@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM. ---------- nosy: +eric.araujo, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 20:09:09 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2012 18:09:09 +0000 Subject: [docs] [issue15629] Run doctests in Doc/*.rst as part of regrtest In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1345226949.24.0.0706922717811.issue15629@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On Windows, .rst files are not part of the install, so running doctests on .rst files cannot be a required part of the standard regrtest. ---------- nosy: +terry.reedy versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 20:11:44 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 17 Aug 2012 18:11:44 +0000 Subject: [docs] [issue15636] base64.decodebytes is only available in Python3.1+ In-Reply-To: <1344858430.17.0.615853795219.issue15636@psf.upfronthosting.co.za> Message-ID: <1345227104.6.0.637415153871.issue15636@psf.upfronthosting.co.za> ?ric Araujo added the comment: 3.0 is considered an alpha release by python-dev, is is not officially supported and is basically dead. 3.1 was released very soon after, mostly to fix the slow I/O. That?s why the docs don?t detail what?s new in 3.1, as this version is considered the first Python 3 version. If this explanation satisfies you, I will close this bug. Thanks for the report anyway. ---------- nosy: +eric.araujo resolution: -> invalid stage: -> committed/rejected status: open -> pending versions: -Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 20:28:08 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2012 18:28:08 +0000 Subject: [docs] [issue15636] base64.decodebytes is only available in Python3.1+ In-Reply-To: <1344858430.17.0.615853795219.issue15636@psf.upfronthosting.co.za> Message-ID: <1345228088.7.0.45161680488.issue15636@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Once a version goes off normal maintenance, we stop patching the manual except for changes related to security fixes. So the 3.1 manual is also frozen (except for possible security fixes). The same is true of 2.6 and will be true of 3.2 when its final maintenance release comes out. Andrew, we recommend that you ignore 3.0 even if you are trying to write multi-version 3.x code. ---------- nosy: +terry.reedy status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 20:39:57 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 17 Aug 2012 18:39:57 +0000 Subject: [docs] [issue15636] base64.decodebytes is only available in Python3.1+ In-Reply-To: <1344858430.17.0.615853795219.issue15636@psf.upfronthosting.co.za> Message-ID: <1345228797.25.0.998651104215.issue15636@psf.upfronthosting.co.za> R. David Murray added the comment: We have plenty of "versionadded" and "versionchanged" tags for 3.1 in the docs. We should add one for this as well to the 3.2 and 3.3 docs. ---------- nosy: +r.david.murray resolution: invalid -> stage: committed/rejected -> needs patch status: closed -> open type: enhancement -> behavior versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 20:41:36 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 17 Aug 2012 18:41:36 +0000 Subject: [docs] [issue15657] Error in Python 3 docs for PyMethodDef In-Reply-To: <1344970966.7.0.115664419243.issue15657@psf.upfronthosting.co.za> Message-ID: <1345228896.22.0.492263057169.issue15657@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think we can change PyCFunction_Call to accept METH_KEYWORDS as alias for METH_VARARGS | METH_KEYWORDS. It cannot make incompatibility with existing code base. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 21:13:31 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2012 19:13:31 +0000 Subject: [docs] [issue15660] In str.format there is a misleading error message about alignment In-Reply-To: <1345004440.11.0.680139192916.issue15660@psf.upfronthosting.co.za> Message-ID: <1345230811.79.0.11932824136.issue15660@psf.upfronthosting.co.za> Terry J. Reedy added the comment: As I read the docs, the error message is correct and this issue is invalid as a behavior issue. I read the OP's second message as more or less saying this also. "'=' Forces the padding to be placed after the sign (if any) but before the digits. This is used for printing fields in the form ?+000000120?. This alignment option is only valid for numeric types." "If the width field is preceded by a zero ('0') character, this enables zero-padding. This is equivalent to an alignment type of '=' and a fill character of '0'." So ":02" is equivalent to ":0=2", which is invalid. >>> '{:02d}'.format(1) '01' works fine. I decided make this a doc issue and add " for numeric types" after "this enables zero-padding" before closing this. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, terry.reedy versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 21:24:17 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 17 Aug 2012 19:24:17 +0000 Subject: [docs] [issue15694] link to "file object" glossary entry in open() and io docs In-Reply-To: <1345133191.76.0.682782918752.issue15694@psf.upfronthosting.co.za> Message-ID: <1345231456.95.0.895267680234.issue15694@psf.upfronthosting.co.za> Antoine Pitrou added the comment: LGTM too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 21:42:51 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 17 Aug 2012 19:42:51 +0000 Subject: [docs] [issue15660] In str.format there is a misleading error message about alignment In-Reply-To: <1345004440.11.0.680139192916.issue15660@psf.upfronthosting.co.za> Message-ID: <3WzFF633m2zQ61@mail.python.org> Roundup Robot added the comment: New changeset 85cd54b2d3a1 by Terry Jan Reedy in branch '2.7': Issue 15660: Clarify 0 prefix for width field in str.format doc. http://hg.python.org/cpython/rev/85cd54b2d3a1 New changeset 6bc14974024f by Terry Jan Reedy in branch '3.2': Issue 15660: Clarify 0 prefix for width field in str.format doc. http://hg.python.org/cpython/rev/6bc14974024f New changeset f181dd088e63 by Terry Jan Reedy in branch 'default': Merge with 3.2 #15660 http://hg.python.org/cpython/rev/f181dd088e63 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 21:43:49 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2012 19:43:49 +0000 Subject: [docs] [issue15660] In str.format there is a misleading error message about alignment In-Reply-To: <1345004440.11.0.680139192916.issue15660@psf.upfronthosting.co.za> Message-ID: <1345232629.93.0.16763069356.issue15660@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 21:44:32 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2012 19:44:32 +0000 Subject: [docs] [issue15660] Clarify 0 prefix for width specifier in str.format doc, In-Reply-To: <1345004440.11.0.680139192916.issue15660@psf.upfronthosting.co.za> Message-ID: <1345232672.84.0.318752696049.issue15660@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: needs patch -> committed/rejected status: open -> closed title: In str.format there is a misleading error message about alignment -> Clarify 0 prefix for width specifier in str.format doc, _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 21:45:05 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2012 19:45:05 +0000 Subject: [docs] [issue15660] Clarify 0 prefix for width specifier in str.format doc, In-Reply-To: <1345004440.11.0.680139192916.issue15660@psf.upfronthosting.co.za> Message-ID: <1345232705.35.0.0396036328341.issue15660@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: docs at python -> terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 22:18:45 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 17 Aug 2012 20:18:45 +0000 Subject: [docs] [issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function) In-Reply-To: <1345202279.02.0.767068523185.issue15718@psf.upfronthosting.co.za> Message-ID: <1345234725.38.0.207786420347.issue15718@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In #12159, Victor correctly labelled this an implementation (IE, CPython) detail (limitation). I don't believe any implementation has to limit the range of len(). So the question is whether we should add a CPython implementation limit note, including the possibility of OverflowError, and if so, to both len() and __len__() entries. I am not sure of the current doc policy. The second sentence of the len entry is out of date. " The argument may be a sequence (string, tuple or list) or a mapping (dictionary)." Sets and any collections with a size (__len__ method) can also be arguments. I am not sure how to revise that either. ---------- nosy: +benjamin.peterson, georg.brandl, haypo, terry.reedy stage: -> needs patch versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 17 23:01:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 17 Aug 2012 21:01:54 +0000 Subject: [docs] [issue15355] generator docs should mention already-executing exception In-Reply-To: <1342312261.31.0.534711044354.issue15355@psf.upfronthosting.co.za> Message-ID: <1345237314.03.0.0700693433442.issue15355@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Good suggestion, David. Here is such sample test code. It is adapted from the sample code for "ValueError: generator already executing" included in PEP 255: def test_gen(call_gen_method): def gen(): call_gen_method(me) yield 1 me = gen() try: me.__next__() except Exception as e: print(repr(e)) test_gen(lambda g: g.__next__()) test_gen(lambda g: g.send(1)) test_gen(lambda g: g.throw(OSError)) test_gen(lambda g: g.close()) This outputs: ValueError('generator already executing',) ValueError('generator already executing',) ValueError('generator already executing',) ValueError('generator already executing',) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 01:14:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 17 Aug 2012 23:14:25 +0000 Subject: [docs] [issue15694] link to "file object" glossary entry in open() and io docs In-Reply-To: <1345133191.76.0.682782918752.issue15694@psf.upfronthosting.co.za> Message-ID: <1345245265.1.0.74977677466.issue15694@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks. Could either one of you commit this for me? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 02:40:19 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 18 Aug 2012 00:40:19 +0000 Subject: [docs] [issue15694] link to "file object" glossary entry in open() and io docs In-Reply-To: <1345133191.76.0.682782918752.issue15694@psf.upfronthosting.co.za> Message-ID: <3WzMrJ3G91zQ6q@mail.python.org> Roundup Robot added the comment: New changeset 1d5c451a1365 by R David Murray in branch '3.2': #15694: Link discussion of file objects to glossary entry. http://hg.python.org/cpython/rev/1d5c451a1365 New changeset 977606940531 by R David Murray in branch 'default': Merge #15694: Link discussion of file objects to glossary entry. http://hg.python.org/cpython/rev/977606940531 New changeset 083c37e75c49 by R David Murray in branch '3.2': #15694: reflow paragraph. http://hg.python.org/cpython/rev/083c37e75c49 New changeset d57ea50bc526 by R David Murray in branch 'default': Merge #15694: reflow paragraph. http://hg.python.org/cpython/rev/d57ea50bc526 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 02:40:55 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 18 Aug 2012 00:40:55 +0000 Subject: [docs] [issue15694] link to "file object" glossary entry in open() and io docs In-Reply-To: <1345133191.76.0.682782918752.issue15694@psf.upfronthosting.co.za> Message-ID: <1345250455.57.0.430045134391.issue15694@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Chris. ---------- nosy: +r.david.murray resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 02:50:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 18 Aug 2012 00:50:45 +0000 Subject: [docs] [issue15355] generator docs should mention already-executing exception In-Reply-To: <1342312261.31.0.534711044354.issue15355@psf.upfronthosting.co.za> Message-ID: <3WzN4J5H1wzQ2P@mail.python.org> Roundup Robot added the comment: New changeset dc4b00f51c48 by R David Murray in branch '3.2': #15355: Mention already-executing Exception in generator docs. http://hg.python.org/cpython/rev/dc4b00f51c48 New changeset 73f1ba3319dd by R David Murray in branch 'default': Merge #15355: Mention already-executing Exception in generator docs. http://hg.python.org/cpython/rev/73f1ba3319dd New changeset a62309ae88a2 by R David Murray in branch '2.7': #15355: Mention already-executing Exception in generator docs. http://hg.python.org/cpython/rev/a62309ae88a2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 02:52:13 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 18 Aug 2012 00:52:13 +0000 Subject: [docs] [issue15355] generator docs should mention already-executing exception In-Reply-To: <1342312261.31.0.534711044354.issue15355@psf.upfronthosting.co.za> Message-ID: <1345251133.72.0.790993563815.issue15355@psf.upfronthosting.co.za> R. David Murray added the comment: Confirmed that 2.7 raises the same errors (as I expected) using your test. Thanks, Chris. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 02:56:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 18 Aug 2012 00:56:15 +0000 Subject: [docs] [issue15636] base64.decodebytes is only available in Python3.1+ In-Reply-To: <1344858430.17.0.615853795219.issue15636@psf.upfronthosting.co.za> Message-ID: <3WzNBk3wH7zPvn@mail.python.org> Roundup Robot added the comment: New changeset ca5b36754892 by R David Murray in branch '3.2': #15636: add versionadded for decodebytes http://hg.python.org/cpython/rev/ca5b36754892 New changeset a343fa692bb0 by R David Murray in branch 'default': Merge #15636: add versionadded for decodebytes http://hg.python.org/cpython/rev/a343fa692bb0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 02:56:38 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 18 Aug 2012 00:56:38 +0000 Subject: [docs] [issue15636] base64.decodebytes is only available in Python3.1+ In-Reply-To: <1344858430.17.0.615853795219.issue15636@psf.upfronthosting.co.za> Message-ID: <1345251398.89.0.197418649213.issue15636@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 04:41:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 18 Aug 2012 02:41:41 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <3WzQXN19B9zPtn@mail.python.org> Roundup Robot added the comment: New changeset 094423a65a4e by Eli Bendersky in branch '2.7': Issue #15586: porting ET's new documentation bits to 2.7. Patch by Daniel Ellis http://hg.python.org/cpython/rev/094423a65a4e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 04:43:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 18 Aug 2012 02:43:24 +0000 Subject: [docs] [issue15586] Provide some examples for usage of ElementTree methods/attributes In-Reply-To: <1344407679.24.0.102359835139.issue15586@psf.upfronthosting.co.za> Message-ID: <3WzQZL6NcTzQ1g@mail.python.org> Roundup Robot added the comment: New changeset 7012f6a74f66 by Eli Bendersky in branch 'default': Issue #15586: fix prompts in some documentation examples http://hg.python.org/cpython/rev/7012f6a74f66 ---------- _______________________________________ Python tracker _______________________________________ From ovidius.exile at gmail.com Fri Aug 17 00:16:38 2012 From: ovidius.exile at gmail.com (Ovidius Publius Naso) Date: Thu, 16 Aug 2012 22:16:38 +0000 Subject: [docs] Comment on a section 7.2.5.7. Message-ID: Hi, My comment does not affect the validity of the example given in section 7.2.5.7. "Finding all Adverbs and their Positions", but its misleading title. The reason is that none all adverbs end on "ly" (e.g. well, fast, slow, tight) and not all words ending on "ly" are adverbs (e.g. bully, friendly, Italy, apply, supply), or there are words whose type depends on situation (e.g. ugly) Cheers, Ovidius From oystein.rognes.solheim at gmail.com Fri Aug 17 11:01:43 2012 From: oystein.rognes.solheim at gmail.com (=?ISO-8859-1?Q?=D8ystein_Rognes_Solheim?=) Date: Fri, 17 Aug 2012 11:01:43 +0200 Subject: [docs] Bug in python tutorial Message-ID: In chapter 4.4 of the python tutorial ( http://docs.python.org/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops ), the second example reads: >>> for num in range(2, 10):... if x % 2 == 0:... print("Found an even number", num)... continue... print("Found a number", num)Found an even number 2Found a number 3Found an even number 4Found a number 5Found an even number 6Found a number 7Found an even number 8Found a number 9 The x in line 2 should be replaced by num. best regards, ?ystein R. Solheim -------------- next part -------------- An HTML attachment was scrubbed... URL: From sebastiaan at sebastiaandehaan.nl Fri Aug 17 14:37:27 2012 From: sebastiaan at sebastiaandehaan.nl (Sebastiaan de Haan) Date: Fri, 17 Aug 2012 14:37:27 +0200 Subject: [docs] Looking to contribute Message-ID: Hey Guy's I'd like to help out with the python project and have read the documentation on the website. Still a bit unsure as to where to go next but I'd like to take a shot at the following issue: http://bugs.python.org/issue1722 It is my understanding that this is a relatively easy issue to get one's feet wet in the world of contributing. Please be gentle and sorry for any grammatical errors, English is not my first language. Please let me know if you have any tips/comments/suggestions about this issue, or my contribution in general. Kind regards, Sebastiaan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From juankb7 at gmail.com Fri Aug 17 18:59:53 2012 From: juankb7 at gmail.com (Juan Kalimacho Baldez) Date: Fri, 17 Aug 2012 11:59:53 -0500 Subject: [docs] (no subject) Message-ID: Hi. If not a secret, What software was used in creating Python tutorials? Thanks Juan -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliben at gmail.com Sat Aug 18 08:52:44 2012 From: eliben at gmail.com (Eli Bendersky) Date: Sat, 18 Aug 2012 09:52:44 +0300 Subject: [docs] Bug in python tutorial In-Reply-To: References: Message-ID: Fixed. Thank you for the report Eli On Fri, Aug 17, 2012 at 12:01 PM, ?ystein Rognes Solheim < oystein.rognes.solheim at gmail.com> wrote: > In chapter 4.4 of the python tutorial ( > http://docs.python.org/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops > ), > the second example reads: > > >>> for num in range(2, 10):... if x % 2 == 0:... print("Found an even number", num)... continue... print("Found a number", num)Found an even number 2Found a number 3Found an even number 4Found a number 5Found an even number 6Found a number 7Found an even number 8Found a number 9 > > > The x in line 2 should be replaced by num. > > best regards, > ?ystein R. Solheim > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sandro.tosi at gmail.com Sat Aug 18 09:47:52 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sat, 18 Aug 2012 09:47:52 +0200 Subject: [docs] (no subject) In-Reply-To: References: Message-ID: Hello Juan, On Fri, Aug 17, 2012 at 6:59 PM, Juan Kalimacho Baldez wrote: > If not a secret, no secrets here :) > What software was used in creating Python tutorials? Do you mean those at http://docs.python.org/tutorial/index.html ? All the Python documentations is generated using http://sphinx.pocoo.org/ (as you can see at the bottom of each page) from ReStructuredText files available in the python source code repository, f.e. here: http://hg.python.org/cpython/file/332566c29ab4/Doc Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Sat Aug 18 10:14:48 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sat, 18 Aug 2012 10:14:48 +0200 Subject: [docs] Comment on a section 7.2.5.7. In-Reply-To: References: Message-ID: Hello Ovidius, On Fri, Aug 17, 2012 at 12:16 AM, Ovidius Publius Naso wrote: > My comment does not affect the validity of the example > given in section 7.2.5.7. "Finding all Adverbs and their > Positions", but its misleading title. > > The reason is that none all adverbs end on "ly" (e.g. well, > fast, slow, tight) and not all words ending on "ly" are > adverbs (e.g. bully, friendly, Italy, apply, supply), or there > are words whose type depends on situation (e.g. ugly) I don't think the subject wants to be universally true, so it won't present a regex to find all the possible adverbs in any sentence, but it juts wants to show how to find the adverbs in the sentence: "He was carefully disguised but captured quickly by police." which of course is crafted ad hoc to have adverbs ending in 'ly'. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Sat Aug 18 10:11:29 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sat, 18 Aug 2012 10:11:29 +0200 Subject: [docs] Looking to contribute In-Reply-To: References: Message-ID: Hello Sebastiaan, thanks for your offer of contribution! On Fri, Aug 17, 2012 at 2:37 PM, Sebastiaan de Haan wrote: > Hey Guy's > > I'd like to help out with the python project and have read the documentation > on the website. Still a bit unsure as to where to go next but I'd like to > take a shot at the following issue: http://bugs.python.org/issue1722 > > It is my understanding that this is a relatively easy issue to get one's > feet wet in the world of contributing. Yep it could be the right first step indeed. > Please be gentle and sorry for any > grammatical errors, English is not my first language. Just note that several of us are not native English speakers, but being fluent in English is very useful when dealing with documentation. It doesn't want to discourage you, just a warning. Be sure that there will be native speakers that will correct you in case something is very wrong :) > Please let me know if you have any tips/comments/suggestions about this > issue, or my contribution in general. About that specific issue, take care of the notes where not every function in __all__ should be documented. About contributing, did you read the http://docs.python.org/devguide/ ? There it's written how to checkout the Python source code (that contains documentation too) and prepare patches. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sebastiaan at sebastiaandehaan.nl Sat Aug 18 11:57:28 2012 From: sebastiaan at sebastiaandehaan.nl (Sebastiaan de Haan) Date: Sat, 18 Aug 2012 11:57:28 +0200 Subject: [docs] Looking to contribute In-Reply-To: References: Message-ID: Hi Sandro, On Sat, Aug 18, 2012 at 10:11 AM, Sandro Tosi wrote: > Hello Sebastiaan, > thanks for your offer of contribution! > > On Fri, Aug 17, 2012 at 2:37 PM, Sebastiaan de Haan > wrote: > > Hey Guy's > > > > I'd like to help out with the python project and have read the > documentation > > on the website. Still a bit unsure as to where to go next but I'd like to > > take a shot at the following issue: http://bugs.python.org/issue1722 > > > > It is my understanding that this is a relatively easy issue to get one's > > feet wet in the world of contributing. > > Yep it could be the right first step indeed. > > > Please be gentle and sorry for any > > grammatical errors, English is not my first language. > > Just note that several of us are not native English speakers, but > being fluent in English is very useful when dealing with > documentation. It doesn't want to discourage you, just a warning. Be > sure that there will be native speakers that will correct you in case > something is very wrong :) > > > Please let me know if you have any tips/comments/suggestions about this > > issue, or my contribution in general. > > About that specific issue, take care of the notes where not every > function in __all__ should be documented. About contributing, did you > read the http://docs.python.org/devguide/ ? There it's written how to > checkout the Python source code (that contains documentation too) and > prepare patches. > Yes I have read the information at the link you provided. And have already checked out the source code on my development machine. One question though. If I am done with creating the patch, would it be ok if I post it here for review? Because it's my first time and all. > > Regards, > -- > Sandro Tosi (aka morph, morpheus, matrixhasu) > My website: http://matrixhasu.altervista.org/ > Me at Debian: http://wiki.debian.org/SandroTosi > -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat Aug 18 12:25:46 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Sat, 18 Aug 2012 10:25:46 +0000 Subject: [docs] [issue15588] quopri: encodestring and decodestring handle bytes, not strings In-Reply-To: <1344411059.45.0.404148694214.issue15588@psf.upfronthosting.co.za> Message-ID: <1345285546.47.0.995775534725.issue15588@psf.upfronthosting.co.za> Petri Lehtinen added the comment: The encode() and decode() functions also expect binary file objects. Attached a patch that changes documentation and docstrings. Removed the mentions of readline(), because read() is called on input instead, if the binascii module is available. Also removed the repeated descriptions of quotetabs and header in encodestring()'s docs. ---------- keywords: +needs review, patch nosy: +petri.lehtinen stage: -> patch review Added file: http://bugs.python.org/file26886/issue15588.patch _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Sat Aug 18 12:05:28 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Sat, 18 Aug 2012 12:05:28 +0200 Subject: [docs] Looking to contribute In-Reply-To: References: Message-ID: Hi Sebastiaan, On Sat, Aug 18, 2012 at 11:57 AM, Sebastiaan de Haan wrote: > Yes I have read the information at the link you provided. And have already > checked out the source code on my development machine. awesome! > One question though. > If I am done with creating the patch, would it be ok if I post it here for > review? Because it's my first time and all. I think it's probably best if you post the patch on the issue directly: the people interested in seeing it fixed are looking at the issue for news, so that would be the place i'd post the patch to. Don't be scared: everyone had their first time submitting a patch to a bug :) Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Sat Aug 18 15:38:03 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 18 Aug 2012 13:38:03 +0000 Subject: [docs] [issue15718] Possible OverflowError in __len__ method undocumented (when called via len() function) In-Reply-To: <1345202279.02.0.767068523185.issue15718@psf.upfronthosting.co.za> Message-ID: <1345297083.17.0.175866905964.issue15718@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 18 17:14:02 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sat, 18 Aug 2012 15:14:02 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1345302842.23.0.0657059060696.issue13498@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Ok, let?s do it here, that?s easier: .. function:: makedirs(path, mode=0o777, exist_ok=False) .. index:: single: directory; creating single: UNC paths; and os.makedirs() Recursive directory creation function. Like :func:`mkdir`, but makes all intermediate-level directories needed to contain the leaf directory. The default *mode* is ``0o777`` (octal). On some systems, *mode* is ignored. Where it is used, the current umask value is first masked out. If the target directory exists, :exc:`OSError` is raised unless *exist_ok* is set to ``True`` and the mode doesn't contradict the designated mode as discussed in the previous paragraph. If the mode doesn't match, :exc:`OSError` is raised regardless of the value of *exist_ok*. If the directory cannot be created in other cases, an :exc:`OSError` exception is raised too. .. note:: :func:`makedirs` will become confused if the path elements to create include :data:`pardir`. This function handles UNC paths correctly. .. versionadded:: 3.2 The *exist_ok* parameter. Python is so much easier than English. :'( ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From sebastiaan at sebastiaandehaan.nl Sat Aug 18 16:58:23 2012 From: sebastiaan at sebastiaandehaan.nl (Sebastiaan de Haan) Date: Sat, 18 Aug 2012 16:58:23 +0200 Subject: [docs] Looking to contribute In-Reply-To: References: Message-ID: Hi, On Sat, Aug 18, 2012 at 12:05 PM, Sandro Tosi wrote: > Hi Sebastiaan, > > On Sat, Aug 18, 2012 at 11:57 AM, Sebastiaan de Haan > wrote: > > Yes I have read the information at the link you provided. And have > already > > checked out the source code on my development machine. > > awesome! > > > One question though. > > If I am done with creating the patch, would it be ok if I post it here > for > > review? Because it's my first time and all. > > I think it's probably best if you post the patch on the issue > directly: the people interested in seeing it fixed are looking at the > issue for news, so that would be the place i'd post the patch to. > Don't be scared: everyone had their first time submitting a patch to a > bug :) > I am a bit lost. For this particular issue (http://bugs.python.org/issue1722) I have found one of the functions in question in /Lib/urllib/parse.py and the associated documentation file in /Doc/library/urllib.parse.rst But now for the tricky part, how to proceed? The source file function that is missing from the documentation contains a docstring, so... How is the rst file generated and do I just edit the rst file? Or do I go about editing the source file directly? I have tried researching - http://docs.python.org/devguide/documenting.html#documenting - http://docs.python.org/devguide/docquality.html - http://docutils.sourceforge.net/rst.html - http://sphinx.pocoo.org But this has gotten me no further. Is it possible for someone to point me in the right direction... I am sorry if this is a stupid question. > > Regards, > -- > Sandro Tosi (aka morph, morpheus, matrixhasu) > My website: http://matrixhasu.altervista.org/ > Me at Debian: http://wiki.debian.org/SandroTosi Thanks, Sebastiaan. -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat Aug 18 18:14:02 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 18 Aug 2012 16:14:02 +0000 Subject: [docs] [issue13498] os.makedirs exist_ok documentation is incorrect, as is some of the behavior In-Reply-To: <1322574123.12.0.756700598965.issue13498@psf.upfronthosting.co.za> Message-ID: <1345306442.74.0.115393838785.issue13498@psf.upfronthosting.co.za> R. David Murray added the comment: This is much better. But let me try tuning the problem paragraph a bit, since I'm a native English speaker: If *exists_ok* is ``False`` (the default), an :exc:`OSError` is raised if the target directory already exists. If *exists_ok* is ``True`` an :exc:`OSError` is still raised if the umask-masked *mode* is different from the existing mode, on systems where the mode is used. :exc:`OSError` will also be raised if the directory creation fails. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 09:23:12 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 19 Aug 2012 07:23:12 +0000 Subject: [docs] [issue12436] Missing items in installation/setup instructions In-Reply-To: <1309305395.29.0.101516779086.issue12436@psf.upfronthosting.co.za> Message-ID: <1345360992.54.0.190185680653.issue12436@psf.upfronthosting.co.za> Mike Hoy added the comment: Here is a patch for just Notepad++. ---------- keywords: +patch Added file: http://bugs.python.org/file26891/issue12436-notepad_plus_plus.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 09:24:45 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 19 Aug 2012 07:24:45 +0000 Subject: [docs] [issue15569] Doc doc: incorrect description of some roles as format-only In-Reply-To: <1344302647.18.0.307450045197.issue15569@psf.upfronthosting.co.za> Message-ID: <1345361085.45.0.524891520617.issue15569@psf.upfronthosting.co.za> Mike Hoy added the comment: I would like to submit a patch for this. Is anyone currently working on one? ---------- nosy: +mikehoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 09:26:12 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 19 Aug 2012 07:26:12 +0000 Subject: [docs] [issue13341] Incorrect documentation for "u" PyArg_Parse format unit In-Reply-To: <1320412814.48.0.657162308895.issue13341@psf.upfronthosting.co.za> Message-ID: <1345361172.18.0.0764894330032.issue13341@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- nosy: -mikehoy _______________________________________ Python tracker _______________________________________ From ezio.melotti at gmail.com Sun Aug 19 10:32:59 2012 From: ezio.melotti at gmail.com (ezio.melotti at gmail.com) Date: Sun, 19 Aug 2012 08:32:59 -0000 Subject: [docs] Missing items in installation/setup instructions (issue 12436) Message-ID: <20120819083259.10115.48595@psf.upfronthosting.co.za> http://bugs.python.org/review/12436/diff/5769/Doc/using/windows.rst File Doc/using/windows.rst (right): http://bugs.python.org/review/12436/diff/5769/Doc/using/windows.rst#newcode587 Doc/using/windows.rst:587: Notepad++ is a free source code editor and Notepad replacement that support several languagees including Python. Running in the MS Windows environment, its use is governed by GPL license. supports http://bugs.python.org/review/12436/ From ezio.melotti at gmail.com Sun Aug 19 10:33:40 2012 From: ezio.melotti at gmail.com (ezio.melotti at gmail.com) Date: Sun, 19 Aug 2012 08:33:40 -0000 Subject: [docs] Missing items in installation/setup instructions (issue 12436) Message-ID: <20120819083340.10115.70877@psf.upfronthosting.co.za> http://bugs.python.org/review/12436/diff/5769/Doc/using/windows.rst File Doc/using/windows.rst (right): http://bugs.python.org/review/12436/diff/5769/Doc/using/windows.rst#newcode587 Doc/using/windows.rst:587: Notepad++ is a free source code editor and Notepad replacement that support several languagees including Python. Running in the MS Windows environment, its use is governed by GPL license. Also this line is too long. http://bugs.python.org/review/12436/ From report at bugs.python.org Sun Aug 19 13:53:43 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 19 Aug 2012 11:53:43 +0000 Subject: [docs] [issue15724] Add "versionchanged" to memoryview docs Message-ID: <1345377223.09.0.176185074566.issue15724@psf.upfronthosting.co.za> New submission from Stefan Krah: There are a couple of places in the memoryview docs that still need a "versionchanged" tag. Other places might need explanations what exactly has changed. ---------- assignee: docs at python components: Documentation messages: 168563 nosy: docs at python, skrah priority: normal severity: normal stage: needs patch status: open title: Add "versionchanged" to memoryview docs type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 19 18:14:08 2012 From: report at bugs.python.org (Brian Curtin) Date: Sun, 19 Aug 2012 16:14:08 +0000 Subject: [docs] [issue15131] Document py/pyw launchers In-Reply-To: <1340316982.35.0.0939341708.issue15131@psf.upfronthosting.co.za> Message-ID: <1345392848.43.0.548437514396.issue15131@psf.upfronthosting.co.za> Brian Curtin added the comment: This was added by Vinay in 4a3439ef552c. ---------- resolution: -> invalid stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 00:33:26 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 19 Aug 2012 22:33:26 +0000 Subject: [docs] [issue12436] Missing items in installation/setup instructions In-Reply-To: <1309305395.29.0.101516779086.issue12436@psf.upfronthosting.co.za> Message-ID: <1345415605.99.0.564314692723.issue12436@psf.upfronthosting.co.za> Changes by Mike Hoy : Added file: http://bugs.python.org/file26902/issue12436-notepad_plus_plus_2.diff _______________________________________ Python tracker _______________________________________ From crawford at pa.uky.edu Sun Aug 19 16:05:14 2012 From: crawford at pa.uky.edu (Christopher Crawford) Date: Sun, 19 Aug 2012 10:05:14 -0400 Subject: [docs] suggestion for tutorial, section 2 Message-ID: <29D7ED0A-1F2B-4AAA-8AF2-61FB56A71D4C@pa.uky.edu> Hello, As someone just learning Python from Bash/C++ background, I would like to suggest a small addition to 2.1.2: how to execute a script inside the shell (similar to bash 'scriptname', 'source script' or '. script'): import fn, or reload(fn) related, it would be nice to have info near the beginning of the tutorial how to call system commands: import os; os.system('..') --thanks, Chris Christopher Crawford Dept. of Physics & Astronomy University of Kentucky 373 C.-P. Building Lexington, KY 40506-0055 859-257-2504 (office) 859-421-9612 (cell) 859-323-2846 (fax) From sandro.tosi at gmail.com Mon Aug 20 00:38:09 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Mon, 20 Aug 2012 00:38:09 +0200 Subject: [docs] Looking to contribute In-Reply-To: References: Message-ID: On Sat, Aug 18, 2012 at 4:58 PM, Sebastiaan de Haan wrote: > I am a bit lost. For this particular issue > (http://bugs.python.org/issue1722) I have found one of the functions in > question in /Lib/urllib/parse.py and the associated documentation file in > /Doc/library/urllib.parse.rst That's the correct file. > But now for the tricky part, how to proceed? The source file function that > is missing from the documentation contains a docstring, so... How is the rst > file generated and do I just edit the rst file? Or do I go about editing the > source file directly? You have to change the file Doc/library/urllib.parse.rst with all the changes you want to make, than compile the doc with "make -C Doc html" and then review on the browser the resulting pages. The resulting patch (hg diff) will have to be attached on the issue once all those steps are completed and you're satisfied of the result. > I have tried researching > > http://docs.python.org/devguide/documenting.html#documenting > http://docs.python.org/devguide/docquality.html > http://docutils.sourceforge.net/rst.html > http://sphinx.pocoo.org > > But this has gotten me no further. Is it possible for someone to point me in > the right direction... I'll review the information in the devguide and integrate them where missing. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Mon Aug 20 00:53:28 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 19 Aug 2012 22:53:28 +0000 Subject: [docs] [issue12436] Missing items in installation/setup instructions In-Reply-To: <1309305395.29.0.101516779086.issue12436@psf.upfronthosting.co.za> Message-ID: <1345416808.42.0.052644215416.issue12436@psf.upfronthosting.co.za> Mike Hoy added the comment: Wrapped my text columns to 80. Ignore v2. ---------- Added file: http://bugs.python.org/file26904/issue12436-notepad_plus_plus_3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 05:15:29 2012 From: report at bugs.python.org (Ben Finney) Date: Mon, 20 Aug 2012 03:15:29 +0000 Subject: [docs] [issue8810] TZ offset description is unclear in docs In-Reply-To: <1274718021.16.0.883294684947.issue8810@psf.upfronthosting.co.za> Message-ID: <1345432529.08.0.333471200277.issue8810@psf.upfronthosting.co.za> Ben Finney added the comment: Here is an updated patch. I examined the implementation in the code for UTC offset and DST handling, and updated the code comments, the docstrings, and the library documentation. ---------- keywords: +patch nosy: +bignose, ncoghlan Added file: http://bugs.python.org/file26908/issue8810_reconcile_docs.patch _______________________________________ Python tracker _______________________________________ From ncoghlan at gmail.com Mon Aug 20 06:18:26 2012 From: ncoghlan at gmail.com (ncoghlan at gmail.com) Date: Mon, 20 Aug 2012 04:18:26 -0000 Subject: [docs] TZ offset description is unclear in docs (issue 8810) Message-ID: <20120820041826.3208.82169@psf.upfronthosting.co.za> Ben's patch is a definite improvement. I'll tweak it in accordance with my comments and apply the fix here at the sprints. http://bugs.python.org/review/8810/diff/5782/Doc/library/datetime.rst File Doc/library/datetime.rst (right): http://bugs.python.org/review/8810/diff/5782/Doc/library/datetime.rst#newcode1013 Doc/library/datetime.rst:1013: a magnitude of a whole number of minutes and larger than 24 hours (if not, The offsets actually have to be between -1 day and +1 day http://bugs.python.org/review/8810/diff/5782/Modules/_datetimemodule.c File Modules/_datetimemodule.c (right): http://bugs.python.org/review/8810/diff/5782/Modules/_datetimemodule.c#newcode3124 Modules/_datetimemodule.c:3124: PyDoc_STR("datetime -> DST offset in minutes east of UTC.")}, The C docstrings should match the Python ones http://bugs.python.org/review/8810/ From report at bugs.python.org Mon Aug 20 06:44:39 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 20 Aug 2012 04:44:39 +0000 Subject: [docs] [issue8810] TZ offset description is unclear in docs In-Reply-To: <1274718021.16.0.883294684947.issue8810@psf.upfronthosting.co.za> Message-ID: <1345437879.32.0.316184173234.issue8810@psf.upfronthosting.co.za> Nick Coghlan added the comment: It turns out these particular docstrings are duplicated all over the place, as time and datetime both wrap the tzinfo method, and there is both the tzinfo ABC as well as the concrete fixed offset subclasses, and this happens in both C and Python. Ben's patch currently only covers the docstrings for the Python tzinfo ABC implementation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 08:44:35 2012 From: report at bugs.python.org (Ben Finney) Date: Mon, 20 Aug 2012 06:44:35 +0000 Subject: [docs] [issue8810] TZ offset description is unclear in docs In-Reply-To: <1274718021.16.0.883294684947.issue8810@psf.upfronthosting.co.za> Message-ID: <1345445075.32.0.150160381518.issue8810@psf.upfronthosting.co.za> Ben Finney added the comment: Attached is a patch which is more comprehensive (covering the additional locations pointed out to me by ncoghlan), and also consolidating the details into the library documentation so they're not verbosely repeated in so many places. I agree with Nick's position that the docstrings are not the place to go into great detail about the significance and background of the issues. So the docstrings in this patch are accurate, but terse; the details are in the library documentation. ---------- Added file: http://bugs.python.org/file26911/issue8810_reconcile_docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 08:59:47 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 20 Aug 2012 06:59:47 +0000 Subject: [docs] [issue15724] Add "versionchanged" to memoryview docs In-Reply-To: <1345377223.09.0.176185074566.issue15724@psf.upfronthosting.co.za> Message-ID: <1345445987.21.0.683216891694.issue15724@psf.upfronthosting.co.za> Nick Coghlan added the comment: Just a heads up that I'm about to check in a fairly major change to the sequence docs layout. I'm leaving the memoryview block alone, so hopefully this won't cause you any problems, but there's going to be a merge in your future :) ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 09:00:14 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 20 Aug 2012 07:00:14 +0000 Subject: [docs] [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1345446014.91.0.102066639142.issue4966@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 09:14:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 20 Aug 2012 07:14:44 +0000 Subject: [docs] [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <3X0mV64QTMzQNr@mail.python.org> Roundup Robot added the comment: New changeset 463f52d20314 by Nick Coghlan in branch 'default': Close #4966: revamp the sequence docs in order to better explain the state of modern Python http://hg.python.org/cpython/rev/463f52d20314 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 10:36:49 2012 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 20 Aug 2012 08:36:49 +0000 Subject: [docs] [issue13799] Base 16 should be hexadecimal in Unicode HOWTO In-Reply-To: <1326718246.49.0.980962494093.issue13799@psf.upfronthosting.co.za> Message-ID: <1345451809.78.0.125569939831.issue13799@psf.upfronthosting.co.za> Sandro Tosi added the comment: I tend to agree with Terry that this report can be closed: base 16 is quite known and it's high likely that if you know what hexadecimal is, you also aware of the concept of "base X" and viceversa. If no-one objects, I'd just close it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 18:07:28 2012 From: report at bugs.python.org (Stefan Krah) Date: Mon, 20 Aug 2012 16:07:28 +0000 Subject: [docs] [issue15724] Add "versionchanged" to memoryview docs In-Reply-To: <1345445987.21.0.683216891694.issue15724@psf.upfronthosting.co.za> Message-ID: <20120820160727.GA19757@sleipnir.bytereef.org> Stefan Krah added the comment: Thanks for the warning. I see you've already committed, so my natural inertia has protected me from additional merge work. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 19:11:56 2012 From: report at bugs.python.org (Mike Hoy) Date: Mon, 20 Aug 2012 17:11:56 +0000 Subject: [docs] [issue15742] SQLite3 documentation changes Message-ID: <1345482716.74.0.73441059198.issue15742@psf.upfronthosting.co.za> New submission from Mike Hoy: In Core-Mentorship we discussed this and decided on the following patch. ---------- assignee: docs at python components: Documentation files: sqlite3-docs-changes.diff keywords: patch messages: 168681 nosy: docs at python, mikehoy, r.david.murray priority: normal severity: normal status: open title: SQLite3 documentation changes versions: Python 3.3 Added file: http://bugs.python.org/file26933/sqlite3-docs-changes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 19:47:03 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 20 Aug 2012 17:47:03 +0000 Subject: [docs] [issue15742] SQLite3 documentation changes In-Reply-To: <1345482716.74.0.73441059198.issue15742@psf.upfronthosting.co.za> Message-ID: <1345484823.83.0.216528926354.issue15742@psf.upfronthosting.co.za> Petri Lehtinen added the comment: + print(c.fetchone()) I don't think this line should be added because it's not there after the first select. ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 19:56:48 2012 From: report at bugs.python.org (Mike Hoy) Date: Mon, 20 Aug 2012 17:56:48 +0000 Subject: [docs] [issue15742] SQLite3 documentation changes In-Reply-To: <1345482716.74.0.73441059198.issue15742@psf.upfronthosting.co.za> Message-ID: <1345485408.62.0.832377395407.issue15742@psf.upfronthosting.co.za> Mike Hoy added the comment: Removed print function in this patch. ---------- Added file: http://bugs.python.org/file26934/sqlite3-docs-remove-print.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 20:18:19 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 20 Aug 2012 18:18:19 +0000 Subject: [docs] [issue15742] SQLite3 documentation changes In-Reply-To: <1345482716.74.0.73441059198.issue15742@psf.upfronthosting.co.za> Message-ID: <3X13Cn6cbLzQGb@mail.python.org> Roundup Robot added the comment: New changeset 80b15cf2611e by R David Murray in branch '3.2': #15742: clarify sqlite parameter substitution example. http://hg.python.org/cpython/rev/80b15cf2611e New changeset 2eafe04cb6ed by R David Murray in branch 'default': Merge #15742: clarify sqlite parameter substitution example. http://hg.python.org/cpython/rev/2eafe04cb6ed New changeset 857c9e1fdd1e by R David Murray in branch '2.7': #15742: clarify sqlite parameter substitution example. http://hg.python.org/cpython/rev/857c9e1fdd1e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 20:21:40 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 20 Aug 2012 18:21:40 +0000 Subject: [docs] [issue15742] SQLite3 documentation changes In-Reply-To: <1345482716.74.0.73441059198.issue15742@psf.upfronthosting.co.za> Message-ID: <1345486900.16.0.526562813702.issue15742@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, Mike. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 20 23:40:58 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 20 Aug 2012 21:40:58 +0000 Subject: [docs] [issue13799] Base 16 should be hexadecimal in Unicode HOWTO In-Reply-To: <1326718246.49.0.980962494093.issue13799@psf.upfronthosting.co.za> Message-ID: <1345498858.18.0.307590854401.issue13799@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 21 00:02:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 20 Aug 2012 22:02:31 +0000 Subject: [docs] [issue12415] Missing: How to checkout the Doc sources In-Reply-To: <1309069778.19.0.06342861361.issue12415@psf.upfronthosting.co.za> Message-ID: <3X18Bd60bHzQ8j@mail.python.org> Roundup Robot added the comment: New changeset e0d68c73e351 by Sandro Tosi in branch 'default': Issue #12415: describe where the documentation files are (patch by ?ric Araujo) http://hg.python.org/devguide/rev/e0d68c73e351 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 21 00:02:54 2012 From: report at bugs.python.org (Ethan Furman) Date: Mon, 20 Aug 2012 22:02:54 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1345500174.82.0.0160235989058.issue14617@psf.upfronthosting.co.za> Ethan Furman added the comment: Any problems with the current doc patch? If not, can it be applied before RC1? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 21 00:04:36 2012 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 20 Aug 2012 22:04:36 +0000 Subject: [docs] [issue12415] Missing: How to checkout the Doc sources In-Reply-To: <1309069778.19.0.06342861361.issue12415@psf.upfronthosting.co.za> Message-ID: <1345500276.25.0.883902798082.issue12415@psf.upfronthosting.co.za> Sandro Tosi added the comment: ?ric: I've just committed your patch, with also the latest changes. Philip: In order to be consistent with the way the documentation is compiled on the Python platform, the svn checkout must be used: else if you refer to the upstream website, a contributor can checkout an updated version that will generate a different result. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 21 00:06:25 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 20 Aug 2012 22:06:25 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1345500385.96.0.212416368059.issue14617@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 22 07:34:23 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 22 Aug 2012 05:34:23 +0000 Subject: [docs] [issue15759] "make suspicious" doesn't display instructions in case of failure Message-ID: <1345613663.78.0.519613331574.issue15759@psf.upfronthosting.co.za> New submission from Ezio Melotti: I was running "make suspicious" in Doc/ and this was the output after finding 3 suspicious markups: writing output... [ 52%] library/inspect WARNING: [library/inspect:437] ":int" found in ">>> def foo(a, *, b:int, **kwargs):" WARNING: [library/inspect:437] ":int" found in "'(a, *, b:int, **kwargs)'" WARNING: [library/inspect:437] ":int" found in "'b:int'" writing output... [100%] whatsnew/index build finished with problems, 3 warnings. make: *** [build] Error 1 After figuring out how to mark these as false positives and adding the relevant entries to susp-ignored.csv, I ran "make suspicious" again, and got this useful message at the end: writing output... [100%] whatsnew/index build succeeded. Suspicious check complete; look for any errors in the above output or in build/suspicious /suspicious.csv. If all issues are false positives, append that file to tools/sphinxext/susp-ignored.csv. The problem is that this message should be displayed when there are failures, but it's not. Attached an attempt to fix the Makefile to avoid exiting in case of failures when the builder is "suspicious". Given that I'm not really familiar with makefiles, it probably doesn't make much sense. ---------- assignee: docs at python components: Documentation files: issue15759.diff keywords: patch messages: 168842 nosy: docs at python, eric.araujo, ezio.melotti, georg.brandl priority: normal severity: normal stage: patch review status: open title: "make suspicious" doesn't display instructions in case of failure type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file26956/issue15759.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 22 09:37:57 2012 From: report at bugs.python.org (Louis Deflandre) Date: Wed, 22 Aug 2012 07:37:57 +0000 Subject: [docs] [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1345621077.86.0.50938916937.issue5088@psf.upfronthosting.co.za> Louis Deflandre added the comment: Hello, Tell me if the issue is too old to deserve comments anymore. But I would like to challenge the conclusion made in this issue. The message msg9944 stated "Think of the default as the initial list" but it is inconsistent with the proper meaning of default which can be defined as : "a preselected option adopted by a computer program or other mechanism WHEN NO ALTERNATIVE IS SPECIFIED" (http://www.wordreference.com/definition/default - Oxford Dictionary). The "initial list" conclusion seems to me more implementation oriented than really user oriented ---------- nosy: +louis.deflandre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 22 12:02:29 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 22 Aug 2012 10:02:29 +0000 Subject: [docs] [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1345629749.77.0.894535000382.issue11776@psf.upfronthosting.co.za> Nick Coghlan added the comment: Clarifying the request: the constructor signatures for internal types should be documented in http://docs.python.org/dev/library/types, rather than just listing the types. If creation of new instances from Python is not supported, that should also be documented explicitly. Some of the items are currently missing docstrings as well. ---------- nosy: +ncoghlan title: types.MethodType() params and usage is not documented -> Constructor signatures missing in types module documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 22 12:20:32 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 22 Aug 2012 10:20:32 +0000 Subject: [docs] [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1345630832.91.0.639735176676.issue11776@psf.upfronthosting.co.za> Nick Coghlan added the comment: The first easy part of this patch is to document the signatures for types in that module where that info is available in the docstring: CodeType FunctionType LambdaType SimpleNamespace MethodType The second easy part is that the following need to be documented as not supporting direct creation from Python code: BuiltinFunctionType BuiltinMethodType FrameType GeneratorType GetSetDescriptorType MemberDescriptorType TracebackType This type does support direct creation and should be documented appropriately, but the docs should also direct readers to the preferred API in the imp module: ModuleType (imp.new_module) Finally, this one is missing both a docstring *and* signature documentation: MappingProxyType It's a simple API that accepts a single parameter (which must be a mapping) and returns a read-only view of the original mapping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 22 13:50:23 2012 From: report at bugs.python.org (Mike Hoy) Date: Wed, 22 Aug 2012 11:50:23 +0000 Subject: [docs] [issue12716] Reorganize os docs for files/dirs/fds In-Reply-To: <1312900904.97.0.581848486096.issue12716@psf.upfronthosting.co.za> Message-ID: <1345636222.94.0.832460357959.issue12716@psf.upfronthosting.co.za> Mike Hoy added the comment: I was attempting to create a patch for this but all I have is moving fchmod() below chmod(). I was unable to find fchmodat() in os.rst. And I need further clarification on >>Also, symbolic constants should be close to the functions they are used >>in. For example, open() flags shouldn't be in their own section. ---------- keywords: +patch nosy: +mikehoy Added file: http://bugs.python.org/file26961/issue141820-function-fchmod.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 22 16:53:07 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 22 Aug 2012 14:53:07 +0000 Subject: [docs] [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1345647187.76.0.562126187414.issue5088@psf.upfronthosting.co.za> R. David Murray added the comment: It may or may not be too old to deserve comments, but it is too old to do anything about it. This can't change for backward compatibility reasons, and since optparse is deprecated in favor of argparse it isn't getting any new features. We still need to apply the doc patch, though...(makes note to self). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 22 19:44:11 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 22 Aug 2012 17:44:11 +0000 Subject: [docs] [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1345657451.44.0.73368479333.issue11776@psf.upfronthosting.co.za> Terry J. Reedy added the comment: "class types.MappingProxyType(mapping) Read-only proxy of a mapping. ..." is the only class in 7.11.2. Standard Interpreter Types that *does* have a signature given in the text. However, the extra word 'class' here and for SimpleNamespace confuses me (I do not understand what it is intended to convey) and seems unnecessary. The two entries with signatures in 7.11.1 do not have that. Once parenthesized signatures are given, perhaps one statement at the top like "Classes listed without a signature cannot be directly created from Python code." would be sufficient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 23 10:56:33 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 23 Aug 2012 08:56:33 +0000 Subject: [docs] [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1345712193.58.0.642562001176.issue11776@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 23 12:36:12 2012 From: report at bugs.python.org (Mike Hoy) Date: Thu, 23 Aug 2012 10:36:12 +0000 Subject: [docs] [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1345718172.18.0.538909995989.issue11776@psf.upfronthosting.co.za> Mike Hoy added the comment: I used the following for: >>CodeType >>FunctionType >>LambdaType >>SimpleNamespace >>MethodType -------------------- >>> print(CodeType.__doc__) code(argcount, kwonlyargcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab[, freevars[, cellvars]]) Create a code object. Not for the faint of heart. >>> print(FunctionType.__doc__) function(code, globals[, name[, argdefs[, closure]]]) Create a function object from a code object and a dictionary. The optional name string overrides the name from the code object. The optional argdefs tuple specifies the default argument values. The optional closure tuple supplies the bindings for free variables. >>> print(LambdaType.__doc__) function(code, globals[, name[, argdefs[, closure]]]) Create a function object from a code object and a dictionary. The optional name string overrides the name from the code object. The optional argdefs tuple specifies the default argument values. The optional closure tuple supplies the bindings for free variables. >>> print(SimpleNamespace.__doc__) A simple attribute-based namespace. namespace(**kwargs) >>> print(MethodType.__doc__) method(function, instance) Create a bound instance method object. -------------------- I left out the [] arguments. I've stopped here and uploaded a patch for the >>'first easy part'. Despite that name I suspect I will have to change quite a few things. Once this part is done then I will move on the the >>'second easy part' ---------- keywords: +patch versions: -Python 2.7, Python 3.2 Added file: http://bugs.python.org/file26969/issue11776-sigs-docs-first.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 23 12:58:03 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 23 Aug 2012 10:58:03 +0000 Subject: [docs] [issue14674] Link to & explain deviations from RFC 4627 in json module docs In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1345719483.29.0.954225510034.issue14674@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Using the word "scalar" sounds wrong to me. Are strings really considered scalars in Python? At least RFC 4627 doesn't talk about scalars. +Since the RFC permits RFC-compliant parsers to accept input texts that are not +RFC-compliant, this module's deserializer is technically RFC-compliant under +default settings. This might scare users. Maybe it should note that there are parameters that can be used to turn off the most "harmful" extra features (namely the Inf and NaN support). Otherwise, the additions look very good and important. ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 23 14:47:40 2012 From: report at bugs.python.org (Wichert Akkerman) Date: Thu, 23 Aug 2012 12:47:40 +0000 Subject: [docs] [issue10436] tarfile.extractfile in "r|" stream mode fails with filenames or members from getmembers() In-Reply-To: <1289931464.79.0.618120236196.issue10436@psf.upfronthosting.co.za> Message-ID: <1345726060.11.0.379586024454.issue10436@psf.upfronthosting.co.za> Wichert Akkerman added the comment: You could also look for the first matching file and extract that. That way you can at least implement something similar to what standard tar can do: [fog;/tmp]-10> tar tf x.tar docs/ docs/index.rst docs/glossary.rst docs/Makefile docs/conf.py docs/changes.rst [fog;/tmp]-12> cat x.tar| tar xf - docs/index.rst [fog;/tmp]-13> ls docs index.rst ---------- nosy: +wichert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 23 16:30:21 2012 From: report at bugs.python.org (moijes12) Date: Thu, 23 Aug 2012 14:30:21 +0000 Subject: [docs] [issue1660009] continuing problem with httplib multiple set-cookie headers Message-ID: <1345732221.9.0.131466435749.issue1660009@psf.upfronthosting.co.za> Changes by moijes12 : ---------- nosy: -moijes12 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 23 18:14:53 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 23 Aug 2012 16:14:53 +0000 Subject: [docs] [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1345738493.64.0.00348800689468.issue11776@psf.upfronthosting.co.za> Terry J. Reedy added the comment: LambdaType is a synonym for FunctionType. There should be just one entry, as currently, but perhaps make that a bit clearer, as one could misread the current line as saying that FunctionType is the type of def statements and LambdaType is the type of lambda expressions. This misunderstanding appears in python-list discussions occasionally. So I think I would write types.FunctionType(sig....) types.LambdaType synonym for FunctionType Create a function .... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 23 19:22:31 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 23 Aug 2012 17:22:31 +0000 Subject: [docs] [issue14674] Link to & explain deviations from RFC 4627 in json module docs In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1345742551.47.0.916906324737.issue14674@psf.upfronthosting.co.za> ?ric Araujo added the comment: See also #13212. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 23 20:04:32 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 23 Aug 2012 18:04:32 +0000 Subject: [docs] [issue14674] Link to & explain deviations from RFC 4627 in json module docs In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1345745072.68.0.0482552294022.issue14674@psf.upfronthosting.co.za> Georg Brandl added the comment: Neither json.org nor RFC 4627 mention "scalar". I don't think we should introduce that term, with the necessary ambiguity given the context, needlessly. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 24 09:34:57 2012 From: report at bugs.python.org (Chris Rebert) Date: Fri, 24 Aug 2012 07:34:57 +0000 Subject: [docs] [issue14674] Link to & explain deviations from RFC 4627 in json module docs In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1345793695.77.0.414329921203.issue14674@psf.upfronthosting.co.za> Chris Rebert added the comment: Revised patch yet again to instead speak of "non-object, non-array" values and "JSON null, boolean, number, or string" values. Re: Petri, the patch already mentions the specific parameters one can use to get stricter behavior, albeit not in that particular short paragraph. Feel free to edit the patch. Any hope of getting this applied soon-ish? I began drafting this over 3 months ago, and yet this issue is tagged "easy"... ---------- Added file: http://bugs.python.org/file26981/json.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 24 12:02:28 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 24 Aug 2012 10:02:28 +0000 Subject: [docs] [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1345802548.17.0.296988069606.issue11776@psf.upfronthosting.co.za> Mike Hoy added the comment: Lambda Changes patch. ---------- Added file: http://bugs.python.org/file26982/issue11776-first-easy-part-lambda-.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 24 19:29:43 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 Aug 2012 17:29:43 +0000 Subject: [docs] [issue14674] Link to & explain deviations from RFC 4627 in json module docs In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1345829383.09.0.35167336997.issue14674@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Chris, I'm gonna take a look if nobody beats me to it. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 24 19:50:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 24 Aug 2012 17:50:33 +0000 Subject: [docs] [issue14674] Link to & explain deviations from RFC 4627 in json module docs In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <3X3VQJ5vfBzQJp@mail.python.org> Roundup Robot added the comment: New changeset 132886ef135d by Antoine Pitrou in branch '3.2': Issue #14674: Add a discussion of the json module's standard compliance. http://hg.python.org/cpython/rev/132886ef135d New changeset 16c0e26fc9cd by Antoine Pitrou in branch 'default': Issue #14674: Add a discussion of the json module's standard compliance. http://hg.python.org/cpython/rev/16c0e26fc9cd New changeset d413b36dbee5 by Antoine Pitrou in branch '2.7': Issue #14674: Add a discussion of the json module's standard compliance. http://hg.python.org/cpython/rev/d413b36dbee5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 24 19:55:10 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 24 Aug 2012 17:55:10 +0000 Subject: [docs] [issue14674] Link to & explain deviations from RFC 4627 in json module docs In-Reply-To: <1335449712.62.0.988063979534.issue14674@psf.upfronthosting.co.za> Message-ID: <1345830910.22.0.0847963984853.issue14674@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, thank you Chris! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Aug 25 14:32:22 2012 From: report at bugs.python.org (Stefan Krah) Date: Sat, 25 Aug 2012 12:32:22 +0000 Subject: [docs] [issue15724] Add "versionchanged" to memoryview docs In-Reply-To: <1345377223.09.0.176185074566.issue15724@psf.upfronthosting.co.za> Message-ID: <1345897941.64.0.819201243097.issue15724@psf.upfronthosting.co.za> Stefan Krah added the comment: This was less work than expected. I suppose docs can always go in even after rc1 is out, so I'll wait for that. ---------- keywords: +patch Added file: http://bugs.python.org/file26994/issue15724.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 26 06:01:55 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 26 Aug 2012 04:01:55 +0000 Subject: [docs] [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1345953714.2.0.446558429612.issue11776@psf.upfronthosting.co.za> Mike Hoy added the comment: I've added a completed patch for review. There was some talk on IRC that the wording for MappingProxyType should be changed to: "Return a read-only view of the given mapping." We decided to leave it to the review process to determine the exact wording. ---------- Added file: http://bugs.python.org/file27003/signatures-full-patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 26 06:04:07 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 26 Aug 2012 04:04:07 +0000 Subject: [docs] [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1345953847.45.0.244905052385.issue11776@psf.upfronthosting.co.za> Mike Hoy added the comment: Ezio Melotti was the one that offered to change the wording on MappingProxyType doc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 26 06:24:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 26 Aug 2012 04:24:48 +0000 Subject: [docs] [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1345955087.82.0.650139607387.issue11776@psf.upfronthosting.co.za> Ezio Melotti added the comment: > We decided to leave it to the review process to determine the exact wording. The problem with the current wording is that it explain how to use it (in case it's used to create a new mapping proxy), but doesn't say much about the object itself (in case it's used for isinstance/issubclass checks). This consideration can also be applied to the rest of the patch. Currently the types are documented as if they were only useful for isinstance/issuclass checks and the arguments are omitted from the doc. Given that this is the main use case IMHO, it makes sense having a lightweight list of types with a short description of what they are. OTOH these types can also be used to create new objects, so for this use case the arguments should be listed and documented. I'm not sure if these two use cases should be kept separate or not though. One possible way to do this is to have a table, followed by the full doc with arguments and explanation. The table will also be useful as an index to jump to the full doc, and as a quick overview of the available types. Something like: The following table summarizes the types defined in the types module. Typical use is of these names is for isinstance() or issubclass() checks. ----------- ------------------------------------------------ Type Name Type of ----------- ------------------------------------------------ MethodType methods of user-defined instances CodeType code objects such as returned by :func:`compile` ... ... ----------- ------------------------------------------------ These types can also be used to create new objects: .. class:: MethodType(function, instance) Create a bound instance method object. .. class:: CodeType(argcount, kwonlyargcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab) Create a code object. Not for the faint of heart. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 26 08:55:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 26 Aug 2012 06:55:59 +0000 Subject: [docs] [issue13801] The Python 3 Docs don't highlight nonlocal In-Reply-To: <1326720484.97.0.730349515473.issue13801@psf.upfronthosting.co.za> Message-ID: <1345964159.79.0.998005576722.issue13801@psf.upfronthosting.co.za> Ezio Melotti added the comment: Sphinx is configured to use Python3Lexer (highlight_language is set to 'python3' in Doc/conf.py). 'nonlocal' is not highlighted because in the pygments version that we are using 'nonlocal' is missing in Python3Lexer.tokens['keywords'] see (Doc/tools/pygments/lexers/agile.py:196). If this is fixed in more recent pygments versions, we only have to update our version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 26 10:12:55 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 26 Aug 2012 08:12:55 +0000 Subject: [docs] [issue13801] The Python 3 Docs don't highlight nonlocal In-Reply-To: <1326720484.97.0.730349515473.issue13801@psf.upfronthosting.co.za> Message-ID: <1345968775.16.0.465663905499.issue13801@psf.upfronthosting.co.za> Berker Peksag added the comment: > 'nonlocal' is not highlighted because in the pygments version that we are using 'nonlocal' is missing in Python3Lexer.tokens['keywords'] see (Doc/tools/pygments/lexers/agile.py:196). The nonlocal keyword has been added in Pygments 1.5. https://bitbucket.org/birkenfeld/pygments-main/src/972a251fa742/pygments/lexers/agile.py#cl-202 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 26 12:07:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 26 Aug 2012 10:07:07 +0000 Subject: [docs] [issue13801] The Python 3 Docs don't highlight nonlocal In-Reply-To: <1326720484.97.0.730349515473.issue13801@psf.upfronthosting.co.za> Message-ID: <1345975626.97.0.897960142126.issue13801@psf.upfronthosting.co.za> Ezio Melotti added the comment: Our version is 1.3.1. Georg said that this can be update after the 3.3 release. ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Aug 26 20:56:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 26 Aug 2012 18:56:19 +0000 Subject: [docs] [issue15693] expose glossary link on hover In-Reply-To: <1345132108.78.0.567099034623.issue15693@psf.upfronthosting.co.za> Message-ID: <1346007379.01.0.710815557279.issue15693@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I submitted a patch for this issue on the Sphinx tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 00:27:46 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 26 Aug 2012 22:27:46 +0000 Subject: [docs] [issue1432343] Description of file-object read() method is wrong. Message-ID: <1346020066.63.0.500804926927.issue1432343@psf.upfronthosting.co.za> R. David Murray added the comment: It looks to me like we (now, as of 67dc99a989cd) handle EINTR, so that the suggested caveat is no longer true. Since the TTY example has also been explained as correct, I'm going to close this. If I'm wrong about EINTR, someone (Antoine or Gregory, presumably) can reopen it... ---------- assignee: docs at python -> nosy: +gregory.p.smith, r.david.murray resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 07:00:15 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 27 Aug 2012 05:00:15 +0000 Subject: [docs] [issue13769] json.dump(ensure_ascii=False) return str instead of unicode In-Reply-To: <1326300079.82.0.279410736545.issue13769@psf.upfronthosting.co.za> Message-ID: <1346043615.43.0.759302166798.issue13769@psf.upfronthosting.co.za> Petri Lehtinen added the comment: It seems to me that when ensure_ascii is False, the return value will be a unicode instance if and only if there's a unicode object anywhere in the input. >>> json.dumps({'foo': 'bar'}, ensure_ascii=False) '{"foo": "bar"}' >>> json.dumps({'foo': u'bar'}, ensure_ascii=False) u'{"foo": "bar"}' >>> json.dumps({'foo': u'?iti'}, ensure_ascii=False) u'{"foo": "\xe4iti"}' >>> json.dumps({'foo': u'?iti'.encode('utf-8')}, ensure_ascii=False) '{"foo": "\xc3\xa4iti"}' >>> json.dumps({'foo': u'?iti'.encode('utf-16')}, ensure_ascii=False) '{"foo": "\xff\xfe\xe4\\u0000i\\u0000t\\u0000i\\u0000"}' ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 07:50:14 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 05:50:14 +0000 Subject: [docs] [issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs In-Reply-To: <1337670456.12.0.0273828432105.issue14880@psf.upfronthosting.co.za> Message-ID: <1346046614.97.0.101647689551.issue14880@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- keywords: +patch Added file: http://bugs.python.org/file27008/issue14880.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 07:59:43 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 05:59:43 +0000 Subject: [docs] [issue14824] reprlib documentation references string module In-Reply-To: <1337147544.42.0.726566417701.issue14824@psf.upfronthosting.co.za> Message-ID: <1346047182.91.0.127291935526.issue14824@psf.upfronthosting.co.za> Chris Rebert added the comment: Updated patch. I concur that anyone creating a type whose name has whitespace in it is just asking for trouble. ---------- Added file: http://bugs.python.org/file27009/reprlib.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 08:46:20 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 06:46:20 +0000 Subject: [docs] [issue15788] cross-refs in the subprocess.Popen.std{in, out, err} warning box aren't linked Message-ID: <1346049980.8.0.0439689816925.issue15788@psf.upfronthosting.co.za> New submission from Chris Rebert: The cross-references, particularly to Popen.communicate(), in the warning box in the subprocess docs about using Popen.stdout.read() etc. aren't hyperlinked. The attached patch fixes that. ---------- assignee: docs at python components: Documentation files: link_communicate_warning.patch keywords: patch messages: 169182 nosy: cvrebert, docs at python priority: normal severity: normal status: open title: cross-refs in the subprocess.Popen.std{in,out,err} warning box aren't linked versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27010/link_communicate_warning.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 08:48:20 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 27 Aug 2012 06:48:20 +0000 Subject: [docs] [issue15788] cross-refs in the subprocess.Popen.std{in, out, err} warning box aren't linked In-Reply-To: <1346049980.8.0.0439689816925.issue15788@psf.upfronthosting.co.za> Message-ID: <1346050100.48.0.664040509155.issue15788@psf.upfronthosting.co.za> Ezio Melotti added the comment: + Use :meth:`communicate() ` I believe you can simply use :meth:`~Popen.communicate` here. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 08:52:42 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 06:52:42 +0000 Subject: [docs] [issue15788] cross-refs in the subprocess.Popen.std{in, out, err} warning box aren't linked In-Reply-To: <1346049980.8.0.0439689816925.issue15788@psf.upfronthosting.co.za> Message-ID: <1346050362.56.0.137940596408.issue15788@psf.upfronthosting.co.za> Chris Rebert added the comment: So you can. Neat trick. Patch changed accordingly. ---------- Added file: http://bugs.python.org/file27011/link_communicate_warning.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 08:54:17 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 06:54:17 +0000 Subject: [docs] [issue15788] cross-refs in the subprocess.Popen.std{in, out, err} warning box aren't linked In-Reply-To: <1346049980.8.0.0439689816925.issue15788@psf.upfronthosting.co.za> Message-ID: <1346050457.02.0.401007519126.issue15788@psf.upfronthosting.co.za> Chris Rebert added the comment: Let's try that again. ---------- Added file: http://bugs.python.org/file27012/link_communicate_warning.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 08:54:24 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 06:54:24 +0000 Subject: [docs] [issue15788] cross-refs in the subprocess.Popen.std{in, out, err} warning box aren't linked In-Reply-To: <1346049980.8.0.0439689816925.issue15788@psf.upfronthosting.co.za> Message-ID: <1346050464.02.0.0125014864996.issue15788@psf.upfronthosting.co.za> Changes by Chris Rebert : Removed file: http://bugs.python.org/file27011/link_communicate_warning.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 09:07:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 27 Aug 2012 07:07:00 +0000 Subject: [docs] [issue15788] cross-refs in the subprocess.Popen.std{in, out, err} warning box aren't linked In-Reply-To: <1346049980.8.0.0439689816925.issue15788@psf.upfronthosting.co.za> Message-ID: <3X540M1VXvzQFk@mail.python.org> Roundup Robot added the comment: New changeset 92aa438a5c4b by Ezio Melotti in branch '2.7': #15788: fix broken links in subprocess doc. Patch by Chris Rebert. http://hg.python.org/cpython/rev/92aa438a5c4b New changeset 1676e423054a by Ezio Melotti in branch '3.2': #15788: fix broken links in subprocess doc. Patch by Chris Rebert. http://hg.python.org/cpython/rev/1676e423054a New changeset 64640a02b0ca by Ezio Melotti in branch 'default': #15788: merge with 3.2. http://hg.python.org/cpython/rev/64640a02b0ca ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 09:07:57 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 27 Aug 2012 07:07:57 +0000 Subject: [docs] [issue15788] cross-refs in the subprocess.Popen.std{in, out, err} warning box aren't linked In-Reply-To: <1346049980.8.0.0439689816925.issue15788@psf.upfronthosting.co.za> Message-ID: <1346051277.2.0.200331408782.issue15788@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 09:24:02 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 07:24:02 +0000 Subject: [docs] [issue15789] mention shell-like parts of the std lib in the subprocess docs Message-ID: <1346052242.66.0.254880477781.issue15789@psf.upfronthosting.co.za> New submission from Chris Rebert: To further dissuade people from using subprocess.Popen's shell=True option unnecessarily, this patch points out that some common shell features are also available directly in Python via certain modules & functions. ---------- assignee: docs at python components: Documentation files: subprocess.rst.patch keywords: patch messages: 169188 nosy: cvrebert, docs at python priority: normal severity: normal status: open title: mention shell-like parts of the std lib in the subprocess docs versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file27013/subprocess.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 09:46:30 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 07:46:30 +0000 Subject: [docs] [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1346053589.9.0.320255549846.issue14570@psf.upfronthosting.co.za> Chris Rebert added the comment: Erm, the patch seems to have some ANSI terminal coloring escape code junk (e.g. "") in it... ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 09:54:46 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 07:54:46 +0000 Subject: [docs] [issue11964] Undocumented change to indent param of json.dump in 3.2 In-Reply-To: <1304178435.78.0.522459822796.issue11964@psf.upfronthosting.co.za> Message-ID: <1346054086.43.0.46781164748.issue11964@psf.upfronthosting.co.za> Chris Rebert added the comment: It's been over a year and the patch is trivial. Any chance of it getting applied soon? ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 11:02:02 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 09:02:02 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346058122.29.0.488627908859.issue15533@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 11:03:20 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 09:03:20 +0000 Subject: [docs] [issue7186] Document specialness of __doc__, and possibly other "special" attributes In-Reply-To: <1256240855.61.0.550470965616.issue7186@psf.upfronthosting.co.za> Message-ID: <1346058200.95.0.585445322342.issue7186@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 11:03:30 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 09:03:30 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1346058210.63.0.374928342132.issue9650@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 11:03:46 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 09:03:46 +0000 Subject: [docs] [issue14783] Update int() docstring from manual In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1346058226.24.0.327416891337.issue14783@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 11:18:26 2012 From: report at bugs.python.org (Chris Rebert) Date: Mon, 27 Aug 2012 09:18:26 +0000 Subject: [docs] [issue14870] Descriptions of os.utime() and os.utimensat() use wrong notation In-Reply-To: <1337601006.45.0.685713178373.issue14870@psf.upfronthosting.co.za> Message-ID: <1346059106.29.0.292502946705.issue14870@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 12:02:51 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 27 Aug 2012 10:02:51 +0000 Subject: [docs] [issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs In-Reply-To: <1337670456.12.0.0273828432105.issue14880@psf.upfronthosting.co.za> Message-ID: <1346061771.71.0.584468795014.issue14880@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Chris: Thanks for the patch. I'm not sure register_dialect()'s signature is good like that, though. Hynek, what do you think? ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 12:20:45 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 27 Aug 2012 10:20:45 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1346062845.75.0.351658753903.issue9650@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I would like to add my +1 to this issue. I suggest adding something like this: """ Commonly used format codes: %Y Year with century as a decimal number. %m Month as a decimal number [01,12]. %d Day of the month as a decimal number [01,31]. %H Hour (24-hour clock) as a decimal number [00,23]. %M Minute as a decimal number [00,59]. %S Second as a decimal number [00,61]. %z Time zone offset from UTC. %a Locale?s abbreviated weekday name. %A Locale?s full weekday name. %b Locale?s abbreviated month name. %B Locale?s full month name. %c Locale?s appropriate date and time representation. Other codes may be available on your platform. See documentation for the C library strftime function. """ This is a subjective selection in a subjective order of importance, so some bikesheding is welcome. My choice was motivated by the assumption that most commonly used are the codes required to form RFC 3339 timestamps. I deliberately omitted deprecated %y code and the %Z code that produces non-standardized TZ names. I can be persuaded to add 12 hour clock codes. ---------- assignee: docs at python -> belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 13:41:37 2012 From: report at bugs.python.org (Pas) Date: Mon, 27 Aug 2012 11:41:37 +0000 Subject: [docs] [issue15790] Python 3.3.0rc1 release notes claims PEP-405 support, yet pysetup is not in the package (needs more usage documentation, to get pip working) Message-ID: <1346067697.02.0.646215299942.issue15790@psf.upfronthosting.co.za> New submission from Pas: Python 3.3.0rc1 release notes ( http://python.org/download/releases/3.3.0/ ) claims PEP-405 support, yet pysetup is not in the tarball. (After reading through mailing lists and bugs it's clear that the move to "packaging" module got pulled, so it's still just distutils in there.) There is no documentation on how to get a pyvenv (or virtualenv, or any other virtual enviroment solution) built venv to gain setuptools/pip support. ---------- assignee: docs at python components: Documentation messages: 169194 nosy: docs at python, pas priority: normal severity: normal status: open title: Python 3.3.0rc1 release notes claims PEP-405 support, yet pysetup is not in the package (needs more usage documentation, to get pip working) versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 13:53:21 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 27 Aug 2012 11:53:21 +0000 Subject: [docs] [issue15790] Python 3.3.0rc1 release notes claims PEP-405 support, yet pysetup is not in the package (needs more usage documentation, to get pip working) In-Reply-To: <1346067697.02.0.646215299942.issue15790@psf.upfronthosting.co.za> Message-ID: <1346068401.37.0.380352050775.issue15790@psf.upfronthosting.co.za> Ronald Oussoren added the comment: PEP 405 is for "venv" support and that is available. Documenting how to use pip/distribute/setuptools with venv is IMHO beyond the scope of the stdlib documentation (and should be easy enough: create a virtual environment using pyvenv, then install pip using its setup.py file). The pep mentions the pysetup script from the packaging module, but as the packaging module got pulled for python 3.3 the pysetup script is not present in the python 3.3 installation and therefore also not in venv-s. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 14:56:08 2012 From: report at bugs.python.org (Pas) Date: Mon, 27 Aug 2012 12:56:08 +0000 Subject: [docs] [issue15790] Python 3.3.0rc1 release notes claims PEP-405 support, yet pysetup is not in the package (needs more usage documentation, to get pip working) In-Reply-To: <1346067697.02.0.646215299942.issue15790@psf.upfronthosting.co.za> Message-ID: <1346072168.88.0.993036086752.issue15790@psf.upfronthosting.co.za> Pas added the comment: It's not straightforward, at all. # (v3.3rc1) /home/pas/wololo/pip-1.1$ python setup.py install Traceback (most recent call last): File "setup.py", line 3, in from setuptools import setup ImportError: No module named 'setuptools' Then, of course one can try installing setuptools, but it won't work. Traceback (most recent call last): File "setup.py", line 7, in execfile(convert_path('setuptools/command/__init__.py'), d) NameError: name 'execfile' is not defined So, yes, venv is available. Great. But Python is not so great without those batteries, which are allegedly included. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 15:03:20 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 27 Aug 2012 13:03:20 +0000 Subject: [docs] [issue15790] Python 3.3.0rc1 release notes claims PEP-405 support, yet pysetup is not in the package (needs more usage documentation, to get pip working) In-Reply-To: <1346067697.02.0.646215299942.issue15790@psf.upfronthosting.co.za> Message-ID: <1346072600.41.0.166027236582.issue15790@psf.upfronthosting.co.za> Ronald Oussoren added the comment: pyvenv won't install setuptools because setuptools is not a stdlib package. Having packaging would have been nice, but that library was not in a good enough shape for the 3.3 release. I don't understand what you try to do in the second traceback. Installing distribute works fine though: 1) Create environment using pyvenv: $ pyenv myenv 2) Download distribute archive from PyPI 3) Extract this archive 4) Install: $ cd distribute-0.6.28; ../pyenv/bin/python setup.py install If you have a setup.py file where you want to use the distribute package you can use distribute_setup, as described in . I'm using this in my own packages and this works fine with pyvenv as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 15:08:48 2012 From: report at bugs.python.org (Aaron Iles) Date: Mon, 27 Aug 2012 13:08:48 +0000 Subject: [docs] [issue12403] Mention sys.displayhook in code module docs and the compile builtin docs In-Reply-To: <1308959744.93.0.261089879651.issue12403@psf.upfronthosting.co.za> Message-ID: <1346072928.31.0.118646474607.issue12403@psf.upfronthosting.co.za> Aaron Iles added the comment: I've submitted a patch which adds a section to the code module's documentation on overriding console output. It attempts to catalogue when sys.stderr, sys.excepthook and sys.displayhook are used to print console output. ---------- keywords: +patch nosy: +aliles Added file: http://bugs.python.org/file27014/p1346072775.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 16:34:56 2012 From: report at bugs.python.org (Pas) Date: Mon, 27 Aug 2012 14:34:56 +0000 Subject: [docs] [issue15790] Python 3.3.0rc1 release notes claims PEP-405 support, yet pysetup is not in the package (needs more usage documentation, to get pip working) In-Reply-To: <1346067697.02.0.646215299942.issue15790@psf.upfronthosting.co.za> Message-ID: <1346078096.63.0.218647781171.issue15790@psf.upfronthosting.co.za> Pas added the comment: Thank you. The missing detail was to install distribute when a package needs setuptools. So, documentation. The setuptools page doesn't even mention distribute. The PEP mentions both, even though setuptools pretty much looks incompatible with Py3.3. Anyway. I'm honestly grateful for your immediate responses. Thanks again for sorting this out, let's hope others will find this via a search engine. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 17:34:37 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 27 Aug 2012 15:34:37 +0000 Subject: [docs] [issue11964] Undocumented change to indent param of json.dump in 3.2 In-Reply-To: <1304178435.78.0.522459822796.issue11964@psf.upfronthosting.co.za> Message-ID: <1346081677.34.0.952084176806.issue11964@psf.upfronthosting.co.za> ?ric Araujo added the comment: See my previous message where I say that a careful check is needed. ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 18:08:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 27 Aug 2012 16:08:57 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346083737.84.0.799156787268.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attached are a few test cases showing that Popen *does* consider cwd when searching for the executable (as well as for args[0]), and in particular that you *can* specify the program's path relative to cwd. I also moved the test_cwd test to be adjacent to the other cwd test (the one that tests cwd with the executable argument). I can also prepare the documentation changes for addition to the patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27016/issue-15533-test-cases-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 18:16:55 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 27 Aug 2012 16:16:55 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346084215.15.0.488021287912.issue15533@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 21:29:34 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 27 Aug 2012 19:29:34 +0000 Subject: [docs] [issue11964] Undocumented change to indent param of json.dump in 3.2 In-Reply-To: <1304178435.78.0.522459822796.issue11964@psf.upfronthosting.co.za> Message-ID: <1346095774.28.0.613502170944.issue11964@psf.upfronthosting.co.za> Petri Lehtinen added the comment: I don't think the test changes are needed, because both dump() and dumps() use JSONEncoder internally, and all current indent testing is done using dumps() anyway. More important would be to update the documentation of indent for JSONEncoder to match that of dump() and add the versionchanged directives to both. ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 21:54:11 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Mon, 27 Aug 2012 19:54:11 +0000 Subject: [docs] [issue11964] Undocumented change to indent param of json.dump in 3.2 In-Reply-To: <1304178435.78.0.522459822796.issue11964@psf.upfronthosting.co.za> Message-ID: <1346097251.19.0.516546595895.issue11964@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Attached a new patch. ---------- Added file: http://bugs.python.org/file27017/issue11964.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 22:12:29 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 27 Aug 2012 20:12:29 +0000 Subject: [docs] [issue11964] Undocumented change to indent param of json.dump in 3.2 In-Reply-To: <1304178435.78.0.522459822796.issue11964@psf.upfronthosting.co.za> Message-ID: <1346098349.71.0.823312666533.issue11964@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM. ---------- assignee: eric.araujo -> petri.lehtinen stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 22:23:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 27 Aug 2012 20:23:47 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346099027.16.0.574388580112.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is a full patch for the default branch (documentation correction and test cases for the documented behavior). If this patch looks acceptable, I can prepare a separate patch for 2.7. ---------- Added file: http://bugs.python.org/file27018/issue-15533-2-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 22:27:59 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 27 Aug 2012 20:27:59 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346099279.2.0.76559757921.issue15533@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- keywords: +needs review stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Aug 27 22:37:09 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 27 Aug 2012 20:37:09 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346099829.76.0.757503282853.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: python_dir = os.path.dirname(os.path.realpath(sys.executable)) wrong_cwd = os.path.join(python_dir, 'Doc') Actually, is there a better directory to be using for this? I'd like a directory that is guaranteed to exist that is in the same directory as sys.executable -- so that I can construct a simple relative path from that directory to sys.executable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 00:42:19 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 27 Aug 2012 22:42:19 +0000 Subject: [docs] [issue15789] mention shell-like parts of the std lib in the subprocess docs In-Reply-To: <1346052242.66.0.254880477781.issue15789@psf.upfronthosting.co.za> Message-ID: <1346107339.61.0.0943990012128.issue15789@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks, LGTM. Maybe there?s a section about walking files in the os module doc that you could also link to? Also shutil. ---------- nosy: +eric.araujo versions: +Python 3.2 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 00:43:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Aug 2012 22:43:57 +0000 Subject: [docs] [issue15796] Fix readline() docstrings Message-ID: <1346107437.01.0.760856446484.issue15796@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch that escapes '\n' in readline() docstrings. ---------- assignee: docs at python components: Documentation files: escape_nl.patch keywords: patch messages: 169235 nosy: docs at python, storchaka priority: normal severity: normal status: open title: Fix readline() docstrings versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27021/escape_nl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 00:44:12 2012 From: report at bugs.python.org (Ned Deily) Date: Mon, 27 Aug 2012 22:44:12 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346107452.08.0.028306660407.issue15533@psf.upfronthosting.co.za> Ned Deily added the comment: Because tests should be runnable from installed Pythons (including binary -only installations), tests should not assume that a Python source directory is available nor make any assumptions about the location of the Python executable itself. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 00:44:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 27 Aug 2012 22:44:28 +0000 Subject: [docs] [issue15796] Fix readline() docstrings In-Reply-To: <1346107437.01.0.760856446484.issue15796@psf.upfronthosting.co.za> Message-ID: <1346107468.26.0.681969556806.issue15796@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27022/escape_nl-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 01:53:51 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 27 Aug 2012 23:53:51 +0000 Subject: [docs] [issue15790] Python 3.3.0rc1 release notes claims PEP-405 support, yet pysetup is not in the package (needs more usage documentation, to get pip working) In-Reply-To: <1346067697.02.0.646215299942.issue15790@psf.upfronthosting.co.za> Message-ID: <1346111631.41.0.722403316107.issue15790@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 02:28:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 28 Aug 2012 00:28:49 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346113729.33.0.677727156875.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is a new patch that makes no assumptions about the contents of the directory containing sys.executable. ---------- Added file: http://bugs.python.org/file27026/issue-15533-3-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 03:12:16 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 28 Aug 2012 01:12:16 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1346116336.56.0.846522642877.issue9650@psf.upfronthosting.co.za> Chris Rebert added the comment: +1 on including am/pm-related codes. Blame us backwards, non-metric Americans. Sounds GTM otherwise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 06:09:44 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 28 Aug 2012 04:09:44 +0000 Subject: [docs] [issue15789] mention shell-like parts of the std lib in the subprocess docs In-Reply-To: <1346052242.66.0.254880477781.issue15789@psf.upfronthosting.co.za> Message-ID: <1346126984.7.0.968353432858.issue15789@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This is a nit, but can you adhere to an 80-character line length? Much (but not all) of the documentation does. ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 07:59:28 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 28 Aug 2012 05:59:28 +0000 Subject: [docs] [issue14783] Update int() docstring from manual In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1346133568.85.0.825348594691.issue14783@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The 3.3 version has the virtue of being accurate and the vice of being confusing. In a way, it has made the docs worse for the average user of common cases. Is there a way to stack the alternative signatures rather than mush the various used into a single pile of mush? int(x=0) --> integer coercion int(str, base=10) --> integer converted from string in a given base ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 08:24:38 2012 From: report at bugs.python.org (Martin Burger) Date: Tue, 28 Aug 2012 06:24:38 +0000 Subject: [docs] [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1346135078.48.0.800166193169.issue9694@psf.upfronthosting.co.za> Changes by Martin Burger : ---------- nosy: +mburger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 08:45:48 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Tue, 28 Aug 2012 06:45:48 +0000 Subject: [docs] [issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs In-Reply-To: <1337670456.12.0.0273828432105.issue14880@psf.upfronthosting.co.za> Message-ID: <1346136348.33.0.706531396486.issue14880@psf.upfronthosting.co.za> Hynek Schlawack added the comment: What does bother you? Both sigs look like in py3 if I'm looking correctly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 10:59:52 2012 From: report at bugs.python.org (Chris Rebert) Date: Tue, 28 Aug 2012 08:59:52 +0000 Subject: [docs] [issue15789] mention shell-like parts of the std lib in the subprocess docs In-Reply-To: <1346052242.66.0.254880477781.issue15789@psf.upfronthosting.co.za> Message-ID: <1346144392.64.0.413916457461.issue15789@psf.upfronthosting.co.za> Chris Rebert added the comment: Revised patch in response to comments. ---------- Added file: http://bugs.python.org/file27029/subprocess.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 11:33:18 2012 From: report at bugs.python.org (David Lam) Date: Tue, 28 Aug 2012 09:33:18 +0000 Subject: [docs] [issue11176] give more meaningful argument names in argparse documentation In-Reply-To: <1297352937.46.0.470038569364.issue11176@psf.upfronthosting.co.za> Message-ID: <1346146396.08.0.812388575496.issue11176@psf.upfronthosting.co.za> David Lam added the comment: here's a patch that covers all but one of the foo/bar/baz examples it also has fixes for the sample code near the beginning from the review Ezio did the one example I didn't do was the "Arguments containing -" part. I guess it felt like changing the names in that example would distract from what it was trying to illustrate there Anyways, I tried to proofread it so hopefully it reads okay, enjoy enjoy ^^ ---------- Added file: http://bugs.python.org/file27030/issue11176.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 11:36:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 28 Aug 2012 09:36:43 +0000 Subject: [docs] [issue11964] Undocumented change to indent param of json.dump in 3.2 In-Reply-To: <1304178435.78.0.522459822796.issue11964@psf.upfronthosting.co.za> Message-ID: <3X5lGd601TzPwn@mail.python.org> Roundup Robot added the comment: New changeset 5bff555168ab by Petri Lehtinen in branch '3.2': #11964: Document a change in v3.2 to the json indent parameter http://hg.python.org/cpython/rev/5bff555168ab New changeset 0fb511659ef4 by Petri Lehtinen in branch 'default': #11964: Document a change in v3.2 to the json indent parameter http://hg.python.org/cpython/rev/0fb511659ef4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 11:38:04 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 28 Aug 2012 09:38:04 +0000 Subject: [docs] [issue11964] Undocumented change to indent param of json.dump in 3.2 In-Reply-To: <1304178435.78.0.522459822796.issue11964@psf.upfronthosting.co.za> Message-ID: <1346146684.7.0.480140495151.issue11964@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Fixed, thanks. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 11:40:28 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 28 Aug 2012 09:40:28 +0000 Subject: [docs] [issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs In-Reply-To: <1337670456.12.0.0273828432105.issue14880@psf.upfronthosting.co.za> Message-ID: <1346146828.58.0.654099524544.issue14880@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Well, I wasn't sure about [optional] params before **kwargs. But if that's ok, then I think the patch is good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 12:19:59 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Tue, 28 Aug 2012 10:19:59 +0000 Subject: [docs] [issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs In-Reply-To: <1337670456.12.0.0273828432105.issue14880@psf.upfronthosting.co.za> Message-ID: <1346149199.24.0.995634431204.issue14880@psf.upfronthosting.co.za> Hynek Schlawack added the comment: It seems correct like that: static PyObject * csv_register_dialect(PyObject *module, PyObject *args, PyObject *kwargs) { PyObject *name_obj, *dialect_obj = NULL; PyObject *dialect; if (!PyArg_UnpackTuple(args, "", 1, 2, &name_obj, &dialect_obj)) return NULL; Therefore going to commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 12:35:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 28 Aug 2012 10:35:29 +0000 Subject: [docs] [issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs In-Reply-To: <1337670456.12.0.0273828432105.issue14880@psf.upfronthosting.co.za> Message-ID: <3X5mZS0cD1zPyW@mail.python.org> Roundup Robot added the comment: New changeset dc080e19f7aa by Hynek Schlawack in branch '2.7': #14880: Fix kwargs notation in csv.reader, .writer & .register_dialect http://hg.python.org/cpython/rev/dc080e19f7aa ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 12:36:30 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Tue, 28 Aug 2012 10:36:30 +0000 Subject: [docs] [issue14880] csv.reader and .writer use wrong kwargs notation in 2.7 docs In-Reply-To: <1337670456.12.0.0273828432105.issue14880@psf.upfronthosting.co.za> Message-ID: <1346150190.05.0.508044828823.issue14880@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Thank you for your contribution Chris! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 12:44:39 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 28 Aug 2012 10:44:39 +0000 Subject: [docs] [issue13769] json.dump(ensure_ascii=False) return str instead of unicode In-Reply-To: <1326300079.82.0.279410736545.issue13769@psf.upfronthosting.co.za> Message-ID: <1346150679.36.0.212256139666.issue13769@psf.upfronthosting.co.za> Petri Lehtinen added the comment: It may also be unicode if the encoding parameter is used even if there are no unicode objects in the input. >>> json.dumps([u'?'.encode('iso-8859-9')], encoding='iso-8859-9', ensure_ascii=False) u'["\u015e"]' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 12:51:26 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 28 Aug 2012 10:51:26 +0000 Subject: [docs] [issue14042] json.dumps() documentation is slightly incorrect. In-Reply-To: <1329494870.59.0.571991231564.issue14042@psf.upfronthosting.co.za> Message-ID: <1346151086.25.0.561120126282.issue14042@psf.upfronthosting.co.za> Petri Lehtinen added the comment: This is a documentation bug for 2.7. Setting as duplicate of #13769. ---------- nosy: +petri.lehtinen resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> json.dump(ensure_ascii=False) return str instead of unicode versions: -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 13:07:54 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 28 Aug 2012 11:07:54 +0000 Subject: [docs] [issue13769] json.dump(ensure_ascii=False) return str instead of unicode In-Reply-To: <1326300079.82.0.279410736545.issue13769@psf.upfronthosting.co.za> Message-ID: <1346152074.12.0.984090554907.issue13769@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Attached a patch for 2.7 that updates docs and docstrings. ---------- keywords: +needs review, patch stage: needs patch -> patch review Added file: http://bugs.python.org/file27032/issue13769.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 13:08:39 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Tue, 28 Aug 2012 11:08:39 +0000 Subject: [docs] [issue13769] json.dump(ensure_ascii=False) return str instead of unicode In-Reply-To: <1326300079.82.0.279410736545.issue13769@psf.upfronthosting.co.za> Message-ID: <1346152119.84.0.926188718334.issue13769@psf.upfronthosting.co.za> Changes by Petri Lehtinen : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Aug 28 15:21:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 28 Aug 2012 13:21:55 +0000 Subject: [docs] [issue14783] Update int() docstring from manual In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1346160115.35.0.619118575585.issue14783@psf.upfronthosting.co.za> Ezio Melotti added the comment: .. function:: int(n=0) int(s, base=10) should do the trick. +1 on using this instead of int([number | string[, base]]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 29 12:14:05 2012 From: report at bugs.python.org (Gunnlaugur Thor Briem) Date: Wed, 29 Aug 2012 10:14:05 +0000 Subject: [docs] [issue15807] Bogus versionchanged note in logging.handlers.MemoryHandler doc Message-ID: <1346235245.12.0.797988832511.issue15807@psf.upfronthosting.co.za> New submission from Gunnlaugur Thor Briem: In logging.handlers.MemoryHandler documentation: ?Changed in version 2.6: credentials was added.? There's no `credentials` anywhere nearby, and at first glance I can't see anything new in `MemoryHandler` when this was introduced. Presumably the `.. versionchanged::` note just landed there by copy-paste error in 6fb033af9310. ---------- assignee: docs at python components: Documentation messages: 169360 nosy: docs at python, gthb priority: normal severity: normal status: open title: Bogus versionchanged note in logging.handlers.MemoryHandler doc type: enhancement versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 29 12:16:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 29 Aug 2012 10:16:49 +0000 Subject: [docs] [issue15807] Bogus versionchanged note in logging.handlers.MemoryHandler doc In-Reply-To: <1346235245.12.0.797988832511.issue15807@psf.upfronthosting.co.za> Message-ID: <1346235409.11.0.463447412286.issue15807@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +vinay.sajip stage: -> needs patch versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 29 14:04:37 2012 From: report at bugs.python.org (Aaron Iles) Date: Wed, 29 Aug 2012 12:04:37 +0000 Subject: [docs] [issue15436] __sizeof__ is not documented In-Reply-To: <1343073282.53.0.774447573036.issue15436@psf.upfronthosting.co.za> Message-ID: <1346241877.85.0.827786075632.issue15436@psf.upfronthosting.co.za> Changes by Aaron Iles : ---------- nosy: +aliles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 29 15:28:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 29 Aug 2012 13:28:07 +0000 Subject: [docs] [issue15807] Bogus versionchanged note in logging.handlers.MemoryHandler doc In-Reply-To: <1346235245.12.0.797988832511.issue15807@psf.upfronthosting.co.za> Message-ID: <3X6SMB0PbGzQ95@mail.python.org> Roundup Robot added the comment: New changeset 48f54b6bf0ef by Vinay Sajip in branch '2.7': Closes #15807: Removed incorrect directive from help. http://hg.python.org/cpython/rev/48f54b6bf0ef ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 29 19:03:57 2012 From: report at bugs.python.org (Mike Hoy) Date: Wed, 29 Aug 2012 17:03:57 +0000 Subject: [docs] [issue11776] Constructor signatures missing in types module documentation In-Reply-To: <1302036805.33.0.506634428921.issue11776@psf.upfronthosting.co.za> Message-ID: <1346259837.08.0.571426440568.issue11776@psf.upfronthosting.co.za> Mike Hoy added the comment: This should be all the requested changes. I've gone over the table entries (at least the first one, CodeType, with bitdancer on IRC). I've removed the descriptive language from below the table and added it to the table. Leaving the text below the table to deal with args and some descriptive text that was just too large to really fit into the right column of the table. One question though, do you want: BuiltinFunctionType BuiltinMethodType FrameType GeneratorType GetSetDescriptorType MemberDescriptorType TracebackType To be in the table as well. I'm a bit confused on this part. Just let me know. ---------- Added file: http://bugs.python.org/file27047/complete-patch-with-table-issue-11776.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Aug 29 20:39:00 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 29 Aug 2012 18:39:00 +0000 Subject: [docs] [issue13769] json.dump(ensure_ascii=False) return str instead of unicode In-Reply-To: <1326300079.82.0.279410736545.issue13769@psf.upfronthosting.co.za> Message-ID: <1346265540.01.0.50490270015.issue13769@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Attached an updated patch, which is more explicit on what ensure_ascii actually does. ---------- Added file: http://bugs.python.org/file27049/issue13769_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 04:49:48 2012 From: report at bugs.python.org (Josh Kupershmidt) Date: Thu, 30 Aug 2012 02:49:48 +0000 Subject: [docs] [issue15818] multiprocessing documentation of Process.exitcode Message-ID: <1346294988.32.0.746763914895.issue15818@psf.upfronthosting.co.za> New submission from Josh Kupershmidt: [I tried to send this as an email to docs at python.org yesterday, but it seems to have gotten eaten, as I don't see the message in the archives.] Hi all, The documentation for the multiprocessing module claims: | Note that the start(), join(), is_alive() and exit_code methods | should only be called by the process that created the process object. Two problems with this description: 1. "exit_code" should be spelled "exitcode" 2. exitcode is an attribute of the Process class, not a method as claimed, since the underlying method is decorated with @property Also, aside from the above documentation issues, if it is true that it's not safe to query the exitcode from a separate process, should the exitcode property method include a check like so: assert self._parent_pid == os.getpid(), 'can only test a child process' since start(), join(), and is_alive() all perform this check? ---------- assignee: docs at python components: Documentation messages: 169428 nosy: docs at python, schmiddy priority: normal severity: normal status: open title: multiprocessing documentation of Process.exitcode versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 11:53:08 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 30 Aug 2012 09:53:08 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() Message-ID: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> New submission from Stefan Krah: People are using PyMemoryView_FromBuffer() to create and return permanent memoryviews from buffers that are allocated on the stack. See: http://stackoverflow.com/questions/8123121/how-to-get-back-a-valid-object-from-python-in-c-while-this-object-has-been-con The docs should perhaps warn against this. ---------- assignee: docs at python components: Documentation messages: 169443 nosy: belopolsky, docs at python, ncoghlan, pitrou, skrah priority: normal severity: normal status: open title: Improve docs for PyMemoryView_FromBuffer() type: enhancement versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 12:14:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 30 Aug 2012 10:14:33 +0000 Subject: [docs] [issue15724] Add "versionchanged" to memoryview docs In-Reply-To: <1345377223.09.0.176185074566.issue15724@psf.upfronthosting.co.za> Message-ID: <3X701M4XX1zPsv@mail.python.org> Roundup Robot added the comment: New changeset 34e8c06f7e55 by Stefan Krah in branch 'default': Issue #15724: Add versionchanged tags to the memoryview documentation. http://hg.python.org/cpython/rev/34e8c06f7e55 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 12:43:32 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 30 Aug 2012 10:43:32 +0000 Subject: [docs] [issue15724] Add "versionchanged" to memoryview docs In-Reply-To: <1345377223.09.0.176185074566.issue15724@psf.upfronthosting.co.za> Message-ID: <1346323412.83.0.646813861727.issue15724@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 12:56:42 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 30 Aug 2012 10:56:42 +0000 Subject: [docs] [issue15818] multiprocessing documentation of Process.exitcode In-Reply-To: <1346294988.32.0.746763914895.issue15818@psf.upfronthosting.co.za> Message-ID: <1346324202.18.0.896238610309.issue15818@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 15:39:04 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 30 Aug 2012 13:39:04 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346333944.53.0.237978097972.issue15821@psf.upfronthosting.co.za> Stefan Krah added the comment: This may be a bigger problem (grep for image_surface_get_data): http://lists.cairographics.org/archives/cairo/2011-December/022563.html The previous semantics for PyMemoryView_FromBuffer(view) were: 1) If non-NULL, steal the view.obj reference with automatic decrement in PyBuffer_Release(). 2) Copy shape and strides to view.smalltable. The new semantics for PyMemoryView_FromBuffer(view) are: 1) If non-NULL, treat view.obj as a borrowed reference. 2) Rely on the fact that shape and strides won't disappear. 2) means that returning PyMemoryView_FromBuffer(view) from a view allocated on the stack is no longer safe. In all instances people could migrate to PyMemoryView_FromMemory(), which is both safe and more convenient, but code may be broken. PyManaged_Buffer is designed to expect buffers from exporters, where it is guaranteed that the buffers won't disappear,so it won't be easy to keep backwards compatibility. ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 16:36:13 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 30 Aug 2012 14:36:13 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346337373.39.0.378356509277.issue15821@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Having been bitten by an indirect buffer bug in 2.7, I decided to write some tests for 3.3. I added an objview() function to _testbuffer module that creates an indirect view for nested tuples. I have not written unit tests yet, so I'll attach a demo script test_indirect.py. I hope this test case will be helpful in figuring out the right semantics for PyMemoryView_FromBuffer(). My feeling is that memoryview should be able to store shape/strides/suboffsets arrays in its own structure. I also think the only way to achieve that is to make it a PyVarObject and allocate up to sizeof(Py_ssize_t)*ndim*3 bytes after the "view" substructure to store copies of shape/strides/suboffsets arrays. ---------- keywords: +patch Added file: http://bugs.python.org/file27059/_testbuffer.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 16:36:35 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 30 Aug 2012 14:36:35 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346337395.49.0.152689290226.issue15821@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file27060/test_indirect.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 16:57:21 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 30 Aug 2012 14:57:21 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346337373.39.0.378356509277.issue15821@psf.upfronthosting.co.za> Message-ID: <20120830145719.GA14110@sleipnir.bytereef.org> Stefan Krah added the comment: PyMemoryViewObject already is a PyVarObject with its own shape, strides and suboffsets. It is the PyManagedBuffer object that directly communicates with exporters. The decision to store *exactly* the buffer that is obtained from the exporter was made in #10181. Your test case seems to pass here. :) Was it supposed to crash? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 17:07:27 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 30 Aug 2012 15:07:27 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346339247.22.0.987714414225.issue15821@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Your test case seems to pass here. :) Was it supposed to crash? No, I worked real hard to make it pass. :-) I think it would crash 2.7 and 3.2, but I have not tried. I also suspect it leaks memory. Do you think this is something that we should include in the test suit. If so, I will probably open a separate issue and transform test_indirect.py into a patch for test_buffer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 17:15:48 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 30 Aug 2012 15:15:48 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346339748.31.0.862619399419.issue15821@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > PyMemoryViewObject already is a PyVarObject with its own shape, > strides and suboffsets. You are right. I was mistakenly looking at 3.2.3 sources. It looks like there are a lot of undocumented changes here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 19:22:37 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 30 Aug 2012 17:22:37 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346333944.53.0.237978097972.issue15821@psf.upfronthosting.co.za> Message-ID: <20120830172237.GA15173@sleipnir.bytereef.org> Stefan Krah added the comment: On second thought, it's impossible to crash a memoryview generated by PyMemoryView_FromBuffer(info) even when info->shape etc. point to stack addresses. The reason is this: All new memoryviews are created through the mbuf_add* API. In the first call to mbuf_add_view(mbuf, NULL) the stack addresses are still valid, and the private shape, strides and suboffsets of the first memoryview that is registered with the managed buffer are initialized correctly. Now PyMemoryView_FromBuffer() returns and the managed buffer itself contains invalid stack addresses. But these are never used again! Chained memoryviews are generated from existing memoryviews, and they are registered with the managed buffer by calling mbuf_add_view(mbuf, existing_view->view). mbuf_add_incomplete_view(mbuf, NULL, ndim) does not access shape, strides and suboffsets. If info->format points to a stack address, it would crash both the old and new implementations. I'd regard such a use of info->format silly. I've never considered this use of PyMemoryView_FromBuffer(info) legitimate, but it works in the new implementation. If we officially endorse this pattern, then info->format should probably also be copied. So the topic is reduced to: 1) Previous: If non-NULL, steal the view.obj reference with automatic decrement in PyBuffer_Release(). New: If non-NULL, treat view.obj as a borrowed reference. 2) Copy info->format? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 19:23:11 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 30 Aug 2012 17:23:11 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346347391.19.0.990537045743.issue15821@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 19:25:55 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 30 Aug 2012 17:25:55 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346347555.69.0.547964105096.issue15821@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file27061/_testbuffer.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 19:30:02 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 30 Aug 2012 17:30:02 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346347802.95.0.585302484332.issue15821@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I've updated test_indirect.py to print all memoryview fields and cleaned up the _testbuffer patch a little. Note this code that is needed to prevent a memory leak: + /* PyMemoryView_FromBuffer ignores info.obj. Add it explicitely. */ + if (view != NULL) + ((PyMemoryViewObject *)view)->view.obj = info.obj; Shouldn't PyMemoryView_FromBuffer() copy non-NULL obj from Py_buffer? ---------- Added file: http://bugs.python.org/file27062/test_indirect.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 19:38:22 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 30 Aug 2012 17:38:22 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <20120830172237.GA15173@sleipnir.bytereef.org> Message-ID: Alexander Belopolsky added the comment: On Thu, Aug 30, 2012 at 1:22 PM, Stefan Krah wrote: > So the topic is reduced to: > > 1) Previous: If non-NULL, steal the view.obj reference with automatic > decrement in PyBuffer_Release(). > New: If non-NULL, treat view.obj as a borrowed reference. > > 2) Copy info->format? +1 to both ideas. ---------- nosy: +Alexander.Belopolsky title: Improve docs for PyMemoryView_FromBuffer() -> Improve docs for PyMemoryView_FromBuffer() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 19:39:36 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 30 Aug 2012 17:39:36 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346348376.63.0.393923697129.issue15821@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file27059/_testbuffer.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 19:39:45 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 30 Aug 2012 17:39:45 +0000 Subject: [docs] [issue15821] Improve docs for PyMemoryView_FromBuffer() In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346348385.54.0.826153755212.issue15821@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file27060/test_indirect.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Aug 30 20:54:59 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 30 Aug 2012 18:54:59 +0000 Subject: [docs] [issue13769] json.dump(ensure_ascii=False) return str instead of unicode In-Reply-To: <1326300079.82.0.279410736545.issue13769@psf.upfronthosting.co.za> Message-ID: <1346352899.53.0.564432879782.issue13769@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Attached yet another patch. It explains what input causes the result to be unicode instead of str. ---------- Added file: http://bugs.python.org/file27064/issue13769_v3.patch _______________________________________ Python tracker _______________________________________ From lpuschnig at gmx.net Mon Aug 20 12:26:15 2012 From: lpuschnig at gmx.net (L P) Date: Mon, 20 Aug 2012 12:26:15 +0200 Subject: [docs] 'print'-syntax error Message-ID: <000001cd7ebe$3b104360$b130ca20$@gmx.net> Dear Community! I have a problem with my python interpreter, as the subject shows, it's about the ,print'-command. It's the following: >>> print "Hello" SyntaxError: invalid syntax After telling me there's an error, it points at the second quote. I've no idea why this happens all the time. I already copied source code from a python ebook, but it still doesn't work. And that error occurs whilst using the GUI and the command line. I'm using Python 3.2 on Windows (64-bit). Please help me out as soon as possible, as I finally want to begin learning python J Thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL: From marcin at python-works.com Wed Aug 22 12:15:13 2012 From: marcin at python-works.com (=?UTF-8?B?TWFyY2luIEt1xbptacWEc2tp?=) Date: Wed, 22 Aug 2012 12:15:13 +0200 Subject: [docs] deque maxlen parameter Message-ID: Hi, In the http://docs.python.org/library/collections.html#collections.deque it is written that the maxlen parameter was added in python2.7, while in python2.6.8 i can provide maxlen parameter to deque. Is this a docbug ? Cheers Marcin Kuzminski -------------- next part -------------- An HTML attachment was scrubbed... URL: From tomasbelusky at gmail.com Thu Aug 23 09:47:11 2012 From: tomasbelusky at gmail.com (=?windows-1250?Q?Tom=E1=9A_Belusk=FD?=) Date: Thu, 23 Aug 2012 09:47:11 +0200 Subject: [docs] UserWarning: cookielib bug! Message-ID: <5035DFFF.2070804@gmail.com> Hi, I found this bug: /usr/local/lib/python2.7/cookielib.py:1584: UserWarning: cookielib bug! Traceback (most recent call last): File "/usr/local/lib/python2.7/cookielib.py", line 1582, in make_cookies parse_ns_headers(ns_hdrs), request) File "/usr/local/lib/python2.7/cookielib.py", line 485, in parse_ns_headers v = http2time(_strip_quotes(v)) # None if invalid File "/usr/local/lib/python2.7/cookielib.py", line 266, in http2time return _str2time(day, mon, yr, hr, min, sec, tz) File "/usr/local/lib/python2.7/cookielib.py", line 176, in _str2time t = _timegm((yr, mon, day, hr, min, sec, tz)) File "/usr/local/lib/python2.7/cookielib.py", line 76, in _timegm return timegm(tt) File "/usr/local/lib/python2.7/calendar.py", line 608, in timegm days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1 ValueError: year is out of range _warn_unhandled_exception() From lagrespan at gmail.com Thu Aug 23 18:30:41 2012 From: lagrespan at gmail.com (Lorenzo Grespan) Date: Thu, 23 Aug 2012 18:30:41 +0200 Subject: [docs] bug in offline documentation (Browser-specific) Message-ID: Hi, I downloaded the offline docs from here (version 3.2.3) http://docs.python.org/py3k/archives/python-3.2.3-docs-html.tar.bz2 unpacked them and opened 'index.html'. I then inserted a search term (I tried 'GIL') and ran 'search'. Google Chrome Version 21.0.1180.79 is stuck at the 'searching...' phase (see screenshot), while Firefox correctly rendered the search results. CPU usage is not increased (there's nothing at 100%) but nothing happens while the 'search' page is stuck. I am currently running Max OSX 10.7.4 on a 2.2 GHz Intel Core 2 Duo, with 2GB ram. -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2012-08-23 at 18.27.33.png Type: image/png Size: 62850 bytes Desc: not available URL: From phlip at mrphlip.com Fri Aug 24 12:22:53 2012 From: phlip at mrphlip.com (Phillip) Date: Fri, 24 Aug 2012 20:22:53 +1000 Subject: [docs] Character Encoding corner case Message-ID: <503755FD.9050008@mrphlip.com> The python.org server seems to be serving this page: http://docs.python.org/library/curses.ascii.html using the "us-ascii" character encoding in the headers... which causes things like the dash in the page title, and the paragraph mark "link to this section" link in the header, to display incorrectly (at least in Firefox and Chrome, the browsers I have available to test it in). It doesn't appear to be happening on any other pages... I think the web server is just guessing the content type based on the filename. -- Phlip -------------- next part -------------- An HTML attachment was scrubbed... URL: From kyle.altendorf at gmail.com Mon Aug 27 01:04:35 2012 From: kyle.altendorf at gmail.com (Kyle Altendorf) Date: Sun, 26 Aug 2012 19:04:35 -0400 Subject: [docs] xdrlib: see also RFC 1832 obsoleted by RFC 4506 Message-ID: On the xdrlib page: http://docs.python.org/library/xdrlib.html in the first 'See Also:' there is reference to RFC 1832 which seems to have been obsoleted by RFC 4506: http://tools.ietf.org/html/rfc4506 Not so much an error, just an opportunity to update/add a reference. Cheers, -kyle From schmiddy at gmail.com Wed Aug 29 02:18:08 2012 From: schmiddy at gmail.com (Josh Kupershmidt) Date: Tue, 28 Aug 2012 17:18:08 -0700 Subject: [docs] multiprocessing documentation of Process.exitcode Message-ID: Hi all, The documentation for the multiprocessing module claims: | Note that the start(), join(), is_alive() and exit_code methods | should only be called by the process that created the process object. Two problems with this description: 1. "exit_code" should be spelled "exitcode" 2. exitcode is an attribute of the Process class, not a method as claimed, since the underlying method is decorated with @property Also, aside from the above documentation issues, if it is true that it's not safe to query the exitcode from a separate process, should the exitcode property method include a check like so: assert self._parent_pid == os.getpid(), 'can only test a child process' since start(), join(), and is_alive() all perform this check? Josh From p.wentworth at ru.ac.za Thu Aug 30 18:37:03 2012 From: p.wentworth at ru.ac.za (Peter Wentworth) Date: Thu, 30 Aug 2012 16:37:03 +0000 Subject: [docs] Python 3 documentation bugs? Message-ID: <935B07BC75162C438B53A35A60B14DC7C8AEF6D3@mail.ict.ru.ac.za> In a number of places we find documentation with optional leading arguments where the meta-notation (square brackets) are in the wrong place. For example, for range, the standard doc heading says range([start], stop [, step]) # The comma after start should be inside the square bracket, not outside. The same error occurs with docs for print, and for slice, for random.randrange and for random.seed, etc, etc. This seems a consistent bug whenever a function or method takes an optional first argument, and it looks like it might have been put there by some tool that generates the docs. I use Python 3 - perhaps there was once a time when one had to supply the comma if one omitted the first argument? In Python 3 it gives errors if one follows the documentation carefully and uses the comma. Thanks Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From slawomir.kuszczynski at gmail.com Thu Aug 30 19:36:04 2012 From: slawomir.kuszczynski at gmail.com (Slawomir Kuszczynski) Date: Thu, 30 Aug 2012 19:36:04 +0200 Subject: [docs] threading Lock - wrong exception name Message-ID: Hi I found a bug in python docs which can be accessed at links: http://docs.python.org/library/threading.html#lock-objects http://docs.python.org/py3k/library/threading.html#lock-objects Bug is in second paragraph describing threading.Lock. I found that statement: "If an attempt is made to release an unlocked lock, a RuntimeErrorwill be raised." Which is not true, name of exception is wrong it should be (and it relay is) ThreadError (from threading module) Could someone fix it? -- Br, Slawomir Kuszczynski -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Thu Aug 30 23:29:19 2012 From: report at bugs.python.org (ThiefMaster) Date: Thu, 30 Aug 2012 21:29:19 +0000 Subject: [docs] [issue15825] Typo in OrderedDict docs Message-ID: <1346362159.24.0.0813127284667.issue15825@psf.upfronthosting.co.za> New submission from ThiefMaster: "It is also straight-forward to create an ordered dictionary variant that the remembers the order the keys were last inserted." The first "the" doesn't belong there. ---------- assignee: docs at python components: Documentation messages: 169493 nosy: ThiefMaster, docs at python priority: normal severity: normal status: open title: Typo in OrderedDict docs versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 11:50:28 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 31 Aug 2012 09:50:28 +0000 Subject: [docs] [issue15825] Typo in OrderedDict docs In-Reply-To: <1346362159.24.0.0813127284667.issue15825@psf.upfronthosting.co.za> Message-ID: <1346406628.6.0.634192147833.issue15825@psf.upfronthosting.co.za> Mike Hoy added the comment: I added two patches one for 2.7 and one for 3.3. Please advise if this is the correct way to handle this. ---------- keywords: +patch nosy: +mikehoy Added file: http://bugs.python.org/file27068/typo-ordered-dict2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 11:50:38 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 31 Aug 2012 09:50:38 +0000 Subject: [docs] [issue15825] Typo in OrderedDict docs In-Reply-To: <1346362159.24.0.0813127284667.issue15825@psf.upfronthosting.co.za> Message-ID: <1346406638.47.0.186347651721.issue15825@psf.upfronthosting.co.za> Changes by Mike Hoy : Added file: http://bugs.python.org/file27069/typo-ordered-dict3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 11:56:27 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 31 Aug 2012 09:56:27 +0000 Subject: [docs] [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1346406987.2.0.500309260668.issue15829@psf.upfronthosting.co.za> Mike Hoy added the comment: Working on a patch now unless there are objections to the OP. ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 12:22:41 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 31 Aug 2012 10:22:41 +0000 Subject: [docs] [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1346408561.03.0.817304013462.issue15829@psf.upfronthosting.co.za> Andrew Svetlov added the comment: The problem is: threading.Lock raises ThreadingError (which is subclass of RuntimeError for 3.3 but not for 3.2), but threading.Condition raises RuntimeError for the same reason. RLock behavior is even worse: it raises ThreadingError if C accelerator is available in _thread and RuntimeError otherwise. I think RuntimeError should be replaced by ThreadingError for _RLock and Condition implementations as well as docs need to be updated. Also I think this patch should be applied to 3.4 only, it is enchacement, not bugfix. About fixing docs for 2.7-3.3: I see nothing wrong if current inconsistency will be documented, perhaps as *warning* or *note* block. ---------- components: +Library (Lib) nosy: +asvetlov type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 12:27:20 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 31 Aug 2012 10:27:20 +0000 Subject: [docs] [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1346408840.38.0.868142689115.issue15829@psf.upfronthosting.co.za> Mike Hoy added the comment: >>I think RuntimeError should be replaced by ThreadingError for _RLock >>and Condition implementations as well as docs need to be updated. >> >>Also I think this patch should be applied to 3.4 only, it is >>enchacement, not bugfix. >>About fixing docs for 2.7-3.3: I see nothing wrong if current >>inconsistency will be documented, perhaps as *warning* or *note* block. I should warn that ThreadError or `ThreadError` has no link. I've tried to find a place in the docs I could link to but haven't yet. `ValueError` does have a link. ---------- type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 12:27:21 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 31 Aug 2012 10:27:21 +0000 Subject: [docs] [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1346408841.8.0.901324625564.issue15829@psf.upfronthosting.co.za> Mike Hoy added the comment: >>I think RuntimeError should be replaced by ThreadingError for _RLock >>and Condition implementations as well as docs need to be updated. >> >>Also I think this patch should be applied to 3.4 only, it is >>enchacement, not bugfix. >>About fixing docs for 2.7-3.3: I see nothing wrong if current >>inconsistency will be documented, perhaps as *warning* or *note* block. I should warn that ThreadError or `ThreadError` has no link. I've tried to find a place in the docs I could link to but haven't yet. `ValueError` does have a link. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 12:32:49 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 31 Aug 2012 10:32:49 +0000 Subject: [docs] [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1346409169.45.0.475498358756.issue15829@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- Removed message: http://bugs.python.org/msg169518 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 12:38:47 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 31 Aug 2012 10:38:47 +0000 Subject: [docs] [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1346409527.52.0.397382695898.issue15829@psf.upfronthosting.co.za> Andrew Svetlov added the comment: ValueError can be referenced by :exc:`ValueError`. For ThreadError you can add section for describing this exception type like: .. exception:: ThreadError Raised when lock object cannot be acquired or released. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 12:55:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 31 Aug 2012 10:55:37 +0000 Subject: [docs] [issue15825] Typo in OrderedDict docs In-Reply-To: <1346362159.24.0.0813127284667.issue15825@psf.upfronthosting.co.za> Message-ID: <3X7ctH6pRhzQC7@mail.python.org> Roundup Robot added the comment: New changeset 69952b5599b5 by Andrew Svetlov in branch '2.7': Issue #15825: fix typo in OrderedDict docs. http://hg.python.org/cpython/rev/69952b5599b5 New changeset 8877d25119ef by Andrew Svetlov in branch '3.2': Issue #15825: fix typo in OrderedDict docs. http://hg.python.org/cpython/rev/8877d25119ef New changeset ef80ce83eab1 by Andrew Svetlov in branch 'default': Issue #15825: fix typo in OrderedDict docs. http://hg.python.org/cpython/rev/ef80ce83eab1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 12:59:00 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 31 Aug 2012 10:59:00 +0000 Subject: [docs] [issue15825] Typo in OrderedDict docs In-Reply-To: <1346362159.24.0.0813127284667.issue15825@psf.upfronthosting.co.za> Message-ID: <1346410740.38.0.958599675626.issue15825@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks. ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 13:36:20 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 31 Aug 2012 11:36:20 +0000 Subject: [docs] [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1346412980.59.0.43211348227.issue15829@psf.upfronthosting.co.za> Mike Hoy added the comment: I discussed this in IRC and got the following information from Ezio: < Taggnostr> the doc fix can go in 2.7/3.3, the code fix in 3.4 Plan is to put the definition for ThreadError in threading.rst for both 2.7 and 3.3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 13:39:52 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 31 Aug 2012 11:39:52 +0000 Subject: [docs] [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1346413192.06.0.686502536716.issue15829@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Sounds good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 14:22:46 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 31 Aug 2012 12:22:46 +0000 Subject: [docs] [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1346415766.46.0.260508673365.issue15829@psf.upfronthosting.co.za> Mike Hoy added the comment: 3.3 patch ---------- keywords: +patch Added file: http://bugs.python.org/file27071/15829-thread-errror3.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 14:23:14 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 31 Aug 2012 12:23:14 +0000 Subject: [docs] [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1346415794.67.0.668968658251.issue15829@psf.upfronthosting.co.za> Mike Hoy added the comment: 2.7 patch. ---------- Added file: http://bugs.python.org/file27072/15829-thread-errror2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 15:07:31 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 31 Aug 2012 13:07:31 +0000 Subject: [docs] [issue15829] Threading Lock - Wrong Exception Name In-Reply-To: <1346406935.1.0.0548021295601.issue15829@psf.upfronthosting.co.za> Message-ID: <1346418450.9.0.854605068097.issue15829@psf.upfronthosting.co.za> R. David Murray added the comment: Please see Issue 14502. The docs probably do need clarification, but it must be done carefully. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 15:20:16 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 31 Aug 2012 13:20:16 +0000 Subject: [docs] [issue14502] Document better what happens on releasing an unacquired lock In-Reply-To: <1333609616.9.0.633115743228.issue14502@psf.upfronthosting.co.za> Message-ID: <1346419216.62.0.867758654625.issue14502@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Fri Aug 31 16:37:43 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 31 Aug 2012 16:37:43 +0200 Subject: [docs] 'print'-syntax error In-Reply-To: <000001cd7ebe$3b104360$b130ca20$@gmx.net> References: <000001cd7ebe$3b104360$b130ca20$@gmx.net> Message-ID: Hello, On Mon, Aug 20, 2012 at 12:26 PM, L P wrote: >>>> print "Hello" > SyntaxError: invalid syntax > > I?ve no idea why this happens all the time. I already copied source code > from a python ebook, but it still doesn?t work. > > And that error occurs whilst using the GUI and the command line. > > I?m using Python 3.2 on Windows (64-bit). The problem is that the code you're reading is meant for Python 2 while you're using Python 3 as interpreter. A lot has changed between Python 2 and 3 and the language has some incompatibilities (in this case, 'print' is no longer a statement but has become a function: http://docs.python.org/py3k/whatsnew/3.0.html#print-is-a-function ). I suggest to use the same interpreter the book suggest (or use Python 2.7 nonetheless) and refer to a general purpose mailing list for additional support, such as: http://mail.python.org/mailman/listinfo/python-list Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Fri Aug 31 16:39:06 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 31 Aug 2012 16:39:06 +0200 Subject: [docs] UserWarning: cookielib bug! In-Reply-To: <5035DFFF.2070804@gmail.com> References: <5035DFFF.2070804@gmail.com> Message-ID: Hello Tom??, please report bugs to http://bugs.python.org/ or seek additional guidance on: http://mail.python.org/mailman/listinfo/python-list Regards, Sandro On Thu, Aug 23, 2012 at 9:47 AM, Tom?? Belusk? wrote: > Hi, I found this bug: > > /usr/local/lib/python2.7/cookielib.py:1584: UserWarning: cookielib bug! > Traceback (most recent call last): > File "/usr/local/lib/python2.7/cookielib.py", line 1582, in make_cookies > parse_ns_headers(ns_hdrs), request) > File "/usr/local/lib/python2.7/cookielib.py", line 485, in > parse_ns_headers > v = http2time(_strip_quotes(v)) # None if invalid > File "/usr/local/lib/python2.7/cookielib.py", line 266, in http2time > return _str2time(day, mon, yr, hr, min, sec, tz) > File "/usr/local/lib/python2.7/cookielib.py", line 176, in _str2time > t = _timegm((yr, mon, day, hr, min, sec, tz)) > File "/usr/local/lib/python2.7/cookielib.py", line 76, in _timegm > return timegm(tt) > File "/usr/local/lib/python2.7/calendar.py", line 608, in timegm > days = datetime.date(year, month, 1).toordinal() - _EPOCH_ORD + day - 1 > ValueError: year is out of range > > _warn_unhandled_exception() > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Fri Aug 31 16:41:14 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 31 Aug 2012 16:41:14 +0200 Subject: [docs] Character Encoding corner case In-Reply-To: <503755FD.9050008@mrphlip.com> References: <503755FD.9050008@mrphlip.com> Message-ID: Hello Phillip, I'm adding in the loop the -www group, which might give some help on the problem. Regards, Sandro On Fri, Aug 24, 2012 at 12:22 PM, Phillip wrote: > The python.org server seems to be serving this page: > http://docs.python.org/library/curses.ascii.html > using the "us-ascii" character encoding in the headers... which causes > things like the dash in the page title, and the paragraph mark "link to this > section" link in the header, to display incorrectly (at least in Firefox and > Chrome, the browsers I have available to test it in). > > It doesn't appear to be happening on any other pages... I think the web > server is just guessing the content type based on the filename. > > -- > Phlip > > > > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Fri Aug 31 17:57:14 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 31 Aug 2012 15:57:14 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs Message-ID: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> New submission from Chris Jerdonek: >From docs at python.org: """ In a number of places we find documentation with optional leading arguments where the meta-notation (square brackets) are in the wrong place. For example, for range, the standard doc heading says range([start], stop [, step]) # The comma after start should be inside the square bracket, not outside. The same error occurs with docs for print, and for slice, for random.randrange and for random.seed, etc, etc. This seems a consistent bug whenever a function or method takes an optional first argument, and it looks like it might have been put there by some tool that generates the docs. I use Python 3 - perhaps there was once a time when one had to supply the comma if one omitted the first argument? In Python 3 it gives errors if one follows the documentation carefully and uses the comma. """" (or see http://mail.python.org/pipermail/docs/2012-August/010051.html ) ---------- assignee: docs at python components: Documentation messages: 169547 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: comma after leading optional argument is after bracket in docs type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 17:58:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 31 Aug 2012 15:58:22 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346428702.83.0.761060282113.issue15831@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From chris.jerdonek at gmail.com Fri Aug 31 18:01:55 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Fri, 31 Aug 2012 09:01:55 -0700 Subject: [docs] comma after leading optional argument Message-ID: Date: Thu, 30 Aug 2012 16:37:03 +0000 From: Peter Wentworth Subject: [docs] Python 3 documentation bugs? > In a number of places we find documentation with optional leading arguments where the meta-notation (square brackets) are in the wrong place. For example, for range, the standard doc heading says > > range([start], stop [, step]) # The comma after start should be inside the square bracket, not outside. Thanks for the report. I filed an issue to track this here: http://bugs.python.org/issue15831 --Chris From sandro.tosi at gmail.com Fri Aug 31 18:02:43 2012 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Fri, 31 Aug 2012 18:02:43 +0200 Subject: [docs] Python 3 documentation bugs? In-Reply-To: <935B07BC75162C438B53A35A60B14DC7C8AEF6D3@mail.ict.ru.ac.za> References: <935B07BC75162C438B53A35A60B14DC7C8AEF6D3@mail.ict.ru.ac.za> Message-ID: Hello Peter, this has been reported at http://bugs.python.org/issue15831 . Regards, Sandro On Thu, Aug 30, 2012 at 6:37 PM, Peter Wentworth wrote: > In a number of places we find documentation with optional leading arguments > where the meta-notation (square brackets) are in the wrong place. For > example, for range, the standard doc heading says > > > > range([start], stop [, step]) # The comma after start should be > inside the square bracket, not outside. > > > > The same error occurs with docs for print, and for slice, for > random.randrange and for random.seed, etc, etc. This seems a consistent > bug whenever a function or method takes an optional first argument, and it > looks like it might have been put there by some tool that generates the > docs. > > > > I use Python 3 ? perhaps there was once a time when one had to supply the > comma if one omitted the first argument? In Python 3 it gives errors if > one follows the documentation carefully and uses the comma. > > > > Thanks > > Peter > > > > > > > > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Fri Aug 31 18:07:38 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 31 Aug 2012 16:07:38 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346429258.82.0.128215684247.issue15831@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 18:11:43 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 31 Aug 2012 16:11:43 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346429503.02.0.0665891998383.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Do we know that this is easy? It might be a Sphinx issue, in which case it might not be as trivial as fixing typos. I ask because the reST file looks correct (for range() for example): .. function:: range([start,] stop[, step]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 18:15:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 31 Aug 2012 16:15:35 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346429735.63.0.54571532091.issue15831@psf.upfronthosting.co.za> Ezio Melotti added the comment: I thought that was just a matter of finding the wrong commas and fixing them, but if they are correct in the source, then the situation might be a bit more complicated. Does this happen only with "unusual" signatures like range([start], stop [, step])? FWIW this could be replaced with: range(stop) range(start, stop [, step]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 18:21:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 31 Aug 2012 16:21:27 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346430087.78.0.934901183614.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This is what my search for ",] " gave me (though the OP's print and random.seed do not show up in this list): library/curses.rst 380:.. function:: newwin([nlines, ncols,] begin_y, begin_x) 659:.. method:: window.addch([y, x,] ch[, attr]) 673:.. method:: window.addnstr([y, x,] str, n[, attr]) 679:.. method:: window.addstr([y, x,] str[, attr]) 766:.. method:: window.chgat([y, x, ] [num,] attr) 815:.. method:: window.derwin([nlines, ncols,] begin_y, begin_x) 909:.. method:: window.hline([y, x,] ch, n) 943:.. method:: window.insch([y, x,] ch[, attr]) 964:.. method:: window.insnstr([y, x,] str, n [, attr]) 1156:.. method:: window.subpad([nlines, ncols,] begin_y, begin_x) 1162:.. method:: window.subwin([nlines, ncols,] begin_y, begin_x) 1219:.. method:: window.vline([y, x,] ch, n) library/functions.rst 1064:.. function:: range([start,] stop[, step]) 1129:.. function:: slice([start,] stop[, step]) library/itertools.rst 55::func:`islice` seq, [start,] stop [, step] elements from seq[start:stop:step] ``islice('ABCDEFG', 2, None) --> C D E F G`` 404:.. function:: islice(iterable, [start,] stop [, step]) library/random.rst 96:.. function:: randrange([start,] stop[, step]) library/syslog.rst 20:.. function:: syslog([priority,] message) library/tkinter.tix.rst 507:.. method:: tixCommand.tix_configure([cnf,] **kw) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 18:32:15 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 31 Aug 2012 16:32:15 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346430734.97.0.258107167982.issue15831@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Yes, it looks like Sphinx problem. About having tho signatures for single function/method. Does Sphinx support it for *.. function::*? Pointing to anchor for first signature with adding second one somewhere in paragraph text doesn't look good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 18:45:26 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 31 Aug 2012 16:45:26 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346431525.79.0.524145521416.issue15831@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Does Sphinx support it for *.. function::*? I'm pretty sure it does for methods, so I don't see why it shouldn't work for functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 18:48:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 31 Aug 2012 16:48:40 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346431720.72.0.789541749884.issue15831@psf.upfronthosting.co.za> Andrew Svetlov added the comment: No, methods for *curses* are also corrupted. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 18:50:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 31 Aug 2012 16:50:19 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346431819.12.0.829538147235.issue15831@psf.upfronthosting.co.za> Ezio Melotti added the comment: > This is what my search for ",] " gave me It would be fine with me to use a double signature for these. Georg, do you have any opinion? (The double signature might be easier to understand, but the original issue should probably be fixed in Sphinx, even if we decide to stop using this kind of signature.) ---------- nosy: +eric.araujo, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 18:51:26 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 31 Aug 2012 16:51:26 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346431886.9.0.992564012318.issue15831@psf.upfronthosting.co.za> Ezio Melotti added the comment: > No, methods for *curses* are also corrupted. I meant the double signature support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 18:57:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 31 Aug 2012 16:57:03 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346432223.66.0.153552875681.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > It would be fine with me to use a double signature for these. Just an FYI that more than two signatures would be needed for cases like this: 766:.. method:: window.chgat([y, x, ] [num,] attr) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 18:59:32 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 31 Aug 2012 16:59:32 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346432372.9.0.206678793276.issue15831@psf.upfronthosting.co.za> Ezio Melotti added the comment: > 766:.. method:: window.chgat([y, x, ] [num,] attr) What's this even supposed to mean? See also #14783. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 19:04:33 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 31 Aug 2012 17:04:33 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346432672.97.0.287727319371.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > What's this even supposed to mean? I started wondering the same thing after I posted. :) I guess my point/question is: are there any cases where more than two signatures would be needed to account for all of the possibilities? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 19:09:36 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 31 Aug 2012 17:09:36 +0000 Subject: [docs] [issue14783] Update int() docstring from manual In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1346432976.22.0.877625171433.issue14783@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1! This notation helps clearing up how int, str and other constructors work. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 19:11:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 31 Aug 2012 17:11:22 +0000 Subject: [docs] [issue15831] comma after leading optional argument is after bracket in docs In-Reply-To: <1346428634.66.0.0584130722662.issue15831@psf.upfronthosting.co.za> Message-ID: <1346433082.54.0.134722603479.issue15831@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think/hope that all the APIs we have in the stdlib are sane enough to have no more than 2-3 signatures (I'm not counting optional args (at the end) here). If that's not the case we should still be able to add as many signature as we need (I don't know if Sphinx has some limit about it though). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 19:59:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 31 Aug 2012 17:59:35 +0000 Subject: [docs] [issue14783] Update int() docstring from manual In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1346435975.84.0.663944158942.issue14783@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a patch for the signature. ---------- assignee: -> ezio.melotti keywords: +patch stage: needs patch -> commit review Added file: http://bugs.python.org/file27075/issue14783.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 20:34:43 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 31 Aug 2012 18:34:43 +0000 Subject: [docs] [issue15821] PyMemoryView_FromBuffer() behavior change (possible regression) In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346438083.63.0.144847991141.issue15821@psf.upfronthosting.co.za> Stefan Krah added the comment: Alexander, your test case is brilliant and could eventually go into _testbuffer.c, but I'd prefer a simpler test case for now. :) Here's a patch that restores the info.obj cleanup facility. I intentionally did not add copying the format in order to keep the diff small (in case this can go into rc2). Crashing on stack addresses for format is not a regression. Apparently PyMemoryView_FromBuffer() is used for low level tinkering and automatic cleanup, so I now think that it's better not to break backwards compatibility, i.e. leave the value of info.obj untouched. Otherwise people using the cleanup facility will have reference leaks. However, I don't like the interface at all: Passing a pointer to a struct and then relying on the fact that *some* values are copied (shape, strides and suboffsets) but not others (format, buf) is counterintuitive. With the ManagedBuffer, we could now write a new function that returns a memoryview with much nicer cleanup facilities. But that doesn't help here since we're stuck with this function for 3.3.0. What do you think? Should this go into 3.3.0? The changes to memoryobject.c are minimal, the rest are tests and docs. ---------- assignee: docs at python -> skrah components: +Interpreter Core -Documentation stage: -> patch review title: Improve docs for PyMemoryView_FromBuffer() -> PyMemoryView_FromBuffer() behavior change (possible regression) type: enhancement -> behavior Added file: http://bugs.python.org/file27076/issue15821.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 20:54:19 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 31 Aug 2012 18:54:19 +0000 Subject: [docs] [issue15821] PyMemoryView_FromBuffer() behavior change (possible regression) In-Reply-To: <1346438083.63.0.144847991141.issue15821@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Aug 31, 2012 at 2:34 PM, Stefan Krah wrote: > With the ManagedBuffer, we could now write a new function that returns > a memoryview with much nicer cleanup facilities. But that doesn't help > here since we're stuck with this function for 3.3.0. > > > What do you think? Should this go into 3.3.0? I am still getting up to speed with all the changes that went in since 3.2. I'll review your patch over the weekend. Meanwhile, I think the goal should be that after PyMemoryview_FromBuffer(info) is called, it should be OK to discard info by calling PyBuffer_Release() and if info is not allocated on the stack, Py_DECREF(info). I think we are almost there achieving that goal with possible exception of dynamically or stack-allocated fmt strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 21:12:12 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 31 Aug 2012 19:12:12 +0000 Subject: [docs] [issue15821] PyMemoryView_FromBuffer() behavior change (possible regression) In-Reply-To: Message-ID: <20120831191212.GA2642@sleipnir.bytereef.org> Stefan Krah added the comment: Alexander Belopolsky wrote: > I am still getting up to speed with all the changes that went in since > 3.2. I'll review your patch over the weekend. Meanwhile, I think the > goal should be that after PyMemoryview_FromBuffer(info) is called, it > should be OK to discard info by calling PyBuffer_Release() Now I'm puzzled: I thought your goal was to preserve the implicit cleanup from 3.2, i.e. PyBuffer_Release() is called when the managed buffer is deallocated. Without the patch it's OK to call PyBuffer_Release(info) after PyMemoryview_FromBuffer(info). With the patch you can't call PyBuffer_Release(info), since it's done automatically already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 21:36:40 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 31 Aug 2012 19:36:40 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1346441800.65.0.307269749453.issue14783@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The large issue is documenting complex signatures that do not really fit in any of the standard one-line patterns. I was initially puzzled by Raymond describing the 3.3 line as 'confusing', but putting on 'newbie glasses' I see now that correctly parsing int([number | string[, base]]) requires knowing that '[, option]' binds tighter than '|'. Since ',' normally has the lowest binding priority, someone who does not know the signature already (ie, a target audience member) could parse it as int([ (number | string) [, base]]) rather than as intended: int([number | (string[, base]) ]) So I agree that the two stacked lines in the doc patch are clearer. However, this issue is about the docstring. Leave it incorrect? Change it to the hard-to-parse one liner? Change it to a two-line signature also? I noticed this issue while working on IDLE tooltips, using int as a test case. They currently use only the first line of the docstring, but I have decided that they should get more when needed for C functions. (For Python functions, tooltips use inspect for the actual signature and the first docstring line only for a description.) The first line of the str docstring is also incorrect in that the optional parameters are only valid for first arguments that are strings. str(string[, encoding[, errors]]) -> str It needs either a '|' construction like int or another line: str(object) I prefer the latter. I revised the title to add str.__doc__ to the issue. While we are at it, how about range(stop) range(start, stop, [step]) instead of the current doc and docstring signature range([start,] stop[, step]) ? The current docstring is inaccurate and confusing to some. (How can there be an optional first arg and required second ? -- Answer: there can't.) The technically accurate signature is range(start_or_stop[, stop[, step]]) but that has been rejected as confusing. The bytes and bytearrays docstrings have 5 signature lines!. (The manual gives just one which does not quite cover all cases.) So (a) there is precedent for multiple signatures in docstrings and (b) tooltips already need to grab multiple signature lines. So I think int and str (and maybe range) should use a couple of clear lines. If the new inspect.signature function were to give signatures for C functions, there would be no problem for tooltips, but it does not. (Can signature objects even handle multiple (or type-dependent) signatures?) ---------- nosy: +georg.brandl title: Update int() docstring from manual -> Make int() and str() docstrings correct _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 22:40:46 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 31 Aug 2012 20:40:46 +0000 Subject: [docs] [issue15821] PyMemoryView_FromBuffer() behavior change (possible regression) In-Reply-To: <20120831191212.GA2642@sleipnir.bytereef.org> Message-ID: Alexander Belopolsky added the comment: On Fri, Aug 31, 2012 at 3:12 PM, Stefan Krah wrote: > Now I'm puzzled: I thought your goal was to preserve the implicit cleanup > from 3.2, i.e. PyBuffer_Release() is called when the managed buffer is > deallocated. > The issue that I raised in msg169472 above was that PyMemoryView_FromBuffer() would not copy .obj from Py_buffer structure to the memoryview. A related issue is that it looks like PyObject_GetBuffer() often does not fill .obj either. I would expect that PyObject_GetBuffer() would always store a new reference in .obj to assure that the .buf pointer remains valid until PyBuffer_Release() is called explicitly. (I am ignoring the issue of mutable objects such as lists for the moment.) PyMemoryView_FromBuffer() in turn should store an additional reference in its own private copy of Py_buffer structure. After PyMemoryView_FromBuffer() returns a well-behaved program should call PyBuffer_Release() releasing the first reference and the second reference should be released in memoryview destructor. Am I missing something? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Aug 31 23:06:10 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 31 Aug 2012 21:06:10 +0000 Subject: [docs] [issue15821] PyMemoryView_FromBuffer() behavior change (possible regression) In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346447170.51.0.944082632726.issue15821@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Here is what I think the test case should look like (untested): static PyObject * memoryview_from_buffer_cleanup(PyObject *self, PyObject *noargs) { PyObject *b, *view = NULL; Py_buffer info; Py_ssize_t shape[3] = {2, 2, 3}; Py_ssize_t strides[3] = {6, 3, 1}; const char *cp = "abcdefghijkl"; b = PyBytes_FromString(cp); if (b == NULL) return NULL; if (PyObject_GetBuffer(b, &info, PyBUF_FULL_RO) < 0) goto done; /* reshape */ info.ndim = 3; info.shape = shape; info.strides = strides; view = PyMemoryView_FromBuffer(&info); /* release resources allocated for Py_buffer struct before it goes out of scope */ PyBuffer_Release(&info); done: Py_DECREF(b); return view; } ---------- _______________________________________ Python tracker _______________________________________ From userhuge at gmail.com Fri Aug 31 13:34:26 2012 From: userhuge at gmail.com (Martin Vlach) Date: Fri, 31 Aug 2012 13:34:26 +0200 Subject: [docs] Description of str.replace Message-ID: <5040A142.3010502@gmail.com> is ambiguous. I described the problem here: http://diigo.com/0snx7 Regards Huge From martin at v.loewis.de Fri Aug 31 17:15:21 2012 From: martin at v.loewis.de (=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=) Date: Fri, 31 Aug 2012 17:15:21 +0200 Subject: [docs] [pydotorg-www] Character Encoding corner case In-Reply-To: References: <503755FD.9050008@mrphlip.com> Message-ID: <5040D509.6030702@v.loewis.de> Am 31.08.12 16:41, schrieb Sandro Tosi: > Hello Phillip, > I'm adding in the loop the -www group, which might give some help on > the problem. > > Regards, > Sandro > > On Fri, Aug 24, 2012 at 12:22 PM, Phillip wrote: >> The python.org server seems to be serving this page: >> http://docs.python.org/library/curses.ascii.html >> using the "us-ascii" character encoding in the headers... which causes >> things like the dash in the page title, and the paragraph mark "link to this >> section" link in the header, to display incorrectly (at least in Firefox and >> Chrome, the browsers I have available to test it in). >> >> It doesn't appear to be happening on any other pages... I think the web >> server is just guessing the content type based on the filename. You are exactly right; I have now added AddCharset utf-8 .ascii to the docs config. Thanks for pointing that out. Perhaps this entire content negotiation should be disabled. Regards, Martin