From report at bugs.python.org Sat Sep 1 06:31:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Sep 2012 04:31:52 +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: <3X84K3355hzQNR@mail.python.org> Roundup Robot added the comment: New changeset a1884b3027c5 by Petri Lehtinen in branch '2.7': #13769: Enhance docs for ensure_ascii semantics in JSON decoding functions http://hg.python.org/cpython/rev/a1884b3027c5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 06:32:58 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Sat, 01 Sep 2012 04:32:58 +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: <1346473978.41.0.734001408202.issue13769@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Fixed, thanks. ---------- keywords: -needs review resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 09:33:42 2012 From: report at bugs.python.org (Stefan Krah) Date: Sat, 01 Sep 2012 07:33:42 +0000 Subject: [docs] [issue15821] PyMemoryView_FromBuffer() behavior change (possible regression) In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1346484822.06.0.174708413595.issue15821@psf.upfronthosting.co.za> Stefan Krah added the comment: In general, the number of calls to PyObject_GetBuffer() must be equal to the number of calls to PyBuffer_Release(), otherwise bad things will happen in the same way as with malloc()/free(). Now, in my test case I omitted the call to PyObject_GetBuffer() *with* the internal knowledge that in the case of the bytes object it does not matter: The releasebufferproc is NULL, so PyBuffer_Release() is just a way of decrementing the reference count of the bytes object. No matter how you turn it, if info.obj != NULL you need some internal knowledge what the obj's releasebufferproc will do. For example, I suspect that many existing releasebufferprocs do not account for the fact that a consumer may change shape, strides and suboffsets. So you need to know the exporter really well. My strategy here is this: I want to keep backwards compatibility for PyMemoryView_FromBuffer(), which I think should be deprecated at some point. A proper function that returns a memoryview with automatic cleanup would not involve getbuffer/releasebuffer at all and could look like this: Flags: ------ PyManagedBuffer_FreeBuf PyManagedBuffer_FreeFormat PyManagedBuffer_FreeArrays // shape, strides, suboffsets PyMemoryView_FromBufferWithCleanup(info, flags) { /* info should never have been obtained by a call to PyObject_GetBuffer(). Hence it should never be released. */ assert(info.obj == NULL); /* buf, format, shape, strides and suboffsets MUST stay valid for the lifetime of the returned memoryview. Usually they will be dynamically allocated using PyMem_Malloc(). This is no problem, since there is automatic cleanup in mbuf_dealloc(). */ mbuf = mbuf_alloc(); mbuf->master = *info; mbuf->flags |= flags; ... return new memoryview } mbuf_dealloc(self) { if (self->flags&PyManagedBuffer_FreeBuf) PyMem_Free(self->master.buf); ... } This is much more flexible than the existing function and does not suffer from any abuse of getbuffer/releasebuffer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 11:30:08 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 01 Sep 2012 09:30:08 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1346491808.25.0.798760306297.issue14783@psf.upfronthosting.co.za> Ezio Melotti added the comment: The issues about "weird" signatures are being discussed on #15831. > 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? For the docstring it's ok to use the double signature too. The description, while not too comprehensive, is understandable. The description of int() in the docs is instead a bit complicated. The content is good, but IMHO it would be more understandable if it was broken down into paragraphs or into a list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 11:37:35 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Sat, 01 Sep 2012 09:37:35 +0000 Subject: [docs] [issue14042] json.dumps() documentation is slightly incorrect. In-Reply-To: <1329494870.59.0.571991231564.issue14042@psf.upfronthosting.co.za> Message-ID: <1346492255.01.0.17055199822.issue14042@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Fixed, see #13769. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 19:07:05 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 01 Sep 2012 17:07:05 +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: <1346519225.52.0.108048199781.issue15831@psf.upfronthosting.co.za> Georg Brandl added the comment: +1 for multiple signatures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 19:30:04 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 01 Sep 2012 17:30:04 +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: <1346520604.51.0.00250882834378.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > (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.) I filed an issue for this in the Sphinx tracker here: https://bitbucket.org/birkenfeld/sphinx/issue/1001/comma-after-leading-optional-argument-in ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 19:37:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 01 Sep 2012 17:37:54 +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: <1346521074.72.0.74246496138.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I will prepare a patch (multiple signatures, for the Python fix). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 20:33:44 2012 From: report at bugs.python.org (Alexander Konovalenko) Date: Sat, 01 Sep 2012 18:33:44 +0000 Subject: [docs] [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance Message-ID: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> New submission from Alexander Konovalenko: Two pieces of the documentation for io.IOBase seem to contradict each other: At http://docs.python.org/library/io.html#io.IOBase: "Note that calling any method (even inquiries) on a closed stream is undefined. Implementations may raise IOError in this case." At http://docs.python.org/library/io.html#io.IOBase.close: "Once the file is closed, any operation on the file (e.g. reading or writing) will raise a ValueError." Perhaps the confusion arises in part because it is not clear when a requirement for all IOBase implementations is documented and when the docs merely describe the default behavior of IOBase that implementations are free to override. Those passages are inconsistent on two points: 1) IOError and ValueError are not subclasses one of another. So what should we expect an IOBase implementation to raise? 2) Undefined behavior means literally anything can happen. Technically, that means calling read() or readable() on a closed file (or other kind of stream) could wreak havoc in a totally unrelated part of the system or segfault the Python interpreter. That is definitely a thing to carefully avoid in any production systems. On the other hand, raising an exception, even if we don't know in advance whether it will be ValueError or IOError, is pretty much defined behavior. An exception is easy to deal with and to contain inside a module. So please clarify how dangerous it actually is to access an IOBase stream after it has been closed. ---------- assignee: docs at python components: Documentation messages: 169660 nosy: alexkon, docs at python priority: normal severity: normal status: open title: Ambiguity with regard to the effect of accessing a closed IOBase instance versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 21:13:59 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Sep 2012 19:13:59 +0000 Subject: [docs] [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance In-Reply-To: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> Message-ID: <1346526839.49.0.306349459602.issue15840@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > 1) IOError and ValueError are not subclasses one of another. So what > should we expect an IOBase implementation to raise? Ideally, ValueError should be raised, but I suspect some methods raise IOError instead. > Undefined behavior means literally anything can happen. In practice, it will either raise an error, or be ignored. For example, calling close() a second time would be ignored. Calling readable() may return the original value (before the file was closed), etc. Any non-trivial behaviour should be reported as a bug, though. Especially, reading or writing methods (read(), write(), readline() etc.) should *never* succeed on a closed file. ---------- components: +IO nosy: +pitrou stage: -> needs patch versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 21:16:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Sep 2012 19:16:54 +0000 Subject: [docs] [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance In-Reply-To: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> Message-ID: <1346527014.03.0.308506233513.issue15840@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, I would suggest we standardize the docs on raising ValueError as the official behaviour, and fix non-compliant behaviours as bugs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 21:19:09 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Sep 2012 19:19:09 +0000 Subject: [docs] [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance In-Reply-To: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> Message-ID: <1346527149.38.0.558821342626.issue15840@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson, hynek, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 1 21:20:25 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Sep 2012 19:20:25 +0000 Subject: [docs] [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance In-Reply-To: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> Message-ID: <1346527225.83.0.304537561064.issue15840@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Related: issue15841 and issue15842. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 2 00:13:31 2012 From: report at bugs.python.org (Chris Rebert) Date: Sat, 01 Sep 2012 22:13:31 +0000 Subject: [docs] [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1346537611.49.0.204715384193.issue14570@psf.upfronthosting.co.za> Changes by Chris Rebert : Added file: http://bugs.python.org/file27090/json.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 2 00:20:19 2012 From: report at bugs.python.org (Chris Rebert) Date: Sat, 01 Sep 2012 22:20:19 +0000 Subject: [docs] [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1346538019.38.0.968316026329.issue14570@psf.upfronthosting.co.za> Chris Rebert added the comment: Attached updated patches. ---------- Added file: http://bugs.python.org/file27091/json_init.patch _______________________________________ Python tracker _______________________________________ From mike2little at gmail.com Sun Sep 2 01:08:47 2012 From: mike2little at gmail.com (Mike Little) Date: Sat, 1 Sep 2012 19:08:47 -0400 Subject: [docs] Possible typo in py3k glossary for the term "statement" Message-ID: Hi, I'm studying the Python 3.2.3 documentation, and find it to be quite well written. Just one thing I noticed after multiple readings of the Glossary page, http://docs.python.org/py3k/glossary.html: In the entry for the term "statement", http://docs.python.org/py3k/glossary.html#term-statement, it says: = = = statement A statement is part of a suite (a ?block? of code). A statement is either an expression or a one of several constructs with a keyword, such as if, while or for. = = = (Please forgive my shaky grasp of logic terminology below. I think I made up some phrases from scratch.) For the sequence of words, "or a one of several constructs" the singular indefinite article "a" is modifying the "singular noun phrase", "one of several constructs", which to me is confusing. The sentence reads more clearly (to me), if we remove the article "a", giving us: "or one of several constructs" If, hypothetically, we had, "A statement is either a foofoo or *a* *list* of several barbars" Then the singular indefinite article modifies a singular noun, "list", and the statement would make sense. Or, if we had, "or a choice of several constructs", it would be syntactically ok, but it would change the term's meaning. I hope there nothing glaringly obvious that I'm overlooking! If so, my apologies, and I would be grateful for any feedback. Thanks, Mike Little From report at bugs.python.org Sun Sep 2 15:42:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 02 Sep 2012 13:42:18 +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: <1346593338.06.0.717427531595.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Something to be aware of that may or may not affect the patch I'm preparing: One reason that Sphinx seems able to render some of the more complicated function signatures is that it has logic to bail and print the parameter list verbatim from the reST file whenever its record-keeping logic becomes internally inconsistent: except IndexError: # if there are too few or too many elements on the stack, just give up # and treat the whole argument list as one argument, discarding the # already partially populated paramlist node https://bitbucket.org/birkenfeld/sphinx/src/1f3a2749df39/sphinx/domains/python.py#cl-74 This seems to come into play, for example, when rendering-- sorted(iterable[, key][, reverse]) http://docs.python.org/dev/library/functions.html#sorted ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 2 15:47:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 02 Sep 2012 13:47: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: <1346593639.85.0.102526433053.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here are a couple functions that may need a fix different from multiple signatures: print([object, ...], *, sep=' ', end='\n', file=sys.stdout, flush=False) http://docs.python.org/dev/library/functions.html#print class argparse.ArgumentParser([description][, epilog][, prog][, usage][, add_help][, argument_default][, parents][, prefix_chars][, conflict_handler][, formatter_class]) http://docs.python.org/dev/library/argparse.html#argparse.ArgumentParser ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 2 18:36:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 02 Sep 2012 16:36:58 +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: <1346603818.09.0.309047880371.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: FWIW, I submitted a patch for the Sphinx issue I created: https://bitbucket.org/birkenfeld/sphinx/issue/1001 Ironically, that patch was probably easier than this patch will be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 2 18:45:52 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Sep 2012 16:45:52 +0000 Subject: [docs] [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance In-Reply-To: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> Message-ID: <1346604352.13.0.628622682402.issue15840@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 2 23:13:18 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Sep 2012 21:13:18 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346620398.54.0.168179892827.issue15533@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Maybe better to check cwd in _call_popen_and_assert for child process (like test_cwd does) instead of just checking for successful child execution? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 3 00:33:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 02 Sep 2012 22:33:56 +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: <1346625234.47.0.909901441507.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching a proposed patch for the default branch. Also, here are several comments and questions. > I think/hope that all the APIs we have in the stdlib are sane enough to have no more than 2-3 signatures I found this one in the curses module with four: window.chgat(attr) window.chgat(num, attr) window.chgat(y, x, attr) window.chgat(y, x, num, attr) Do we like how these look? Is the bare star notation too obscure? inspect.Signature.replace(*[, parameters][, return_annotation]) inspect.Parameter.replace(*[, name][, kind][, default][, annotation]) I was curious what the preferred way to display the following is, since I don't think any comma/bracket placement will work: ArgumentParser([description][, epilog][, prog][, usage][, add_help][, argument_default][, parents][, prefix_chars][, conflict_handler][, formatter_class]) (unless perhaps we use the construction "ArgumentParser(*[, description][, epilog]....") I'm not sure how we want to handle this one using multiple signatures: multiprocessing.Process([group[, target[, name[, args[, kwargs]]]]], *, daemon=None) I put my preferred rendering in the patch, but Sphinx re-renders it in its own way. I also noticed these more unusual signatures: urllib.request.urlopen(url, data=None[, timeout], *, cafile=None, capath=None, cadefault=True) http.client.HTTPSConnection(host, port=None, key_file=None, cert_file=None[, strict[, timeout[, source_address]]], *, context=None, check_hostname=None) By the way, is the * really necessary in these examples? ---------- keywords: +needs review, patch stage: needs patch -> patch review Added file: http://bugs.python.org/file27104/issue-15831-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 3 20:49:08 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Sep 2012 18:49:08 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346698148.47.0.847369656078.issue15533@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Update patch. ---------- Added file: http://bugs.python.org/file27112/issue-15533-4-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 3 21:08:30 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 03 Sep 2012 19:08:30 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346699309.99.0.759957449698.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Andrew. Regarding your comment, it was a deliberate choice not to do the additional check because I wanted each test to check only one thing. But I am okay with adding the additional check. Regarding the patch, should all of the methods now do something similar to what test_cwd() does? + # We cannot use os.path.realpath to canonicalize the path, + # since it doesn't expand Tru64 {memb} strings. See bug 1063571. + cwd = os.getcwd() + os.chdir(tmpdir) + tmpdir = os.getcwd() It looks like test_cwd() may have needed to apply this treatment to have more reliable string-matching in the assert. Otherwise, why is tmpdir being re-assigned to? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 4 11:27:07 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 04 Sep 2012 09:27:07 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346750827.07.0.546134450112.issue15533@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I believe it's trick for Tru64 platform. I've asked to support of this in python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 4 12:23:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 04 Sep 2012 10:23:20 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346754200.88.0.314768181252.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: For future reference, here is the beginning of the e-mail thread on python-dev: http://mail.python.org/pipermail/python-dev/2012-September/121584.html We also need to know whether the Tru64 trick needs to be used in 2.7, since this documentation issue also affects 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 4 14:21:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 04 Sep 2012 12:21:35 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346761294.85.0.330650517046.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Andrew, I seem to be getting a test failure for test_executable_with_cwd() with your updated patch (the child process is outputting an absolute path rather than ''). I will update the patch to fix. There are also some stylistic changes I would like to make to the helper method (updated code comment, etc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 4 14:50:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 04 Sep 2012 12:50:21 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346763021.18.0.342913876705.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is an updated patch. The changes I made are: (1) Update code comments in _call_popen_and_assert(). (2) Fix test failure. (3) Rename _call_popen_and_assert() to _assert_cwd() since it is a simpler name and the old name did not reflect that the method is specific to the test_cwd_* methods. (4) Add _split_python_path() helper method so that we do not need to call os.path.realpath(sys.executable) in every method. Andrew, you can make changes re: Tru64 (removing old code, etc). Thanks. ---------- Added file: http://bugs.python.org/file27115/issue-15533-5-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 4 15:10:30 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 04 Sep 2012 13:10:30 +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: <1346764230.3.0.214391624231.issue15831@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Do we like how these look? Is the bare star notation too obscure? > > inspect.Signature.replace(*[, parameters][, return_annotation]) > inspect.Parameter.replace(*[, name][, kind][, default][, annotation]) Note that if possible, it's better to avoid using the [] and put the default values. However, in these cases the default value seems to be a _void placeholder. The star notation is OK, since it's valid Python. > I was curious what the preferred way to display the following is, > since I don't think any comma/bracket placement will work: > > ArgumentParser([description][, epilog][, prog][, usage][, add_help][, argument_default][, parents][, prefix_chars][, conflict_handler][, formatter_class]) If the default values are known you could use them, otherwise this signature looks OK to me. > (unless perhaps we use the construction "ArgumentParser(*[, > description][, epilog]....") This is OK too, as long as all the arguments (including 'description') are keyword-only. > I'm not sure how we want to handle this one using multiple signatures: > > multiprocessing.Process([group[, target[, name[, args[, kwargs]]]]], *, daemon=None) This is OK too. > I also noticed these more unusual signatures: > > urllib.request.urlopen(url, data=None[, timeout], *, cafile=None, capath=None, cadefault=True) > http.client.HTTPSConnection(host, port=None, key_file=None, cert_file=None[, strict[, timeout[, source_address]]], *, context=None, check_hostname=None) Here the args between [] probably have a placeholder default, or are obtained from somewhere else (e.g. from socket.getdefaulttimeout()). These signature, albeit a bit weird, are understandable IMHO, so, unless you find a better way to write them, I would leave them as they are. > By the way, is the * really necessary in these examples? If the args on the right of the * are keyword-only and the one on the left aren't, then yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 4 15:12:33 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 04 Sep 2012 13:12:33 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346764352.93.0.542977732256.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Updating the patch again to tweak the original documentation change. I was concerned that the previous language could be construed to mean that Popen will look in *two* places for the executable (both relative to the current directory and relative to the cwd argument). The change I'm uploading makes this a little more clear. ---------- Added file: http://bugs.python.org/file27116/issue-15533-6-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 4 15:35:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 04 Sep 2012 13:35:36 +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: <1346765735.9.0.940369831706.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for responding to all of those questions, Ezio. I will update the patch based on your responses. (Likely most of it will remain the same.) > Note that if possible, it's better to avoid using the [] and put the default > values. However, in these cases the default value seems to be a _void > placeholder. Yes, the defaults are "private" in those cases (and in I think pretty much all cases in the patch in which []'s rather than a default value are used to display keyword arguments). > > I was curious what the preferred way to display the following is, > > since I don't think any comma/bracket placement will work: > > > > ArgumentParser([description][, epilog][, prog][, usage][, add_help][, argument_default][, parents][, prefix_chars][, conflict_handler][, formatter_class]) > If the default values are known you could use them, otherwise this signature looks OK to me. The comma not being inside the first bracket is what I was concerned about here (which was the issue raised in the original comment). Using an initial * which you are okay with will address this. (And yes, they are all keyword arguments. In fact, the order of the arguments in the docs does not even match the order in the code.) > > By the way, is the * really necessary in these examples? > If the args on the right of the * are keyword-only and the one on the left aren't, then yes. Okay. I think what threw me is that I don't think we're consistently using the * throughout our docs to denote the beginning of keyword-only arguments. The ArgumentParser constructor above is just one example. So I wasn't sure if this notation was preferred or discouraged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 4 18:26:15 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 04 Sep 2012 16:26: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: <1346775975.7.0.187768597721.issue15831@psf.upfronthosting.co.za> Ezio Melotti added the comment: > So I wasn't sure if this notation was preferred or discouraged. We are moving toward using the same signatures that we have in the Python code, but that doesn't always work (e.g. when the meaning of values changes depending on the number of args, when there's some trick with *args/**kwargs involved, when there are default placeholders, etc.). The single * is not so common (yet), and it might be difficult to understand for new users, that's why I said it's OK to leave it out in cases where all the args are keyword args and the [] are used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 4 21:09:23 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 04 Sep 2012 19:09:23 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346785763.21.0.0972389676437.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Updating the doc portion of the patch one more time. ---------- Added file: http://bugs.python.org/file27118/issue-15533-7-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 00:44:19 2012 From: report at bugs.python.org (Alexander Konovalenko) Date: Tue, 04 Sep 2012 22:44:19 +0000 Subject: [docs] [issue15863] Fine-grained info about Python versions which support changes introduced in micro releases Message-ID: <1346798659.62.0.336544157965.issue15863@psf.upfronthosting.co.za> New submission from Alexander Konovalenko: Some security fixes and bug fixes that are simultaneously issued for multiple Python versions require changes to the documentation. I'm now looking at the hash randomization vulnerability that was fixed in 2.6.8 and 2.7.3. The docs always mention the release in which a new feature was added. That's great. But for a security fix such as the bug in question, the set of versions which support it doesn't look like "2.x.y or later". The documentation for the -R command-line option and the PYTHONHASHSEED environment variable says "New in version 2.6.8". A reader who is not familiar with the context would infer that those feature are supported in Python 2.7 through 2.7.2, which is not the case. The docs should say "New in version 2.6.8 and 2.7.3". http://docs.python.org/using/cmdline.html#cmdoption-R http://docs.python.org/using/cmdline.html#envvar-PYTHONHASHSEED The documentation for the sys.flags.hash_randomization attribute says "New in version 2.7.3". Again, that leaves out the version 2.6.8 and future versions in the 2.6.x branch, which presumably support the new attribute. The docs should say "New in version 2.6.8 and 2.7.3". http://docs.python.org/library/sys.html#sys.flags Disclaimer: I did not test the relevant micro releases to see whether they actually support those features. Just checked the release dates and applied common sense. If you know of any other micro release bugfixes that were mentioned in the docs, the same considerations apply to them. Please verify the docs are correct, fix them or file appropriate bugs. ---------- assignee: docs at python components: Documentation messages: 169841 nosy: alexkon, docs at python priority: normal severity: normal status: open title: Fine-grained info about Python versions which support changes introduced in micro releases versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 01:17:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 04 Sep 2012 23:17:18 +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: <1346800636.91.0.980405189382.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching an updated patch after doing another pass at the code and in light of Ezio's comments. Let me know if and when you'd like me to prepare separate patches for 2.7 and 3.2. ---------- Added file: http://bugs.python.org/file27120/issue-15831-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 02:42:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Sep 2012 00:42:31 +0000 Subject: [docs] [issue15865] reflect bare star * in function signature documentation Message-ID: <1346805751.63.0.697181229134.issue15865@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to make sure that the bare * in the function signatures of pure Python functions is properly reflected in the documentation. This will bring the signatures in the documentation closer to the signatures that we have in the Python code -- a goal articulated by Ezio in a comment to issue 15831. For example, configparser.RawConfigParser() has this function signature: def __init__(self, defaults=None, dict_type=_default_dict, allow_no_value=False, *, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section=DEFAULTSECT, interpolation=_UNSET): But its documentation has no *: class configparser.RawConfigParser(defaults=None, dict_type=collections.OrderedDict, allow_no_value=False, delimiters=('=', ':'), comment_prefixes=('#', ';'), inline_comment_prefixes=None, strict=True, empty_lines_in_values=True, default_section=configaparser.DEFAULTSECT, interpolation=None) (from http://docs.python.org/dev/library/configparser.html#configparser.RawConfigParser ) >From a search of the code, there are about 60 occurrences of a bare * in the signature of a pure Python function (not all of which will need to be updated). ---------- assignee: docs at python components: Documentation keywords: easy messages: 169850 nosy: cjerdonek, docs at python, ezio.melotti priority: normal severity: normal status: open title: reflect bare star * in function signature documentation type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 02:46:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Sep 2012 00:46:11 +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: <1346805971.38.0.50307686655.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > We are moving toward using the same signatures that we have in the Python code.... The single * is not so common (yet), I created issue 15865 to add the single * to the documentation where appropriate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 07:10:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Sep 2012 05:10:56 +0000 Subject: [docs] [issue15457] consistent treatment of generator terminology In-Reply-To: <1343302676.51.0.168761959505.issue15457@psf.upfronthosting.co.za> Message-ID: <1346821856.08.0.0600570684007.issue15457@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This slipped under my radar. After starting work on this again, I realize that it would make sense to complete issue 15476 first. The reason is that it would improve the process of referencing "code object" in the generator docs (Terry's suggestion) once "code object" is itself properly documented. ---------- dependencies: +Add "code object" to glossary _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 07:12:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Sep 2012 05:12:57 +0000 Subject: [docs] [issue15476] Add "code object" to glossary In-Reply-To: <1343459471.56.0.370073010984.issue15476@psf.upfronthosting.co.za> Message-ID: <1346821977.24.0.612882842936.issue15476@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I am starting work on this in the next couple days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 07:35:01 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 05 Sep 2012 05:35:01 +0000 Subject: [docs] [issue15476] Add "code object" to glossary In-Reply-To: <1343459471.56.0.370073010984.issue15476@psf.upfronthosting.co.za> Message-ID: <1346823301.32.0.552909563633.issue15476@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I disagree that this should be added. The glossary is not intended to be a dictionary of every possible concept. Ideally, it should remain short enough so that it can be read in a single sitting. Making the docs fatter doesn't make them better. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 08:01:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Sep 2012 06:01:42 +0000 Subject: [docs] [issue15476] Add "code object" to glossary In-Reply-To: <1343459471.56.0.370073010984.issue15476@psf.upfronthosting.co.za> Message-ID: <1346824902.67.0.860978238097.issue15476@psf.upfronthosting.co.za> Chris Jerdonek added the comment: That's fine by me. I guess what's more important to me is that "code object" have a central, linkable definition *somewhere* (and not necessarily that this somewhere be a glossary entry). That way references to code object in the docs can link to a definition in the same way that we link to definitions of other words, functions, etc. I was also planning on indexing the word more properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 11:38:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 05 Sep 2012 09:38:58 +0000 Subject: [docs] [issue15865] reflect bare star * in function signature documentation In-Reply-To: <1346805751.63.0.697181229134.issue15865@psf.upfronthosting.co.za> Message-ID: <1346837938.59.0.612246415218.issue15865@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +eric.araujo, georg.brandl stage: -> needs patch _______________________________________ Python tracker _______________________________________ From ezio.melotti at gmail.com Wed Sep 5 14:15:29 2012 From: ezio.melotti at gmail.com (ezio.melotti at gmail.com) Date: Wed, 05 Sep 2012 12:15:29 -0000 Subject: [docs] comma after leading optional argument is after bracket in docs (issue 15831) Message-ID: <20120905121529.19980.13891@psf.upfronthosting.co.za> http://bugs.python.org/review/15831/diff/5943/Doc/library/functions.rst File Doc/library/functions.rst (right): http://bugs.python.org/review/15831/diff/5943/Doc/library/functions.rst#newcode983 Doc/library/functions.rst:983: .. function:: print(*objects, sep=' ', end='\\n', file=sys.stdout, flush=False) Why the * is missing here? http://bugs.python.org/review/15831/diff/5943/Doc/library/http.client.rst File Doc/library/http.client.rst (right): http://bugs.python.org/review/15831/diff/5943/Doc/library/http.client.rst#newcode31 Doc/library/http.client.rst:31: source_address=None) This signature is not too nice, but I'm not sure how it could be improved. Is strict a bool? Maybe using timeout=socket.getdefaulttimeout() might be ok (assuming that's what it uses), or if it's set to None or something similar and then re-set to the actual value you could use None in the signature and describe it in prose later. http://bugs.python.org/review/15831/ From chris.jerdonek at gmail.com Wed Sep 5 16:01:00 2012 From: chris.jerdonek at gmail.com (chris.jerdonek at gmail.com) Date: Wed, 05 Sep 2012 14:01:00 -0000 Subject: [docs] comma after leading optional argument is after bracket in docs (issue 15831) Message-ID: <20120905140100.19980.40056@psf.upfronthosting.co.za> Reviewers: ezio.melotti, Message: Responding to Ezio's two comments. http://bugs.python.org/review/15831/diff/5943/Doc/library/functions.rst File Doc/library/functions.rst (right): http://bugs.python.org/review/15831/diff/5943/Doc/library/functions.rst#newcode983 Doc/library/functions.rst:983: .. function:: print(*objects, sep=' ', end='\\n', file=sys.stdout, flush=False) On 2012/09/05 14:15:29, ezio.melotti wrote: > Why the * is missing here? The first argument *objects already receives all remaining positional arguments (since it itself has a *), so putting an additional * after *objects would be redundant. The single * is only necessary if the positional arguments portion doesn't end with *identifier. http://bugs.python.org/review/15831/diff/5943/Doc/library/http.client.rst File Doc/library/http.client.rst (right): http://bugs.python.org/review/15831/diff/5943/Doc/library/http.client.rst#newcode31 Doc/library/http.client.rst:31: source_address=None) On 2012/09/05 14:15:29, ezio.melotti wrote: > This signature is not too nice, but I'm not sure how it could be improved. Is > strict a bool? Maybe using timeout=socket.getdefaulttimeout() might be ok > (assuming that's what it uses), or if it's set to None or something similar and > then re-set to the actual value you could use None in the signature and describe > it in prose later. I believe this is the best we can do to be correct. Here is the actual signature: def __init__(self, host, port=None, strict=_strict_sentinel, timeout=socket._GLOBAL_DEFAULT_TIMEOUT, source_address=None): The two arguments in question default to private sentinel values. I think it is at least an improvement over the old signature which had triply nested brackets. Please review this at http://bugs.python.org/review/15831/ Affected files: Doc/library/argparse.rst Doc/library/configparser.rst Doc/library/curses.rst Doc/library/functions.rst Doc/library/http.client.rst Doc/library/inspect.rst Doc/library/itertools.rst Doc/library/multiprocessing.rst Doc/library/optparse.rst Doc/library/ossaudiodev.rst Doc/library/random.rst Doc/library/socket.rst Doc/library/stdtypes.rst Doc/library/syslog.rst Doc/library/tkinter.tix.rst From report at bugs.python.org Wed Sep 5 16:25:52 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Sep 2012 14:25:52 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1346855151.69.0.197052377927.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is a proposed patch that attempts to minimize the chance of test breakage for Tru64. The patch follows Martin's recommendation on python-dev of being cautious by following existing code. ---------- Added file: http://bugs.python.org/file27123/issue-15533-8-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 16:49:02 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 05 Sep 2012 14:49:02 +0000 Subject: [docs] [issue15865] reflect bare star * in function signature documentation In-Reply-To: <1346805751.63.0.697181229134.issue15865@psf.upfronthosting.co.za> Message-ID: <1346856542.12.0.696806071061.issue15865@psf.upfronthosting.co.za> ?ric Araujo added the comment: So is the root problem that Sphinx does not handle keyword-only arguments? ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 16:58:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Sep 2012 14:58:47 +0000 Subject: [docs] [issue15865] reflect bare star * in function signature documentation In-Reply-To: <1346805751.63.0.697181229134.issue15865@psf.upfronthosting.co.za> Message-ID: <1346857127.32.0.662111629318.issue15865@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > So is the root problem that Sphinx does not handle keyword-only arguments? I don't think so. Sphinx renders the * just fine. It's just that in some of the reST files, the * was left out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 17:30:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Sep 2012 15:30:54 +0000 Subject: [docs] [issue15865] reflect bare star * in function signature documentation In-Reply-To: <1346805751.63.0.697181229134.issue15865@psf.upfronthosting.co.za> Message-ID: <1346859054.34.0.606368381806.issue15865@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Actually, it looks like configparser is the *only* file with missing single *'s. :) However, I did find a few other typos in the process of checking those signatures in the other files. Patch attached. ---------- keywords: +patch Added file: http://bugs.python.org/file27124/issue-15865-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 5 17:38:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Sep 2012 15:38:03 +0000 Subject: [docs] [issue15865] reflect bare star * in function signature documentation In-Reply-To: <1346805751.63.0.697181229134.issue15865@psf.upfronthosting.co.za> Message-ID: <1346859483.48.0.677447403751.issue15865@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- keywords: +needs review stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 03:22:43 2012 From: report at bugs.python.org (Julian Berman) Date: Thu, 06 Sep 2012 01:22:43 +0000 Subject: [docs] [issue15867] It's hard to decypher how to build off of the provided objects from the importlib docs Message-ID: <1346894563.49.0.339877810223.issue15867@psf.upfronthosting.co.za> New submission from Julian Berman: I find that the importlib documentation is a bit too low level. Import hooks are not that common, so requiring a bit of reading is OK with me, but I somewhat *understand* PEP 302, so I have a general idea of *what* I want to do and what kind of objects can accomplish that, and still find it hard to figure out how to take the pieces provided by importlib and use them to do what I want. If I provide a specific example, I want to create a path hook that "just" does the usual import behavior, but before executing the module, does some transformation on the source code, say. In trying to figure out the best way to do that I had a hard time using the docs to figure out which pieces I should assemble to do that. I'm going to just describe the rough series of steps I went through, and hopefully that will help give a picture of where in the docs I had trouble. `importlib.abc` has a few things that would appear to help. None of the things seem like an exact match, so immediately I'm confused -- after reading PEP 302 I'd have expected to need to find an object to implement one or both of `get_code` or `get_source` on, or one that has that implemented that I can subclass and extend. The closest thing there that I find is PyPycLoader, which seems to be saying it implements the standard import behavior, but the docs say its deprecated and to use SourceLoader. At this point, after checking out `SourceLoader` and seeing that it has me implementing two methods whose purpose I don't quite understand, even after reading the short descriptions of them, at least not in the context of what I want to do, I begin to suspect that what I really want is to combine SourceLoader with some things from the `imp` module, or maybe `importlib.__import__`, but am left wondering again how much I need to implement before I just can use that. I then notice `importlib.util.module_for_loader`, and add that to the simple loader I've written which I'm still waiting to plug `imp` into, before realizing that that decorator eats the `fullname` attribute and *only* passes along the module, which confuses me, since now I don't know how to retrieve the source for the module object that I'm being passed -- so I save the path name in `__init__` for the class, and assume that's what I should be doing, despite not seeing an example doing that. Assuming that's even correct as-is, it took me quite a bit to put those pieces together. So I apologize for rambling -- I think essentially what'd improve things is providing more examples, or perhaps a HOWTO entry, that targeted assembling the pieces provided in the module into a few clear, complete examples of finders, loaders and importers. ---------- assignee: docs at python components: Documentation messages: 169901 nosy: Julian, docs at python priority: normal severity: normal status: open title: It's hard to decypher how to build off of the provided objects from the importlib docs versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 03:24:44 2012 From: report at bugs.python.org (Julian Berman) Date: Thu, 06 Sep 2012 01:24:44 +0000 Subject: [docs] [issue15867] It's hard to decypher how to build off of the provided objects from the importlib docs In-Reply-To: <1346894563.49.0.339877810223.issue15867@psf.upfronthosting.co.za> Message-ID: <1346894684.06.0.0975496227497.issue15867@psf.upfronthosting.co.za> Changes by Julian Berman : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 11:30:45 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 06 Sep 2012 09:30:45 +0000 Subject: [docs] [issue15775] Add StopParser() to expat In-Reply-To: <1345796297.89.0.127411549702.issue15775@psf.upfronthosting.co.za> Message-ID: <1346923845.03.0.525468757098.issue15775@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Your first point is true, even if the Python zen (try "import this") states that "Errors should never pass silently." For your second point: exceptions are a common thing in Python code. This is similar to the EAFP principle http://docs.python.org/glossary.html#term-eafp Also, this example http://docs.python.org/release/2.7.3/library/imp.html#examples shows that exceptions can be part of the normal flow control. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 13:26:30 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 06 Sep 2012 11:26:30 +0000 Subject: [docs] [issue15775] Add StopParser(), ResumeParser, and GetParsingStatus to expat In-Reply-To: <1345796297.89.0.127411549702.issue15775@psf.upfronthosting.co.za> Message-ID: <1346930789.95.0.816868694586.issue15775@psf.upfronthosting.co.za> Martin v. L?wis added the comment: D?vid: Another (similar) example is the Python for loop. In it's original form, it would increase an index and invoke __getitem__ until that *raised* IndexError. In the current definition, it converts the iterated-over object into an iterator, and keeps calling .next until that *raises* StopIteration. So raising an exception to indicate that something is finished is an established Python idiom. In any case, I still think adding StopParser is a useful addition, in particular since that would also allow giving True as the "resumable" argument. Any such change needs to be accompanied by also exposing XML_ResumeParser, and possibly XML_GetParsingStatus. Since we all agree that this is not an important change, I don't mind keeping this issue around until someone comes along to contribute code for it. ---------- title: Add StopParser() to expat -> Add StopParser(), ResumeParser, and GetParsingStatus to expat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 15:11:03 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Sep 2012 13:11:03 +0000 Subject: [docs] [issue15867] It's hard to decypher how to build off of the provided objects from the importlib docs In-Reply-To: <1346894563.49.0.339877810223.issue15867@psf.upfronthosting.co.za> Message-ID: <1346937063.15.0.12047164263.issue15867@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brett.cannon, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 15:32:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 06 Sep 2012 13:32:19 +0000 Subject: [docs] [issue15863] Fine-grained info about Python versions which support changes introduced in micro releases In-Reply-To: <1346798659.62.0.336544157965.issue15863@psf.upfronthosting.co.za> Message-ID: <1346938339.71.0.806939709086.issue15863@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Hash randomization is security patch. It is applied to 2.6.8, 2.7.3, 3.2.3 and 3.3. Python doc should not enumerate all affected releases. For example, if you read docs for 2.6 branch it shows you 2.6.8 version only and that's ok. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 15:40:33 2012 From: report at bugs.python.org (Alexander Konovalenko) Date: Thu, 06 Sep 2012 13:40:33 +0000 Subject: [docs] [issue15863] Fine-grained info about Python versions which support changes introduced in micro releases In-Reply-To: <1346798659.62.0.336544157965.issue15863@psf.upfronthosting.co.za> Message-ID: <1346938833.09.0.581613876488.issue15863@psf.upfronthosting.co.za> Alexander Konovalenko added the comment: Andrew, I don't get it. :( Why not? The docs for Python 2.7 generally inform the reader in which Python version every feature appeared. That's really helpful if your code should run on earlier version of Python. You don't have to dig through the docs for older Python releases and compare them one to another; you can just read the latest docs and all information is there. How is the security patch case different? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 15:47:55 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 06 Sep 2012 13:47:55 +0000 Subject: [docs] [issue15863] Fine-grained info about Python versions which support changes introduced in micro releases In-Reply-To: <1346798659.62.0.336544157965.issue15863@psf.upfronthosting.co.za> Message-ID: <1346939275.05.0.628290041101.issue15863@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Well, I can try to make patch. Please note: versionadded tag accepts only single version argument, you have to use couple of tags which looks weird. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 16:44:29 2012 From: report at bugs.python.org (Eric Snow) Date: Thu, 06 Sep 2012 14:44:29 +0000 Subject: [docs] [issue15867] It's hard to decypher how to build off of the provided objects from the importlib docs In-Reply-To: <1346894563.49.0.339877810223.issue15867@psf.upfronthosting.co.za> Message-ID: <1346942669.12.0.859339091391.issue15867@psf.upfronthosting.co.za> Eric Snow added the comment: As far as the import system goes, Barry Warsaw added a really nice page to the language reference[1]. However, it sounds like your concern is with taking advantage of the tools that importlib provides. First of all, a good thing to recognize is that importlib Python 3.3 exposes a much richer public API, including exposing the "default" import machinery. While importlib.abc is meaningful, importlib.machinery is more useful in your case. In versions prior to 3.3, things aren't as easy. In other Python 3 versions one approach you could take is to **carefully** use the private importlib APIs to get what you want. If you do that, I'd recommend that your code target the public 3.3 APIs and then write a wrapper around the earlier private APIs to get them to be compatible. There really shouldn't be a lot of difference. The key is to target Python 3.3's importlib. For Python 2, I'd still recommend targeting 3.3's importlib API and writing wrappers to make that work. This would likely involve more effort to backport whole chunks of the 3.3 importlib implementation. Better to simply port your code to Python 3. :) Secondly, the import system is a complex piece of machinery. The new reference that Barry did helps pull it all together, but there are simply a lot of moving parts in various layers. Adding examples for the importlib API may help for working with that API, but any activities in hooking into the import system should be done with a firm understanding of how it works since it's easy to break things. Currently there isn't any easy way around that and I doubt any of that will change for a long time (due to the effort required). Lastly, take a look at pylt[2]. It's a project I'm working on for source-to-source translation that hooks into the import system. Though it isn't finished yet, the import side of things is mostly done. Hopefully I'll have all the tests done in the next few days. For pylt I've made use of the 3.3 importlib API along with a couple of things that we should see in 3.4 that I've "backported" [3]. The code there should give you an idea of how I've done essentially what you are looking to do. Ultimately, any recommendations you can give on making the import system more approachable would be awesome. Though it will take a lot of thought, discussion, and effort to make the import system "easy", there is still a lot of room for improvement in making it understandable. Your perspective would be meaningful in working toward a sensible improvement. [1] http://docs.python.org/dev/reference/import.html [2] https://bitbucket.org/ericsnowcurrently/pylt/ [3] http://bugs.python.org/issue15627 ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 17:54:14 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 06 Sep 2012 15:54:14 +0000 Subject: [docs] [issue15867] It's hard to decypher how to build off of the provided objects from the importlib docs In-Reply-To: <1346894563.49.0.339877810223.issue15867@psf.upfronthosting.co.za> Message-ID: <1346946854.71.0.573682859679.issue15867@psf.upfronthosting.co.za> Brett Cannon added the comment: First off, what you want to do isn't easy to begin with. =) You are right that you want get_code() and that SourceLoader is what you want. The problem is that importlib inherited PEP 302s APIs, and there are so many that the docs don't repeat themselves in terms of what methods each ABC implements in order to keep the docs readable. That makes it a little difficult to realize what ABCs implement what without reading the class description and/or looking at the class hierarchy layout to realize that SourceLoader implements ResourceLoader which specifies get_code(). Second, import is just plain hard. It took me over 5 years to write importlib and get it to where it is now, and most of that work was just trying to keep it all straight in my head. This also makes writing an example or two difficult as it becomes a massive undertaking very quickly. And there is the simple issue that everyone wants something different, e.g. you want to transform source while others want an alternative back-end storage solution. That means coming up with the right examples is hard in and of itself. Third, in Python 3.4 your desire to transform source will be much easier to achieve thanks to http://bugs.python.org/issue15627 . IOW, I understand your pain but solving the problem is hard without writing a book on the subject (which who knows, maybe I'll do someday as a $1 ebook or something). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 19:14:27 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Sep 2012 17:14:27 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. Message-ID: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> New submission from Terry J. Reedy: For the Windows Help version of the docs, the left side box has 4 tabs: Contents, Index, Search, Favorites. I now mostly use the Index tab. That means that I can enter an indexed keyword, topic, or object name and jump from place to place in the docs. The left margin of the online docs only has a text search box equivalent to the Windows search tab (which I essentially never use). The index is only available on the front page, possibly not even visible without scrolling. Consequently, people, especially beginners, tend to use the text search box when they should be using the index. The result is often useless. The issue came up on python-list about a beginner entering 'print' and getting nothing useful. With the Windows doc, 'print' in the index search immediately brings up print (builtin function) (twice, I did not look into why). The same thing in the search lists 153 pages, with the builtin functions page at 75. Not too surprising, as it is a long page with only 3 occurrences of 'print'. Also not useful. So I think the online docs should also have an always available index search box in addition to the text search box (which should be properly labeled as such). 'Enter a module, class, for function name.' should be applied to index search, not text search. An alternative is for the one box to give both index search results and text search results, but doing the latter when one only wants the former is a waste of both server and reader resources. ---------- assignee: docs at python components: Documentation messages: 169930 nosy: docs at python, eric.araujo, ezio.melotti, georg.brandl, terry.reedy priority: normal severity: normal status: open title: Online docs: make index search always available. type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 19:29:40 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 06 Sep 2012 17:29:40 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1346952580.52.0.566641592741.issue15871@psf.upfronthosting.co.za> R. David Murray added the comment: The index is available on every page via the link in the upper right corner. An index-specific search might be interesting, though I usually just click the 'index on one page' link and do a text search. But that is a two step process and doesn't give a nice list of hits. I don't think I ever use the text search box, either. I just use google. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 19:31:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 06 Sep 2012 17:31:16 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1346952676.88.0.355075696334.issue15871@psf.upfronthosting.co.za> Ezio Melotti added the comment: I find the current search quite useless. I think index search with a fallback on text search when there are no results would be better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 21:22:32 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 06 Sep 2012 19:22:32 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1346959352.67.0.0648835263695.issue15871@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am not the only person who finds the 4 lines of Quick search [ ] [go] Enter search terms or a module, class or function name. more eye-catching than the more useful modules | index in the corner. It is not even obvious what those are about. They are in black 'I am not a link' text until the mouse goes over them. So lets make them more prominent. Second, no one finds the current, eye-catching Quick search very useful. For naive beginners, it seems to be off-putting. The python-list thread is "python docs search for 'print'". So lets change it. Combining these ideas, my revised suggestion is: Move the upper right entries to the sidebar above Quick search and expand and capitalize them so the sidebar would then look like Module index General index Quick search [ ]... where the quick search is actually initially quick by first searching only the general index (Ezio's variation). (I am assuming that all modules are in the general index also). If something is found, it reports "Index entries found:" and only offers "Click here to do a full text search". If nothing is in the index, report "No index entries found, doing a full text search ..." (This would still not be as good as the Windows doc, where the index tab starts with the entire index list and responds as each character is entered. That catches typos as mistyped. This would best be done by client-side javascript after loading the entire index list.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 6 22:09:18 2012 From: report at bugs.python.org (Stefan Krah) Date: Thu, 06 Sep 2012 20:09:18 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1346962158.4.0.509096768926.issue15871@psf.upfronthosting.co.za> Stefan Krah added the comment: I like the quick search: It works very well for function names. For the use cases mentioned here I use Google. I never use the index, so for me personally the positioning of the quick search box is perfect. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 7 00:52:00 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 06 Sep 2012 22:52:00 +0000 Subject: [docs] [issue15867] It's hard to decypher how to build off of the provided objects from the importlib docs In-Reply-To: <1346894563.49.0.339877810223.issue15867@psf.upfronthosting.co.za> Message-ID: <1346971920.04.0.0297507815173.issue15867@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 7 03:28:06 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Sep 2012 01:28:06 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1346981285.77.0.709676659015.issue15871@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'print' *is* a function name ;-) which also happens to be a common word. If the current search box gives you the page where the function is defined, searching the index first should give you the same page. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 7 03:29:28 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 07 Sep 2012 01:29:28 +0000 Subject: [docs] [issue15867] It's hard to decypher how to build off of the provided objects from the importlib docs In-Reply-To: <1346894563.49.0.339877810223.issue15867@psf.upfronthosting.co.za> Message-ID: <1346981367.91.0.641611733536.issue15867@psf.upfronthosting.co.za> Nick Coghlan added the comment: One specific change we should make is that the "see also" at the start of the 3.3 importlib docs should link to the new section of the language reference, rather than Guido's packaging essay. We can probably also cull that long list of PEPs, moving it to the end of the language reference section. Other than that, yeah, we've been working away at this for years, trying to bring it down to a more manageable level of complexity. Brett's efforts in finally purging the last remnants of the old pre-PEP 302 import systems are what made it possible for Barry to finally create a coherent spec for the import system (previously, none of us really wanted to write such a thing, as there would have been *way* too many caveats needed in attempting to grandfather in the legacy import mechanics). Now that that is done, 3.4 will likely include a number of improvements to importlib to make it easier to use as a basis for custom import hooks (as Brett and Eric noted, better support for customisation of the source -> bytecode compilation step will definitely be one of them. As far as books go, I think the evolution of Python's import system might make an interesting entry if they do a third edition of The Architecture of Open Source Applications [1] :) [1] http://www.aosabook.org/en/index.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 7 05:56:42 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 07 Sep 2012 03:56:42 +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: <1346990202.08.0.206584399765.issue15520@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Added in 7ca6b3a16e15 ---------- nosy: +belopolsky resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 7 15:27:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 07 Sep 2012 13:27:51 +0000 Subject: [docs] [issue15867] make importlib documentation easier to use In-Reply-To: <1346894563.49.0.339877810223.issue15867@psf.upfronthosting.co.za> Message-ID: <1347024471.0.0.712356351994.issue15867@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- title: It's hard to decypher how to build off of the provided objects from the importlib docs -> make importlib documentation easier to use _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 7 18:22:32 2012 From: report at bugs.python.org (Julian Berman) Date: Fri, 07 Sep 2012 16:22:32 +0000 Subject: [docs] [issue15867] make importlib documentation easier to use In-Reply-To: <1346894563.49.0.339877810223.issue15867@psf.upfronthosting.co.za> Message-ID: <1347034952.59.0.533299774384.issue15867@psf.upfronthosting.co.za> Julian Berman added the comment: Eric: Yeah I've seen that, it's the one thing that I kept open as I was turning back and forth through the various parts of importlib. So yeah I like that document certainly at least a bit :). Also thanks to both you and Brett for linking that issue, that's certainly something I'll keep an eye on. Just to repeat the specific things that perhaps we could work on -- I strongly agree that the top of importlib's docs would benefit from reworking the See Also at the top. Also, perhaps that monumental undertaking would be a thing that could be wrangled :P -- like you said, import hooks seem to have two broad use cases: changing *where* a module comes from away from a simple file containing Python source code on a filesystem, and secondly changing what happens when a module is being imported. So I guess what I would love to have would be an example for each of those. An example of a Loader that loaded from somewhere else other than a file, and an example of an Importer that did something else when executing. I'm sure you'll correct me if I've missed an important one. If that's reasonable sounding and I manage to succeed in my own use case, perhaps I'll take a shot at that. One thing I certainly understand here is that usually I (we) wouldn't have this problem since blog posts and other third party documentation and code can provide examples that are helpful enough to help developers get a sense of what they need to write. The thing for me here was that I didn't really find anything helpful in that sector. importlib is new obviously, so maybe what's given me trouble will be mitigated after 3.3 gets released and a few people write up some examples on their own. I recognize that there was a huge undertaking here, and that it's still being honed, I hope in no way did this sound disparaging :). Also I hope it didn't sound like a misplaced StackOverflow post -- although certainly the confirmation that I was on the right track should help me finish this off quite easily, so thanks for that as well :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 7 18:59:37 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 07 Sep 2012 16:59:37 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1347037177.49.0.751246926236.issue12067@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- nosy: +mikehoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 7 21:47:08 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Sep 2012 19:47:08 +0000 Subject: [docs] [issue15863] Fine-grained info about Python versions which support changes introduced in micro releases In-Reply-To: <1346798659.62.0.336544157965.issue15863@psf.upfronthosting.co.za> Message-ID: <1347047228.12.0.113779159957.issue15863@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I do not think there should be references between the Python 2 docs and Python 3 docs. But within each, I think it ok to have exceptional multiple references for what is, I believe, a unique situation: a security fix that required a new feature. Do it however seems most graceful. My first thought was that someone seeing "added in 2.6.8' should know that adding a feature in a bugfix release is almost never done, hence it might not be in 2.7.0. But then I remembered that this fix is mainly for web sites, and the reader selecting which Python versions to use might not be a Python programmer. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 7 21:56:17 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 07 Sep 2012 19:56:17 +0000 Subject: [docs] [issue15863] Fine-grained info about Python versions which support changes introduced in micro releases In-Reply-To: <1346798659.62.0.336544157965.issue15863@psf.upfronthosting.co.za> Message-ID: <1347047777.54.0.396676656936.issue15863@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Well, the patch is welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 7 23:07:54 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 07 Sep 2012 21:07:54 +0000 Subject: [docs] [issue15865] reflect bare star * in function signature documentation In-Reply-To: <1346805751.63.0.697181229134.issue15865@psf.upfronthosting.co.za> Message-ID: <1347052074.52.0.442494261924.issue15865@psf.upfronthosting.co.za> Terry J. Reedy added the comment: By looking at x.py, I confirmed that the added stars are correct. Also, the correction of 'header' to 'hdr' is correct. However, for threading.py in 3.3.0, I see class Thread: ... def __init__(self, group=None, target=None, name=None, args=(), kwargs=None, *, daemon=None): whereas the patch and existing .rst -.. class:: Thread(group=None, target=None, name=None, args=(), kwargs={}, +.. class:: Thread(group=None, target=None, name=None, args=(), kwargs={}, \ verbose=None, *, daemon=None) has an extra 'verbose=None' that should be removed there and in any explanatory text that follows. (The fact that we found 2 doc signature errors other than the 4 missing *s suggests that we need a tool to systematically compare doc signature to code signature.) ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 7 23:43:08 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 07 Sep 2012 21:43:08 +0000 Subject: [docs] [issue15865] reflect bare star * in function signature documentation In-Reply-To: <1346805751.63.0.697181229134.issue15865@psf.upfronthosting.co.za> Message-ID: <1347054188.9.0.567736992255.issue15865@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Terry. If anyone is curious, it looks like the verbose keyword argument was added to the docs (and to threading.py) in revision f71acc4b2341, and then subsequently removed (but not from the docs) in revision 8ec51b2e57c2. > (The fact that we found 2 doc signature errors other than the 4 missing *s suggests that we need a tool to systematically compare doc signature to code signature.) Out of curiosity, can anyone summarize what our existing tooling might already be able to do in this regard (e.g. Sphinx or pydoc)? I will update the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 8 03:10:53 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 08 Sep 2012 01:10:53 +0000 Subject: [docs] [issue15865] reflect bare star * in function signature documentation In-Reply-To: <1346805751.63.0.697181229134.issue15865@psf.upfronthosting.co.za> Message-ID: <1347066653.54.0.0291109648306.issue15865@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is an updated patch that incorporates Terry's suggestion. ---------- Added file: http://bugs.python.org/file27145/issue-15865-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 8 10:04:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 08 Sep 2012 08:04:27 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347091467.44.0.958598013156.issue15629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attached is a patch that adds to regrtest the ability to run doctests in both library modules and documentation files (specifically, in the non-test modules in Lib/ and in the *.rst files in Doc/). The syntax to run all doctests is-- python -m test --doctests --docdir If --docdir is left out, only module doctests are run. You can run the doctests for individual files and modules by including test names of the form "fdoc:library/builtins.rst" and "mdoc:html.parser" (for file doctests and module doctests, respectively). Doctests for a module are only run if the module has a variable `_doctest_safe` that evaluates to True. I haven't yet added a mechanism to mark a documentation file as "doctest safe" or to skip importing a library module entirely (when running all tests). ---------- components: +Tests keywords: +patch title: Run doctests in Doc/*.rst as part of regrtest -> Add to regrtest the ability to run Lib and Doc doctests Added file: http://bugs.python.org/file27146/issue-15629-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 8 14:51:30 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 08 Sep 2012 12:51:30 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1347108690.53.0.103884042484.issue15871@psf.upfronthosting.co.za> Ezio Melotti added the comment: If I search for "random", at the top of the result lists I want to see at least the "random" module and the "random.random" function. Currently the "random" module is the 4th result, and "random.random" is buried down in the list (17th place) among all the other random.* functions. The results are generated by the query() function in searchtools.js, and AFAIU it generates 3 lists, importantResults, objectResults, unimportantResults, that get then sorted independently in alphabetic order by the object fullname, and concatenated. I experimented a bit and one way to get exact matches to the top is to add before the switch at line 370 something like if (fullname == object) { importantResults.push(result); continue; } This will include "random", but not "random.random". Other possible variations are if ((fullname == object) || (fullname.split('.').pop() == object)) { or if ((fullname == object) || $.inArray(object, fullname.split('.')) > -1) Here fullname is e.g. "random.random", "$.inArray(object, fullname.split('.')) > -1" is the jquery equivalent of Python's "object in fullname.split('.')". Another way to address the problem is to change the sorting algorithm to move near the top results like "random" and "random.random". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 8 16:59:27 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 08 Sep 2012 14:59:27 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1347116367.84.0.0390304464452.issue15871@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- nosy: +ramchandra.apte _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 8 18:27:04 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 08 Sep 2012 16:27:04 +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: <1347121624.49.0.32788730618.issue10224@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 8 19:53:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Sep 2012 17:53:10 +0000 Subject: [docs] [issue15865] reflect bare star * in function signature documentation In-Reply-To: <1346805751.63.0.697181229134.issue15865@psf.upfronthosting.co.za> Message-ID: <3XDjmP4q5jzQMT@mail.python.org> Roundup Robot added the comment: New changeset a30b3915228b by Ezio Melotti in branch '3.2': #15865: add "*" in the signature to document keyword-only args in the docs. Patch by Chris Jerdonek. http://hg.python.org/cpython/rev/a30b3915228b New changeset 694c725f241a by Ezio Melotti in branch 'default': #15865: merge with 3.2. http://hg.python.org/cpython/rev/694c725f241a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 8 19:54:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 08 Sep 2012 17:54:54 +0000 Subject: [docs] [issue15865] reflect bare star * in function signature documentation In-Reply-To: <1346805751.63.0.697181229134.issue15865@psf.upfronthosting.co.za> Message-ID: <1347126894.23.0.220753982611.issue15865@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 report at bugs.python.org Sat Sep 8 22:48:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Sep 2012 20:48:37 +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: <3XDnfq6RgDzQLL@mail.python.org> Roundup Robot added the comment: New changeset 8c60bb098eff by R David Murray in branch '3.2': #5088: document behavior of optparse defaults with 'append' action. http://hg.python.org/cpython/rev/8c60bb098eff New changeset 0c2bdd2c2032 by R David Murray in branch 'default': Merge #5088: document behavior of optparse defaults with 'append' action. http://hg.python.org/cpython/rev/0c2bdd2c2032 New changeset 79f6d4aff39d by R David Murray in branch '2.7': closes #5088: document behavior of optparse defaults with 'append' action. http://hg.python.org/cpython/rev/79f6d4aff39d ---------- nosy: +python-dev resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 9 00:37:55 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 08 Sep 2012 22:37:55 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1347143875.46.0.0651958569253.issue15871@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 9 09:17:30 2012 From: report at bugs.python.org (Masato HASHIMOTO) Date: Sun, 09 Sep 2012 07:17:30 +0000 Subject: [docs] [issue15886] Doc: same word iteration Message-ID: <1347175050.22.0.936746811947.issue15886@psf.upfronthosting.co.za> New submission from Masato HASHIMOTO: Same word () is iterated in Doc/library/os.rst. 1858 This function can support :ref:`specifying a file descriptor 1859 `, :ref:`specifying a file descriptor ` and :ref:`not 1860 following symlinks `. version: releasing/3.3.0 @ 78787:c5bc19ce4d2b ---------- assignee: docs at python components: Documentation messages: 170081 nosy: docs at python, hashimo priority: normal severity: normal status: open title: Doc: same word iteration versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 9 11:18:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Sep 2012 09:18:52 +0000 Subject: [docs] [issue15724] Add "versionchanged" to memoryview docs In-Reply-To: <1345377223.09.0.176185074566.issue15724@psf.upfronthosting.co.za> Message-ID: <3XF6JW3tPZzQQ4@mail.python.org> Roundup Robot added the comment: New changeset 144d649764cf by Stefan Krah in branch 'default': Issue #15724: Add versionchanged tags to the memoryview documentation. http://hg.python.org/cpython/rev/144d649764cf ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 9 12:41:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 09 Sep 2012 10:41:16 +0000 Subject: [docs] [issue15886] os.stat() docs repeat "specifying a file descriptor" support In-Reply-To: <1347175050.22.0.936746811947.issue15886@psf.upfronthosting.co.za> Message-ID: <1347187276.15.0.545711982235.issue15886@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is where the typo was introduced: http://hg.python.org/cpython/rev/c890cbad4748#l1.69 ---------- nosy: +cjerdonek title: Doc: same word iteration -> os.stat() docs repeat "specifying a file descriptor" support _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 9 13:32:30 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 09 Sep 2012 11:32:30 +0000 Subject: [docs] [issue15888] ipaddress HOWTO examples have some errors Message-ID: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The ipaddress HOWTO seems to have some errors in its interactive doctest examples. Below are the errors after running the doctests for it using the regrtest patch posted to issue 15629. (This is the first doc file for which I have used the modified script to open an issue.) The errors seem valid to me on casual inspection. Note that you need to add an initial ">>> import ipaddress" at the beginning of the first doctest example to have these actually run. ---------------------------------------------------------------------- File "Doc/howto/ipaddress.rst", line 146, in ipaddress.rst Failed example: ipaddress.ip_network('2001:db8::1/96') Exception raised: Traceback (most recent call last): File "Lib/doctest.py", line 1287, in __run compileflags, 1), test.globs) File "", line 1, in ipaddress.ip_network('2001:db8::1/96') File "Lib/ipaddress.py", line 79, in ip_network return IPv6Network(address, strict) File "Lib/ipaddress.py", line 2056, in __init__ raise ValueError('%s has host bits set' % self) ValueError: 2001:db8::1/96 has host bits set ---------------------------------------------------------------------- File "Doc/howto/ipaddress.rst", line 181, in ipaddress.rst Failed example: net4.numhosts Exception raised: Traceback (most recent call last): File "Lib/doctest.py", line 1287, in __run compileflags, 1), test.globs) File "", line 1, in net4.numhosts AttributeError: 'IPv4Network' object has no attribute 'numhosts' ---------------------------------------------------------------------- File "Doc/howto/ipaddress.rst", line 184, in ipaddress.rst Failed example: net6.numhosts Exception raised: Traceback (most recent call last): File "Lib/doctest.py", line 1287, in __run compileflags, 1), test.globs) File "", line 1, in net6.numhosts AttributeError: 'IPv6Network' object has no attribute 'numhosts' ---------------------------------------------------------------------- File "Doc/howto/ipaddress.rst", line 190, in ipaddress.rst Failed example: for x in net4.hosts(): Exception raised: Traceback (most recent call last): File "Lib/doctest.py", line 1287, in __run compileflags, 1), test.globs) File "", line 1 for x in net4.hosts(): ^ SyntaxError: unexpected EOF while parsing ---------------------------------------------------------------------- File "Doc/howto/ipaddress.rst", line 219, in ipaddress.rst Failed example: addr6.exploded Expected: '2001:0db8:0000:0000:0000:0000:0000:0000' Got: '2001:0db8:0000:0000:0000:0000:0000:0001' ---------------------------------------------------------------------- File "Doc/howto/ipaddress.rst", line 221, in ipaddress.rst Failed example: addr6.compressed Expected: '2001:db8::' Got: '2001:db8::1' ---------------------------------------------------------------------- File "Doc/howto/ipaddress.rst", line 244, in ipaddress.rst Failed example: net6[1] Expected: IPv6Address('2001::1') Got: IPv6Address('2001:db8::1') ---------------------------------------------------------------------- File "Doc/howto/ipaddress.rst", line 246, in ipaddress.rst Failed example: net6[-1] Expected: IPv6Address('2001::ffff:ffff') Got: IPv6Address('2001:db8::ffff:ffff') ---------- assignee: docs at python components: Documentation keywords: easy messages: 170097 nosy: cjerdonek, docs at python, ncoghlan, pmoody priority: normal severity: normal stage: needs patch status: open title: ipaddress HOWTO examples have some errors type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 9 16:11:29 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 09 Sep 2012 14:11:29 +0000 Subject: [docs] [issue15888] ipaddress HOWTO examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1347199888.94.0.544042413829.issue15888@psf.upfronthosting.co.za> Chris Jerdonek added the comment: While we are here, the corresponding Python file also has a couple errors in one of its doctest examples. File "Lib/ipaddress.py", line 209, in ipaddress.summarize_address_range Failed example: summarize_address_range(IPv4Address('192.0.2.0'), Exception raised: Traceback (most recent call last): File "Lib/doctest.py", line 1287, in __run compileflags, 1), test.globs) File "", line 1 summarize_address_range(IPv4Address('192.0.2.0'), ^ SyntaxError: unexpected EOF while parsing ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 9 16:30:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 09 Sep 2012 14:30:06 +0000 Subject: [docs] [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1347201006.48.0.207443728699.issue15888@psf.upfronthosting.co.za> Chris Jerdonek added the comment: And also the main doc file Lib/ipaddress.rst (along with some formatting issues, and after adding needed imports): File "Doc/library/ipaddress.rst", line 115, in ipaddress.rst Failed example: ipaddress.IPv4Address(3221225985) Expected: IPv4Address('192.168.0.1') Got: IPv4Address('192.0.2.1') ---------- title: ipaddress HOWTO examples have some errors -> ipaddress doctest examples have some errors _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 9 18:51:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 09 Sep 2012 16:51:58 +0000 Subject: [docs] [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1347209518.77.0.000810640456908.issue15888@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I will prepare a patch for these three files. ---------- _______________________________________ Python tracker _______________________________________ From alexander.belopolsky at gmail.com Sun Sep 9 19:52:19 2012 From: alexander.belopolsky at gmail.com (alexander.belopolsky at gmail.com) Date: Sun, 09 Sep 2012 17:52:19 -0000 Subject: [docs] TZ offset description is unclear in docs (issue 8810) Message-ID: <20120909175219.10534.84938@psf.upfronthosting.co.za> Reviewers: Nick Coghlan, http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst File Doc/library/datetime.rst (right): http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst#newcode1011 Doc/library/datetime.rst:1011: west from UTC. The sentence above still uses slightly incorrect terminology. UTC is timescale and not a geographical location. There is no such point or a line on our planet called UTC, so it is not correct to speak about things east or west of UTC. If you read UTC here as the Greenwich meridian, then the sentence is incorrect because there are places west of Greenwich that use negative offsets. http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst#newcode1027 Doc/library/datetime.rst:1027: west from UTC. See above. http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst#newcode1049 Doc/library/datetime.rst:1049: Note that the name is 100% informational ? there's no requirement that it 100% is redundant here. I would just say "is informational." http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst#newcode1050 Doc/library/datetime.rst:1050: mean anything in particular. For example, ``"GMT"``, ``"UTC"``, ``"-500"``, Grammar? "it mean" -> "it means" or "for it to mean" http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst#newcode1931 Doc/library/datetime.rst:1931: Spurious empty line? Please review this at http://bugs.python.org/review/8810/ Affected files: Doc/library/datetime.rst Lib/datetime.py Modules/_datetimemodule.c From report at bugs.python.org Sun Sep 9 22:49:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 09 Sep 2012 20:49:49 +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: <1347223789.29.0.653799471897.issue15437@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I was reminded of this issue by the following e-mail today: http://mail.python.org/pipermail/python-dev/2012-September/121639.html I updated the script I attached earlier to ensure that it can also be run against the names in 2.7 (attaching now as script #3). I also checked that this latest script can still be run against 3.2 and default with the names that have been added since the last time I checked. Let me know if you would like any assistance in how to run the script and what to check for, etc. ---------- Added file: http://bugs.python.org/file27157/merge-acks-3.py _______________________________________ Python tracker _______________________________________ From ben+python at benfinney.id.au Mon Sep 10 03:24:15 2012 From: ben+python at benfinney.id.au (ben+python at benfinney.id.au) Date: Mon, 10 Sep 2012 01:24:15 -0000 Subject: [docs] TZ offset description is unclear in docs (issue 8810) Message-ID: <20120910012415.10535.41637@psf.upfronthosting.co.za> Thank you very much for reviewing this patch. http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst File Doc/library/datetime.rst (right): http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst#newcode1011 Doc/library/datetime.rst:1011: west from UTC. On 2012/09/09 19:52:19, sasha wrote: > The sentence above still uses slightly incorrect terminology. UTC is > timescale and not a geographical location. There is no such point or a line > on our planet called UTC, so it is not correct to speak about things east or > west of UTC. You're right that UTC is not a geographical location. It is a region in the abstract one-dimensional circular space of time zones, and other time zones are east or west from that region in the space of time zones. Because those time zones map continuously (though not monotonically) to geographical regions, it is correct and useful to use ?east? and ?west? to describe the relative positions of time zones in the space of time zones, because those two directions map in both spaces the same way. > If you read UTC here as the Greenwich meridian, then the sentence is > incorrect because there are places west of Greenwich that use negative > offsets. Don't do that, then :-) UTC is not the same as the Greenwich meridian, and this passage doesn't imply that anywhere, so reading them as identical will lead to incorrect conclusions. http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst#newcode1049 Doc/library/datetime.rst:1049: Note that the name is 100% informational ? there's no requirement that it On 2012/09/09 19:52:19, sasha wrote: > 100% is redundant here. I would just say "is informational." It's not quite redundant; it carries the implication that there is no purpose *other than* the informational. I think that's the main point of this sentence (which I didn't write, merely moved). Would you prefer ?is only informational?? I think that would be better. http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst#newcode1050 Doc/library/datetime.rst:1050: mean anything in particular. For example, ``"GMT"``, ``"UTC"``, ``"-500"``, On 2012/09/09 19:52:19, sasha wrote: > Grammar? "it mean" -> "it means" or "for it to mean" The sentence is correct English grammar, AFAICT; it refers to the action, not the state. ?there is no requirement that it mean foo? has the same meaning as ?there is no requirement for it to mean foo?, but the former is less clumsy IMO. http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst#newcode1931 Doc/library/datetime.rst:1931: On 2012/09/09 19:52:19, sasha wrote: > Spurious empty line? Checking the source in my tree, yes, it's spurious. That blank line can be deleted without a problem. http://bugs.python.org/review/8810/ From alexander.belopolsky at gmail.com Mon Sep 10 06:05:23 2012 From: alexander.belopolsky at gmail.com (alexander.belopolsky at gmail.com) Date: Mon, 10 Sep 2012 04:05:23 -0000 Subject: [docs] TZ offset description is unclear in docs (issue 8810) Message-ID: <20120910040523.20589.18644@psf.upfronthosting.co.za> http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst File Doc/library/datetime.rst (right): http://bugs.python.org/review/8810/diff/5785/Doc/library/datetime.rst#newcode1011 Doc/library/datetime.rst:1011: west from UTC. On 2012/09/10 03:24:15, bignose wrote: > You're right that UTC is not a geographical location. It is a region in the > abstract one-dimensional circular space of time zones, and other time zones are > east or west from that region in the space of time zones. This is a novel interpretation, but in this sense that sentence is as useful as saying that integers left of zero are negative and those right of zero are positive. Yes, in some sense the statement is correct, but is not really helpful. In datetime module documentation the East/West terminology is unnecessary. People don't read Python reference manual to figure out whether they live in the East or in the West. What they want to know is what datetime.utcoffset means and it means timedelta that needs to be added to (naive) UTC time to arrive at (naive) local time. They also want to know that the sign of utcoffset() is opposite to the sign of time.timezone. However, saying that time.timezone is positive west of UTC and datetime.utcoffset() is negative west of UTC hides this simple fact behind additional terminology. (By the time one reads about utcoffset() she already forgot what was East/West for time.timezone and does not realize that the convention is opposite.) http://bugs.python.org/review/8810/ From report at bugs.python.org Mon Sep 10 08:47:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Sep 2012 06:47:27 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1347259647.05.0.255865878311.issue12947@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I discovered this today as well while reading the doctest documentation. One thing that I never noticed before (and that doesn't seem to be reflected in the comments above) is that many of the code snippet rectangles in the doctest documentation have a small rectangle in the upper-right corner with the text ">>>". If you click on one of these small rectangles, most of the text inside the code snippet rectangle disappears. I haven't confirmed this, but I suspect that it is the code snippets with a doctest directive that have this clickable corner. Is this a feature? What is it for? :) ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 10 09:27:07 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Sep 2012 07:27:07 +0000 Subject: [docs] [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1347262027.82.0.766282315954.issue15888@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching patch. The doctests for these three files now all pass (using a newer version of the patch I uploaded to issue 15629). ---------- keywords: +patch Added file: http://bugs.python.org/file27161/issue-15888-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 10 10:05:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Sep 2012 08:05:18 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347264317.42.0.826696474506.issue15629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I am attaching an updated version of the patch for feedback. The latest version of the patch I developed and used in the real-world example of fixing both the module and documentation file doctests for the ipaddress module (and its HOWTO) in issue 15888. The patch includes the following additional features: (1) the user is warned if a user-selected test file contains no tests (2) tests to run can be specified using one or more globs (e.g. fdoc:howto*) (3) the doc directory can be specified relatively (e.g. --docdir Doc) (4) passing --docall adds all doctests to the test run selection (5) passing --docunsafe runs doctests for all selected tests, whether or not the test files are marked "doctest safe" The patch also includes usage documentation towards the beginning. ---------- Added file: http://bugs.python.org/file27162/issue-15629-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 10 11:01:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Sep 2012 09:01:56 +0000 Subject: [docs] [issue15899] howto/unicode.rst doctest corrections Message-ID: <1347267716.91.0.310284408834.issue15899@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to fix Doc/howto/unicode.rst so that its doctests pass when using the doctest module. Patch forthcoming. ---------- assignee: docs at python components: Documentation keywords: easy messages: 170167 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: howto/unicode.rst doctest corrections versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 10 11:05:33 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Sep 2012 09:05:33 +0000 Subject: [docs] [issue15899] howto/unicode.rst doctest corrections In-Reply-To: <1347267716.91.0.310284408834.issue15899@psf.upfronthosting.co.za> Message-ID: <1347267933.09.0.504282046374.issue15899@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching patch for the default branch. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file27163/issue-15899-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 10 12:31:57 2012 From: report at bugs.python.org (Simon) Date: Mon, 10 Sep 2012 10:31:57 +0000 Subject: [docs] [issue15901] multiprocessing sharedctypes Array don't accept strings In-Reply-To: <1347271179.81.0.646236436369.issue15901@psf.upfronthosting.co.za> Message-ID: <1347273117.05.0.0334106058634.issue15901@psf.upfronthosting.co.za> Changes by Simon : ---------- assignee: -> docs at python components: +Documentation -ctypes nosy: +docs at python type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 10 14:08:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Sep 2012 12:08:02 +0000 Subject: [docs] [issue15901] multiprocessing sharedctypes Array don't accept strings In-Reply-To: <1347271179.81.0.646236436369.issue15901@psf.upfronthosting.co.za> Message-ID: <3XFp1F4WjfzQfW@mail.python.org> Roundup Robot added the comment: New changeset ddb406904be1 by Richard Oudkerk in branch '3.2': Issue #15901: Change example to use byte string instead of string http://hg.python.org/cpython/rev/ddb406904be1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 10 14:09:27 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 10 Sep 2012 12:09:27 +0000 Subject: [docs] [issue15901] multiprocessing sharedctypes Array don't accept strings In-Reply-To: <1347271179.81.0.646236436369.issue15901@psf.upfronthosting.co.za> Message-ID: <1347278967.84.0.0986407083173.issue15901@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 10 14:30:52 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 10 Sep 2012 12:30:52 +0000 Subject: [docs] [issue12947] doctest directive examples in library/doctest.html lack the flags In-Reply-To: <1315588954.16.0.979263107509.issue12947@psf.upfronthosting.co.za> Message-ID: <1347280252.18.0.66203011555.issue12947@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Is this a feature? What is it for? :) The >>> is added to every example that contains an interactive session to hide the '>>>' and '...' prompts and the output and make the code copy/pastable, and it's not specific to doctests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 10 19:20:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Sep 2012 17:20:18 +0000 Subject: [docs] [issue15899] howto/unicode.rst doctest corrections In-Reply-To: <1347267716.91.0.310284408834.issue15899@psf.upfronthosting.co.za> Message-ID: <1347297618.16.0.902654506049.issue15899@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 03:02:00 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 11 Sep 2012 01:02:00 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347325319.94.0.99508281558.issue15629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > You should also see if there are more doctest-safe or more doctest-unsafe tests, and mark the ones in the smallest group. Running the doctests for all .rst files in the Doc/ directory using the latest patch gave me the following: 299 tests [files] OK. 126 tests failed (and 6 that I manually skipped) Following the suggestion above from Ezio, we should have a doc file marker to skip a file as opposed to including a file. This means that doctests would be included by default, which I think would be a good way to go. How do people feel about something like the following for a marker? .. doctest-skip-file (to distinguish from skipping an individual test) Or perhaps (to go with something like Nick's original suggestion) .. doctest-unsafe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 03:09:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Sep 2012 01:09:12 +0000 Subject: [docs] [issue15886] os.stat() docs repeat "specifying a file descriptor" support In-Reply-To: <1347175050.22.0.936746811947.issue15886@psf.upfronthosting.co.za> Message-ID: <3XG7Lb3c1kzPGC@mail.python.org> Roundup Robot added the comment: New changeset d7ea7ec671ba by R David Murray in branch 'default': #15886: remove redundant phrase http://hg.python.org/cpython/rev/d7ea7ec671ba ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 03:10:00 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 11 Sep 2012 01:10:00 +0000 Subject: [docs] [issue15886] os.stat() docs repeat "specifying a file descriptor" support In-Reply-To: <1347175050.22.0.936746811947.issue15886@psf.upfronthosting.co.za> Message-ID: <1347325800.5.0.830195801972.issue15886@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks Masato. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 03:19:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 11 Sep 2012 01:19:54 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347326394.53.0.219409445997.issue15629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > 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`). Fortunately, we get a lot of this for free when integrating with regrtest because the infrastructure is already there for the other tests. For example, the test counts for my previous comment were automatic, operating in a clean temp cwd is something else taken care of, a command-line interface is already present, etc. The main doctest-specific things that needed to be added were (1) doctest discovery (which involves walking the Lib/ and Doc/ directory hierarchies), and (2) creating TestSuite instances differently (by invoking DocTestSuite and DocFileSuite as opposed to calling TestLoader.loadTestsFromModule()). I would still like to decouple the code a bit more and perhaps even add some unit tests for some of the newly added code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 05:42:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 11 Sep 2012 03:42:27 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347334947.35.0.170926497914.issue15629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > 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, The doctest module supports this natively (i.e. without the need for Sphinx) via its "skip" directive ("#doctest: +SKIP"): http://docs.python.org/dev/library/doctest.html#doctest.SKIP Sphinx will even hide doctest directives like this when rendering the HTML, so the additional annotation won't be visible to the end user/reader and clutter up the interactive examples (cf. issue 12947). Also, it looks like the Sphinx "doctest" directive gets most or all of its functionality via the options already exposed by doctest: http://sphinx.pocoo.org/ext/doctest.html?#directive-doctest ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 06:07:04 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 11 Sep 2012 04:07:04 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347336424.01.0.367320477664.issue15629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > 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. Yes, this seems to be true. Sphinx has a "testsetup" directive which lets you avoid adding boilerplate to interactive examples: http://sphinx.pocoo.org/ext/doctest.html?#directive-testsetup I did a quick search, though, and it looks like this is used in only 7 documentation files out of the 430+ -- one of which is library/turtle.rst. :) Similarly, the "testcode" directive (a variant of the doctest format) seems to be used in just 5 files. In any case, we could still benefit from running the doctests from regrtest that don't require use of testsetup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 12:14:58 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 11 Sep 2012 10:14:58 +0000 Subject: [docs] [issue15899] howto/unicode.rst doctest corrections In-Reply-To: <1347267933.09.0.504282046374.issue15899@psf.upfronthosting.co.za> Message-ID: Senthil Kumaran added the comment: Thanks!. Verified the patch, it is fine and can be applied directly on 3.2 and 3.3 branch. Tested it as well. On 2.7, some changes would be required. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 12:20:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Sep 2012 10:20:31 +0000 Subject: [docs] [issue15899] howto/unicode.rst doctest corrections In-Reply-To: <1347267716.91.0.310284408834.issue15899@psf.upfronthosting.co.za> Message-ID: <3XGMZk1gVxzQ9W@mail.python.org> Roundup Robot added the comment: New changeset 8a40bc71c072 by Senthil Kumaran in branch '3.2': Fix issue #15899: Make the unicode.rst doctests pass. Patch by Chris Jerdonek. http://hg.python.org/cpython/rev/8a40bc71c072 New changeset 1d9e89f6abec by Senthil Kumaran in branch 'default': merge. Fix issue #15899: Make the unicode.rst doctests pass. Patch by Chris Jerdonek. http://hg.python.org/cpython/rev/1d9e89f6abec ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 12:30:11 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 11 Sep 2012 10:30:11 +0000 Subject: [docs] [issue15899] howto/unicode.rst doctest corrections In-Reply-To: <1347267716.91.0.310284408834.issue15899@psf.upfronthosting.co.za> Message-ID: <1347359411.85.0.368078247221.issue15899@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I shall make the changes 2.7, keeping this open for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 12:50:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 11 Sep 2012 10:50:27 +0000 Subject: [docs] [issue15899] howto/unicode.rst doctest corrections In-Reply-To: <1347267716.91.0.310284408834.issue15899@psf.upfronthosting.co.za> Message-ID: <1347360627.57.0.849985766691.issue15899@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Senthil! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 12:57:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 11 Sep 2012 10:57:17 +0000 Subject: [docs] [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1347361037.33.0.305845411148.issue15888@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Adding Eli to this because he did some work on the HOWTO for this module in issue 14814. ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 13:35:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 11 Sep 2012 11:35:51 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1347363351.07.0.553173579574.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Andrew, do you think my changes to the patch are adequate given the response on python-dev to your question? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 14:07:30 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 11 Sep 2012 12:07:30 +0000 Subject: [docs] [issue15920] make howto/regex.rst doctests pass Message-ID: <1347365250.51.0.50908200461.issue15920@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to make the doctests in howto/regex.rst pass using vanilla doctest. After this issue, 10 out of the 17 HOWTO's will pass with vanilla doctest. Patch attached. ---------- assignee: docs at python components: Documentation files: issue-doctest-howto-regex-1.patch keywords: patch messages: 170295 nosy: cjerdonek, docs at python, orsenthil priority: normal severity: normal stage: patch review status: open title: make howto/regex.rst doctests pass versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27173/issue-doctest-howto-regex-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 15:28:23 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 11 Sep 2012 13:28:23 +0000 Subject: [docs] [issue15922] make howto/urllib2.rst doctests pass Message-ID: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to make the doctests in howto/urllib2.rst pass using vanilla doctest. Patch attached. ---------- assignee: docs at python components: Documentation files: issue-doctest-howto-urllib-1.patch keywords: easy, patch messages: 170305 nosy: cjerdonek, docs at python, orsenthil priority: normal severity: normal status: open title: make howto/urllib2.rst doctests pass versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27174/issue-doctest-howto-urllib-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 15:28:34 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 11 Sep 2012 13:28:34 +0000 Subject: [docs] [issue15922] make howto/urllib2.rst doctests pass In-Reply-To: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> Message-ID: <1347370114.52.0.977496868083.issue15922@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 18:20:26 2012 From: report at bugs.python.org (Ethan Furman) Date: Tue, 11 Sep 2012 16:20:26 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1347380426.34.0.704868840631.issue14617@psf.upfronthosting.co.za> Ethan Furman added the comment: RC2 has just been released. Any chance of this getting in to the final release? Nobobdy has pointed out any problems with the last update... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 19:02:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 11 Sep 2012 17:02:27 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <3XGXVV1sZ7zQNX@mail.python.org> Roundup Robot added the comment: New changeset 957e1eef3296 by R David Murray in branch '3.2': #14617: clarify discussion of interrelationship of __eq__ and __hash__. http://hg.python.org/cpython/rev/957e1eef3296 New changeset c8d60d0c736b by R David Murray in branch 'default': Merge #14617: clarify discussion of interrelationship of __eq__ and __hash__. http://hg.python.org/cpython/rev/c8d60d0c736b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 19:05:55 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 11 Sep 2012 17:05:55 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1347383155.13.0.283842840542.issue14617@psf.upfronthosting.co.za> R. David Murray added the comment: I rewrote the section a bit differently than you did in your patch...if you think my changes are not an improvement please let me know. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 19:15:20 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 11 Sep 2012 17:15:20 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347383720.67.0.746592558414.issue15629@psf.upfronthosting.co.za> R. David Murray added the comment: turtle uses it because that was the file that I made work when I was playing with 'make doctest'. I think being able to use the testsetup directive would be good. It could also them be used (I think!) to put resource directives in the docs that would control whether or not (eg) turtle was run via regertest '-u', making it not run by default. What make doctest does is to write the doctests out to to a file and then run them with the normal doctest tools, so there ought to be a way to integrate with it. I guess how easy that is depends on how easy it is to run sphinx on just one file...which might not be easy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 19:57:58 2012 From: report at bugs.python.org (Ethan Furman) Date: Tue, 11 Sep 2012 17:57:58 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1347383155.13.0.283842840542.issue14617@psf.upfronthosting.co.za> Message-ID: <504F7F73.3070707@stoneleaf.us> Ethan Furman added the comment: R. David Murray wrote: > I rewrote the section a bit differently than you did in your patch...if you think my changes are not an improvement please let me know. This line is incorrect: A class which defines its own :meth:`__hash__` that explicitly raises a :exc:`TypeError` would be incorrectly identified as hashable by an ``isinstance(obj, collections.Hashable)`` call. It should be "would not be correctly identified as hashable". Otherwise, looks great. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 11 20:01:01 2012 From: report at bugs.python.org (Ethan Furman) Date: Tue, 11 Sep 2012 18:01:01 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <504F7F73.3070707@stoneleaf.us> Message-ID: <504F802A.30002@stoneleaf.us> Ethan Furman added the comment: Ethan Furman wrote: > Ethan Furman added the comment: > > R. David Murray wrote: >> I rewrote the section a bit differently than you did in your patch...if you think my changes are not an improvement please let me know. > > This line is incorrect: > > A class which defines its own :meth:`__hash__` that explicitly raises a > :exc:`TypeError` would be incorrectly identified as hashable by an > ``isinstance(obj, collections.Hashable)`` call. > > It should be "would not be correctly identified as hashable". > > Otherwise, looks great. Argh. Nevermind! It all looks good. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 12 00:54:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 11 Sep 2012 22:54:54 +0000 Subject: [docs] [issue11385] TextTestRunner methods are not documented In-Reply-To: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> Message-ID: <1347404094.47.0.344420616664.issue11385@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti versions: +Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 12 07:17:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 12 Sep 2012 05:17:42 +0000 Subject: [docs] [issue15899] howto/unicode.rst doctest corrections In-Reply-To: <1347267716.91.0.310284408834.issue15899@psf.upfronthosting.co.za> Message-ID: <3XGrpT0SzxzQZQ@mail.python.org> Roundup Robot added the comment: New changeset 142fbadd0ae1 by Senthil Kumaran in branch '2.7': Fix issue #15899 - howto/unicode.rst doctest corrections for 2.7 branch. http://hg.python.org/cpython/rev/142fbadd0ae1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 12 07:19:45 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 12 Sep 2012 05:19:45 +0000 Subject: [docs] [issue15899] howto/unicode.rst doctest corrections In-Reply-To: <1347267716.91.0.310284408834.issue15899@psf.upfronthosting.co.za> Message-ID: <1347427185.34.0.390163692241.issue15899@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 12 07:19:58 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 12 Sep 2012 05:19:58 +0000 Subject: [docs] [issue15899] howto/unicode.rst doctest corrections In-Reply-To: <1347267716.91.0.310284408834.issue15899@psf.upfronthosting.co.za> Message-ID: <1347427198.83.0.643506078762.issue15899@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 12 13:52:32 2012 From: report at bugs.python.org (Julian Berman) Date: Wed, 12 Sep 2012 11:52:32 +0000 Subject: [docs] [issue11385] TextTestRunner methods are not documented In-Reply-To: <1299176734.52.0.359265322214.issue11385@psf.upfronthosting.co.za> Message-ID: <1347450752.62.0.888255718576.issue11385@psf.upfronthosting.co.za> Changes by Julian Berman : ---------- nosy: +Julian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 12 14:02:04 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 12 Sep 2012 12:02:04 +0000 Subject: [docs] [issue14617] confusing docs with regard to __hash__ In-Reply-To: <1334771728.14.0.513778784524.issue14617@psf.upfronthosting.co.za> Message-ID: <1347451324.12.0.920690328777.issue14617@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This can wait until after the release. We will have periodic point releases where further doc updates can go in. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 12 17:56:31 2012 From: report at bugs.python.org (berdario) Date: Wed, 12 Sep 2012 15:56:31 +0000 Subject: [docs] [issue15932] files in the csv documentation's examples are not closed Message-ID: <1347465391.09.0.1751065548.issue15932@psf.upfronthosting.co.za> New submission from berdario: I changed the examples to use the with statement ---------- assignee: docs at python components: Documentation files: doc.diff keywords: patch messages: 170394 nosy: berdario, docs at python, ezio.melotti priority: normal severity: normal status: open title: files in the csv documentation's examples are not closed Added file: http://bugs.python.org/file27181/doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 12 19:32:03 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 12 Sep 2012 17:32:03 +0000 Subject: [docs] [issue15932] files in the csv documentation's examples are not closed In-Reply-To: <1347465391.09.0.1751065548.issue15932@psf.upfronthosting.co.za> Message-ID: <1347471123.81.0.76303429861.issue15932@psf.upfronthosting.co.za> Brett Cannon added the comment: Quick glance at the patch LGTM. I don't have commit access handy so I can't do it myself ATM. ---------- nosy: +brett.cannon stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 12 23:26:15 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 12 Sep 2012 21:26:15 +0000 Subject: [docs] [issue15935] clarify argparse docs re: add_argument() type and default arguments Message-ID: <1347485175.79.0.860808168134.issue15935@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to clarify in the documentation the argparse behavior for which tests were added in issue 15906. The behavior involves when the type callable should be applied to default arguments. See, for example, the following comment for what roughly needs to be added: http://bugs.python.org/issue15906#msg170404 I will provide a patch. ---------- assignee: docs at python components: Documentation keywords: easy messages: 170421 nosy: barry, bethard, cjerdonek, docs at python, r.david.murray priority: normal severity: normal stage: needs patch status: open title: clarify argparse docs re: add_argument() type and default arguments type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 12 23:36:20 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 12 Sep 2012 21:36:20 +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: <1347485780.64.0.22818525456.issue10224@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 12 23:47:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 12 Sep 2012 21:47:54 +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: <1347486474.51.0.0128090806837.issue10224@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 00:09:02 2012 From: report at bugs.python.org (Jacek Bzdak) Date: Wed, 12 Sep 2012 22:09:02 +0000 Subject: [docs] [issue15936] Add link from os.urandom to random.SystemRandom Message-ID: <1347487742.57.0.57747338883.issue15936@psf.upfronthosting.co.za> New submission from Jacek Bzdak: It would be great if one sentence was added to os.urandom description: "For easy to use interface to system randomness please see random.SystemRandom class". The reason for this change is that many references quote only os.urandom as a cryptographically strong randomeness source in python, and for some people it might be not obvious that there already exists such easy to use api to use cryptographically strong randomness (that is random.SystemRandom class). It would be good to point such people to right class. Myself for example spent last hour trying to create makeshift Random subclass that uses os.urandom as it's randomness source. ---------- assignee: docs at python components: Documentation messages: 170423 nosy: Jacek.Bzdak, docs at python priority: normal severity: normal status: open title: Add link from os.urandom to random.SystemRandom type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 01:18:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 12 Sep 2012 23:18:47 +0000 Subject: [docs] [issue15935] clarify argparse docs re: add_argument() type and default arguments In-Reply-To: <1347485175.79.0.860808168134.issue15935@psf.upfronthosting.co.za> Message-ID: <1347491926.87.0.93690273317.issue15935@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching patch. ---------- keywords: +patch Added file: http://bugs.python.org/file27182/issue-15935-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 02:12:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 13 Sep 2012 00:12:36 +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: <1347495156.1.0.999738926994.issue15437@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Just an FYI that Ezio asked Georg about this issue on IRC yesterday or the day before, and Georg said +1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 10:24:44 2012 From: report at bugs.python.org (Steven Bethard) Date: Thu, 13 Sep 2012 08:24:44 +0000 Subject: [docs] [issue15935] clarify argparse docs re: add_argument() type and default arguments In-Reply-To: <1347485175.79.0.860808168134.issue15935@psf.upfronthosting.co.za> Message-ID: <1347524684.37.0.968066665949.issue15935@psf.upfronthosting.co.za> Steven Bethard added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 15:41:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 13 Sep 2012 13:41:38 +0000 Subject: [docs] [issue15939] make *.rst files in Doc/ parseable by doctest Message-ID: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> New submission from Chris Jerdonek: Currently, when trying to parse the *.rst files in the Doc/ folder (i.e. not actually running them but simply generating unittest.TestCase instances from them by passing them to doctest.DocFileSuite()), five files yield errors. This issue is to make it so that all of the *.rst files in our Doc/ folder are at least parseable by doctest without error. I will submit a patch. Below are the errors that currently occur: (1) test fdoc:library/ctypes.rst crashed -- Traceback (most recent call last): ... ValueError: line 55 of the doctest for ctypes.rst has an invalid option: '+WINDOWS' (2) test fdoc:library/doctest.rst crashed -- Traceback (most recent call last): ... ValueError: line 1592 of the docstring for doctest.rst has inconsistent leading whitespace: ' """))' (3) test fdoc:library/multiprocessing.rst crashed -- Traceback (most recent call last): ... ValueError: line 1016 of the docstring for multiprocessing.rst lacks blank after >>>: '>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>' (4) test fdoc:whatsnew/2.4.rst crashed -- Traceback (most recent call last): ... ValueError: line 1422 of the docstring for 2.4.rst lacks blank after >>>: ' >>>"""' (5) test fdoc:whatsnew/2.7.rst crashed -- Traceback (most recent call last): ... ValueError: line 1531 of the docstring for 2.7.rst lacks blank after .: ' ...' ---------- assignee: docs at python components: Documentation messages: 170441 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: make *.rst files in Doc/ parseable by doctest versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 15:53:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 13 Sep 2012 13:53:51 +0000 Subject: [docs] [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1347544431.6.0.19277446377.issue15939@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The attached patch addresses all but Doc/library/ctypes.rst. See the following python-dev e-mail for a question about how best to handle that case: http://mail.python.org/pipermail/python-dev/2012-September/121721.html ---------- keywords: +patch Added file: http://bugs.python.org/file27185/issue-15935-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 17:10:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 13 Sep 2012 15:10:03 +0000 Subject: [docs] [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1347549003.76.0.504123969128.issue15939@psf.upfronthosting.co.za> Changes by Chris Jerdonek : Removed file: http://bugs.python.org/file27185/issue-15935-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 17:10:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 13 Sep 2012 15:10:25 +0000 Subject: [docs] [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1347549025.61.0.845237868486.issue15939@psf.upfronthosting.co.za> Changes by Chris Jerdonek : Added file: http://bugs.python.org/file27186/issue-15939-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 18:58:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 13 Sep 2012 16:58:28 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347555506.62.0.0226280736311.issue15629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attached is a file of doctest statistics (counts of example failures, exceptions, and successes) for almost every file in the Doc directory when running the doctests with vanilla doctest. I did this to get a sense of which files it would be easiest to get into a "passing" state, and to see how many files actually have doctest examples. It was actually non-trivial to get fine-grained test result data like this because doctest only exposes the ability to create a unittest.TestCase for each file (i.e. an entire file either registers as a success or failure). >From the API, you can't get results down to the level of individual doctest examples. See also issue 15938 that I recently created which would be a small step in this direction (getting a total example count independent of successes and failures). ---------- Added file: http://bugs.python.org/file27187/doctest-stats-1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 20:03:47 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Sep 2012 18:03:47 +0000 Subject: [docs] [issue15940] Time module: effect of locale Message-ID: <1347559427.35.0.589419592153.issue15940@psf.upfronthosting.co.za> New submission from Terry J. Reedy: "Module locale Internationalization services. The locale settings can affect the return values for some of the functions in the time module." This is vague and perhaps misleading. The doc also says "Locale information is not used by asctime()." "Locale information is not used by ctime()." Since ctime() = asctime(localtime()), this implies to me that locale is also not used by localtime. Otherwise, locale information would indirectly be used by ctime. (I did not test this directly because I do not know what a legal locale name is on Windows. The doc example 'de_DE' does not work.) Doc also says "time.strftime(format[, t]) %a Locale?s abbreviated weekday name. ... " So perhaps the doc should say "The locale setting affects the interpretation of many format specifiers in strftime and strptime". If is does anything else, what? ---------- assignee: docs at python components: Documentation messages: 170448 nosy: belopolsky, docs at python, haypo, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Time module: effect of locale versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 20:07:21 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 13 Sep 2012 18:07:21 +0000 Subject: [docs] [issue15941] Time module: effect of time.timezone change Message-ID: <1347559641.51.0.772200483389.issue15941@psf.upfronthosting.co.za> New submission from Terry J. Reedy: "time.timezone The offset of the local (non-DST) timezone, in seconds west of UTC (negative in most of Western Europe, positive in the US, zero in the UK)." Quite aside from #9305 (UTC is not a place), this does not specify the effect of setting this attribute. It does not change the output of localtime, asctime, or ctime (on Windows). Does is affect anything else? strftime? If setting it has no effect, the doc should say so. (And then perhaps it should be made read-only in the future, as setting it expecting an effect would be a bug.) ---------- assignee: docs at python components: Documentation messages: 170450 nosy: belopolsky, docs at python, haypo, terry.reedy priority: normal severity: normal stage: needs patch status: open title: Time module: effect of time.timezone change versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 13 20:32:29 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Sep 2012 18:32:29 +0000 Subject: [docs] [issue15940] Time module: effect of locale In-Reply-To: <1347559427.35.0.589419592153.issue15940@psf.upfronthosting.co.za> Message-ID: <1347561149.11.0.494155701848.issue15940@psf.upfronthosting.co.za> R. David Murray added the comment: Since localtime() returns numbers, it is trivially true that localtime is not affected by locale. Your more specific phrasing is correct, I think. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 00:59:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Sep 2012 22:59:52 +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: <3XHwKZ2596zQkd@mail.python.org> Roundup Robot added the comment: New changeset 48185b0f7b8a by Ezio Melotti in branch '3.2': #15437, #15439: merge Doc/ACKS.txt with Misc/ACKS and modify Doc/about.rst accordingly. http://hg.python.org/cpython/rev/48185b0f7b8a New changeset 2b4a89f82485 by Ezio Melotti in branch 'default': #15437, #15439: merge with 3.2. http://hg.python.org/cpython/rev/2b4a89f82485 New changeset 76dd082d332e by Ezio Melotti in branch '2.7': #15437, #15439: merge Doc/ACKS.txt with Misc/ACKS and modify Doc/about.rst accordingly. http://hg.python.org/cpython/rev/76dd082d332e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 00:59:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Sep 2012 22:59:52 +0000 Subject: [docs] [issue15439] Include Misc/ACKS names into the documentation In-Reply-To: <1343130700.15.0.452973615172.issue15439@psf.upfronthosting.co.za> Message-ID: <3XHwKb0T1qzQjv@mail.python.org> Roundup Robot added the comment: New changeset 48185b0f7b8a by Ezio Melotti in branch '3.2': #15437, #15439: merge Doc/ACKS.txt with Misc/ACKS and modify Doc/about.rst accordingly. http://hg.python.org/cpython/rev/48185b0f7b8a New changeset 2b4a89f82485 by Ezio Melotti in branch 'default': #15437, #15439: merge with 3.2. http://hg.python.org/cpython/rev/2b4a89f82485 New changeset 76dd082d332e by Ezio Melotti in branch '2.7': #15437, #15439: merge Doc/ACKS.txt with Misc/ACKS and modify Doc/about.rst accordingly. http://hg.python.org/cpython/rev/76dd082d332e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 01:11:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 13 Sep 2012 23:11:41 +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: <1347577901.44.0.0287868483358.issue15437@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the script! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 01:12:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 13 Sep 2012 23:12:14 +0000 Subject: [docs] [issue15439] Include Misc/ACKS names into the documentation In-Reply-To: <1343130700.15.0.452973615172.issue15439@psf.upfronthosting.co.za> Message-ID: <1347577934.26.0.694307690542.issue15439@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 01:17:00 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 13 Sep 2012 23:17:00 +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: <1347578220.75.0.438043444468.issue15437@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for committing, Ezio! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 02:51:23 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 14 Sep 2012 00:51:23 +0000 Subject: [docs] [issue15941] Time module: effect of time.timezone change In-Reply-To: <1347559641.51.0.772200483389.issue15941@psf.upfronthosting.co.za> Message-ID: <1347583883.07.0.712199985255.issue15941@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Isn't this a duplicate of issue 8810? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 03:02:39 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 14 Sep 2012 01:02:39 +0000 Subject: [docs] [issue15941] Time module: effect of time.timezone change In-Reply-To: <1347559641.51.0.772200483389.issue15941@psf.upfronthosting.co.za> Message-ID: <1347584559.69.0.586430204713.issue15941@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I've read this more carefully and I now understand the issue. Indeed, setting time.timezone or time.altzone has no effect on say time.strftime('%z'). I think this should be documented and the doc should refer to time.tzset() for a proper way to change these variables. As for making them read only, I don't think there is a non-hackish way to make module globals read-only. I also believe that rather than improving these variables we should encourage people to use datetime module's new timezone features because at almost any location on Earth timezone offset is not a constant and varies over time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 04:00:37 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Sep 2012 02:00:37 +0000 Subject: [docs] [issue15941] Time module: effect of time.timezone change In-Reply-To: <1347559641.51.0.772200483389.issue15941@psf.upfronthosting.co.za> Message-ID: <1347588037.03.0.680489739789.issue15941@psf.upfronthosting.co.za> Terry J. Reedy added the comment: #8810 and #9305 seem related, if not dups. You are right about module vars. They are all instances of one module class with one __setattr__. How about "Setting this attribute has no effect. See time.TZset or even better, the datetime module." (I had not noticed .altzone) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 04:48:24 2012 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 14 Sep 2012 02:48:24 +0000 Subject: [docs] [issue15941] Time module: effect of time.timezone change In-Reply-To: <1347559641.51.0.772200483389.issue15941@psf.upfronthosting.co.za> Message-ID: <1347590904.67.0.455086375317.issue15941@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Setting this attribute has no effect. Strictly speaking, setting this attribute has the effect of changing the value of this attribute. I cannot come up with a better wording at this hour, but I would say something about it being "informational" only. We should also mention that these attributes are set by time.tzset(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 06:00:54 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Sep 2012 04:00:54 +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: <3XJ30w0RZ0zQhN@mail.python.org> Roundup Robot added the comment: New changeset b01eb870f84f by Ezio Melotti in branch '3.2': #15831: document multiple signatures on different lines. Patch by Chris Jerdonek. http://hg.python.org/cpython/rev/b01eb870f84f New changeset 0ed61ee823d8 by Ezio Melotti in branch 'default': #15831: merge with 3.2 http://hg.python.org/cpython/rev/0ed61ee823d8 New changeset 2291aff20a05 by Ezio Melotti in branch '2.7': #15831: document multiple signatures on different lines. Patch by Chris Jerdonek. http://hg.python.org/cpython/rev/2291aff20a05 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 06:04:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Sep 2012 04:04:05 +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: <1347595445.57.0.931962527437.issue15831@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 report at bugs.python.org Fri Sep 14 19:19:04 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 14 Sep 2012 17:19:04 +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: <1347643144.43.0.224553762668.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Ezio! By the way, I didn't do a thorough check, but I noticed this difference in the 2.7 application of the patch. The *key* argument for max() needs to be marked keyword-only. This difference doesn't exist for the min() function. Or are we not using the "bare *" notation in the 2.7 docs? If not, the min() docs need to be changed instead (and possibly in several other places). Default branch: -.. function:: max(iterable[, args...], *[, key]) +.. function:: max(iterable, *[, key]) + max(arg1, arg2, *args[, key]) 2.7 branch: -.. function:: max(iterable[, args...][key]) +.. function:: max(iterable[, key]) + max(arg1, arg2, *args[, key]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 14 19:34:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 14 Sep 2012 17:34:13 +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: <1347644053.71.0.434190606172.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Someone pointed out that keyword-only arguments were introduced only in 3.0, but I'm not sure whether that means we can't use them as a notational device in the 2.7 docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 03:00:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 15 Sep 2012 01:00:48 +0000 Subject: [docs] [issue15935] clarify argparse docs re: add_argument() type and default arguments In-Reply-To: <1347485175.79.0.860808168134.issue15935@psf.upfronthosting.co.za> Message-ID: <1347670847.71.0.033233465393.issue15935@psf.upfronthosting.co.za> Chris Jerdonek added the comment: If this looks good, can one of you three (Steven, Barry, or David) commit it in the three branches? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 03:10:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 15 Sep 2012 01:10: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: <1347671431.93.0.92031245001.issue15831@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Since the bare * notation wasn't added until 3.0, my guess is that we want to remove the * below (from the 2.7 application of the patch) rather than adding it back in the max() function I pasted above: -.. function:: min(iterable[, args...][key]) +.. function:: min(iterable, *[, key]) + min(arg1, arg2, *args[, key]) ---------- resolution: fixed -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 03:46:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Sep 2012 01:46:12 +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: <3XJbzR3WFCzQ4V@mail.python.org> Roundup Robot added the comment: New changeset 881acdf9133f by Ezio Melotti in branch '2.7': #15831: avoid using 3.x syntax for keyword-only args. http://hg.python.org/cpython/rev/881acdf9133f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 03:47:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Sep 2012 01:47:49 +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: <1347673669.29.0.668959791801.issue15831@psf.upfronthosting.co.za> Ezio Melotti added the comment: The * is not supposed to be used on 2.7, but I missed that. Thanks for noticing! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 04:52:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Sep 2012 02:52:52 +0000 Subject: [docs] [issue15932] files in the csv documentation's examples are not closed In-Reply-To: <1347465391.09.0.1751065548.issue15932@psf.upfronthosting.co.za> Message-ID: <3XJdSM05frzQ8k@mail.python.org> Roundup Robot added the comment: New changeset ade667076c14 by Ezio Melotti in branch '2.7': #15932: use with statement in csv doc examples. http://hg.python.org/cpython/rev/ade667076c14 New changeset 8a06fb321074 by Ezio Melotti in branch '3.2': #15932: use with statement in csv doc examples. Patch by Dario Bertini. http://hg.python.org/cpython/rev/8a06fb321074 New changeset a5a8d255daee by Ezio Melotti in branch 'default': #15932: merge with 3.2. http://hg.python.org/cpython/rev/a5a8d255daee ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 04:53:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Sep 2012 02:53:49 +0000 Subject: [docs] [issue15932] files in the csv documentation's examples are not closed In-Reply-To: <1347465391.09.0.1751065548.issue15932@psf.upfronthosting.co.za> Message-ID: <1347677629.31.0.989666875177.issue15932@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 05:00:32 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Sep 2012 03:00:32 +0000 Subject: [docs] [issue15922] make howto/urllib2.rst doctests pass In-Reply-To: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> Message-ID: <1347678032.31.0.0230956631906.issue15922@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 07:20:03 2012 From: report at bugs.python.org (Chris Rebert) Date: Sat, 15 Sep 2012 05:20:03 +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: <1347686402.96.0.75772084078.issue15789@psf.upfronthosting.co.za> Chris Rebert added the comment: Ping. Any further comments? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 07:35:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Sep 2012 05:35:02 +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: <3XJj3T1Vd2zPJJ@mail.python.org> Roundup Robot added the comment: New changeset 820032281f49 by Ezio Melotti in branch '2.7': #15789: mention shell-like parts of the stdlib in the subprocess docs. Patch by Chris Rebert. http://hg.python.org/cpython/rev/820032281f49 New changeset 9794f69c1d09 by Ezio Melotti in branch '3.2': #15789: mention shell-like parts of the stdlib in the subprocess docs. Patch by Chris Rebert. http://hg.python.org/cpython/rev/9794f69c1d09 New changeset 09011896374d by Ezio Melotti in branch 'default': #15789: merge with 3.2. http://hg.python.org/cpython/rev/09011896374d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 07:36:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Sep 2012 05:36:02 +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: <1347687362.86.0.834396886357.issue15789@psf.upfronthosting.co.za> Ezio Melotti added the comment: Pong, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 08:04:08 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Sep 2012 06:04:08 +0000 Subject: [docs] [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1347689048.98.0.251557207064.issue15888@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 08:05:52 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Sep 2012 06:05:52 +0000 Subject: [docs] [issue15920] make howto/regex.rst doctests pass In-Reply-To: <1347365250.51.0.50908200461.issue15920@psf.upfronthosting.co.za> Message-ID: <1347689152.69.0.408718362889.issue15920@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 08:09:05 2012 From: report at bugs.python.org (Chris Rebert) Date: Sat, 15 Sep 2012 06:09:05 +0000 Subject: [docs] [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1347689345.25.0.65047784488.issue14570@psf.upfronthosting.co.za> Chris Rebert added the comment: Any reactions? The patch is pretty straightforward... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 08:12:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Sep 2012 06:12:54 +0000 Subject: [docs] [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1347689574.28.0.273339150777.issue14570@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +petri.lehtinen stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 18:35:10 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 15 Sep 2012 16:35:10 +0000 Subject: [docs] [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1347726910.72.0.866008036834.issue14570@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I would recommend making the added and modified lines not exceed 79 characters in both files. Also, for the .rst file, you can use slashes to break lines as shown in the following example: http://hg.python.org/cpython/file/09011896374d/Doc/library/argparse.rst#l133 ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 18:37:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 15 Sep 2012 16:37:35 +0000 Subject: [docs] [issue14570] Document json "sort_keys" parameter properly In-Reply-To: <1334284947.71.0.88941407788.issue14570@psf.upfronthosting.co.za> Message-ID: <1347727055.62.0.0149131813087.issue14570@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Also, while not strictly necessary, it is more customary and convenient to provide a single patch file for all files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 19:00:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 15 Sep 2012 17:00:19 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated Message-ID: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> New submission from Chris Jerdonek: docs.python.org doesn't seem to be getting updated anymore. For example, this revision from Tuesday, Sept 11 is not reflected: http://hg.python.org/cpython/rev/c8d60d0c736b ---------- assignee: docs at python components: Documentation messages: 170525 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: docs.python.org not getting updated _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 21:53:41 2012 From: report at bugs.python.org (Chris Rebert) Date: Sat, 15 Sep 2012 19:53:41 +0000 Subject: [docs] [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1347738821.99.0.291464052558.issue14616@psf.upfronthosting.co.za> Changes by Chris Rebert : Added file: http://bugs.python.org/file27196/subprocess.rst-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 21:54:42 2012 From: report at bugs.python.org (Chris Rebert) Date: Sat, 15 Sep 2012 19:54:42 +0000 Subject: [docs] [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1347738882.66.0.0496611007112.issue14616@psf.upfronthosting.co.za> Chris Rebert added the comment: Updated patches to mention pipes.quote(). ---------- Added file: http://bugs.python.org/file27197/subprocess.rst-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 15 21:54:51 2012 From: report at bugs.python.org (Chris Rebert) Date: Sat, 15 Sep 2012 19:54:51 +0000 Subject: [docs] [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1347738891.72.0.931772822845.issue14616@psf.upfronthosting.co.za> Changes by Chris Rebert : Removed file: http://bugs.python.org/file25570/subprocess_shlex_quote.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 16 01:32:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Sep 2012 23:32:10 +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: <1347751930.92.0.404781114555.issue15606@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 16 06:44:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 16 Sep 2012 04:44:47 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1347770687.3.0.165663082003.issue15949@psf.upfronthosting.co.za> Ezio Melotti added the comment: http://docs.python.org/dev/py3k/reference/datamodel.html says "Last updated on Sep 11, 2012". ---------- nosy: +ezio.melotti, georg.brandl type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 16 20:41:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Sep 2012 18:41:24 +0000 Subject: [docs] [issue15796] Fix readline() docstrings In-Reply-To: <1346107437.01.0.760856446484.issue15796@psf.upfronthosting.co.za> Message-ID: <1347820884.48.0.442809504771.issue15796@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 16 21:59:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 16 Sep 2012 19:59:51 +0000 Subject: [docs] [issue15952] format(value) and value.__format__() behave differently with unicode format Message-ID: <1347825591.49.0.625826586182.issue15952@psf.upfronthosting.co.za> New submission from Chris Jerdonek: format(value) and value.__format__() behave differently even though the documentation says otherwise: "Note: format(value, format_spec) merely calls value.__format__(format_spec)." (from http://docs.python.org/library/functions.html?#format ) The difference happens when the format string is unicode. For example: >>> format(10, u'n') u'10' >>> (10).__format__(u'n') # parentheses needed to prevent SyntaxError '10' So either the documentation should be changed, or the behavior should be changed to match. Related to this: neither the "Format Specification Mini-Language" documentation nor the string.Formatter docs seem to say anything about the effect that a unicode format string should have on the return value (in particular, should it cause the return value to be unicode or not): http://docs.python.org/library/string.html#formatspec http://docs.python.org/library/string.html#string-formatting See also issue 15276 (int formatting), issue 15951 (empty format string), and issue 7300 (unicode arguments). ---------- assignee: docs at python components: Documentation messages: 170575 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: format(value) and value.__format__() behave differently with unicode format type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 16 22:01:37 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 16 Sep 2012 20:01:37 +0000 Subject: [docs] [issue15952] format(value) and value.__format__() behave differently with unicode format In-Reply-To: <1347825591.49.0.625826586182.issue15952@psf.upfronthosting.co.za> Message-ID: <1347825697.42.0.323315401406.issue15952@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 16 23:34:33 2012 From: report at bugs.python.org (Aaron Iles) Date: Sun, 16 Sep 2012 21:34:33 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347831273.85.0.960129019243.issue15629@psf.upfronthosting.co.za> Changes by Aaron Iles : ---------- nosy: +aliles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 04:24:34 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 17 Sep 2012 02:24:34 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347848674.09.0.160441602188.issue15629@psf.upfronthosting.co.za> Changes by Ezio Melotti : Added file: http://bugs.python.org/file27206/issue15629-3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 04:37:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Sep 2012 02:37:37 +0000 Subject: [docs] [issue15920] make howto/regex.rst doctests pass In-Reply-To: <1347365250.51.0.50908200461.issue15920@psf.upfronthosting.co.za> Message-ID: <3XKs1q6YX3zQjP@mail.python.org> Roundup Robot added the comment: New changeset f98f46f7f11b by Ezio Melotti in branch '3.2': #15920: fix doctests in Doc/howto/regex.rst. Patch by Chris Jerdonek. http://hg.python.org/cpython/rev/f98f46f7f11b New changeset ef44e1b740cb by Ezio Melotti in branch 'default': #15920: merge with 3.2. http://hg.python.org/cpython/rev/ef44e1b740cb New changeset 19601d451d4c by Ezio Melotti in branch '2.7': #15920: fix doctests in Doc/howto/regex.rst. Patch by Chris Jerdonek. http://hg.python.org/cpython/rev/19601d451d4c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 04:38:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 17 Sep 2012 02:38:16 +0000 Subject: [docs] [issue15920] make howto/regex.rst doctests pass In-Reply-To: <1347365250.51.0.50908200461.issue15920@psf.upfronthosting.co.za> Message-ID: <1347849496.42.0.534988399203.issue15920@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the patch! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 08:09:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 17 Sep 2012 06:09:22 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347862161.91.0.361098434771.issue15629@psf.upfronthosting.co.za> Ezio Melotti added the comment: We discussed about this on IRC, and I'll try to summarize the outcomes. If we want devs to run doctests, the syntax should be as simple as possible, ideally there shouldn't be any extra syntax -- at least for the common case. Note that there are two kind of doctests: * the ones in the *.rst files in the Doc dir; * the ones in the docstrings of the *.py files in the Lib dir; Some of the use cases are: 1) being able to run all the doctests at once; 2) being able to run individual doctests files; 3) being able to discover/run doctests in a specified dir; The use case 1) likely needs an extra flag (e.g. --docall), and could be done by default with -uall. The use case 2) can be already done with `./python -m doctest path/to/doctest.rst`, but, if doctest support is added to regrtest, it would be nice to have this too. The following issues were discussed: * should regrtest accept them with no extra syntax (e.g. `./python -m test path/to/doctest.rst` -- this would be nice but probably tricky/hackish) or should they marked somehow (e.g. `fdoc:path/to/doctest.rst`, or `--doctests path/to/doctest1.rst path/to/doctest2.rst`)? * should we use paths (e.g. Doc/library/textwrap.rst -- easier) or dotted names (e.g. Doc.library.textwrap -- more consistent with unittests)? * should we require the full path/name, or just the filename like we do with regular unittests (e.g. `-m test test_textwrap`)? * should we use the fact that Doc/Lib or rst/py are in the name to distinguish the doctests, or can we search for the name in Lib/test/ first, and fallback on Doc/ and Lib/ if it's not there? The use case 3) is less common, it can be provided with an additional flag but it's not strictly necessary IMHO (might be handy when we want to run all the doctests in a package). Other issues that we haven't discussed are: * it would be nice to have something like run_doctests(['path/to/doctest.rst', 'path/to/module.py']) to be added in the test_module and be called automatically by `-m test test_module`; * which way should be used to mark the files/snippets as doctest-compatible; * how to have a doctest equivalent to setUp/tearDown (this is optional, we can always skip the test if it fails without initialization); (FTR: I was trying the patch on 3.2 and since there were a few conflicts I uploaded the resulting patch in case anyone needs it -- this doesn't mean it should go on 3.2 though.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 08:12:02 2012 From: report at bugs.python.org (Mike Hoy) Date: Mon, 17 Sep 2012 06:12:02 +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: <1347862322.18.0.469736971854.issue11643@psf.upfronthosting.co.za> Changes by Mike Hoy : ---------- nosy: +mikehoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 08:21:40 2012 From: report at bugs.python.org (Mike Hoy) Date: Mon, 17 Sep 2012 06:21:40 +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: <1347862900.35.0.457184497411.issue11643@psf.upfronthosting.co.za> Mike Hoy added the comment: So we could fix this in reverse? Remove the |version| and replace them with X.Y since |version| doesn't expand within :file:? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 08:26:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 17 Sep 2012 06:26:11 +0000 Subject: [docs] [issue15952] format(value) and value.__format__() behave differently with unicode format In-Reply-To: <1347825591.49.0.625826586182.issue15952@psf.upfronthosting.co.za> Message-ID: <1347863171.14.0.406711320106.issue15952@psf.upfronthosting.co.za> Chris Jerdonek added the comment: See this code comment: /* don't define FORMAT_LONG, FORMAT_FLOAT, and FORMAT_COMPLEX, since we can live with only the string versions of those. The builtin format() will convert them to unicode. */ from http://hg.python.org/cpython/file/19601d451d4c/Python/formatter_unicode.c In other words, it was deliberate not to make value.__format__(format_spec) return unicode when format_spec is unicode. So the docs should be adjusted to say that they are not always the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 09:01:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Sep 2012 07:01:13 +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: <3XKysz4Dc9zNyd@mail.python.org> Roundup Robot added the comment: New changeset de6976fe19aa by Ezio Melotti in branch '2.7': #11643: fix rst markup error in site.rst. http://hg.python.org/cpython/rev/de6976fe19aa New changeset 7aca2781c381 by Ezio Melotti in branch '3.2': #11643: fix rst markup error in site.rst. http://hg.python.org/cpython/rev/7aca2781c381 New changeset c6892ce7e56f by Ezio Melotti in branch 'default': #11643: merge with 3.2. http://hg.python.org/cpython/rev/c6892ce7e56f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 09:03:51 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 17 Sep 2012 07:03:51 +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: <1347865431.64.0.333129285419.issue11643@psf.upfronthosting.co.za> Ezio Melotti added the comment: I fixed the one in site.py. If there's no way to use |version| in :file:`...` I think using {X.Y} is OK, so that can be done where a bare X.Y (without {}) is currently used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 11:13:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Sep 2012 09:13:44 +0000 Subject: [docs] [issue15953] Incorrect some fields declaration in the PyTypeObject documentation Message-ID: <1347873224.57.0.93636410461.issue15953@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The declaration of some fields in the PyTypeObject documentation does not match the sources. Here is a patch that fixes the mismatch. ---------- assignee: docs at python components: Documentation files: doc_newtypes.patch keywords: easy, patch messages: 170591 nosy: docs at python, storchaka priority: normal severity: normal status: open title: Incorrect some fields declaration in the PyTypeObject documentation versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27207/doc_newtypes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 13:58:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 17 Sep 2012 11:58:07 +0000 Subject: [docs] [issue15922] make howto/urllib2.rst doctests pass In-Reply-To: <1347370103.61.0.784697754485.issue15922@psf.upfronthosting.co.za> Message-ID: <1347883087.93.0.826021213894.issue15922@psf.upfronthosting.co.za> Ezio Melotti added the comment: + >>> try: + ... urllib.request.urlopen(req) + ... except urllib.error.URLError as e: + ... print("Error opening url.") + ... # E.g. "[Errno 8] nodename nor servname provided, or not known" + ... print("Reason:", e.reason) #doctest: +ELLIPSIS + Error opening url. + Reason: ... I think the previous version was clearer, so maybe this should be a skip. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 14:30:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Sep 2012 12:30:50 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347885050.5.0.0338961722505.issue15629@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think I'm -1 to run doctests as part of regrtest. Documentation examples are meant to be read, not executed: it is fine for them to omit unimportant information or trivial boilerplate (such as imports). Any complication in the way doc examples must be written will deter us from actually writing examples. Furthermore, spreading unit tests in the doc files instead of Lib/test files will make maintenance of tests more tedious as well. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 14:43:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 17 Sep 2012 12:43:54 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347885834.34.0.581638279567.issue15629@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Documentation examples are meant to be read, not executed I agree, but several of them already run, and others run with the addition of doctests directives (that are hidden in the html output). If the code needs to be changed in a way that is less readable, the test can just be skipped. > Furthermore, spreading unit tests in the doc files instead of Lib/test > files will make maintenance of tests more tedious as well. Tests should be kept in Lib/test, this is mostly to make sure that the examples are correct. The examples in the docs should still be written with the goal to be clear for the user -- being valid doctests is a secondary goal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 14:46:46 2012 From: report at bugs.python.org (Eric V. Smith) Date: Mon, 17 Sep 2012 12:46:46 +0000 Subject: [docs] [issue15952] format(value) and value.__format__() behave differently with unicode format In-Reply-To: <1347825591.49.0.625826586182.issue15952@psf.upfronthosting.co.za> Message-ID: <1347886006.27.0.52984034566.issue15952@psf.upfronthosting.co.za> Eric V. Smith added the comment: I believe the conversion is happening in Objects/abstract.c in PyObject_Format, around line 864, near this comment: /* Convert to unicode, if needed. Required if spec is unicode and result is str */ I think changing the docs will result in more confusion than clarity, but if you can come up with some good wording, I'd be okay with it. I think changing the code will likely break things with little or no benefit. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 16:20:23 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 17 Sep 2012 14:20:23 +0000 Subject: [docs] [issue14616] subprocess docs should mention pipes.quote/shlex.quote In-Reply-To: <1334769157.78.0.557014485739.issue14616@psf.upfronthosting.co.za> Message-ID: <1347891623.15.0.268546894129.issue14616@psf.upfronthosting.co.za> ?ric Araujo added the comment: You thought it was better not to mention that pipes.quote is semi-official and becomes public as shlex.quote in 3.3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 16:24:50 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Sep 2012 14:24:50 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347891890.16.0.117468648987.issue15629@psf.upfronthosting.co.za> R. David Murray added the comment: I've given this some more thought, and I'm leaning toward Antoine's POV here. The point of running the doctests in the docs is not to test python, but to test the docs. Sphinx has a facility to do that: make doctest. So I think it is better to use that doc-specific infrastructure to test the docs. This also allows us to use the full Sphinx facilities to work with those doctests, which includes hiding the not-necessary-for-docs bits. I think we should be moving *away* from having special infrastructure in regrtest. As much stuff as makes sense should be moved to unittest, and we've been slowly doing that. Correspondingly, we should use Sphinx's native test facilities, not add special stuff to regrtest. If Sphinx doesn't have the ability to run individual files, we should add that ability to Sphinx, not regrtest. (Note: I personally do not use the ability recently added to regrtest to select unit tests from the command line, instead I use the unittest CLI directly, and I think that's the better way to do it. IMO regrtest should be focused on running the test *suite*, not on running individual tests.) Once we've refined the docs so that 'make doctest' runs cleanly, we should automate the testing of the docs in some fashion. One way to do that would be to define a test module that handles the interfacing with Sphinx, and is controlled by a resource that is *not* included in -uall, and is then explicitly enabled on certain buildbots. Doctests in module files could be handled the same way: build a test module that does whatever autodiscovery is needed, and control it via a resource not included in -uall. (I am, however, open to the argument that this one should be included in -uall.) Again, there already exists a way to invoke individual files, using the native doctest facilities. So adding hooks to regrtest is not really needed, IMO. Also again, if the doctest CLI is lacking, the improvement should go into doctest. IMO :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 16:38:45 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Sep 2012 14:38:45 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1347891890.16.0.117468648987.issue15629@psf.upfronthosting.co.za> Message-ID: <1347892695.3340.7.camel@localhost.localdomain> Antoine Pitrou added the comment: > I think we should be moving *away* from having special infrastructure > in regrtest. As much stuff as makes sense should be moved to > unittest, and we've been slowly doing that. Correspondingly, we > should use Sphinx's native test facilities, not add special stuff to > regrtest. If Sphinx doesn't have the ability to run individual files, > we should add that ability to Sphinx, not regrtest. (Note: I > personally do not use the ability recently added to regrtest to select > unit tests from the command line, instead I use the unittest CLI > directly, and I think that's the better way to do it. IMO regrtest > should be focused on running the test *suite*, not on running > individual tests.) The main reason to add it to regrtest was to allow special test modes with it (such as -R or -F). (and, also, the unittest CLI's poor online help makes it rather unusable for me :-)). But I agree on the principle that unittest should be expanded to better accomodate the needs of regrtest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 16:42:08 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 17 Sep 2012 14:42:08 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347892928.09.0.800311939212.issue15629@psf.upfronthosting.co.za> ?ric Araujo added the comment: RDM?s arguments make a lot of sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 16:46:50 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 17 Sep 2012 14:46:50 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347893210.76.0.601293219067.issue15629@psf.upfronthosting.co.za> R. David Murray added the comment: We should improve the unittest help, then :) I will also note that the couple of times I tried it I couldn't figure out how to use the regrtest test selection :) What we probably need for regrtest is a way to pass through a "selection string" from the regrtest command line to the unittest test discovery, and then run the selected tests under regrtest control. The same could apply to Sphinx doctests and module doctests. This may require adding APIs to those packages (unittest may already have the necessary API). I think the Sphinx case is the one that will take the most work to accomplish, but I also think it is worth the effort to do that rather than adding CPython-specific stuff to regrtest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 17:05:58 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 17 Sep 2012 15:05:58 +0000 Subject: [docs] [issue15629] Add to regrtest the ability to run Lib and Doc doctests In-Reply-To: <1344779660.84.0.741331364071.issue15629@psf.upfronthosting.co.za> Message-ID: <1347894358.53.0.729130968149.issue15629@psf.upfronthosting.co.za> Brett Cannon added the comment: I should mention that http://bugs.python.org/issue10967 exists as a meta issue about trying to gut regrtest in favour of using other things in unittest (and doctest in this case) when possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 17 18:59:55 2012 From: report at bugs.python.org (Cliff Dyer) Date: Mon, 17 Sep 2012 16:59:55 +0000 Subject: [docs] [issue15957] README.txt points to broken "contributing" url in python wiki Message-ID: <1347901195.54.0.476141478032.issue15957@psf.upfronthosting.co.za> New submission from Cliff Dyer: The README.txt file for distutils2 points to , which raises a 404. The correct URL is . The attached patch fixes this typo. ---------- assignee: docs at python components: Distutils2, Documentation files: broken_link.diff keywords: patch messages: 170617 nosy: alexis, docs at python, jcd, tarek priority: normal severity: normal status: open title: README.txt points to broken "contributing" url in python wiki Added file: http://bugs.python.org/file27209/broken_link.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 18 06:21:51 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Sep 2012 04:21:51 +0000 Subject: [docs] [issue15796] Fix readline() docstrings In-Reply-To: <1346107437.01.0.760856446484.issue15796@psf.upfronthosting.co.za> Message-ID: <3XLWHd5dvQzNjr@mail.python.org> Roundup Robot added the comment: New changeset 210a189544c3 by Ezio Melotti in branch '2.7': #15796: Fix \n in readline docstring. http://hg.python.org/cpython/rev/210a189544c3 New changeset 6386e1f4f1fd by Ezio Melotti in branch '3.2': #15796: Fix \n in readline docstring. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/6386e1f4f1fd New changeset 3a880d640981 by Ezio Melotti in branch 'default': #15796: merge with 3.2. http://hg.python.org/cpython/rev/3a880d640981 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 18 06:22:41 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 18 Sep 2012 04:22:41 +0000 Subject: [docs] [issue15796] Fix readline() docstrings In-Reply-To: <1346107437.01.0.760856446484.issue15796@psf.upfronthosting.co.za> Message-ID: <1347942161.5.0.624505876605.issue15796@psf.upfronthosting.co.za> Ezio Melotti added the comment: Pong, thanks for the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 18 14:19:54 2012 From: report at bugs.python.org (=?utf-8?q?Nacsa_Krist=C3=B3f?=) Date: Tue, 18 Sep 2012 12:19:54 +0000 Subject: [docs] [issue15962] Windows STDIN/STDOUT Redirection is actually FIXED Message-ID: <1347970794.78.0.910609008076.issue15962@psf.upfronthosting.co.za> New submission from Nacsa Krist?f: The Python docs faq says that due to a bug in Windows NT's cmd.exe, the output redirection and piping won't work when started from file extension. http://docs.python.org/faq/windows.html#how-do-i-make-python-scripts-executable http://docs.python.org/py3k/faq/windows.html#how-do-i-make-python-scripts-executable This is actually fixed in Windows, but the fix is disabled by default, and you need to enable it in regedit, the keyword is "InheritConsoleHandles". Proof & Details: http://support.microsoft.com/default.aspx?kbid=321788 It would be great if the docs could refer to this fix, as the docs is the major source of information for many. ---------- assignee: docs at python components: Documentation, Installation, Windows messages: 170641 nosy: Nacsa.Krist?f, docs at python priority: normal severity: normal status: open title: Windows STDIN/STDOUT Redirection is actually FIXED versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 18 14:23:34 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 18 Sep 2012 12:23:34 +0000 Subject: [docs] [issue15962] Windows STDIN/STDOUT Redirection is actually FIXED In-Reply-To: <1347970794.78.0.910609008076.issue15962@psf.upfronthosting.co.za> Message-ID: <1347971013.98.0.140839010535.issue15962@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +brian.curtin, terry.reedy, tim.golden stage: -> needs patch type: -> enhancement versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 18 21:39:26 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 18 Sep 2012 19:39:26 +0000 Subject: [docs] [issue15952] format(value) and value.__format__() behave differently with unicode format In-Reply-To: <1347825591.49.0.625826586182.issue15952@psf.upfronthosting.co.za> Message-ID: <1347997166.28.0.368742707257.issue15952@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is a proposed patch. One note on the patch. I feel the second sentence of the note is worth adding because value.__format__() departs from what PEP 3101 says: "Note for Python 2.x: The 'format_spec' argument will be either a string object or a unicode object, depending on the type of the original format string. The __format__ method should test the type of the specifiers parameter to determine whether to return a string or unicode object. It is the responsibility of the __format__ method to return an object of the proper type." The extra sentence will help in heading off and when responding to issues about value.__format__() that are similar to issue 15951. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file27218/issue-15952-1-branch-27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 18 21:44:29 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 18 Sep 2012 19:44:29 +0000 Subject: [docs] [issue15952] format(value) and value.__format__() behave differently with unicode format In-Reply-To: <1347825591.49.0.625826586182.issue15952@psf.upfronthosting.co.za> Message-ID: <1347997469.56.0.955583858095.issue15952@psf.upfronthosting.co.za> Chris Jerdonek added the comment: To clarify, one of the sentences above should have read, "I feel the second sentence of the note *in the patch* was worth adding..." (not the second sentence of the PEP note I quoted). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 18 23:35:14 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 18 Sep 2012 21:35:14 +0000 Subject: [docs] [issue15956] backreference to named group does not work In-Reply-To: <1347888827.23.0.363134887653.issue15956@psf.upfronthosting.co.za> Message-ID: <1348004114.35.0.603054885686.issue15956@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- assignee: -> docs at python nosy: +docs at python stage: committed/rejected -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 18 23:42:12 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Sep 2012 21:42:12 +0000 Subject: [docs] [issue15956] backreference to named group does not work In-Reply-To: <1347888827.23.0.363134887653.issue15956@psf.upfronthosting.co.za> Message-ID: <1348004532.86.0.62244707237.issue15956@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 19 03:49:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 19 Sep 2012 01:49:19 +0000 Subject: [docs] [issue8996] Add a default role to allow writing bare `len` instead of :func:`len` In-Reply-To: <1276528152.92.0.60611534239.issue8996@psf.upfronthosting.co.za> Message-ID: <1348019359.39.0.196860534718.issue8996@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think I'm -1 on this, for the following reasons: * it's less explicit; * it gives you less control (I'm thinking e.g. at the () added by :func:/:meth: but not :class:, so that :func:`int` and :class:`int` are rendered in different ways); * even though this might have been OK if we used it from the beginning, now we are using specific roles everywhere, and changing them will either result in a mass update or in a mixed style -- none of which are desirable; * if the mass update is done and later on we change our mind, it's difficult to switch back from `...` to :role:`...`. Disabling `...` sounds OK to me (I don't think we have many left, if any). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 19 09:47:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Sep 2012 07:47:26 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1348040846.54.0.657732126674.issue14783@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > +.. function:: int(number=0) First argument is named "x". >>> int(number=42) Traceback (most recent call last): File "", line 1, in TypeError: 'number' is an invalid keyword argument for this function >>> int(x=42) 42 + int(string, base=10) Here can be not only string, but bytes or bytearray. >>> int('42', 6) 26 >>> int(b'42', 6) 26 >>> int(bytearray(b'42'), 6) 26 ---------- nosy: +storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 19 09:58:09 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 19 Sep 2012 07:58:09 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1348041489.19.0.418718928189.issue14783@psf.upfronthosting.co.za> Ezio Melotti added the comment: > First argument is named "x". Sometimes the doc uses "better" names to improve clarity when the argument is not supposed to be called as keyword arg. > Here can be not only string, but bytes or bytearray. The same applies here. "string" is also used in the error message (int() can't convert non-string with explicit base). If bytes/bytearrays are accepted too it could be mentioned later in the prose. Otherwise we could use x for both, but the distinction would be less clear. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 19 21:52:01 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 19 Sep 2012 19:52:01 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348084321.81.0.197871435819.issue15949@psf.upfronthosting.co.za> Chris Jerdonek added the comment: It has been 8 days since the last update. ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 01:48:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 19 Sep 2012 23:48:27 +0000 Subject: [docs] [issue15888] ipaddress doctest examples have some errors In-Reply-To: <1347190349.96.0.156720503481.issue15888@psf.upfronthosting.co.za> Message-ID: <1348098507.72.0.141722796412.issue15888@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching an updated patch that does not render the import statements in the final HTML, so that it renders the same as before. ---------- Added file: http://bugs.python.org/file27227/issue-15888-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 05:26:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 20 Sep 2012 03:26:47 +0000 Subject: [docs] [issue15979] Improve timeit documentation Message-ID: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> New submission from Ezio Melotti: The documentation of timeit can be improved in several ways: * it should start with a couple of short and comprehensible examples that show the basic usage from the command-line and from the code; * the 3 convenience functions should be moved before the class documentation (and their order inverted); * the methods in the class should be reordered to show the important one first; * more comprehensive (but still comprehensible) examples should be added at the end; * sh syntax highlight should be used for the command-line usage examples; * the note about Python 2.3 can be removed from 3.x docs; http://docs.python.org/dev/library/timeit.html ---------- assignee: docs at python components: Documentation messages: 170785 nosy: docs at python, ezio.melotti priority: normal severity: normal stage: needs patch status: open title: Improve timeit documentation type: enhancement versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 06:40:42 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 20 Sep 2012 04:40:42 +0000 Subject: [docs] [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <1348116042.11.0.784135719284.issue15979@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 06:52:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 20 Sep 2012 04:52:27 +0000 Subject: [docs] [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1348116747.53.0.372524282897.issue15939@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 06:58:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 20 Sep 2012 04:58:18 +0000 Subject: [docs] [issue15939] make *.rst files in Doc/ parseable by doctest In-Reply-To: <1347543698.43.0.179468389771.issue15939@psf.upfronthosting.co.za> Message-ID: <1348117098.16.0.287139826726.issue15939@psf.upfronthosting.co.za> Chris Jerdonek added the comment: My opinion on the "+LINUX" and "+WINDOWS" doctest directives in Doc/library/ctypes.rst is simply to leave them alone for now. We can make those errors go away in code when running doctest by adding no-op calls to doctest.register_optionflag() as below: +doctest.register_optionflag('WINDOWS') +doctest.register_optionflag('LINUX') prior to constructing the doctest TestSuites. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 07:23:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 20 Sep 2012 05:23:31 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348118611.9.0.840341673872.issue15949@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +loewis, ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 08:41:23 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 20 Sep 2012 06:41:23 +0000 Subject: [docs] [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <1348123283.03.0.2761720816.issue15979@psf.upfronthosting.co.za> Ezio Melotti added the comment: The sh syntax highlight can be enabled with: .. code-block:: sh $ ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 10:26:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Sep 2012 08:26:32 +0000 Subject: [docs] [issue15980] Non-escaped '\n' in docstrings Message-ID: <1348129592.37.0.740321783262.issue15980@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here are patches that escapes '\n' in docstrings of LWPCookieJar and (for 2.7 only) of email. ---------- assignee: docs at python components: Documentation files: escape_nl2.patch keywords: patch messages: 170794 nosy: docs at python, ezio.melotti, storchaka priority: normal severity: normal status: open title: Non-escaped '\n' in docstrings type: enhancement versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27229/escape_nl2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 10:27:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Sep 2012 08:27:02 +0000 Subject: [docs] [issue15980] Non-escaped '\n' in docstrings In-Reply-To: <1348129592.37.0.740321783262.issue15980@psf.upfronthosting.co.za> Message-ID: <1348129622.76.0.383080157359.issue15980@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27230/escape_nl2-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 13:00:24 2012 From: report at bugs.python.org (Max) Date: Thu, 20 Sep 2012 11:00:24 +0000 Subject: [docs] [issue15981] improve documentation of __hash__ Message-ID: <1348138824.37.0.3310744827.issue15981@psf.upfronthosting.co.za> New submission from Max: In dev/reference/datamodel#object.__hash__, there are two paragraphs that seem inconsistent. The first paragraph seems to say that a class that overrides __eq__() *should* explicitly flag itself as unhashable. The next paragraph says that a class that overrides __eq__() *will be* flagged unhashable by default. Which one is it? Here are the two paragraphs: Classes which inherit a __hash__() method from a parent class but change the meaning of __eq__() such that the hash value returned is no longer appropriate (e.g. by switching to a value-based concept of equality instead of the default identity based equality) can explicitly flag themselves as being unhashable by setting __hash__ = None in the class definition. Doing so means that not only will instances of the class raise an appropriate TypeError when a program attempts to retrieve their hash value, but they will also be correctly identified as unhashable when checking isinstance(obj, collections.Hashable) (unlike classes which define their own __hash__() to explicitly raise TypeError). If a class that overrides __eq__() needs to retain the implementation of __hash__() from a parent class, the interpreter must be told this explicitly by setting __hash__ = .__hash__. Otherwise the inheritance of __hash__() will be blocked, just as if __hash__ had been explicitly set to None. ---------- assignee: docs at python components: Documentation messages: 170798 nosy: docs at python, max priority: normal severity: normal status: open title: improve documentation of __hash__ type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 14:38:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Sep 2012 12:38:19 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1348144699.51.0.109188717562.issue14783@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It may be worth rewrite int() and str() so that the first argument was positional-only argument? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 16:36:18 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 20 Sep 2012 14:36:18 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1348151778.11.0.593169922887.issue14783@psf.upfronthosting.co.za> Ezio Melotti added the comment: That would be backward incompatible, and there might be some valid (corner) cases to pass it as a keyword. Since people are usually not supposed to use it as a keyword arg, it doesn't matter much if the name is different if that makes the docs more understandable. If someone tries to do int(number=10) and gets an error it would likely switch to the simpler int(10). If he really needs keyword args he can always check the code. That said, I don't have a strong opinion about this, so if people think that x should be used, it's fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 16:59:40 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 20 Sep 2012 14:59:40 +0000 Subject: [docs] [issue15981] improve documentation of __hash__ In-Reply-To: <1348138824.37.0.3310744827.issue15981@psf.upfronthosting.co.za> Message-ID: <1348153180.26.0.125960217698.issue15981@psf.upfronthosting.co.za> R. David Murray added the comment: This has already been fixed, and the change is visible in the online documentation. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> confusing docs with regard to __hash__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 18:18:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Sep 2012 16:18:27 +0000 Subject: [docs] [issue15984] Wrong documentation for PyUnicode_FromObject() Message-ID: <1348157907.35.0.947782583816.issue15984@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In the documentation it is written that PyUnicode_FromObject() is a shortcut for PyUnicode_FromEncodedObject(). But PyUnicode_FromObject() is not call PyUnicode_FromEncodedObject() direct nor indirect. PyUnicode_FromObject() works only with unicode and unicode subclass objects, PyUnicode_FromEncodedObject() is not works with unicode objects. ---------- assignee: docs at python components: Documentation messages: 170821 nosy: docs at python, storchaka priority: normal severity: normal status: open title: Wrong documentation for PyUnicode_FromObject() versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 18:47:53 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 20 Sep 2012 16:47:53 +0000 Subject: [docs] [issue15985] round() has wrong argument names Message-ID: <1348159673.68.0.790286767208.issue15985@psf.upfronthosting.co.za> New submission from Chris Jerdonek: The documentation for round() says: round(x[, n]) Return the floating point value x rounded to n digits after the decimal point. If n is omitted, it defaults to zero. Delegates to x.__round__(n). (from http://docs.python.org/dev/library/functions.html#round ) However, we have the following: Python 3.3.0rc2+ (default:1704deb7e6d7+, Sep 16 2012, 04:49:45) >>> round(x=4.7) Traceback (most recent call last): File "", line 1, in TypeError: Required argument 'number' (pos 1) not found >>> round(number=4.7) 5 The second argument is also affected: >>> round(5.1234, n=3) Traceback (most recent call last): File "", line 1, in TypeError: 'n' is an invalid keyword argument for this function >>> round(5.1234, ndigits=3) 5.123 ---------- assignee: docs at python components: Documentation keywords: easy messages: 170822 nosy: cjerdonek, docs at python priority: normal severity: normal stage: needs patch status: open title: round() has wrong argument names type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 18:48:44 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 20 Sep 2012 16:48:44 +0000 Subject: [docs] [issue15985] round() has wrong argument names In-Reply-To: <1348159673.68.0.790286767208.issue15985@psf.upfronthosting.co.za> Message-ID: <1348159724.25.0.0627459432222.issue15985@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 18:50:33 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 20 Sep 2012 16:50:33 +0000 Subject: [docs] [issue15985] round() has wrong argument names In-Reply-To: <1348159673.68.0.790286767208.issue15985@psf.upfronthosting.co.za> Message-ID: <1348159833.48.0.217474795634.issue15985@psf.upfronthosting.co.za> Mark Dickinson added the comment: A case where fixing the names improves both accuracy *and* readability! ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 20:57:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 20 Sep 2012 18:57:03 +0000 Subject: [docs] [issue15985] round() has wrong argument names In-Reply-To: <1348159673.68.0.790286767208.issue15985@psf.upfronthosting.co.za> Message-ID: <1348167422.93.0.32564318421.issue15985@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is a patch. Also, I checked, and there is already a test for the keyword arguments: http://hg.python.org/cpython/file/dcced3bd22fe/Lib/test/test_builtin.py#l1239 ---------- keywords: +needs review, patch stage: needs patch -> patch review Added file: http://bugs.python.org/file27236/issue-15985-1-branch-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 21:24:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 20 Sep 2012 19:24:17 +0000 Subject: [docs] [issue15990] solidify argument/parameter terminology Message-ID: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> New submission from Chris Jerdonek: There is currently some ambiguity in our documentation around positional and keyword arguments (e.g. whether positional means "position-only" or "non-keyword" (roughly) and whether various terms and definitions should be for the calling syntax or the function definition syntax or both). For example, see the python-dev thread starting here: http://mail.python.org/pipermail/python-dev/2012-September/121760.html It would be good to nail down the preferred terminology in a central place. I would suggest that the glossary is a good place to start. For example, when there is a question about what phrase an error message should use or how an error message should be interpreted, it would be good if (at least going forward) the glossary could be used as a definitive resource. This issue may involve making a distinction in our terminology "between arguments (what you pass, call syntax) and parameters (what the function receives, function definition syntax)" (see http://mail.python.org/pipermail/python-dev/2012-September/121771.html ). ---------- assignee: docs at python components: Documentation messages: 170834 nosy: cjerdonek, docs at python priority: normal severity: normal status: open title: solidify argument/parameter terminology _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 21:36:07 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 20 Sep 2012 19:36:07 +0000 Subject: [docs] [issue15985] round() has wrong argument names In-Reply-To: <1348159673.68.0.790286767208.issue15985@psf.upfronthosting.co.za> Message-ID: <1348169767.43.0.74258113533.issue15985@psf.upfronthosting.co.za> Mark Dickinson added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 21:52:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Sep 2012 19:52:20 +0000 Subject: [docs] [issue15985] round() has wrong argument names In-Reply-To: <1348159673.68.0.790286767208.issue15985@psf.upfronthosting.co.za> Message-ID: <3XN7rM50TVzQm0@mail.python.org> Roundup Robot added the comment: New changeset eccd94d4ee77 by Mark Dickinson in branch '3.2': Issue 15985: fix round argument names in documentation. Thanks Chris Jerdonek. http://hg.python.org/cpython/rev/eccd94d4ee77 New changeset ad04dd6c07f7 by Mark Dickinson in branch 'default': Issue 15985: merge from 3.2. http://hg.python.org/cpython/rev/ad04dd6c07f7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 21:58:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Sep 2012 19:58:04 +0000 Subject: [docs] [issue15985] round() has wrong argument names In-Reply-To: <1348159673.68.0.790286767208.issue15985@psf.upfronthosting.co.za> Message-ID: <3XN7yz5BlKzQlt@mail.python.org> Roundup Robot added the comment: New changeset e4037dd73877 by Mark Dickinson in branch '2.7': Issue 15985: fix round argument names in documentation. Thanks Chris Jerdonek. http://hg.python.org/cpython/rev/e4037dd73877 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 21:59:15 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 20 Sep 2012 19:59:15 +0000 Subject: [docs] [issue15985] round() has wrong argument names In-Reply-To: <1348159673.68.0.790286767208.issue15985@psf.upfronthosting.co.za> Message-ID: <1348171155.28.0.927582206475.issue15985@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed. Thanks for the patch! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 22:01:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 20 Sep 2012 20:01:24 +0000 Subject: [docs] [issue15985] round() has wrong argument names In-Reply-To: <1348159673.68.0.790286767208.issue15985@psf.upfronthosting.co.za> Message-ID: <1348171284.83.0.391846539139.issue15985@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the quick commit, Mark. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 22:03:04 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 20 Sep 2012 20:03:04 +0000 Subject: [docs] [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1348171384.62.0.876511569087.issue15990@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 22:07:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 20 Sep 2012 20:07:47 +0000 Subject: [docs] [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1348171667.69.0.507314633426.issue15990@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 22:24:11 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 20 Sep 2012 20:24:11 +0000 Subject: [docs] [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1348172651.77.0.713353482698.issue15990@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 20 23:10:40 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 20 Sep 2012 21:10:40 +0000 Subject: [docs] [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1348175440.34.0.783173730289.issue15990@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 00:02:22 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Sep 2012 22:02:22 +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: <1348178542.24.0.108382652593.issue15548@psf.upfronthosting.co.za> STINNER Victor added the comment: The doc is now complete. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 07:50:37 2012 From: report at bugs.python.org (Max) Date: Fri, 21 Sep 2012 05:50:37 +0000 Subject: [docs] [issue15997] NotImplemented needs to be documented Message-ID: <1348206637.53.0.485410334327.issue15997@psf.upfronthosting.co.za> New submission from Max: Quoting from http://docs.python.org/reference/datamodel.html#the-standard-type-hierarchy: NotImplemented This type has a single value. There is a single object with this value. This object is accessed through the built-in name NotImplemented. Numeric methods and rich comparison methods may return this value if they do not implement the operation for the operands provided. (The interpreter will then try the reflected operation, or some other fallback, depending on the operator.) Its truth value is true. This is not a sufficient description of NotImplemented behavior. What does it mean "reflected operation" (I assume it is other.__eq__(self), but it needs to be clarified), and what does it mean "or some other fallback" (wouldn't developers need to know?). It also doesn't state what happens if the reflected operation or the fallback again return NotImplemented. The rest of the documentation doesn't seem to talk about this either, despite several mentions of NotImplemented, with references to other sections. This is particularly serious problem because Python's behavior changed in this respect not that long ago. ---------- assignee: docs at python components: Documentation messages: 170860 nosy: docs at python, max priority: normal severity: normal status: open title: NotImplemented needs to be documented type: enhancement versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 07:57:34 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 21 Sep 2012 05:57:34 +0000 Subject: [docs] [issue15997] NotImplemented needs to be documented In-Reply-To: <1348206637.53.0.485410334327.issue15997@psf.upfronthosting.co.za> Message-ID: <1348207054.19.0.747755200335.issue15997@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This must not be documented for NotImplemented, but for the operations itself. On the same page, it says "There are no swapped-argument versions of these methods (to be used when the left argument does not support the operation but the right argument does); rather, __lt__() and __gt__() are each other?s reflection, __le__() and __ge__() are each other?s reflection, and __eq__() and __ne__() are their own reflection." So I'd say it's there already. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 08:38:35 2012 From: report at bugs.python.org (Max) Date: Fri, 21 Sep 2012 06:38:35 +0000 Subject: [docs] [issue15997] NotImplemented needs to be documented In-Reply-To: <1348206637.53.0.485410334327.issue15997@psf.upfronthosting.co.za> Message-ID: <1348209515.47.0.397254464827.issue15997@psf.upfronthosting.co.za> Max added the comment: I agree about reflected operation, although the wording could be clearer ("will try reflected operation" is better worded as "will return the result of the reflected operation called on the swapped arguments".) But what does it mean "or some other fallback"? And what if the reflected operation or the fallback again return NotImplemented or is actually not implemented. Is it somewhere else in the docs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 08:53:33 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 21 Sep 2012 06:53:33 +0000 Subject: [docs] [issue15997] NotImplemented needs to be documented In-Reply-To: <1348206637.53.0.485410334327.issue15997@psf.upfronthosting.co.za> Message-ID: <1348210413.34.0.949630513798.issue15997@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 10:40:40 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 21 Sep 2012 08:40:40 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1348216840.72.0.965941254841.issue12067@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 12:08:51 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 21 Sep 2012 10:08:51 +0000 Subject: [docs] [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1348222131.29.0.0592316798505.issue15990@psf.upfronthosting.co.za> Ezio Melotti added the comment: > "between arguments (what you pass, call syntax) and parameters > (what the function receives, function definition syntax)" Note that there's a subtle difference to make here. IMHO as soon as you use terms like "receives" or "accepts", you are still talking about arguments. What you pass from one side is received by the other, and it's called an argument. Given "def f(x, y): pass" you can say that x and y are parameter of the f function, or that the function accepts 2 arguments -- x and y. The latter is far more common IME, and I rarely talk about parameters myself. In "f() missing 1 required positional argument: 'x'", the usage of "argument" is correct, because what's missing is the argument in the function call, not the parameter in the function definition. However the error points to the corresponding parameter 'x' -- because clearly it can't point to the argument you forgot to pass -- and this fact might led to some confusion. IMHO though, the error is clear as is (at least regarding argument/parameter), so I wouldn't change it. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 12:46:32 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 21 Sep 2012 10:46:32 +0000 Subject: [docs] [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1348224392.7.0.409975512166.issue15990@psf.upfronthosting.co.za> Mark Dickinson added the comment: Nick Coghlan pointed out that a lot of this discussion has already happened for the function signature object PEP [1]. That PEP defines constants Parameter.POSITIONAL_ONLY Parameter.POSITIONAL_OR_KEYWORD Parameter.KEYWORD_ONLY Parameter.VAR_POSITIONAL Parameter.VAR_KEYWORD So the 'positional' in the TypeError messages corresponds to POSITIONAL_OR_KEYWORD. [1] http://www.python.org/dev/peps/pep-0362/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 13:37:38 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 21 Sep 2012 11:37:38 +0000 Subject: [docs] [issue15997] NotImplemented needs to be documented In-Reply-To: <1348206637.53.0.485410334327.issue15997@psf.upfronthosting.co.za> Message-ID: <1348227458.62.0.400186725889.issue15997@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The main point is: it depends on the operation. NotImplemented is a way to signal that an operation is not implemented. It can be used for whatever you want to use it for. You can design to call an operation "foo", and, if NotImplemented is returned, call "bar" instead. If you want to know how a specific operation performs its fallback, you have to look in the documentation of the specific operation. As an example for a method where some other fallback is used, see http://docs.python.org/py3k/library/abc.html#abc.ABCMeta.__subclasshook__ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 14:56:18 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 21 Sep 2012 12:56:18 +0000 Subject: [docs] [issue15997] NotImplemented needs to be documented In-Reply-To: <1348206637.53.0.485410334327.issue15997@psf.upfronthosting.co.za> Message-ID: <1348232178.92.0.73919038017.issue15997@psf.upfronthosting.co.za> R. David Murray added the comment: The mention of NotImplemented in library/stdtypes cross references to the 'comparisions' section of the reference guide chapter on expressions. That might be a useful cross link in the datamodel section as well. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 15:31:48 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Sep 2012 13:31:48 +0000 Subject: [docs] [issue15980] Non-escaped '\n' in docstrings In-Reply-To: <1348129592.37.0.740321783262.issue15980@psf.upfronthosting.co.za> Message-ID: <3XNbLp2yWSzQpy@mail.python.org> Roundup Robot added the comment: New changeset 7a125913a375 by Ezio Melotti in branch '2.7': #15980: properly escape newlines in docstrings. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/7a125913a375 New changeset e582ad1aee62 by Ezio Melotti in branch '3.2': #15980: properly escape newlines in docstrings. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/e582ad1aee62 New changeset 1830426da082 by Ezio Melotti in branch 'default': #15980: merge with 3.2. http://hg.python.org/cpython/rev/1830426da082 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 15:32:28 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 21 Sep 2012 13:32:28 +0000 Subject: [docs] [issue15980] Non-escaped '\n' in docstrings In-Reply-To: <1348129592.37.0.740321783262.issue15980@psf.upfronthosting.co.za> Message-ID: <1348234348.78.0.779334346544.issue15980@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 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 15:43:41 2012 From: report at bugs.python.org (Mike Hoy) Date: Fri, 21 Sep 2012 13:43:41 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1348235021.68.0.490389889454.issue12067@psf.upfronthosting.co.za> Mike Hoy added the comment: http://bugs.python.org/issue15997 is this issue related to what Terry has mentioned: Does 'not supported' mean 'raises TypeError', 'returns NotImplemented', or both? If the last, I don't really understand the reason for NotImplemented versus TypeError. That point should be clarified in 3.3 also. And 3.3 should be referenced in the comparisons section. I am working on this patch and need confirmation as to whether or not this has to be included in my patch. I'm not clear on it so I may just pass on making a patch if it is required for this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 20:49:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 21 Sep 2012 18:49:49 +0000 Subject: [docs] [issue15759] "make suspicious" doesn't display instructions in case of failure In-Reply-To: <1345613663.78.0.519613331574.issue15759@psf.upfronthosting.co.za> Message-ID: <1348253389.68.0.459172416907.issue15759@psf.upfronthosting.co.za> Ezio Melotti added the comment: Apparently a '-' at the beginning of the command means "run this thing and if it fails ignore the failure and keep going". I tried to add an if/else in the build target to use the '-' with the selected builder was "suspicious" but I couldn't make it work, so I ended up adding a new build-and-continue that uses the '-'. make linkcheck and make doctest had the same problem, so I fixed them too. The output now looks like this: $ make suspicious mkdir -p build/suspicious build/doctrees python tools/sphinx-build.py -b suspicious -d build/doctrees -D latex_paper_size= . build/suspicious Running Sphinx v1.0.7 loading pickled environment... done loading ignore rules... done, 359 rules loaded building [suspicious]: targets for 428 source files that are out of date updating environment: 0 added, 0 changed, 0 removed looking for now-outdated files... none found preparing documents... done writing output... [ 81%] library/unittest WARNING: [library/unittest:19] ":port" found in "host:port" writing output... [100%] whatsnew/index build finished with problems, 1 warning. make: [build-and-continue] Error 1 (ignored) 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. ---------- stage: patch review -> commit review versions: +Python 2.7, Python 3.2 Added file: http://bugs.python.org/file27248/issue15759-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 22:05:40 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 21 Sep 2012 20:05:40 +0000 Subject: [docs] [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1348257940.77.0.318040734849.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: We could start by establishing the argument/parameter distinction in the glossary. Currently, the word "parameter" does not appear in the glossary, and the definition of "argument" blurs the distinction between the two: For example, in the following definition of "argument"-- "argument: A value passed to a function or method, assigned to a named local variable in the function body. A function or method may have both positional arguments and keyword arguments in its definition..." (from http://docs.python.org/dev/glossary.html#term-argument ) the second sentence is actually talking about parameters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 22:06:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 21 Sep 2012 20:06:58 +0000 Subject: [docs] [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <1348258018.54.0.809091820766.issue15990@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > IMHO as soon as you use terms like "receives" or "accepts", you are still talking about arguments. Even PEP 362 is loose with its language in this regard. For example, at the beginning of the "Signature Object" section: "For each parameter accepted by the function it stores a Parameter object in its parameters collection." And at the beginning of the "Parameter Object" section: "Python's expressive syntax means functions can accept many different kinds of parameters with many subtle semantic differences." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 23:29:22 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 21 Sep 2012 21:29:22 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348262961.71.0.79970250535.issue15949@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The 2.7 docs seem not to be affected by this issue (they are current) -- just the docs for 3.2 and the default branch. ---------- versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 23:39:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 21 Sep 2012 21:39:41 +0000 Subject: [docs] [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1348263581.16.0.58495711018.issue15964@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Switching this to a devguide issue so the work-around can be documented, for example in this section: http://docs.python.org/devguide/faq.html#how-do-i-switch-between-branches-inside-my-working-copy ---------- assignee: -> docs at python components: +Devguide, Documentation -Build keywords: +easy nosy: +docs at python, ezio.melotti stage: -> needs patch type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 21 23:46:08 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 21 Sep 2012 21:46:08 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348263968.42.0.759175085193.issue15949@psf.upfronthosting.co.za> Ned Deily added the comment: I believe Georg maintains cronjobs for updating the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 02:05:24 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Sep 2012 00:05:24 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1348272323.83.0.295622691418.issue12067@psf.upfronthosting.co.za> Terry J. Reedy added the comment: After further thought: This section is about the syntax operators, not the special methods. The syntax operators never evaluate to NotImplemented as they (apparently) interpret its return from a special method the same as a raising of TypeError, and always raise TypeError when neither the op or its reflection is supported. So there should be no mention of NotImplemented here. Just a reference to 3.3. #15997 is related to my 'wonder' but not directly relevant to a patch for this. Please submit a draft patch when you have one. I determined that 'raise TypeError' and 'return NotImplemented' both result in the call of the reflected method, at least for a couple of cases. (And same seems true for arithmetic ops too.) class C(): def __ge__(self, other): # print("in C.__ge__", end='') return True def __add__(self, other): return 44 __radd__ = __add__ class O(): def __le__(self, other): # print ("in O.__le__") return NotImplemented def __add__(self, other): return NotImplemented c = C() o = O() ob = object() print(c >= o, o <= c, ob <= c) # True True True # print(ob <= ob) # raises TypeError print(c + o, o + c, ob + c) # 44 44 44 # print(ob + ob) # raises TypeError # print(ob >= o) # with O.__le__ print uncommented # in O.__le__ # so non-implemented reflected o <= ob *is* called # TypeError: unorderable types: object() >= O() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 02:10:49 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Sep 2012 00:10:49 +0000 Subject: [docs] [issue15997] NotImplemented needs to be documented In-Reply-To: <1348206637.53.0.485410334327.issue15997@psf.upfronthosting.co.za> Message-ID: <1348272649.53.0.228031950738.issue15997@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The first three sentences are fine. The problem I have is with the 4th: 'may return' is rather vague. Such methods may raise TypeError instead (the old way), seemingly to the same effect. (See msg170936 in issue #12067, which is about clarifying the comparisons section of the expression chapter.). So the 5th sentence could be misinterpreted wrongly to mean that NotImplemented is needed to get the alternate method try. (Since it is not, I wonder why it was added, since it complicates the internal logic of arithmetic and comparison ops.) Perhaps a better place for any clarification on this point would be in 3.3 in the entry for __le__, etc. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 03:10:52 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Sep 2012 01:10:52 +0000 Subject: [docs] [issue15956] backreference to named group does not work In-Reply-To: <1347888827.23.0.363134887653.issue15956@psf.upfronthosting.co.za> Message-ID: <1348276252.43.0.852860016792.issue15956@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I read it as a 'native speaker' and it looks fine to me. Table is clear, but I will let doc stylist decide. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 03:12:05 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 22 Sep 2012 01:12:05 +0000 Subject: [docs] [issue15997] NotImplemented needs to be documented In-Reply-To: <1348206637.53.0.485410334327.issue15997@psf.upfronthosting.co.za> Message-ID: <1348276325.37.0.0215154698817.issue15997@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Terry: can you propose an alternative wording? I don't think that the discussion of TypeError belongs into the description of NotImplemented, though. IIUC, NotImplemented was added for performance reasons; returning a value is much faster than raising an exception. The return only requires an INCREF/DECREF pair, and a pointer identity test. The exception requires to create a new object, possibly a traceback, and a subclass check on exception matching. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 07:42:03 2012 From: report at bugs.python.org (Mike Hoy) Date: Sat, 22 Sep 2012 05:42:03 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1348292523.33.0.542830274745.issue12067@psf.upfronthosting.co.za> Mike Hoy added the comment: I've attempted to incorporate both Terry's and Ezio's suggestions. Here is a patch to get started with. There is a section that has been deleted. Patch uploaded. ---------- keywords: +patch Added file: http://bugs.python.org/file27256/issue12067-expressions.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 08:10:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Sep 2012 06:10:58 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1348294257.65.0.353267839706.issue12067@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Some minor comments: -The operators ``<``, ``>``, ``==``, ``>=``, ``<=``, and ``!=`` compare the +``<``, ``>``, ``==``, ``>=``, ``<=``, and ``!=`` compare the values of two I think it reads better to start a sentence (and in this case a paragraph) with a word rather than a symbol. -values of two objects. The objects need not have the same type. If both are +objects. The two objects don't necessarily have to be of the same type. With The replacement sentence seems wordier to me. +(:meth:`__ge__()` reflects :meth:`__lt__()`, etcetera). Builtin numbers compare +as expected, even when of different types. Builtin sequences compare "Built-in" is hyphenated in the docs. See, for example, here: http://docs.python.org/dev/library/functions.html ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 08:49:26 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 22 Sep 2012 06:49:26 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348296566.13.0.0638859872837.issue15949@psf.upfronthosting.co.za> Georg Brandl added the comment: When the docs don't update, there's usually an error in running Sphinx. In this case, the recently committed patch for #78982 (in the Unicode howto) prevents the LaTeX build (or more exact, the pdflatex run) from completing. Please revert that part of it. (Aside: That is exactly the reason why I don't like these "make doctests run at all costs" patches.) ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 08:51:41 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 22 Sep 2012 06:51:41 +0000 Subject: [docs] [issue15759] "make suspicious" doesn't display instructions in case of failure In-Reply-To: <1345613663.78.0.519613331574.issue15759@psf.upfronthosting.co.za> Message-ID: <1348296701.51.0.186272374354.issue15759@psf.upfronthosting.co.za> Georg Brandl added the comment: The error exit code should be preserved though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 10:17:00 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 22 Sep 2012 08:17:00 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1348301820.13.0.460725268872.issue12067@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I determined that 'raise TypeError' and 'return NotImplemented' both > result in the call of the reflected method Are you sure? raise TypeError *should* result in the operation being abandoned, with the reflected operation not tried. Python 3.3.0rc2+ (default:3504cbb3e1d8, Sep 20 2012, 22:08:44) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> class A: ... def __add__(self, other): ... raise TypeError("Don't know how to add") ... def __le__(self, other): ... raise TypeError("Can't compare") ... [65945 refs] >>> class B: ... def __radd__(self, other): ... return 42 ... def __ge__(self, other): ... return False ... [66016 refs] >>> A() <= B() Traceback (most recent call last): File "", line 1, in File "", line 5, in __le__ TypeError: Can't compare [66064 refs] >>> A() + B() Traceback (most recent call last): File "", line 1, in File "", line 3, in __add__ TypeError: Don't know how to add [66065 refs] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 10:19:26 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 22 Sep 2012 08:19:26 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348301966.93.0.781063757166.issue15949@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think the issue was #15899, and the change 8a40bc71c072. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 10:20:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 22 Sep 2012 08:20:02 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348302002.47.0.479989912578.issue15949@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm working on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 10:25:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 22 Sep 2012 08:25:41 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <3XP4W835DmzQmF@mail.python.org> Roundup Robot added the comment: New changeset 0799fd1f8887 by Ezio Melotti in branch '3.2': #15949, 15899: avoid using non-latin1 chars in the doc (they break `make all-pdf`). http://hg.python.org/cpython/rev/0799fd1f8887 New changeset 832999a97e59 by Ezio Melotti in branch 'default': #15949, 15899: merge with 3.2. http://hg.python.org/cpython/rev/832999a97e59 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 10:28:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 22 Sep 2012 08:28:48 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348302528.89.0.996991216853.issue15949@psf.upfronthosting.co.za> Ezio Melotti added the comment: This should be fixed now. It would be nice if Sphinx could send a notification mail in case of failure, so that the next time we will notice and fix the problem earlier. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 13:14:12 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 22 Sep 2012 11:14:12 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348312452.76.0.0722270103331.issue15949@psf.upfronthosting.co.za> Georg Brandl added the comment: I usually get the result of the cronjob via email if there's a failure; for a few weeks now this went to my spam folder, so I didn't immediately see something was wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 14:54:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Sep 2012 12:54:25 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348318464.79.0.384519736744.issue15949@psf.upfronthosting.co.za> Chris Jerdonek added the comment: In the future, now that a few more people know, we could always look to see what doc changes were made since the last "publication" of the docs (or run the other `make` commands locally, or ideally, beforehand in cases that warrant it). The fact that 2.7 published and not the others should have been a tip off for me. I wonder if `make patchcheck` could be enhanced to check for unsupported characters. Lastly, is there a work-around for the inability to include ? in the docs? That particular difference between u.encode('replace') and bytes.decode('replace') (? vs. ?) seems like an important one to me not to conflate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 15:09:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Sep 2012 13:09:06 +0000 Subject: [docs] [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1348319346.09.0.0279194666743.issue15964@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching patch. I started a new section in the FAQ called "Build Troubleshooting" which is something Nick suggested in the context of addressing this issue. I'm sure we could add a couple more questions to this section right now if we wanted to. ---------- keywords: +patch Added file: http://bugs.python.org/file27260/issue-15964-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 15:12:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Sep 2012 13:12:27 +0000 Subject: [docs] [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1348319547.49.0.576458812874.issue15964@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Adding Nick because he is the one that suggested adding a "Build Troubleshooting" section to the devguide FAQ (meant to add him above). ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 15:18:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 22 Sep 2012 13:18:10 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348319890.32.0.768750922323.issue15949@psf.upfronthosting.co.za> Ezio Melotti added the comment: > I usually get the result of the cronjob via email if there's a failure; Maybe it should go to python-committers or some other public ML, so that other devs can see and possibly fix the issue. > I wonder if `make patchcheck` could be enhanced to check > for unsupported characters. That sounds like a good idea to me. > Lastly, is there a work-around for the inability to include ? > in the docs? '\ufffdabc' is acceptable, and it is what non-utf-8 terminals print. > That particular difference between u.encode('replace') and > bytes.decode('replace') (? vs. ?) seems like an important > one to me not to conflate. Indeed I was confusing the two. I'm not actually even sure that the Unicode standard mandates these specific replacement characters (IIRC there's even a way to configure them), and I was under the impression that '?' was sometimes used during the decoding, but after a few tests it seems I was wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 15:25:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Sep 2012 13:25:03 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348320303.2.0.58095555554.issue15949@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The distinction between ? vs. ? for encode() and decode() is in the Python docs, but it's not prominent. It's mentioned in codecs's "Codec Base Classes" but not in the encode() and decode() docs themselves: http://docs.python.org/dev/library/codecs.html#codec-base-classes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 15:35:18 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 22 Sep 2012 13:35:18 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <1348320918.83.0.29772122442.issue15949@psf.upfronthosting.co.za> Ezio Melotti added the comment: > The distinction between ? vs. ? for encode() and decode() > is in the Python docs, but it's not prominent. The point is that I'm not even sure we make any guarantees about the replacement characters that we use. I should check again what the Unicode standard says -- IIRC ? was suggested, but it wasn't mandatory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 16:06:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Sep 2012 14:06:28 +0000 Subject: [docs] [issue15952] format(value) and value.__format__() behave differently with unicode format In-Reply-To: <1347825591.49.0.625826586182.issue15952@psf.upfronthosting.co.za> Message-ID: <1348322786.08.0.60780304557.issue15952@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 16:09:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Sep 2012 14:09:38 +0000 Subject: [docs] [issue15935] clarify argparse docs re: add_argument() type and default arguments In-Reply-To: <1347485175.79.0.860808168134.issue15935@psf.upfronthosting.co.za> Message-ID: <1348322978.55.0.406591024503.issue15935@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 17:20:26 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 22 Sep 2012 15:20:26 +0000 Subject: [docs] [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1348327226.39.0.989913155839.issue15964@psf.upfronthosting.co.za> Nick Coghlan added the comment: We should be able to add the "make touch" target to the 2.7 Makefile without running afoul of the "no new features" rule. However, agreed this is mostly a docs problem. We're seeing a couple of common traps that people run into when first getting started, so it will be good to get answers up somewhere where people are likely to look (and where search engines will be able to see the error messages). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 22 23:01:57 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Sep 2012 21:01:57 +0000 Subject: [docs] [issue12067] Doc: remove errors about mixed-type comparisons. In-Reply-To: <1305237573.86.0.646542413513.issue12067@psf.upfronthosting.co.za> Message-ID: <1348347717.78.0.377914197908.issue12067@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You are right, I did not look deep enough. I was fooled by the conversion of NotImplemented, returned from object.__le__, etc, to TypeError. Sorry for that noise. For comparison and arithmetic, the actual alternative to defining a function that returns NotImplemented seems to be to not define it at all. class C(): def __ge__(self, other): return True def __add__(self, other): return 44 __radd__ = __add__ class O(): pass # removed NotImplemented defs c = C() o = O() print(c >= o, o <= c) # True True print(c + o, o + c) # 44 44 (I looked at the codes for binary_op1 in abstract.c and do_richcompare in object.c and do not yet see any effective difference between not defined and a NotImplemented return.) I'll take a look at the patch later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 00:44:41 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Sep 2012 22:44:41 +0000 Subject: [docs] [issue15997] NotImplemented needs to be documented In-Reply-To: <1348206637.53.0.485410334327.issue15997@psf.upfronthosting.co.za> Message-ID: <1348353881.43.0.242902847995.issue15997@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I was wrong about TypeError; forget that. The seeming equivalent to 'return NotImplement' is not defining the method. My confusion stemed from the fact that NotImplemented returned from special methods gets intercepted and converted to TypeError exceptions by the operator functions that call them -- unless there is an alternate path *and* the alternate does not also return NotImplemented. Changing "will try reflected operation" to "will return the result of the reflected operation called on the swapped arguments" is wrong as the latter is not completely correct. If the fallback also returns NotImplemented, it is ignored and TypeError is raised the same as if the fallback did not exist. But as Martin said, the details belong in operator documentation. I would like to more closely parallel the None entry, which has "It is used to signify the absence of a value in many situations, e.g. it is returned from functions that don?t explicitly return anything." by replacing "Numeric methods and rich comparison methods may return this value if they do not implement the operation for the operands provided. (The interpreter will then try the reflected operation, or some other fallback, depending on the operator.)" with "It is used to signify that a method does not implement the operation requested for the operands provided. For example, the special methods for arithmetic and and rich comparison may return NotImplemented, and when they do, the interpreter will try the reversed or reflected operation." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 10:55:15 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 23 Sep 2012 08:55:15 +0000 Subject: [docs] [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1348390514.76.0.659653092314.issue15964@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > We should be able to add the "make touch" target to the 2.7 Makefile without running afoul of the "no new features" rule. To keep things simpler, I'm going to create a separate issue for this so that it can be discussed and committed independently of this doc-only issue. If necessary, we can always modify the answers to existing FAQ's in that issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 11:05:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 23 Sep 2012 09:05:58 +0000 Subject: [docs] [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1348391158.21.0.885420261352.issue15964@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > We should be able to add the "make touch" target to the 2.7 Makefile without running afoul of the "no new features" rule. I created issue 16004 for this: http://bugs.python.org/issue16004 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 11:22:08 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 23 Sep 2012 09:22:08 +0000 Subject: [docs] [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1348392128.59.0.746869739078.issue15964@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- keywords: +needs review stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 13:15:11 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 23 Sep 2012 11:15:11 +0000 Subject: [docs] [issue15952] format(value) and value.__format__() behave differently with unicode format In-Reply-To: <1347825591.49.0.625826586182.issue15952@psf.upfronthosting.co.za> Message-ID: <1348398911.27.0.679749148325.issue15952@psf.upfronthosting.co.za> Ezio Melotti added the comment: ``format(value, format_spec)`` merely calls - ``value.__format__(format_spec)``. + ``value.__format__(format_spec)`` and, if *format_spec* is Unicode, + converts the value to Unicode if it is not already Unicode. This is correct, but should be rephrased (and "value" should be "return value"). + The method ``value.__format__(format_spec)`` may return 8-bit strings + for some built-in types when *format_spec* is Unicode. This is not limited to built-in types. __format__() might return either str or unicode, and format() returns the same -- except for the aforementioned case. This is a summary of the possible cases. __format__ can return unicode or str: >>> class Uni(object): ... def __format__(*args): return u'uni' ... >>> class Str(object): ... def __format__(*args): return 'str' ... format() and __format__ return the same value, except when the format_spec is unicode and __format__ returns str: >>> format(Uni(), 'd'), Uni().__format__( 'd') # same (u'uni', u'uni') >>> format(Uni(), u'd'), Uni().__format__(u'd') # same (u'uni', u'uni') >>> format(Str(), 'd'), Str().__format__( 'd') # same ('str', 'str') >>> format(Str(), u'd'), Str().__format__(u'd') # different (u'str', 'str') It is also not true that the type of return value is the same of the format_spec, because in the first case the returned type is unicode even if the format_spec is str. Therefore this part of the patch should be changed: + Per :pep:`3101`, the function returns a Unicode object if *format_spec* is + Unicode. Otherwise, it returns an 8-bit string. The behavior might be against PEP 3101 (see quotation in msg170669), even thought the wording of the PEP is somewhat lenient IMHO ("proper type" doesn't necessary mean "same type"). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 15:03:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Sep 2012 13:03:43 +0000 Subject: [docs] [issue15899] howto/unicode.rst doctest corrections In-Reply-To: <1347267716.91.0.310284408834.issue15899@psf.upfronthosting.co.za> Message-ID: <3XPpdV1WpXzQwk@mail.python.org> Roundup Robot added the comment: New changeset 9c666683e309 by Ezio Melotti in branch '3.2': #15949, #15899: use \ufffd instead of ?. http://hg.python.org/cpython/rev/9c666683e309 New changeset 1aebae2f68da by Ezio Melotti in branch 'default': #15949, #15899: merge with 3.2. http://hg.python.org/cpython/rev/1aebae2f68da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 15:03:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Sep 2012 13:03:44 +0000 Subject: [docs] [issue15949] docs.python.org not getting updated In-Reply-To: <1347728419.57.0.753818975668.issue15949@psf.upfronthosting.co.za> Message-ID: <3XPpdW006yzQwk@mail.python.org> Roundup Robot added the comment: New changeset 9c666683e309 by Ezio Melotti in branch '3.2': #15949, #15899: use \ufffd instead of ?. http://hg.python.org/cpython/rev/9c666683e309 New changeset 1aebae2f68da by Ezio Melotti in branch 'default': #15949, #15899: merge with 3.2. http://hg.python.org/cpython/rev/1aebae2f68da ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 16:03:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 23 Sep 2012 14:03:07 +0000 Subject: [docs] [issue15034] Devguide should document best practices for stdlib exceptions In-Reply-To: <1339118524.85.0.923317590244.issue15034@psf.upfronthosting.co.za> Message-ID: <1348408986.8.0.496673948378.issue15034@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm not sure this belongs to the devguide. Ideally the best way to do it should be documented in the docs. This doesn't necessary mean it should be in the tutorial, but if the way documented in the tutorial is "wrong", I'd rather tell users "this is the right way, do like this and don't worry about the details right now (but follow this link if you want to know more)" than "use this wrongish way that is simple but will break as soon as you start doing something more complex". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 16:16:14 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 23 Sep 2012 14:16:14 +0000 Subject: [docs] [issue15270] "Economy of Expression" section outdated In-Reply-To: <1341641029.42.0.551889407429.issue15270@psf.upfronthosting.co.za> Message-ID: <1348409774.42.0.919444784671.issue15270@psf.upfronthosting.co.za> Ezio Melotti added the comment: IMHO the paragraph about super() can be dropped altogether. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 18:38:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Sep 2012 16:38:20 +0000 Subject: [docs] [issue15270] "Economy of Expression" section outdated In-Reply-To: <1341641029.42.0.551889407429.issue15270@psf.upfronthosting.co.za> Message-ID: <3XPvP65XcvzQtS@mail.python.org> Roundup Robot added the comment: New changeset 100909b4def0 by Raymond Hettinger in branch 'default': Issue #15270. Appease critics by removing a reference to the docs for super(). http://hg.python.org/devguide/rev/100909b4def0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 18:39:41 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 23 Sep 2012 16:39:41 +0000 Subject: [docs] [issue15270] "Economy of Expression" section outdated In-Reply-To: <1341641029.42.0.551889407429.issue15270@psf.upfronthosting.co.za> Message-ID: <1348418381.8.0.663814660919.issue15270@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This whole discussion was inane. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 19:23:14 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Sep 2012 17:23:14 +0000 Subject: [docs] [issue15034] Devguide should document best practices for stdlib exceptions In-Reply-To: <1339118524.85.0.923317590244.issue15034@psf.upfronthosting.co.za> Message-ID: <1348420993.97.0.777322946399.issue15034@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think the Library Manual's chapter 5 on exceptions, currently called Built-in Exceptions, would be a good place for a section on subclassing exceptions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 23 19:26:53 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 23 Sep 2012 17:26:53 +0000 Subject: [docs] [issue15034] Devguide should document best practices for stdlib exceptions In-Reply-To: <1339118524.85.0.923317590244.issue15034@psf.upfronthosting.co.za> Message-ID: <1348421213.67.0.357758100405.issue15034@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +cjerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 00:01:24 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 23 Sep 2012 22:01:24 +0000 Subject: [docs] [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1348437684.13.0.672535300275.issue15964@psf.upfronthosting.co.za> Martin v. L?wis added the comment: > Martin meant: > touch Include/Python-ast.h Python/Python-ast.c No, I *actually* meant 'make touch'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 00:05:32 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 23 Sep 2012 22:05:32 +0000 Subject: [docs] [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1348437932.19.0.653067903063.issue15964@psf.upfronthosting.co.za> Martin v. L?wis added the comment: > Just to clarify, in the original scenario, "python" did not refer to > anything. From the original comment: > $ python > No such file or directory So can you find out why asdl_c.py actually printed this error? With no python executable in PATH, it shouldn't even run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 02:13:51 2012 From: report at bugs.python.org (Neal Parikh) Date: Mon, 24 Sep 2012 00:13:51 +0000 Subject: [docs] [issue16011] "in" should be consistent with return value of __contains__ Message-ID: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> New submission from Neal Parikh: The Python 2.7.3 documentation says the following about defining __contains__: "Called to implement membership test operators. Should return true if item is in self, false otherwise. For mapping objects, this should consider the keys of the mapping rather than the values or the key-item pairs." This suggests that while you should return True/False, you don't need to. Also, the documentation doesn't say that if you return a value other than True or False, it will silently coerce other values to be True or False when you use "in". For example: >>> class Foo(object): ... def __contains__(self, item): return 42 ... >>> foo = Foo() >>> 3 in foo True >>> foo.__contains__(3) 42 When __contains__ is defined, "in" should return whatever __contains__ returns, even if this value is neither True nor False. That would be consistent with, for example, the comparison operators: You can return anything from __lt__ and "x < 4" will correctly pass along that value regardless of what it is. ---------- assignee: docs at python components: Documentation, Interpreter Core messages: 171085 nosy: docs at python, nparikh priority: normal severity: normal status: open title: "in" should be consistent with return value of __contains__ type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 02:26:10 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 24 Sep 2012 00:26:10 +0000 Subject: [docs] [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1348446370.53.0.430687883052.issue16011@psf.upfronthosting.co.za> Christian Heimes added the comment: The internal API is limited to flags as the sq_contains slot and the API function can only return an int: PyAPI_FUNC(int) PySequence_In(PyObject *o, PyObject *value) In order to return the Python object we'd have to alter the API which we can't do as the type slot and the function is part of the stable API and ABI. A doc update should explain why the code doesn't behave as you expect it. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 05:37:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 24 Sep 2012 03:37:48 +0000 Subject: [docs] [issue15964] SyntaxError in asdl when building 2.7 with system Python 3 In-Reply-To: <1347978379.29.0.810502621141.issue15964@psf.upfronthosting.co.za> Message-ID: <1348457867.8.0.44835254467.issue15964@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > So can you find out why asdl_c.py actually printed this error? I collected some additional information. Here is the beginning of Parser/asdl_c.py: #! /usr/bin/env python """Generate C code from an ASDL description.""" And in the scenario of this issue I have-- $ python -bash: /opt/local/Library/Frameworks/Python.framework/Versions/Current/bin/python: No such file or directory But-- $ /usr/bin/env python -V Python 3.2.3 Some more data: $ /usr/bin/env python -c "import sys; print(sys.executable)" /opt/local/Library/Frameworks/Python.framework/Versions/3.2/Resources/Python.app/Contents/MacOS/Python $ echo $PATH /opt/local/Library/Frameworks/Python.framework/Versions/Current/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/texbin $ which python /opt/local/bin/python $ /opt/local/bin/python -c "import sys; print(sys.executable)" /opt/local/Library/Frameworks/Python.framework/Versions/3.2/Resources/Python.app/Contents/MacOS/Python It's not immediately clear to me why running `python` doesn't find python in the second $PATH entry even though `which python` does. Also, creating a new terminal doesn't seem to exhibit the same problem, so the error state may not be fully reproducible after all (at least on my machine). In any case, Christian's work-around does resolve the issue for this particular error state while other solutions don't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 07:42:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 05:42:21 +0000 Subject: [docs] [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1348465341.4.0.0180420280326.issue16011@psf.upfronthosting.co.za> Ezio Melotti added the comment: http://docs.python.org/py3k/reference/datamodel.html#object.__contains__ says that __contain__ "Should return true if item is in self, false otherwise.". Here the lowercase true and false mean any true or false value, not just True and False and it's indeed possible to return any value. The fact that 'in' only returns True/False, possibly converting the return value of __contains__, should be documented in the 'in' documentation. http://docs.python.org/py3k/reference/expressions.html#membership-test-details says "For user-defined classes which define the __contains__() method, x in y is true if and only if y.__contains__(x) is true.". This could be changed to say that the return value is converted to True/False. ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 10:56:25 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Sep 2012 08:56:25 +0000 Subject: [docs] [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1348476985.29.0.412500443782.issue16011@psf.upfronthosting.co.za> Mark Dickinson added the comment: There was a related discussion on python-ideas a while back: http://mail.python.org/pipermail/python-ideas/2010-July/007733.html ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 12:31:08 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 10:31:08 +0000 Subject: [docs] [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <1348482667.82.0.465721180901.issue15979@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a patch. ---------- assignee: docs at python -> ezio.melotti keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file27273/issue15979.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 12:52:14 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 24 Sep 2012 10:52:14 +0000 Subject: [docs] [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <1348483934.34.0.607912426718.issue15979@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think there's a need for two separate examples sections (one "basic examples" and one "examples"). Also, you say a couple of times "The equivalent can be achieved from the :ref:`python-interface`", but that's not true since the command-line interface auto-calibrates, which the Python API (unfortunately) doesn't. Besides, the results use different units and can't be directly compared. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 12:57:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 10:57:45 +0000 Subject: [docs] [issue15979] Improve timeit documentation In-Reply-To: <1348111607.58.0.268885940785.issue15979@psf.upfronthosting.co.za> Message-ID: <1348484265.12.0.220519760287.issue15979@psf.upfronthosting.co.za> Ezio Melotti added the comment: The first example shows the basic usage and it's right at the beginning, all the other "advanced" examples are at the bottom. About the autocalibration you are right, I'll rephrase the sentence (see also #6422). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 15:48:33 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 13:48:33 +0000 Subject: [docs] [issue16014] Incomplete link in docs Message-ID: <1348494513.71.0.115486808135.issue16014@psf.upfronthosting.co.za> New submission from Ramchandra Apte: In http://docs.python.org/py3k/license.html#mersenne-twister, the link http://www.math.keio.ac.jp/ matumoto/MT2002/emt19937ar.html is not complete because there is a space in it. ---------- assignee: docs at python components: Documentation messages: 171125 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: Incomplete link in docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 15:53:02 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 13:53:02 +0000 Subject: [docs] [issue16015] Incorrect startup header in tutorial Message-ID: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> New submission from Ramchandra Apte: In http://docs.python.org/py3k/tutorial/interpreter.html#interactive-mode , the header shown is "Python 3.2 (py3k, Sep 12 2007, 12:21:02)". Python 3.2 was no made in Sep 12 2007, so it could not be compiled at that time. It should be a correct date or the date of today. ---------- assignee: docs at python components: Documentation messages: 171126 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: Incorrect startup header in tutorial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 15:58:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Sep 2012 13:58:35 +0000 Subject: [docs] [issue16014] Incomplete link in docs In-Reply-To: <1348494513.71.0.115486808135.issue16014@psf.upfronthosting.co.za> Message-ID: <3XQRpL2mwyzN1x@mail.python.org> Roundup Robot added the comment: New changeset 5f19c505ecea by Ezio Melotti in branch '2.7': #16014: fix broken link. http://hg.python.org/cpython/rev/5f19c505ecea New changeset 74b4c8c2894f by Ezio Melotti in branch '3.2': #16014: fix broken link. http://hg.python.org/cpython/rev/74b4c8c2894f New changeset 6db739d611fd by Ezio Melotti in branch 'default': #16014: merge with 3.2. http://hg.python.org/cpython/rev/6db739d611fd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 15:59:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 13:59:05 +0000 Subject: [docs] [issue16014] Incomplete link in docs In-Reply-To: <1348494513.71.0.115486808135.issue16014@psf.upfronthosting.co.za> Message-ID: <1348495145.2.0.282774236847.issue16014@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 15:59:11 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 13:59:11 +0000 Subject: [docs] [issue16016] Maybe make one author in ipaddress HOWTO Message-ID: <1348495151.31.0.0905378753903.issue16016@psf.upfronthosting.co.za> New submission from Ramchandra Apte: In http://docs.python.org/dev/howto/ipaddress.html, I think there should be one author field with "Peter Moody and Nick Coghlan" on the right side. ---------- assignee: docs at python components: Documentation messages: 171129 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: Maybe make one author in ipaddress HOWTO versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:03:19 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 14:03:19 +0000 Subject: [docs] [issue16017] "urls" should be capital in tutorial Message-ID: <1348495399.07.0.504496501292.issue16017@psf.upfronthosting.co.za> New submission from Ramchandra Apte: In http://docs.python.org/py3k/tutorial/stdlib.html#internet-access , "from urls" should be "from URLs". ---------- assignee: docs at python components: Documentation messages: 171130 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: "urls" should be capital in tutorial versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:08:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Sep 2012 14:08:26 +0000 Subject: [docs] [issue16017] "urls" should be capital in tutorial In-Reply-To: <1348495399.07.0.504496501292.issue16017@psf.upfronthosting.co.za> Message-ID: <3XQS1j0x21zNZ1@mail.python.org> Roundup Robot added the comment: New changeset 063a052af878 by Ezio Melotti in branch '2.7': #16017: capitalize URLs. http://hg.python.org/cpython/rev/063a052af878 New changeset d7455cceb917 by Ezio Melotti in branch '3.2': #16017: capitalize URLs. http://hg.python.org/cpython/rev/d7455cceb917 New changeset d6e4080960a3 by Ezio Melotti in branch 'default': #16017: merge with 3.2. http://hg.python.org/cpython/rev/d6e4080960a3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:09:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 14:09:07 +0000 Subject: [docs] [issue16017] "urls" should be capital in tutorial In-Reply-To: <1348495399.07.0.504496501292.issue16017@psf.upfronthosting.co.za> Message-ID: <1348495747.78.0.654328994969.issue16017@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report. ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:10:04 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 14:10:04 +0000 Subject: [docs] [issue16016] Maybe make one author in ipaddress HOWTO In-Reply-To: <1348495151.31.0.0905378753903.issue16016@psf.upfronthosting.co.za> Message-ID: <1348495804.9.0.562796617691.issue16016@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think it's OK to have two. ---------- nosy: +ezio.melotti resolution: -> rejected stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:12:18 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 14:12:18 +0000 Subject: [docs] [issue16015] Incorrect startup header in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <1348495938.72.0.0504207787054.issue16015@psf.upfronthosting.co.za> Ezio Melotti added the comment: Looks like the version got updated but not the rest, even the 3.3 doc has the same date. ---------- nosy: +ezio.melotti stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:14:31 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 14:14:31 +0000 Subject: [docs] [issue16015] Incorrect startup header in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <1348496071.53.0.0134974299459.issue16015@psf.upfronthosting.co.za> Ramchandra Apte added the comment: The later lines also needs to be updated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:17:29 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 14:17:29 +0000 Subject: [docs] [issue16015] impossible ... line in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <1348496249.11.0.396298834681.issue16015@psf.upfronthosting.co.za> Ramchandra Apte added the comment: In http://docs.python.org/dev/tutorial/introduction.html, there is an ... line which is impossible in that case: Variables must be ?defined? (assigned a value) before they can be used, or an error will occur: >>> >>> # try to access an undefined variable ... n Traceback (most recent call last): File "", line 1, in NameError: name 'n' is not defined It should be: >>> n # try to access an undefined variable Traceback (most recent call last): File "", line 1, in NameError: name 'n' is not defined ---------- title: Incorrect startup header in tutorial -> impossible ... line in tutorial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:18:17 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 14:18:17 +0000 Subject: [docs] [issue16015] impossible ... line in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <1348496297.53.0.491016923755.issue16015@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Oops! The last message should be in a new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:18:47 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 14:18:47 +0000 Subject: [docs] [issue16015] Incorrect startup header in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <1348496327.92.0.626226151426.issue16015@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- title: impossible ... line in tutorial -> Incorrect startup header in tutorial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:19:53 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 14:19:53 +0000 Subject: [docs] [issue16018] Impossible ... line in tutorial In-Reply-To: <1348496370.31.0.7411232442.issue16018@psf.upfronthosting.co.za> Message-ID: <1348496393.59.0.779414469034.issue16018@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:20:04 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 14:20:04 +0000 Subject: [docs] [issue16015] Incorrect startup header in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <1348496404.45.0.858619095864.issue16015@psf.upfronthosting.co.za> Ezio Melotti added the comment: I'm not sure it's worth updating it, it will probably get outdated again when new versions are released. Also this is just an example, the actual header and dates might be different depending on the version/.OS/compiler. ---------- versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:22:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 14:22:16 +0000 Subject: [docs] [issue16018] Impossible ... line in tutorial In-Reply-To: <1348496370.31.0.7411232442.issue16018@psf.upfronthosting.co.za> Message-ID: <1348496536.73.0.820722274855.issue16018@psf.upfronthosting.co.za> Ezio Melotti added the comment: Is it? Python 3.2.3 (default, May 3 2012, 15:54:42) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> # try to access an undefined variable ... n Traceback (most recent call last): File "", line 2, in NameError: name 'n' is not defined >>> ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:23:57 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 14:23:57 +0000 Subject: [docs] [issue16019] Python highlighting in tutorial; should be text highlighting Message-ID: <1348496637.1.0.121151069885.issue16019@psf.upfronthosting.co.za> New submission from Ramchandra Apte: In http://docs.python.org/py3k/tutorial/stdlib2.html#logging , a text output has Python highlighting; it should be text highlighting This is incorrectly highlighted text: WARNING:root:Warning:config file server.conf not found ERROR:root:Error occurred CRITICAL:root:Critical error -- shutting down ---------- assignee: docs at python components: Documentation messages: 171142 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: Python highlighting in tutorial;should be text highlighting _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:27:11 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 14:27:11 +0000 Subject: [docs] [issue16020] Missing >>> in Python code example Message-ID: <1348496831.82.0.497019065466.issue16020@psf.upfronthosting.co.za> New submission from Ramchandra Apte: In http://docs.python.org/py3k/tutorial/stdlib2.html#logging , some code in a code sample is missing ">>>". The code is: unsearched = deque([starting_node]) def breadth_first_search(unsearched): node = unsearched.popleft() for m in gen_moves(node): if is_goal(m): return m unsearched.append(m) should be: >>> unsearched = deque([starting_node]) >>> def breadth_first_search(unsearched): >>> node = unsearched.popleft() >>> for m in gen_moves(node): >>> if is_goal(m): >>> return m >>> unsearched.append(m) ---------- assignee: docs at python components: Documentation messages: 171143 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: Missing >>> in Python code example _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:32:03 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Sep 2012 14:32:03 +0000 Subject: [docs] [issue16019] Python highlighting in tutorial; should be text highlighting In-Reply-To: <1348496637.1.0.121151069885.issue16019@psf.upfronthosting.co.za> Message-ID: <3XQSXy07z0zNND@mail.python.org> Roundup Robot added the comment: New changeset ce943bce76c9 by Ezio Melotti in branch '2.7': #16019, #16020: fix syntax highlight. http://hg.python.org/cpython/rev/ce943bce76c9 New changeset 101354f95a07 by Ezio Melotti in branch '3.2': #16019, #16020: fix syntax highlight. http://hg.python.org/cpython/rev/101354f95a07 New changeset 62ddf16eea24 by Ezio Melotti in branch 'default': #16019, #16020: merge with 3.2. http://hg.python.org/cpython/rev/62ddf16eea24 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:32:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Sep 2012 14:32:04 +0000 Subject: [docs] [issue16020] Missing >>> in Python code example In-Reply-To: <1348496831.82.0.497019065466.issue16020@psf.upfronthosting.co.za> Message-ID: <3XQSXy6VTlzNND@mail.python.org> Roundup Robot added the comment: New changeset ce943bce76c9 by Ezio Melotti in branch '2.7': #16019, #16020: fix syntax highlight. http://hg.python.org/cpython/rev/ce943bce76c9 New changeset 101354f95a07 by Ezio Melotti in branch '3.2': #16019, #16020: fix syntax highlight. http://hg.python.org/cpython/rev/101354f95a07 New changeset 62ddf16eea24 by Ezio Melotti in branch 'default': #16019, #16020: merge with 3.2. http://hg.python.org/cpython/rev/62ddf16eea24 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:32:43 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 14:32:43 +0000 Subject: [docs] [issue16020] Missing >>> in Python code example In-Reply-To: <1348496831.82.0.497019065466.issue16020@psf.upfronthosting.co.za> Message-ID: <1348497163.42.0.961157680349.issue16020@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:33:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 14:33:16 +0000 Subject: [docs] [issue16019] Python highlighting in tutorial; should be text highlighting In-Reply-To: <1348496637.1.0.121151069885.issue16019@psf.upfronthosting.co.za> Message-ID: <1348497196.74.0.220674069781.issue16019@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:34:15 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 24 Sep 2012 14:34:15 +0000 Subject: [docs] [issue16020] Missing >>> in Python code example In-Reply-To: <1348496831.82.0.497019065466.issue16020@psf.upfronthosting.co.za> Message-ID: <1348497255.49.0.774432141744.issue16020@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the report. Minor clarification for future reference. Subsequent lines should begin with "..." (when doctest-style is used): >>> def breadth_first_search(unsearched): ... node = unsearched.popleft() etc. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:46:55 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 14:46:55 +0000 Subject: [docs] [issue16022] Mistake in "What's New in Python 3.3" Message-ID: <1348498015.65.0.0485764115741.issue16022@psf.upfronthosting.co.za> New submission from Ramchandra Apte: In "What's New in Python 3.3", there is a note: Note: Beta users should be aware that this document is currently in draft form. It will be updated substantially as Python 3.3 moves towards release, so it?s worth checking back even after reading earlier versions. If it is still in a draft form, replace "Beta users" with "Pre-release users" or something similar. Else, obviously remove the note. ---------- assignee: docs at python components: Documentation messages: 171150 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: Mistake in "What's New in Python 3.3" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:52:50 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 24 Sep 2012 14:52:50 +0000 Subject: [docs] [issue16020] Missing >>> in Python code example In-Reply-To: <1348496831.82.0.497019065466.issue16020@psf.upfronthosting.co.za> Message-ID: <1348498369.99.0.127425073668.issue16020@psf.upfronthosting.co.za> Ramchandra Apte added the comment: This issue still does not appear to be fixed - looking at http://hg.python.org/cpython/file/101354f95a07/Doc/tutorial/stdlib2.rst . And sorry, the URL should be http://docs.python.org/py3k/tutorial/stdlib2.html#tools-for-working-with-lists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 16:54:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 14:54:35 +0000 Subject: [docs] [issue16020] Missing >>> in Python code example In-Reply-To: <1348496831.82.0.497019065466.issue16020@psf.upfronthosting.co.za> Message-ID: <1348498475.1.0.333611651494.issue16020@psf.upfronthosting.co.za> Ezio Melotti added the comment: The code didn't have any output, so I created a separate code block with regular Python highlight -- no need to add >>>/... there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 18:08:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Sep 2012 16:08:03 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation Message-ID: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch corrects a few markup errors in the zipfile documentation and adds a few relevant hyperlinks. ---------- assignee: docs at python components: Documentation files: doc_zipfile-3.3.patch keywords: patch messages: 171157 nosy: docs at python, storchaka priority: normal severity: normal status: open title: Minor corrections to the zipfile documentation versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file27277/doc_zipfile-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 18:09:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Sep 2012 16:09:46 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1348502986.8.0.423351096231.issue16025@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27278/doc_zipfile-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 18:10:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Sep 2012 16:10:15 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1348503015.43.0.65793147267.issue16025@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file27279/doc_zipfile-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 18:13:08 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Sep 2012 16:13:08 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1348503188.49.0.923864542017.issue16025@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 18:53:03 2012 From: report at bugs.python.org (Peter Eisentraut) Date: Mon, 24 Sep 2012 16:53:03 +0000 Subject: [docs] [issue16026] csv.DictReader argument names documented incorrectly Message-ID: <1348505583.77.0.632308357055.issue16026@psf.upfronthosting.co.za> New submission from Peter Eisentraut: The documentation for the csv.DictReader constructor is .. class:: DictReader(csvfile, fieldnames=None, restkey=None, restval=None, dialect='excel', *args, **kwds) but the implementation is def __init__(self, f, fieldnames=None, restkey=None, restval=None, dialect="excel", *args, **kwds): The name of the first argument is documented incorrectly, leading to surprise errors when attempting to use key word arguments. ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 171161 nosy: docs at python, petere priority: normal severity: normal status: open title: csv.DictReader argument names documented incorrectly type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 20:18:19 2012 From: report at bugs.python.org (Neal Parikh) Date: Mon, 24 Sep 2012 18:18:19 +0000 Subject: [docs] [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1348510699.55.0.00341422831466.issue16011@psf.upfronthosting.co.za> Neal Parikh added the comment: Thanks for passing along the thread, it was interesting. Oddly, it seemed to die off with no real resolution. I realize it is now too late to change __contains__ to return a non-boolean value, but for reference, the reason I wanted to return something different from __contains__ was also to implement a DSL, though not a SQL-related one. Basically, I have some kind of abstract mathematical set S, and I wanted "x in S" to return a constraint that the variable x must lie in the set S for use in a larger problem description. (In fact, one could implement __contains__ so it returned True/False with a constant numeric argument and a constraint object with a variable argument.) This would have mirrored the way one would write all this mathematically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 20:45:23 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Sep 2012 18:45:23 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <1348512323.02.0.95826218182.issue14167@psf.upfronthosting.co.za> Mark Dickinson added the comment: I think something went wrong with this doc change. The docs used to say: """ If the :keyword:`finally` clause raises another exception or executes a :keyword:`return` or :keyword:`break` statement, the saved exception is lost. """ Now we have: """ If there is a saved exception or :keyword:`break` statement, it is re-raised at the end of the :keyword:`finally` clause. """ which doesn't make much sense (what does 'it' refer to in the case of a 'break' statement), and we seem to have lost the explicit statement that a 'break' in a finally cause swallows exceptions. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 20:45:53 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Sep 2012 18:45: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: <1348512352.97.0.760544609311.issue14167@psf.upfronthosting.co.za> Mark Dickinson added the comment: See also issue 16021. Re-opening this issue for reconsideration. ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 20:46:17 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Sep 2012 18:46:17 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <1348512377.68.0.493478227385.issue14167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Bah. Issue 16028; sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 20:47:53 2012 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 24 Sep 2012 18:47: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: <1348512473.78.0.73943940449.issue14167@psf.upfronthosting.co.za> Yury Selivanov added the comment: Can you close this one? It's already merged. ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 20:50:59 2012 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 24 Sep 2012 18:50:59 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <1348512659.64.0.241699450746.issue14167@psf.upfronthosting.co.za> Yury Selivanov added the comment: I'll open another issue and will attach a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 20:53:01 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Sep 2012 18:53:01 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <1348512781.31.0.505344895086.issue14167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yury: I don't think there's any need for yet another issue; this one will do (or if you prefer, attach the patch to issue 16028.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 21:01:34 2012 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 24 Sep 2012 19:01:34 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <1348513294.9.0.164783508203.issue14167@psf.upfronthosting.co.za> Yury Selivanov added the comment: OK. Attaching the patch. Please review. ---------- Added file: http://bugs.python.org/file27280/finally_doc_patch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 21:17:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Sep 2012 19:17: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: <3XQZtN0VXgzQSF@mail.python.org> Roundup Robot added the comment: New changeset 485902ecf0ee by Mark Dickinson in branch '3.2': Issue #14167: restore statement about breaks in finally clauses. http://hg.python.org/cpython/rev/485902ecf0ee New changeset f5ed3a5440b2 by Mark Dickinson in branch 'default': Issue #14167: merge fix from 3.2 branch. http://hg.python.org/cpython/rev/f5ed3a5440b2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 21:19:17 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Sep 2012 19:19:17 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <1348514357.74.0.661627442723.issue14167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the quick fix! Patch applied to 3.2 and 3.3 The 2.7 commit also introduced an incorrect statement about exception chaining; I'll look at fixing that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 21:19:49 2012 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 24 Sep 2012 19:19:49 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <1348514388.93.0.851982513213.issue14167@psf.upfronthosting.co.za> Yury Selivanov added the comment: thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 21:25:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Sep 2012 19:25:46 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <3XQb3r6yPkzNbr@mail.python.org> Roundup Robot added the comment: New changeset f51d11405f1d by Mark Dickinson in branch '2.7': Issue #14167: restore statement about breaks in finally clauses; remove statement about exception chaining. http://hg.python.org/cpython/rev/f51d11405f1d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 21:26:52 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Sep 2012 19:26:52 +0000 Subject: [docs] [issue14167] document return statement in finally blocks In-Reply-To: <1330614429.57.0.59180427723.issue14167@psf.upfronthosting.co.za> Message-ID: <1348514812.08.0.962533539052.issue14167@psf.upfronthosting.co.za> Mark Dickinson added the comment: Reclosing. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 21:27:48 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Sep 2012 19:27:48 +0000 Subject: [docs] [issue16028] break in finally discards exception In-Reply-To: <1348511279.94.0.440526778313.issue16028@psf.upfronthosting.co.za> Message-ID: <1348514868.81.0.946436190109.issue16028@psf.upfronthosting.co.za> Mark Dickinson added the comment: That portion of the documentation has been restored. Closing this issue. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python resolution: -> fixed status: open -> closed versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 23:11:17 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Sep 2012 21:11:17 +0000 Subject: [docs] [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1348521077.54.0.111112543379.issue16011@psf.upfronthosting.co.za> STINNER Victor added the comment: Do you need this PEP? http://www.python.org/dev/peps/pep-0335/ ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 23:23:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Sep 2012 21:23:38 +0000 Subject: [docs] [issue16022] Mistake in "What's New in Python 3.3" In-Reply-To: <1348498015.65.0.0485764115741.issue16022@psf.upfronthosting.co.za> Message-ID: <3XQdgr6PsdzQhc@mail.python.org> Roundup Robot added the comment: New changeset 35289291a2e6 by Victor Stinner in branch 'default': Close #16022: What's New in Python 3.3 document is no more at beta stage http://hg.python.org/cpython/rev/35289291a2e6 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 23:25:58 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Sep 2012 21:25:58 +0000 Subject: [docs] [issue16022] Mistake in "What's New in Python 3.3" In-Reply-To: <1348498015.65.0.0485764115741.issue16022@psf.upfronthosting.co.za> Message-ID: <1348521958.77.0.720411491212.issue16022@psf.upfronthosting.co.za> STINNER Victor added the comment: @Georg: You should include this fix in Python 3.3 final. @Raymond: FYI, I removed your warning :) ---------- nosy: +georg.brandl, haypo, rhettinger resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 23:30:09 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Sep 2012 21:30:09 +0000 Subject: [docs] [issue16022] Mistake in "What's New in Python 3.3" In-Reply-To: <1348498015.65.0.0485764115741.issue16022@psf.upfronthosting.co.za> Message-ID: <1348522209.56.0.0253845074636.issue16022@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Sep 24 23:59:07 2012 From: report at bugs.python.org (Georg Brandl) Date: Mon, 24 Sep 2012 21:59:07 +0000 Subject: [docs] [issue16022] Mistake in "What's New in Python 3.3" In-Reply-To: <1348498015.65.0.0485764115741.issue16022@psf.upfronthosting.co.za> Message-ID: <1348523947.38.0.503882304952.issue16022@psf.upfronthosting.co.za> Georg Brandl added the comment: Done. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 01:53:59 2012 From: report at bugs.python.org (Neal Parikh) Date: Mon, 24 Sep 2012 23:53:59 +0000 Subject: [docs] [issue16011] "in" should be consistent with return value of __contains__ In-Reply-To: <1348445631.47.0.961273834435.issue16011@psf.upfronthosting.co.za> Message-ID: <1348530839.85.0.342021069164.issue16011@psf.upfronthosting.co.za> Neal Parikh added the comment: I don't, but thanks for passing that along. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 03:03:03 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 25 Sep 2012 01:03:03 +0000 Subject: [docs] [issue16015] Incorrect startup header in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <1348534983.73.0.219755371436.issue16015@psf.upfronthosting.co.za> ?ric Araujo added the comment: Suggest closing: I think this causes no issue and changing it would have no benefit. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 03:03:33 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 25 Sep 2012 01:03:33 +0000 Subject: [docs] [issue16026] csv.DictReader argument names documented incorrectly In-Reply-To: <1348505583.77.0.632308357055.issue16026@psf.upfronthosting.co.za> Message-ID: <1348535013.07.0.819939156497.issue16026@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy stage: -> needs patch versions: -Python 2.6, Python 3.1, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 04:38:26 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Sep 2012 02:38:26 +0000 Subject: [docs] [issue16015] Incorrect startup header in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <3XQmg448SDzQpP@mail.python.org> Roundup Robot added the comment: New changeset 5f4841977bee by Chris Jerdonek in branch '3.2': Issue #16015: Fix NameError doctest example in tutorial introduction. http://hg.python.org/cpython/rev/5f4841977bee New changeset dae33c2e916b by Chris Jerdonek in branch 'default': Issue #16015: Merge fix from 3.2. http://hg.python.org/cpython/rev/dae33c2e916b New changeset 878c33d2f301 by Chris Jerdonek in branch '2.7': Issue #16015: Fix NameError doctest example in tutorial introduction. http://hg.python.org/cpython/rev/878c33d2f301 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 05:07:25 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 25 Sep 2012 03:07:25 +0000 Subject: [docs] [issue16015] Incorrect startup header in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <1348542445.24.0.769842756115.issue16015@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I don't mind fixing the year suggestion (in the interest of "realism" and for practice). ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 11:32:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Sep 2012 09:32:47 +0000 Subject: [docs] [issue16015] Incorrect startup header in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <1348565566.94.0.413550013524.issue16015@psf.upfronthosting.co.za> Ezio Melotti added the comment: OK. If you change the date also change s/py3k/default/, py3k was used on the SVN days. Here is what my header looks like: $ python3 Python 3.2.3 (default, May 3 2012, 15:54:42) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. While you are at it, you could also add .. code-block:: sh. ---------- stage: needs patch -> type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 12:18:30 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 25 Sep 2012 10:18:30 +0000 Subject: [docs] [issue16036] simplify int() signature docs Message-ID: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to simplify the documentation of the built-in function int()'s signature: int([number | string[, base]]) and to make any needed changes to the text of the docs as a consequence. Discussion around this issue began in the comments to issue 14783 about int() and str()'s docstrings. [I copied the nosy list from that issue.] ---------- assignee: docs at python components: Documentation keywords: easy messages: 171238 nosy: chris.jerdonek, cvrebert, docs at python, eric.araujo, ezio.melotti, georg.brandl, rhettinger, storchaka, terry.reedy, tshepang priority: normal severity: normal status: open title: simplify int() signature docs type: enhancement versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 12:19:15 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 25 Sep 2012 10:19:15 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1348568355.66.0.148768279039.issue14783@psf.upfronthosting.co.za> Chris Jerdonek added the comment: To make it easier to make progress on this docstring issue, I created issue 16036 to focus on int()'s reST documentation. (I have a comment on that aspect.) This will allow the current issue to focus on the docstring aspect. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 13:35:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Sep 2012 11:35:22 +0000 Subject: [docs] [issue16015] Incorrect startup header in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <3XR0Zc54sszQpY@mail.python.org> Roundup Robot added the comment: New changeset d2df5bc89fc9 by Chris Jerdonek in branch '3.2': Issue #16015: Make welcome message more realistic in tutorial example. http://hg.python.org/cpython/rev/d2df5bc89fc9 New changeset fcb5bc824e3e by Chris Jerdonek in branch 'default': Issue #16015: Merge and update from 3.2. http://hg.python.org/cpython/rev/fcb5bc824e3e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 13:39:43 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 25 Sep 2012 11:39:43 +0000 Subject: [docs] [issue16015] Incorrect startup header in tutorial In-Reply-To: <1348494782.32.0.720891839928.issue16015@psf.upfronthosting.co.za> Message-ID: <1348573182.99.0.186563787439.issue16015@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Fixed, and thanks for the report! (Ezio, I didn't add "code-block:: sh" because it resulted in some undesired highlighting in the interpreter portion when I tried it.) ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 14:33:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 25 Sep 2012 12:33:13 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1348576393.53.0.172208737666.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: [Continuing the issue 14783 discussion] > That said, I don't have a strong opinion about this, so if people think that x should be used, it's fine with me. I also feel that *x* should be used, since that is what the code enforces. I'm attaching a revised patch. This patch also makes related adjustments to the corresponding text. ---------- keywords: +needs review, patch stage: -> patch review Added file: http://bugs.python.org/file27294/issue-16036-1-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 15:14:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 25 Sep 2012 13:14:19 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1348578859.08.0.309024102236.issue16025@psf.upfronthosting.co.za> Chris Jerdonek added the comment: - :meth:`close`\ d without adding any files to the archive, the appropriate + :meth:`close `\ d without adding any files to the archive, the appropriate This formatting looks odd to me when rendered (both cases). I would perhaps suggest something like, "... and then close() is called without ...." ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 16:08:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Sep 2012 14:08:58 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1348582138.49.0.127152409025.issue16025@psf.upfronthosting.co.za> Ezio Melotti added the comment: :meth:`closed ` works too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 16:29:34 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 25 Sep 2012 14:29:34 +0000 Subject: [docs] [issue15935] clarify argparse docs re: add_argument() type and default arguments In-Reply-To: <1347485175.79.0.860808168134.issue15935@psf.upfronthosting.co.za> Message-ID: <1348583374.66.0.483875465581.issue15935@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Looks good to me too! Thanks; I'll apply the patch. ---------- assignee: docs at python -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 16:48:34 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Sep 2012 14:48:34 +0000 Subject: [docs] [issue15935] clarify argparse docs re: add_argument() type and default arguments In-Reply-To: <1347485175.79.0.860808168134.issue15935@psf.upfronthosting.co.za> Message-ID: <3XR4sX3b2SzNnR@mail.python.org> Roundup Robot added the comment: New changeset b624059a8dac by Barry Warsaw in branch '2.7': - Issue #15935: Clarification of argparse docs, re: add_argument() type and http://hg.python.org/cpython/rev/b624059a8dac New changeset b738e42e664a by Barry Warsaw in branch '3.2': - Issue #15935: Clarification of argparse docs, re: add_argument() type and http://hg.python.org/cpython/rev/b738e42e664a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 16:48:55 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 25 Sep 2012 14:48:55 +0000 Subject: [docs] [issue15935] clarify argparse docs re: add_argument() type and default arguments In-Reply-To: <1347485175.79.0.860808168134.issue15935@psf.upfronthosting.co.za> Message-ID: <1348584535.51.0.648844420803.issue15935@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 17:10:03 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 25 Sep 2012 15:10:03 +0000 Subject: [docs] [issue15935] clarify argparse docs re: add_argument() type and default arguments In-Reply-To: <1347485175.79.0.860808168134.issue15935@psf.upfronthosting.co.za> Message-ID: <1348585803.24.0.112363752593.issue15935@psf.upfronthosting.co.za> R. David Murray added the comment: FTR, the 3.3 commit is cce2bfe03dc5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 20:03:36 2012 From: report at bugs.python.org (Erik Johansson) Date: Tue, 25 Sep 2012 18:03:36 +0000 Subject: [docs] [issue14201] Documented caching for shared library's __getattr__ and __getitem__ is incorrect In-Reply-To: <1330957421.08.0.5889949548.issue14201@psf.upfronthosting.co.za> Message-ID: <1348596216.06.0.491660745198.issue14201@psf.upfronthosting.co.za> Erik Johansson added the comment: The issue14201-v2.patch patch looks good to me at least. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 20:21:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Sep 2012 18:21:18 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1348597278.09.0.0860912875863.issue16025@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27277/doc_zipfile-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 20:21:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Sep 2012 18:21:33 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1348597293.0.0.148784136898.issue16025@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27278/doc_zipfile-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 20:21:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Sep 2012 18:21:46 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348502882.43.0.635160318129.issue16025@psf.upfronthosting.co.za> Message-ID: <1348597306.52.0.503050861215.issue16025@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27279/doc_zipfile-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 20:23:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Sep 2012 18:23:20 +0000 Subject: [docs] [issue16025] Minor corrections to the zipfile documentation In-Reply-To: <1348582138.49.0.127152409025.issue16025@psf.upfronthosting.co.za> Message-ID: <201209252122.38167.storchaka@gmail.com> Serhiy Storchaka added the comment: > :meth:`closed ` works too. Patches updated. ---------- Added file: http://bugs.python.org/file27298/doc_zipfile-3.3.patch Added file: http://bugs.python.org/file27299/doc_zipfile-3.2.patch Added file: http://bugs.python.org/file27300/doc_zipfile-2.7.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 3d9c323711d0 Doc/library/zipfile.rst --- a/Doc/library/zipfile.rst Mon Sep 24 07:46:35 2012 +0200 +++ b/Doc/library/zipfile.rst Mon Sep 24 18:56:25 2012 +0300 @@ -61,7 +61,7 @@ .. class:: ZipInfo(filename='NoName', date_time=(1980,1,1,0,0,0)) Class used to represent information about a member of an archive. Instances - of this class are returned by the :meth:`getinfo` and :meth:`infolist` + of this class are returned by the :meth:`.getinfo` and :meth:`.infolist` methods of :class:`ZipFile` objects. Most users of the :mod:`zipfile` module will not need to create these, but only use those created by this module. *filename* should be the full name of the archive member, and @@ -87,20 +87,20 @@ .. data:: ZIP_DEFLATED The numeric constant for the usual ZIP compression method. This requires the - zlib module. + :mod:`zlib` module. .. data:: ZIP_BZIP2 The numeric constant for the BZIP2 compression method. This requires the - bz2 module. + :mod:`bz2` module. .. versionadded:: 3.3 .. data:: ZIP_LZMA The numeric constant for the LZMA compression method. This requires the - lzma module. + :mod:`lzma` module. .. versionadded:: 3.3 @@ -155,7 +155,7 @@ these extensions. If the file is created with mode ``'a'`` or ``'w'`` and then - :meth:`close`\ d without adding any files to the archive, the appropriate + :meth:`closed ` without adding any files to the archive, the appropriate ZIP structures for an empty archive will be written to the file. ZipFile is also a context manager and therefore supports the @@ -169,7 +169,7 @@ Added the ability to use :class:`ZipFile` as a context manager. .. versionchanged:: 3.3 - Added support for :mod:`bzip2` and :mod:`lzma` compression. + Added support for :mod:`bzip2 ` and :mod:`lzma` compression. .. method:: ZipFile.close() @@ -207,7 +207,7 @@ *mode* parameter, if included, must be one of the following: ``'r'`` (the default), ``'U'``, or ``'rU'``. Choosing ``'U'`` or ``'rU'`` will enable :term:`universal newlines` support in the read-only object. *pwd* is the - password used for encrypted files. Calling :meth:`open` on a closed + password used for encrypted files. Calling :meth:`.open` on a closed ZipFile will raise a :exc:`RuntimeError`. .. note:: @@ -229,7 +229,7 @@ .. note:: - The :meth:`open`, :meth:`read` and :meth:`extract` methods can take a filename + The :meth:`.open`, :meth:`read` and :meth:`extract` methods can take a filename or a :class:`ZipInfo` object. You will appreciate this when trying to read a ZIP file that contains members with duplicate names. @@ -335,7 +335,7 @@ :class:`ZipInfo` constructor sets this member to :const:`ZIP_STORED`. .. versionchanged:: 3.2 - The *compression_type* argument. + The *compress_type* argument. The following data attributes are also available: @@ -351,7 +351,7 @@ The comment text associated with the ZIP file. If assigning a comment to a :class:`ZipFile` instance created with mode 'a' or 'w', this should be a string no longer than 65535 bytes. Comments longer than this will be - truncated in the written archive when :meth:`ZipFile.close` is called. + truncated in the written archive when :meth:`close` is called. .. _pyzipfile-objects: @@ -407,8 +407,8 @@ ZipInfo Objects --------------- -Instances of the :class:`ZipInfo` class are returned by the :meth:`getinfo` and -:meth:`infolist` methods of :class:`ZipFile` objects. Each object stores +Instances of the :class:`ZipInfo` class are returned by the :meth:`.getinfo` and +:meth:`.infolist` methods of :class:`ZipFile` objects. Each object stores information about a single member of the ZIP archive. Instances have the following attributes: -------------- next part -------------- diff -r aa73e60f65e9 Doc/library/zipfile.rst --- a/Doc/library/zipfile.rst Fri Sep 21 17:26:35 2012 +0300 +++ b/Doc/library/zipfile.rst Mon Sep 24 19:01:40 2012 +0300 @@ -61,7 +61,7 @@ .. class:: ZipInfo(filename='NoName', date_time=(1980,1,1,0,0,0)) Class used to represent information about a member of an archive. Instances - of this class are returned by the :meth:`getinfo` and :meth:`infolist` + of this class are returned by the :meth:`.getinfo` and :meth:`.infolist` methods of :class:`ZipFile` objects. Most users of the :mod:`zipfile` module will not need to create these, but only use those created by this module. *filename* should be the full name of the archive member, and @@ -87,7 +87,7 @@ .. data:: ZIP_DEFLATED The numeric constant for the usual ZIP compression method. This requires the - zlib module. No other compression methods are currently supported. + :mod:`zlib` module. No other compression methods are currently supported. .. seealso:: @@ -130,7 +130,7 @@ these extensions. If the file is created with mode ``'a'`` or ``'w'`` and then - :meth:`close`\ d without adding any files to the archive, the appropriate + :meth:`closed ` without adding any files to the archive, the appropriate ZIP structures for an empty archive will be written to the file. ZipFile is also a context manager and therefore supports the @@ -179,7 +179,7 @@ *mode* parameter, if included, must be one of the following: ``'r'`` (the default), ``'U'``, or ``'rU'``. Choosing ``'U'`` or ``'rU'`` will enable :term:`universal newlines` support in the read-only object. *pwd* is the - password used for encrypted files. Calling :meth:`open` on a closed + password used for encrypted files. Calling :meth:`.open` on a closed ZipFile will raise a :exc:`RuntimeError`. .. note:: @@ -201,7 +201,7 @@ .. note:: - The :meth:`open`, :meth:`read` and :meth:`extract` methods can take a filename + The :meth:`.open`, :meth:`read` and :meth:`extract` methods can take a filename or a :class:`ZipInfo` object. You will appreciate this when trying to read a ZIP file that contains members with duplicate names. @@ -307,7 +307,7 @@ :class:`ZipInfo` constructor sets this member to :const:`ZIP_STORED`. .. versionchanged:: 3.2 - The *compression_type* argument. + The *compress_type* argument. The following data attributes are also available: @@ -323,7 +323,7 @@ The comment text associated with the ZIP file. If assigning a comment to a :class:`ZipFile` instance created with mode 'a' or 'w', this should be a string no longer than 65535 bytes. Comments longer than this will be - truncated in the written archive when :meth:`ZipFile.close` is called. + truncated in the written archive when :meth:`close` is called. .. _pyzipfile-objects: @@ -379,8 +379,8 @@ ZipInfo Objects --------------- -Instances of the :class:`ZipInfo` class are returned by the :meth:`getinfo` and -:meth:`infolist` methods of :class:`ZipFile` objects. Each object stores +Instances of the :class:`ZipInfo` class are returned by the :meth:`.getinfo` and +:meth:`.infolist` methods of :class:`ZipFile` objects. Each object stores information about a single member of the ZIP archive. Instances have the following attributes: -------------- next part -------------- diff -r dc080e19f7aa Doc/library/zipfile.rst --- a/Doc/library/zipfile.rst Tue Aug 28 12:33:46 2012 +0200 +++ b/Doc/library/zipfile.rst Mon Sep 24 19:05:30 2012 +0300 @@ -53,7 +53,7 @@ .. class:: ZipInfo([filename[, date_time]]) Class used to represent information about a member of an archive. Instances - of this class are returned by the :meth:`getinfo` and :meth:`infolist` + of this class are returned by the :meth:`.getinfo` and :meth:`.infolist` methods of :class:`ZipFile` objects. Most users of the :mod:`zipfile` module will not need to create these, but only use those created by this module. *filename* should be the full name of the archive member, and @@ -78,7 +78,7 @@ .. data:: ZIP_DEFLATED The numeric constant for the usual ZIP compression method. This requires the - zlib module. No other compression methods are currently supported. + :mod:`zlib` module. No other compression methods are currently supported. .. seealso:: @@ -125,7 +125,7 @@ .. versionchanged:: 2.7.1 If the file is created with mode ``'a'`` or ``'w'`` and then - :meth:`close`\ d without adding any files to the archive, the appropriate + :meth:`closed ` without adding any files to the archive, the appropriate ZIP structures for an empty archive will be written to the file. ZipFile is also a context manager and therefore supports the @@ -175,7 +175,7 @@ ``'U'``, or ``'rU'``. Choosing ``'U'`` or ``'rU'`` will enable :term:`universal newline ` support in the read-only object. *pwd* is the password used for encrypted files. - Calling :meth:`open` on a closed ZipFile will raise a :exc:`RuntimeError`. + Calling :meth:`.open` on a closed ZipFile will raise a :exc:`RuntimeError`. .. note:: @@ -196,7 +196,7 @@ .. note:: - The :meth:`open`, :meth:`read` and :meth:`extract` methods can take a filename + The :meth:`.open`, :meth:`read` and :meth:`extract` methods can take a filename or a :class:`ZipInfo` object. You will appreciate this when trying to read a ZIP file that contains members with duplicate names. @@ -313,7 +313,7 @@ :class:`ZipInfo` constructor sets this member to :const:`ZIP_STORED`. .. versionchanged:: 2.7 - The *compression_type* argument. + The *compress_type* argument. The following data attributes are also available: @@ -329,7 +329,7 @@ The comment text associated with the ZIP file. If assigning a comment to a :class:`ZipFile` instance created with mode 'a' or 'w', this should be a string no longer than 65535 bytes. Comments longer than this will be - truncated in the written archive when :meth:`ZipFile.close` is called. + truncated in the written archive when :meth:`.close` is called. .. _pyzipfile-objects: @@ -369,8 +369,8 @@ ZipInfo Objects --------------- -Instances of the :class:`ZipInfo` class are returned by the :meth:`getinfo` and -:meth:`infolist` methods of :class:`ZipFile` objects. Each object stores +Instances of the :class:`ZipInfo` class are returned by the :meth:`.getinfo` and +:meth:`.infolist` methods of :class:`ZipFile` objects. Each object stores information about a single member of the ZIP archive. Instances have the following attributes: From report at bugs.python.org Tue Sep 25 22:06:02 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Sep 2012 20:06:02 +0000 Subject: [docs] [issue16048] Tutorial-classes-remarks: replace paragragh Message-ID: <1348603562.92.0.789475109772.issue16048@psf.upfronthosting.co.za> New submission from Terry J. Reedy: (from python-list thread "data attributes override method attributes?") "9.4. Random Remarks Data attributes override method attributes with the same name; to avoid accidental name conflicts, which may cause hard-to-find bugs in large programs, it is wise to use some kind of convention that minimizes the chance of conflicts. Possible conventions include capitalizing method names, prefixing data attribute names with a small unique string (perhaps just an underscore), or using verbs for methods and nouns for data attributes." The first semi-sentence is wrong. Within a class or instance attribute space, later assignments replace earlier ones. Between them, instance attributes (usually) override class attributes. The exceptions are (some? all?) special methods. One suggestion on the thread is to replace the clause with 'Instance attributes override class attributes', as that is the apparent intent, but the exception needs to be noted. The suggested Method and _data conventions are wrong in that they contradict PEP8 style. Peter Otten suggested that the convention suggestion be shortened to "To avoid name conflicts consider using verbs for methods and nouns for data attributes". ---------- assignee: docs at python components: Documentation messages: 171316 nosy: docs at python, terry.reedy priority: normal severity: normal status: open title: Tutorial-classes-remarks: replace paragragh versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 22:16:04 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Sep 2012 20:16:04 +0000 Subject: [docs] [issue16048] Tutorial-classes-remarks: replace paragragh In-Reply-To: <1348603562.92.0.789475109772.issue16048@psf.upfronthosting.co.za> Message-ID: <1348604164.18.0.077035721572.issue16048@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Peter Otten thought the first clause should instead be ""Data attributes and method attributes share the same namespace.", which is also true for a given object. This is a different intepretation of what the original author was getting at. The convention remark applies both within the class namespace and between class and instance namespaces. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 22:33:48 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Sep 2012 20:33:48 +0000 Subject: [docs] [issue16048] Tutorial-classes-remarks: replace paragragh In-Reply-To: <1348603562.92.0.789475109772.issue16048@psf.upfronthosting.co.za> Message-ID: <1348605228.14.0.0484831417371.issue16048@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ian Kelly reminds me that instance.__xxx__ is only skipped by the internal machinery and not by direct accesses in user code. In the other hand, docs, official or otherwise, are filled with things like 'len(a) calls a.__len__', so I think something should be said that giving instances special method attributes does not have the effect one might expect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Sep 25 23:25:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 25 Sep 2012 21:25:27 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1348608327.5.0.208783249147.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I'm attaching an updated patch that does not cover certain edge cases that may differ for other Python implementations (and in fact does differ for PyPY). See issue 16045 for more information. ---------- Added file: http://bugs.python.org/file27307/issue-16036-2-default.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 03:09:47 2012 From: report at bugs.python.org (Barry Morrison) Date: Wed, 26 Sep 2012 01:09:47 +0000 Subject: [docs] [issue16051] Documentation missing pipes.quote() Message-ID: <1348621787.28.0.392137899077.issue16051@psf.upfronthosting.co.za> New submission from Barry Morrison: Documentation here: http://docs.python.org/library/pipes.html makes no mention of quote() But the link to Source code: Lib/pipes.py http://hg.python.org/cpython/file/2.7/Lib/pipes.py has: 267 def quote(file): 268 """Return a shell-escaped version of the file string.""" 269 for c in file: 270 if c not in _safechars: 271 break 272 else: 273 if not file: 274 return "''" 275 return file 276 # use single quotes, and put single quotes into double quotes 277 # the string $'b is then quoted as '$'"'"'b' 278 return "'" + file.replace("'", "'\"'\"'") + "'" First _ever_ bug report, apologies if this is incorrect. ---------- assignee: docs at python components: Documentation messages: 171326 nosy: Barry.Morrison, docs at python priority: normal severity: normal status: open title: Documentation missing pipes.quote() type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 12:30:52 2012 From: report at bugs.python.org (Lars Buitinck) Date: Wed, 26 Sep 2012 10:30:52 +0000 Subject: [docs] [issue16052] Typo in "What's new in 3.3" Message-ID: <1348655452.61.0.28429874777.issue16052@psf.upfronthosting.co.za> New submission from Lars Buitinck: I spotted a minor typo in the "What's new" for Py 3.3, introduced yesterday. See attached patch. ---------- assignee: docs at python components: Documentation files: typo.hg messages: 171333 nosy: docs at python, larsmans priority: normal severity: normal status: open title: Typo in "What's new in 3.3" versions: Python 3.3 Added file: http://bugs.python.org/file27312/typo.hg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 12:37:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Sep 2012 10:37:06 +0000 Subject: [docs] [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1348655826.69.0.425810135055.issue16053@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 13:12:31 2012 From: report at bugs.python.org (Georg Brandl) Date: Wed, 26 Sep 2012 11:12:31 +0000 Subject: [docs] [issue16052] Typo in "What's new in 3.3" In-Reply-To: <1348655452.61.0.28429874777.issue16052@psf.upfronthosting.co.za> Message-ID: <1348657951.44.0.844750837326.issue16052@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the report. Note that we don't care for bundles instead of patches, since they are impossible to review online and clumsy to do so offline. Readable patches (as generated by e.g. hg export) are much preferred. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 13:12:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Sep 2012 11:12:42 +0000 Subject: [docs] [issue16052] Typo in "What's new in 3.3" In-Reply-To: <1348655452.61.0.28429874777.issue16052@psf.upfronthosting.co.za> Message-ID: <3XRc210jPxzQrZ@mail.python.org> Roundup Robot added the comment: New changeset 6f456d9add40 by Georg Brandl in branch 'default': Closes #16052: fix typo. Patch by Lars Buitinck. http://hg.python.org/cpython/rev/6f456d9add40 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 13:16:12 2012 From: report at bugs.python.org (Lars Buitinck) Date: Wed, 26 Sep 2012 11:16:12 +0000 Subject: [docs] [issue16052] Typo in "What's new in 3.3" In-Reply-To: <1348655452.61.0.28429874777.issue16052@psf.upfronthosting.co.za> Message-ID: <1348658172.55.0.84369256238.issue16052@psf.upfronthosting.co.za> Lars Buitinck added the comment: Sorry about the bundle, I'm an hg noob and only noticed that bundles are binary after I submitted it. Will create a regular patch next time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 13:25:56 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Sep 2012 11:25:56 +0000 Subject: [docs] [issue16051] Documentation missing pipes.quote() In-Reply-To: <1348621787.28.0.392137899077.issue16051@psf.upfronthosting.co.za> Message-ID: <1348658756.77.0.344710765563.issue16051@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report. pipes.quote used to be an undocumented helper function in pipes. When we decided to make it public, we moved it to the shlex module. Therefore you'll find that as of Python 3.3 the source code has moved to shlex and it is documented in the shlex documentation. ---------- nosy: +r.david.murray resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 15:04:29 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 26 Sep 2012 13:04:29 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1348664669.01.0.0797111441639.issue16036@psf.upfronthosting.co.za> Ezio Melotti added the comment: The latest patch is better, however I think it can be further improved. The text is currently divided in two paragraphs: 1) covers int(), int(num), int(x, base=b); 2) covers int(float), and int(x, base=b); I think it would be better to cover first int(), int(num), int(float), and then cover int(x, base=b). The attached patch does this. ---------- Added file: http://bugs.python.org/file27313/issue16036.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 15:08:43 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 26 Sep 2012 13:08:43 +0000 Subject: [docs] [issue16048] Tutorial-classes-remarks: replace paragragh In-Reply-To: <1348603562.92.0.789475109772.issue16048@psf.upfronthosting.co.za> Message-ID: <1348664923.46.0.762538885606.issue16048@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 15:54:26 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 26 Sep 2012 13:54:26 +0000 Subject: [docs] [issue13386] Document documentation conventions for optional args In-Reply-To: <1321078121.18.0.541430257552.issue13386@psf.upfronthosting.co.za> Message-ID: <1348667666.21.0.975897028443.issue13386@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +chris.jerdonek type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 18:51:37 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 26 Sep 2012 16:51:37 +0000 Subject: [docs] [issue14097] Improve the "introduction" page of the tutorial In-Reply-To: <1329975473.84.0.795852636525.issue14097@psf.upfronthosting.co.za> Message-ID: <1348678297.82.0.993474849643.issue14097@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +chris.jerdonek versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 19:17:24 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 26 Sep 2012 17:17:24 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1348679844.01.0.798162396543.issue16036@psf.upfronthosting.co.za> ?ric Araujo added the comment: Latest patch LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 19:23:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 26 Sep 2012 17:23:55 +0000 Subject: [docs] [issue10669] Document Deprecation Warnings and how to fix In-Reply-To: <1291959647.89.0.597449973256.issue10669@psf.upfronthosting.co.za> Message-ID: <1348680235.32.0.925657181466.issue10669@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +chris.jerdonek versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 19:43:23 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 26 Sep 2012 17:43:23 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1348681403.21.0.221548665936.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Good improvement. LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 20:46:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 26 Sep 2012 18:46:07 +0000 Subject: [docs] [issue10665] Expand unicodedata module documentation In-Reply-To: <1291930276.17.0.60709403086.issue10665@psf.upfronthosting.co.za> Message-ID: <1348685167.77.0.332538656112.issue10665@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Sep 26 23:40:43 2012 From: report at bugs.python.org (Justin Lebar) Date: Wed, 26 Sep 2012 21:40:43 +0000 Subject: [docs] [issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode Message-ID: <1348695643.05.0.172807817425.issue16057@psf.upfronthosting.co.za> New submission from Justin Lebar: The JSONEncoder documentation says we can implement our own encoder as: >>> class ComplexEncoder(json.JSONEncoder): ... def default(self, obj): ... if isinstance(obj, complex): ... return [obj.real, obj.imag] ... return json.JSONEncoder.default(self, obj) Later on, we give the following example of how to implement the default method in a subclass of json.JSONEncoder: def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) return JSONEncoder.default(self, o) These are both incorrect, as a quick reading of the source will reveal. JSONEncoder.default() throws for all input values. We should s/JSONEncoder.default/JSONEncoder.encode/ here, I think. ---------- assignee: docs at python components: Documentation messages: 171363 nosy: Justin.Lebar, docs at python priority: normal severity: normal status: open title: Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 27 05:54:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Sep 2012 03:54:24 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1348718064.39.0.801193157307.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Ezio, do you want to commit this or should I? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 27 06:32:17 2012 From: report at bugs.python.org (Chris Rebert) Date: Thu, 27 Sep 2012 04:32:17 +0000 Subject: [docs] [issue16048] Tutorial-classes-remarks: replace paragragh In-Reply-To: <1348603562.92.0.789475109772.issue16048@psf.upfronthosting.co.za> Message-ID: <1348720337.08.0.885189207866.issue16048@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From chris.jerdonek at gmail.com Thu Sep 27 11:47:12 2012 From: chris.jerdonek at gmail.com (chris.jerdonek at gmail.com) Date: Thu, 27 Sep 2012 09:47:12 -0000 Subject: [docs] simplify int() signature docs (issue 16036) Message-ID: <20120927094712.25785.82867@psf.upfronthosting.co.za> Reviewers: storchaka, http://bugs.python.org/review/16036/diff/6073/Doc/library/functions.rst File Doc/library/functions.rst (right): http://bugs.python.org/review/16036/diff/6073/Doc/library/functions.rst#newcode637 Doc/library/functions.rst:637: For floating point numbers, this truncates towards zero. Truncation towards zero seems like useful information to me. It distinguishes the behavior from round() (also in the built-in function docs) and clarifies what happens for negative numbers. Please review this at http://bugs.python.org/review/16036/ Affected files: Doc/library/functions.rst diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -629,14 +629,17 @@ to provide elaborate line editing and history features. -.. function:: int([number | string[, base]]) +.. function:: int(x=0) + int(x, base=10) - Convert a number or string to an integer. If no arguments are given, return - ``0``. If a number is given, return ``number.__int__()``. Conversion of - floating point numbers to integers truncates towards zero. A string must be - a base-radix integer literal optionally preceded by '+' or '-' (with no space + Convert a number or string *x* to an integer, or return ``0`` if no arguments + are given. If *x* is a number, return :meth:`x.__int__() `. + For floating point numbers, this truncates towards zero. + + If *base* is given, then *x* must be a string. The string must be + a base-radix integer literal optionally preceded by ``+`` or ``-`` (with no space in between) and optionally surrounded by whitespace. A base-n literal - consists of the digits 0 to n-1, with 'a' to 'z' (or 'A' to 'Z') having + consists of the digits 0 to n-1, with ``a`` to ``z`` (or ``A`` to ``Z``) having values 10 to 35. The default *base* is 10. The allowed values are 0 and 2-36. Base-2, -8, and -16 literals can be optionally prefixed with ``0b``/``0B``, ``0o``/``0O``, or ``0x``/``0X``, as with integer literals in code. Base 0 From chris.jerdonek at gmail.com Thu Sep 27 11:47:43 2012 From: chris.jerdonek at gmail.com (chris.jerdonek at gmail.com) Date: Thu, 27 Sep 2012 09:47:43 -0000 Subject: [docs] simplify int() signature docs (issue 16036) Message-ID: <20120927094743.25785.75095@psf.upfronthosting.co.za> http://bugs.python.org/review/16036/ From jesse650 at gmail.com Tue Sep 4 00:24:30 2012 From: jesse650 at gmail.com (Jesse Monroy) Date: Mon, 03 Sep 2012 22:24:30 -0000 Subject: [docs] missing explicit reference to importing module. Message-ID: In section: python-2.7.3-docs-html/library/subprocess.html as with many sections it is not mentioned what modules need to be imported. If one was to read all the documentation, then one could presume that using a module means 'import module;'. This is not the case in many, many scripting languages, including PERL. So don't be lazy, add to the top of: python-2.7.3-docs-html/library/subprocess.html REQUIRES: import subprocess; From renenglish at gmail.com Thu Sep 6 14:38:23 2012 From: renenglish at gmail.com (Shafreeck Sea) Date: Thu, 06 Sep 2012 12:38:23 -0000 Subject: [docs] There is bug about the built-in function reduce in the document Message-ID: Hi all: I found a bug in the document about reduce : http://docs.python.org/library/functions.html#reduce Here is the patch: def reduce(function, iterable, initializer=None): it = iter(iterable) if initializer is None: try: initializer = next(it) except StopIteration: raise TypeError('reduce() of empty sequence with no initial value') accum_value = initializer - for x in iterable: + for x in it: accum_value = function(accum_value, x) return accum_value It duplicated the first element of iterable For example: In [4]: reduce(lambda x,y:x+y, [1,2,3,4]) Out[4]: 10 In [5]: docreduce.reduce(lambda x,y:x+y ,[1,2,3,4]) Out[5]: 11 Sorry for my poor english ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From dhoese at gmail.com Thu Sep 6 15:56:26 2012 From: dhoese at gmail.com (David Hoese) Date: Thu, 06 Sep 2012 13:56:26 -0000 Subject: [docs] python docs quick search improvement Message-ID: <5048AB87.50104@gmail.com> Hi, I started a thread on python-list the other day, you can find the thread here: http://mail.python.org/pipermail/python-list/2012-September/629900.html The general question is: Is there something that can be done to improve the results of the quick search on the python documentation website? As an example if you search for 'print' in the python docs quick search the print statement isn't in the results and the print function isn't in the top 20 results. Some replies on the thread suggested that everyone should just use a popular search engine, optionally specifying to only search the docs site. Others also suggested the python docs site use a Google search box, but also that this can cost a lot of money. I'm not very familiar with including search in a site, so I can't offer much more than the thread I've started. Thanks, Dave From Winslow.Williams at ngc.com Thu Sep 6 16:35:47 2012 From: Winslow.Williams at ngc.com (Williams, Winslow (ES)) Date: Thu, 06 Sep 2012 14:35:47 -0000 Subject: [docs] Unable to view http://docs.python.org/py3k/c-api/intro.html in Firefox Message-ID: <15BBAA6A4E4BFC44A99E4FB27B55E0A318EBEB37@XMBVAG76.northgrum.com> Up until just recently, I was able to view the page at http://docs.python.org/py3k/c-api/intro.html using Mozilla Firefox version 3.6.28. Today, however, when I navigate to that link, I see the following error message: Content Encoding Error ----------------------------- The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression. Interestingly enough, the page displays properly in Internet Explorer 7. Unfortunately, I'm browsing from a work computer and can't give any detailed information about plugins or network setup (they keep things buttoned-down here). I appreciate your efforts in documenting the Python language. My job would be much more difficult without your awesome online manuals. Thanks, Winslow Williams -------------- next part -------------- An HTML attachment was scrubbed... URL: From mortenbeuchert at gmail.com Thu Sep 6 23:24:14 2012 From: mortenbeuchert at gmail.com (Morten Beuchert) Date: Thu, 06 Sep 2012 21:24:14 -0000 Subject: [docs] Bug/typo Message-ID: Hi, I found a bug/typo in the Python Tutorial (version 2.7.3), Chapter 3.1.2. Quote: hello = r"This is a rather long string containing\n\several lines of text much as you would do in C." print hello Notice the character 'r' that's not supposed to be there. Best regards, Morten Beuchert -------------- next part -------------- An HTML attachment was scrubbed... URL: From mortenbeuchert at gmail.com Thu Sep 6 23:28:05 2012 From: mortenbeuchert at gmail.com (Morten Beuchert) Date: Thu, 06 Sep 2012 21:28:05 -0000 Subject: [docs] Bug/typo In-Reply-To: References: Message-ID: I read the example out of context and noticed it was a raw string. Please ignore the correction. 2012/9/6 Morten Beuchert > Hi, > > I found a bug/typo in the Python Tutorial (version 2.7.3), Chapter 3.1.2. > > Quote: > > hello = r"This is a rather long string containing\n\several lines of text much as you would do in C." > print hello > > Notice the character 'r' that's not supposed to be there. > > Best regards, > > Morten Beuchert > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthony.petrillo at gmail.com Fri Sep 7 21:39:54 2012 From: anthony.petrillo at gmail.com (Anthony Petrillo) Date: Fri, 07 Sep 2012 19:39:54 -0000 Subject: [docs] download problem Message-ID: Greetings, The download links on http://www.python.org/~gbrandl/build/html/download.html are not working. Would you be able to help me? Anthony -------------- next part -------------- An HTML attachment was scrubbed... URL: From zbyszek at in.waw.pl Tue Sep 11 16:46:29 2012 From: zbyszek at in.waw.pl (Zbigniew =?utf-8?Q?J=C4=99drzejewski-Szmek?=) Date: Tue, 11 Sep 2012 14:46:29 -0000 Subject: [docs] packaging documentation should be removed Message-ID: <20120911142054.GO25693@in.waw.pl> Hi, docs.python.org/dev still carries documentation for packaging, despite the package having been removed. http://docs.python.org/dev/library/packaging.html has "3.3.0a4 Documentation" in the footer, so I presume that the page is a leftover. Google returns results which point to the obsolete page, which is misleading. Thanks, Zbyszek From luke at maurits.id.au Thu Sep 13 09:28:20 2012 From: luke at maurits.id.au (Luke Maurits) Date: Thu, 13 Sep 2012 00:28:20 -0700 Subject: [docs] Bug in documentation for mailbox module Message-ID: <20120913002820.c31b78b9.luke@maurits.id.au> Hi, I think I may have found a minor bug in the documentation for the mailbox module, at: http://docs.python.org/library/mailbox.html Right at the beginning of section 18.4.2. ("Message objects"), when describing the mailbox.Message class, is the following: "A subclass of the email.Message module?s *Message*. Subclasses of mailbox.Message add mailbox-format-specific state and behavior." The word "Message" indicated above with asterisks is a hyperlink to: http://docs.python.org/library/mailbox.html#mailbox.Message I think it should instead link to: http://docs.python.org/library/email.message.html#email.message.Message Regards, Luke From Pradyot.Dhulipala at morganstanley.com Thu Sep 13 15:42:47 2012 From: Pradyot.Dhulipala at morganstanley.com (Dhulipala, Pradyot) Date: Thu, 13 Sep 2012 09:42:47 -0400 Subject: [docs] Problem with the documentation for string.replace Message-ID: <22519E154CA60B438D1E0122BAC64766713F89736F@NYWEXMBX2126.msad.ms.com> >From http://docs.python.org/library/string.html string.replace(str, old, new[, maxreplace])? Return a copy of string str with all occurrences of substring old replaced by new. If the optional argument maxreplace is given, the first maxreplace occurrences are replaced. it would appear this needs to be string.replace(old, new[, maxreplace])? thanks -------------------------------------------------------------------------- NOTICE: Morgan Stanley is not acting as a municipal advisor and the opinions or views contained herein are not intended to be, and do not constitute, advice within the meaning of Section 975 of the Dodd-Frank Wall Street Reform and Consumer Protection Act. If you have received this communication in error, please destroy all electronic and paper copies and notify the sender immediately. Mistransmission is not intended to waive confidentiality or privilege. Morgan Stanley reserves the right, to the extent permitted under applicable law, to monitor electronic communications. This message is subject to terms available at the following link: http://www.morganstanley.com/disclaimers. If you cannot access these links, please notify us by reply message and we will send the contents to you. By messaging with Morgan Stanley you consent to the foregoing. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dreamalgebra at gmail.com Fri Sep 14 03:37:13 2012 From: dreamalgebra at gmail.com (John Maxwell) Date: Thu, 13 Sep 2012 18:37:13 -0700 Subject: [docs] unittest documentation mistake? Message-ID: Hi, I believe this is a mistake in the unittest module docs at http://docs.python.org/library/unittest.html: "A test suite is a collection of test cases, test suites, or both. It is used to aggregate tests that should be executed together." Are you sure you don't mean: "A test suite is a collection of test cases, fixtures, or both. It is used to aggregate tests that should be executed together." I'm not actually familiar with the module, so feel free to tell me if I got it wrong. John -------------- next part -------------- An HTML attachment was scrubbed... URL: From changsijay at gmail.com Fri Sep 14 05:10:43 2012 From: changsijay at gmail.com (CSJ) Date: Fri, 14 Sep 2012 11:10:43 +0800 Subject: [docs] source of python doc site Message-ID: Hello doc team, I just know Sphinx yesterday, and http://docs.python.org/py3k/about.html use it to generate html. Is any place I can get source of the files(rst, Makefile, etc) to generate the doc site? Cause I think it is also good example for me to learn using Sphinx. Thanks a lot, Jay From bruce.dubbs at gmail.com Sun Sep 16 05:14:06 2012 From: bruce.dubbs at gmail.com (Bruce Dubbs) Date: Sat, 15 Sep 2012 22:14:06 -0500 Subject: [docs] python-2.7.3-docs-html.tar.bz2 permissions Message-ID: <505543FE.9090909@gmail.com> When I download python-2.7.3-docs-html.tar.bz2, I want to extract the files into /usr/share/doc/Python-2.7.3. This is easy enough to do as root, except the permissions are 0640 (directories 0750). It would be a lot more convenient if the files were 0644 and directories 0755. -- Bruce Dubbs linuxfromscratch.org From aaron at leanhardtingenuities.com Thu Sep 20 21:14:36 2012 From: aaron at leanhardtingenuities.com (Aaron Leanhardt) Date: Thu, 20 Sep 2012 15:14:36 -0400 Subject: [docs] map objects are not lists Message-ID: 5.1.3. List Comprehensions List comprehensions provide a concise way to create lists. Common applications are to make new lists where each element is the result of some operations applied to each member of another sequence or iterable, or to create a subsequence of those elements that satisfy a certain condition. For example, assume we want to create a list of squares, like: >>> >>> squares = []>>> for x in range(10):... squares.append(x**2)...>>> squares[0, 1, 4, 9, 16, 25, 36, 49, 64, 81] We can obtain the same result with: squares = [x**2 for x in range(10)] This is also equivalent to squares = map(lambda x: x**2, range(10)), but it?s more concise and readable. I think that the last sentence above should read: squares = list(map(lambda x: x**2, range(10))) In other words, the map function returns a map object, not a list object, so the list() function needs to be used to convert it to something that is truly equivalent to the previous definitions of "squares". (In case it matters, I am using Python-3.3.0rc2 on RHEL 6.3.) Aaron -- Aaron E. Leanhardt, http://www.leanhardtingenuities.com/ * --being ingenious is more valuable than being a genius!* -------------- next part -------------- An HTML attachment was scrubbed... URL: From renenglish at gmail.com Tue Sep 11 04:42:31 2012 From: renenglish at gmail.com (Shafreeck Sea) Date: Tue, 11 Sep 2012 02:42:31 -0000 Subject: [docs] Fwd: There is bug about the built-in function reduce in the document In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Shafreeck Sea Date: 2012/9/6 Subject: There is bug about the built-in function reduce in the document To: docs at python.org Hi all: I found a bug in the document about reduce : http://docs.python.org/library/functions.html#reduce Here is the patch: def reduce(function, iterable, initializer=None): it = iter(iterable) if initializer is None: try: initializer = next(it) except StopIteration: raise TypeError('reduce() of empty sequence with no initial value') accum_value = initializer - for x in iterable: + for x in it: accum_value = function(accum_value, x) return accum_value It duplicated the first element of iterable For example: In [4]: reduce(lambda x,y:x+y, [1,2,3,4]) Out[4]: 10 In [5]: docreduce.reduce(lambda x,y:x+y ,[1,2,3,4]) Out[5]: 11 Sorry for my poor english ! -------------- next part -------------- An HTML attachment was scrubbed... URL: From sampo.lehtinen at iki.fi Wed Sep 12 12:10:51 2012 From: sampo.lehtinen at iki.fi (Sampo Lehtinen) Date: Wed, 12 Sep 2012 10:10:51 -0000 Subject: [docs] Thanks and a small wish Message-ID: Hello Sorry about my English. I hope you still can understand and read this. I contact regarding page http://docs.python.org/download.html as this is the address listed on the bottom of that page. First let me thank you for this good peace of software python is. On the page offering downloads of documentation all of those are compressed with external programs. That makes unnecessary burden to obtain those docs to an ipad. I did not yet check were there any advances on size compared to pdf files not externally compressed. It would be nice to have some option that makes it easy to obtain the whole documentation to ipad at once and easily. BR SL -------------- next part -------------- An HTML attachment was scrubbed... URL: From sampo.lehtinen at iki.fi Wed Sep 12 12:52:50 2012 From: sampo.lehtinen at iki.fi (Sampo Lehtinen) Date: Wed, 12 Sep 2012 10:52:50 -0000 Subject: [docs] Thanks and a small wish In-Reply-To: References: Message-ID: Hello I got my self to a real computer. Downloaded the package and opened it. There were multiple files so it makes sense to pack them. On Wed, Sep 12, 2012 at 12:40 PM, Sampo Lehtinen wrote: > Hello > > Sorry about my English. I hope you still can understand and read this. > > I contact regarding page http://docs.python.org/download.html as this is the > address listed on the bottom of that page. > > First let me thank you for this good peace of software python is. > > On the page offering downloads of documentation all of those are compressed > with external programs. That makes unnecessary burden to obtain those docs > to an ipad. I did not yet check were there any advances on size compared to > pdf files not externally compressed. > > It would be nice to have some option that makes it easy to obtain the whole > documentation to ipad at once and easily. > > BR > SL From paulfallon1106 at gmail.com Wed Sep 12 21:32:38 2012 From: paulfallon1106 at gmail.com (Paul Fallon) Date: Wed, 12 Sep 2012 15:32:38 -0400 Subject: [docs] Documentation Strings Message-ID: For all us who are new to programming, it should be pointed out in the documentation that a double underscore is needed to get the docstring: >>>function_name.__doc__ <--- double underscores Thanks, Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: From grenoya at zarb.org Fri Sep 14 16:06:11 2012 From: grenoya at zarb.org (Claire Revillet) Date: Fri, 14 Sep 2012 16:06:11 +0200 Subject: [docs] French translation of the documentation Message-ID: <505339D3.5030002@zarb.org> Hi everybody, I'm new to this mailing-list, so i'll present myself before asking my questions. My name is Claire and i'm a member of the francophone association for the promotion of Python (afpy). As part of my activity in afpy, i'm working on the translation in french of parts of docs.python.org . Maybe it's not the good place to ask, but i could not find another "maintained" place for them: For now, i'm translating on pootle.python.org. I'm wondering if the site is actually maintained and more precisly if the english sources are up-to-date. What makes me wonder is this email: http://mail.python.org/pipermail/doc-sig/2011-December/003932.html but the doc-sig ML seems dead :/ My other point is: this pootle is a great idea that permit us to translate. good! but where is going our work ? Was there something envisaged to host the translated pages when the pootle was created ? For what I can see, nothing is planed to put them on the official website (i could find no language selection widget). The hosting problem could be solve by hosting the translated pages on the afpy website (which makes sense as providing french documentation is part of our role), but maybe a protocole has been prepared for the extraction from pootle and rebuilding the translated docs ? We have extracted the .po files, but we don't know what to do with them. If someone has any idea/hint for us, you're welcome :) And thank you for the great job you're doing on the english documentation. Claire Revillet From grenoya at zarb.org Mon Sep 17 19:12:28 2012 From: grenoya at zarb.org (Claire Revillet) Date: Mon, 17 Sep 2012 19:12:28 +0200 Subject: [docs] French translation of the documentation Message-ID: <505759FC.9070800@zarb.org> Hi everybody, I'm new to this mailing-list, so i'll present myself before asking my questions. My name is Claire and i'm a member of the francophone association for the promotion of Python (afpy). As part of my activity in afpy, i'm working on the translation in french of parts of docs.python.org . Maybe it's not the good place to ask, but i could not find another "maintained" place for them: For now, i'm translating on pootle.python.org. I'm wondering if the site is actually maintained and more precisly if the english sources are up-to-date. What makes me wonder is this email: http://mail.python.org/pipermail/doc-sig/2011-December/003932.html but the doc-sig ML seems dead :/ My other point is: this pootle is a great idea that permit us to translate. good! but where is going our work ? Was there something envisaged to host the translated pages when the pootle was created ? For what I can see, nothing is planed to put them on the official website (i could find no language selection widget). The hosting problem could be solve by hosting the translated pages on the afpy website (which makes sense as providing french documentation is part of our role), but maybe a protocole has been prepared for the extraction from pootle and rebuilding the translated docs ? We have extracted the .po files, but we don't know what to do with them. If someone has any idea/hint for us, you're welcome And thank you for the great job you're doing on the english documentation. Claire Revillet From storchaka at gmail.com Thu Sep 27 09:29:55 2012 From: storchaka at gmail.com (storchaka at gmail.com) Date: Thu, 27 Sep 2012 07:29:55 -0000 Subject: [docs] simplify int() signature docs (issue 16036) Message-ID: <20120927072955.30545.68572@psf.upfronthosting.co.za> http://bugs.python.org/review/16036/diff/6073/Doc/library/functions.rst File Doc/library/functions.rst (right): http://bugs.python.org/review/16036/diff/6073/Doc/library/functions.rst#newcode639 Doc/library/functions.rst:639: If *base* is given, then *x* must be a string. The string must be Somewhere should be exposed that x must be str, bytes, bytearray or a subclass. http://bugs.python.org/review/16036/ From storchaka at gmail.com Thu Sep 27 11:06:39 2012 From: storchaka at gmail.com (storchaka at gmail.com) Date: Thu, 27 Sep 2012 09:06:39 -0000 Subject: [docs] simplify int() signature docs (issue 16036) Message-ID: <20120927090639.8702.24703@psf.upfronthosting.co.za> http://bugs.python.org/review/16036/diff/6073/Doc/library/functions.rst File Doc/library/functions.rst (right): http://bugs.python.org/review/16036/diff/6073/Doc/library/functions.rst#newcode637 Doc/library/functions.rst:637: For floating point numbers, this truncates towards zero. I don't know if it worth to mention specifically such details. Floating pointer numbers truncated first and then __int__() method called for result. http://bugs.python.org/review/16036/ From ezio.melotti at gmail.com Thu Sep 27 12:30:20 2012 From: ezio.melotti at gmail.com (ezio.melotti at gmail.com) Date: Thu, 27 Sep 2012 10:30:20 -0000 Subject: [docs] simplify int() signature docs (issue 16036) Message-ID: <20120927103020.25727.24267@psf.upfronthosting.co.za> http://bugs.python.org/review/16036/diff/6073/Doc/library/functions.rst File Doc/library/functions.rst (right): http://bugs.python.org/review/16036/diff/6073/Doc/library/functions.rst#newcode637 Doc/library/functions.rst:637: For floating point numbers, this truncates towards zero. On 2012/09/27 11:06:39, storchaka wrote: > I don't know if it worth to mention specifically such details. Floating pointer > numbers truncated first and then __int__() method called for result. This was already there. I think the goal is to say that int() can be used to "extract" the integer part and that e.g. int(3.7) will return 3, without doing any rounding. http://bugs.python.org/review/16036/ From report at bugs.python.org Thu Sep 27 20:57:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 27 Sep 2012 18:57:21 +0000 Subject: [docs] [issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode In-Reply-To: <1348695643.05.0.172807817425.issue16057@psf.upfronthosting.co.za> Message-ID: <1348772241.57.0.793957516919.issue16057@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, petri.lehtinen stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Sep 27 23:25:34 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Sep 2012 21:25:34 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1348781133.38.0.68789813977.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching updated patch that clarifies the accepted non-numeric types as Serhiy suggested on Rietveld. I also made a few other changes like linking to "integer literal" and updating the "base-radix" reference. As I began to suspect, the latter was left over from a prior version of the docs (when the keyword argument was named "radix"): http://hg.python.org/cpython/file/18db8c4d4487/Doc/library/functions.rst#l559 I will commit later today unless there are further suggestions. ---------- Added file: http://bugs.python.org/file27321/issue-16036-4-default.patch _______________________________________ Python tracker _______________________________________ From chris.jerdonek at gmail.com Fri Sep 28 04:53:42 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Thu, 27 Sep 2012 19:53:42 -0700 Subject: [docs] download problem Message-ID: > Date: Fri, 7 Sep 2012 15:39:52 -0400 > From: Anthony Petrillo > Subject: [docs] download problem > > The download links on > http://www.python.org/~gbrandl/build/html/download.html are not working. > Would you be able to help me? Hi Anthony, does this link for you instead? http://docs.python.org/dev/download.html Also, where did you come across the above URL? Thanks, --Chris From report at bugs.python.org Fri Sep 28 05:08:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 03:08:13 +0000 Subject: [docs] [issue16069] packaging shows up on docs.python.org/dev Message-ID: <1348801693.29.0.778297350134.issue16069@psf.upfronthosting.co.za> New submission from Chris Jerdonek: Date: Tue, 11 Sep 2012 16:20:54 +0200 To: docs at python.org Subject: [docs] packaging documentation should be removed docs.python.org/dev still carries documentation for packaging, despite the package having been removed. http://docs.python.org/dev/library/packaging.html has "3.3.0a4 Documentation" in the footer, so I presume that the page is a leftover. Google returns results which point to the obsolete page, which is misleading. (from http://mail.python.org/pipermail/docs/2012-September/010519.html ) ---------- assignee: docs at python components: Documentation messages: 171400 nosy: chris.jerdonek, docs at python priority: normal severity: normal status: open title: packaging shows up on docs.python.org/dev type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From chris.jerdonek at gmail.com Fri Sep 28 05:11:55 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Thu, 27 Sep 2012 20:11:55 -0700 Subject: [docs] packaging documentation should be removed Message-ID: > Date: Tue, 11 Sep 2012 16:20:54 +0200 > From: Zbigniew J?drzejewski-Szmek > Subject: [docs] packaging documentation should be removed > > docs.python.org/dev still carries documentation for packaging, despite the package > having been removed. http://docs.python.org/dev/library/packaging.html has > "3.3.0a4 Documentation" in the footer, so I presume that the page is a leftover. > Google returns results which point to the obsolete page, which is misleading. Hi Zbyszek, thanks for the report. I created an issue in the tracker for this here: http://bugs.python.org/issue16069 --Chris From report at bugs.python.org Fri Sep 28 05:21:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 03:21:28 +0000 Subject: [docs] [issue16071] fix link to email.message.Message in mailbox docs Message-ID: <1348802488.29.0.674477031086.issue16071@psf.upfronthosting.co.za> New submission from Chris Jerdonek: > Date: Thu, 13 Sep 2012 00:28:20 -0700 > To: docs at python.org > Subject: [docs] Bug in documentation for mailbox module > > I think I may have found a minor bug in the documentation for the > mailbox module, at: > > http://docs.python.org/library/mailbox.html > > Right at the beginning of section 18.4.2. ("Message objects"), when > describing the mailbox.Message class, is the following: > > "A subclass of the email.Message module?s *Message*. Subclasses of > mailbox.Message add mailbox-format-specific state and behavior." > > The word "Message" indicated above with asterisks is a hyperlink to: > > http://docs.python.org/library/mailbox.html#mailbox.Message > > I think it should instead link to: > > http://docs.python.org/library/email.message.html#email.message.Message (from: http://mail.python.org/pipermail/docs/2012-September/010520.html ) ---------- assignee: docs at python components: Documentation keywords: easy messages: 171403 nosy: barry, chris.jerdonek, docs at python, r.david.murray priority: normal severity: normal stage: needs patch status: open title: fix link to email.message.Message in mailbox docs type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From chris.jerdonek at gmail.com Fri Sep 28 05:23:36 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Thu, 27 Sep 2012 20:23:36 -0700 Subject: [docs] Bug in documentation for mailbox module Message-ID: > Date: Thu, 13 Sep 2012 00:28:20 -0700 > From: Luke Maurits > Subject: [docs] Bug in documentation for mailbox module > > I think I may have found a minor bug in the documentation for the > mailbox module, at: > > http://docs.python.org/library/mailbox.html Hi Luke, thanks for the report. I created an issue in the tracker for this here: http://bugs.python.org/issue16071 --Chris From report at bugs.python.org Fri Sep 28 05:28:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 03:28:48 +0000 Subject: [docs] [issue16072] fix documentation of string.replace() signature Message-ID: <1348802928.91.0.483315900162.issue16072@psf.upfronthosting.co.za> New submission from Chris Jerdonek: > Date: Thu, 13 Sep 2012 09:42:47 -0400 > To: > Subject: [docs] Problem with the documentation for string.replace > > >From http://docs.python.org/library/string.html > > string.replace(str, old, new[, maxreplace])? > Return a copy of string str with all occurrences of substring old replaced by new. If the optional argument maxreplace is given, the first maxreplace occurrences are replaced. > > it would appear this needs to be > string.replace(old, new[, maxreplace])? (from: http://mail.python.org/pipermail/docs/2012-September/010521.html ) ---------- assignee: docs at python components: Documentation keywords: easy messages: 171404 nosy: chris.jerdonek, docs at python priority: normal severity: normal stage: needs patch status: open title: fix documentation of string.replace() signature type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From chris.jerdonek at gmail.com Fri Sep 28 05:31:01 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Thu, 27 Sep 2012 20:31:01 -0700 Subject: [docs] Problem with the documentation for string.replace Message-ID: > Date: Thu, 13 Sep 2012 09:42:47 -0400 > To: > Subject: [docs] Problem with the documentation for string.replace > > >From http://docs.python.org/library/string.html > > string.replace(str, old, new[, maxreplace])? > Return a copy of string str with all occurrences of substring old replaced by new. If the optional argument maxreplace is given, the first maxreplace occurrences are replaced. > > it would appear this needs to be > string.replace(old, new[, maxreplace])? Hi Pradyot, thanks for the report. I created an issue in the tracker for this here: http://bugs.python.org/issue16072 --Chris From chris.jerdonek at gmail.com Fri Sep 28 05:39:43 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Thu, 27 Sep 2012 20:39:43 -0700 Subject: [docs] source of python doc site Message-ID: > Date: Fri, 14 Sep 2012 11:10:43 +0800 > From: CSJ > Subject: [docs] source of python doc site > > Hello doc team, > > I just know Sphinx yesterday, > and http://docs.python.org/py3k/about.html use it to generate html. > > Is any place I can get source of the files(rst, Makefile, etc) to > generate the doc site? Hi Jay, the source for the web site documentation is stored in the Doc/ directory of the source code repository for cpython: http://hg.python.org/cpython/file/e99c0425da59/Doc You can follow the instructions for building the documentation from source here: http://docs.python.org/devguide/documenting.html#building-the-documentation The Dev Guide in general may also help with obtaining the source: http://docs.python.org/devguide/ --Chris From chris.jerdonek at gmail.com Fri Sep 28 05:45:25 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Thu, 27 Sep 2012 20:45:25 -0700 Subject: [docs] unittest documentation mistake? Message-ID: > Date: Thu, 13 Sep 2012 18:37:13 -0700 > From: John Maxwell > Subject: [docs] unittest documentation mistake? > > I believe this is a mistake in the unittest module docs at > http://docs.python.org/library/unittest.html: > > "A test suite is a collection of test cases, test suites, or both. It is > used to aggregate tests that should be executed together." > > Are you sure you don't mean: > > "A test suite is a collection of test cases, fixtures, or both. It is used > to aggregate tests that should be executed together." > > I'm not actually familiar with the module, so feel free to tell me if I got > it wrong. Hi John, the existing documentation is correct if you read the documentation for TestSuite: http://docs.python.org/library/unittest.html#unittest.TestSuite For example, TestSuite.addTest(test) allows you to add TestSuite instances to a TestSuite (which allows nesting). --Chris From report at bugs.python.org Fri Sep 28 05:50:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 03:50:24 +0000 Subject: [docs] [issue16073] fix map() statement in list comprehension example Message-ID: <1348804224.11.0.798375217467.issue16073@psf.upfronthosting.co.za> New submission from Chris Jerdonek: > Date: Thu, 20 Sep 2012 15:14:36 -0400 > To: docs at python.org > Subject: [docs] map objects are not lists > > 5.1.3. List Comprehensions > > List comprehensions provide a concise way to create lists. Common > applications are to make new lists where each element is the result of some > operations applied to each member of another sequence or iterable, or to > create a subsequence of those elements that satisfy a certain condition. > > For example, assume we want to create a list of squares, like: >>>> > >>>> squares = []>>> for x in range(10):... squares.append(x**2)...>>> squares[0, 1, 4, 9, 16, 25, 36, 49, 64, 81] > > We can obtain the same result with: > > squares = [x**2 for x in range(10)] > > This is also equivalent to squares = map(lambda x: x**2, range(10)), but > it?s more concise and readable. > > > I think that the last sentence above should read: > > squares = list(map(lambda x: x**2, range(10))) > > In other words, the map function returns a map object, not a list object, > so the list() function needs to be used to convert it to something that is > truly equivalent to the previous definitions of "squares". (In case it > matters, I am using Python-3.3.0rc2 on RHEL 6.3.) (from http://mail.python.org/pipermail/docs/2012-September/010525.html ) ---------- assignee: docs at python components: Documentation keywords: easy messages: 171405 nosy: chris.jerdonek, docs at python priority: normal severity: normal stage: needs patch status: open title: fix map() statement in list comprehension example type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From chris.jerdonek at gmail.com Fri Sep 28 05:52:59 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Thu, 27 Sep 2012 20:52:59 -0700 Subject: [docs] map objects are not lists Message-ID: > Date: Thu, 20 Sep 2012 15:14:36 -0400 > From: Aaron Leanhardt > Subject: [docs] map objects are not lists > > 5.1.3. List Comprehensions > > ... > > This is also equivalent to squares = map(lambda x: x**2, range(10)), but > it?s more concise and readable. > > > I think that the last sentence above should read: > > squares = list(map(lambda x: x**2, range(10))) Hi Aaron, thanks for the report. I created an issue in the tracker for this here: http://bugs.python.org/issue16073 --Chris From berker.peksag at gmail.com Fri Sep 28 06:41:19 2012 From: berker.peksag at gmail.com (=?UTF-8?Q?Berker_Peksa=C4=9F?=) Date: Fri, 28 Sep 2012 07:41:19 +0300 Subject: [docs] download problem In-Reply-To: References: Message-ID: On Fri, Sep 7, 2012 at 10:39 PM, Anthony Petrillo wrote: > Greetings, > > The download links on > http://www.python.org/~gbrandl/build/html/download.html are not working. > Would you be able to help me? Hi Anthony, Here's the correct link: http://docs.python.org/dev/download.html --Berker > > > Anthony > > > > > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > From report at bugs.python.org Fri Sep 28 10:21:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Sep 2012 08:21:09 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <3XSm780mXfzNtM@mail.python.org> Roundup Robot added the comment: New changeset 9205277bc008 by Chris Jerdonek in branch '3.2': Issue #16036: Improve documentation of built-in int()'s signature and arguments. http://hg.python.org/cpython/rev/9205277bc008 New changeset 6ccb04c4cbae by Chris Jerdonek in branch 'default': Issue #16036: Merge update from 3.2. http://hg.python.org/cpython/rev/6ccb04c4cbae ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 10:26:08 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 08:26:08 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1348820768.3.0.92695771219.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Leaving open until the change is made in 2.7 (the current wording is somewhat different there). I will do that in the next day or so. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 10:55:52 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 08:55:52 +0000 Subject: [docs] [issue16077] fix code example in docs for built-in reduce() Message-ID: <1348822552.23.0.324199631114.issue16077@psf.upfronthosting.co.za> New submission from Chris Jerdonek: > Date: Thu, 6 Sep 2012 20:38:21 +0800 > To: docs at python.org > Subject: [docs] There is bug about the built-in function reduce in the > document > > I found a bug in the document about reduce : > http://docs.python.org/library/functions.html#reduce > > Here is the patch: > def reduce(function, iterable, initializer=None): > it = iter(iterable) > if initializer is None: > try: > initializer = next(it) > except StopIteration: > raise TypeError('reduce() of empty sequence with no initial > value') > accum_value = initializer > - for x in iterable: > + for x in it: > accum_value = function(accum_value, x) > return accum_value > > It duplicated the first element of iterable > > For example: > In [4]: reduce(lambda x,y:x+y, [1,2,3,4]) > Out[4]: 10 > > In [5]: docreduce.reduce(lambda x,y:x+y ,[1,2,3,4]) > Out[5]: 11 (from: http://mail.python.org/pipermail/docs/2012-September/010513.html and http://mail.python.org/pipermail/docs/2012-September/010526.html ) ---------- assignee: docs at python components: Documentation keywords: easy messages: 171419 nosy: chris.jerdonek, docs at python priority: normal severity: normal stage: needs patch status: open title: fix code example in docs for built-in reduce() type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From chris.jerdonek at gmail.com Fri Sep 28 10:58:52 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Fri, 28 Sep 2012 01:58:52 -0700 Subject: [docs] There is bug about the built-in function reduce in the document Message-ID: > Date: Thu, 6 Sep 2012 20:38:21 +0800 > From: Shafreeck Sea > Subject: [docs] There is bug about the built-in function reduce in the > document > > I found a bug in the document about reduce : > http://docs.python.org/library/functions.html#reduce Hi Shafreeck, thanks for the report. I filed an issue in the tracker for this here: http://bugs.python.org/issue16077 --Chris > Here is the patch: > def reduce(function, iterable, initializer=None): > it = iter(iterable) > if initializer is None: > try: > initializer = next(it) > except StopIteration: > raise TypeError('reduce() of empty sequence with no initial > value') > accum_value = initializer > - for x in iterable: > + for x in it: > accum_value = function(accum_value, x) > return accum_value > > It duplicated the first element of iterable > > For example: > In [4]: reduce(lambda x,y:x+y, [1,2,3,4]) > Out[4]: 10 > > In [5]: docreduce.reduce(lambda x,y:x+y ,[1,2,3,4]) > Out[5]: 11 From report at bugs.python.org Fri Sep 28 11:51:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Sep 2012 09:51:19 +0000 Subject: [docs] [issue16077] fix code example in docs for built-in reduce() In-Reply-To: <1348822552.23.0.324199631114.issue16077@psf.upfronthosting.co.za> Message-ID: <1348825879.13.0.0533614989282.issue16077@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed. Will probably want to add an example with 1-element sequence for functools.reduce in Doc/howto/functional.rst. ---------- nosy: +storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 12:02:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Sep 2012 10:02:32 +0000 Subject: [docs] [issue15953] Incorrect some fields declaration in the PyTypeObject documentation In-Reply-To: <1347873224.57.0.93636410461.issue15953@psf.upfronthosting.co.za> Message-ID: <1348826552.38.0.743227409404.issue15953@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 13:48:45 2012 From: report at bugs.python.org (Brian Brazil) Date: Fri, 28 Sep 2012 11:48:45 +0000 Subject: [docs] [issue15677] Gzip/zlib allows for compression level=0 In-Reply-To: <1345062923.32.0.954619584637.issue15677@psf.upfronthosting.co.za> Message-ID: <1348832924.94.0.907470938281.issue15677@psf.upfronthosting.co.za> Brian Brazil added the comment: The attached patch fixes this. ---------- keywords: +patch nosy: +bbrazil Added file: http://bugs.python.org/file27330/issue15677.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 14:06:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Sep 2012 12:06:28 +0000 Subject: [docs] [issue16082] xml.etree.ElementTree.tostringlist does conform to it's documentation In-Reply-To: <1348829487.02.0.837389148596.issue16082@psf.upfronthosting.co.za> Message-ID: <1348833988.29.0.725715997567.issue16082@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Bug in the documentation, but not in the implementation. See also issue8047 and issue1767933 (changeset 63845:57e631f088d7). ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, eli.bendersky, storchaka versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 14:16:41 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 28 Sep 2012 12:16:41 +0000 Subject: [docs] [issue16072] fix documentation of string.replace() signature In-Reply-To: <1348802928.91.0.483315900162.issue16072@psf.upfronthosting.co.za> Message-ID: <1348834601.71.0.812453917803.issue16072@psf.upfronthosting.co.za> Andrew Svetlov added the comment: No it shoudn't. It works exactly as described: Return a copy of string *str* with all occurrences of substring *old* replaced by *new*. If the optional argument *maxreplace* is given, the first *maxreplace* occurrences are replaced. *str* is updated string and it is definitelly required. ---------- nosy: +asvetlov resolution: -> invalid stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 14:24:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 12:24:42 +0000 Subject: [docs] [issue16072] fix documentation of string.replace() signature In-Reply-To: <1348802928.91.0.483315900162.issue16072@psf.upfronthosting.co.za> Message-ID: <1348835082.31.0.736970373519.issue16072@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Andrew. I didn't look closely enough when reading the e-mail or I wouldn't have posted. I had assumed from the e-mail that this was in the string *method* section rather than string module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 14:37:02 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 12:37:02 +0000 Subject: [docs] [issue16072] fix documentation of string.replace() signature In-Reply-To: <1348802928.91.0.483315900162.issue16072@psf.upfronthosting.co.za> Message-ID: <1348835822.48.0.684725096501.issue16072@psf.upfronthosting.co.za> Chris Jerdonek added the comment: [Reopening] It looks like at least *some* change is warranted here. Notice that all the functions document "s" for the string argument but string.replace() documents "str". However, we have (in 2.7): >>> string.replace(str='aab', old='a', new='b') Traceback (most recent call last): File "", line 1, in TypeError: replace() got an unexpected keyword argument 'str' >>> string.replace(s='aab', old='a', new='b') 'bbb' ---------- resolution: invalid -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 14:45:26 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 28 Sep 2012 12:45:26 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1348836326.8.0.0767805464481.issue9650@psf.upfronthosting.co.za> Christian Heimes added the comment: If we want to archive platform independence from the libc's strftime() and strptime() function and its bugs, we could include our own implementation. Or rather than writing our own code we may be able to include some working and well tested code. BSD's libc contains the functions. Its license should allow the inclusion into Python core. http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdtime/ If you like my idea we should discuss it on python-ideas and start a new tracker entry. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 14:47:25 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 28 Sep 2012 12:47:25 +0000 Subject: [docs] [issue16072] fix documentation of string.replace() signature In-Reply-To: <1348802928.91.0.483315900162.issue16072@psf.upfronthosting.co.za> Message-ID: <1348836445.36.0.323423652228.issue16072@psf.upfronthosting.co.za> Andrew Svetlov added the comment: If you want just to change parameter name in the docs ? I'm ok with that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 15:24:54 2012 From: report at bugs.python.org (Peter Russell) Date: Fri, 28 Sep 2012 13:24: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: <1348838694.86.0.798404312673.issue15593@psf.upfronthosting.co.za> Peter Russell added the comment: Attached is a patch which adds a reference to the doseq parameter to urlencode to the documentation for parse_qs ---------- keywords: +patch nosy: +qwertyface Added file: http://bugs.python.org/file27331/Issue-15593.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 15:28:52 2012 From: report at bugs.python.org (Peter Inglesby) Date: Fri, 28 Sep 2012 13:28:52 +0000 Subject: [docs] [issue16073] fix map() statement in list comprehension example In-Reply-To: <1348804224.11.0.798375217467.issue16073@psf.upfronthosting.co.za> Message-ID: <1348838932.44.0.594898494017.issue16073@psf.upfronthosting.co.za> Peter Inglesby added the comment: Have attached a patch with suggested update. Have also grepped for similar issues elsewhere in documentation, and haven't found anything, but may have missed something. ---------- keywords: +patch nosy: +inglesp Added file: http://bugs.python.org/file27332/issue16073.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 15:36:17 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 28 Sep 2012 13:36:17 +0000 Subject: [docs] [issue16072] fix documentation of string.replace() signature In-Reply-To: <1348802928.91.0.483315900162.issue16072@psf.upfronthosting.co.za> Message-ID: <1348839377.84.0.487835175959.issue16072@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed in c34a177d1f38 ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 15:39:06 2012 From: report at bugs.python.org (Michael Foord) Date: Fri, 28 Sep 2012 13:39:06 +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: <1348839546.41.0.620270930225.issue15593@psf.upfronthosting.co.za> Michael Foord added the comment: UTF-16 patches are relatively unusual... ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 15:40:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Sep 2012 13:40:59 +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: <3XSvDB4DfFzNpC@mail.python.org> Roundup Robot added the comment: New changeset 8590e9b05069 by Michael Foord in branch 'default': urllib.parse.urlencode doc updarte. http://hg.python.org/cpython/rev/8590e9b05069 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 15:58:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 13:58:47 +0000 Subject: [docs] [issue16073] fix map() statement in list comprehension example In-Reply-To: <1348804224.11.0.798375217467.issue16073@psf.upfronthosting.co.za> Message-ID: <1348840727.06.0.188505096533.issue16073@psf.upfronthosting.co.za> Chris Jerdonek added the comment: 2.7 is not affected. ---------- assignee: docs at python -> chris.jerdonek versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 16:26:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Sep 2012 14:26:10 +0000 Subject: [docs] [issue16073] fix map() statement in list comprehension example In-Reply-To: <1348804224.11.0.798375217467.issue16073@psf.upfronthosting.co.za> Message-ID: <3XSwDK0gLyzNnl@mail.python.org> Roundup Robot added the comment: New changeset 6c96878eb729 by Chris Jerdonek in branch '3.2': Close issue #16073: fix map() example in list comprehension documentation. http://hg.python.org/cpython/rev/6c96878eb729 New changeset 8a4a88b1e964 by Chris Jerdonek in branch 'default': Close issue #16073: merge fix from 3.2. http://hg.python.org/cpython/rev/8a4a88b1e964 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 16:30:14 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 14:30:14 +0000 Subject: [docs] [issue16073] fix map() statement in list comprehension example In-Reply-To: <1348804224.11.0.798375217467.issue16073@psf.upfronthosting.co.za> Message-ID: <1348842614.8.0.0209868851851.issue16073@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for helping with the patch and search, Peter. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 16:35:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Sep 2012 14:35:39 +0000 Subject: [docs] [issue15953] Incorrect some fields declaration in the PyTypeObject documentation In-Reply-To: <1347873224.57.0.93636410461.issue15953@psf.upfronthosting.co.za> Message-ID: <3XSwRG4qcRzNwK@mail.python.org> Roundup Robot added the comment: New changeset 08aa289a757c by Jesus Cea in branch '2.7': Closes #15953: Incorrect some fields declaration in the PyTypeObject documentation http://hg.python.org/cpython/rev/08aa289a757c New changeset c87ea480ddf3 by Jesus Cea in branch '3.2': Closes #15953: Incorrect some fields declaration in the PyTypeObject documentation http://hg.python.org/cpython/rev/c87ea480ddf3 New changeset 3bb53816f9c5 by Jesus Cea in branch 'default': MERGE: Closes #15953: Incorrect some fields declaration in the PyTypeObject documentation http://hg.python.org/cpython/rev/3bb53816f9c5 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 16:36:46 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 28 Sep 2012 14:36:46 +0000 Subject: [docs] [issue15953] Incorrect some fields declaration in the PyTypeObject documentation In-Reply-To: <1347873224.57.0.93636410461.issue15953@psf.upfronthosting.co.za> Message-ID: <1348843006.45.0.867885715307.issue15953@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Thanks!. ---------- nosy: +jcea resolution: fixed -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 16:37:24 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 28 Sep 2012 14:37:24 +0000 Subject: [docs] [issue15953] Incorrect some fields declaration in the PyTypeObject documentation In-Reply-To: <1347873224.57.0.93636410461.issue15953@psf.upfronthosting.co.za> Message-ID: <1348843044.92.0.382376610054.issue15953@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 17:03:39 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 28 Sep 2012 15:03:39 +0000 Subject: [docs] [issue16069] packaging shows up on docs.python.org/dev In-Reply-To: <1348801693.29.0.778297350134.issue16069@psf.upfronthosting.co.za> Message-ID: <1348844619.91.0.379730384951.issue16069@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be fixed now. The daily builds are just copied over to /dev, so removed pages don't get removed automatically. I could add an "rm -r" to the dailybuild steps, but that would cause a few moments of missing pages for everyone browsing /dev at that moment. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 17:17:25 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 28 Sep 2012 15:17:25 +0000 Subject: [docs] [issue15821] PyMemoryView_FromBuffer() behavior change (possible regression) In-Reply-To: <1346320388.88.0.494685067241.issue15821@psf.upfronthosting.co.za> Message-ID: <1348845445.0.0.714037103672.issue15821@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 17:26:09 2012 From: report at bugs.python.org (James Salt) Date: Fri, 28 Sep 2012 15:26:09 +0000 Subject: [docs] [issue16026] csv.DictReader argument names documented incorrectly In-Reply-To: <1348505583.77.0.632308357055.issue16026@psf.upfronthosting.co.za> Message-ID: <1348845969.86.0.854517030418.issue16026@psf.upfronthosting.co.za> James Salt added the comment: This diff shows a correction of the documentation to reflect the name for the csv file used in the implementation - this change seemed like the easiest and simplest thing to do and avoids potential backwards incompatibility issues. ---------- nosy: +James.Salt Added file: http://bugs.python.org/file27338/james.salt-corrections_to_documentation_in_csv-01.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 17:31:21 2012 From: report at bugs.python.org (Larry Hastings) Date: Fri, 28 Sep 2012 15:31:21 +0000 Subject: [docs] [issue16026] csv.DictReader argument names documented incorrectly In-Reply-To: <1348505583.77.0.632308357055.issue16026@psf.upfronthosting.co.za> Message-ID: <1348846281.85.0.0292461879476.issue16026@psf.upfronthosting.co.za> Larry Hastings added the comment: Eric, iirc you're the de facto csv guy? Does this seem reasonable to you? ---------- nosy: +eric.araujo, larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 17:36:11 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 28 Sep 2012 15:36:11 +0000 Subject: [docs] [issue16026] csv.DictReader argument names documented incorrectly In-Reply-To: <1348505583.77.0.632308357055.issue16026@psf.upfronthosting.co.za> Message-ID: <1348846571.3.0.545050075485.issue16026@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m not a dedicated maintainer for csv (for one thing I don?t know C :), I just happen to reply to many bug reports. This doc patch looks good to me. ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 17:54:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 15:54:38 +0000 Subject: [docs] [issue16069] packaging shows up on docs.python.org/dev In-Reply-To: <1348801693.29.0.778297350134.issue16069@psf.upfronthosting.co.za> Message-ID: <1348847678.92.0.155300023085.issue16069@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks a lot, Georg. FYI, though, the page linked to in the original e-mail still seems to show up for me: http://docs.python.org/dev/library/packaging.html Is this change something that won't necessarily take effect right away? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 18:12:41 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 28 Sep 2012 16:12:41 +0000 Subject: [docs] [issue16069] packaging shows up on docs.python.org/dev In-Reply-To: <1348801693.29.0.778297350134.issue16069@psf.upfronthosting.co.za> Message-ID: <1348848761.96.0.118901778005.issue16069@psf.upfronthosting.co.za> Georg Brandl added the comment: Ah yes, I missed those as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 18:24:44 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 28 Sep 2012 16:24:44 +0000 Subject: [docs] [issue16048] Tutorial-classes-remarks: replace paragragh In-Reply-To: <1348603562.92.0.789475109772.issue16048@psf.upfronthosting.co.za> Message-ID: <1348849484.66.0.923060560282.issue16048@psf.upfronthosting.co.za> ?ric Araujo added the comment: Well there is http://docs.python.org/reference/datamodel.html#special-method-names (even thought we have a lot of evidence people miss that). ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 18:25:54 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 28 Sep 2012 16:25:54 +0000 Subject: [docs] [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1348849554.2.0.447270635268.issue16053@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 19:06:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Sep 2012 17:06:41 +0000 Subject: [docs] [issue16026] csv.DictReader argument names documented incorrectly In-Reply-To: <1348505583.77.0.632308357055.issue16026@psf.upfronthosting.co.za> Message-ID: <1348852001.4.0.832338417916.issue16026@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is not consistent with reader and writer. I propose to close the issue as "won't fix" or change the argument name in the sources. Unfortunately, Python syntax does not allow to specify the positional-only arguments. ---------- keywords: +patch nosy: +storchaka Added file: http://bugs.python.org/file27339/csv_csvfile_arg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 19:35:34 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 28 Sep 2012 17:35:34 +0000 Subject: [docs] [issue16026] csv.DictReader argument names documented incorrectly In-Reply-To: <1348505583.77.0.632308357055.issue16026@psf.upfronthosting.co.za> Message-ID: <1348853734.87.0.190803281644.issue16026@psf.upfronthosting.co.za> ?ric Araujo added the comment: I don?t understand the proposal. Changing the code has a high bar; here it would break code without benefit. Fixing the doc so that it reflects the code accurately is a no-cost improvement. (Inconsistency is unfortunate, but we?ll have to live with that.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 19:55:54 2012 From: report at bugs.python.org (Kushal Das) Date: Fri, 28 Sep 2012 17:55:54 +0000 Subject: [docs] [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1348854954.45.0.674131008192.issue16053@psf.upfronthosting.co.za> Kushal Das added the comment: csv.Dialect.strict is now documented. ---------- keywords: +patch nosy: +kushaldas Added file: http://bugs.python.org/file27340/csv_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 20:26:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Sep 2012 18:26:23 +0000 Subject: [docs] [issue16026] csv.DictReader argument names documented incorrectly In-Reply-To: <1348505583.77.0.632308357055.issue16026@psf.upfronthosting.co.za> Message-ID: <1348856783.21.0.601192065654.issue16026@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Changing the documentation is changing the specification, it has the higher bar than changing the implementation. It can break the alternative implementations. This is unlikely to break somebody's existing code, because the one who used the argument as a keyword argument should have paid attention to the discrepancy of the documentation. But fixing the name, we will be difficult to change it in the future (to eliminate inconsistency). I believe this change is too serious for bugfix. This is the case when never is better than *right* now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 20:36:03 2012 From: report at bugs.python.org (Kushal Das) Date: Fri, 28 Sep 2012 18:36:03 +0000 Subject: [docs] [issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode In-Reply-To: <1348695643.05.0.172807817425.issue16057@psf.upfronthosting.co.za> Message-ID: <1348857363.52.0.301402777639.issue16057@psf.upfronthosting.co.za> Kushal Das added the comment: The implementation clearly says that default method should return a serializable object or calls the base implementation to raise TypeError. So I don't think any of the examples is a bug. ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 20:53:24 2012 From: report at bugs.python.org (Kushal Das) Date: Fri, 28 Sep 2012 18:53:24 +0000 Subject: [docs] [issue16071] fix link to email.message.Message in mailbox docs In-Reply-To: <1348802488.29.0.674477031086.issue16071@psf.upfronthosting.co.za> Message-ID: <1348858404.01.0.259347826614.issue16071@psf.upfronthosting.co.za> Kushal Das added the comment: But the whole 18.4.2 is mount mailbox.Message so, it seems to be correct documentation. email.Message.Message is properly mentioned in the 4th line properly. I don't think it is bug. ---------- nosy: +kushaldas _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 20:53:28 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 28 Sep 2012 18:53:28 +0000 Subject: [docs] [issue16026] csv.DictReader argument names documented incorrectly In-Reply-To: <1348505583.77.0.632308357055.issue16026@psf.upfronthosting.co.za> Message-ID: <1348858408.66.0.650654206885.issue16026@psf.upfronthosting.co.za> ?ric Araujo added the comment: I disagree that we can never fix argument names in the docs, as we have done it already. You raise a good point however, that we should check what other VMs do. I would not be surprised if they followed the code instead of the docs. ---------- keywords: +3.3regression -easy, patch nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 20:53:57 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 28 Sep 2012 18:53:57 +0000 Subject: [docs] [issue16026] csv.DictReader argument names documented incorrectly In-Reply-To: <1348505583.77.0.632308357055.issue16026@psf.upfronthosting.co.za> Message-ID: <1348858437.37.0.473004894927.issue16026@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +needs review, patch -3.3regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 20:55:26 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 28 Sep 2012 18:55:26 +0000 Subject: [docs] [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1348858526.66.0.405630433379.issue16053@psf.upfronthosting.co.za> ?ric Araujo added the comment: Please use ``True`` instead of :const: (this is explained in the doc about the docs in the devguide). ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 20:57:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 18:57:47 +0000 Subject: [docs] [issue16071] fix link to email.message.Message in mailbox docs In-Reply-To: <1348802488.29.0.674477031086.issue16071@psf.upfronthosting.co.za> Message-ID: <1348858667.88.0.452199095494.issue16071@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > But the whole 18.4.2 is mount mailbox.Message But the first reference is a reference to email.Message's Message, so that word should link to email.Message.Message. Sphinx lets you to link to classes, etc. outside the current scope. It's a simple one word or so fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 21:01:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Sep 2012 19:01:47 +0000 Subject: [docs] [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1348858907.63.0.420173943791.issue16053@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can native speakers review the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 21:03:00 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 28 Sep 2012 19:03:00 +0000 Subject: [docs] [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1348858980.14.0.000916630254597.issue16053@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM, except for my previous remark and a missing period after the first line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 21:12:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 19:12:48 +0000 Subject: [docs] [issue16071] fix link to email.message.Message in mailbox docs In-Reply-To: <1348802488.29.0.674477031086.issue16071@psf.upfronthosting.co.za> Message-ID: <1348859568.7.0.0420091967167.issue16071@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: docs at python -> chris.jerdonek versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 21:18:13 2012 From: report at bugs.python.org (Kushal Das) Date: Fri, 28 Sep 2012 19:18:13 +0000 Subject: [docs] [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1348859893.61.0.85025452942.issue16053@psf.upfronthosting.co.za> Kushal Das added the comment: Updated with new patch ---------- Added file: http://bugs.python.org/file27341/csv_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 21:20:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Sep 2012 19:20:35 +0000 Subject: [docs] [issue16071] fix link to email.message.Message in mailbox docs In-Reply-To: <1348802488.29.0.674477031086.issue16071@psf.upfronthosting.co.za> Message-ID: <3XT2m32V6bzNLV@mail.python.org> Roundup Robot added the comment: New changeset be94d100f846 by R David Murray in branch '3.2': #16071: fix links to email.message.Message in mailbox docs. http://hg.python.org/cpython/rev/be94d100f846 New changeset 2a14542371b7 by R David Murray in branch 'default': Merge #16071: fix links to email.message.Message in mailbox docs. http://hg.python.org/cpython/rev/2a14542371b7 New changeset 70af6b53b52a by R David Murray in branch '3.2': #16071: fix more email.message links in mailbox docs. http://hg.python.org/cpython/rev/70af6b53b52a New changeset f3bd51cdd958 by R David Murray in branch 'default': Merge #16071: fix more email.message links in mailbox docs. http://hg.python.org/cpython/rev/f3bd51cdd958 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 21:21:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Sep 2012 19:21:45 +0000 Subject: [docs] [issue16071] fix link to email.message.Message in mailbox docs In-Reply-To: <1348802488.29.0.674477031086.issue16071@psf.upfronthosting.co.za> Message-ID: <3XT2nP146vzNZP@mail.python.org> Roundup Robot added the comment: New changeset aad3cec524f9 by R David Murray in branch '2.7': #16071: fix email.message links in the mailbox docs. http://hg.python.org/cpython/rev/aad3cec524f9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 21:23:06 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 28 Sep 2012 19:23:06 +0000 Subject: [docs] [issue16071] fix link to email.message.Message in mailbox docs In-Reply-To: <1348802488.29.0.674477031086.issue16071@psf.upfronthosting.co.za> Message-ID: <1348860186.7.0.25156759636.issue16071@psf.upfronthosting.co.za> R. David Murray added the comment: Two words and a tilde. But there were also a number of other places where the links were broken. Hopefully I caught them all. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 21:26:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 19:26:54 +0000 Subject: [docs] [issue16071] fix link to email.message.Message in mailbox docs In-Reply-To: <1348802488.29.0.674477031086.issue16071@psf.upfronthosting.co.za> Message-ID: <1348860414.31.0.545880291946.issue16071@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: chris.jerdonek -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 21:58:39 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 28 Sep 2012 19:58:39 +0000 Subject: [docs] [issue16053] "strict" parameter is not documented in csv module In-Reply-To: <1348655757.15.0.984566805089.issue16053@psf.upfronthosting.co.za> Message-ID: <1348862319.65.0.914240551987.issue16053@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 22:23:02 2012 From: report at bugs.python.org (Justin Lebar) Date: Fri, 28 Sep 2012 20:23:02 +0000 Subject: [docs] [issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode In-Reply-To: <1348695643.05.0.172807817425.issue16057@psf.upfronthosting.co.za> Message-ID: <1348863782.0.0.180493370899.issue16057@psf.upfronthosting.co.za> Justin Lebar added the comment: Ah, I see. The examples do what you think they should do, but not for the reason you think they should do it -- the JSON encoding logic calls the encoder's encode() method before calling its default() method. I still think the examples could be improved, perhaps by adding a comment to the effect of # Raises a TypeError. before the call to JSONEncoder.default(). Explicit is better than implicit, after all. :) Thanks for looking at this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Sep 28 22:29:57 2012 From: report at bugs.python.org (Kushal Das) Date: Fri, 28 Sep 2012 20:29:57 +0000 Subject: [docs] [issue16057] Subclasses of JSONEncoder should not be insturcted to call JSONEncoder.decode In-Reply-To: <1348695643.05.0.172807817425.issue16057@psf.upfronthosting.co.za> Message-ID: <1348864197.89.0.0426987318759.issue16057@psf.upfronthosting.co.za> Kushal Das added the comment: Ok, I will submit a patch. ---------- _______________________________________ Python tracker _______________________________________ From chris.jerdonek at gmail.com Fri Sep 28 23:52:27 2012 From: chris.jerdonek at gmail.com (Chris Jerdonek) Date: Fri, 28 Sep 2012 14:52:27 -0700 Subject: [docs] docs Digest, Vol 62, Issue 70 In-Reply-To: References: Message-ID: > Date: Wed, 12 Sep 2012 15:32:38 -0400 > From: Paul Fallon > To: docs at python.org > Subject: [docs] Documentation Strings > > For all us who are new to programming, it should be pointed out in the > documentation that a double underscore is needed to get the docstring: >>>>function_name.__doc__ <--- double underscores Hi Paul, Thanks for the suggestion. This is currently mentioned in the tutorial portion of the documentation in the section called "Documentation Strings" though: http://docs.python.org/py3k/tutorial/controlflow.html#documentation-strings It provides a code snippet very similar to the one that you provided. --Chris From report at bugs.python.org Fri Sep 28 23:59:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Sep 2012 21:59:28 +0000 Subject: [docs] [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1348869568.66.0.0206867363481.issue15204@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Ideally, this proposed deprecation should be mentioned on python-dev so that those folks will have an opportunity to respond. http://comments.gmane.org/gmane.comp.python.devel/134996 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 00:02:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Sep 2012 22:02:50 +0000 Subject: [docs] [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1348869770.54.0.50243947196.issue15204@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Chris, you did a great job on improving the documentation (including about universal newlines). Can you help with this issue? For the first stage should be clearly shown that "U" mode is not only should not be used in new code, but must be removed from the old code. Stage 1 patch updated to resolve conflicts with Chris changes. ---------- Added file: http://bugs.python.org/file27345/deprecate-U-mode-stage1_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 00:03:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Sep 2012 22:03:00 +0000 Subject: [docs] [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1348869780.82.0.134008565291.issue15204@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file26197/deprecate-U-mode-stage1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 01:28:52 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Sep 2012 23:28:52 +0000 Subject: [docs] [issue15204] Deprecate the 'U' open mode In-Reply-To: <1340792991.22.0.497199331706.issue15204@psf.upfronthosting.co.za> Message-ID: <1348874932.03.0.63107925601.issue15204@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, Serhiy. :) Sure, I should be able to help with the documentation portion of this issue if the community is in agreement. Would the deprecation need to be moved up to 3.4 though now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 04:08:45 2012 From: report at bugs.python.org (Tim Chase) Date: Sat, 29 Sep 2012 02:08:45 +0000 Subject: [docs] [issue16071] fix link to email.message.Message in mailbox docs In-Reply-To: <1348802488.29.0.674477031086.issue16071@psf.upfronthosting.co.za> Message-ID: <1348884525.69.0.511367783942.issue16071@psf.upfronthosting.co.za> Tim Chase added the comment: http://docs.python.org/library/mailbox.html#mailbox.Message still points to mailbox.Message instead of email.Message "A subclass of the email.Message module?s {bad link}Message{/bad link}" Not sure if this is a matter of changes that haven't yet been deployed, or just one that slipped through the cracks. ---------- nosy: +Gumnos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 04:13:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Sep 2012 02:13:19 +0000 Subject: [docs] [issue16071] fix link to email.message.Message in mailbox docs In-Reply-To: <1348802488.29.0.674477031086.issue16071@psf.upfronthosting.co.za> Message-ID: <1348884799.62.0.547646698766.issue16071@psf.upfronthosting.co.za> Chris Jerdonek added the comment: It can take up to 24 hours for the changes to show up on the web site. They are regenerated at least once per day. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 09:27:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Sep 2012 07:27:38 +0000 Subject: [docs] [issue16022] Mistake in "What's New in Python 3.3" In-Reply-To: <1348498015.65.0.0485764115741.issue16022@psf.upfronthosting.co.za> Message-ID: <3XTLtx49SDzNp2@mail.python.org> Roundup Robot added the comment: New changeset f6155d9111a2 by Victor Stinner in branch 'default': Close #16022: What's New in Python 3.3 document is no more at beta stage http://hg.python.org/cpython/rev/f6155d9111a2 ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 15:13:34 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sat, 29 Sep 2012 13:13:34 +0000 Subject: [docs] [issue16084] couple of code examples not highlighted in "What's new in Python 3" Message-ID: <1348924414.8.0.371561507125.issue16084@psf.upfronthosting.co.za> New submission from Ramchandra Apte: A couple of code examples are not highlighted in http://docs.python.org/py3k/whatsnew/3.3.html#pep-380-syntax-for-delegating-to-a-subgenerator They should be highlighted with Python highlighting. ---------- assignee: docs at python components: Documentation messages: 171570 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: couple of code examples not highlighted in "What's new in Python 3" versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 15:43:43 2012 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 29 Sep 2012 13:43:43 +0000 Subject: [docs] [issue16085] Minor config parser doc change Message-ID: <1348926223.26.0.285259885807.issue16085@psf.upfronthosting.co.za> New submission from Mark Lawrence: >From http://docs.python.org/library/configparser.html#examples float = config.getfloat('Section1', 'float') int = config.getint('Section1', 'int') print float + int It's not a good idea to have float or int used like this in examples. Maybe my_float and my_int or sec1_float and sec_int? ---------- assignee: docs at python components: Documentation messages: 171573 nosy: BreamoreBoy, docs at python priority: normal severity: normal status: open title: Minor config parser doc change type: enhancement _______________________________________ Python tracker _______________________________________ From mike at saguaroscuba.com Sat Sep 29 16:19:52 2012 From: mike at saguaroscuba.com (Mike Hoy) Date: Sat, 29 Sep 2012 07:19:52 -0700 Subject: [docs] docs Digest, Vol 62, Issue 70 In-Reply-To: References: Message-ID: <50670388.5040807@saguaroscuba.com> For all us who are new to programming, it should be pointed out in the documentation that a double underscore is needed to get the docstring: >>>>> function_name.__doc__ <--- double underscores > Hi Paul, > > Thanks for the suggestion. This is currently mentioned in the > tutorial portion of the documentation in the section called > "Documentation Strings" though: > > http://docs.python.org/py3k/tutorial/controlflow.html#documentation-strings > > It provides a code snippet very similar to the one that you provided. > > --Chris Yes that section of text does show an example of *function_name.__doc__* but what he is complaining about is that he needs to use two underscores. Not that he needs to see the *function_name.__doc* in an example. In any case I suppose it could be mentioned that it is a double underscore and not a single underscore but it seems so obvious to me that it is double that it's not worth documenting anywhere. -- -Mike Hoy From mike at saguaroscuba.com Sat Sep 29 16:32:56 2012 From: mike at saguaroscuba.com (Mike Hoy) Date: Sat, 29 Sep 2012 07:32:56 -0700 Subject: [docs] source of python doc site In-Reply-To: References: Message-ID: <50670698.4090001@saguaroscuba.com> On 09/13/2012 08:10 PM, CSJ wrote: > Hello doc team, > > I just know Sphinx yesterday, > and http://docs.python.org/py3k/about.html use it to generate html. > > Is any place I can get source of the files(rst, Makefile, etc) to > generate the doc site? > Cause I think it is also good example for me to learn using Sphinx. > > Thanks a lot, > Jay > _______________________________________________ > docs mailing list > docs at python.org > http://mail.python.org/mailman/listinfo/docs > > If I understand you correctly you want to build the html files from rest using Sphynx? If so just navigate to cpython/Doc/ and then: build html and it will checkout a copy of Sphinx and will put all the html files in Doc/build/html/. -- -Mike Hoy From mike at saguaroscuba.com Sat Sep 29 16:39:40 2012 From: mike at saguaroscuba.com (Mike Hoy) Date: Sat, 29 Sep 2012 07:39:40 -0700 Subject: [docs] Problem with the documentation for string.replace In-Reply-To: <22519E154CA60B438D1E0122BAC64766713F89736F@NYWEXMBX2126.msad.ms.com> References: <22519E154CA60B438D1E0122BAC64766713F89736F@NYWEXMBX2126.msad.ms.com> Message-ID: <5067082C.7090404@saguaroscuba.com> > From http://docs.python.org/library/string.html > > string.*replace*(/str/, /old/, /new/[, /maxreplace/])? > > > Return a copy of string /str/ with all occurrences of substring /old/ > replaced by /new/. If the optional argument /maxreplace/ is given, the > first /maxreplace/ occurrences are replaced. > > it would appear this needs to be > > string.*replace*(/old/, /new/[, /maxreplace/])? > > > thanks > This documentation is correct for this deprecated function. Example: Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import string >>> string.replace("dog","d","m") 'mog' >>> From mike at saguaroscuba.com Sat Sep 29 16:54:48 2012 From: mike at saguaroscuba.com (Mike Hoy) Date: Sat, 29 Sep 2012 07:54:48 -0700 Subject: [docs] map objects are not lists In-Reply-To: References: Message-ID: <50670BB8.4070307@saguaroscuba.com> > > In other words, the map function returns a map object, not a list object, Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> MAP = map(lambda x: x**2, range(10)) >>> type(MAP) >>> It seems to me that it does return a list object. Am I understanding this correctly? If not, please clarify. Thanks, Mike Hoy From mike at saguaroscuba.com Sat Sep 29 16:56:18 2012 From: mike at saguaroscuba.com (Mike Hoy) Date: Sat, 29 Sep 2012 07:56:18 -0700 Subject: [docs] Documentation Strings In-Reply-To: References: Message-ID: <50670C12.6090609@saguaroscuba.com> On 09/12/2012 12:32 PM, Paul Fallon wrote: > For all us who are new to programming, it should be pointed out in the > documentation that a double underscore is needed to get the docstring: > >>>function_name.__doc__ <--- double underscores Have you seen this come up a lot in forums, lists, etc? Because to me the double underscore seems much longer than a single underscore making it obvious to me that I need two instead of one. From report at bugs.python.org Sat Sep 29 19:05:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Sep 2012 17:05:18 +0000 Subject: [docs] [issue16084] couple of code examples not highlighted in "What's new in Python 3" In-Reply-To: <1348924414.8.0.371561507125.issue16084@psf.upfronthosting.co.za> Message-ID: <1348938318.59.0.435335689397.issue16084@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: docs at python -> chris.jerdonek nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 19:06:44 2012 From: report at bugs.python.org (Berker Peksag) Date: Sat, 29 Sep 2012 17:06:44 +0000 Subject: [docs] [issue16048] Tutorial-classes-remarks: replace paragraph In-Reply-To: <1348603562.92.0.789475109772.issue16048@psf.upfronthosting.co.za> Message-ID: <1348938404.05.0.822957476025.issue16048@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- title: Tutorial-classes-remarks: replace paragragh -> Tutorial-classes-remarks: replace paragraph _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 19:32:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Sep 2012 17:32:32 +0000 Subject: [docs] [issue16084] couple of code examples not highlighted in "What's new in Python 3" In-Reply-To: <1348924414.8.0.371561507125.issue16084@psf.upfronthosting.co.za> Message-ID: <1348939951.89.0.303314512483.issue16084@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the report. Closing though as this is a duplicate. ---------- resolution: -> duplicate superseder: -> docs: 2 code examples not Pygmented (syntax color coded) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 19:37:19 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 29 Sep 2012 17:37:19 +0000 Subject: [docs] [issue16084] couple of code examples not highlighted in "What's new in Python 3" In-Reply-To: <1348924414.8.0.371561507125.issue16084@psf.upfronthosting.co.za> Message-ID: <1348940239.92.0.108443020158.issue16084@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 19:38:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Sep 2012 17:38:27 +0000 Subject: [docs] [issue16084] couple of code examples not highlighted in "What's new in Python 3" In-Reply-To: <1348924414.8.0.371561507125.issue16084@psf.upfronthosting.co.za> Message-ID: <1348940307.22.0.796742725807.issue16084@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 19:40:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Sep 2012 17:40:13 +0000 Subject: [docs] [issue14503] docs: "yield from" breaks Pygments syntax coloring in doc examples In-Reply-To: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> Message-ID: <1348940413.83.0.881228403951.issue14503@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- title: docs: 2 code examples not Pygmented (syntax color coded) -> docs: "yield from" breaks Pygments syntax coloring in doc examples _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 19:53:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Sep 2012 17:53:17 +0000 Subject: [docs] [issue16077] fix code example in docs for built-in reduce() In-Reply-To: <1348822552.23.0.324199631114.issue16077@psf.upfronthosting.co.za> Message-ID: <1348941197.89.0.368021172893.issue16077@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: docs at python -> chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 20:44:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Sep 2012 18:44:36 +0000 Subject: [docs] [issue16085] Minor config parser doc change In-Reply-To: <1348926223.26.0.285259885807.issue16085@psf.upfronthosting.co.za> Message-ID: <3XTdw30DlszQRk@mail.python.org> Roundup Robot added the comment: New changeset 178e7183931e by R David Murray in branch '3.2': #16085: Don't promote shadowing builtins in the configparser example. http://hg.python.org/cpython/rev/178e7183931e New changeset 769247e6edbf by R David Murray in branch '3.3': Merge #16085: Don't promote shadowing builtins in the configparser example. http://hg.python.org/cpython/rev/769247e6edbf New changeset 1c9b0b37f097 by R David Murray in branch 'default': Merge #16085: Don't promote shadowing builtins in the configparser example. http://hg.python.org/cpython/rev/1c9b0b37f097 New changeset 1ee270d522f3 by R David Murray in branch '2.7': #16085: Don't promote shadowing builtins in the configparser example. http://hg.python.org/cpython/rev/1ee270d522f3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 20:45:28 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Sep 2012 18:45:28 +0000 Subject: [docs] [issue16085] Minor config parser doc change In-Reply-To: <1348926223.26.0.285259885807.issue16085@psf.upfronthosting.co.za> Message-ID: <1348944327.98.0.979391913729.issue16085@psf.upfronthosting.co.za> R. David Murray added the comment: Fixed. Thanks, Mark. ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 20:51:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Sep 2012 18:51:57 +0000 Subject: [docs] [issue16077] fix code example in docs for built-in reduce() In-Reply-To: <1348822552.23.0.324199631114.issue16077@psf.upfronthosting.co.za> Message-ID: <3XTf4X4zNszNwK@mail.python.org> Roundup Robot added the comment: New changeset a6779524962c by Chris Jerdonek in branch '2.7': Close issue #16077: fix code example in documentation of reduce() built-in (from docs@). http://hg.python.org/cpython/rev/a6779524962c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 20:54:04 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Sep 2012 18:54:04 +0000 Subject: [docs] [issue16077] fix code example in docs for built-in reduce() In-Reply-To: <1348822552.23.0.324199631114.issue16077@psf.upfronthosting.co.za> Message-ID: <1348944844.83.0.379814369145.issue16077@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Serhiy, feel free to create a new issue for Doc/howto/functional.rst if you feel an addition there is warranted. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 21:07:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Sep 2012 19:07:42 +0000 Subject: [docs] [issue16077] fix code example in docs for built-in reduce() In-Reply-To: <1348822552.23.0.324199631114.issue16077@psf.upfronthosting.co.za> Message-ID: <1348945662.24.0.0377531243933.issue16077@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I thought and decided it wasn't worth it. Howtos for general cases, and not for corner cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 21:36:30 2012 From: report at bugs.python.org (Mike Hoy) Date: Sat, 29 Sep 2012 19:36: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: <1348947390.67.0.281631941387.issue9650@psf.upfronthosting.co.za> Mike Hoy added the comment: >If you like my idea we should discuss it on python-ideas and start a new tracker entry. In the meantime I'd like to create a patch that incorporates Alexander's ideas. If any objections let me know. ---------- nosy: +mikehoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Sep 29 23:04:12 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Sep 2012 21:04:12 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1348952652.66.0.996385511145.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: See the following comment to issue 16045 for a couple differences in the behavior of int() in 2.7: http://bugs.python.org/issue16045#msg171595 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 05:12:46 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Sep 2012 03:12:46 +0000 Subject: [docs] [issue16084] couple of code examples not highlighted in "What's new in Python 3" In-Reply-To: <1348924414.8.0.371561507125.issue16084@psf.upfronthosting.co.za> Message-ID: <1348974766.26.0.788254077419.issue16084@psf.upfronthosting.co.za> Ramchandra Apte added the comment: LOL the duplicate is my bug ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 05:23:20 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Sep 2012 03:23:20 +0000 Subject: [docs] [issue16090] but is needed somewhere in http://www.python.org/dev/peps/pep-3138/ Message-ID: <1348975400.05.0.784015887596.issue16090@psf.upfronthosting.co.za> New submission from Ramchandra Apte: subject I can't remember where the but is needed but I am sure a but is missing somewhere there. ---------- assignee: docs at python components: Documentation messages: 171607 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: but is needed somewhere in http://www.python.org/dev/peps/pep-3138/ versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 05:28:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 30 Sep 2012 03:28:11 +0000 Subject: [docs] [issue16084] couple of code examples not highlighted in "What's new in Python 3" In-Reply-To: <1348924414.8.0.371561507125.issue16084@psf.upfronthosting.co.za> Message-ID: <1348975690.95.0.799098255436.issue16084@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Yes, I noticed that later, too. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 05:31:04 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Sep 2012 03:31:04 +0000 Subject: [docs] [issue16091] changing sidebar links in http://docs.python.org/ Message-ID: <1348975864.27.0.424310551967.issue16091@psf.upfronthosting.co.za> New submission from Ramchandra Apte: In http://docs.python.org/ the "Python 3.3 (in development)" link goes to the Python 3.4 docs. It should be renamed to "Python 3.3". A new link should be added for the Python 3.4 docs and the Python 3.2 link may be removed. ---------- assignee: docs at python components: Documentation messages: 171609 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: changing sidebar links in http://docs.python.org/ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 07:53:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 30 Sep 2012 05:53:51 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1348984431.84.0.00292351488034.issue15533@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Chris, please commit your patch. It's fine for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 07:55:33 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 30 Sep 2012 05:55:33 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1348984533.93.0.127587802736.issue15533@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: docs at python -> chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 08:06:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 30 Sep 2012 06:06:56 +0000 Subject: [docs] [issue16036] simplify int() signature docs In-Reply-To: <1348568310.1.0.968219969881.issue16036@psf.upfronthosting.co.za> Message-ID: <1348985216.39.0.371642403577.issue16036@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching patch updated for backport to 2.7. In cases where the 2.7 language was substantively different, I preserved the 2.7 language (e.g. I preserved the reference to plain and long integers). I also added the lone "0" prefix for octals, which is a difference from 3.x: ``0o``/``0O``/``0``. ---------- Added file: http://bugs.python.org/file27351/issue-16036-5-27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 08:56:13 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 30 Sep 2012 06:56:13 +0000 Subject: [docs] [issue16090] but is needed somewhere in http://www.python.org/dev/peps/pep-3138/ In-Reply-To: <1348975400.05.0.784015887596.issue16090@psf.upfronthosting.co.za> Message-ID: <1348988173.8.0.622214647382.issue16090@psf.upfronthosting.co.za> Georg Brandl added the comment: I've gone through the PEP; I've found a few typos and fixed them, but no missing "but". Sorry, but without a more specific location I don't think it's sensible to keep this open. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 09:00:34 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 30 Sep 2012 07:00:34 +0000 Subject: [docs] [issue16093] Documentation: links to 3.3 Message-ID: <1348988434.58.0.811959538249.issue16093@psf.upfronthosting.co.za> New submission from Stefan Krah: A couple of links still need to be updated: http://docs.python.org/ Python 3.3 says "in development" and points to 3.4. http://docs.python.org/dev/ Python 3.3 is missing. ---------- assignee: docs at python components: Documentation messages: 171615 nosy: docs at python, skrah priority: normal severity: normal status: open title: Documentation: links to 3.3 type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 09:00:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Sep 2012 07:00:42 +0000 Subject: [docs] [issue16091] changing sidebar links in http://docs.python.org/ In-Reply-To: <1348975864.27.0.424310551967.issue16091@psf.upfronthosting.co.za> Message-ID: <3XTyFQ1wBWzNmk@mail.python.org> Roundup Robot added the comment: New changeset eac9a50a2bdd by Georg Brandl in branch 'default': Closes #16091: fix the references to 3.3/3.4 in the Doc sidebar. http://hg.python.org/cpython/rev/eac9a50a2bdd ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 09:01:15 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 30 Sep 2012 07:01:15 +0000 Subject: [docs] [issue16093] Documentation: links to 3.3 In-Reply-To: <1348988434.58.0.811959538249.issue16093@psf.upfronthosting.co.za> Message-ID: <1348988475.81.0.261645814747.issue16093@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: open -> closed superseder: -> changing sidebar links in http://docs.python.org/ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 11:24:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Sep 2012 09:24:38 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <3XV1RT5Vs6zNBr@mail.python.org> Roundup Robot added the comment: New changeset abfaa4368263 by Chris Jerdonek in branch '3.2': Issue #15533: Clarify docs and add tests for subprocess.Popen()'s cwd argument. http://hg.python.org/cpython/rev/abfaa4368263 New changeset f66ff96f0030 by Chris Jerdonek in branch '3.3': Issue #15533: Merge fix from 3.2. http://hg.python.org/cpython/rev/f66ff96f0030 New changeset 37f4aa15a1c6 by Chris Jerdonek in branch 'default': Issue #15533: Merge fix from 3.3. http://hg.python.org/cpython/rev/37f4aa15a1c6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 11:26:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 30 Sep 2012 09:26:32 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1348997192.52.0.891645211181.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I will commit to 2.7 separately. ---------- versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 12:03:04 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 30 Sep 2012 10:03:04 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1348999384.48.0.2788643948.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Two of the tests fail on at least some of the Windows bots. I am investigating. ====================================================================== ERROR: test_cwd_with_relative_arg (test.test_subprocess.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\Buildslave\3.2.moore-windows\build\lib\test\test_subprocess.py", line 222, in test_cwd_with_relative_arg self._assert_cwd(python_dir, rel_python, cwd=python_dir) File "D:\Buildslave\3.2.moore-windows\build\lib\test\test_subprocess.py", line 195, in _assert_cwd **kwargs) File "D:\Buildslave\3.2.moore-windows\build\lib\subprocess.py", line 745, in __init__ restore_signals, start_new_session) File "D:\Buildslave\3.2.moore-windows\build\lib\subprocess.py", line 964, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified ====================================================================== ERROR: test_cwd_with_relative_executable (test.test_subprocess.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\Buildslave\3.2.moore-windows\build\lib\test\test_subprocess.py", line 240, in test_cwd_with_relative_executable cwd=python_dir) File "D:\Buildslave\3.2.moore-windows\build\lib\test\test_subprocess.py", line 195, in _assert_cwd **kwargs) File "D:\Buildslave\3.2.moore-windows\build\lib\subprocess.py", line 745, in __init__ restore_signals, start_new_session) File "D:\Buildslave\3.2.moore-windows\build\lib\subprocess.py", line 964, in _execute_child startupinfo) WindowsError: [Error 2] The system cannot find the file specified http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.2/builds/210 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 14:37:14 2012 From: report at bugs.python.org (mani and ram) Date: Sun, 30 Sep 2012 12:37:14 +0000 Subject: [docs] [issue16090] but is needed somewhere in http://www.python.org/dev/peps/pep-3138/ In-Reply-To: <1348988173.8.0.622214647382.issue16090@psf.upfronthosting.co.za> Message-ID: mani and ram added the comment: When I find it I will open it. On 30 September 2012 12:26, Georg Brandl wrote: > > Georg Brandl added the comment: > > I've gone through the PEP; I've found a few typos and fixed them, but no > missing "but". Sorry, but without a more specific location I don't think > it's sensible to keep this open. > > ---------- > nosy: +georg.brandl > resolution: -> fixed > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- nosy: +maniandram _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 14:46:57 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Sep 2012 12:46:57 +0000 Subject: [docs] [issue16090] but is needed somewhere in http://www.python.org/dev/peps/pep-3138/ In-Reply-To: <1348975400.05.0.784015887596.issue16090@psf.upfronthosting.co.za> Message-ID: <1349009217.1.0.0852244923062.issue16090@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Somehow my name is displayed as "mani and ram" when replying by email (I changed my email name from that to "Ramchandra Apte") Just so that you know that "mani and ram" is the same person as "Ramchandra Apte" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 14:47:48 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Sep 2012 12:47:48 +0000 Subject: [docs] [issue16090] but is needed somewhere in http://www.python.org/dev/peps/pep-3138/ In-Reply-To: <1348975400.05.0.784015887596.issue16090@psf.upfronthosting.co.za> Message-ID: <1349009268.48.0.573901548466.issue16090@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- resolution: fixed -> postponed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 17:44:10 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 30 Sep 2012 15:44:10 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349019850.85.0.902773911796.issue9650@psf.upfronthosting.co.za> Mike Hoy added the comment: Changed docstring for timemodule.c to include format codes listed here: http://bugs.python.org/msg169193 ---------- keywords: +patch Added file: http://bugs.python.org/file27358/issue9650-format-codes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 18:15:02 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 30 Sep 2012 16:15:02 +0000 Subject: [docs] [issue14503] docs: "yield from" breaks Pygments syntax coloring in doc examples In-Reply-To: <1333613053.66.0.675522025893.issue14503@psf.upfronthosting.co.za> Message-ID: <1349021702.05.0.438159750594.issue14503@psf.upfronthosting.co.za> Georg Brandl added the comment: I've updated the version of Pygments used by 3.3 and 3.4 branches, which fixes this and the "raise from" issue. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed versions: +Python 3.4 -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 18:15:45 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 30 Sep 2012 16:15:45 +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: <1349021745.64.0.0208580427666.issue13801@psf.upfronthosting.co.za> Georg Brandl added the comment: Pygments is now updated to 1.5pre. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 18:33:08 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 30 Sep 2012 16:33:08 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1349022788.8.0.209925444879.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: So it seems the cwd argument to Popen() currently works differently on Windows from Mac OS X. For example, the following doesn't work on Windows (but does on Mac). Windows doesn't look for arg0 relative to arg_cwd: def test_cwd(arg0, arg_cwd): os.chdir('foo') # Make sure we're in a different directory from arg0. p = subprocess.Popen([arg0, "-c", "import os, sys; " "sys.stdout.write(os.getcwd()); " "sys.exit(47)"], stdout=subprocess.PIPE, cwd=arg_cwd) p.wait() print("stdout: " + p.stdout.read().decode("utf-8")) print("return_code: %s" % p.returncode) python_path = os.path.realpath(sys.executable) python_dir, python_base = os.path.split(python_path) rel_python = os.path.join(os.curdir, python_base) # Raises: WindowsError: [Error 2] The system cannot find the file specified test_cwd(rel_python, python_dir) I'm going to mark the two tests as "skipped" on Windows pending a resolution. ---------- keywords: -easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 18:46:13 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 30 Sep 2012 16:46:13 +0000 Subject: [docs] [issue16082] xml.etree.ElementTree.tostringlist does conform to it's documentation In-Reply-To: <1348829487.02.0.837389148596.issue16082@psf.upfronthosting.co.za> Message-ID: <1349023573.1.0.424749176834.issue16082@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 18:49:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Sep 2012 16:49:14 +0000 Subject: [docs] [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <3XVCJT04XVzMtd@mail.python.org> Roundup Robot added the comment: New changeset d8d52b5b4bc2 by Chris Jerdonek in branch '3.2': Issue #15533: Skip test_cwd_with_relative_*() tests on Windows pending resolution of issue. http://hg.python.org/cpython/rev/d8d52b5b4bc2 New changeset 17d709f0b69b by Chris Jerdonek in branch '3.3': Issue #15533: Merge update from 3.2. http://hg.python.org/cpython/rev/17d709f0b69b New changeset d10a7c1ac3a7 by Chris Jerdonek in branch 'default': Issue #15533: Merge update from 3.3. http://hg.python.org/cpython/rev/d10a7c1ac3a7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 19:07:28 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 30 Sep 2012 17:07:28 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349024848.89.0.210026289.issue9650@psf.upfronthosting.co.za> Ezio Melotti added the comment: The patch contains non-ascii apostrophes: s/Locale?s/Locale's/ ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 19:20:12 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 30 Sep 2012 17:20:12 +0000 Subject: [docs] [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <1349025611.93.0.415251351026.issue14783@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The change for issue 15831 contains a number of places where a single signature line was converted to multiple -- but in the docs and not the docstrings. Those instances can also be examined for this issue. The signature line for str() was not updated in that patch, however. ---------- stage: commit review -> needs patch versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 21:04:20 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 30 Sep 2012 19:04:20 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349031860.83.0.976353016194.issue9650@psf.upfronthosting.co.za> Mike Hoy added the comment: Updated patch as per Ezio's comment. ---------- Added file: http://bugs.python.org/file27364/issue9650-format-codes_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 21:30:40 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 30 Sep 2012 19:30: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: <1349033440.04.0.51852383154.issue14783@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > So (a) there is precedent for multiple signatures in docstrings For the record, this is also true of 2.7: http://hg.python.org/cpython/file/15fd0b4496e0/Objects/bytearrayobject.c#l2870 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 23:00:11 2012 From: report at bugs.python.org (Chris Rebert) Date: Sun, 30 Sep 2012 21:00:11 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349038811.52.0.234832639568.issue9650@psf.upfronthosting.co.za> Chris Rebert added the comment: I'm going to bikeshed and again suggest that %I and %p be included for handling 12-hour clock times. Also, the patch seems to only be for strftime(), and not strptime(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Sep 30 23:44:27 2012 From: report at bugs.python.org (Mike Hoy) Date: Sun, 30 Sep 2012 21:44:27 +0000 Subject: [docs] [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1349041467.26.0.249541242267.issue9650@psf.upfronthosting.co.za> Mike Hoy added the comment: New patch includes time.strptime and the additional changes suggested by Chris Rebert. ---------- Added file: http://bugs.python.org/file27365/issue9650-format-codes_v3.diff _______________________________________ Python tracker _______________________________________ From winston at cs.wisc.edu Thu Sep 27 18:43:55 2012 From: winston at cs.wisc.edu (Winston Chuen-Shih Yang) Date: Thu, 27 Sep 2012 12:43:55 -0400 Subject: [docs] suggestion about Python 3.2.3 online documentation about regular expressions Message-ID: <5064824B.2010307@cs.wisc.edu> See the following page: http://docs.python.org/py3k/library/re.html 6.2.3. Regular Expression Objects regex.search regex.match regex.split : : Suggestion: change "regex" to "pattern". Reason 1: The object is a "Pattern" (_sre.SRE_Pattern). Reason 2: People might confuse "regex" with "re", which is the name of the module. Reason 3: People might think that there is a "regex" class somewhere. (Is there?) Winston From anthony.petrillo at gmail.com Fri Sep 28 18:12:06 2012 From: anthony.petrillo at gmail.com (Anthony Petrillo) Date: Fri, 28 Sep 2012 12:12:06 -0400 Subject: [docs] download problem In-Reply-To: References: Message-ID: Thanks Chris, I found them here - see my cursor in the image. [image: Inline image 1] Anthony On Thu, Sep 27, 2012 at 10:53 PM, Chris Jerdonek wrote: > > Date: Fri, 7 Sep 2012 15:39:52 -0400 > > From: Anthony Petrillo > > Subject: [docs] download problem > > > > The download links on > > http://www.python.org/~gbrandl/build/html/download.html are not working. > > Would you be able to help me? > > Hi Anthony, does this link for you instead? > > http://docs.python.org/dev/download.html > > Also, where did you come across the above URL? > > Thanks, > --Chris > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot-9.png Type: image/png Size: 232742 bytes Desc: not available URL: From anthony.petrillo at gmail.com Fri Sep 28 18:14:11 2012 From: anthony.petrillo at gmail.com (Anthony Petrillo) Date: Fri, 28 Sep 2012 12:14:11 -0400 Subject: [docs] download problem In-Reply-To: References: Message-ID: Thanks Berker. Note, Chris also answered my question. I'm impressed. To often, I never get answers on questions like this. Thank you both. Anthony On Fri, Sep 28, 2012 at 12:41 AM, Berker Peksa? wrote: > On Fri, Sep 7, 2012 at 10:39 PM, Anthony Petrillo > wrote: > > Greetings, > > > > The download links on > > http://www.python.org/~gbrandl/build/html/download.html are not working. > > Would you be able to help me? > > Hi Anthony, > > Here's the correct link: http://docs.python.org/dev/download.html > > --Berker > > > > > > > Anthony > > > > > > > > > > _______________________________________________ > > docs mailing list > > docs at python.org > > http://mail.python.org/mailman/listinfo/docs > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From prouleau.pers at gmail.com Sun Sep 30 00:11:25 2012 From: prouleau.pers at gmail.com (Pierre Rouleau) Date: Sat, 29 Sep 2012 18:11:25 -0400 Subject: [docs] Small typo error in the ip_address module introduction Message-ID: <98698282-19D4-462E-8BEC-8C8D1F0D8758@gmail.com> Hi all, I found the following typo error inside the ip_address module introduction (http://docs.python.org/dev/howto/ipaddress.html). Inside the Host Interfaces section there is the following example: >>> >>> ipaddress.ip_interface('192.0.2.1/24') IPv4Interface('192.0.2.1/24') >>> ipaddress.ip_network('2001:db8::1/96') IPv6Interface('2001:db8::1/96') the second statement should call the ip_interface method instead of the ip_network one. Otherwise, this tutorial is very well written! Thanks! Regards, ... Pierre Rouleau -------------- next part -------------- An HTML attachment was scrubbed... URL: From info at trattoriaallascala.com Sun Sep 30 10:04:04 2012 From: info at trattoriaallascala.com (Pierazzo Mara) Date: Sun, 30 Sep 2012 10:04:04 +0200 Subject: [docs] Problems with a unittest example and Python 3.3 Message-ID: <989973D3-9956-4343-84AB-0CE7F478FC3E@trattoriaallascala.com> I tried the very first example I found on the Python documentation at this address: http://docs.python.org/py3k/library/unittest.html#module-unittest import random import unittest class TestSequenceFunctions(unittest.TestCase): def setUp(self): self.seq = list(range(10)) def test_shuffle(self): # make sure the shuffled sequence does not lose any elements random.shuffle(self.seq) self.seq.sort() self.assertEqual(self.seq, list(range(10))) # should raise an exception for an immutable sequence self.assertRaises(TypeError, random.shuffle, (1,2,3)) def test_choice(self): element = random.choice(self.seq) self.assertTrue(element in self.seq) def test_sample(self): with self.assertRaises(ValueError): random.sample(self.seq, 20) for element in random.sample(self.seq, 5): self.assertTrue(element in self.seq) if __name__ == '__main__': unittest.main() On Python 2.7.1 this example used to work, as I was getting back this result: > Ran 3 tests in 0.001s > > OK but when I run this code on Python 3.3 I'm getting this error: Traceback (most recent call last): File "/Users/[USERNAME]/Desktop/prova.py", line 29, in unittest.main() File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/unittest/main.py", line 125, in __init__ self.runTests() File "/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/unittest/main.py", line 263, in runTests sys.exit(not self.result.wasSuccessful()) SystemExit: False From josh.helzer at gmail.com Sun Sep 30 11:28:16 2012 From: josh.helzer at gmail.com (Josh Helzer) Date: Sun, 30 Sep 2012 04:28:16 -0500 Subject: [docs] Typo in /reference/datamodel.html Message-ID: In http://docs.python.org/release/3.2.3/reference/datamodel.html#the-standard-type-hierarchyunder the description of Bytes sequence type: A bytes object is an immutable array. The items are 8-bit bytes, represented by integers in the range 0 <= x < 256. Bytes literals (like b'abc' and the built-in function bytes() can be used to construct bytes objects. Also, bytes objects can be decoded to strings via the decode() method. Missing closing parenthesis (or rewrite or whatever): A bytes object is an immutable array. The items are 8-bit bytes, represented by integers in the range 0 <= x < 256. Bytes literals (like b'abc'*)* and the built-in function bytes() can be used to construct bytes objects. Also, bytes objects can be decoded to strings via the decode() method. Saw this in 3.2.3, but it also seems to still exist in 3.4.0a0 docs. -------------- next part -------------- An HTML attachment was scrubbed... URL: