From report at bugs.python.org Sun Feb 1 05:38:23 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 01 Feb 2015 04:38:23 +0000 Subject: [docs] [issue15608] Improve socketserver doc In-Reply-To: <1344541466.79.0.410789330017.issue15608@psf.upfronthosting.co.za> Message-ID: <1422765502.59.0.00176460897415.issue15608@psf.upfronthosting.co.za> Martin Panter added the comment: Here is an attempt to tidy up the socketserver documentation: 1. Added headings for each concrete class and mixin 2. Listed the predefined mixin subclasses 3. Changed RequestHandler to BaseRequestHandler and added class heading 4. Included headings for UnixStream/DatagramServer Other fixes: * Fixed many class and method cross references * Pulled out Stream/DatagramRequestHandler definitions * Reordered the request handler setup(), handle(), finish() methods ---------- keywords: +patch Added file: http://bugs.python.org/file37950/socketserver-doc.patch _______________________________________ Python tracker _______________________________________ From berker.peksag at gmail.com Sun Feb 1 06:02:05 2015 From: berker.peksag at gmail.com (berker.peksag at gmail.com) Date: Sun, 01 Feb 2015 05:02:05 -0000 Subject: [docs] Improve socketserver doc (issue 15608) Message-ID: <20150201050205.11186.51408@psf.upfronthosting.co.za> http://bugs.python.org/review/15608/diff/13802/Doc/library/socketserver.rst File Doc/library/socketserver.rst (right): http://bugs.python.org/review/15608/diff/13802/Doc/library/socketserver.rst#newcode16 Doc/library/socketserver.rst:16: .. class:: TCPServer Could you please document its constructor, too? http://bugs.python.org/review/15608/diff/13802/Doc/library/socketserver.rst#newcode36 Doc/library/socketserver.rst:36: For more details on network programming, consult a book such as I'd remove this paragraph. http://bugs.python.org/review/15608/diff/13802/Doc/library/socketserver.rst#newcode104 Doc/library/socketserver.rst:104: class ThreadingUDPServer(ThreadingMixIn, UDPServer): pass class ThreadingUDPServer(ThreadingMixIn, UDPServer): pass http://bugs.python.org/review/15608/diff/13802/Doc/library/socketserver.rst#newcode112 Doc/library/socketserver.rst:112: ForkingUDPServer .. class:: ForkingTCPServer ForkingUDPServer ... http://bugs.python.org/review/15608/diff/13802/Doc/library/socketserver.rst#newcode353 Doc/library/socketserver.rst:353: .. method:: BaseRequestHandler.setup() Please indent this and rest of the method. That way you won't need to add "RequestHandler." to method names: .. class:: BaseRequestHandler [...] .. method:: setup() [...] http://bugs.python.org/review/15608/ From report at bugs.python.org Sun Feb 1 06:02:24 2015 From: report at bugs.python.org (Berker Peksag) Date: Sun, 01 Feb 2015 05:02:24 +0000 Subject: [docs] [issue15608] Improve socketserver doc In-Reply-To: <1344541466.79.0.410789330017.issue15608@psf.upfronthosting.co.za> Message-ID: <1422766944.16.0.0262494702373.issue15608@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> patch review type: -> enhancement versions: +Python 3.4, Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 12:36:19 2015 From: report at bugs.python.org (Stefan Krah) Date: Sun, 01 Feb 2015 11:36:19 +0000 Subject: [docs] [issue23352] Document "suboffsets if needed" in 2.7 In-Reply-To: <1422581625.15.0.953074491863.issue23352@psf.upfronthosting.co.za> Message-ID: <1422790579.31.0.706699766376.issue23352@psf.upfronthosting.co.za> Stefan Krah added the comment: But only Cython does not set suboffsets to NULL and you already have a small patch to fix that. The Python 3 docs say "suboffsets only if needed" and the PEP says the same, so the situation is not completely undocumented. I think your doc patch goes too far. Buffers propagate in unpredictable ways, and since the original consumer request is *not stored* in the buffer, setting unneeded fields to NULL provides a way to figure out the original request. It is actually *an optimization* to set suboffsets to NULL: Compliant code that uses arbitrary buffers always has to check for: if (suboffsets != NULL && suboffsets[i] >= 0) ... If suboffsets are consistently NULL, at least hopefully you get branch prediction to kick in. As Sebastian pointed out, it's relatively easy even for slicing/indexing functions to check for all-negative suboffsets and handle that case. All this is probably academic, since no one appears to be using suboffsets at all. :) Let's keep the status-quo and make this a doc issue for 2.7. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python priority: normal -> low stage: patch review -> title: PyBuffer_IsContiguous() sometimes returns wrong result if suboffsets != NULL -> Document "suboffsets if needed" in 2.7 type: behavior -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 13:21:54 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 01 Feb 2015 12:21:54 +0000 Subject: [docs] [issue15608] Improve socketserver doc In-Reply-To: <1344541466.79.0.410789330017.issue15608@psf.upfronthosting.co.za> Message-ID: <1422793312.07.0.0804148027641.issue15608@psf.upfronthosting.co.za> Martin Panter added the comment: Main changes in socketserver-doc.2.patch: * Documented constructor parameters for the server classes * Indented class methods and attributes underneath class headings ---------- Added file: http://bugs.python.org/file37957/socketserver-doc.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 13:43:32 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 01 Feb 2015 12:43:32 +0000 Subject: [docs] [issue23360] Content-Type when sending data with urlopen() Message-ID: <1422794612.5.0.505084736818.issue23360@psf.upfronthosting.co.za> New submission from Martin Panter: Currently the documentation gives the impression that the ?data? parameter to Request() has to be in the application/x-www-form-urlencoded format. However I suspect that you can override the type by supplying a Content-Type header, and I would like to document this; see uploaded patch. I noticed that test_urllib2.HandlerTests.test_http() already seems to test the default Content-Type and a custom Content-Type with a Request() object, although I did not see a test for the default Content-Type when supplying ?data? directly to urlopen(). Also I understand the ?charset? parameter on application/x-www-form-urlencoded is not standardized. Would it correspond to the encoding of the %XX codes from urlencode(), which is typically UTF-8, not Latin-1? Or would it correspond to the subsequent string-to-bytes encoding stage, which could just be ASCII since non-ASCII characters are already encoded? Maybe it would be best to drop the advice to set a ?charset? parameter. It was added for Issue 11082. ---------- assignee: docs at python components: Documentation files: non-urlencoded.patch keywords: patch messages: 235166 nosy: docs at python, vadmium priority: normal severity: normal status: open title: Content-Type when sending data with urlopen() versions: Python 3.4 Added file: http://bugs.python.org/file37959/non-urlencoded.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 1 19:50:57 2015 From: report at bugs.python.org (Roundup Robot) Date: Sun, 01 Feb 2015 18:50:57 +0000 Subject: [docs] [issue23352] Document "suboffsets if needed" in 2.7 In-Reply-To: <1422581625.15.0.953074491863.issue23352@psf.upfronthosting.co.za> Message-ID: <20150201185054.106379.39849@psf.io> Roundup Robot added the comment: New changeset c4c1d68b6301 by Stefan Krah in branch '2.7': Issue #23352: Document that Py_buffer.suboffsets must be NULL if no suboffsets https://hg.python.org/cpython/rev/c4c1d68b6301 New changeset de5c8ee002bf by Stefan Krah in branch '3.4': Issue #23352: Document that Py_buffer.suboffsets must be NULL if no suboffsets https://hg.python.org/cpython/rev/de5c8ee002bf New changeset 5d097a74766f by Stefan Krah in branch 'default': Issue #23352: Merge from 3.4. https://hg.python.org/cpython/rev/5d097a74766f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 03:18:22 2015 From: report at bugs.python.org (Martin Panter) Date: Mon, 02 Feb 2015 02:18:22 +0000 Subject: [docs] [issue23360] Content-Type when sending data with urlopen() In-Reply-To: <1422794612.5.0.505084736818.issue23360@psf.upfronthosting.co.za> Message-ID: <1422843502.34.0.136217197635.issue23360@psf.upfronthosting.co.za> Martin Panter added the comment: Updated patch to explain that a Request object is generated internally for urlopen(data=...), and added a test to confirm. Also removed some confusing dead code. ---------- Added file: http://bugs.python.org/file37972/non-urlencoded.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 03:55:48 2015 From: report at bugs.python.org (Berker Peksag) Date: Mon, 02 Feb 2015 02:55:48 +0000 Subject: [docs] [issue23254] Document how to close the TCPServer listening socket In-Reply-To: <1421469175.0.0.628748486385.issue23254@psf.upfronthosting.co.za> Message-ID: <1422845748.53.0.423823855303.issue23254@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 09:41:03 2015 From: report at bugs.python.org (Tim Golden) Date: Mon, 02 Feb 2015 08:41:03 +0000 Subject: [docs] [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> Message-ID: <1422866463.19.0.0689611129095.issue20709@psf.upfronthosting.co.za> Tim Golden added the comment: I think we should simply take out the example, ie the part in brackets. The statement remains true but I don't think we need to cast around for whichever OS / filesystem happens to implement this particular setup. ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 12:17:24 2015 From: report at bugs.python.org (Larry Hastings) Date: Mon, 02 Feb 2015 11:17:24 +0000 Subject: [docs] [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> Message-ID: <1422875844.88.0.507556108676.issue20709@psf.upfronthosting.co.za> Larry Hastings added the comment: I'm not sure we support 2.7 supports any versions of Windows earlier than XP. If so, we could drop the provision entirely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 13:52:30 2015 From: report at bugs.python.org (Martin Panter) Date: Mon, 02 Feb 2015 12:52:30 +0000 Subject: [docs] [issue13322] buffered read() and write() does not raise BlockingIOError In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1422881550.14.0.255323463545.issue13322@psf.upfronthosting.co.za> Martin Panter added the comment: Looking at test_io.BufferedReaderTest.test_read_non_blocking(), at Lib/test/test_io.py:1037, there are explicit tests for ?peek(1) == b"" ? and ?read() is None?. The peek() test was added in revision 3049ac17e256, in 2009 (large merge of ?io? implementation in C; can?t find more detailed history). The read() test was added in revision 21233c2e5d09 in 2007, with a remark about a ?tentative decision to drop nonblocking I/O support from the buffering layers?. My suggestion is to make the read/into/1/all/peek() methods all return None if no non-blocking data is available, and return a short non-empty result if some data was available but not enough to satisfy the equivalent blocking call. However, this would invove changing the behaviour of BufferedReader.read1() and peek(); would that be allowed? The readline() based methods could probably work similarly, but that would be another issue and a bigger change, because the equivalent RawIOBase methods do not return None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 14:53:30 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 13:53:30 +0000 Subject: [docs] [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> Message-ID: <1422885210.26.0.462721194618.issue20709@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: Windows is the only Python-supported platform where utime did not work for directories, ages ago, right? If that is the case, I support Larry Hastings' approach of removing the entire sentence: "Whether a directory can be given for path depends on whether the operating system implements directories as files (for example, *Windows does not*)" Agreed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 16:07:46 2015 From: report at bugs.python.org (Tim Golden) Date: Mon, 02 Feb 2015 15:07:46 +0000 Subject: [docs] [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1422885210.26.0.462721194618.issue20709@psf.upfronthosting.co.za> Message-ID: <54CF92BF.3000601@timgolden.me.uk> Tim Golden added the comment: Fine by me ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 16:19:03 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 15:19:03 +0000 Subject: [docs] [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> Message-ID: <1422890343.27.0.609522442512.issue20709@psf.upfronthosting.co.za> Changes by Jan-Philip Gehrcke : ---------- keywords: +patch Added file: http://bugs.python.org/file37979/issue20709_py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 16:20:15 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 15:20:15 +0000 Subject: [docs] [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> Message-ID: <1422890415.5.0.290211358905.issue20709@psf.upfronthosting.co.za> Changes by Jan-Philip Gehrcke : Added file: http://bugs.python.org/file37980/issue20709_tip.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 16:25:57 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 15:25:57 +0000 Subject: [docs] [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> Message-ID: <1422890757.83.0.543148057061.issue20709@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: I have added patches for the documentation, where I removed the sentence in question and re-wrapped the paragraph. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 17:27:58 2015 From: report at bugs.python.org (STINNER Victor) Date: Mon, 02 Feb 2015 16:27:58 +0000 Subject: [docs] [issue23254] Document how to close the TCPServer listening socket In-Reply-To: <1421469175.0.0.628748486385.issue23254@psf.upfronthosting.co.za> Message-ID: <1422894478.25.0.723905307867.issue23254@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 18:05:41 2015 From: report at bugs.python.org (Stefan Krah) Date: Mon, 02 Feb 2015 17:05:41 +0000 Subject: [docs] [issue23352] Document "suboffsets if needed" in 2.7 In-Reply-To: <1422581625.15.0.953074491863.issue23352@psf.upfronthosting.co.za> Message-ID: <1422896741.86.0.121187200783.issue23352@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:06:08 2015 From: report at bugs.python.org (Jonathan Sharpe) Date: Mon, 02 Feb 2015 18:06:08 +0000 Subject: [docs] [issue23379] Incorrect links within PEPs Message-ID: <1422900368.04.0.67258841473.issue23379@psf.upfronthosting.co.za> New submission from Jonathan Sharpe: For example, the link to PEP-340 in PEP-343 points to https://www.python.org/dev/peps/pep-0343/pep-0340.html rather than https://www.python.org/dev/peps/pep-0340/ and the link to PEP-288 from PEP-340 points to https://www.python.org/dev/peps/pep-0340/pep-0288.html rather than https://www.python.org/dev/peps/pep-0288/ ---------- assignee: docs at python components: Documentation messages: 235278 nosy: docs at python, jonrsharpe priority: normal severity: normal status: open title: Incorrect links within PEPs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 19:38:57 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 18:38:57 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422902337.27.0.383460579807.issue6634@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: For Python 2.7, we will not change behavior, even if unexpected. Instead, the sys.exit-docs should be adjusted and - warn about the fact that nothing is written to stderr if sys.exit(msg) gets called from a non-primary thread, and - note that SystemExit raised in a non-primary thread lets the thread exit silently. I have attached a corresponding patch, please review my wording! ---------- keywords: +patch Added file: http://bugs.python.org/file37983/issue6634_py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 20:56:36 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 19:56:36 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422906996.8.0.193075635068.issue6634@psf.upfronthosting.co.za> Changes by Jan-Philip Gehrcke : Removed file: http://bugs.python.org/file19006/thread_sys_exit_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:18:51 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 21:18:51 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422911930.89.0.181037740366.issue6634@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: For Python 3.5, I have attached a patch that - adds relevant test cases to test_threading.py which probe the interpreter's stderr output for compliance with what the docs state. - makes sys.exit(msg) write msg to stderr, even if called from a non-primary thread, so that the tests succeed. If we take this path, the documentation for 3.5 does not need to be adjusted. The discussion in this thread diversified itself a bit: > Why don't threads have their own ThreadExit exception, > rather than overloading the use, and therefore, the > meaning, of the SystemExit exception? sys.exit and the > SystemExit exception should *only* be used to exit the > entire system, not just a thread! While I absolutely agree that this would be conceptually cleaner, implementing this would be a larger refactoring task. Deciding whether this should be done or not slows this issue down, and I think this discussion should probably be taken elsewhere. ---------- versions: +Python 3.5 -Python 3.1, Python 3.2 Added file: http://bugs.python.org/file37986/issue6634_py35.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 22:29:55 2015 From: report at bugs.python.org (Martin Panter) Date: Mon, 02 Feb 2015 21:29:55 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422912595.08.0.381085415563.issue6634@psf.upfronthosting.co.za> Martin Panter added the comment: Regarding the documentation patch: I like to start sentences with a capital letter. Perhaps change it to start ?Calling :func:`exit` only terminates . . .?. With the code change patch, it might be neater to use the SystemExit.code attribute rather than e.args[0]. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:19:23 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 22:19:23 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422915563.25.0.05470807409.issue6634@psf.upfronthosting.co.za> Changes by Jan-Philip Gehrcke : Removed file: http://bugs.python.org/file37986/issue6634_py35.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:19:36 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 22:19:36 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422915576.01.0.0333416553484.issue6634@psf.upfronthosting.co.za> Changes by Jan-Philip Gehrcke : Added file: http://bugs.python.org/file37988/issue6634_py35.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:20:27 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 22:20:27 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422915627.54.0.41730158452.issue6634@psf.upfronthosting.co.za> Changes by Jan-Philip Gehrcke : Removed file: http://bugs.python.org/file37988/issue6634_py35.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:33:42 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 22:33:42 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422916422.22.0.0801048434624.issue6634@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: > Regarding the documentation patch: I like to start sentences > with a capital letter. Perhaps change it to start > ?Calling :func:`exit` only terminates . . .?. Thanks for feedback. Have now used "Invocation of ...." to not repeat "call*" in the sentence, because I left the "when called from the main thread" part unchanged. Okay? > With the code change patch, it might be neater to use > the SystemExit.code attribute rather than e.args[0]. Oh, thanks. Was not aware of the existence of the `code` attribute. If anyone else was wondering: existence and behavior are defined in Objects/exceptions.c via `static PyMemberDef SystemExit_members[]` and via `static int SystemExit_init()`. It is populated upon construction of a SystemExit instance: Py_CLEAR(self->code); if (size == 1) self->code = PyTuple_GET_ITEM(args, 0); else /* size > 1 */ self->code = args; Hence, the translation from arguments to exit code considers *all* arguments. I adjusted the patch to use the `code` attribute. ---------- Added file: http://bugs.python.org/file37989/issue6634_py35.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:33:59 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 22:33:59 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422916439.52.0.632628450254.issue6634@psf.upfronthosting.co.za> Changes by Jan-Philip Gehrcke : Removed file: http://bugs.python.org/file37983/issue6634_py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 2 23:34:13 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 02 Feb 2015 22:34:13 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422916453.03.0.891512963411.issue6634@psf.upfronthosting.co.za> Changes by Jan-Philip Gehrcke : Added file: http://bugs.python.org/file37990/issue6634_py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 01:49:49 2015 From: report at bugs.python.org (Martin Panter) Date: Tue, 03 Feb 2015 00:49:49 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422924589.82.0.325614407992.issue6634@psf.upfronthosting.co.za> Martin Panter added the comment: New patches look fine. BTW SystemExit.code is also documented at . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 08:17:44 2015 From: report at bugs.python.org (Martin Panter) Date: Tue, 03 Feb 2015 07:17:44 +0000 Subject: [docs] [issue13322] buffered read() and write() does not raise BlockingIOError In-Reply-To: <1320246535.71.0.465783773129.issue13322@psf.upfronthosting.co.za> Message-ID: <1422947863.46.0.636744684309.issue13322@psf.upfronthosting.co.za> Martin Panter added the comment: I?m adding nonblock-none.patch, which changes all the simple buffered read methods to return None when there is no non-blocking data available. I?d be interested to see if other people thought this was a sensible change. * Documented existing behaviour of C ?io? module buffered read(), readinto/1() returning None * io.BufferedIOBase.read() and io.FileIO.readall() doc strings already mention returning None * Removed false claims of buffered reads returning short for interactive streams, sockets and pipes * Fixed _pyio return values to match C ?io? module returning None * Fixed BufferedIOBase.readinto/1() implementation to handle read/1() returning None * Changed buffered read1() and peek() to return None ---------- Added file: http://bugs.python.org/file37995/nonblock-none.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 10:15:16 2015 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 03 Feb 2015 09:15:16 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422954916.09.0.460247636838.issue6634@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure what the doc patch achieves. It only states more verbosely what is already said in the current version. Also, warnings are really for important issues (such as security issues); using them too liberally is a disservice to the reader. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 11:36:14 2015 From: report at bugs.python.org (Berker Peksag) Date: Tue, 03 Feb 2015 10:36:14 +0000 Subject: [docs] [issue23379] Incorrect links within PEPs In-Reply-To: <1422900368.04.0.67258841473.issue23379@psf.upfronthosting.co.za> Message-ID: <1422959774.77.0.841528013597.issue23379@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the report, Jonathan. This is a website issue, so I've created a new issue on GitHub: https://github.com/python/pythondotorg/issues/561 ---------- nosy: +berker.peksag resolution: -> third party stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 3 15:00:58 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Tue, 03 Feb 2015 14:00:58 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1422972058.57.0.803527365609.issue6634@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: Thanks for your feedback Antoine. > I'm not sure what the doc patch achieves. Let me try to bring things in order. It should achieve two things: 1. Properly describe the stderr-writing behavior of sys.exit(). =============================================================== Current 2.7 docs: "..., and any other object is printed to stderr". This is wrong in its generality and requires clarification. Agreed? How would you improve the docs in this regard? This is the reasoning I had in mind: We could change the original sentence, but IMO it then contains too many pieces of important information and becomes difficult to digest, e.g.: "If another type of object is passed, None is equivalent to passing zero, and any other object is printed to stderr (only when called in the main thread) and results in an exit code of 1.". Difficult, right? I thought about removing the stderr part from this sentence and discussing this topic separately, in simpler sentences. But: I think the stderr part needs to stay in the original sentence, because it clarifies how different argument types are dealt with. Then I took another point of view: we have acknowledged that the behavior is problematic, we just cannot change it anymore for 2.7. The direct consequence from this point of view is to warn about current behavior. 6 years ago, I took the docs literally and relied on getting proper error messages printed to stderr. And I didn't get those. I would have appreciated a warning, I guess. With this being said, I'd love to look at an alternative proposal of how we could change the docs in this regard. 2. Clarify that when called from a thread, the thread exits silently ==================================================================== Current 2.7 docs: "Since exit ultimately "only" raises an exception, it will only exit the process when called from the main thread." This sentence is problematic. It relates a cause to an effect, and this relation is wrong or at least incomplete. The only valuable information left in the sentence is the *effect*, without providing an explanation. I would rather want to take the inverse approach, and explain the *cause* as correct as possible. In other words: the above sentence misses to explain what actually happens when sys.exit() is called in a non-primary thread. The actual behavior and cause for mentioned effect is, as far as I am aware: If raised in a non-primary thread, SystemExit is caught automatically and causes the calling thread to exit silently. This is what I added as a note. And I think that we agree that this cause may have many effects, whereas only one of them is that sys.exit() called from a non-primary thread can not terminate the process. > It only states more verbosely what is already > said in the current version. I hope to have convinced you that this is not true. > Also, warnings are really for important issues > (such as security issues); using them too liberally > is a disservice to the reader. I agree. I really think that both points need to be addressed in the docs, and I have now clarified my reasoning, but am very open to further suggestions. And I really do not want to make a strong point about whether things should end up in red or blue boxes :-). ---------- _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Tue Feb 3 15:19:35 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:19:35 +0000 Subject: [docs] Link to Python 2.7.9rc1 documentation dead In-Reply-To: <20141211.002941.1214713056956668029.hckiang@riseup.net> References: <20141211.002941.1214713056956668029.hckiang@riseup.net> Message-ID: Hello Haochi, thanks for your email. On Wed, Dec 10, 2014 at 4:29 PM, wrote: > The links to documentations here is dead: > > https://docs.python.org/2/download.html > > Please update it, and thanks for your kind work. :-) this just to let you know that now those links appear to work correctly Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:20:45 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:20:45 +0000 Subject: [docs] (no subject) In-Reply-To: References: Message-ID: Hello Samuel, thanks for your email. On Wed, Dec 10, 2014 at 5:08 PM, samuel eewewew wrote: > I can not download the documentation, have some alternate link: > > https://docs.python.org/2/archives/python-2.7.9rc1-docs-pdf-letter.zip now the links at https://docs.python.org/2/download.html works correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:21:41 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:21:41 +0000 Subject: [docs] Problem with link In-Reply-To: References: Message-ID: Hello Lucivaldo, thanks for your email. On Wed, Dec 10, 2014 at 9:53 PM, Lucivaldo Castro wrote: > Have a problem with the link that target to page of the downloads of the > documentation of the latest version of the release of the Python 2.7.x. now the links at https://docs.python.org/2/download.html works correctly Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:22:38 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:22:38 +0000 Subject: [docs] Download Python 2.7.9rc1 Documentation In-Reply-To: References: Message-ID: Hello Mathias, thanks for your email On Wed, Dec 10, 2014 at 3:14 PM, Mathias Kemmler wrote: > I just tried to download the documentation for python, but got a 404 error > when I tried to download the zip file. After a quick try it seems as if non > of the files are accessible. Any chance this could be corrected in the near > future? the links at https://docs.python.org/2/download.html are now working correclty Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:27:48 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:27:48 +0000 Subject: [docs] 2.7.9rc1 Doc Links 404'ing In-Reply-To: References: Message-ID: Hello Jake, thanks for your email On Tue, Dec 9, 2014 at 1:26 AM, Jake Fenton wrote: > Hello! I was recently trying to download the full docs for the 2.7 release > (I will be off the grid for a bit) and found that all the download links for > the current release are 404-ing. > > The relevant page is here: https://docs.python.org/2.7/download.html the links at https://docs.python.org/2/download.html are now working correctly Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:28:53 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:28:53 +0000 Subject: [docs] Documentation In-Reply-To: References: Message-ID: Hello Petros, thanks for your email. On Tue, Dec 9, 2014 at 8:16 PM, Petros wrote: > https://docs.python.org/2/archives/python-2.7.9rc1-docs-pdf-a4.zip > > fails to work 404 etc. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:29:22 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:29:22 +0000 Subject: [docs] download links are not working In-Reply-To: References: Message-ID: Hello Deva, thanks for your email. On Tue, Dec 9, 2014 at 7:31 PM, deva seetharam wrote: > none of the links on the docs download page > (https://docs.python.org/2.7/download.html) are working. pls. help. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:30:08 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:30:08 +0000 Subject: [docs] docs can not be downloaded In-Reply-To: References: Message-ID: Hello Noha, thanks for your email. On Wed, Dec 10, 2014 at 9:02 AM, Noha H wrote: > all the links for documentation download is broken. 404 error is given > thank you > https://docs.python.org/2/download.html the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:30:51 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:30:51 +0000 Subject: [docs] Regarding Broken link of Python-2.7.9rc1 documentation. In-Reply-To: References: Message-ID: Hello Jaysinh, thanks for your email. On Tue, Dec 9, 2014 at 12:28 PM, Jaysinh shukla wrote: > Recently I was trying to download documentation of "Python-2.7.9rc1" > from this page. I found non of the downloading links available on the page > are working. They all throws "404 - Not Found". Requesting to update it > accordingly. Thanking you. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:31:32 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:31:32 +0000 Subject: [docs] Download Python 2.7.9rc1 Documentation In-Reply-To: <54877991.3040302@gmail.com> References: <54877991.3040302@gmail.com> Message-ID: Hello, thanks for your email. On Tue, Dec 9, 2014 at 10:37 PM, drc wrote: > I was unable to download the documents for 2.7.9rcl. Click on any of the > files and a page appears with "404 Not Found" the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:32:36 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:32:36 +0000 Subject: [docs] Broken links on Python 2.7.9rc1 offline documentation In-Reply-To: <5485a533.ca08980a.1da3.fffff7f2@mx.google.com> References: <5485a533.ca08980a.1da3.fffff7f2@mx.google.com> Message-ID: Hello, thanks for your email. On Mon, Dec 8, 2014 at 1:16 PM, wrote: > Hi! > > I?m trying to download Python docs ( > https://docs.python.org/2/download.html), but links seems to be broken. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:33:00 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:33:00 +0000 Subject: [docs] python2.7 docs download In-Reply-To: References: Message-ID: Hello, thanks for your email. On Tue, Dec 9, 2014 at 1:32 PM, S?? ???? <1670009590 at qq.com> wrote: > Hi, I wanna download python2.7 docs, but all links are 404. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:33:34 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:33:34 +0000 Subject: [docs] Download: 404 Not Found In-Reply-To: References: Message-ID: Hello Katherine, thanks for your email. On Thu, Dec 4, 2014 at 10:08 PM, archarachne wrote: > When trying to download the docs from > https://docs.python.org/2/download.html I get 404 for every file I choose. > Is it temporary? the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:34:01 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:34:01 +0000 Subject: [docs] Download links not working for documentation of 2.7. In-Reply-To: References: Message-ID: Hello Doruk, thanks for your email. On Thu, Dec 4, 2014 at 9:20 PM, Doruk Turak wrote: > Title sums it all up. 404 not found. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:34:30 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:34:30 +0000 Subject: [docs] Docs for 2.7.9 In-Reply-To: References: Message-ID: Hello Glenn, thanks for your email. On Wed, Dec 3, 2014 at 10:28 AM, Glenn Reynolds wrote: > All PDF and HTML links (A4/Letter, zip/bz2)are giving me 404s. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:48:07 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:48:07 +0000 Subject: [docs] Broken Documenation Download Link In-Reply-To: References: Message-ID: Hello, thanks for your email. On Sat, Dec 6, 2014 at 9:42 AM, curious cat wrote: > Seems like this link is not working..none of the other links as well. Is there any other way I can download the documentation? the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:48:40 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:48:40 +0000 Subject: [docs] Download Python Docs 2.7 In-Reply-To: <54814286.7040300@gmail.com> References: <54814286.7040300@gmail.com> Message-ID: Hello James, thanks for your email. On Fri, Dec 5, 2014 at 5:28 AM, James Warren wrote: > I was attempting to download the Docs for 2.7 but all the files seem to be > missing. Just a heads up! Link to one of the missing files: the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:49:30 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:49:30 +0000 Subject: [docs] Re Python documentation 2.7 In-Reply-To: References: Message-ID: Hello Paula, thanks for your email. On Tue, Dec 2, 2014 at 2:42 PM, Paula Weir wrote: > I have been trying to download the python documentation zip for 2.7 and I > get a 404 error. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:50:13 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:50:13 +0000 Subject: [docs] Python documentation download error In-Reply-To: References: Message-ID: Hello Harry, thanks for your email. On Tue, Dec 2, 2014 at 8:09 AM, harry newton wrote: > Recently, I have decided to download some of your python documentation for > 2.7.9rc1 and the browser gives me an error saying "404 not found" and under > that saying "nginx". hope your can fix this. I have attached a file to let > you know what it looks like. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:51:20 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:51:20 +0000 Subject: [docs] cannot download any format of 2.7.9rc1 In-Reply-To: References: Message-ID: Hello Yanyan, thanks for your email. On Sat, Nov 29, 2014 at 8:35 PM, Yanyan Ding wrote: > not sure if it's my own problem, I've tried both Chrome and IE, all links of > all format in this page: > https://docs.python.org/2/download.html > showing ?404 Not Found? > cannot be downloaded, apparently I could just use online doc. > hope get it fixed? the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:51:50 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:51:50 +0000 Subject: [docs] dead links In-Reply-To: References: Message-ID: Hello Andrea, thanks for your email. On Sat, Nov 29, 2014 at 1:59 AM, Andrea Grooms wrote: > On Download Python 2.7.9rc1 Documentation page the download links are dead > and the 3.x pages seem to work. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:52:12 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:52:12 +0000 Subject: [docs] 404 In-Reply-To: References: Message-ID: Hello Raul, thanks for your email. On Sun, Nov 30, 2014 at 3:07 PM, Raul Martinez wrote: > When trying to download the documentation pdf file i get a 404 error the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:47:22 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:47:22 +0000 Subject: [docs] Doc files not found In-Reply-To: References: Message-ID: Hello Christine, thanks for your email. On Sat, Dec 6, 2014 at 8:52 PM, Christine Fong wrote: > I wanted to download documentation files for Python 2 (here), but found that the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 16:48:51 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 15:48:51 +0000 Subject: [docs] Possible Bug? In-Reply-To: <1418697853.31340.YahooMailNeo@web141502.mail.bf1.yahoo.com> References: <1418697853.31340.YahooMailNeo@web141502.mail.bf1.yahoo.com> Message-ID: Hello, On Tue, Dec 16, 2014 at 2:44 AM, MinFatt Chai wrote: > 7781.50 - 7777.77 not getting 3.73 But 3.7299999999995634 This is not the appropriate mailing list for such question (as this ml is about documentation) but you might still want to give a read to: http://www.validlab.com/goldberg/paper.pdf Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:27:10 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:27:10 +0000 Subject: [docs] Links for download docs for 2.7.9rc1 are 404 In-Reply-To: <991114902.6524172.1417163967850.JavaMail.zimbra@redhat.com> References: <877275565.6524004.1417163930271.JavaMail.zimbra@redhat.com> <991114902.6524172.1417163967850.JavaMail.zimbra@redhat.com> Message-ID: Hello Rohan, thanks for your email. On Fri, Nov 28, 2014 at 8:39 AM, Rohan Kanade wrote: > The links for https://docs.python.org/2/download.html "Download Python 2.7.9rc1 Documentation" are all not found 404. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:27:34 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:27:34 +0000 Subject: [docs] Response "404" when download python 2.7 documents In-Reply-To: References: Message-ID: Hello Brian, thanks for your email. On Fri, Nov 28, 2014 at 9:28 AM, StarseeKEr <86890288 at qq.com> wrote: > Cant't download python 2.7 documents from > https://docs.python.org/2/download.html > > Response 404. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:27:59 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:27:59 +0000 Subject: [docs] Python docs - downloads not found 404 In-Reply-To: <1417033966.50410.YahooMailBasic@web171401.mail.ir2.yahoo.com> References: <1417033966.50410.YahooMailBasic@web171401.mail.ir2.yahoo.com> Message-ID: Hello Graham, thanks for your email. On Wed, Nov 26, 2014 at 8:32 PM, Graham wrote: > I've just tried to download the latest Python 2 docs from > https://docs.python.org/2/download.html > > but they all seem to respond with a 404, at about 20:30GMT. > I do note that it says they were updated today the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:28:36 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:28:36 +0000 Subject: [docs] broken links In-Reply-To: <54760D0D.9030700@dbf.gov.pf> References: <54760D0D.9030700@dbf.gov.pf> Message-ID: Hello James, thanks for your email. 2014-11-26 17:25 GMT+00:00 TCHEOU-KOAN-SING James : > Trying to download Python tutorial, theses links under are either broken or archived ?!? the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:29:02 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:29:02 +0000 Subject: [docs] I can't download Python 2.7.9rc1 Document In-Reply-To: <201411261816224903177@gmail.com> References: <201411261816224903177@gmail.com> Message-ID: Hello, thanks for your email. On Wed, Nov 26, 2014 at 10:16 AM, cszhiyue at gmail.com wrote: > I just want to download "Python 2.7.9rc1 Document" on the website. Link > is https://docs.python.org/2/download.html > The page appears 404 error.So I can't do it. I hope you can help me. thx. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:29:28 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:29:28 +0000 Subject: [docs] Broken doc links In-Reply-To: <010901d0092e$dbc9b780$935d2680$@alumni.nd.edu> References: <010901d0092e$dbc9b780$935d2680$@alumni.nd.edu> Message-ID: Hello Mike, thanks for your email. On Wed, Nov 26, 2014 at 4:09 AM, Mike Buc wrote: > All the documentation download links on this page are broken: > > https://docs.python.org/2/download.html the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:32:28 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:32:28 +0000 Subject: [docs] Documentation Bug - 404 Error In-Reply-To: References: Message-ID: Hello Nathan, thanks for your email. On Fri, Nov 14, 2014 at 8:02 PM, Nathan Hammond wrote: > Page: > https://docs.python.org/2.7/tutorial/controlflow.html#intermezzo-coding-style > > Sentence: For Python, PEP 8 has emerged as the style guide that most > projects adhere to; it promotes a very readable and eye-pleasing coding > style. Every Python developer should read it at some point; here are the > most important points extracted for you > > The link for PEP8 (https://www.python.org/dev/peps/pep-0008) goes to a > custom 404 error page. It seems to be fixed now. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:34:56 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:34:56 +0000 Subject: [docs] Documentation links broken In-Reply-To: <1412788318745.73686@student.bradford.ac.uk> References: <1412788318745.73686@student.bradford.ac.uk> Message-ID: Hello Pete, thanks for your email. On Wed, Oct 8, 2014 at 6:11 PM, Pete Turner wrote: > The download links at https://docs.python.org/3/download.html all give a the links at https://docs.python.org/3/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:35:40 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:35:40 +0000 Subject: [docs] error 404 - Download Python 3.4.2 Documentation In-Reply-To: <754FCD159662C648BE0C4258E49F35F1069FDABC@tl2kco04.tecnologica.tlc> References: <754FCD159662C648BE0C4258E49F35F1069FDABC@tl2kco04.tecnologica.tlc> Message-ID: Hello Manuel Dominguez, thanks for your email. On Wed, Oct 8, 2014 at 12:41 PM, Manuel Dominguez Alvarez wrote: > It seems that there is an error in the page > https://docs.python.org/3/download.html when I try to download the > documentation > https://docs.python.org/3/archives/python-3.4.2-docs-pdf-a4.zip the links at https://docs.python.org/3/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:36:33 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:36:33 +0000 Subject: [docs] 404 error In-Reply-To: References: Message-ID: Hello Laura, thanks for your email. On Tue, Sep 23, 2014 at 5:10 AM, L Ogden wrote: > I'm trying to download the 3.4.2rc1 documentation but keep getting a 404 > error. Just downloaded Python to this laptop and had no trouble with that or > with getting to any of your other pages. I'm seeing this error only when I > try to download the PDF documentation. Give a shout when it is working the links at https://docs.python.org/3/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:37:54 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:37:54 +0000 Subject: [docs] 404 error in the docs links In-Reply-To: <0372550419515C499D829EBF17B05B530504DEFF@hoshi.uni.lux> References: <0372550419515C499D829EBF17B05B530504DEFF@hoshi.uni.lux> Message-ID: Hello Rui, thanks for your email. On Wed, Sep 24, 2014 at 1:56 PM, Rui JOAQUIM wrote: > I?m trying to download the documentation but I get a 404 error message!? the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 17:38:22 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 16:38:22 +0000 Subject: [docs] 404 error In-Reply-To: References: Message-ID: Hello Amir, thanks for your email. On Tue, Sep 23, 2014 at 7:54 AM, Amir Khan wrote: > I'm trying to download the docs for python 3. I'm getting a 404 error: the links at https://docs.python.org/3/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 18:03:21 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 17:03:21 +0000 Subject: [docs] Erroneous links in downloadable documentation page In-Reply-To: <2876D4BDA747384DAAD36E18FDE0689108B05C@WSWD43.vishaypg.com> References: <2876D4BDA747384DAAD36E18FDE0689108B05C@WSWD43.vishaypg.com> Message-ID: Hello Matt, thanks for your email. On Wed, Oct 8, 2014 at 4:25 PM, Funke, Matt wrote: > The links on this page: > > https://docs.python.org/3/download.html > > ? point to files that don?t exist. Has the downloadable documentation for > version 3.4.2 been finalized? (I note that the release candidate > documentation is in that location.) the links at https://docs.python.org/3/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 18:04:08 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 17:04:08 +0000 Subject: [docs] Doc Download link not working In-Reply-To: References: Message-ID: Hello, thanks for your email. On Wed, Dec 10, 2014 at 11:43 AM, Ajeeb K P wrote: > Many of the download links of the python doc downloads are not working the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From sandro.tosi at gmail.com Tue Feb 3 15:52:35 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Tue, 3 Feb 2015 14:52:35 +0000 Subject: [docs] encounters a problem while downloading documentation In-Reply-To: References: Message-ID: Hello, thanks for your email. On Sat, Nov 29, 2014 at 1:18 AM, 1 wrote: > When I start to downloading the Python 2.7.9rc1 Documentation, it came out > to be a 404 Not Found. I don't know why.Please help me. the links at https://docs.python.org/2/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Wed Feb 4 06:06:50 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 04 Feb 2015 05:06:50 +0000 Subject: [docs] [issue23391] Documentation of EnvironmentError (OSError) arguments disappeared Message-ID: <1423026410.5.0.815744351944.issue23391@psf.upfronthosting.co.za> New submission from Martin Panter: Seems to have been removed in revision 097f4fda61a4, for PEP 3151. The older EnvironmentError documentation talks about creating the exception with two and three constructor arguments, however I don?t see this in the new documentation. Is this usage meant to be deprecated, or still allowed? Either way, I think the documentation should mention it. ---------- assignee: docs at python components: Documentation messages: 235372 nosy: docs at python, vadmium priority: normal severity: normal status: open title: Documentation of EnvironmentError (OSError) arguments disappeared versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From sandro.tosi at gmail.com Wed Feb 4 09:35:06 2015 From: sandro.tosi at gmail.com (Sandro Tosi) Date: Wed, 4 Feb 2015 08:35:06 +0000 Subject: [docs] Bug bei py2exe In-Reply-To: References: Message-ID: Hello Laura, this is an English speaking mailing list, so please either repost your question in English (even though I think it doesnt belong here, from the code shown in the OP) or seek for guidance on a German speaking forum. Regards, Sandro 2015-01-30 16:01 GMT+00:00 Laura M Niesemann : > Liebes Python-Team, > bei der Ausf?hrung des py2exe gibt es einen Fehler. > Folgender Code : > > setup ( windows= [{ "script":"Programm.py", "icon_resources": [( > 0,"Icon.ico")] }] ) > > funktioniert bis WindowsXP einwandfrei. Dort werden die Icons ausgegeben und > dargestellt. > > Ab Windows7 jedoch funktioniert das Icon nicht mehr. > Die Icons werden weder im Explorer noch auf dem Fenster selbst dargestellt. > Sie sind nach dem "setup" verschwunden. Obwohl sie vor dem py2exe setup > angezeigt wurden. > > Da scheint ein Fehler vorzuliegen. Da haben die wohl bei M$ irgendetwas > ver?ndert. > > herzlichen Gru? > Laura Meret Niesemann > > _______________________________________________ > docs mailing list > docs at python.org > https://mail.python.org/mailman/listinfo/docs > -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From report at bugs.python.org Thu Feb 5 02:12:24 2015 From: report at bugs.python.org (John Boersma) Date: Thu, 05 Feb 2015 01:12:24 +0000 Subject: [docs] [issue23396] Wrong print for 2.7.9 Message-ID: <1423098744.16.0.128886256638.issue23396@psf.upfronthosting.co.za> New submission from John Boersma: In the tutorial for 2.7.9, in the section on quotes and the escape character, there is the following example text: >>> '"Isn\'t," she said.' '"Isn\'t," she said.' >>> print '"Isn\'t," she said.' "Isn't," she said. >>> s = 'First line.\nSecond line.' # \n means newline >>> s # without print(), \n is included in the output 'First line.\nSecond line.' >>> print s # with print, \n produces a new line First line. Second line. Note the print() in a comment. Isn't that Python 3 syntax? Should just be print for 2.7, I believe. ---------- assignee: docs at python components: Documentation messages: 235414 nosy: docs at python, johnboersma priority: normal severity: normal status: open title: Wrong print for 2.7.9 type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 02:13:58 2015 From: report at bugs.python.org (John Boersma) Date: Thu, 05 Feb 2015 01:13:58 +0000 Subject: [docs] [issue23396] Wrong print for 2.7.9 In-Reply-To: <1423098744.16.0.128886256638.issue23396@psf.upfronthosting.co.za> Message-ID: <1423098838.24.0.585226772.issue23396@psf.upfronthosting.co.za> John Boersma added the comment: To clarify - this is in tutorial section 3.1.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 5 04:07:06 2015 From: report at bugs.python.org (Roundup Robot) Date: Thu, 05 Feb 2015 03:07:06 +0000 Subject: [docs] [issue23396] Wrong print for 2.7.9 In-Reply-To: <1423098744.16.0.128886256638.issue23396@psf.upfronthosting.co.za> Message-ID: <20150205030700.106379.50468@psf.io> Roundup Robot added the comment: New changeset 2bb5fa752bfc by Benjamin Peterson in branch '2.7': remove parenthesis from print statement (closes #23396) https://hg.python.org/cpython/rev/2bb5fa752bfc ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 14:00:18 2015 From: report at bugs.python.org (Matthew Atkinson) Date: Fri, 06 Feb 2015 13:00:18 +0000 Subject: [docs] [issue11352] Update cgi module doc In-Reply-To: <1298895261.86.0.965235067518.issue11352@psf.upfronthosting.co.za> Message-ID: <1423227617.12.0.464645144201.issue11352@psf.upfronthosting.co.za> Matthew Atkinson added the comment: Hi I've modified Pierre's patch to apply to the latest 3.5 and 3.4, and made the most of the simple changes suggested in http://bugs.python.org/review/11352/#ps4792 . I've also added all the non internal parameters to the FieldStorage constructor, and descriptions of them. Thanks, Matt ---------- nosy: +mutley89 Added file: http://bugs.python.org/file38026/cgi-doc.patch _______________________________________ Python tracker _______________________________________ From manuel.dominguez at altertechnology.com Wed Feb 4 09:11:36 2015 From: manuel.dominguez at altertechnology.com (Manuel Dominguez Alvarez) Date: Wed, 4 Feb 2015 09:11:36 +0100 Subject: [docs] error 404 - Download Python 3.4.2 Documentation References: <754FCD159662C648BE0C4258E49F35F1069FDABC@tl2kco04.tecnologica.tlc> Message-ID: <754FCD159662C648BE0C4258E49F35F1069FE2CA@tl2kco04.tecnologica.tlc> Thanks to all of you for your dedication. Regards, -----Mensaje original----- De: Sandro Tosi [mailto:sandro.tosi at gmail.com] Enviado el: martes, 03 de febrero de 2015 17:36 Para: Manuel Dominguez Alvarez CC: docs at python.org Asunto: Re: [docs] error 404 - Download Python 3.4.2 Documentation Hello Manuel Dominguez, thanks for your email. On Wed, Oct 8, 2014 at 12:41 PM, Manuel Dominguez Alvarez wrote: > It seems that there is an error in the page > https://docs.python.org/3/download.html when I try to download the > documentation > https://docs.python.org/3/archives/python-3.4.2-docs-pdf-a4.zip the links at https://docs.python.org/3/download.html are now working correctly. Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi From wa6azp at gmail.com Fri Feb 6 07:48:41 2015 From: wa6azp at gmail.com (Alan Larson) Date: Thu, 5 Feb 2015 22:48:41 -0800 Subject: [docs] Documentation / web page bug Message-ID: The web page: https://docs.python.org/2/whatsnew/2.2.html#pep-238-changing-the-division-operator has a (fairly substantial) error. It says that: Currently Python?s division operator, /, behaves like C?s division operator when presented with two integer arguments: it returns an integer result that?s truncated down when there would be a fractional part. For example, 3/2 is 1, not 1.5, and (-1)/2 is -1, not -0.5. This is quite incorrect. C's division operator takes (-1) / 2 and gives 0; not -1. This is, in fact, the problem many people have with python. Not that integer division truncates the fractional part of the result, but that it takes the floor of the result, not the result generated by the machine. Computer languages are means of translating to the machine's functions, which truncate towards zero. However, whatever python does, it cannot justify it by claiming C gives (-1) / 2 == -1 ; because that is not true. Alan -------------- next part -------------- An HTML attachment was scrubbed... URL: From phroekazoid at gmail.com Fri Feb 6 13:04:23 2015 From: phroekazoid at gmail.com (Andrew M) Date: Fri, 6 Feb 2015 14:04:23 +0200 Subject: [docs] Documentation bug: ipaddress module Message-ID: Hello, Recently had to work with the ipaddress module and started to study the documentation at: https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network Found the following issue: 21.28.2.1. Address objects: the object does not contain the property is_global, instead the 21.28.3.2. Network objects contains it but it's not listed. Confirmed by studying module py file: /usr/local/lib/python3.4/ipaddress.py Please correct the document. Thank you, Andrew -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Fri Feb 6 21:40:15 2015 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 06 Feb 2015 20:40:15 +0000 Subject: [docs] [issue20413] Errors in documentation of standard codec error handlers In-Reply-To: <1390855266.06.0.0688884977578.issue20413@psf.upfronthosting.co.za> Message-ID: <1423255215.4.0.08591414016.issue20413@psf.upfronthosting.co.za> Matthew Barnett added the comment: The docs for Python 3.5.0a0 still say "Unicode Private Use Area". ---------- nosy: +mrabarnett versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 22:11:44 2015 From: report at bugs.python.org (Davin Potts) Date: Fri, 06 Feb 2015 21:11:44 +0000 Subject: [docs] [issue18620] multiprocessing page leaves out important part of Pool example In-Reply-To: <1375389044.82.0.349700607179.issue18620@psf.upfronthosting.co.za> Message-ID: <1423257104.72.0.935581386583.issue18620@psf.upfronthosting.co.za> Davin Potts added the comment: Attached are proposed patches for 2.7, 3.4, and default (3.5) branches. In these patches, the 2 examples in the documentation that showcase the use of pool.apply_async have been modified to specifically highlight that a single invocation of apply_async will only lead to a single process doing any work (not all of the pool's processes). Specifically, in the first code example: * In the 3.x branches, the example is expanded slightly to demonstrate that only a single process is used by a single apply_async call and that to accomplish similar to the mapping examples just above it, multiple apply_async calls are necessary. * Also in the 3.x branches, the code deliberately causes an exception to be raised which will terminate the execution of this example when anyone attempts to run it. Rather than provide an example which terminates prematurely, the exception is now caught and a message displayed to demonstrate the exception did indeed occur, permitting the example to run through to a successful exit. * In the 2.7 branch, this first example is much smaller than what is in use in the 3.x branches -- I've expanded it to cover the same information as is being shared in the 3.x branches now. Specifically, in the second code example: * In the 3.x branches, the only change is to the comment to the right of the apply_async call which emphasizes that only a single process is being used. Also, for clarity, the reference to the exception being raised in the last line was changed to highlight that it's an exception defined in the multiprocessing library (multiprocessing.TimeoutError). * The 2.7 branch is the same -- there were no other differences on this example between branches. These updated examples have been tested with the latest from 2.7, 3.4, and default/3.5 branches on OSX 10.10 and Windows 7. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file38029/issue18620_py35.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 22:13:45 2015 From: report at bugs.python.org (Davin Potts) Date: Fri, 06 Feb 2015 21:13:45 +0000 Subject: [docs] [issue18620] multiprocessing page leaves out important part of Pool example In-Reply-To: <1375389044.82.0.349700607179.issue18620@psf.upfronthosting.co.za> Message-ID: <1423257225.81.0.235896401913.issue18620@psf.upfronthosting.co.za> Changes by Davin Potts : Added file: http://bugs.python.org/file38030/issue18620_py34.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 22:14:09 2015 From: report at bugs.python.org (Davin Potts) Date: Fri, 06 Feb 2015 21:14:09 +0000 Subject: [docs] [issue18620] multiprocessing page leaves out important part of Pool example In-Reply-To: <1375389044.82.0.349700607179.issue18620@psf.upfronthosting.co.za> Message-ID: <1423257249.37.0.608530680019.issue18620@psf.upfronthosting.co.za> Changes by Davin Potts : Added file: http://bugs.python.org/file38031/issue18620_py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 6 22:44:08 2015 From: report at bugs.python.org (Martin Panter) Date: Fri, 06 Feb 2015 21:44:08 +0000 Subject: [docs] [issue20413] Errors in documentation of standard codec error handlers In-Reply-To: <1390855266.06.0.0688884977578.issue20413@psf.upfronthosting.co.za> Message-ID: <1423259048.46.0.514458591799.issue20413@psf.upfronthosting.co.za> Martin Panter added the comment: I changed ?code point in the Unicode Private Use Area? to ?individual surrogate code? in the ?codecs? module documentation for Issue 19548. So perhaps (a) still needs addressing, but (b) and (c) are hopefully already fixed. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 01:01:07 2015 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 07 Feb 2015 00:01:07 +0000 Subject: [docs] [issue20413] Errors in documentation of standard codec error handlers In-Reply-To: <1390855266.06.0.0688884977578.issue20413@psf.upfronthosting.co.za> Message-ID: <1423267267.86.0.268809880216.issue20413@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, February 2014, many of my plans went in rather different directions than expected that month, and this was one of them :) As Martin noted, he already fixed (b) and (c), but we missed that the list of error handlers was also duplicated in the builtin open() docs. That duplication is likely worthwhile from a docs usability perspective, but we should: 1. Bring it in line with Martin's recent fixes to the codecs module docs 2. Add a comment in the error handler docs noting that the open() docs may need to be updated to reflect changes to error handler semantics ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 13:55:26 2015 From: report at bugs.python.org (Abraham Smith) Date: Sat, 07 Feb 2015 12:55:26 +0000 Subject: [docs] [issue23406] interning and list comprehension leads to unexpected behavior Message-ID: <1423313726.28.0.32804996181.issue23406@psf.upfronthosting.co.za> New submission from Abraham Smith: Some students were working on matrix routines for practice. The following code: >>> L = [ [0]*3 ]*3 >>> for i in range(3): ... for j in range(3): ... if i==j: L[i][j]=1 was expected to return [[1,0,0],[0,1,0],[0,0,1]] but it returned [[1,1,1],[1,1,1],[1,1,1]] because the list [0]*3 was being interned silently, so all three rows were the same memory! To see this, I did >>> map(id, L) [139634871681464, 139634871681464, 139634871681464] On the other hand >>> M=[ [ 0 for i in range(3) ] for j in range(3) ] does not intern: >>> map(id, L) [139634871631672, 139634871681608, 139634871681680] so the above loop works as expected. This is true in both python 2.7 and 3.4. This is very confusing to users! If this intern behavior with [0]*3 is intended, it should be documented more clearly, because this is something that new students of python might encounter right away when playing with the language's list methods. I didn't see any reference to interning in the discussion of lists in the standard library reference. Moreover, I also could not find any reference to the automatic interning of mutable objects, such as lists. Personally, I cannot see any reason to silently and automatically intern a mutable object; however, if this behavior is really desired, it should be documented. ---------- assignee: docs at python components: Documentation messages: 235520 nosy: Abraham.Smith, docs at python priority: normal severity: normal status: open title: interning and list comprehension leads to unexpected behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 13:59:11 2015 From: report at bugs.python.org (Abraham Smith) Date: Sat, 07 Feb 2015 12:59:11 +0000 Subject: [docs] [issue23406] interning and list comprehension leads to unexpected behavior In-Reply-To: <1423313726.28.0.32804996181.issue23406@psf.upfronthosting.co.za> Message-ID: <1423313951.05.0.84342964966.issue23406@psf.upfronthosting.co.za> Abraham Smith added the comment: (Obviously, there's a copy/paste mistake in the second case; it should read map(id, M).) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 14:07:57 2015 From: report at bugs.python.org (Karl Richter) Date: Sat, 07 Feb 2015 13:07:57 +0000 Subject: [docs] [issue23174] shelve.open fails with error "anydbm.error: db type could not be determined" In-Reply-To: <1420502722.34.0.451688646321.issue23174@psf.upfronthosting.co.za> Message-ID: <1423314477.22.0.394127066764.issue23174@psf.upfronthosting.co.za> Karl Richter added the comment: For example, it should be clear why `shelve.open(tempfile.mkstemp()[1])` fails with the mentioned exception and `shelve.open("/tmp/bla")` fails. I still haven't figured out the constraints to create a working `shelve.Shelve` at all. It should be clear why `shelve.open("/tmp/tmphTTQLd")` fails and `shelve.open("/tmp/tmphTTQLda")` succeeds. There has to be something unrelated to extensions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 14:10:34 2015 From: report at bugs.python.org (Georg Brandl) Date: Sat, 07 Feb 2015 13:10:34 +0000 Subject: [docs] [issue23406] interning and list comprehension leads to unexpected behavior In-Reply-To: <1423313726.28.0.32804996181.issue23406@psf.upfronthosting.co.za> Message-ID: <1423314634.57.0.785233327604.issue23406@psf.upfronthosting.co.za> Georg Brandl added the comment: There is no interning going on. Multiplying lists just copies references. This is not so surprising if you consider that the case may be simple for nested lists, but what about ``[a] * 3`` with some arbitrary object "a"? Copying (or even deep copying) that object is usually not wanted, and impossible in general. This is also documented here (see especially note 2 below the table): https://docs.python.org/2/library/stdtypes.html#sequence-types-str-unicode-list-tuple-bytearray-buffer-xrange You're right though that this might be good to mention in the tutorial, as it comes up every now and then. I'll leave the issue open to discuss that. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 14:20:24 2015 From: report at bugs.python.org (Steven D'Aprano) Date: Sat, 07 Feb 2015 13:20:24 +0000 Subject: [docs] [issue23406] interning and list comprehension leads to unexpected behavior In-Reply-To: <1423313726.28.0.32804996181.issue23406@psf.upfronthosting.co.za> Message-ID: <1423315224.84.0.0963274643597.issue23406@psf.upfronthosting.co.za> Steven D'Aprano added the comment: This is already a FAQ: https://docs.python.org/2/faq/programming.html#how-do-i-create-a-multidimensional-list I guess this bites every beginning Python programmer, but it's a natural, and desirable, consequence of Python's object model and the fact that * does not copy the list items. ---------- nosy: +steven.daprano resolution: -> not a bug _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 14:37:06 2015 From: report at bugs.python.org (Abraham Smith) Date: Sat, 07 Feb 2015 13:37:06 +0000 Subject: [docs] [issue23406] interning and list comprehension leads to unexpected behavior In-Reply-To: <1423313726.28.0.32804996181.issue23406@psf.upfronthosting.co.za> Message-ID: <1423316226.64.0.0375582141005.issue23406@psf.upfronthosting.co.za> Abraham Smith added the comment: Thanks for the helpful responses and correcting my misunderstanding. Regarding improved documentation, I see now that the table at https://docs.python.org/2/library/stdtypes.html#id2 indeed says "shallow copies"; however, the footnote seems to bury the lede. Perhaps the footnote should be expanded to either link to the FAQ entry or provide an abbreviated version of it. The FAQ entry is actually very good, but I would guess that most readers (like me) skip the FAQs and jump straight to the library reference. Internet users have been trained for 20 years to believe that FAQs are full of useless, snarky answers to questions at a much shallower level, like "what do I do with a .tar.gz file?". The fact that Python's FAQ is extremely well-written and helpful is a pleasant surprise, but a surprise none-the-less. ---------- resolution: not a bug -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 7 14:58:17 2015 From: report at bugs.python.org (Karl Richter) Date: Sat, 07 Feb 2015 13:58:17 +0000 Subject: [docs] [issue23174] shelve.open fails with error "anydbm.error: db type could not be determined" In-Reply-To: <1420502722.34.0.451688646321.issue23174@psf.upfronthosting.co.za> Message-ID: <1423317497.47.0.61265471169.issue23174@psf.upfronthosting.co.za> Karl Richter added the comment: After checking the code, I think that it'd make more sense to document `whichdb.py`. It needs to be enhanced with references to criteria for the determination of the database type. Currently there're only function comments and the fact that some variables are named magic speaks for itself, i.e. it's ok for the implementation of the module to be a black box, but the requirements for the input, i.e. the potential database file, which is per se not part of the black box, needs to be specified. Then just link that in the `shelve` docs stating that `shelve.open` is basically a wrapper around `whichdb`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 03:45:29 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 08 Feb 2015 02:45:29 +0000 Subject: [docs] [issue23391] Documentation of EnvironmentError (OSError) arguments disappeared In-Reply-To: <1423026410.5.0.815744351944.issue23391@psf.upfronthosting.co.za> Message-ID: <1423363529.11.0.811105622961.issue23391@psf.upfronthosting.co.za> Martin Panter added the comment: Here is a patch to redocument the constructor arguments. I am assuming that they were only removed by accident. The constructor arguments are already tested in ExceptionTests.testAttributes() at Lib/test/test_exceptions.py:248. I did not restore the bit about more than three arguments being reflected in the ?args? attribute, since this is not the current behaviour, and does not seem very important: >>> OSError(1, 2, 3, 4).args (1, 2) ---------- keywords: +patch Added file: http://bugs.python.org/file38037/os-error-args.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 05:43:30 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 08 Feb 2015 04:43:30 +0000 Subject: [docs] [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <1423370610.75.0.468857402808.issue13637@psf.upfronthosting.co.za> Martin Panter added the comment: The error fix patch looks good. I updated the doc patch as fix_doc_binascii_unhexlify.v2.patch, which also clarifies a2b_qp(), and restores the description of Python 3.2 not allowing text strings. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python Added file: http://bugs.python.org/file38038/fix_doc_binascii_unhexlify.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 11:21:17 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 08 Feb 2015 10:21:17 +0000 Subject: [docs] [issue23410] Document more BaseHTTPRequestHandler attributes Message-ID: <1423390877.64.0.272904715009.issue23410@psf.upfronthosting.co.za> New submission from Martin Panter: [Padding to avoid Error: 'utf8' codec can't decode bytes in position 189-190: invalid continuation byte] This is a patch to document two attributes of http.server.BaseHTTPRequestHandler: ?close_connection? and ?requestline?. Normally these are set by the handle_one_request() method, but when overriding that method, you need to know to set these attributes. ---------- assignee: docs at python components: Documentation messages: 235554 nosy: docs at python, vadmium priority: normal severity: normal status: open title: Document more BaseHTTPRequestHandler attributes type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 8 11:22:07 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 08 Feb 2015 10:22:07 +0000 Subject: [docs] [issue23410] Document more BaseHTTPRequestHandler attributes In-Reply-To: <1423390877.64.0.272904715009.issue23410@psf.upfronthosting.co.za> Message-ID: <1423390927.09.0.450936344774.issue23410@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- keywords: +patch Added file: http://bugs.python.org/file38042/http-attributes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 01:37:07 2015 From: report at bugs.python.org (Martin Panter) Date: Mon, 09 Feb 2015 00:37:07 +0000 Subject: [docs] [issue12955] urllib.request example should use "with ... as:" In-Reply-To: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> Message-ID: <1423442227.39.0.453542617828.issue12955@psf.upfronthosting.co.za> Martin Panter added the comment: Issue 22755 is about the example arms race for contextlib.closing(). ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 02:22:17 2015 From: report at bugs.python.org (Martin Panter) Date: Mon, 09 Feb 2015 01:22:17 +0000 Subject: [docs] [issue12955] urllib.request example should use "with ... as:" In-Reply-To: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> Message-ID: <1423444937.6.0.576881580862.issue12955@psf.upfronthosting.co.za> Martin Panter added the comment: Here is a patch to change the urlopen() examples to use context managers where appropriate. There were also a few examples of handling HTTPError which I didn?t touch, because the whole file object versus exception object thing is probably a separate can of worms. ---------- keywords: +patch Added file: http://bugs.python.org/file38049/urlopen-with.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 04:27:49 2015 From: report at bugs.python.org (Martin Panter) Date: Mon, 09 Feb 2015 03:27:49 +0000 Subject: [docs] [issue10697] host and port attributes not documented well in function urllib.parse.urlparse and urlsplit In-Reply-To: <1292271440.42.0.107945784803.issue10697@psf.upfronthosting.co.za> Message-ID: <1423452469.0.0.908095948727.issue10697@psf.upfronthosting.co.za> Martin Panter added the comment: I don?t understand where the work needs to be done for this one. Even in the 3.1 and 2.7 documentation, the urlparse() and urlsplit() entries both list ?port? as one of the returned attributes, and urlparse() has example code for it. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 20:39:39 2015 From: report at bugs.python.org (Mark Baker) Date: Mon, 09 Feb 2015 19:39:39 +0000 Subject: [docs] [issue23423] XPath Support in ElementTree doc omission Message-ID: <1423510779.4.0.551912157105.issue23423@psf.upfronthosting.co.za> New submission from Mark Baker: The list of XPath supported features in section 20.5.2.2. "Supported XPath syntax" on page https://docs.python.org/3.4/library/xml.etree.elementtree.html does not list the use of a predicate based on an element value (it only list predicates based on an attribute value. However, testing in 3.4 shows that a predicate based on an element value also works. >>> import xml.etree.ElementTree as etree >>> x = 'bing' >>> y = etree.XML(x) # Find by attribute value >>> z = y.find('bar/baz[@y="bang"]') >>> print(z) # Find by element value >>> z = y.find('bar/[baz="bing"]') >>> print(z) # Find fails with incorrect element value >>> z = y.find('bar/[baz="bong"]') >>> z >>> print(z) None Below the line that says: [tag] Selects all elements that have a child named tag. Only immediate children are supported. It should say something like: [tag="value"] Selects all elements that have a child named tag with the given value. Only immediate children are supported. ---------- assignee: docs at python components: Documentation messages: 235627 nosy: docs at python, mbakeranalecta priority: normal severity: normal status: open title: XPath Support in ElementTree doc omission type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:09:28 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 09 Feb 2015 21:09:28 +0000 Subject: [docs] [issue23427] Python should expose command when invoked with -c Message-ID: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> New submission from Jan-Philip Gehrcke: When Python is invoked with the `-c command` switch, the command string does not get exposed in sys.argv: $ python -c "import sys; print(sys.argv)" ['-c'] $ python -c "import sys; print(sys.argv)" arg1 ['-c', 'arg1'] The command string does not get exposed anywhere, AFAIK, so it is inaccessible from within Python programs. There might be application scenarios in which it is useful to access the command string, such as for debugging purposes. One scenario is when a Python session should be able to "re-spawn" itself in a subprocess (I came across this question on StackOverflow: http://stackoverflow.com/q/28412903/145400) I propose to make the command string accessible. If you agree that it might make sense, the question is *how/where* to expose it. One possible way is to retain it in sys.argv, as in this example: $ python -c "import sys; print(sys.argv)" "arg1" ['-c', 'import sys; print(sys.argv)', 'arg1'] The current sys.argv docs say > If the command was executed using the -c command line option to > the interpreter, argv[0] is set to the string '-c'. This sentence could then be adjusted to "[...], argv[0] is set to the string '-c', and argv[1] contains the command." This method breaks existing applications that are started with the -c method and that consume command line arguments in a sys.argv[1:] fashion. The tests in Lib/test/test_cmd_line.py all pass, however. A second method would be to change sys.argv[0] from '-c' to '-c command'. This would break existing applications that check for sys.argv[0] == 'c'. A third method would be to leave sys.argv as it is, and expose the command with a new attribute in the sys module. I have attached a patch for variant 1 (passes all tests in Lib/test/test_cmd_line.py), to demonstrate which code is affected: the translation from the "real" argv to sys' argv is triggered in Modules/main.c. The patch does not change behavior of '-m' (it's funny, however, that the current version of main.c at first replaces the module string with '-m', whereas the runpy module later on replaces '-m' with the path to the module file anyway.). As a side node, I figure that the sys.argv documentation should be adjusted to properly reflect the -m behavior, which is: $ ./python -m testmodule foo testmodule sys.argv: ['/data/local/pythondev/pythontip/cpython/testmodule.py', 'foo'] Let me hear your comments, and I am willing to work on code and doc patches, thanks! ---------- assignee: docs at python components: Documentation, Interpreter Core files: sys_argv_cmd.patch keywords: patch messages: 235633 nosy: docs at python, georg.brandl, haypo, jgehrcke, pitrou priority: normal severity: normal status: open title: Python should expose command when invoked with -c type: enhancement versions: Python 3.5, Python 3.6 Added file: http://bugs.python.org/file38065/sys_argv_cmd.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:14:53 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 09 Feb 2015 21:14:53 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1423516493.74.0.768971275527.issue6634@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: I'd love to find an agreement here. I think we are quite close to getting this closed, so further input is very welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 9 22:23:14 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Mon, 09 Feb 2015 21:23:14 +0000 Subject: [docs] [issue20709] os.utime(path_to_directory): wrong documentation for Windows. In-Reply-To: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> Message-ID: <1423516994.19.0.998971733698.issue20709@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: Can these super-small doc patches get applied or should we change something? Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 00:09:07 2015 From: report at bugs.python.org (STINNER Victor) Date: Mon, 09 Feb 2015 23:09:07 +0000 Subject: [docs] [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: sys.argv must not be changed. It would break too many Python applications. *If* we decide to expose the command line parameter in Python, we can add a new variable like sys.command for example. "command" name in used in the C code of Python, and also comes from "c" of "-c". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 02:20:34 2015 From: report at bugs.python.org (Martin Panter) Date: Tue, 10 Feb 2015 01:20:34 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1423531233.59.0.515976430005.issue6634@psf.upfronthosting.co.za> Martin Panter added the comment: If it were me, I?d drop the Notes and Warnings (never been a fan), and put Thing #2 first, and then Thing #1. Maybe something like ''' sys.exit([arg]) Exit from Python. . . . and it is possible to intercept the exit attempt at an outer level. When called from a thread other than the main thread, this causes the thread to exit silently instead, and is equivalent to calling :func:`thread.exit`. The optional argument *arg* can be an integer giving the exit status (defaulting to zero). Passing ``None`` is equivalent to passing zero. Any other object is printed to `stderr` and results in an exit status of 1. In particular, ``sys.exit("some error message")`` is a quick way to exit a program when an error occurs. When called from a thread other than the main thread, nothing is printed and the argument is ignored. An exit status of zero is considered ?successful termination? and any nonzero status is considered ?abnormal termination? . . . Unix programs generally use 2 for command line syntax errors and 1 for all other kinds of errors. ''' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 10:12:41 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Feb 2015 09:12:41 +0000 Subject: [docs] [issue13407] tarfile doesn't support multistream bzipped tar files In-Reply-To: <1321352961.33.0.0944615995053.issue13407@psf.upfronthosting.co.za> Message-ID: <1423559561.36.0.803470430787.issue13407@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The tarfile module documentation needs a note similar to issue1625 which would warn about the lack of supporting some files and suggest a workaround. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, nadeem.vawda, serhiy.storchaka priority: normal -> high stage: -> needs patch status: pending -> open title: tarfile.getnames misses members again -> tarfile doesn't support multistream bzipped tar files versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 10:58:45 2015 From: report at bugs.python.org (=?utf-8?b?0JzQuNGF0LDQuNC7INCa0YDQuNCy0YPRiNC40L0=?=) Date: Tue, 10 Feb 2015 09:58:45 +0000 Subject: [docs] [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1423562324.95.0.553876600129.issue23427@psf.upfronthosting.co.za> ?????? ???????? added the comment: Hello, I have find some workaround to get actual argv, but it broken: python -c 'import ctypes; argv = ctypes.POINTER(ctypes.c_char_p)(); argc = ctypes.c_int(); ctypes.pythonapi.Py_GetArgcArgv(ctypes.byref(argc), ctypes.byref(argv)); print([argv[i] for i in xrange(0, argc.value)])' And this will output: ['python', '-c', '-c'] May be we just need to fix this behaviour, due this is error, as far as i can see. But may broke something. ---------- nosy: +??????.???????? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 12:25:44 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Tue, 10 Feb 2015 11:25:44 +0000 Subject: [docs] [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1423567544.22.0.0694451911046.issue23427@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: Victor, I support the idea of sys.command. However, it would be unpopulated most of the time (e.g. set to None by default). Now, is that something we should push forward or not? I would work on a patch, but we should have an agreement first, I guess. Mihail, the original argv becomes modified in the very early bootstrap phase, and the command gets lost within that process: it gets *overwritten* with "-c", which is exactly why you are observing two "-c". This happens here: https://hg.python.org/cpython/file/default/Modules/main.c#l684 So, no, without a code change in main.c there will be no way to retain the command for later usage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 12:30:46 2015 From: report at bugs.python.org (Mihail Krivushin) Date: Tue, 10 Feb 2015 11:30:46 +0000 Subject: [docs] [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1423567846.43.0.916780620858.issue23427@psf.upfronthosting.co.za> Mihail Krivushin added the comment: Jan-Philip, yes, I see that Main.c needs modification, but we can fix orig_argv with not just assignment but with full copy. So then we can get unmodified argv. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 13:29:15 2015 From: report at bugs.python.org (Berker Peksag) Date: Tue, 10 Feb 2015 12:29:15 +0000 Subject: [docs] [issue23432] Duplicate content in SystemExit documentation Message-ID: <1423571355.15.0.388380550498.issue23432@psf.upfronthosting.co.za> New submission from Berker Peksag: >From https://docs.python.org/3/library/exceptions.html#SystemExit Also, this exception derives directly from BaseException and not Exception, since it is not technically an error. and The exception inherits from BaseException instead of Exception so that it is not accidentally caught by code that catches Exception. This allows the exception to properly propagate up and cause the interpreter to exit. Here is a patch to remove the duplicate content and document the code attribute properly. ---------- assignee: docs at python components: Documentation files: systemexit.diff keywords: patch messages: 235684 nosy: berker.peksag, docs at python priority: normal severity: normal stage: patch review status: open title: Duplicate content in SystemExit documentation versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file38082/systemexit.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 15:51:26 2015 From: report at bugs.python.org (Mihail Krivushin) Date: Tue, 10 Feb 2015 14:51:26 +0000 Subject: [docs] [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1423579886.71.0.00610670868997.issue23427@psf.upfronthosting.co.za> Changes by Mihail Krivushin : ---------- versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 17:06:46 2015 From: report at bugs.python.org (Davin Potts) Date: Tue, 10 Feb 2015 16:06:46 +0000 Subject: [docs] [issue12954] Multiprocessing logging under Windows In-Reply-To: <1315610809.5.0.0888786272542.issue12954@psf.upfronthosting.co.za> Message-ID: <1423584406.41.0.389511498576.issue12954@psf.upfronthosting.co.za> Davin Potts added the comment: Closing per the feedback of the OP and secondary contributor to the issue. Kudos to the reporters for such nice follow-up. ---------- nosy: +davin resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 21:09:31 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 10 Feb 2015 20:09:31 +0000 Subject: [docs] [issue22883] Get rid of references to PyInt in Py3 sources In-Reply-To: <1416147146.5.0.625860400609.issue22883@psf.upfronthosting.co.za> Message-ID: <1423598971.3.0.14284384541.issue22883@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> docs at python components: +Documentation -Extension Modules, Interpreter Core nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 21:59:27 2015 From: report at bugs.python.org (Zachary Ware) Date: Tue, 10 Feb 2015 20:59:27 +0000 Subject: [docs] [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1423601967.13.0.801675322941.issue23427@psf.upfronthosting.co.za> Zachary Ware added the comment: Rather than add a variable to sys that will be empty 99% of the time, I think I'd rather stick a '__command__' constant in the __main__ module namespace when running with '-c' (think of '__file__'). You could then get at it elsewhere with 'from __main__ import __command__' (probably wrapped in a try/except ImportError, since it will usually not exist). This should probably be discussed on python-ideas. (Removing all versions but 3.5, as this is a feature request.) ---------- assignee: docs at python -> components: -Documentation nosy: +zach.ware versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 10 22:47:17 2015 From: report at bugs.python.org (Martin Panter) Date: Tue, 10 Feb 2015 21:47:17 +0000 Subject: [docs] [issue23432] Duplicate content in SystemExit documentation In-Reply-To: <1423571355.15.0.388380550498.issue23432@psf.upfronthosting.co.za> Message-ID: <1423604837.68.0.155163802702.issue23432@psf.upfronthosting.co.za> Martin Panter added the comment: The new text changes ?the associated value? to ?the value passed to [the] :func:`sys.exit` call?. There seems to be a trend in removing documentation of exception constructor arguments; is this intentional? In my code I tend to raise SystemExit() directly rather than importing the ?sys? module and calling sys.exit(). ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 13:38:08 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Wed, 11 Feb 2015 12:38:08 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1423658287.96.0.0143534844423.issue6634@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: Martin, I very much like the order you suggested, thanks. I did not feel confident enough for re-structuring the entire entry. So, can we agree on using that for Python 2.7? Is there a consensus regarding the approach to take for Python 3.5? Except from Martin there was no feedback on the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 13:42:52 2015 From: report at bugs.python.org (Berker Peksag) Date: Wed, 11 Feb 2015 12:42:52 +0000 Subject: [docs] [issue23432] Duplicate content in SystemExit documentation In-Reply-To: <1423571355.15.0.388380550498.issue23432@psf.upfronthosting.co.za> Message-ID: <1423658571.97.0.327528694521.issue23432@psf.upfronthosting.co.za> Berker Peksag added the comment: Good catch, thanks! Do you have better wording for that part of the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 11 14:09:40 2015 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Wed, 11 Feb 2015 13:09:40 +0000 Subject: [docs] [issue6634] sys.exit() called from threads other than the main one: undocumented behaviour In-Reply-To: <1249327311.32.0.926815032903.issue6634@psf.upfronthosting.co.za> Message-ID: <1423660180.91.0.883352337214.issue6634@psf.upfronthosting.co.za> Changes by Jan-Philip Gehrcke : Added file: http://bugs.python.org/file38096/issue6634_py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 00:26:06 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 11 Feb 2015 23:26:06 +0000 Subject: [docs] [issue20699] Behavior of ZipFile with file-like object and BufferedWriter. In-Reply-To: <1392889792.36.0.922412998797.issue20699@psf.upfronthosting.co.za> Message-ID: <1423697166.38.0.109797149752.issue20699@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From storchaka at gmail.com Thu Feb 12 00:26:47 2015 From: storchaka at gmail.com (storchaka at gmail.com) Date: Wed, 11 Feb 2015 23:26:47 -0000 Subject: [docs] Behavior of ZipFile with file-like object and BufferedWriter. (issue 20699) Message-ID: <20150211232647.5842.63381@psf.upfronthosting.co.za> https://bugs.python.org/review/20699/diff/13586/Doc/library/io.rst File Doc/library/io.rst (right): https://bugs.python.org/review/20699/diff/13586/Doc/library/io.rst#newcode233 Doc/library/io.rst:233: :class:`bytearray` is required. Text I/O classes work with Actually writable bytes-like object is required. https://bugs.python.org/review/20699/diff/13586/Doc/library/io.rst#newcode403 Doc/library/io.rst:403: be less than ``len(b)``, depending on specifics of the underlying raw For general bytes-like object len(b) is not the number of bytes. https://bugs.python.org/review/20699/diff/13586/Doc/library/io.rst#newcode501 Doc/library/io.rst:501: return the number of bytes written (never less than ``len(b)``, since if As above. https://bugs.python.org/review/20699/ From report at bugs.python.org Thu Feb 12 06:26:20 2015 From: report at bugs.python.org (Martin Panter) Date: Thu, 12 Feb 2015 05:26:20 +0000 Subject: [docs] [issue23432] Duplicate content in SystemExit documentation In-Reply-To: <1423571355.15.0.388380550498.issue23432@psf.upfronthosting.co.za> Message-ID: <1423718779.95.0.992384958347.issue23432@psf.upfronthosting.co.za> Martin Panter added the comment: How about this: ''' The constructor accepts the same optional argument passed to :func:`sys.exit`. If the value is an integer, it specifies the system exit status . . . . . . .. attribute:: code The exit status or error message that is passed to the constructor. (Defaults to ``None``.) ''' ---------- _______________________________________ Python tracker _______________________________________ From windfarer at gmail.com Sun Feb 8 06:17:48 2015 From: windfarer at gmail.com (qz yang) Date: Sun, 8 Feb 2015 13:17:48 +0800 Subject: [docs] Some typos in Language Reference Message-ID: https://docs.python.org/3/reference/expressions.html First, in section 6.2.1. Identifiers (Names), after the *Private name mangling:* It is to say that > The transformation inserts the class name, with leading underscores > removed and a single underscore inserted, But in the following example For example, the identifier__spam occurring in a class named Ham will be > transformed to _Ham__spam It only inserts the class name with one underscore, but not removes the leading underscores. I am not sure whether the description or the example is correct. Second,in section 6.9, under the sentence "Comparison of objects of the same type depends on the type:" in the second point, > The values float('NaN') and Decimal('NaN') are special. The are identical > to themselves, x is x but are not equal to themselves, x != x. This should be "They are". P.S. I've tried to register the issue tracker but failed to get the confirm email. Best Regards, Windfarer -------------- next part -------------- An HTML attachment was scrubbed... URL: From Atulgangwar081292 at gmail.com Mon Feb 9 11:16:47 2015 From: Atulgangwar081292 at gmail.com (atul gangwar) Date: Mon, 9 Feb 2015 15:46:47 +0530 Subject: [docs] Unable to Download Python 3.4.3rc1 Documentation Message-ID: This is following error that I get on any type: " 404 Not Found ------------------------------ nginx" -------------- next part -------------- An HTML attachment was scrubbed... URL: From sanghurn at outlook.com Mon Feb 9 11:15:54 2015 From: sanghurn at outlook.com (=?ks_c_5601-1987?B?x9G788fl?=) Date: Mon, 9 Feb 2015 19:15:54 +0900 Subject: [docs] I can't download the documentation of python3 Message-ID: Dear administrator of Python documentation. I can't download the PDF and EPUB files of python3 documentation in following link: https://docs.python.org/3/download.html My web-browser fail to find the address so results in HTTP 404 error. Please fix these errors. Best regards. -------------- next part -------------- An HTML attachment was scrubbed... URL: From nathanielove at gmail.com Tue Feb 10 05:11:40 2015 From: nathanielove at gmail.com (Gmail) Date: Tue, 10 Feb 2015 12:11:40 +0800 Subject: [docs] Error Report: Python 3 Doc PDF Download Problem Message-ID: <6EF5D186-C526-4A0F-AAB7-9B7DD51690FC@gmail.com> Hi, Today I tried to download the Python 3 Doc from this page https://docs.python.org/3/download.html . I clicked on PDF (A4 paper size) Packed as .zip as shown in the screenshot below, but the link directs me to a 404 not found page. Could you please help me solve this problem? Thank you. Nathaniel Suen -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-1.tiff Type: image/tiff Size: 76854 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PastedGraphic-2.tiff Type: image/tiff Size: 40854 bytes Desc: not available URL: From bjorn.umali at gmail.com Tue Feb 10 07:05:55 2015 From: bjorn.umali at gmail.com (Kevin Bjorn Umali) Date: Tue, 10 Feb 2015 14:05:55 +0800 Subject: [docs] Python Documentation Download Issue Message-ID: Hello, I'd like to report that the download links for the Python 3.4.3rc1 (found in https://docs.python.org/3/download.html) are not working. I always get a 404 response regardless of what download link I click. -- Kevin Bjorn V. Umali (+63)9178014406 -------------- next part -------------- An HTML attachment was scrubbed... URL: From sugushiva at gmail.com Tue Feb 10 11:34:08 2015 From: sugushiva at gmail.com (v Sugumar) Date: Tue, 10 Feb 2015 16:04:08 +0530 Subject: [docs] Not able to download documentation Message-ID: Hello sir, >From yesterday I am trying to download the documentation from https://docs.python.org/3/download.html But I am getting a page for found error at. https://docs.python.org/3/archives/python-3.4.3rc1-docs-pdf-letter.zip Thanks, v.sugumar -------------- next part -------------- An HTML attachment was scrubbed... URL: From vadmium+py at gmail.com Thu Feb 12 06:48:59 2015 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Thu, 12 Feb 2015 05:48:59 -0000 Subject: [docs] Behavior of ZipFile with file-like object and BufferedWriter. (issue 20699) Message-ID: <20150212054859.5842.85142@psf.upfronthosting.co.za> https://bugs.python.org/review/20699/diff/13586/Doc/library/io.rst File Doc/library/io.rst (right): https://bugs.python.org/review/20699/diff/13586/Doc/library/io.rst#newcode233 Doc/library/io.rst:233: :class:`bytearray` is required. Text I/O classes work with On 2015/02/12 00:26:47, storchaka wrote: > Actually writable bytes-like object is required. I am making a new patch that will hopefully document this for RawIOBase. Should I do the same for BufferedIOBase.readinto() and related methods as well? BufferedReader seems to work that way at least. https://bugs.python.org/review/20699/diff/13586/Doc/library/io.rst#newcode403 Doc/library/io.rst:403: be less than ``len(b)``, depending on specifics of the underlying raw On 2015/02/12 00:26:47, storchaka wrote: > For general bytes-like object len(b) is not the number of bytes. Will try to fix this for all mentions, including readinto() etc. https://bugs.python.org/review/20699/ From javokhir95m at gmail.com Mon Feb 9 13:58:17 2015 From: javokhir95m at gmail.com (Javokhir Kudratov) Date: Mon, 9 Feb 2015 04:58:17 -0800 Subject: [docs] (no subject) Message-ID: I have a problem with downloading. I can't download any kind of docs. -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Thu Feb 12 12:13:09 2015 From: report at bugs.python.org (Martin Panter) Date: Thu, 12 Feb 2015 11:13:09 +0000 Subject: [docs] [issue20699] Behavior of ZipFile with file-like object and BufferedWriter. In-Reply-To: <1392889792.36.0.922412998797.issue20699@psf.upfronthosting.co.za> Message-ID: <1423739588.43.0.320699028743.issue20699@psf.upfronthosting.co.za> Martin Panter added the comment: Posting patch v2: * Changed readinto() argument descriptions to ?a pre-allocated, writable bytes-like buffer?, for both RawIOBase and BufferedIOBase * Integrated the single-use test_memoryio.BytesIOMixin test class, which tricked me when I did the first patch * Added tests for BufferedRWPair, BytesIO.readinto() etc methods with non-bytearray() buffers * Fix _pyio.BufferedReader.readinto/1() for non-bytearray ---------- Added file: http://bugs.python.org/file38107/bytes-like-param.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 12:30:06 2015 From: report at bugs.python.org (Martin Panter) Date: Thu, 12 Feb 2015 11:30:06 +0000 Subject: [docs] [issue23453] Opening a stream with tarfile.open() triggers a TypeError: can't concat bytes to str error In-Reply-To: <1423739998.49.0.706967373594.issue23453@psf.upfronthosting.co.za> Message-ID: <1423740606.52.0.128608873869.issue23453@psf.upfronthosting.co.za> Martin Panter added the comment: Using fileobj=sys.stdin.buffer instead should do the trick. The ?tarfile? module would expect a binary stream, not a text stream. Given the documentation currently says, ?Use this variant in combination with e.g. sys.stdin, . . .?, I presume that is why you were using plain stdin. The documentation should be clarified. ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 13:06:47 2015 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 12 Feb 2015 12:06:47 +0000 Subject: [docs] [issue20521] [PATCH] Cleanup for "dis" module documentation In-Reply-To: <1391608572.54.0.381225308012.issue20521@psf.upfronthosting.co.za> Message-ID: <1423742807.87.0.779597485297.issue20521@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone review the patch please, it doesn't appear to contain anything that's contentious. ---------- nosy: +BreamoreBoy versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 14:21:24 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 12 Feb 2015 13:21:24 +0000 Subject: [docs] [issue20699] Document that binary IO classes work with bytes-likes objects In-Reply-To: <1392889792.36.0.922412998797.issue20699@psf.upfronthosting.co.za> Message-ID: <1423747284.24.0.781334495158.issue20699@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch LGTM. But native speaker should check documentation part. ---------- title: Behavior of ZipFile with file-like object and BufferedWriter. -> Document that binary IO classes work with bytes-likes objects _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:48:55 2015 From: report at bugs.python.org (Andrew Dalke) Date: Thu, 12 Feb 2015 18:48:55 +0000 Subject: [docs] [issue23455] file iterator "deemed broken"; can resume after StopIteration Message-ID: <1423766934.46.0.3718920034.issue23455@psf.upfronthosting.co.za> New submission from Andrew Dalke: The file iterator is "deemed broken". As I don't think it should be made non-broken, I suggest the documentation should be changed to point out when file iteration is broken. I also think the term 'broken' is a label with needlessly harsh connotations and should be softened. The iterator documentation uses the term 'broken' like this (quoting here from https://docs.python.org/3.4/library/stdtypes.html): Once an iterator?s __next__() method raises StopIteration, it must continue to do so on subsequent calls. Implementations that do not obey this property are deemed broken. (Older versions comment "This constraint was added in Python 2.3; in Python 2.2, various iterators are broken according to this rule.") An IOBase is supposed to support the iterator protocol (says https://docs.python.org/3.4/library/io.html#io.IOBase ). However, it does not, nor does the documentation say that it's broken in the face of a changing file (eg, when another process appends to a log file). % ./python.exe Python 3.5.0a1+ (default:4883f9046b10, Feb 11 2015, 04:30:46) [GCC 4.8.4] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> f = open("empty") >>> next(f) Traceback (most recent call last): File "", line 1, in StopIteration >>> >>> ^Z Suspended % echo "Hello!" >> empty % fg ./python.exe >>> next(f) 'Hello!\n' This is apparently well-known behavior, as I've come across several references to it on various Python-related lists, including this one from Miles in 2008: https://mail.python.org/pipermail/python-list/2008-September/491920.html . Strictly speaking, file objects are broken iterators: Fredrik Lundh in the same thread ( https://mail.python.org/pipermail/python-list/2008-September/521090.html ) says: it's a design guideline, not an absolute rule The 7+ years of 'broken' behavior in Python suggests that /F is correct. But while 'broken' could be considered a meaningless label, it carries with it some rather negative connotations. It sounds like developers are supposed to make every effort to avoid broken code, when that's not something Python itself does. It also means that my code can be called "broken" solely because it assumed Python file iterators are non-broken. I am not happy when people say my code is broken. It is entirely reasonable that a seek(0) would reset the state and cause next(it) to not continue to raise a StopIteration exception. However, errors can arise when using Python file objects, as an iterator, to parse a log file or any other files which are appended to by another process. Here's an example of code that can break. It extracts the first and last elements of an iterator; more specifically, the first and last lines of a file. If there are no lines it returns None for both values; and if there's only one line then it returns the same line as both values. def get_first_and_last_elements(it): first = last = next(it, None) for last in it: pass return first, last This code expects a non-broken iterator. If passed a file, and the file were 1) initially empty when the next() was called, and 2) appended to by the time Python reaches the for loop, then it's possible for first value to be None while last is a string. This is unexpected, undocumented, and may lead to subtle errors. There are work-arounds, like ensuring that the StopIteration only occurs once: def get_first_and_last_elements(it): first = last = next(it, None) if last is not None: for last in it: pass return first, last but much existing code expects non-broken iterators, such as the Python example implementation at https://docs.python.org/2/library/itertools.html#itertools.dropwhile . (I have a reproducible failure using it, a fork(), and a file iterator with a sleep() if that would prove useful.) Another option is to have a wrapper around file object iterators to keep raising StopIteration, like: def safe_iter(it): yield from it # -or- (line for line in file_iter) but people need to know to do this with file iterators or other potentially broken iterators. The current documentation does not say when file iterators are broken, and I don't know which other iterators are also broken. I realize this is a tricky issue. I don't think it's possible now to change the file's StopIteration behavior. I expect that there is code which depends on the current brokenness, the ability to seek() and re-iterate is useful, and the idea that next() returns text if and only if readline() is not empty is useful and well-entrenched. Pypy has the same behavior as CPython so any change will take some time to propagate to the other implementations. Instead, I'm fine with a documentation change in io.html . It currently says: IOBase (and its subclasses) support the iterator protocol, meaning that an IOBase object can be iterated over yielding the lines in a stream. Lines are defined slightly differently depending on whether the stream is a binary stream (yielding bytes), or a text stream (yielding unicode strings). See readline() below. I suggest adding something like: The file iterator does not completely follow the iterator protocol. If new data is added to the file after the iterator raises a StopIteration then next(file) will resume returning lines. The safest way to iterate over lines in a log file or other changing file is use a generator comprehension: (line for line in file) The iterator may also resume after using seek() to move the file position. You'll note that I failed to use the term "broken". This should really start The file iterator is broken. I find that term rather harsh, and since broken iterators are acceptable in Python, I suggest toning down or qualifying the use of "broken" in stdtypes.html. I have no suggestions for an improved version. ---------- assignee: docs at python components: Documentation messages: 235850 nosy: dalke, docs at python priority: normal severity: normal status: open title: file iterator "deemed broken"; can resume after StopIteration versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 12 19:55:28 2015 From: report at bugs.python.org (Ethan Furman) Date: Thu, 12 Feb 2015 18:55:28 +0000 Subject: [docs] [issue23455] file iterator "deemed broken"; can resume after StopIteration In-Reply-To: <1423766934.46.0.3718920034.issue23455@psf.upfronthosting.co.za> Message-ID: <1423767328.66.0.841218962343.issue23455@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 02:25:53 2015 From: report at bugs.python.org (Demian Brecht) Date: Fri, 13 Feb 2015 01:25:53 +0000 Subject: [docs] [issue21557] os.popen & os.system lack shell-related security warnings In-Reply-To: <1400794428.31.0.170474236819.issue21557@psf.upfronthosting.co.za> Message-ID: <1423790753.59.0.502830575949.issue21557@psf.upfronthosting.co.za> Changes by Demian Brecht : ---------- nosy: -demian.brecht _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 13 18:17:52 2015 From: report at bugs.python.org (Demian Brecht) Date: Fri, 13 Feb 2015 17:17:52 +0000 Subject: [docs] [issue23410] Document more BaseHTTPRequestHandler attributes In-Reply-To: <1423390877.64.0.272904715009.issue23410@psf.upfronthosting.co.za> Message-ID: <1423847872.46.0.825982979574.issue23410@psf.upfronthosting.co.za> Changes by Demian Brecht : ---------- nosy: +demian.brecht _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 00:55:31 2015 From: report at bugs.python.org (Berker Peksag) Date: Fri, 13 Feb 2015 23:55:31 +0000 Subject: [docs] [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <1423871731.5.0.27142069938.issue13637@psf.upfronthosting.co.za> Berker Peksag added the comment: The binascii documentation already says ``a2b_*`` functions accept Unicode strings containing only ASCII characters. [...] .. versionchanged:: 3.3 ASCII-only unicode strings are now accepted by the ``a2b_*`` functions. I think we can just remove versionchanged directives in fix_doc_binascii_unhexlify.v2.patch. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 01:12:59 2015 From: report at bugs.python.org (Martin Panter) Date: Sat, 14 Feb 2015 00:12:59 +0000 Subject: [docs] [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <1423872779.05.0.798467669956.issue13637@psf.upfronthosting.co.za> Martin Panter added the comment: That?s another option. Someone might wonder why a2b_hex() and a2b_qp() actually accept text strings in Python 3.1 when the documentation says you need 3.3, but I guess that?s not such a big deal. Posting patch v3 which removes the 3.2 notices. ---------- Added file: http://bugs.python.org/file38132/fix_doc_binascii_unhexlify.v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 02:36:05 2015 From: report at bugs.python.org (Demian Brecht) Date: Sat, 14 Feb 2015 01:36:05 +0000 Subject: [docs] [issue23410] Document more BaseHTTPRequestHandler attributes In-Reply-To: <1423390877.64.0.272904715009.issue23410@psf.upfronthosting.co.za> Message-ID: <1423877765.43.0.598694511631.issue23410@psf.upfronthosting.co.za> Demian Brecht added the comment: Minor comment in Rietveld, otherwise LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 18:55:16 2015 From: report at bugs.python.org (Berker Peksag) Date: Sat, 14 Feb 2015 17:55:16 +0000 Subject: [docs] [issue23406] interning and list comprehension leads to unexpected behavior In-Reply-To: <1423313726.28.0.32804996181.issue23406@psf.upfronthosting.co.za> Message-ID: <1423936516.25.0.0854995612433.issue23406@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +easy stage: -> needs patch type: -> enhancement versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 19:17:14 2015 From: report at bugs.python.org (Berker Peksag) Date: Sat, 14 Feb 2015 18:17:14 +0000 Subject: [docs] [issue12955] urllib.request example should use "with ... as:" In-Reply-To: <1315650628.73.0.673162910121.issue12955@psf.upfronthosting.co.za> Message-ID: <1423937834.77.0.126978782411.issue12955@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 19:53:37 2015 From: report at bugs.python.org (Stefan Krah) Date: Sat, 14 Feb 2015 18:53:37 +0000 Subject: [docs] [issue23460] Decimals do not obey ':g' exponential notation formatting rules In-Reply-To: <1423847721.13.0.666007782647.issue23460@psf.upfronthosting.co.za> Message-ID: <1423940017.24.0.920265574106.issue23460@psf.upfronthosting.co.za> Stefan Krah added the comment: For Decimal the cutoff point is -6 instead of -4 (following the decimal specification instead of the C standard). ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, skrah type: behavior -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 23:05:39 2015 From: report at bugs.python.org (Roundup Robot) Date: Sat, 14 Feb 2015 22:05:39 +0000 Subject: [docs] [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <20150214220535.72269.47734@psf.io> Roundup Robot added the comment: New changeset 8d32453dd0f7 by Berker Peksag in branch '3.4': Issue #13637: Remove outdated versionchanged directives. https://hg.python.org/cpython/rev/8d32453dd0f7 New changeset d3ca674cf716 by Berker Peksag in branch 'default': Issue #13637: Remove outdated versionchanged directives. https://hg.python.org/cpython/rev/d3ca674cf716 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 23:31:08 2015 From: report at bugs.python.org (Roundup Robot) Date: Sat, 14 Feb 2015 22:31:08 +0000 Subject: [docs] [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <20150214223054.126618.96491@psf.io> Roundup Robot added the comment: New changeset ad4a8176a71a by Berker Peksag in branch '3.4': Issue #13637: Improve exception message of a2b_* functions. https://hg.python.org/cpython/rev/ad4a8176a71a New changeset 55f5e960cc40 by Berker Peksag in branch 'default': Issue #13637: Improve exception message of a2b_* functions. https://hg.python.org/cpython/rev/55f5e960cc40 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 14 23:33:10 2015 From: report at bugs.python.org (Berker Peksag) Date: Sat, 14 Feb 2015 22:33:10 +0000 Subject: [docs] [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <1423953190.23.0.52347467197.issue13637@psf.upfronthosting.co.za> Berker Peksag added the comment: Thank you to both Vajrasky and Martin. ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 15 01:12:10 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 15 Feb 2015 00:12:10 +0000 Subject: [docs] [issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__ In-Reply-To: <1227464493.77.0.130820783094.issue4395@psf.upfronthosting.co.za> Message-ID: <1423959129.96.0.94808466869.issue4395@psf.upfronthosting.co.za> Martin Panter added the comment: Issue 21408 has been committed to 3.4 and 3.5 branches, so my patch can now be considered to document the newly fixed behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 15 05:00:28 2015 From: report at bugs.python.org (Martin Panter) Date: Sun, 15 Feb 2015 04:00:28 +0000 Subject: [docs] [issue23410] Document more BaseHTTPRequestHandler attributes In-Reply-To: <1423390877.64.0.272904715009.issue23410@psf.upfronthosting.co.za> Message-ID: <1423972828.81.0.174916601973.issue23410@psf.upfronthosting.co.za> Martin Panter added the comment: Posting another patch which hopefully explains the ?requestline? attribute a bit better. Let me know if you have any ideas for better wording. ---------- Added file: http://bugs.python.org/file38141/http-attributes.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 15 23:53:08 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 15 Feb 2015 22:53:08 +0000 Subject: [docs] [issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs In-Reply-To: <1389005031.99.0.692658963376.issue20140@psf.upfronthosting.co.za> Message-ID: <1424040788.63.0.694847720978.issue20140@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, the implementation of os.path is alright. There is a bug in distlib.resources. And the lack of os.path documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 16 00:51:18 2015 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 15 Feb 2015 23:51:18 +0000 Subject: [docs] [issue20140] UnicodeDecodeError in ntpath.py when home dir contains non-ascii signs In-Reply-To: <1389005031.99.0.692658963376.issue20140@psf.upfronthosting.co.za> Message-ID: <1424044278.83.0.747801861063.issue20140@psf.upfronthosting.co.za> Vinay Sajip added the comment: > There is a bug in distlib.resources. As far as I know, this is no longer the case - a change was made in distlib.resources to get around the problem: https://bitbucket.org/vinay.sajip/distlib/src/471427909ebbba2f4fa9f4cbc34f17bd2d31b8e3/distlib/resources.py?at=default#cl-31 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 16 07:24:00 2015 From: report at bugs.python.org (Berker Peksag) Date: Mon, 16 Feb 2015 06:24:00 +0000 Subject: [docs] [issue14512] Pydocs module docs server not working on Windows. In-Reply-To: <1333645625.74.0.578211515784.issue14512@psf.upfronthosting.co.za> Message-ID: <1424067840.88.0.481931159874.issue14512@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- stage: needs patch -> resolved _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 16 09:30:29 2015 From: report at bugs.python.org (Daniel) Date: Mon, 16 Feb 2015 08:30:29 +0000 Subject: [docs] [issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation Message-ID: <1424075429.03.0.707318894375.issue23471@psf.upfronthosting.co.za> New submission from Daniel: Via Chrome on Android 4.4. ---------- assignee: docs at python components: Documentation messages: 236095 nosy: docs at python, stringsonfire priority: normal severity: normal status: open title: 404 Not Found when downloading Python 3.4.3rc1 Documentation type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 16 09:42:27 2015 From: report at bugs.python.org (SilentGhost) Date: Mon, 16 Feb 2015 08:42:27 +0000 Subject: [docs] [issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation In-Reply-To: <1424075429.03.0.707318894375.issue23471@psf.upfronthosting.co.za> Message-ID: <1424076147.32.0.806821845539.issue23471@psf.upfronthosting.co.za> SilentGhost added the comment: This is the page: https://docs.python.org/3/download.html also true about the 3.5 at https://docs.python.org/3.5/download.html All the links in the table result in 404. Clearly the files are not at https://docs.python.org/3/archives/ ---------- nosy: +SilentGhost versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 16 10:01:48 2015 From: report at bugs.python.org (STINNER Victor) Date: Mon, 16 Feb 2015 09:01:48 +0000 Subject: [docs] [issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation In-Reply-To: <1424075429.03.0.707318894375.issue23471@psf.upfronthosting.co.za> Message-ID: <1424077308.54.0.921655679064.issue23471@psf.upfronthosting.co.za> STINNER Victor added the comment: I confirm that all links on this page lead to HTTP 404 errors: https://docs.python.org/3/download.html Same error for "dev" (3.5) version: https://docs.python.org/dev/download.html Python 2 doc can be downloaded: https://docs.python.org/2/download.html ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 16 10:20:23 2015 From: report at bugs.python.org (Berker Peksag) Date: Mon, 16 Feb 2015 09:20:23 +0000 Subject: [docs] [issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation In-Reply-To: <1424075429.03.0.707318894375.issue23471@psf.upfronthosting.co.za> Message-ID: <1424078423.87.0.0126167334368.issue23471@psf.upfronthosting.co.za> Berker Peksag added the comment: I thought this was fixed by issue 22484 ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From tkrieger at cardinalpeak.com Thu Feb 12 18:23:59 2015 From: tkrieger at cardinalpeak.com (Ted Krieger) Date: Thu, 12 Feb 2015 10:23:59 -0700 Subject: [docs] Python Docs unavailable Message-ID: <54DCE1AF.5090104@cardinalpeak.com> It looks like you messed up the 'Download Python Documentation' page yesterday. When I go to https://docs.python.org/3/download.html And click on any of the 'Download' links, I get the dreaded '404 Not Found' page. From jwalton47 at gmail.com Thu Feb 12 20:30:51 2015 From: jwalton47 at gmail.com (John Walton) Date: Thu, 12 Feb 2015 11:30:51 -0800 Subject: [docs] Format: Packed as .zip failed to download Message-ID: Download Python 3.4.3rc1 Documentation *Last updated on: Feb 11, 2015.* To download an archive containing all the documents for this version of Python in one of various formats, follow one of links in this table. The numbers in the table are the size of the download files in megabytes. FormatPacked as .zip All of them 404 Not Found ------------------------------ nginx -- More later, John Walton -------------- next part -------------- An HTML attachment was scrubbed... URL: From aleks.tolev at googlemail.com Fri Feb 13 09:11:09 2015 From: aleks.tolev at googlemail.com (Aleksandar Tolev) Date: Fri, 13 Feb 2015 09:11:09 +0100 Subject: [docs] Download of documentation not possible Message-ID: Dear python support, your download for the python documentation leads to a 404 Not found page (see screenshot). Please fix that because i want to download the epub version. Best regards and thanks [image: Inline-Bild 1] Aleks -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 44636 bytes Desc: not available URL: From demianbrecht at gmail.com Sat Feb 14 02:35:35 2015 From: demianbrecht at gmail.com (demianbrecht at gmail.com) Date: Sat, 14 Feb 2015 01:35:35 -0000 Subject: [docs] Document more BaseHTTPRequestHandler attributes (issue 23410) Message-ID: <20150214013535.9676.91263@psf.upfronthosting.co.za> http://bugs.python.org/review/23410/diff/13865/Doc/library/http.server.rst File Doc/library/http.server.rst (right): http://bugs.python.org/review/23410/diff/13865/Doc/library/http.server.rst#newcode79 Doc/library/http.server.rst:79: public methods, even if no actual line has been parsed from I may be misinterpreting either what you're saying here or what's actually going on in server.py, but it seems to me that if a line isn't parsed from the request, the connection is simply closed and no further methods are called. From what you have here, it sounds more like server execution will continue even if there isn't a request line parsed. http://bugs.python.org/review/23410/ From vadmium+py at gmail.com Sun Feb 15 04:03:34 2015 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Sun, 15 Feb 2015 03:03:34 -0000 Subject: [docs] Document more BaseHTTPRequestHandler attributes (issue 23410) Message-ID: <20150215030334.30679.97921@psf.upfronthosting.co.za> Reviewers: demian, https://bugs.python.org/review/23410/diff/13865/Doc/library/http.server.rst File Doc/library/http.server.rst (right): https://bugs.python.org/review/23410/diff/13865/Doc/library/http.server.rst#newcode79 Doc/library/http.server.rst:79: public methods, even if no actual line has been parsed from On 2015/02/14 02:35:35, demian wrote: > I may be misinterpreting either what you're saying here or what's actually going > on in server.py, but it seems to me that if a line isn't parsed from the > request, the connection is simply closed and no further methods are called. From > what you have here, it sounds more like server execution will continue even if > there isn't a request line parsed. The basic implementation actually sets requestline = "" and sends a REQUEST_URI_TOO_LONG (414) response in one case, before dropping the connection. In any case, the log_request() method requires requestline to be set, and it is called by send_response(). I will try to explain this better in an updated patch. Please review this at https://bugs.python.org/review/23410/ Affected files: Doc/library/http.server.rst Lib/http/server.py Lib/test/test_httpservers.py # HG changeset patch # Parent 5ea093a41198b7ca4d8fc4f8d626cbf2aacc81ed diff -r 5ea093a41198 Doc/library/http.server.rst --- a/Doc/library/http.server.rst Sat Feb 07 22:20:48 2015 -0800 +++ b/Doc/library/http.server.rst Sun Feb 08 10:17:45 2015 +0000 @@ -65,6 +65,20 @@ Contains the server instance. + .. attribute:: close_connection + + Flag that should be set before :meth:`handle_one_request` returns, + indicating if another request may be expected, or if the connection + should be shut down. + + .. attribute:: requestline + + Normally contains the HTTP request line except for the + terminating CRLF, as a text string. This is always set by the + :meth:`handle_one_request` method before it invokes other + public methods, even if no actual line has been parsed from + the request. + .. attribute:: command Contains the command (request type). For example, ``'GET'``. diff -r 5ea093a41198 Lib/http/server.py --- a/Lib/http/server.py Sat Feb 07 22:20:48 2015 -0800 +++ b/Lib/http/server.py Sun Feb 08 10:17:45 2015 +0000 @@ -272,7 +272,7 @@ """ self.command = None # set in case of error on the first line self.request_version = version = self.default_request_version - self.close_connection = 1 + self.close_connection = True requestline = str(self.raw_requestline, 'iso-8859-1') requestline = requestline.rstrip('\r\n') self.requestline = requestline @@ -302,7 +302,7 @@ "Bad request version (%r)" % version) return False if version_number >= (1, 1) and self.protocol_version >= "HTTP/1.1": - self.close_connection = 0 + self.close_connection = False if version_number >= (2, 0): self.send_error( HTTPStatus.HTTP_VERSION_NOT_SUPPORTED, @@ -310,7 +310,7 @@ return False elif len(words) == 2: command, path = words - self.close_connection = 1 + self.close_connection = True if command != 'GET': self.send_error( HTTPStatus.BAD_REQUEST, @@ -337,10 +337,10 @@ conntype = self.headers.get('Connection', "") if conntype.lower() == 'close': - self.close_connection = 1 + self.close_connection = True elif (conntype.lower() == 'keep-alive' and self.protocol_version >= "HTTP/1.1"): - self.close_connection = 0 + self.close_connection = False # Examine the headers and look for an Expect directive expect = self.headers.get('Expect', "") if (expect.lower() == "100-continue" and @@ -385,7 +385,7 @@ self.send_error(HTTPStatus.REQUEST_URI_TOO_LONG) return if not self.raw_requestline: - self.close_connection = 1 + self.close_connection = True return if not self.parse_request(): # An error code has been sent, just exit @@ -402,12 +402,12 @@ except socket.timeout as e: #a read or a write timed out. Discard this connection self.log_error("Request timed out: %r", e) - self.close_connection = 1 + self.close_connection = True return def handle(self): """Handle multiple requests if necessary.""" - self.close_connection = 1 + self.close_connection = True self.handle_one_request() while not self.close_connection: @@ -493,9 +493,9 @@ if keyword.lower() == 'connection': if value.lower() == 'close': - self.close_connection = 1 + self.close_connection = True elif value.lower() == 'keep-alive': - self.close_connection = 0 + self.close_connection = False def end_headers(self): """Send the blank line ending the MIME headers.""" diff -r 5ea093a41198 Lib/test/test_httpservers.py --- a/Lib/test/test_httpservers.py Sat Feb 07 22:20:48 2015 -0800 +++ b/Lib/test/test_httpservers.py Sun Feb 08 10:17:45 2015 +0000 @@ -616,6 +616,11 @@ self.verify_expected_headers(result[1:-1]) self.verify_get_called() self.assertEqual(result[-1], b'Data\r\n') + self.assertEqual(self.handler.requestline, 'GET / HTTP/1.1') + self.assertEqual(self.handler.command, 'GET') + self.assertEqual(self.handler.path, '/') + self.assertEqual(self.handler.request_version, 'HTTP/1.1') + self.assertSequenceEqual(self.handler.headers.values(), ()) def test_http_1_0(self): result = self.send_typical_request(b'GET / HTTP/1.0\r\n\r\n') @@ -623,6 +628,11 @@ self.verify_expected_headers(result[1:-1]) self.verify_get_called() self.assertEqual(result[-1], b'Data\r\n') + self.assertEqual(self.handler.requestline, 'GET / HTTP/1.0') + self.assertEqual(self.handler.command, 'GET') + self.assertEqual(self.handler.path, '/') + self.assertEqual(self.handler.request_version, 'HTTP/1.0') + self.assertSequenceEqual(self.handler.headers.values(), ()) def test_http_0_9(self): result = self.send_typical_request(b'GET / HTTP/0.9\r\n\r\n') @@ -636,6 +646,12 @@ self.verify_expected_headers(result[1:-1]) self.verify_get_called() self.assertEqual(result[-1], b'Data\r\n') + self.assertEqual(self.handler.requestline, 'GET / HTTP/1.0') + self.assertEqual(self.handler.command, 'GET') + self.assertEqual(self.handler.path, '/') + self.assertEqual(self.handler.request_version, 'HTTP/1.0') + headers = (("Expect", "100-continue"),) + self.assertSequenceEqual(self.handler.headers.items(), headers) def test_with_continue_1_1(self): result = self.send_typical_request(b'GET / HTTP/1.1\r\nExpect: 100-continue\r\n\r\n') @@ -645,6 +661,12 @@ self.verify_expected_headers(result[2:-1]) self.verify_get_called() self.assertEqual(result[-1], b'Data\r\n') + self.assertEqual(self.handler.requestline, 'GET / HTTP/1.1') + self.assertEqual(self.handler.command, 'GET') + self.assertEqual(self.handler.path, '/') + self.assertEqual(self.handler.request_version, 'HTTP/1.1') + headers = (("Expect", "100-continue"),) + self.assertSequenceEqual(self.handler.headers.items(), headers) def test_header_buffering_of_send_error(self): @@ -730,6 +752,7 @@ result = self.send_typical_request(b'GET ' + b'x' * 65537) self.assertEqual(result[0], b'HTTP/1.1 414 Request-URI Too Long\r\n') self.assertFalse(self.handler.get_called) + self.assertIsInstance(self.handler.requestline, str) def test_header_length(self): # Issue #6791: same for headers @@ -737,6 +760,22 @@ b'GET / HTTP/1.1\r\nX-Foo: bar' + b'r' * 65537 + b'\r\n\r\n') self.assertEqual(result[0], b'HTTP/1.1 400 Line too long\r\n') self.assertFalse(self.handler.get_called) + self.assertEqual(self.handler.requestline, 'GET / HTTP/1.1') + + def test_close_connection(self): + # handle_one_request() should be repeatedly called until + # it sets close_connection + def handle_one_request(): + self.handler.close_connection = next(exit_values) + self.handler.handle_one_request = handle_one_request + + exit_values = iter((True,)) + self.handler.handle() + self.assertRaises(StopIteration, next, exit_values) + + exit_values = iter((False, False, True)) + self.handler.handle() + self.assertRaises(StopIteration, next, exit_values) class SimpleHTTPRequestHandlerTestCase(unittest.TestCase): """ Test url parsing """ From kfarwell at member.fsf.org Mon Feb 16 01:03:38 2015 From: kfarwell at member.fsf.org (Kyle Farwell) Date: Sun, 15 Feb 2015 19:03:38 -0500 Subject: [docs] Broken doc download links Message-ID: <20150216000338.GA23827@itsuka.lan> The zip archives and tarballs at for all formats are coming up with 404 errors. Kyle Farwell -- I'm an FSF member -- Help us support software freedom! -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 181 bytes Desc: not available URL: From demianbrecht at gmail.com Mon Feb 16 16:35:47 2015 From: demianbrecht at gmail.com (demianbrecht at gmail.com) Date: Mon, 16 Feb 2015 15:35:47 -0000 Subject: [docs] Document more BaseHTTPRequestHandler attributes (issue 23410) Message-ID: <20150216153547.20689.12817@psf.upfronthosting.co.za> http://bugs.python.org/review/23410/diff/13940/Doc/library/http.server.rst File Doc/library/http.server.rst (right): http://bugs.python.org/review/23410/diff/13940/Doc/library/http.server.rst#newcode76 Doc/library/http.server.rst:76: Normally contains the HTTP request line except for the I might simplify this to something like: "Once a valid request has been processed by handle_one_request, requestline should contain the string representation of the HTTP request line. The terminating CRLF is stripped." I don't think that getting into higher level behaviour (i.e. logging) should be detailed here. http://bugs.python.org/review/23410/ From yesser.in2010 at gmail.com Sun Feb 15 11:27:27 2015 From: yesser.in2010 at gmail.com (Yesser Mghili) Date: Sun, 15 Feb 2015 11:27:27 +0100 Subject: [docs] (no subject) Message-ID: hi i have a problem when i gong to download the download python documentation a i see a 404 window -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Mon Feb 16 22:00:55 2015 From: report at bugs.python.org (Julian Berman) Date: Mon, 16 Feb 2015 21:00:55 +0000 Subject: [docs] [issue20598] argparse docs: '7'.split() is confusing magic In-Reply-To: <1392132505.16.0.864715722344.issue20598@psf.upfronthosting.co.za> Message-ID: <1424120455.36.0.738631040883.issue20598@psf.upfronthosting.co.za> Julian Berman added the comment: +1 to lists all over, this is just confusing. ---------- nosy: +Julian _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 17 03:14:26 2015 From: report at bugs.python.org (Berker Peksag) Date: Tue, 17 Feb 2015 02:14:26 +0000 Subject: [docs] [issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation In-Reply-To: <1424075429.03.0.707318894375.issue23471@psf.upfronthosting.co.za> Message-ID: <1424139266.25.0.102559281354.issue23471@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 17 05:04:36 2015 From: report at bugs.python.org (Martin Panter) Date: Tue, 17 Feb 2015 04:04:36 +0000 Subject: [docs] [issue23410] Document more BaseHTTPRequestHandler attributes In-Reply-To: <1423390877.64.0.272904715009.issue23410@psf.upfronthosting.co.za> Message-ID: <1424145876.18.0.285207153.issue23410@psf.upfronthosting.co.za> Martin Panter added the comment: Posting patch v3. It is based on Demian?s suggested wording for the requestline attribute, but adjusted to match the other entries, and to mention the empty string. ---------- Added file: http://bugs.python.org/file38157/http-attributes.v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 17 06:05:39 2015 From: report at bugs.python.org (Demian Brecht) Date: Tue, 17 Feb 2015 05:05:39 +0000 Subject: [docs] [issue23410] Document more BaseHTTPRequestHandler attributes In-Reply-To: <1423390877.64.0.272904715009.issue23410@psf.upfronthosting.co.za> Message-ID: <1424149539.27.0.851943071885.issue23410@psf.upfronthosting.co.za> Demian Brecht added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 17 06:06:41 2015 From: report at bugs.python.org (Demian Brecht) Date: Tue, 17 Feb 2015 05:06:41 +0000 Subject: [docs] [issue23410] Document more BaseHTTPRequestHandler attributes In-Reply-To: <1423390877.64.0.272904715009.issue23410@psf.upfronthosting.co.za> Message-ID: <1424149601.79.0.436826421981.issue23410@psf.upfronthosting.co.za> Demian Brecht added the comment: Added Library component as there are a few newly added tests as well though and cosmetic changes were made to server.py. ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 17 06:28:48 2015 From: report at bugs.python.org (Berker Peksag) Date: Tue, 17 Feb 2015 05:28:48 +0000 Subject: [docs] [issue23410] Document more BaseHTTPRequestHandler attributes In-Reply-To: <1423390877.64.0.272904715009.issue23410@psf.upfronthosting.co.za> Message-ID: <1424150928.33.0.687166409023.issue23410@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 17 09:19:55 2015 From: report at bugs.python.org (Roundup Robot) Date: Tue, 17 Feb 2015 08:19:55 +0000 Subject: [docs] [issue22883] Get rid of references to PyInt in Py3 sources In-Reply-To: <1416147146.5.0.625860400609.issue22883@psf.upfronthosting.co.za> Message-ID: <20150217081945.62561.47109@psf.io> Roundup Robot added the comment: New changeset 2f0c1937d716 by Serhiy Storchaka in branch 'default': Issue #22883: Got rid of outdated references to PyInt and PyString in comments. https://hg.python.org/cpython/rev/2f0c1937d716 New changeset c8d08de14030 by Serhiy Storchaka in branch '3.4': Issue #22883: Update PyInt to PyLong in C API example. https://hg.python.org/cpython/rev/c8d08de14030 New changeset c0b2dacef35c by Serhiy Storchaka in branch 'default': Issue #22883: Update PyInt to PyLong in C API example. https://hg.python.org/cpython/rev/c0b2dacef35c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 17 09:32:30 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 17 Feb 2015 08:32:30 +0000 Subject: [docs] [issue22883] Get rid of references to PyInt in Py3 sources In-Reply-To: <1416147146.5.0.625860400609.issue22883@psf.upfronthosting.co.za> Message-ID: <1424161950.92.0.649201172833.issue22883@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 17 17:46:13 2015 From: report at bugs.python.org (PJ Eby) Date: Tue, 17 Feb 2015 16:46:13 +0000 Subject: [docs] [issue18610] wsgiref.validate expects wsgi.input read to give exactly one arg In-Reply-To: <1375310901.82.0.276465395742.issue18610@psf.upfronthosting.co.za> Message-ID: <1424191573.27.0.781133617065.issue18610@psf.upfronthosting.co.za> PJ Eby added the comment: This is a misreading of the spec. The read() method is defined as taking exactly one parameter. The server *should* support it being optional, but the app invoking it without an argument is not compliant, and wsgiref.validate is validating that the *app* performs according to spec, not the server. Therefore, the documentation is what's in error, not the code. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 17 18:55:47 2015 From: report at bugs.python.org (Robin Schoonover) Date: Tue, 17 Feb 2015 17:55:47 +0000 Subject: [docs] [issue18610] wsgiref.validate expects wsgi.input read to give exactly one arg In-Reply-To: <1375310901.82.0.276465395742.issue18610@psf.upfronthosting.co.za> Message-ID: <1424195747.36.0.487064838995.issue18610@psf.upfronthosting.co.za> Robin Schoonover added the comment: I'm not sure I follow, as it has little to say on whether the application's expected behavior here, and only a recommendation that the server allow it. But, it also defers to the "Python Standard Library", which does have an opinion. I feel that (in hindsight) the exact behavior of each method should have been specified in full. *However*, even if I differ on the reading of the spec, on general principle (and this has changed since I first wrote the issue) I agree that the application should not be omitting it anyway, because reading the entire response at once without checking the content length is dangerous. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 18 03:13:38 2015 From: report at bugs.python.org (Roundup Robot) Date: Wed, 18 Feb 2015 02:13:38 +0000 Subject: [docs] [issue23410] Document more BaseHTTPRequestHandler attributes In-Reply-To: <1423390877.64.0.272904715009.issue23410@psf.upfronthosting.co.za> Message-ID: <20150218021334.72269.89502@psf.io> Roundup Robot added the comment: New changeset f9ff2a5bbbe2 by Benjamin Peterson in branch '3.4': document the requestline and close_connection attributes, use real booleans, and add tests (closes #23410) https://hg.python.org/cpython/rev/f9ff2a5bbbe2 New changeset 6e3e252cf047 by Benjamin Peterson in branch 'default': merge 3.4 (#23410) https://hg.python.org/cpython/rev/6e3e252cf047 ---------- nosy: +python-dev resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 18 07:06:52 2015 From: report at bugs.python.org (R. David Murray) Date: Wed, 18 Feb 2015 06:06:52 +0000 Subject: [docs] [issue23427] Python should expose command when invoked with -c In-Reply-To: <1423516168.08.0.69949754755.issue23427@psf.upfronthosting.co.za> Message-ID: <1424239612.03.0.206839140375.issue23427@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 18 17:22:14 2015 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 18 Feb 2015 16:22:14 +0000 Subject: [docs] [issue9913] Misc/SpecialBuilds.txt is out of date In-Reply-To: <1285084668.56.0.665403194927.issue9913@psf.upfronthosting.co.za> Message-ID: <1424276534.73.0.59800883047.issue9913@psf.upfronthosting.co.za> Mark Lawrence added the comment: This file has been updated with the most recent revision being r90052. Can we close this as out of date? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 18 18:37:49 2015 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 18 Feb 2015 17:37:49 +0000 Subject: [docs] [issue9913] Misc/SpecialBuilds.txt is out of date In-Reply-To: <1285084668.56.0.665403194927.issue9913@psf.upfronthosting.co.za> Message-ID: <1424281069.86.0.604186099371.issue9913@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Actually, the real improvements came in changeset 67177:01714efdc6cf. Closing. ---------- resolution: -> out of date stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 18 20:27:04 2015 From: report at bugs.python.org (PJ Eby) Date: Wed, 18 Feb 2015 19:27:04 +0000 Subject: [docs] [issue18610] wsgiref.validate expects wsgi.input read to give exactly one arg In-Reply-To: <1375310901.82.0.276465395742.issue18610@psf.upfronthosting.co.za> Message-ID: <1424287624.44.0.58941145863.issue18610@psf.upfronthosting.co.za> PJ Eby added the comment: This area of the spec is different between 333 and 3333 precisely to clarify this point, without technically changing conformance requirements. PEP 333 was supposed to require the app to supply an argument, while PEP 3333 was changed to encourage the server to allow the app to omit it. It's an annoying grey area in the spec itself, but not at all a grey area for for the validation tool, which is supposed to validate the strictest interpretation of the spec. A conformant server is allowed to not work with a missing argument, so it's a bad idea for your app to omit it if you want to run on all conformant servers. (And this is entirely independent of whether it's a good idea to read the entire stream in the first place.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 18 23:38:55 2015 From: report at bugs.python.org (SilentGhost) Date: Wed, 18 Feb 2015 22:38:55 +0000 Subject: [docs] [issue23480] Minor typo In-Reply-To: <1424298237.21.0.795168205464.issue23480@psf.upfronthosting.co.za> Message-ID: <1424299135.78.0.239770672372.issue23480@psf.upfronthosting.co.za> SilentGhost added the comment: If you run the command in your interpreter you'll see that the output is correct. ---------- assignee: -> docs at python components: +Documentation -Demos and Tools nosy: +SilentGhost, docs at python resolution: -> not a bug status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 18 23:41:20 2015 From: report at bugs.python.org (Martin Panter) Date: Wed, 18 Feb 2015 22:41:20 +0000 Subject: [docs] [issue23480] Minor typo In-Reply-To: <1424298237.21.0.795168205464.issue23480@psf.upfronthosting.co.za> Message-ID: <1424299280.25.0.759134951038.issue23480@psf.upfronthosting.co.za> Martin Panter added the comment: It returns a string, and the print statement/function prints the contents of that string. Perhaps you are confused between JSON strings, which appear in the output, and Python strings, which hold the characters to output. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 19 17:24:20 2015 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 19 Feb 2015 16:24:20 +0000 Subject: [docs] [issue9119] Python download page needs to mention crypto code in Windows installer In-Reply-To: <1277836658.93.0.259031299275.issue9119@psf.upfronthosting.co.za> Message-ID: <1424363060.68.0.240272842854.issue9119@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Terry it does not look as if the download pages were ever updated so can you follow this up please? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 19 20:45:32 2015 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 19 Feb 2015 19:45:32 +0000 Subject: [docs] [issue9119] Python download page needs to mention crypto code in Windows installer In-Reply-To: <1277836658.93.0.259031299275.issue9119@psf.upfronthosting.co.za> Message-ID: <1424375132.49.0.906952569639.issue9119@psf.upfronthosting.co.za> Terry J. Reedy added the comment: No, this is really out of my ballpark. ---------- versions: +Python 3.5 -Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From storchaka at gmail.com Thu Feb 19 22:39:45 2015 From: storchaka at gmail.com (storchaka at gmail.com) Date: Thu, 19 Feb 2015 21:39:45 -0000 Subject: [docs] Behavior of ZipFile with file-like object and BufferedWriter. (issue 20699) Message-ID: <20150219213945.16220.980@psf.upfronthosting.co.za> http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst File Doc/library/io.rst (right): http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode404 Doc/library/io.rst:404: be less than the number of bytes in *b*, On 2015/02/19 22:12:27, r.david.murray wrote: > I think len(b) is better here. It is more precise..."number of bytes" might > refer to something other than the length of the buffer. Because len(b) is not correct. write(array('I', [1, 2, 3])) writes 12 bytes, while len() of the argument is 3. http://bugs.python.org/review/20699/ From report at bugs.python.org Fri Feb 20 03:05:25 2015 From: report at bugs.python.org (Martin Panter) Date: Fri, 20 Feb 2015 02:05:25 +0000 Subject: [docs] [issue12855] linebreak sequences should be better documented In-Reply-To: <1314654150.68.0.797504547224.issue12855@psf.upfronthosting.co.za> Message-ID: <1424397925.62.0.436087697885.issue12855@psf.upfronthosting.co.za> Martin Panter added the comment: Posting linebreakdoc.v3.py3.5.patch: * Rebased onto recent ?default? (3.5) branch * Add missing 1C?1E codes * Dropped reference to ?universal newlines?, since that only handles CRs and LFs as I understand it The newlines are already tested by test_unicodedata.UnicodeMiscTest.test_linebreak_7643() when the VT and FF codes were added in Issue 7643. ---------- Added file: http://bugs.python.org/file38179/linebreakdoc.v3.py3.5.patch _______________________________________ Python tracker _______________________________________ From dugt69 at hotmail.com Tue Feb 17 05:24:05 2015 From: dugt69 at hotmail.com (Doug Taylor) Date: Mon, 16 Feb 2015 20:24:05 -0800 Subject: [docs] (404 not found) Download Python 3.4.3rc1 Documentation Message-ID: Download Python 3.4.3rc1 DocumentationAll downloads for above docs not working (404 not found). Thanks Doug -------------- next part -------------- An HTML attachment was scrubbed... URL: From yaniv.sayeh at blazemeter.com Tue Feb 17 08:48:05 2015 From: yaniv.sayeh at blazemeter.com (Yaniv Sayeh) Date: Tue, 17 Feb 2015 09:48:05 +0200 Subject: [docs] Misspelling in copy_reg Message-ID: In https://docs.python.org/2/library/copy_reg.html, execute this: s/fuction/function/g . -------------- next part -------------- An HTML attachment was scrubbed... URL: From David.Kovanen at innovator.com Tue Feb 17 17:51:52 2015 From: David.Kovanen at innovator.com (Kovanen, David) Date: Tue, 17 Feb 2015 23:51:52 +0700 Subject: [docs] I get 404 error when trying to download documents Message-ID: On this page I try to download the PDF version of documents in any of the formats (US/A4 and zip/tar) but only get a 404 error from the link. Here is the page to the links: https://docs.python.org/3.4/download.html From yappyta at gmail.com Wed Feb 18 18:36:40 2015 From: yappyta at gmail.com (Pet Yap) Date: Wed, 18 Feb 2015 09:36:40 -0800 Subject: [docs] A list arg with default value inside function got appended each time the function is called Message-ID: I have a function (test) with a list variable APP and declared its default as an empty list [], while APP is not a global variable, if I execute the same function multiple times, each time the APP will get appended. To workaround this problem, I need to do APP.pop() inside the function or explicitly called the function with an argument (test([])). del APP or reassign APP=[] inside the function does not resolve the problem same thing happens if the function is defined as an method inside a class. Here is a little test program for testing: def test(APP=[]): if len(APP) == 0: APP.append('1abc') print "APP=", APP APP.append('2def') class test1 (object): def t1(self, abc=[]): abc.append('abc') print abc if __name__ == '__main__': print "class test" t = test1() i = 0 while i < 3: t.t1() i += 1 print "Test function::" i = 0 while i < 3: test() i += 1 Here are the output: class test ['abc'] ['abc', 'abc'] ['abc', 'abc', 'abc'] Test function:: APP= ['1abc'] APP= ['1abc', '2def'] APP= ['1abc', '2def', '2def'] -------------- next part -------------- An HTML attachment was scrubbed... URL: From eliduvid at yandex.com Thu Feb 19 01:08:46 2015 From: eliduvid at yandex.com (eliduvid) Date: Wed, 18 Feb 2015 19:08:46 -0500 Subject: [docs] Problem with downloading the docs Message-ID: <7e033409-63a4-484a-b12e-05a55be1aa19@email.android.com> When I'm trying to download epab docs for python 3.4, it's showing me 404. Same thing with plain text and html. Browser opera for Android. ??????? ????? mySecureMail http://mysecurephone.pl/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From psaurav at usc.edu Thu Feb 19 01:10:23 2015 From: psaurav at usc.edu (Paritosh Saurav) Date: Wed, 18 Feb 2015 16:10:23 -0800 Subject: [docs] Issue in downloading the Python 3.4.3rc1 Documentation Message-ID: Hi, I am facing an issue while I am downloading the "Python 3.4.3rc1 Documentation ?". Can you please resolve it.? I am having 404 NOT Found error. *Regards* *Paritosh Saurav* *+1-213-294-9930* -------------- next part -------------- An HTML attachment was scrubbed... URL: From tgmiller5 at hotmail.com Thu Feb 19 17:31:53 2015 From: tgmiller5 at hotmail.com (Tammy Miller) Date: Thu, 19 Feb 2015 11:31:53 -0500 Subject: [docs] starting with python documentation Message-ID: I am very new with python and wanted to assist in helping with the documentation. I have a some questions as I read the documentation. 1. Should I just download Sphinx since I have a windows 8 machine? Or should I down Jinja as well?2. Am I supposed to clone the documentation after sphinx has been downloaded? 3. How do I know that I am looking at the correct documentation to modifications after questions 1 and 2. -------------- next part -------------- An HTML attachment was scrubbed... URL: From triddle at wvup.edu Thu Feb 19 21:27:04 2015 From: triddle at wvup.edu (Thomas Riddle) Date: Thu, 19 Feb 2015 15:27:04 -0500 Subject: [docs] broken links on https://docs.python.org/3/download.html Message-ID: <79b9a9781daad2c9ffd1eabdb715214b@mail.gmail.com> None of the zip links work Tom Riddle 304-481-5226 -------------- next part -------------- An HTML attachment was scrubbed... URL: From rdmurray at bitdance.com Thu Feb 19 22:12:27 2015 From: rdmurray at bitdance.com (rdmurray at bitdance.com) Date: Thu, 19 Feb 2015 21:12:27 -0000 Subject: [docs] Behavior of ZipFile with file-like object and BufferedWriter. (issue 20699) Message-ID: <20150219211227.18818.32891@psf.upfronthosting.co.za> http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst File Doc/library/io.rst (right): http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode396 Doc/library/io.rst:396: :term:`bytes-like ` buffer *b*, and return the I think 'buffer' should be 'object'. http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode404 Doc/library/io.rst:404: be less than the number of bytes in *b*, I think len(b) is better here. It is more precise..."number of bytes" might refer to something other than the length of the buffer. http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode481 Doc/library/io.rst:481: ` buffer *b* and return the number of bytes read. Why drop the 'len'? It is more precise. Again I prefer object to buffer. http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode492 Doc/library/io.rst:492: ` buffer *b*, using at most one call to As above. http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode504 Doc/library/io.rst:504: of bytes written (always equal to the number of bytes in *b*, since if Do you understand the reason for the original wording? Are there circumstances where more bytes are written? And again, I prefer 'len(b)' to 'number of bytes in b'. http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode589 Doc/library/io.rst:589: optional initial :term:`bytes-like object` data. This should be "The argument *initial_bytes* is a :term:`bytes-like object` that contains initial data." http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode686 Doc/library/io.rst:686: Write the :term:`bytes-like object` object, *b*, and return the Looks like there's an extra 'object' here, but I didn't generate the docs to check. http://bugs.python.org/review/20699/ From vadmium+py at gmail.com Fri Feb 20 01:20:03 2015 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Fri, 20 Feb 2015 00:20:03 -0000 Subject: [docs] Behavior of ZipFile with file-like object and BufferedWriter. (issue 20699) Message-ID: <20150220002003.18818.25815@psf.upfronthosting.co.za> http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst File Doc/library/io.rst (right): http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode396 Doc/library/io.rst:396: :term:`bytes-like ` buffer *b*, and return the On 2015/02/19 22:12:27, r.david.murray wrote: > I think 'buffer' should be 'object'. Yes that is probably better. Maybe I originally wrote ?buffer? before I added the pre-allocated writable adjectives. http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode404 Doc/library/io.rst:404: be less than the number of bytes in *b*, On 2015/02/19 22:39:45, storchaka wrote: > On 2015/02/19 22:12:27, r.david.murray wrote: > > I think len(b) is better here. It is more precise..."number of bytes" might > > refer to something other than the length of the buffer. > > Because len(b) is not correct. write(array('I', [1, 2, 3])) writes 12 bytes, > while len() of the argument is 3. Indeed. A bytes-like object does not even have to implement len(); see the byteslike() factory I added in test_io.py. http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode504 Doc/library/io.rst:504: of bytes written (always equal to the number of bytes in *b*, since if On 2015/02/19 22:12:27, r.david.murray wrote: > Do you understand the reason for the original wording? Are there circumstances > where more bytes are written? I don?t know, but I wondered if it was just to contrast with RawIOBase.write(). RawIOBase can return less, but BufferedIOBase never returns less. This wording seems to originate from Guido?s doc string in 2007: . In my mind it does not make sense to say you have written more bytes than given, especially when it is impossible to have written less. Where would those extra bytes come from? Let me know if you think I should restore it to ?never less than?. However I think saying ?always greater than or equal to? would be a step backwards. http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode589 Doc/library/io.rst:589: optional initial :term:`bytes-like object` data. On 2015/02/19 22:12:27, r.david.murray wrote: > This should be "The argument *initial_bytes* is a :term:`bytes-like object` that > contains initial data." Agreed. http://bugs.python.org/review/20699/diff/13912/Doc/library/io.rst#newcode686 Doc/library/io.rst:686: Write the :term:`bytes-like object` object, *b*, and return the On 2015/02/19 22:12:27, r.david.murray wrote: > Looks like there's an extra 'object' here, but I didn't generate the docs to > check. Will fix this. http://bugs.python.org/review/20699/ From srs at eject.co.za Tue Feb 17 16:35:05 2015 From: srs at eject.co.za (Nic van Duffelen) Date: Tue, 17 Feb 2015 17:35:05 +0200 Subject: [docs] Downloads Message-ID: <54E35FA9.6060505@eject.co.za> Hi All the links are dead, 404 Not Found. Help I would like to have the the Python 3.4.3rc1 Documentation in A4 PDF format. Regards -- Nic van Duffelen, /ZR6AEZ/ *083 555-9622* ----- No virus found in this message. Checked by AVG - www.avg.com Version: 2015.0.5646 / Virus Database: 4284/9130 - Release Date: 02/17/15 -------------- next part -------------- An HTML attachment was scrubbed... URL: From zachary.ware+pydocs at gmail.com Fri Feb 20 05:26:14 2015 From: zachary.ware+pydocs at gmail.com (Zachary Ware) Date: Thu, 19 Feb 2015 22:26:14 -0600 Subject: [docs] Some typos in Language Reference In-Reply-To: References: Message-ID: Hi, On Sat, Feb 7, 2015 at 11:17 PM, qz yang wrote: > https://docs.python.org/3/reference/expressions.html > > First, in section 6.2.1. Identifiers (Names), after the Private name > mangling: > It is to say that >> >> The transformation inserts the class name, with leading underscores >> removed and a single underscore inserted, > > > But in the following example > >> For example, the identifier__spam occurring in a class named Ham will be >> transformed to _Ham__spam > > > It only inserts the class name with one underscore, but not removes the > leading underscores. I am not sure whether the description or the example is > correct. First, thanks for the reports! On this particular issue, both the example and description are correct: 'Ham' has no leading underscores, so none are stripped. The following function should be pretty close to the real name mangling rules: def mangle(name, class_name): stripped_class_name = class_name.strip('_') if not stripped_class_name: # if class_name is all underscores return name return '_{}{}'.format(stripped_class_name, name) As you can see from that, there is no transformation done on the name ("__spam"); all transformation is done on the class name ("Ham") and then the two are joined with a leading underscore. The description makes sense to me, but if you can provide a better wording for it, we'd be happy to accept it! > Second,in section 6.9, under the sentence "Comparison of objects of the same > type depends on the type:" > > in the second point, >> >> The values float('NaN') and Decimal('NaN') are special. The are identical >> to themselves, x is x but are not equal to themselves, x != x. > > > This should be "They are". Thanks, this has now been fixed. > P.S. I've tried to register the issue tracker but failed to get the confirm > email. I'm sorry it hasn't worked for you. For some extra help on this, you can send a mail to the tracker-discuss list, where there should be people more knowledgeable than me available to suggest solutions. Regards, -- Zach From report at bugs.python.org Fri Feb 20 05:27:13 2015 From: report at bugs.python.org (Martin Panter) Date: Fri, 20 Feb 2015 04:27:13 +0000 Subject: [docs] [issue20699] Document that binary IO classes work with bytes-likes objects In-Reply-To: <1392889792.36.0.922412998797.issue20699@psf.upfronthosting.co.za> Message-ID: <1424406433.01.0.437537467756.issue20699@psf.upfronthosting.co.za> Martin Panter added the comment: Posting patch v3; thanks for the reviews! * Changed ?buffer? ? ?object? * Made it clearer that the bytes-like object generalization only applies to method arguments, not return values * Minor fixes to wording ---------- Added file: http://bugs.python.org/file38181/bytes-like-param.v3.patch _______________________________________ Python tracker _______________________________________ From zachary.ware+pydocs at gmail.com Fri Feb 20 05:32:18 2015 From: zachary.ware+pydocs at gmail.com (Zachary Ware) Date: Thu, 19 Feb 2015 22:32:18 -0600 Subject: [docs] Misspelling in copy_reg In-Reply-To: References: Message-ID: On Tue, Feb 17, 2015 at 1:48 AM, Yaniv Sayeh wrote: > In https://docs.python.org/2/library/copy_reg.html, > execute this: s/fuction/function/g . Thanks for the report! This has now been fixed. -- Zach From zachary.ware+pydocs at gmail.com Fri Feb 20 05:52:52 2015 From: zachary.ware+pydocs at gmail.com (Zachary Ware) Date: Thu, 19 Feb 2015 22:52:52 -0600 Subject: [docs] starting with python documentation In-Reply-To: References: Message-ID: Hi Tammy, On Thu, Feb 19, 2015 at 10:31 AM, Tammy Miller wrote: > I am very new with python and wanted to assist in helping with the > documentation. Welcome to Python, we're glad to have you! > I have a some questions as I read the documentation. > 1. Should I just download Sphinx since I have a windows 8 machine? Or should > I down Jinja as well? The suggested method on Windows is to create a virtual environment (venv) that will contain Sphinx and its dependencies (including Jinja). You can do so by running "py -3.4 -m venv " (with "" appropriately replaced). Then run "\Scripts\activate.bat", followed by "pip install Sphinx". That will install several packages in the venv, including Sphinx itself, docutils, Jinja, pygments, and possibly another than I'm forgetting. > 2. Am I supposed to clone the documentation after sphinx has been > downloaded? The documentation is included in the cpython source tree. You'll need to install Mercurial to check out the source; have a look at the devguide[1] for more information on how to do that. > 3. How do I know that I am looking at the correct documentation to > modifications after questions 1 and 2. I'm not sure what you mean here. The documentation for each version of Python is in the Doc directory of the source checkout, and corresponds to whichever branch you have checked out (the currently relevant branches are 2.7, 3.4, and default which will be 3.5). After you make changes, building the documentation with Sphinx will tell you if you made any syntactic errors, and you can load the generated html in your browser (try the 'htmlview' target for make.bat, or 'serve' after running 'html'). If you have more questions (or I've answered these poorly :)), feel free to ask. You may also be interested in the core-mentorship mailing list[2], or for more immediate assistance, the #python-dev IRC channel on freenode. I hope this helps, and I look forward to your first contribution! Regards, -- Zach [1] https://docs.python.org/devguide [2] http://pythonmentors.com/ From report at bugs.python.org Fri Feb 20 06:54:06 2015 From: report at bugs.python.org (Martin Panter) Date: Fri, 20 Feb 2015 05:54:06 +0000 Subject: [docs] [issue22000] cross type comparisons clarification In-Reply-To: <1405622312.02.0.49093151571.issue22000@psf.upfronthosting.co.za> Message-ID: <1424411646.44.0.965812276361.issue22000@psf.upfronthosting.co.za> Martin Panter added the comment: I think the patch for Issue 12067 covers all of the suggested points here, and is more accurate in some cases. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 20 12:00:12 2015 From: report at bugs.python.org (Martin Panter) Date: Fri, 20 Feb 2015 11:00:12 +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: <1424430009.85.0.0999751883095.issue12067@psf.upfronthosting.co.za> Martin Panter added the comment: Issue 4395 is already open for the != delegating to __eq__ issue that Guido pointed out earlier. Yet another issue that this doc patch should solve: Issue 22000. I am posting v13 of the patch that works with the current ?default? (3.5) branch. Minor modifications to the documentation part: * Undo some paragraph reflowing to reduce the size of the diff hunks * Use math.nan instead of nan = float('NaN') * Tweaked the new subheadings to better differentiate ?Value comparisons? (which this bug is concerned with) from ?Identity comparisons? Changes I made to the added test cases: * Drop Python 3 version check * Use TestCase.subTest() so it?s easier to see everything that [is] was failing * Merge some tests for != and fix changed expectations due to Issue 21408 being fixed * Drop _inst_str() and __str__(), apparently unused It would be nice to see at least the documentation part reviewed and committed, even if the tests require more work. (After having to hack the tests to get them working, I might point out some odd bits in the code review.) Though I guess they are just tests, so it doesn?t matter so much as long as they pass. ---------- Added file: http://bugs.python.org/file38183/issue12067-expressions-py3.5_v13.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 20 12:30:43 2015 From: report at bugs.python.org (Berker Peksag) Date: Fri, 20 Feb 2015 11:30:43 +0000 Subject: [docs] [issue9119] Python download page needs to mention crypto code in Windows installer In-Reply-To: <1277836658.93.0.259031299275.issue9119@psf.upfronthosting.co.za> Message-ID: <1424431843.52.0.609612664878.issue9119@psf.upfronthosting.co.za> Berker Peksag added the comment: > Terry, would you like to move this forward with the Python.org webmasters ? This is now a content issue and can be handled on GitHub: https://github.com/python/pythondotorg/issues ---------- nosy: +berker.peksag resolution: -> fixed stage: needs patch -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 20 14:04:07 2015 From: report at bugs.python.org (R. David Murray) Date: Fri, 20 Feb 2015 13:04:07 +0000 Subject: [docs] [issue20699] Document that binary IO classes work with bytes-likes objects In-Reply-To: <1392889792.36.0.922412998797.issue20699@psf.upfronthosting.co.za> Message-ID: <1424437447.92.0.496645779246.issue20699@psf.upfronthosting.co.za> R. David Murray added the comment: What is your objection to "len(b)"? When I read "len(b)" I know exactly what it means. When I read "the number of bytes in b", I have to think about it it, because it could mean "the number of bytes that that b is long" or "the number of bytes that have been already written to b", and the latter is the meaning my mind goes to first, so it takes time for my mind to realize it is the first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 20 14:37:46 2015 From: report at bugs.python.org (Martin Panter) Date: Fri, 20 Feb 2015 13:37:46 +0000 Subject: [docs] [issue20699] Document that binary IO classes work with bytes-likes objects In-Reply-To: <1392889792.36.0.922412998797.issue20699@psf.upfronthosting.co.za> Message-ID: <1424439466.66.0.0273387224544.issue20699@psf.upfronthosting.co.za> Martin Panter added the comment: Using len(b) is fine if b is a bytes() or bytearray() object, but a bytes-like object can be anything that you can pass to memoryview(). In general len(b) is not part of that protocol, so can return some other value, or even be unimplemented: >>> from array import array >>> b = array("H", range(2)) >>> len(b) 2 >>> bytes(b) # Actually 4 bytes = 2 items ? 2 bytes b'\x00\x00\x01\x00' >>> from ctypes import c_int >>> b = c_int(100) >>> len(b) Traceback (most recent call last): File "", line 1, in TypeError: object of type 'c_long' has no len() >>> bytes(b) # 4 bytes despite not implementing len() b'd\x00\x00\x00' I see your point that ?the number of bytes in b? can be misleading. I will think about the wording some more. Maybe we can come up with a third alternative, like ?the number of bytes given? or something. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 20 14:41:16 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 20 Feb 2015 13:41:16 +0000 Subject: [docs] [issue20699] Document that binary IO classes work with bytes-likes objects In-Reply-To: <1424437447.92.0.496645779246.issue20699@psf.upfronthosting.co.za> Message-ID: <4482593.HnPrEmWn6J@raxxla> Serhiy Storchaka added the comment: Because it is not len(b). I fixed several bugs in Python code which called len() for bytes-like argument and failed with array.array or memoryview with non-byte items. The term "bytes-like object" is slightly misleading. In some cases it implies indexing and len, and iterating, and may be slicing -- common operations for bytes, bytearray, array('B'), memoryview().cast('B'). In more narrow meaning it may require such operations as concatenation (operator +) and .startswith() -- common for bytes and bytearray. In more general meaning it requires only the support of buffer protocol and contiguity. In more general meaning it may be even non-contiguous. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 20 15:25:43 2015 From: report at bugs.python.org (R. David Murray) Date: Fri, 20 Feb 2015 14:25:43 +0000 Subject: [docs] [issue20699] Document that binary IO classes work with bytes-likes objects In-Reply-To: <1392889792.36.0.922412998797.issue20699@psf.upfronthosting.co.za> Message-ID: <1424442343.6.0.83050991672.issue20699@psf.upfronthosting.co.za> R. David Murray added the comment: How about "the length of b in bytes"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 20 21:45:53 2015 From: report at bugs.python.org (Steven Barker) Date: Fri, 20 Feb 2015 20:45:53 +0000 Subject: [docs] [issue23495] The writer.writerows method should be documented as accepting any iterable (not only a list) Message-ID: <1424465153.78.0.58816335685.issue23495@psf.upfronthosting.co.za> New submission from Steven Barker: The documentation for the csv.writer.writerows method says that it expects "a list of row objects", when it really will accept any iterable that yields rows (such as a generator). While it's often nice for code to be more accepting than the documented requirements, I think the docs in this case should state that writerows() expects an iterable, rather than misinforming users that a list is required. This documentation issue was brought up in a Stack Overflow question here: http://stackoverflow.com/questions/28636848/csv-writer-writerows-takes-iterator I expect the necessary documentation patch will be pretty trivial, and if nobody else gets to it first, I will try to provide one when I have enough time to update my cpython checkout (not soon, alas). ---------- assignee: docs at python components: Documentation messages: 236328 nosy: Steven.Barker, docs at python priority: normal severity: normal status: open title: The writer.writerows method should be documented as accepting any iterable (not only a list) type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 21 02:03:08 2015 From: report at bugs.python.org (Steven Barker) Date: Sat, 21 Feb 2015 01:03:08 +0000 Subject: [docs] [issue23495] The writer.writerows method should be documented as accepting any iterable (not only a list) In-Reply-To: <1424465153.78.0.58816335685.issue23495@psf.upfronthosting.co.za> Message-ID: <1424480588.07.0.458026651665.issue23495@psf.upfronthosting.co.za> Steven Barker added the comment: Another Stack Overflow user pointed out that the DictWriter's writerows implementation (in pure Python) unnecessarily converts whatever its argument is into a list in memory before passing it on to the builtin writer.writerows method which would accept any iterable type. Probably it should be changed to use map or a generator expression instead. So, perhaps this issue isn't purely documentation, but actually a small behavior enhancement as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 21 07:19:28 2015 From: report at bugs.python.org (Martin Panter) Date: Sat, 21 Feb 2015 06:19:28 +0000 Subject: [docs] [issue19023] ctypes docs: Unimplemented and undocumented features In-Reply-To: <1379246270.23.0.998338553474.issue19023@psf.upfronthosting.co.za> Message-ID: <1424499568.06.0.093079268419.issue19023@psf.upfronthosting.co.za> Martin Panter added the comment: Posting a new patch, rebased against the recent ?default? (3.5) branch: * Tweaked so that sentences start with a capital letter * Added _Pointer.contents ---------- Added file: http://bugs.python.org/file38195/arrays-pointers.v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 21 11:44:07 2015 From: report at bugs.python.org (SilentGhost) Date: Sat, 21 Feb 2015 10:44:07 +0000 Subject: [docs] [issue23495] The writer.writerows method should be documented as accepting any iterable (not only a list) In-Reply-To: <1424465153.78.0.58816335685.issue23495@psf.upfronthosting.co.za> Message-ID: <1424515447.93.0.194606971834.issue23495@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 21 15:13:47 2015 From: report at bugs.python.org (R. David Murray) Date: Sat, 21 Feb 2015 14:13:47 +0000 Subject: [docs] [issue23495] The writer.writerows method should be documented as accepting any iterable (not only a list) In-Reply-To: <1424465153.78.0.58816335685.issue23495@psf.upfronthosting.co.za> Message-ID: <1424528027.92.0.0417856998902.issue23495@psf.upfronthosting.co.za> R. David Murray added the comment: Seems reasonable to me. Do you want to prepare patches? The doc patch should be separate, since it applies to all active versions, but the code change to dictwriter would go only into 3.5. ---------- stage: -> needs patch versions: -Python 3.2, Python 3.3, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 21 16:38:06 2015 From: report at bugs.python.org (Sahil Chelaramani) Date: Sat, 21 Feb 2015 15:38:06 +0000 Subject: [docs] [issue23322] parser module docs missing second example In-Reply-To: <1422257477.04.0.712021667077.issue23322@psf.upfronthosting.co.za> Message-ID: <1424533086.12.0.375909575048.issue23322@psf.upfronthosting.co.za> Sahil Chelaramani added the comment: A patch for this bug. Please let me know if I have to change something. First patch, please be kind :) ---------- keywords: +patch nosy: +SahilC Added file: http://bugs.python.org/file38196/mywork.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 21 17:30:26 2015 From: report at bugs.python.org (R. David Murray) Date: Sat, 21 Feb 2015 16:30:26 +0000 Subject: [docs] [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <1424536226.31.0.193922438715.issue13637@psf.upfronthosting.co.za> R. David Murray added the comment: I think this doc change was incorrect. The current document is supposed to provide the correct historical information. So "changed in 3.3: accept ASCII input" (and just ignore the fact that 3.1 also accepted ascii, since we pretty much prefer to ignore the existence of 3.0 and 3.1 :) would be the better choice, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 21 22:38:31 2015 From: report at bugs.python.org (Martin Panter) Date: Sat, 21 Feb 2015 21:38:31 +0000 Subject: [docs] [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <1424554711.09.0.616136278713.issue13637@psf.upfronthosting.co.za> Martin Panter added the comment: If I understand what you are saying, you don?t mind not mentioning 3.1 behaviour, but want to mention 3.2 behaviour. Perhaps the existing ?Note? box at the top of the page is good enough for you, as pointed out in . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 22 01:17:47 2015 From: report at bugs.python.org (R. David Murray) Date: Sun, 22 Feb 2015 00:17:47 +0000 Subject: [docs] [issue13637] binascii.a2b_* functions could accept unicode strings In-Reply-To: <1324312244.97.0.383716057437.issue13637@psf.upfronthosting.co.za> Message-ID: <1424564267.72.0.944210512586.issue13637@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, yes, I see. Sorry for the confusion, I misread that part of the discussion and did not look at that part of the docs. (I find that note confusing...it seems to imply that a2b only accepts ascii. But that's a different issue and I don't feel strongly enough about it to open one :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 22 11:03:27 2015 From: report at bugs.python.org (SilentGhost) Date: Sun, 22 Feb 2015 10:03:27 +0000 Subject: [docs] [issue23499] Minor grammar issue in mimetypes.rst Message-ID: <1424599407.74.0.534363562696.issue23499@psf.upfronthosting.co.za> New submission from SilentGhost: Just a minor grammar issue: missing "be" in mimetypes.rst ---------- assignee: docs at python components: Documentation files: mimetypes.diff keywords: patch messages: 236402 nosy: SilentGhost, docs at python, eric.araujo, ezio.melotti, georg.brandl priority: normal severity: normal stage: patch review status: open title: Minor grammar issue in mimetypes.rst versions: Python 3.5 Added file: http://bugs.python.org/file38202/mimetypes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 23 01:16:07 2015 From: report at bugs.python.org (Roundup Robot) Date: Mon, 23 Feb 2015 00:16:07 +0000 Subject: [docs] [issue23499] Minor grammar issue in mimetypes.rst In-Reply-To: <1424599407.74.0.534363562696.issue23499@psf.upfronthosting.co.za> Message-ID: <20150223001541.3871.83360@psf.io> Roundup Robot added the comment: New changeset 2b8c5ed7b38b by Ned Deily in branch '2.7': Issue #23499: Fix grammar error noticed by SilentGhost https://hg.python.org/cpython/rev/2b8c5ed7b38b New changeset 5dfdaec85345 by Ned Deily in branch '3.4': Issue #23499: Fix grammar error noticed by SilentGhost https://hg.python.org/cpython/rev/5dfdaec85345 New changeset 49130b06e3ac by Ned Deily in branch 'default': Issue #23499: Fix grammar error noticed by SilentGhost https://hg.python.org/cpython/rev/49130b06e3ac ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 23 01:16:58 2015 From: report at bugs.python.org (Ned Deily) Date: Mon, 23 Feb 2015 00:16:58 +0000 Subject: [docs] [issue23499] Minor grammar issue in mimetypes.rst In-Reply-To: <1424599407.74.0.534363562696.issue23499@psf.upfronthosting.co.za> Message-ID: <1424650618.67.0.548734261767.issue23499@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks! ---------- nosy: +ned.deily resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 23 05:37:53 2015 From: report at bugs.python.org (Martin Panter) Date: Mon, 23 Feb 2015 04:37:53 +0000 Subject: [docs] [issue20699] Document that binary IO classes work with bytes-likes objects In-Reply-To: <1392889792.36.0.922412998797.issue20699@psf.upfronthosting.co.za> Message-ID: <1424666272.48.0.480956902229.issue20699@psf.upfronthosting.co.za> Martin Panter added the comment: Posting bytes-like-param.v4.patch, with David?s suggested wording ---------- Added file: http://bugs.python.org/file38207/bytes-like-param.v4.patch _______________________________________ Python tracker _______________________________________ From sideboard at revolutionarts.de Fri Feb 20 12:20:53 2015 From: sideboard at revolutionarts.de (Sideboard) Date: Fri, 20 Feb 2015 12:20:53 +0100 Subject: [docs] All downloads fail Message-ID: <54E71895.3030007@revolutionarts.de> Hello, on the documents download page every "download" link leads to a 404 missing page. Greetings Sideboard From vadmium+py at gmail.com Fri Feb 20 12:56:08 2015 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Fri, 20 Feb 2015 11:56:08 -0000 Subject: [docs] Doc: remove errors about mixed-type comparisons. (issue 12067) Message-ID: <20150220115608.28448.79240@psf.upfronthosting.co.za> Hi Andy, here are some suggestions and comments. The only major issue is the one to do with create_sorted_insts(), unless I misunderstood what it is doing. https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py File Lib/test/test_compare.py (right): https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode137 Lib/test/test_compare.py:137: class ComparisonTest2(unittest.TestCase): Would be nice to have better names than test 1 and test 2. Maybe MiscTest and ComparisonResultTest, since the new class seems to be testing the result of comparing various objects? https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode328 Lib/test/test_compare.py:328: def assert_insts(self, i1, i2, equal, comp, i1_meth=(), i2_meth=()): Maybe assert_comparisons() is a better name? Or perhaps two separate driver methods: assert_equality_only(a, b, True/False) assert_total_order(a, b, ?1/0) https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode340 Lib/test/test_compare.py:340: None means: Equality comparison not supported Are there any such cases? Otherwise, this is misleading. https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode347 Lib/test/test_compare.py:347: None means: Order comparison not supported I guess this doesn?t account for partially ordered objects like sets that are neither supersets nor subsets? https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode375 Lib/test/test_compare.py:375: self.assertEqual(i1 == i2, id(i1) == id(i2)) Wouldn?t it be more obvious to do ?i1 is i2?? https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode480 Lib/test/test_compare.py:480: self.assert_insts(i1, i2, False, id(i1)-id(i2)) What is the point of that last id() calculation? https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode511 Lib/test/test_compare.py:511: self.assert_insts(insts_a[0], insts_b[0], True, 0, I don?t get the sorted-by-identity business. The id() values are arbitrary, so how do we know that the first objects in each list are going to be equal? Surely we are just lucky that the id() values are memory addresses allocated in increasing order? https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode550 Lib/test/test_compare.py:550: class Class_str(str): Maybe StrSubclass would be more obvious? https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode554 Lib/test/test_compare.py:554: def some_func(self): Does not appear to be used https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode569 Lib/test/test_compare.py:569: self.assert_insts(c1, c1, True, 0, Class_str.meth, Class_str.meth) Can all these empty-tuple meth-s can be dropped? Also I suggest keywords for some of the other parameters, or maybe it would be clearer like: assert_total_order(c1, c1, 0) as I suggested above https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode591 Lib/test/test_compare.py:591: i1 = int(10001) These kind of objects would probably read a whole lot better if they were named something like i1 ? int_10001_a i4 ? int_10001_b d5 ? decimal_42p0 https://bugs.python.org/review/12067/diff/13975/Lib/test/test_compare.py#newcode881 Lib/test/test_compare.py:881: def test__internal_is_value_comparable(self): Why the double underscore? https://bugs.python.org/review/12067/ From r3x.asadun at gmail.com Sat Feb 21 12:46:54 2015 From: r3x.asadun at gmail.com (r3x.asadun at gmail.com) Date: Sat, 21 Feb 2015 11:46:54 +0000 Subject: [docs] =?utf-8?q?Mirrors_to_download_Python_3=2E4_documentation_a?= =?utf-8?q?re_dead?= Message-ID: <54e87080.63ec440a.48f9.ffffff4a@mx.google.com> All the mirrors are dead. Thank you. Sent from Windows Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From daanhofman at outlook.com Sat Feb 21 17:30:07 2015 From: daanhofman at outlook.com (Daan Hofman) Date: Sat, 21 Feb 2015 17:30:07 +0100 Subject: [docs] 404 not found error! Message-ID: If you try to download any form of the documentation, you get a 404 not found error. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Screenshot_2015-02-21-17-27-43.png Type: image/png Size: 464469 bytes Desc: not available URL: From karsten.mayer at yahoo.de Sun Feb 22 09:56:01 2015 From: karsten.mayer at yahoo.de (Yahoo - Karsten Mayer) Date: Sun, 22 Feb 2015 09:56:01 +0100 Subject: [docs] Python Docs - Download error 404 Message-ID: <6D1DDD2A-8931-4AED-BB61-4F779EACC3C9@yahoo.de> Hello, unfortunately I can not download PDF (A4 paper size) or ePub Python Docs (3.4.3rc1). I only see a 404 error (Not Found). Can you help me to download the files? Thank you very much and greetings Karsten Mayer From arieswy at gmail.com Sun Feb 22 11:27:52 2015 From: arieswy at gmail.com (Michael WANG) Date: Sun, 22 Feb 2015 18:27:52 +0800 Subject: [docs] 404 error on download link Message-ID: Hello, FYI it seems all download links are not working on https://docs.python.org/3.4/download.html - they all point to a 404 error page, e.g https://docs.python.org/3.4/archives/python-3.4.3rc1-docs-text.tar.bz2 Regards, Michael Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: From macek at sandbox.cz Sun Feb 22 16:49:36 2015 From: macek at sandbox.cz (Vladimir Macek) Date: Sun, 22 Feb 2015 16:49:36 +0100 Subject: [docs] multiprocessing minor fix Message-ID: <54E9FA90.1010004@sandbox.cz> Hi, here's a small tip for an easy doc-fix picking. :-) I think the "Namespace" in https://docs.python.org/3.5/library/multiprocessing.html#multiprocessing.managers.SyncManager.Namespace should link to https://docs.python.org/3.5/library/multiprocessing.html#namespace-objects rather than being circular. :-) Seems like a nitpick, but the multiprocessing module falls into the heaviest stuff to understand in the Python stdlib. The brain hurts reading it. So bugs like this complicate it. And thanks for the MAGNIFICENT work on the Python doc! -- : Vladimir Macek : http://macek.sandbox.cz : +420 608 978 164 : UNIX && Dev || Training : Python, Django : PGP key 97330EBD From lsatenstein at yahoo.com Sun Feb 22 23:13:28 2015 From: lsatenstein at yahoo.com (Leslie Satenstein) Date: Sun, 22 Feb 2015 17:13:28 -0500 Subject: [docs] 404s for the pdf files to be downloaded Message-ID: <1424643208.8865.0.camel@yahoo.com> https://docs.python.org/3/download.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jens.Schleusener at t-online.de Mon Feb 23 08:39:50 2015 From: Jens.Schleusener at t-online.de (Schleusener, Jens) Date: Mon, 23 Feb 2015 08:39:50 +0100 (CET) Subject: [docs] Python 3.4.3rc1 documentation download files not (yet) existing Message-ID: Hi, the subject says it already: The Python 3.4.3rc1 Documentation download files on https://docs.python.org/3/download.html don't exist yet (404 Not Found). Ok, not all can be done simultaneously (new release resp. release candidate) but it could also be that someone goes wrong or was forgotten. Regards and thanks for Python Jens From joe.burkey at hotmail.com Mon Feb 23 09:49:21 2015 From: joe.burkey at hotmail.com (Joe Burkey) Date: Mon, 23 Feb 2015 08:49:21 +0000 Subject: [docs] 404 - Docs Not Found Message-ID: Hi, I keep on trying to download the pdf of the 3.4 documentation but I'm always redirected to a 404 page. I'll look elsewhere in the meantime but thought you might want to know. Regards, Joe Burkey -------------- next part -------------- An HTML attachment was scrubbed... URL: From jannegala09 at gmail.com Mon Feb 23 15:36:08 2015 From: jannegala09 at gmail.com (Ma. Julie Anne L. Gala) Date: Mon, 23 Feb 2015 22:36:08 +0800 Subject: [docs] Cannot download Message-ID: Good day! Every time I try to download the documentation of Python 3.x, I would receive a "404 Not Found". I would like to know if this commonly happens; if so, please fix it. I am using Ubuntu as an operating system just in case that information would be a significance in resolving this problem. Thank you. -------------- next part -------------- An HTML attachment was scrubbed... URL: From seanf at redsealnetworks.com Sun Feb 22 17:37:33 2015 From: seanf at redsealnetworks.com (Sean Finn) Date: Sun, 22 Feb 2015 16:37:33 +0000 Subject: [docs] 3.5.0a1 Documentation links broken Message-ID: Thx From haphuoc1591992 at gmail.com Tue Feb 24 03:39:39 2015 From: haphuoc1591992 at gmail.com (Phuoc Ha) Date: Tue, 24 Feb 2015 09:39:39 +0700 Subject: [docs] Can not download document Message-ID: i can not download document of python 3.4.3rc1 from page document. I hope you can fix it -------------- next part -------------- An HTML attachment was scrubbed... URL: From ramirez.philip at gmail.com Tue Feb 24 04:56:50 2015 From: ramirez.philip at gmail.com (Philip Ramirez) Date: Mon, 23 Feb 2015 22:56:50 -0500 Subject: [docs] All links to download Documentation give 404 Message-ID: Hey, I was trying to download the docs and all links are giving me 404 errors. Using: https://docs.python.org/3.4/download.html -- Philip Ramirez -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Tue Feb 24 14:38:34 2015 From: report at bugs.python.org (Manuel Jacob) Date: Tue, 24 Feb 2015 13:38:34 +0000 Subject: [docs] [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1424785113.99.0.976503966177.issue17576@psf.upfronthosting.co.za> Manuel Jacob added the comment: Maybe I'm missing something, but it seems to me that test_int_subclass_with_index() is testing for the exactly wrong behaviour. Isn't the point of this issue that operator.index(a) should be equal to a.__index__()? Why are the tests checking that they are different? ---------- nosy: +mjacob _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 24 16:05:19 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Feb 2015 15:05:19 +0000 Subject: [docs] [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1424790319.4.0.101978356403.issue17576@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The tests are checking that they are the same value (8) and the same type (int)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 24 16:15:02 2015 From: report at bugs.python.org (Baptiste Mispelon) Date: Tue, 24 Feb 2015 15:15:02 +0000 Subject: [docs] [issue23511] Broken code example in email module documentation Message-ID: <1424790902.68.0.738942973553.issue23511@psf.upfronthosting.co.za> New submission from Baptiste Mispelon: The first code example at https://docs.python.org/3.5/library/email-examples.html throws an `AttributeError` because `MIMEText`'s constructor expects a `str` object, not a `bytes` one: >>> # Import smtplib for the actual sending function ... import smtplib >>> >>> # Import the email modules we'll need ... from email.mime.text import MIMEText >>> >>> # Open a plain text file for reading. For this example, assume that ... # the text file contains only ASCII characters. ... fp = open(textfile, 'rb') >>> # Create a text/plain message ... msg = MIMEText(fp.read()) Traceback (most recent call last): File "", line 2, in File "/usr/lib/python3.4/email/mime/text.py", line 33, in __init__ _text.encode('us-ascii') AttributeError: 'bytes' object has no attribute 'encode' ---------- assignee: docs at python components: Documentation messages: 236503 nosy: bmispelon, docs at python priority: normal severity: normal status: open title: Broken code example in email module documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 24 16:25:11 2015 From: report at bugs.python.org (Edward D'Souza) Date: Tue, 24 Feb 2015 15:25:11 +0000 Subject: [docs] [issue23512] List of builtins is not alphabetical on https://docs.python.org/2/library/functions.html Message-ID: <1424791511.8.0.507561074794.issue23512@psf.upfronthosting.co.za> New submission from Edward D'Souza: The list of built-in functions at the top of https://docs.python.org/2/library/functions.html is not alphabetical. Specifically, (apply, coerce, intern, buffer) allow appear out of order at the end of the list, instead of where they should be alphabetically. ---------- assignee: docs at python components: Documentation messages: 236505 nosy: docs at python, edsouza priority: normal severity: normal status: open title: List of builtins is not alphabetical on https://docs.python.org/2/library/functions.html type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 24 18:12:19 2015 From: report at bugs.python.org (Cezary Wagner) Date: Tue, 24 Feb 2015 17:12:19 +0000 Subject: [docs] [issue23514] multiprocessing documentation - little more examples for parallel computing Message-ID: <1424797939.13.0.206434175912.issue23514@psf.upfronthosting.co.za> New submission from Cezary Wagner: I am little confused with multiprocessing documentation since it does not contain enough examples. Parallel computing is not simple by design so documentation can be little improved to make it simpler. No pattern to use pool with classes. No pattern to exchange objects between processes. Understanding usage of Queue and SimpleQueue or JoinableQueue is not very clear. Current documentation in majority is good reference with very rare examples / patterns. ---------- assignee: docs at python components: Documentation messages: 236519 nosy: Cezary.Wagner, docs at python priority: normal severity: normal status: open title: multiprocessing documentation - little more examples for parallel computing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 24 18:12:26 2015 From: report at bugs.python.org (Cezary Wagner) Date: Tue, 24 Feb 2015 17:12:26 +0000 Subject: [docs] [issue23514] multiprocessing documentation - little more examples for parallel computing In-Reply-To: <1424797939.13.0.206434175912.issue23514@psf.upfronthosting.co.za> Message-ID: <1424797946.35.0.9380074454.issue23514@psf.upfronthosting.co.za> Changes by Cezary Wagner : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 24 18:27:47 2015 From: report at bugs.python.org (Davin Potts) Date: Tue, 24 Feb 2015 17:27:47 +0000 Subject: [docs] [issue23514] multiprocessing documentation - little more examples for parallel computing In-Reply-To: <1424797939.13.0.206434175912.issue23514@psf.upfronthosting.co.za> Message-ID: <1424798867.37.0.0183389777526.issue23514@psf.upfronthosting.co.za> Davin Potts added the comment: This is a specific suggestion that should be included / addressed as part of issue23100. ---------- nosy: +davin type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 24 18:30:03 2015 From: report at bugs.python.org (Cezary Wagner) Date: Tue, 24 Feb 2015 17:30:03 +0000 Subject: [docs] [issue23514] multiprocessing documentation - little more examples for parallel computing In-Reply-To: <1424797939.13.0.206434175912.issue23514@psf.upfronthosting.co.za> Message-ID: <1424799003.23.0.0917330851761.issue23514@psf.upfronthosting.co.za> Cezary Wagner added the comment: Should I add this suggestion to open before issue? I started doing multiprocessing code in Python so I can have more suggestions since I found that documentation can be improved I will report specific problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 24 18:44:38 2015 From: report at bugs.python.org (Manuel Jacob) Date: Tue, 24 Feb 2015 17:44:38 +0000 Subject: [docs] [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1424799877.97.0.299420041352.issue17576@psf.upfronthosting.co.za> Manuel Jacob added the comment: The tests in the attached patches (for example issue17576_v3.patch) check that both are 8, but the tests which were actually committed are checking that "my_int.__index__() == 8" and "operator.index(my_int) == 7". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 24 18:59:40 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 24 Feb 2015 17:59:40 +0000 Subject: [docs] [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1424800780.77.0.745593392963.issue17576@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, it just checks current behavior. So we will know when this will be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 24 21:05:21 2015 From: report at bugs.python.org (Baptiste Mispelon) Date: Tue, 24 Feb 2015 20:05:21 +0000 Subject: [docs] [issue23511] Broken code example in email module documentation In-Reply-To: <1424790902.68.0.738942973553.issue23511@psf.upfronthosting.co.za> Message-ID: <1424808321.38.0.220158734433.issue23511@psf.upfronthosting.co.za> Baptiste Mispelon added the comment: Patch attached. ---------- keywords: +patch Added file: http://bugs.python.org/file38228/issue23511.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 24 21:53:07 2015 From: report at bugs.python.org (Berker Peksag) Date: Tue, 24 Feb 2015 20:53:07 +0000 Subject: [docs] [issue23511] Broken code example in email module documentation In-Reply-To: <1424790902.68.0.738942973553.issue23511@psf.upfronthosting.co.za> Message-ID: <1424811187.67.0.380218501451.issue23511@psf.upfronthosting.co.za> Berker Peksag added the comment: LGTM. ---------- nosy: +berker.peksag, r.david.murray stage: -> commit review versions: +Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 00:32:59 2015 From: report at bugs.python.org (Martin Panter) Date: Tue, 24 Feb 2015 23:32:59 +0000 Subject: [docs] [issue8895] newline vs. newlines in io module In-Reply-To: <1275642358.27.0.48977523408.issue8895@psf.upfronthosting.co.za> Message-ID: <1424820779.05.0.600572340529.issue8895@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 05:18:53 2015 From: report at bugs.python.org (Ethan Furman) Date: Wed, 25 Feb 2015 04:18:53 +0000 Subject: [docs] [issue9938] Documentation for argparse interactive use In-Reply-To: <1285338690.84.0.283413950067.issue9938@psf.upfronthosting.co.za> Message-ID: <1424837933.06.0.956407175576.issue9938@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: -ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 14:57:07 2015 From: report at bugs.python.org (R. David Murray) Date: Wed, 25 Feb 2015 13:57:07 +0000 Subject: [docs] [issue23511] Broken code example in email module documentation In-Reply-To: <1424790902.68.0.738942973553.issue23511@psf.upfronthosting.co.za> Message-ID: <1424872627.71.0.897271781931.issue23511@psf.upfronthosting.co.za> R. David Murray added the comment: Looks like the example wasn't updated during the python3 transition. As long as we are changing it, we might as well make it use the file as a context manager. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 15:05:44 2015 From: report at bugs.python.org (Baptiste Mispelon) Date: Wed, 25 Feb 2015 14:05:44 +0000 Subject: [docs] [issue23511] Broken code example in email module documentation In-Reply-To: <1424790902.68.0.738942973553.issue23511@psf.upfronthosting.co.za> Message-ID: <1424873144.32.0.930188656614.issue23511@psf.upfronthosting.co.za> Baptiste Mispelon added the comment: I wasn't sure if that was going to be out of scope or not. Here's an attached patch that fixes the remaining usages of `open` inside `Doc/includes` to always use a context manager. ---------- Added file: http://bugs.python.org/file38233/issue23511_open_cm.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 16:25:20 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Feb 2015 15:25:20 +0000 Subject: [docs] [issue20346] Argument Clinic: missing entry in table mapping legacy convertors to real AC converters In-Reply-To: <1390405621.79.0.727900748758.issue20346@psf.upfronthosting.co.za> Message-ID: <1424877920.96.0.935435531155.issue20346@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Argument Clinic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 16:32:44 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 25 Feb 2015 15:32:44 +0000 Subject: [docs] [issue21314] Document '/' in signatures In-Reply-To: <1397988439.5.0.703056699862.issue21314@psf.upfronthosting.co.za> Message-ID: <1424878364.43.0.603930968939.issue21314@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Argument Clinic _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 17:14:41 2015 From: report at bugs.python.org (Roundup Robot) Date: Wed, 25 Feb 2015 16:14:41 +0000 Subject: [docs] [issue23511] Broken code example in email module documentation In-Reply-To: <1424790902.68.0.738942973553.issue23511@psf.upfronthosting.co.za> Message-ID: <20150225161436.10168.97651@psf.io> Roundup Robot added the comment: New changeset 89c6a6c2dd1f by Berker Peksag in branch '3.4': Issue #23511: Port email-simple.py to Python 3. https://hg.python.org/cpython/rev/89c6a6c2dd1f New changeset cb911e1fb3dc by Berker Peksag in branch 'default': Issue #23511: Port email-simple.py to Python 3. https://hg.python.org/cpython/rev/cb911e1fb3dc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 17:16:47 2015 From: report at bugs.python.org (Berker Peksag) Date: Wed, 25 Feb 2015 16:16:47 +0000 Subject: [docs] [issue23511] Broken code example in email module documentation In-Reply-To: <1424790902.68.0.738942973553.issue23511@psf.upfronthosting.co.za> Message-ID: <1424881007.34.0.161600636376.issue23511@psf.upfronthosting.co.za> Berker Peksag added the comment: Thanks for the patch, Baptiste. ---------- resolution: -> fixed stage: commit review -> resolved status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 18:25:02 2015 From: report at bugs.python.org (Vandana Rao) Date: Wed, 25 Feb 2015 17:25:02 +0000 Subject: [docs] [issue13077] Unclear behavior of daemon threads on main thread exit In-Reply-To: <1317396642.03.0.535538271179.issue13077@psf.upfronthosting.co.za> Message-ID: <1424885102.7.0.858874231768.issue13077@psf.upfronthosting.co.za> Vandana Rao added the comment: Since the program depends on receiving a raw ^C == 0x03 on stdin, it will never be running under Idle because the Idle process tk gui normally keeps control of keyboard input and the Idle process code intercepts ^C and turns it into KeyboardInterrupt raised in the user process. This is not a bug anymore.It is working fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 19:40:46 2015 From: report at bugs.python.org (Jake) Date: Wed, 25 Feb 2015 18:40:46 +0000 Subject: [docs] [issue23522] Misleading note in Statistics module documentation Message-ID: <1424889646.1.0.160219400081.issue23522@psf.upfronthosting.co.za> New submission from Jake: In the statistics module documentation, there is a note that states that "The mean is strongly affected by outliers and is not a robust estimator for central location: the mean is not necessarily a typical example of the data points. For more robust, although less efficient, measures of central location, see median() and mode()" https://docs.python.org/3/library/statistics.html While I appreciate the intention, this is quite misleading. The implication is that the mean, median and mode are different ways to estimate one "central location", however, in reality they are very different things (albeit which refer to a similar notion). The sample mean is an unbiased estimator of the true mean but it need not be unbiased as an estimator of the true median or modes and vice versa for the median and mode. To make this clearer I would rephrase to "The mean is strongly affected by outliers and is not necessarily representative of the central tendency of the data. For cases with large outliers or very low sample size, see median() and mode()" Apologies if this is seen as frivolous, but statistics can be hard enough to remain very clear about even when the words are used precisely. ---------- assignee: docs at python components: Documentation messages: 236612 nosy: Journeyman08, docs at python priority: normal severity: normal status: open title: Misleading note in Statistics module documentation type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 20:14:14 2015 From: report at bugs.python.org (SilentGhost) Date: Wed, 25 Feb 2015 19:14:14 +0000 Subject: [docs] [issue23522] Misleading note in Statistics module documentation In-Reply-To: <1424889646.1.0.160219400081.issue23522@psf.upfronthosting.co.za> Message-ID: <1424891654.29.0.766757132797.issue23522@psf.upfronthosting.co.za> Changes by SilentGhost : ---------- nosy: +steven.daprano _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 25 21:52:40 2015 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 25 Feb 2015 20:52:40 +0000 Subject: [docs] [issue20683] Add example to tutorial namespace doc, section 9.2 In-Reply-To: <1392798452.78.0.903259935516.issue20683@psf.upfronthosting.co.za> Message-ID: <1424897560.81.0.280781557423.issue20683@psf.upfronthosting.co.za> Mark Lawrence added the comment: What is wrong with the example given here https://docs.python.org/3/tutorial/classes.html#scopes-and-namespaces-example ? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From demianbrecht at gmail.com Thu Feb 26 02:14:04 2015 From: demianbrecht at gmail.com (demianbrecht at gmail.com) Date: Thu, 26 Feb 2015 01:14:04 -0000 Subject: [docs] Document how to close the TCPServer listening socket (issue 23254) Message-ID: <20150226011404.16604.28497@psf.upfronthosting.co.za> http://bugs.python.org/review/23254/diff/13794/Doc/library/socketserver.rst File Doc/library/socketserver.rst (right): http://bugs.python.org/review/23254/diff/13794/Doc/library/socketserver.rst#newcode169 Doc/library/socketserver.rst:169: Clean up the server. May be overridden. The extra space here should be removed. http://bugs.python.org/review/23254/diff/13794/Lib/test/test_socketserver.py File Lib/test/test_socketserver.py (right): http://bugs.python.org/review/23254/diff/13794/Lib/test/test_socketserver.py#newcode148 Lib/test/test_socketserver.py:148: self.assertTrue(server.socket._closed) Small nitpick: Rather than relying on internals which can change, this could be: self.assertEqual(server.socket.fileno(), -1) http://bugs.python.org/review/23254/ From report at bugs.python.org Thu Feb 26 02:14:58 2015 From: report at bugs.python.org (Demian Brecht) Date: Thu, 26 Feb 2015 01:14:58 +0000 Subject: [docs] [issue23254] Document how to close the TCPServer listening socket In-Reply-To: <1421469175.0.0.628748486385.issue23254@psf.upfronthosting.co.za> Message-ID: <1424913298.08.0.637430242801.issue23254@psf.upfronthosting.co.za> Demian Brecht added the comment: Left a couple small nitpicks in Rietveld. Otherwise LGTM. ---------- nosy: +demian.brecht _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 26 03:19:06 2015 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 26 Feb 2015 02:19:06 +0000 Subject: [docs] [issue21889] https://docs.python.org/2/library/multiprocessing.html#process-and-exceptions doesn't explain exception In-Reply-To: <1404165638.91.0.279596288902.issue21889@psf.upfronthosting.co.za> Message-ID: <1424917145.99.0.112346506205.issue21889@psf.upfronthosting.co.za> Mark Lawrence added the comment: What is "exception multiprocessing.BufferTooShort" at the bottom of the referenced section? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 26 07:03:25 2015 From: report at bugs.python.org (Andrew Barnert) Date: Thu, 26 Feb 2015 06:03:25 +0000 Subject: [docs] [issue23525] isbuiltin, isroutine, etc. Message-ID: <1424930605.81.0.317229186778.issue23525@psf.upfronthosting.co.za> New submission from Andrew Barnert: The documentation and implementation for `inspect.isbuiltin` and related functions do not match. While #4968 attempted to clarify things to make the documentation match the behavior, the actual committed changes are still wrong. `isbuiltin` says "Return true if the object is a built-in function or a bound built-in method", but it returns false for bound built-in special methods (e.g., `[].__add__`). That's because it's implemented as `isinstance(types.BuiltinFunctionType)`, but bound special methods are a different type (`method-wrapper`). Terry Reedy's suggested fix from #4968 ("... or a bound built-in non-special method") would fix this, but the committed change didn't. The docstring has a further problem; it says that anything that passes will have a `__self__` with "instance to which a method is bound, or None", but for functions, the `__self__` is usually the module the `PyMethodDef` comes from, not `None`. (For example, `sum.__self__` is the`'builtins` module.) `isroutine` says "Return true if the object is a user-defined or built-in function or method." (The docstring instead says "? any kind of function or method.") But it returns false for built-in bound special methods (`[].__add__`). That's because it's implemented as `isbuiltin` or `isfunction` or `ismethod` or `ismethoddescriptor`; while `isbuiltin` picks up functions and bound non-special methods, and `ismethoddescriptor` picks up unbound special and non-special methods, nothing picks up bound special methods. A doc-only fix for this, along with Terry's suggested fix for `isbuiltin`, would be "Return true if the object is a user-defined function or method, or a built-in function, unbound method, or bound non-special method." That sounds horrible, but that's because it actually is a horrible test in the first place. A better fix would be to make `isbuiltin` handle both kinds of bound method. Then `isroutine` is correct as written, and both are documented correctly. (Note that there is no type in `types` corresponding to `method-wrapper`, so either `types` or `inspect` would have to add something like `BuiltinSpecialMethodType = type([].__add__)`.) It would be even better to fix this at the source and clean up the types of builtin functions and methods, but that boat sailed with 3.0, so... ---------- assignee: docs at python components: Documentation messages: 236649 nosy: abarnert, docs at python priority: normal severity: normal status: open title: isbuiltin, isroutine, etc. versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From vadmium+py at gmail.com Thu Feb 26 12:17:05 2015 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Thu, 26 Feb 2015 11:17:05 -0000 Subject: [docs] Document how to close the TCPServer listening socket (issue 23254) Message-ID: <20150226111705.16604.84031@psf.upfronthosting.co.za> Reviewers: demian, http://bugs.python.org/review/23254/diff/13794/Doc/library/socketserver.rst File Doc/library/socketserver.rst (right): http://bugs.python.org/review/23254/diff/13794/Doc/library/socketserver.rst#newcode169 Doc/library/socketserver.rst:169: Clean up the server. May be overridden. On 2015/02/26 02:14:04, demian wrote: > The extra space here should be removed. I will reduce the double space between the sentences, assuming that is what you meant. Single spacing is actually my preferred style, but I was probably trying to guess the style of the surrounding text. Please review this at http://bugs.python.org/review/23254/ Affected files: Doc/library/socketserver.rst Lib/test/test_socketserver.py # HG changeset patch # Parent 33db20c8537cc5be58753788d04672e66542dd90 diff -r 33db20c8537c -r f60fb9c80ca4 Doc/library/socketserver.rst --- a/Doc/library/socketserver.rst Sat Jan 31 02:45:12 2015 -0800 +++ b/Doc/library/socketserver.rst Sat Jan 31 12:22:39 2015 +0000 @@ -164,6 +164,11 @@ Added ``service_actions`` call to the ``serve_forever`` method. +.. method:: BaseServer.server_close() + + Clean up the server. May be overridden. + + .. method:: BaseServer.service_actions() This is called in the :meth:`serve_forever` loop. This method can be @@ -547,6 +552,7 @@ client(ip, port, "Hello World 3") server.shutdown() + server.server_close() The output of the example should look something like this:: diff -r 33db20c8537c -r f60fb9c80ca4 Lib/test/test_socketserver.py --- a/Lib/test/test_socketserver.py Sat Jan 31 02:45:12 2015 -0800 +++ b/Lib/test/test_socketserver.py Sat Jan 31 12:22:39 2015 +0000 @@ -145,6 +145,7 @@ server.shutdown() t.join() server.server_close() + self.assertTrue(server.socket._closed) if verbose: print("done") def stream_examine(self, proto, addr): From demianbrecht at gmail.com Thu Feb 26 16:27:54 2015 From: demianbrecht at gmail.com (demianbrecht at gmail.com) Date: Thu, 26 Feb 2015 15:27:54 -0000 Subject: [docs] Document how to close the TCPServer listening socket (issue 23254) Message-ID: <20150226152754.22877.58753@psf.upfronthosting.co.za> http://bugs.python.org/review/23254/diff/13794/Doc/library/socketserver.rst File Doc/library/socketserver.rst (right): http://bugs.python.org/review/23254/diff/13794/Doc/library/socketserver.rst#newcode169 Doc/library/socketserver.rst:169: Clean up the server. May be overridden. On 2015/02/26 12:17:05, vadmium wrote: > I will reduce the double space between the sentences, assuming that is what you meant. Exactly. http://bugs.python.org/review/23254/ From report at bugs.python.org Fri Feb 27 03:18:20 2015 From: report at bugs.python.org (R. David Murray) Date: Fri, 27 Feb 2015 02:18:20 +0000 Subject: [docs] [issue23532] add example of 'first match wins' to regex "|" documentation? In-Reply-To: <1424991623.26.0.907615110662.issue23532@psf.upfronthosting.co.za> Message-ID: <1425003500.08.0.416003648334.issue23532@psf.upfronthosting.co.za> R. David Murray added the comment: The thing is, what you describe is fundamental to how regular expressions work. I'm not sure it makes sense to add a specific mention of it to the '|' docs, since it applies to all regexes. ---------- assignee: -> docs at python components: +Documentation -Regular Expressions nosy: +docs at python, r.david.murray title: regex "|" behavior differs from documentation -> add example of 'first match wins' to regex "|" documentation? _______________________________________ Python tracker _______________________________________ From resolvent at comcast.net Fri Feb 20 19:28:22 2015 From: resolvent at comcast.net (resolvent at comcast.net) Date: Fri, 20 Feb 2015 18:28:22 +0000 (UTC) Subject: [docs] Dear Python.org In-Reply-To: <1365317802.10296925.1424456615004.JavaMail.zimbra@comcast.net> Message-ID: <1751366143.10300501.1424456902370.JavaMail.zimbra@comcast.net> Dear Python.org, I'm in a bit of an overwhelmed situation right now, so I did not know whom to ask. So, I was direct & attached my .py program. Why does my variable coordinates get destroyed along with coord when I remove elements from it? It shouldn't. Only coord should get destroyed. A family member who is an expert programmer tells me I need to make a deepcopy of coordinates. But, I see absolutely no mention of the word deepcopy in either your tutorial or PDF of references. I did a word/phrase search for deepcopy and shallow copy. Only passing mention was made of shallow copy on page 9 of your tutorial. Please help! Thanks, John P.S. I absolutely need formal structured schooling to learn any language: human or computer. This trying to learn it on my own stuff has never worked, because I spend days, weeks, months , years searching & searching for the right statement. I got As in Fortran (1981), C++ (2005) & even passed an online Java course (2012) but I never made use of programming outside formal courses. Dr John Michael Nahay 25 Chestnut Hill Lane Columbus, NJ 08022-1039 resolvent at comcast.net Home: 609-298-3650 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Indexing a New List with Elements from Another List.py Type: text/x-python Size: 1303 bytes Desc: not available URL: From pdesantis at istruzione.it Tue Feb 24 12:15:26 2015 From: pdesantis at istruzione.it (De Santis Paolo) Date: Tue, 24 Feb 2015 11:15:26 +0000 Subject: [docs] documentation download Message-ID: <2A97E5E49DF97C408F2E1591686DE12C9E1AD5@MFWDAG003.miur.inf> Hi, it seems it 's impossible to download the documentation package at the web page https://docs.python.org/3/download.html The system returns a "404 not found" http message. Is there any problem? Regards Dott. Paolo De Santis Direzione generale per i Contratti, gli Acquisti e i Sistemi Informativi e la Statistica Dirigente Ufficio III Tel. 0658492389 paolo.desantis at istruzione.it -------------- next part -------------- An HTML attachment was scrubbed... URL: From prfernandez at gmail.com Tue Feb 24 13:36:30 2015 From: prfernandez at gmail.com (Pablo Fernandez) Date: Tue, 24 Feb 2015 09:36:30 -0300 Subject: [docs] Can't download docs Message-ID: I can't donwload Python 3.4.3rc1 Documentation. Please check the link Thanks From ilya.makarchuk at gmail.com Tue Feb 24 14:57:58 2015 From: ilya.makarchuk at gmail.com (=?UTF-8?B?0JjQu9GM0Y8g0JzQsNC60LDRgNGH0YPQug==?=) Date: Tue, 24 Feb 2015 16:57:58 +0300 Subject: [docs] Broken links to the documentation files Message-ID: Hello. I've tried to download archives from the Download page, but they're not there. Links on the page lead to a 404 error. Seems like you have broken links. Ilya -------------- next part -------------- An HTML attachment was scrubbed... URL: From ilya.makarchuk at gmail.com Tue Feb 24 15:01:34 2015 From: ilya.makarchuk at gmail.com (=?UTF-8?B?0JjQu9GM0Y8g0JzQsNC60LDRgNGH0YPQug==?=) Date: Tue, 24 Feb 2015 17:01:34 +0300 Subject: [docs] Broken links to the documentation files (2) Message-ID: Sorry, I forgot to mention: here's the page where the broken links are: https://docs.python.org/3/download.html 24 ????. 2015 ?. 16:57 ???????????? "???? ????????" < ilya.makarchuk at gmail.com> ???????: > Hello. > I've tried to download archives from the Download page, but they're not > there. Links on the page lead to a 404 error. Seems like you have broken > links. > > Ilya > -------------- next part -------------- An HTML attachment was scrubbed... URL: From howard.birkett at collercapital.com Tue Feb 24 14:12:59 2015 From: howard.birkett at collercapital.com (Howard Birkett) Date: Tue, 24 Feb 2015 13:12:59 +0000 Subject: [docs] file not found Message-ID: >From https://docs.python.org/3/download.html File not found on the end of this link https://docs.python.org/3/archives/python-3.4.3rc1-docs-pdf-a4.zip Howard Birkett Coller Capital 33 Cavendish Square London W1G 0TT Tel: +44 20 7631 8568 Fax: +44 20 7631 8555 www.collercapital.com ________________________________ This message and its attachments (which are together referred to as "this Communication") are intended only for the addressee. Unauthorised use, disclosure or copying is strictly prohibited and may be unlawful. If you have received this Communication in error, please notify the sender immediately by e-mail and delete this Communication and all copies. This Communication may contain information that is proprietary, confidential, privileged or otherwise legally exempt from disclosure. Coller Capital Limited and its affiliates disclaim any liability for reliance upon any statement, opinion or information contained in this Communication. Coller Capital Limited is registered in England and Wales (registered number 3020017). Its registered office is at 33 Cavendish Square, London, W1G 0TT, United Kingdom. --------------------------------------------------------------------------------------- This email has been scanned for email related threats and delivered safely by Mimecast. For more information please visit http://www.mimecast.com --------------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From thomamelle at hotmail.fr Tue Feb 24 15:34:52 2015 From: thomamelle at hotmail.fr (Thomas) Date: Tue, 24 Feb 2015 09:34:52 -0500 Subject: [docs] can't download Message-ID: Hi, I can?t download your documentation on safari 7.0.5 (9537.77.4) on my mac os X 10.9.4 Can you fix it ? I don?t have internet were I work Cordially, Thomas From theonaunheim at gmail.com Tue Feb 24 22:19:19 2015 From: theonaunheim at gmail.com (Theo Naunheim) Date: Tue, 24 Feb 2015 15:19:19 -0600 Subject: [docs] Dead link 'https://docs.python.org/3.4/download.html' Message-ID: Good afternoon. Just as a heads up, your Python 3.4 doc server is returning 404 for the links on the following page: https://docs.python.org/3.4/download.html Best regards, Theo -------------- next part -------------- An HTML attachment was scrubbed... URL: From amgrima58 at gmail.com Tue Feb 24 22:24:28 2015 From: amgrima58 at gmail.com (Angela Grima) Date: Tue, 24 Feb 2015 16:24:28 -0500 Subject: [docs] Question Message-ID: Hello, \ I am a beginner at Python and I am trying to write a program that allows me to read in a list of decimal numerals, assign a grade to each one, and write each one with the corresponding grade. Unfortunately, it Python thinks that each score is a string but does not allow me to convert it to a floating point. I have tried different statements using Python but I am still stuck. Attached are a copy of the program, data being used. Below is the printed output. Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Ange\Documents\Computer Science\Python Class>docbright.py Score Grade Traceback (most recent call last): File "C:\Users\Ange\Documents\Computer Science\Python Class\docbright.py", lin e 18, in x = float(x) + .005 ValueError: could not convert string to float:ss> Your help is appreciated. Angela Grima -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- file = open("datang.txt","r") count = 0 print 'Score Grade' if count <= 10: char = file.readline(4) for line in file: x = line.strip() count = count + 1 # print 'line count:', count,x x = float(x) + .005 y = line.strip() if x > 1: print y[0:4],'Error number is greater than 1' elif x>=.9: print y[0:4],' A' elif x>=.8: print y[0:4],' B' elif x>=.7: print y[0:4],' C' elif x>=.6: print y[0:4],' D' elif x>=0.0: print y[0:4],' F' else: print y[0:5],'Error number is less than 0' file.close() -------------- next part -------------- 0.45 0.56 0.69 0.75 0.85 0.95 0.15 0.10 0.25 0.35 From JColburn at nvidia.com Wed Feb 25 02:22:52 2015 From: JColburn at nvidia.com (Jon Colburn) Date: Wed, 25 Feb 2015 01:22:52 +0000 Subject: [docs] typo on in 4.8.3 Bytes and Bytearray Operations Message-ID: <68a51f3fe55d48d8a78d3b34aa076fd6@HQMAIL103.nvidia.com> Hello, It looks like a typo from copy paste in the 3.4.3rc1 Documentation | Python Standard Library | Built-in Types | 4.8.3 Bytes and Bytearray Operations. Thanks, Jon bytes.isupper() bytearray.isupper() Return true if there is at least one lowercase alphabetic ASCII character in the sequence and no uppercase ASCII characters, false otherwise. For example: ----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ----------------------------------------------------------------------------------- -------------- next part -------------- An HTML attachment was scrubbed... URL: From aowen at uoregon.edu Wed Feb 25 05:52:10 2015 From: aowen at uoregon.edu (Alexander A Owen) Date: Tue, 24 Feb 2015 20:52:10 -0800 Subject: [docs] Download Link Trouble Message-ID: <832460ddf8ed17f4cc43deb0d5e7b4c4@uoregon.edu> Hello! I'm trying to download Python 3.4.3rc1 Documentation as a PDF from the Download page, but when I click the download link, I am sent to a 404. I receive a 404 error for each link I click. (PDF, HTML, Plain Text...) Thanks for reading! ----- Alexander Owen Computer Science Undergraduate University of Oregon aowen at uoregon.edu From petteri.uusitalo at gmail.com Wed Feb 25 08:48:30 2015 From: petteri.uusitalo at gmail.com (Petteri Uusitalo) Date: Wed, 25 Feb 2015 09:48:30 +0200 Subject: [docs] Python downloadable documents ? Message-ID: Hello Links or archive packs @ https://docs.python.org/3/download.html seem to be broken. I can download them, but files are empty. Regards Petteri Uusitalo Pori, Finland -------------- next part -------------- An HTML attachment was scrubbed... URL: From sajuptpm at gmail.com Wed Feb 25 10:08:11 2015 From: sajuptpm at gmail.com (Saju M) Date: Wed, 25 Feb 2015 14:38:11 +0530 Subject: [docs] Help required to add some examples in python docs Message-ID: Hi, I would like to add some simple example codes in python docs and make it more understandable. What are the procedure ? From where I can clone the source code of docs and How to push my change ? Regards Saju Madhavan +91 09535134654 -------------- next part -------------- An HTML attachment was scrubbed... URL: From frans at southshield.net Thu Feb 26 20:57:11 2015 From: frans at southshield.net (=?UTF-8?B?RnJhbnMgdmFuIER1bm7DqQ==?=) Date: Thu, 26 Feb 2015 13:57:11 -0600 Subject: [docs] Download documents shows 404 not found error Message-ID: <54EF7A97.8090807@southshield.net> Hi, I'm trying to update my local python documentation but it seems that all download links are down (they show a 404 nginx error): https://docs.python.org/3/archives/python-3.4.3rc1-docs.epub https://docs.python.org/3/archives/python-3.4.3rc1-docs-text.zip https://docs.python.org/3/archives/python-3.4.3rc1-docs-html.zip etc. Can you please have a look? With best wishes and many thanks for the work you do, Frans. From t.perger at raap.nl Fri Feb 27 08:04:13 2015 From: t.perger at raap.nl (T.Perger) Date: Fri, 27 Feb 2015 08:04:13 +0100 Subject: [docs] Python Message-ID: Dear sir, Tried to download archives/python-3.4.3rc1-docs-pdf-a4.zip. from https://docs.python.org/3/download.html Keep getting the following error message: Please help! Kind regards T.M. (Timo) Perger The Netherlands ---------------------------- DISCLAIMER ----------------------------- De informatie verzonden met dit e-mail bericht is uitsluitend bestemd voor de geadresseerde. Openbaarmaking, vermenigvuldiging, verspreiding en/of verstrekking aan derden is niet toegestaan. Gebruik van deze informatie door anderen dan de geadresseerde is verboden. U wordt verzocht bij onjuiste adressering de afzender direct te informeren door het bericht te retourneren. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image003.jpg Type: image/jpeg Size: 3535 bytes Desc: not available URL: From zachary.ware+pydocs at gmail.com Fri Feb 27 08:42:04 2015 From: zachary.ware+pydocs at gmail.com (Zachary Ware) Date: Fri, 27 Feb 2015 01:42:04 -0600 Subject: [docs] typo on in 4.8.3 Bytes and Bytearray Operations In-Reply-To: <68a51f3fe55d48d8a78d3b34aa076fd6@HQMAIL103.nvidia.com> References: <68a51f3fe55d48d8a78d3b34aa076fd6@HQMAIL103.nvidia.com> Message-ID: Hi Jon, On Tue, Feb 24, 2015 at 7:22 PM, Jon Colburn wrote: > Hello, > > It looks like a typo from copy paste in the 3.4.3rc1 Documentation | Python > Standard Library | Built-in Types | 4.8.3 Bytes and Bytearray Operations. > > Thanks, > Jon > > bytes.isupper() > bytearray.isupper() > > Return true if there is at least one lowercase alphabetic ASCII character in > the sequence and no uppercase ASCII characters, false otherwise. Thanks for the report! This has now been fixed. Regards, -- Zach From report at bugs.python.org Fri Feb 27 09:55:57 2015 From: report at bugs.python.org (Alex Shkop) Date: Fri, 27 Feb 2015 08:55:57 +0000 Subject: [docs] [issue22832] Tweak parameter names for fcntl module In-Reply-To: <1415583151.45.0.487298070274.issue22832@psf.upfronthosting.co.za> Message-ID: <1425027356.85.0.600286905295.issue22832@psf.upfronthosting.co.za> Alex Shkop added the comment: Created a patch. It renames arguments in clinic declarations and in documents. For lockf I've chosen Linux naming, because it really calls fcntl which has an argument called cmd, not function. ---------- keywords: +patch nosy: +ashkop Added file: http://bugs.python.org/file38257/issue22832.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 13:49:29 2015 From: report at bugs.python.org (Piotr Dobrogost) Date: Fri, 27 Feb 2015 12:49:29 +0000 Subject: [docs] [issue23536] Add explicit information on config file format not supporting filters Message-ID: <1425041368.98.0.00469006830804.issue23536@psf.upfronthosting.co.za> New submission from Piotr Dobrogost: It would be helpful to make it clear in section "Configuration file format" that it's not possible to configure filters through configuration file as opposed to dictionary passed to dictConfig() method. I found this clearly stated in Pyramid docs at http://docs.pylonsproject.org/docs/pyramid/en/latest/narr/logging.html ? "For more advanced filtering, the logging module provides a logging.Filter object; however it cannot be used directly from the configuration file." ---------- assignee: docs at python components: Documentation messages: 236741 nosy: docs at python, piotr.dobrogost, vinay.sajip priority: normal severity: normal status: open title: Add explicit information on config file format not supporting filters type: enhancement versions: Python 2.7, Python 3.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 15:10:07 2015 From: report at bugs.python.org (Brett Cannon) Date: Fri, 27 Feb 2015 14:10:07 +0000 Subject: [docs] [issue22832] Tweak parameter names for fcntl module In-Reply-To: <1415583151.45.0.487298070274.issue22832@psf.upfronthosting.co.za> Message-ID: <1425046207.72.0.779981936956.issue22832@psf.upfronthosting.co.za> Brett Cannon added the comment: The patch LGTM. Serhiy, you have anything to add? ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 15:51:07 2015 From: report at bugs.python.org (Larry Hastings) Date: Fri, 27 Feb 2015 14:51:07 +0000 Subject: [docs] [issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation In-Reply-To: <1424075429.03.0.707318894375.issue23471@psf.upfronthosting.co.za> Message-ID: <1425048667.79.0.195616900673.issue23471@psf.upfronthosting.co.za> Larry Hastings added the comment: This is part of the release process. 3.4.3 was fine last I checked, so perhaps some wonderful automated process broke it for me. 3.5, I think I simply didn't upload the docs properly. Anyway, this is my responsibility as RM for 3.4 and 3.5, so in the future if I slip up again please assign the bug to me. ---------- assignee: docs at python -> larry _______________________________________ Python tracker _______________________________________ From storchaka at gmail.com Fri Feb 27 16:05:11 2015 From: storchaka at gmail.com (storchaka at gmail.com) Date: Fri, 27 Feb 2015 15:05:11 -0000 Subject: [docs] Tweak parameter names for fcntl module (issue 22832) Message-ID: <20150227150511.23004.29201@psf.upfronthosting.co.za> https://bugs.python.org/review/22832/diff/14034/Doc/library/fcntl.rst File Doc/library/fcntl.rst (right): https://bugs.python.org/review/22832/diff/14034/Doc/library/fcntl.rst#newcode37 Doc/library/fcntl.rst:37: header files. The argument *arg* is optional, and defaults to the integer May be change signature to Python-compatible "fcntl(fd, cmd[, arg=0)" and remove sentences about default values? https://bugs.python.org/review/22832/diff/14034/Doc/library/fcntl.rst#newcode38 Doc/library/fcntl.rst:38: value ``0``. When present, it can either be an integer value, or a string. This is Python 2 legacy. Should be "bytes". Strings are supported too, but we should deprecate this. https://bugs.python.org/review/22832/diff/14034/Doc/library/fcntl.rst#newcode41 Doc/library/fcntl.rst:41: a string it represents a binary structure, e.g. created by :func:`struct.pack`. bytes https://bugs.python.org/review/22832/diff/14034/Doc/library/fcntl.rst#newcode44 Doc/library/fcntl.rst:44: of the buffer, converted to a string object. The length of the returned string Return value is bytes instance. https://bugs.python.org/review/22832/diff/14034/Doc/library/fcntl.rst#newcode58 Doc/library/fcntl.rst:58: The op parameter is limited to values that can fit in 32-bits. "The op parameter" -- not updated. https://bugs.python.org/review/22832/diff/14034/Doc/library/fcntl.rst#newcode63 Doc/library/fcntl.rst:63: The parameter *arg* can be one of an integer, absent (treated identically to the Same as above about default value. https://bugs.python.org/review/22832/diff/14034/Doc/library/fcntl.rst#newcode64 Doc/library/fcntl.rst:64: integer ``0``), an object supporting the read-only buffer interface (most likely "(most likely a plain Python string)" -- incorrect. Should be "(like :class:`bytes`)". https://bugs.python.org/review/22832/diff/14034/Doc/library/fcntl.rst#newcode65 Doc/library/fcntl.rst:65: a plain Python string) or an object supporting the read-write buffer interface. May be add "(like :class:`bytearray`)". https://bugs.python.org/review/22832/ From report at bugs.python.org Fri Feb 27 16:07:08 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 27 Feb 2015 15:07:08 +0000 Subject: [docs] [issue22832] Tweak parameter names for fcntl module In-Reply-To: <1415583151.45.0.487298070274.issue22832@psf.upfronthosting.co.za> Message-ID: <1425049628.77.0.0196247358942.issue22832@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I found a lot of not related issues in the documentation. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 16:34:03 2015 From: report at bugs.python.org (Alex Shkop) Date: Fri, 27 Feb 2015 15:34:03 +0000 Subject: [docs] [issue22832] Tweak parameter names for fcntl module In-Reply-To: <1415583151.45.0.487298070274.issue22832@psf.upfronthosting.co.za> Message-ID: <1425051243.47.0.479130616145.issue22832@psf.upfronthosting.co.za> Alex Shkop added the comment: Looks like default value for mutate_flag in ioctl() should be False. Docstring says: "If the argument is a mutable buffer and the mutable_flag argument is not passed or is false, the behavior is as if a string had been passed." Should I change the default value or the docstring? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 17:12:12 2015 From: report at bugs.python.org (Alex Shkop) Date: Fri, 27 Feb 2015 16:12:12 +0000 Subject: [docs] [issue22832] Tweak parameter names for fcntl module In-Reply-To: <1415583151.45.0.487298070274.issue22832@psf.upfronthosting.co.za> Message-ID: <1425053532.13.0.0764312257485.issue22832@psf.upfronthosting.co.za> Alex Shkop added the comment: Docs say that mutate_flag is true by default since Python 2.5. Looks like I should fix the docstring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 18:08:25 2015 From: report at bugs.python.org (Larry Hastings) Date: Fri, 27 Feb 2015 17:08:25 +0000 Subject: [docs] [issue23471] 404 Not Found when downloading Python 3.4.3rc1 Documentation In-Reply-To: <1424075429.03.0.707318894375.issue23471@psf.upfronthosting.co.za> Message-ID: <1425056905.56.0.172018561331.issue23471@psf.upfronthosting.co.za> Larry Hastings added the comment: I think I've got them all working now. Please reopen if you discover new breakage. (Or old breakage I guess if I didn't actually fix it...!) ---------- resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 20:18:42 2015 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 27 Feb 2015 19:18:42 +0000 Subject: [docs] [issue23532] add example of 'first match wins' to regex "|" documentation? In-Reply-To: <1424991623.26.0.907615110662.issue23532@psf.upfronthosting.co.za> Message-ID: <1425064722.75.0.0691048508257.issue23532@psf.upfronthosting.co.za> Matthew Barnett added the comment: Not quite all. POSIX regexes will always look for the longest match, so the order of the alternatives doesn't matter, i.e. x|xy would give the same result as xy|x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 21:43:48 2015 From: report at bugs.python.org (Shakeel Mohamed) Date: Fri, 27 Feb 2015 20:43:48 +0000 Subject: [docs] [issue23542] Update PEP 476 for using urllib2.build_opener() Message-ID: <1425069828.0.0.476725699175.issue23542@psf.upfronthosting.co.za> New submission from Shakeel Mohamed: In the "Opting Out" section of PEP 476, there's a workaround for disabling SSL cert verification. I think it would be worth updating the section to include the following workaround when using urllib2.build_opener(), like so: unverified_ssl_handler = urllib2.HTTPSHandler(context=ssl._create_unverified_context()) opener = urllib2.build_opener(unverified_ssl_handler) ---------- assignee: docs at python components: Documentation messages: 236835 nosy: Shakeel Mohamed, docs at python priority: normal severity: normal status: open title: Update PEP 476 for using urllib2.build_opener() versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 21:50:39 2015 From: report at bugs.python.org (Carlo Beccarini) Date: Fri, 27 Feb 2015 20:50:39 +0000 Subject: [docs] [issue23512] The list of built-in http://text-processing.com/demo/sentiments is not alphabetical on https://docs.python.org/2/library/functions.html In-Reply-To: <1424791511.8.0.507561074794.issue23512@psf.upfronthosting.co.za> Message-ID: <1425070239.82.0.725946601009.issue23512@psf.upfronthosting.co.za> Carlo Beccarini added the comment: Well, these built-in are considered as non essential. ---------- nosy: +Paradisee title: List of builtins is not alphabetical on https://docs.python.org/2/library/functions.html -> The list of built-in http://text-processing.com/demo/sentiments is not alphabetical on https://docs.python.org/2/library/functions.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 22:37:39 2015 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 27 Feb 2015 21:37:39 +0000 Subject: [docs] [issue23512] The list of built-in http://text-processing.com/demo/sentiments is not alphabetical on https://docs.python.org/2/library/functions.html In-Reply-To: <1424791511.8.0.507561074794.issue23512@psf.upfronthosting.co.za> Message-ID: <1425073059.62.0.0375650639262.issue23512@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The table was deliberately created as it is and I think it should be left as is. Those four functions appear 'out of order' in a separate section "3. Non-essential Built-in Functions". ---------- nosy: +terry.reedy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 22:43:18 2015 From: report at bugs.python.org (Edward D'Souza) Date: Fri, 27 Feb 2015 21:43:18 +0000 Subject: [docs] [issue23512] The list of built-in http://text-processing.com/demo/sentiments is not alphabetical on https://docs.python.org/2/library/functions.html In-Reply-To: <1424791511.8.0.507561074794.issue23512@psf.upfronthosting.co.za> Message-ID: <1425073398.37.0.111607041167.issue23512@psf.upfronthosting.co.za> Edward D'Souza added the comment: Doesn't make sense to me. The page says "They are listed here in alphabetical order.", which isn't true. Furthermore, not putting them in order screws up people who assume it is in alphabetical order and try to search for a function with their eyes. If they are so special, put them in a separate table. This inconsistency is simply disrespectful to the reader, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 27 23:42:56 2015 From: report at bugs.python.org (Carlo Beccarini) Date: Fri, 27 Feb 2015 22:42:56 +0000 Subject: [docs] [issue23512] The list of built-in http://text-processing.com/demo/sentiments is not alphabetical on https://docs.python.org/2/library/functions.html In-Reply-To: <1424791511.8.0.507561074794.issue23512@psf.upfronthosting.co.za> Message-ID: <1425076976.87.0.692821146706.issue23512@psf.upfronthosting.co.za> Carlo Beccarini added the comment: Maybe we could put them in another table below the current one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 00:25:51 2015 From: report at bugs.python.org (R. David Murray) Date: Fri, 27 Feb 2015 23:25:51 +0000 Subject: [docs] [issue23512] The list of built-in functions is not alphabetical on https://docs.python.org/2/library/functions.html In-Reply-To: <1424791511.8.0.507561074794.issue23512@psf.upfronthosting.co.za> Message-ID: <1425079551.55.0.240600501055.issue23512@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: The list of built-in http://text-processing.com/demo/sentiments is not alphabetical on https://docs.python.org/2/library/functions.html -> The list of built-in functions is not alphabetical on https://docs.python.org/2/library/functions.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 00:57:26 2015 From: report at bugs.python.org (Martin Panter) Date: Fri, 27 Feb 2015 23:57:26 +0000 Subject: [docs] [issue23254] Document how to close the TCPServer listening socket In-Reply-To: <1421469175.0.0.628748486385.issue23254@psf.upfronthosting.co.za> Message-ID: <1425081446.45.0.700938898787.issue23254@psf.upfronthosting.co.za> Martin Panter added the comment: Posting server_close.v2.patch, which tests fileno(), and uses a single space between the new sentences. Also added a bit to the how-to at the top (using doubly-spaced sentences to match the rest of the paragraph). ---------- Added file: http://bugs.python.org/file38271/server_close.v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 01:53:28 2015 From: report at bugs.python.org (Demian Brecht) Date: Sat, 28 Feb 2015 00:53:28 +0000 Subject: [docs] [issue23254] Document how to close the TCPServer listening socket In-Reply-To: <1421469175.0.0.628748486385.issue23254@psf.upfronthosting.co.za> Message-ID: <1425084808.76.0.720858978598.issue23254@psf.upfronthosting.co.za> Demian Brecht added the comment: LGTM. I'm not sure whether or not it's eligible for 3.4 though as it's a documentation and not a functional fix. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From berker.peksag at gmail.com Sat Feb 28 04:13:25 2015 From: berker.peksag at gmail.com (=?UTF-8?Q?Berker_Peksa=C4=9F?=) Date: Sat, 28 Feb 2015 05:13:25 +0200 Subject: [docs] Help required to add some examples in python docs In-Reply-To: References: Message-ID: On Wed, Feb 25, 2015 at 11:08 AM, Saju M wrote: > Hi, > > I would like to add some simple example codes in python docs and make it > more understandable. What are the procedure ? From where I can clone the > source code of docs and How to push my change ? Hi Saju, Welcome! * to learn how to clone the cpython repository, you can read https://docs.python.org/devguide/#quick-start and https://docs.python.org/devguide/setup.html * to learn the patch workflow, you can read https://docs.python.org/devguide/patch.html * to learn CPython specific documentation guidelines, you can read https://docs.python.org/devguide/documenting.html You can also ask your questions on the core-mentorship list: https://mail.python.org/mailman/listinfo/core-mentorship --Berker From report at bugs.python.org Sat Feb 28 06:48:30 2015 From: report at bugs.python.org (R. David Murray) Date: Sat, 28 Feb 2015 05:48:30 +0000 Subject: [docs] [issue23254] Document how to close the TCPServer listening socket In-Reply-To: <1421469175.0.0.628748486385.issue23254@psf.upfronthosting.co.za> Message-ID: <1425102510.23.0.191183570161.issue23254@psf.upfronthosting.co.za> R. David Murray added the comment: In general documentation changes go in all maintained versions (ie: right now that would be 2.7, 3.4, and default/3.5). The only exception, really, would be if the change didn't apply to one or more of the versions because of code differences. (Note: I haven't reviewed the patch itself yet ;) ---------- nosy: +r.david.murray versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 06:51:26 2015 From: report at bugs.python.org (Berker Peksag) Date: Sat, 28 Feb 2015 05:51:26 +0000 Subject: [docs] [issue23525] isbuiltin, isroutine, etc. In-Reply-To: <1424930605.81.0.317229186778.issue23525@psf.upfronthosting.co.za> Message-ID: <1425102686.63.0.0433718037756.issue23525@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +yselivanov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 07:59:45 2015 From: report at bugs.python.org (Georg Brandl) Date: Sat, 28 Feb 2015 06:59:45 +0000 Subject: [docs] [issue23512] The list of built-in functions is not alphabetical on https://docs.python.org/2/library/functions.html In-Reply-To: <1424791511.8.0.507561074794.issue23512@psf.upfronthosting.co.za> Message-ID: <1425106785.82.0.1719813005.issue23512@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree with Edward. The table makes no distinction between the two group of builtins, so it is confusing why it would list them not in alphabetical order. I wouldn't go so far as to call it "disrespectful" though :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 12:33:06 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Feb 2015 11:33:06 +0000 Subject: [docs] [issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string In-Reply-To: <1418964154.65.0.595903967697.issue23088@psf.upfronthosting.co.za> Message-ID: <1425123186.09.0.996743774709.issue23088@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: May be mention that the result of PyUnicode_AsUTF8() can contain null bytes? And the same for PyBytes_AS_STRING()/PyBytes_AsString()? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 13:00:51 2015 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 28 Feb 2015 12:00:51 +0000 Subject: [docs] [issue17576] PyNumber_Index() is not int-subclass friendly (or operator.index() docos lie) In-Reply-To: <1364595911.19.0.826873230127.issue17576@psf.upfronthosting.co.za> Message-ID: <1425124851.13.0.0055077947299.issue17576@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, something appears to have gotten confused along the way here. Barry's original problem report was that operator.index() was returning a different answer than operator.__index__() for int subclasses. Absolutely nothing to do with the int builtin at all. While the fact int() *may* return int subclasses isn't especially good, it's also a longstanding behaviour. The problem Barry reports, where a subclassing based proxy type isn't reverting to a normal integer when accessed via operator.index() despite defining __index__() to do exactly that should be possible to fix just by applying the stricter check specifically in PyNumber_Index. Expanding the scope to cover __int__() and __trunc__() as well would be much, much hairier, as those are much older interfaces, and used in a wider variety of situations. We specifically invented __index__() to stay away from that mess while making it possible to explicitly indicate that a type supports a lossless conversion to int rather than a potentially lossy one. ---------- _______________________________________ Python tracker _______________________________________ From storchaka at gmail.com Sat Feb 28 13:02:25 2015 From: storchaka at gmail.com (storchaka at gmail.com) Date: Sat, 28 Feb 2015 12:02:25 -0000 Subject: [docs] Python 3 crc32 documentation clarifications (issue 22341) Message-ID: <20150228120225.22877.53343@psf.upfronthosting.co.za> https://bugs.python.org/review/22341/diff/13462/Doc/library/binascii.rst File Doc/library/binascii.rst (right): https://bugs.python.org/review/22341/diff/13462/Doc/library/binascii.rst#newcode125 Doc/library/binascii.rst:125: the given *crc*. The default initial value is zero. The algorithm May be just write the signature as crc32(data, crc=0) and drop the sentence about the default value? https://bugs.python.org/review/22341/diff/13462/Doc/library/zlib.rst File Doc/library/zlib.rst (right): https://bugs.python.org/review/22341/diff/13462/Doc/library/zlib.rst#newcode36 Doc/library/zlib.rst:36: the checksum; otherwise, a default value of 1 is used. Same as for binascii.crc32(). https://bugs.python.org/review/22341/diff/13462/Doc/library/zlib.rst#newcode96 Doc/library/zlib.rst:96: default value of zero is used. Same as above. https://bugs.python.org/review/22341/ From report at bugs.python.org Sat Feb 28 13:06:47 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Feb 2015 12:06:47 +0000 Subject: [docs] [issue22341] Python 3 crc32 documentation clarifications In-Reply-To: <1409918129.4.0.321897542374.issue22341@psf.upfronthosting.co.za> Message-ID: <1425125207.68.0.222089616127.issue22341@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: crc & 0xffffffff is still used in gzip, zipfile and tarfile. And some comments say about signess of 32-bit checksums. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 13:08:49 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Feb 2015 12:08:49 +0000 Subject: [docs] [issue23200] Clarify max_length and flush() for zlib decompression In-Reply-To: <1420766781.53.0.179588350228.issue23200@psf.upfronthosting.co.za> Message-ID: <1425125329.24.0.646731611775.issue23200@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +nadeem.vawda stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 14:43:59 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Feb 2015 13:43:59 +0000 Subject: [docs] [issue23391] Documentation of EnvironmentError (OSError) arguments disappeared In-Reply-To: <1423026410.5.0.815744351944.issue23391@psf.upfronthosting.co.za> Message-ID: <1425131039.6.0.160929414384.issue23391@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +needs review nosy: +pitrou stage: -> patch review versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 17:37:41 2015 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 28 Feb 2015 16:37:41 +0000 Subject: [docs] [issue23549] heapq docs should be more precise about how to access the smallest element Message-ID: <1425141461.42.0.47354110207.issue23549@psf.upfronthosting.co.za> New submission from Eli Bendersky: The heapq documentation has this paragraph after the doc of nsmallest: The latter two functions perform best for smaller values of n. For larger values, it is more efficient to use the sorted() function. Also, when n==1, it is more efficient to use the built-in min() and max() functions. This is confusing as it suggests to use min() on a heap to find the minimal element. heap[0] is the minimal element, but this is only mentioned at the very top - so you need to read the doc of the entire module to find it. Nothing in the docs of methods suggests it. ---------- assignee: docs at python components: Documentation messages: 236895 nosy: docs at python, eli.bendersky priority: normal severity: normal status: open title: heapq docs should be more precise about how to access the smallest element type: behavior versions: Python 2.7, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 17:45:48 2015 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 28 Feb 2015 16:45:48 +0000 Subject: [docs] [issue19980] Improve help('non-topic') response In-Reply-To: <1386984892.27.0.919528696836.issue19980@psf.upfronthosting.co.za> Message-ID: <1425141948.74.0.818910427128.issue19980@psf.upfronthosting.co.za> Mark Lawrence added the comment: Pang :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 17:47:23 2015 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 28 Feb 2015 16:47:23 +0000 Subject: [docs] [issue23549] heapq docs should be more precise about how to access the smallest element In-Reply-To: <1425141461.42.0.47354110207.issue23549@psf.upfronthosting.co.za> Message-ID: <1425142043.96.0.511452341476.issue23549@psf.upfronthosting.co.za> Eli Bendersky added the comment: Proposed patch (generated vs. the 3.4 docs) is attached ---------- keywords: +patch Added file: http://bugs.python.org/file38277/issue23549.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 18:31:17 2015 From: report at bugs.python.org (Berker Peksag) Date: Sat, 28 Feb 2015 17:31:17 +0000 Subject: [docs] [issue23542] Update PEP 476 for using urllib2.build_opener() In-Reply-To: <1425069828.0.0.476725699175.issue23542@psf.upfronthosting.co.za> Message-ID: <1425144677.42.0.4605166936.issue23542@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +alex, christian.heimes, dstufft, giampaolo.rodola, janssen, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 20:22:19 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Feb 2015 19:22:19 +0000 Subject: [docs] [issue19980] Improve help('non-topic') response In-Reply-To: <1386984892.27.0.919528696836.issue19980@psf.upfronthosting.co.za> Message-ID: <1425151339.08.0.843375792491.issue19980@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is a problem with the patch. When you are in interactive help utility, then the request 'help' runs nested interactive help utility. The difference between unpatched behavior is that now you need press Ctrl-D or 'q' twice to exit to normal Python interpreter. When you type 'help' repeatedly, your could run third, fourth, etc nested help utility. Here is modified patch. Now help('help') produces the same output as help(help), but the 'help' request in interactive help utility prints help intro message. >>> help('help') Help on _Helper in module _sitebuiltins object: help = class _Helper(builtins.object) | Define the builtin 'help'. | | This is a wrapper around pydoc.help that provides a helpful message | when 'help' is typed at the Python interactive prompt. | | Calling help() at the Python prompt starts an interactive help session. | Calling help(thing) prints help for the python object 'thing'. | | Methods defined here: | | __call__(self, *args, **kwds) | | __repr__(self) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) >>> help() Welcome to Python 3.5's help utility! If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/3.5/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, symbols, or topics, type "modules", "keywords", "symbols", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose name or summary contain a given string such as "spam", type "modules spam". help> help Welcome to Python 3.5's help utility! If this is your first time using Python, you should definitely check out the tutorial on the Internet at http://docs.python.org/3.5/tutorial/. Enter the name of any module, keyword, or topic to get help on writing Python programs and using Python modules. To quit this help utility and return to the interpreter, just type "quit". To get a list of available modules, keywords, symbols, or topics, type "modules", "keywords", "symbols", or "topics". Each module also comes with a one-line summary of what it does; to list the modules whose name or summary contain a given string such as "spam", type "modules spam". help> ---------- assignee: docs at python -> serhiy.storchaka nosy: +serhiy.storchaka Added file: http://bugs.python.org/file38278/issue19880v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 20:24:24 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Feb 2015 19:24:24 +0000 Subject: [docs] [issue19980] Improve help('non-topic') response In-Reply-To: <1386984892.27.0.919528696836.issue19980@psf.upfronthosting.co.za> Message-ID: <1425151464.23.0.377972510685.issue19980@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file38278/issue19880v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 20:25:48 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Feb 2015 19:25:48 +0000 Subject: [docs] [issue19980] Improve help('non-topic') response In-Reply-To: <1386984892.27.0.919528696836.issue19980@psf.upfronthosting.co.za> Message-ID: <1425151548.95.0.786789035145.issue19980@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file38279/issue19880v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 21:16:57 2015 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 28 Feb 2015 20:16:57 +0000 Subject: [docs] [issue23549] heapq docs should be more precise about how to access the smallest element In-Reply-To: <1425141461.42.0.47354110207.issue23549@psf.upfronthosting.co.za> Message-ID: <1425154617.41.0.331989738188.issue23549@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 22:46:58 2015 From: report at bugs.python.org (Martin Panter) Date: Sat, 28 Feb 2015 21:46:58 +0000 Subject: [docs] [issue23549] heapq docs should be more precise about how to access the smallest element In-Reply-To: <1425141461.42.0.47354110207.issue23549@psf.upfronthosting.co.za> Message-ID: <1425160018.75.0.504848037924.issue23549@psf.upfronthosting.co.za> Martin Panter added the comment: ?Smalest? is spelt with a double L. ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 22:48:40 2015 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 28 Feb 2015 21:48:40 +0000 Subject: [docs] [issue23549] heapq docs should be more precise about how to access the smallest element In-Reply-To: <1425141461.42.0.47354110207.issue23549@psf.upfronthosting.co.za> Message-ID: <1425160120.92.0.746950081148.issue23549@psf.upfronthosting.co.za> Eli Bendersky added the comment: Good catch. Attaching a new version of the patch with the typo fixed. ---------- Added file: http://bugs.python.org/file38280/issue23549.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 23:13:54 2015 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 28 Feb 2015 22:13:54 +0000 Subject: [docs] [issue19980] Improve help('non-topic') response In-Reply-To: <1386984892.27.0.919528696836.issue19980@psf.upfronthosting.co.za> Message-ID: <1425161634.37.0.329658317941.issue19980@psf.upfronthosting.co.za> Mark Lawrence added the comment: LGTM. I noticed this running the tests. test_modules (test.test_pydoc.PydocImportTest) ... skipped 'causes undesireable side-effects (#20128)' test_modules_search (test.test_pydoc.PydocImportTest) ... skipped 'causes undesireable side-effects (#20128)' test_modules_search_builtin (test.test_pydoc.PydocImportTest) ... skipped 'some buildbots are not cooperating (#20128)' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 23:43:43 2015 From: report at bugs.python.org (Roundup Robot) Date: Sat, 28 Feb 2015 22:43:43 +0000 Subject: [docs] [issue19980] Improve help('non-topic') response In-Reply-To: <1386984892.27.0.919528696836.issue19980@psf.upfronthosting.co.za> Message-ID: <20150228224340.39434.33937@psf.io> Roundup Robot added the comment: New changeset 4a1fe339dcf6 by Serhiy Storchaka in branch 'default': Issue #19980: Improved help() for non-recognized strings. help('') now https://hg.python.org/cpython/rev/4a1fe339dcf6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 28 23:46:58 2015 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 28 Feb 2015 22:46:58 +0000 Subject: [docs] [issue19980] Improve help('non-topic') response In-Reply-To: <1386984892.27.0.919528696836.issue19980@psf.upfronthosting.co.za> Message-ID: <1425163618.22.0.968354794414.issue19980@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for your contribution Mark. > I noticed this running the tests. This is temporary OK. ---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker _______________________________________ From ivanhu0086 at gmail.com Fri Feb 27 11:42:37 2015 From: ivanhu0086 at gmail.com (Ivan Hu) Date: Fri, 27 Feb 2015 18:42:37 +0800 Subject: [docs] downloading problem Message-ID: <336A7BB0-6331-4F3C-B17C-1C8B867E7179@gmail.com> https://docs.python.org/3/download.html on this page, links for downloading Python 3.4.3rc1 documentation show ?404 Not Found" From rosemeer at yahoo.com.mx Fri Feb 27 22:04:52 2015 From: rosemeer at yahoo.com.mx (Rosa Maria) Date: Fri, 27 Feb 2015 21:04:52 +0000 (UTC) Subject: [docs] NOT SAVE FILE OWING TO AN ENCODING ERROR Message-ID: <1276544575.2278301.1425071096054.JavaMail.yahoo@mail.yahoo.com> I made a program to read which files are in a windows folder, and saves in a file in order to print it, but when it tries to write in a file the following error appears: ?? UnicodeEncodeError: 'charmap' codec can't encode character '\u2010' in position 8: character maps to I extpected that being Python-3 an utf8 native, I do'n have this problems.?I send the Python script and some examples of files to read. - "Que tengamos Sabidur?a para no temer a las Sombras de la Noche" - "Cu?date de la Ciencia que no Llora, de la Filosof?a que no R?e y de la Grandeza que no se inclina ante los ni?os" - "Madre es el nombre de dios en los labios y en los corazones de todos los ni?os" -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LKC.6558u2010100u2010HDu2010Pu2010118_C.xlsx Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Size: 911221 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LKC.6558u2010100u2010HDu2010Pu2010119_C.xlsx Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Size: 921091 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: LKC.6558u2010100u2010HDu2010Pu2010123_C.xlsx Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Size: 895532 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: Redear_Carpetotas.py URL: From berker.peksag at gmail.com Sat Feb 28 04:18:13 2015 From: berker.peksag at gmail.com (=?UTF-8?Q?Berker_Peksa=C4=9F?=) Date: Sat, 28 Feb 2015 05:18:13 +0200 Subject: [docs] Dear Python.org In-Reply-To: <1751366143.10300501.1424456902370.JavaMail.zimbra@comcast.net> References: <1365317802.10296925.1424456615004.JavaMail.zimbra@comcast.net> <1751366143.10300501.1424456902370.JavaMail.zimbra@comcast.net> Message-ID: On Fri, Feb 20, 2015 at 8:28 PM, wrote: > Dear Python.org, > > I'm in a bit of an overwhelmed situation right now, > so I did not know whom to ask. > > So, I was direct & attached my .py program. > > Why does my variable > coordinates > get destroyed along with > coord > when I remove elements from it? > It shouldn't. > Only coord should get destroyed. > > A family member who is an expert programmer tells me I need to make a > deepcopy > of coordinates. > > But, I see absolutely no mention of the word > deepcopy > in either your tutorial or PDF of references. I did a word/phrase search > for > deepcopy > and > shallow copy. > > Only passing mention was made of > shallow copy > on page 9 of your tutorial. Hi John, The copy.deepcopy documentation is here: https://docs.python.org/3/library/copy.html If you use Python 2, the correct link is https://docs.python.org/2.7/library/copy.html --Berker > > Please help! > Thanks, > John > > P.S. I absolutely need formal structured schooling to learn any language: > human or computer. This trying to learn it on my own stuff has never > worked, > because I spend days, weeks, months , years searching & searching > for the right statement. > > I got As in Fortran (1981), C++ (2005) & even passed an online Java course > (2012) > but I never made use of programming outside formal courses. > > Dr John Michael Nahay > 25 Chestnut Hill Lane > Columbus, NJ 08022-1039 > resolvent at comcast.net > Home: 609-298-3650 > > _______________________________________________ > docs mailing list > docs at python.org > https://mail.python.org/mailman/listinfo/docs >