From dhyan.hariprasad at live.com Sat Feb 1 00:34:33 2014 From: dhyan.hariprasad at live.com (dhyan.hariprasad at live.com) Date: Fri, 31 Jan 2014 23:34:33 +0000 Subject: [docs] =?utf-8?q?Python_not_working_properly?= Message-ID: Respected Sir/Madam, I am Dhyan Hariprasad from India and I am new to programming. From the tutorials given in the internet I tried the print command. print ?hello world? When I try to execute the command it shows error Sent from Windows Mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Sat Feb 1 00:51:56 2014 From: report at bugs.python.org (Ethan Furman) Date: Fri, 31 Jan 2014 23:51:56 +0000 Subject: [docs] [issue20467] Confusing wording about __init__ In-Reply-To: <1391208094.95.0.178232051767.issue20467@psf.upfronthosting.co.za> Message-ID: <1391212316.03.0.615770497092.issue20467@psf.upfronthosting.co.za> Changes by Ethan Furman : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 17:34:20 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Feb 2014 16:34:20 +0000 Subject: [docs] [issue19863] Missing function attributes in 2.7 docs. In-Reply-To: <1386010673.68.0.260580445507.issue19863@psf.upfronthosting.co.za> Message-ID: <1391272460.35.0.0624728557135.issue19863@psf.upfronthosting.co.za> Mark Dickinson added the comment: New changeset fed468670866 by Mark Dickinson in branch '2.7': Issue #19683: Add __closure__ and other missing attributes to function docs. http://hg.python.org/cpython/rev/fed468670866 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 17:35:37 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 01 Feb 2014 16:35:37 +0000 Subject: [docs] [issue19863] Missing function attributes in 2.7 docs. In-Reply-To: <1386010673.68.0.260580445507.issue19863@psf.upfronthosting.co.za> Message-ID: <1391272537.0.0.754364651374.issue19863@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 1 23:45:58 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 01 Feb 2014 22:45:58 +0000 Subject: [docs] [issue20477] Add examples of using the new contentmanager api to the email docs Message-ID: <1391294758.28.0.146811184979.issue20477@psf.upfronthosting.co.za> New submission from R. David Murray: Here are the examples I promised to write in issue 18891. ---------- assignee: docs at python components: Documentation, email files: contentmanager-examples.patch keywords: patch messages: 209922 nosy: barry, docs at python, r.david.murray priority: normal severity: normal stage: commit review status: open title: Add examples of using the new contentmanager api to the email docs type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file33850/contentmanager-examples.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 15:41:25 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Sun, 02 Feb 2014 14:41:25 +0000 Subject: [docs] [issue20466] Example in Doc/extending/embedding.rst fails to compile cleanly In-Reply-To: <1391206449.61.0.838795178148.issue20466@psf.upfronthosting.co.za> Message-ID: <1391352085.24.0.451822266189.issue20466@psf.upfronthosting.co.za> Saimadhav Heblikar added the comment: Patch fixes the mistake. Looks like it was copied over from earlier version. ---------- keywords: +patch nosy: +sahutd Added file: http://bugs.python.org/file33869/issue20466.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 16:38:27 2014 From: report at bugs.python.org (INADA Naoki) Date: Sun, 02 Feb 2014 15:38:27 +0000 Subject: [docs] [issue20487] Odd words in unittest.mock document. Message-ID: <1391355507.86.0.158179018907.issue20487@psf.upfronthosting.co.za> New submission from INADA Naoki: http://docs.python.org/3.3/library/unittest.mock.html#magic-mock > The two equality method, __eq__ and __ne__, are special. They do the default equality comparison on identity, using a side effect, unless you change their return value to return something else: What "using a side effect" means? ---------- assignee: docs at python components: Documentation messages: 209993 nosy: docs at python, michael.foord, naoki priority: normal severity: normal status: open title: Odd words in unittest.mock document. versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 16:41:58 2014 From: report at bugs.python.org (R. David Murray) Date: Sun, 02 Feb 2014 15:41:58 +0000 Subject: [docs] [issue20488] importlib title and introduction are out of date Message-ID: <1391355718.64.0.231740167188.issue20488@psf.upfronthosting.co.za> New submission from R. David Murray: Now that importlib *is* the import system in CPython, the title ("An Implementation of import") and the intro ("a reference implementation that is easier to comprehend than..." seem to me like they are out of date and should be reworded. ---------- assignee: docs at python components: Documentation messages: 209994 nosy: brett.cannon, docs at python, eric.snow, r.david.murray priority: normal severity: normal status: open title: importlib title and introduction are out of date type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 20:39:31 2014 From: report at bugs.python.org (Michael Foord) Date: Sun, 02 Feb 2014 19:39:31 +0000 Subject: [docs] [issue20487] Odd words in unittest.mock document. In-Reply-To: <1391355507.86.0.158179018907.issue20487@psf.upfronthosting.co.za> Message-ID: <1391369971.58.0.219937411535.issue20487@psf.upfronthosting.co.za> Michael Foord added the comment: A "side effect" is a mechanism Mock provides for mocks to have special behaviour when called. http://docs.python.org/3.3/library/unittest.mock.html#unittest.mock.Mock.side_effect The term is used very widely throughout the mock documentation, so I don't think it's appropriate to link *every* usage to the side_effect documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:51:52 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Feb 2014 21:51:52 +0000 Subject: [docs] [issue20423] io.StringIO newline param has wrong default In-Reply-To: <1390937078.16.0.885697814935.issue20423@psf.upfronthosting.co.za> Message-ID: <3fHQqX1b7Sz7LjM@mail.python.org> Roundup Robot added the comment: New changeset 82cfab2ad98d by Antoine Pitrou in branch '3.3': Issue #20423: fix documentation of io.StringIO's newline parameter http://hg.python.org/cpython/rev/82cfab2ad98d New changeset 69a2cc048c80 by Antoine Pitrou in branch '2.7': Issue #20423: fix documentation of io.StringIO's newline parameter http://hg.python.org/cpython/rev/69a2cc048c80 New changeset df2efd48227e by Antoine Pitrou in branch 'default': Issue #20423: fix documentation of io.StringIO's newline parameter http://hg.python.org/cpython/rev/df2efd48227e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 2 22:52:34 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Feb 2014 21:52:34 +0000 Subject: [docs] [issue20423] io.StringIO newline param has wrong default In-Reply-To: <1390937078.16.0.885697814935.issue20423@psf.upfronthosting.co.za> Message-ID: <1391377954.05.0.688128804104.issue20423@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The docs are now fixed, thank you! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 06:09:47 2014 From: report at bugs.python.org (Alan Isaac) Date: Mon, 03 Feb 2014 05:09:47 +0000 Subject: [docs] [issue20496] function definition tutorial encourages bad practice Message-ID: <1391404187.28.0.545168168954.issue20496@psf.upfronthosting.co.za> New submission from Alan Isaac: Section 4.6 of the tutorial introduces function definition: http://docs.python.org/3/tutorial/controlflow.html#defining-functions The first example defines a function that *prints* a Fibonacci series. A basic mistake made by students new to programming is to use a function to print values rather than to return them. In this sense, the example encourages bad practice and misses an opportunity to instruct. Since they have already met lists in Section 3, I suggest that returning a list of the values and then printing the list would enhance the tutorial. ---------- assignee: docs at python components: Documentation messages: 210077 nosy: aisaac, docs at python priority: normal severity: normal status: open title: function definition tutorial encourages bad practice type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 07:19:42 2014 From: report at bugs.python.org (INADA Naoki) Date: Mon, 03 Feb 2014 06:19:42 +0000 Subject: [docs] [issue20497] Unclear word in socket document. Message-ID: <1391408382.37.0.746852071929.issue20497@psf.upfronthosting.co.za> New submission from INADA Naoki: http://docs.python.org/3.3/library/socket.html#socket.getaddrinfo > Changed in version 3.2: parameters can now be passed as single keyword arguments. What *single* means? I can use multiple keyword arguments: In [3]: socket.getaddrinfo('www.python.org', 80, proto=socket.SOL_TCP, family=socket.AF_INET) Out[3]: [(, , 6, '', ('82.94.164.162', 80))] ---------- assignee: docs at python components: Documentation messages: 210078 nosy: docs at python, naoki priority: normal severity: normal status: open title: Unclear word in socket document. versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:19:58 2014 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 03 Feb 2014 15:19:58 +0000 Subject: [docs] [issue14911] generator.throw() documentation inaccurate In-Reply-To: <1337943736.85.0.146138312281.issue14911@psf.upfronthosting.co.za> Message-ID: <1391440798.29.0.299964102677.issue14911@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Here's one for 2.7. I'm still looking at 3. The funny thing is that the signature of generator.throw reflects 2.x conventions. I'm figuring out if it can be used with the .with_traceback() idiom ---------- keywords: +patch Added file: http://bugs.python.org/file33886/throw27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:36:52 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:36:52 +0000 Subject: [docs] [issue20266] Bring Doc/faq/windows up to date In-Reply-To: <1389758449.02.0.48240700444.issue20266@psf.upfronthosting.co.za> Message-ID: <1391441812.59.0.0908545242318.issue20266@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:37:37 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:37:37 +0000 Subject: [docs] [issue6128] Consequences of using Py_TPFLAGS_HAVE_GC are incompletely explained In-Reply-To: <1243457336.14.0.579311647458.issue6128@psf.upfronthosting.co.za> Message-ID: <1391441857.96.0.00272148081136.issue6128@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:37:55 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:37:55 +0000 Subject: [docs] [issue19548] 'codecs' module docs improvements In-Reply-To: <1384133353.82.0.173341188397.issue19548@psf.upfronthosting.co.za> Message-ID: <1391441875.86.0.690157101809.issue19548@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:39:35 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:39:35 +0000 Subject: [docs] [issue20467] Confusing wording about __init__ In-Reply-To: <1391208094.95.0.178232051767.issue20467@psf.upfronthosting.co.za> Message-ID: <1391441975.9.0.186600757656.issue20467@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:40:15 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 15:40:15 +0000 Subject: [docs] [issue19980] Improve help('non-topic') response In-Reply-To: <1386984892.27.0.919528696836.issue19980@psf.upfronthosting.co.za> Message-ID: <1391442015.19.0.626570799929.issue19980@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:48:35 2014 From: report at bugs.python.org (R. David Murray) Date: Mon, 03 Feb 2014 15:48:35 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1391442515.16.0.991243677509.issue20501@psf.upfronthosting.co.za> R. David Murray added the comment: This requires (1) a doc update to indicate the problem and (2) a way to tell fileinput to *not* use readlines to optimize by calling readlines(bufsize), since in the case of using codecs it can be a problem. Presumably buffer=None would be the logical way to spell this. I'm marking this as a doc bug, a separate issue should be opened for adding the fileinput buffer=None enhancement. (The codec module's comments indicate there's no practical way to implement sizehint.) ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, r.david.murray versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:53:07 2014 From: report at bugs.python.org (Harlquinth) Date: Mon, 03 Feb 2014 15:53:07 +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: <1391442787.18.0.729931658126.issue14512@psf.upfronthosting.co.za> Harlquinth added the comment: We're also having the same issue here as well - I will delete the shortcut as a temporary fix! Thanks, Hq. ---------- nosy: +Harlquinth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 16:57:38 2014 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 03 Feb 2014 15:57:38 +0000 Subject: [docs] [issue14911] generator.throw() documentation inaccurate In-Reply-To: <1337943736.85.0.146138312281.issue14911@psf.upfronthosting.co.za> Message-ID: <1391443057.99.0.701436631032.issue14911@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: And 3.x ---------- Added file: http://bugs.python.org/file33888/3x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:02:32 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:02:32 +0000 Subject: [docs] [issue1944] Documentation for PyUnicode_AsString (et al.) missing. In-Reply-To: <1201415203.65.0.272410099804.issue1944@psf.upfronthosting.co.za> Message-ID: <1391446952.33.0.936580754008.issue1944@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:04:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:04:27 +0000 Subject: [docs] [issue7674] select.select() corner cases: duplicate fds, out-of-range fds In-Reply-To: <1263192751.1.0.719382931138.issue7674@psf.upfronthosting.co.za> Message-ID: <1391447067.46.0.016803072681.issue7674@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:07:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:07:14 +0000 Subject: [docs] [issue1703592] have a way to ignore nonexisting locales in locale.setlocale Message-ID: <1391447234.94.0.187534501357.issue1703592@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:07:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 17:07:43 +0000 Subject: [docs] [issue1159] os.getenv() not updated after external module uses C putenv() In-Reply-To: <1189668127.19.0.0258251668017.issue1159@psf.upfronthosting.co.za> Message-ID: <1391447263.94.0.749968037456.issue1159@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From yselivanov.ml at gmail.com Mon Feb 3 17:58:46 2014 From: yselivanov.ml at gmail.com (yselivanov.ml at gmail.com) Date: Mon, 03 Feb 2014 16:58:46 -0000 Subject: [docs] generator.throw() documentation inaccurate (issue 14911) Message-ID: <20140203165846.17211.81143@psf.upfronthosting.co.za> LGTM http://bugs.python.org/review/14911/ From yselivanov.ml at gmail.com Mon Feb 3 18:30:09 2014 From: yselivanov.ml at gmail.com (yselivanov.ml at gmail.com) Date: Mon, 03 Feb 2014 17:30:09 -0000 Subject: [docs] generator.throw() documentation inaccurate (issue 14911) Message-ID: <20140203173009.16077.26049@psf.upfronthosting.co.za> I'm not sure we need an example for this. At least not in its current form. http://bugs.python.org/review/14911/diff/10905/Doc/reference/expressions.rst File Doc/reference/expressions.rst (right): http://bugs.python.org/review/14911/diff/10905/Doc/reference/expressions.rst#newcode451 Doc/reference/expressions.rst:451: generator.send(foo()) Actually, I have a question: did you mean something like: try: result = foo() except Exception as ex: generator.throw(ex.with_traceback(None)) else: generator.send(result) ? http://bugs.python.org/review/14911/ From report at bugs.python.org Mon Feb 3 18:35:14 2014 From: report at bugs.python.org (Yury Selivanov) Date: Mon, 03 Feb 2014 17:35:14 +0000 Subject: [docs] [issue14911] generator.throw() documentation inaccurate In-Reply-To: <1337943736.85.0.146138312281.issue14911@psf.upfronthosting.co.za> Message-ID: <1391448914.14.0.459106744383.issue14911@psf.upfronthosting.co.za> Yury Selivanov added the comment: I like the patches, except the example in 3x.diff. Please see the review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 18:40:21 2014 From: report at bugs.python.org (Brett Cannon) Date: Mon, 03 Feb 2014 17:40:21 +0000 Subject: [docs] [issue20488] importlib title and introduction are out of date In-Reply-To: <1391355718.64.0.231740167188.issue20488@psf.upfronthosting.co.za> Message-ID: <1391449221.84.0.271853568698.issue20488@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: docs at python -> brett.cannon _______________________________________ Python tracker _______________________________________ From yselivanov.ml at gmail.com Mon Feb 3 18:37:37 2014 From: yselivanov.ml at gmail.com (yselivanov.ml at gmail.com) Date: Mon, 03 Feb 2014 17:37:37 -0000 Subject: [docs] generator.throw() documentation inaccurate (issue 14911) Message-ID: <20140203173737.16077.5350@psf.upfronthosting.co.za> http://bugs.python.org/review/14911/diff/10905/Doc/reference/expressions.rst File Doc/reference/expressions.rst (right): http://bugs.python.org/review/14911/diff/10905/Doc/reference/expressions.rst#newcode446 Doc/reference/expressions.rst:446: If provided, the ``tb`` argument is used for the raised exception, otherwise ``traceback`` instead of ``tb``? http://bugs.python.org/review/14911/ From report at bugs.python.org Mon Feb 3 19:35:48 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:35:48 +0000 Subject: [docs] [issue10379] locale.format() input regression In-Reply-To: <1289345606.99.0.972407204822.issue10379@psf.upfronthosting.co.za> Message-ID: <1391452548.35.0.133849345345.issue10379@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 19:37:43 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 18:37:43 +0000 Subject: [docs] [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1391452663.42.0.920674813194.issue9305@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:19:42 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Feb 2014 19:19:42 +0000 Subject: [docs] [issue1159] os.getenv() not updated after external module uses C putenv() In-Reply-To: <1189668127.19.0.0258251668017.issue1159@psf.upfronthosting.co.za> Message-ID: <1391455182.22.0.904313739433.issue1159@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:41:25 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:41:25 +0000 Subject: [docs] [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1391456485.58.0.0642998725585.issue5978@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:50:27 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:50:27 +0000 Subject: [docs] [issue1643712] Emphasize buffering issues when sys.stdin is used Message-ID: <1391457027.72.0.741904977361.issue1643712@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 3 20:52:14 2014 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 03 Feb 2014 19:52:14 +0000 Subject: [docs] [issue4744] asynchat documentation needs to be more precise In-Reply-To: <1230168171.56.0.381937953807.issue4744@psf.upfronthosting.co.za> Message-ID: <1391457134.28.0.973006396848.issue4744@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 10:45:12 2014 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 04 Feb 2014 09:45:12 +0000 Subject: [docs] [issue14911] generator.throw() documentation inaccurate In-Reply-To: <1337943736.85.0.146138312281.issue14911@psf.upfronthosting.co.za> Message-ID: <1391507112.42.0.966870633001.issue14911@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Note that the docstring does not match the doc: PyDoc_STRVAR(throw_doc, "throw(typ[,val[,tb]]) -> raise exception in generator,\n\ return next yielded value or raise StopIteration."); Should I change the docstring too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:25:47 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 13:25:47 +0000 Subject: [docs] [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1391520347.3.0.173658531079.issue19362@psf.upfronthosting.co.za> Gareth Rees added the comment: Here's a revised patch using Ezio's suggestion ("Return the number of items of a sequence or container"). ---------- Added file: http://bugs.python.org/file33904/len-set.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 14:31:46 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 13:31:46 +0000 Subject: [docs] [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1391520706.85.0.774566062207.issue19362@psf.upfronthosting.co.za> Changes by Gareth Rees : ---------- title: Documentation for len() fails to mention that it works on sets -> Documentation for len() fails to mention that it works on sets versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 16:53:33 2014 From: report at bugs.python.org (Marius Gedminas) Date: Tue, 04 Feb 2014 15:53:33 +0000 Subject: [docs] [issue20509] logging.config.fileConfig() docs could link to the config file format Message-ID: <1391529213.62.0.538303765352.issue20509@psf.upfronthosting.co.za> New submission from Marius Gedminas: When one is reading the description of logging.config.fileConfig() at http://docs.python.org/3.3/library/logging.config.html#logging.config.fileConfig not immediately apparent what the "configparser-format file" should contain (i.e. the naming convention for sections, and what keys mean what.) This is all nicely described at http://docs.python.org/3.3/library/logging.config.html#configuration-file-format but personal experience shows that users like me hit Page Down a few times and give up before they reach that part (and also they do not think to read the outline in the sidebar). It would be nice if there was a direct link, like in the attached patch. ---------- assignee: docs at python components: Documentation files: improve-fileconfig-docs.patch keywords: patch messages: 210245 nosy: docs at python, mgedmin priority: normal severity: normal status: open title: logging.config.fileConfig() docs could link to the config file format type: enhancement versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file33907/improve-fileconfig-docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 17:12:03 2014 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 04 Feb 2014 16:12:03 +0000 Subject: [docs] [issue20509] logging.config.fileConfig() docs could link to the config file format In-Reply-To: <1391529213.62.0.538303765352.issue20509@psf.upfronthosting.co.za> Message-ID: <1391530323.42.0.217379034198.issue20509@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: docs at python -> vinay.sajip nosy: +vinay.sajip versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 17:42:30 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Feb 2014 16:42:30 +0000 Subject: [docs] [issue20509] logging.config.fileConfig() docs could link to the config file format In-Reply-To: <1391529213.62.0.538303765352.issue20509@psf.upfronthosting.co.za> Message-ID: <3fJWsf05jxz7Ljd@mail.python.org> Roundup Robot added the comment: New changeset 45aa817ec853 by Vinay Sajip in branch '2.7': Issue #20509: Added cross-reference in documentation. http://hg.python.org/cpython/rev/45aa817ec853 New changeset f8318b069146 by Vinay Sajip in branch '3.3': Issue #20509: Added cross-reference in documentation. http://hg.python.org/cpython/rev/f8318b069146 New changeset 7d0a4f89c6ce by Vinay Sajip in branch 'default': Closes #20509: Merged documentation update from 3.3. http://hg.python.org/cpython/rev/7d0a4f89c6ce ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 19:01:07 2014 From: report at bugs.python.org (Antony Lee) Date: Tue, 04 Feb 2014 18:01:07 +0000 Subject: [docs] [issue19573] Fix the docstring of inspect.Parameter and the implementation of _ParameterKind In-Reply-To: <1384371223.06.0.467962768293.issue19573@psf.upfronthosting.co.za> Message-ID: <1391536867.65.0.512103673141.issue19573@psf.upfronthosting.co.za> Antony Lee added the comment: Submitted new patch as suggested. ---------- Added file: http://bugs.python.org/file33913/inspect.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 19:03:36 2014 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 04 Feb 2014 18:03:36 +0000 Subject: [docs] [issue19573] Fix the docstring of inspect.Parameter and the implementation of _ParameterKind In-Reply-To: <1384371223.06.0.467962768293.issue19573@psf.upfronthosting.co.za> Message-ID: <1391537016.73.0.0687141206801.issue19573@psf.upfronthosting.co.za> Yury Selivanov added the comment: The patch looks good to me. I'll merge it in 3.5 later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 22:26:05 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 04 Feb 2014 21:26:05 +0000 Subject: [docs] [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1391549165.03.0.908869038001.issue19362@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My objection to 'container' is that it is inaccurate and leads to inaccurate mental models. A set is like a non-exclusive club or association, defined either by rule or roster, not like a box or room, which contain exclusively. I am 'in' the set Python Developers, but am not contained by it. Some decades ago I was hindered by the notion that a set is like a box (container). A web search indicates that the top hits all have variations on 'well-defined, unordered *collection* of objects, considered as an object in itself' -- wikipedia, mathisfun, wikia, brittanica, math.ku.edu. We do a disservice to call a set a container. It is true that many Python collections are implemented by containing references to objects (a roster) but ranges are not (a parameterized rule). The *collections* module is properly named. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 4 22:39:38 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 04 Feb 2014 21:39:38 +0000 Subject: [docs] [issue19362] Documentation for len() fails to mention that it works on sets In-Reply-To: <1382530928.74.0.685857253341.issue19362@psf.upfronthosting.co.za> Message-ID: <1391549978.96.0.766269136668.issue19362@psf.upfronthosting.co.za> Gareth Rees added the comment: Here's a revised patch for Terry ("Return the number of items of a sequence or collection.") ---------- Added file: http://bugs.python.org/file33916/len-set.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 12:40:18 2014 From: report at bugs.python.org (Gareth Rees) Date: Wed, 05 Feb 2014 11:40:18 +0000 Subject: [docs] [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1391600418.08.0.993101183331.issue12691@psf.upfronthosting.co.za> Changes by Gareth Rees : ---------- assignee: -> docs at python components: +Documentation, Tests nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 14:56:12 2014 From: report at bugs.python.org (Sven Berkvens-Matthijsse) Date: Wed, 05 Feb 2014 13:56:12 +0000 Subject: [docs] [issue20521] [PATCH] Cleanup for "dis" module documentation Message-ID: <1391608572.54.0.381225308012.issue20521@psf.upfronthosting.co.za> New submission from Sven Berkvens-Matthijsse: The documentation for the "dis" module has a wrong opcode name in it (POP_STACK instead of POP_TOP). Furthermore, the patch fixes inconsistent use of markers for code and opcodes. ---------- assignee: docs at python components: Documentation files: dis-doc.patch keywords: patch messages: 210314 nosy: docs at python, svenberkvens priority: normal severity: normal status: open title: [PATCH] Cleanup for "dis" module documentation type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file33929/dis-doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 15:12:48 2014 From: report at bugs.python.org (Gunnar Aastrand Grimnes) Date: Wed, 05 Feb 2014 14:12:48 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1391609568.12.0.0738509435343.issue20501@psf.upfronthosting.co.za> Gunnar Aastrand Grimnes added the comment: Agreed that a doc-fix is the first step. Shall I make another issue for the fix in fileinput? I also wonder if the comment in codecs is not too negative - it is not easy to get it 100% right, but the method just above readlines is readline, which does somehow manage to read a single line. To me it seems like it would be better to makes readlines repeatedly call readline. It would also be inefficient, but still better than reading the whole (possibly infinite) stream in ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 15:16:42 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Feb 2014 14:16:42 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1391609802.91.0.615994329476.issue20501@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, please make another issue for the enhancement request. That issue can start out agnostic as to whether it is codecs or fileinput that could use improvement, if you prefer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 19:38:02 2014 From: report at bugs.python.org (Gareth Rees) Date: Wed, 05 Feb 2014 18:38:02 +0000 Subject: [docs] [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1391625482.07.0.220305733836.issue12691@psf.upfronthosting.co.za> Changes by Gareth Rees : Removed file: http://bugs.python.org/file33919/Issue12691.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:06:26 2014 From: report at bugs.python.org (Yury Selivanov) Date: Wed, 05 Feb 2014 19:06:26 +0000 Subject: [docs] [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1391627186.05.0.236085294049.issue12691@psf.upfronthosting.co.za> Yury Selivanov added the comment: Gareth, Thanks a lot for such a comprehensive writeup and the patch. Please give me a day or two to do the review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:29:08 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 05 Feb 2014 19:29:08 +0000 Subject: [docs] [issue20521] [PATCH] Cleanup for "dis" module documentation In-Reply-To: <1391608572.54.0.381225308012.issue20521@psf.upfronthosting.co.za> Message-ID: <1391628548.84.0.978912153195.issue20521@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +ncoghlan stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:42:46 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Feb 2014 19:42:46 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1391629366.45.0.572021544885.issue20501@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As far as the issue is in the codecs module, this is 2.7 only issue, because codecs.open is used only in 2.7. And I suppose that replacing codecs.open by io.open should fix this issue. ---------- keywords: +patch nosy: +benjamin.peterson, hynek, pitrou, serhiy.storchaka, stutzbach stage: -> patch review versions: -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33934/fileinput_hook_encoded.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:56:52 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Feb 2014 19:56:52 +0000 Subject: [docs] [issue14515] tempfile.TemporaryDirectory documented as returning object but returns name In-Reply-To: <1333678068.19.0.790451967958.issue14515@psf.upfronthosting.co.za> Message-ID: <3fKD7R2Q0gz7LjW@mail.python.org> Roundup Robot added the comment: New changeset b5fe07d39e16 by R David Murray in branch '3.3': #14515: clarify that TemporaryDirectory's __enter__ returns the name. http://hg.python.org/cpython/rev/b5fe07d39e16 New changeset 7b7e17723787 by R David Murray in branch 'default': #14515: clarify that TemporaryDirectory's __enter__ returns the name. http://hg.python.org/cpython/rev/7b7e17723787 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 5 20:58:09 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Feb 2014 19:58:09 +0000 Subject: [docs] [issue14515] tempfile.TemporaryDirectory documented as returning object but returns name In-Reply-To: <1333678068.19.0.790451967958.issue14515@psf.upfronthosting.co.za> Message-ID: <1391630289.14.0.262441610309.issue14515@psf.upfronthosting.co.za> R. David Murray added the comment: Just ran into this again :). Committed a patch with wording clarified based on Serhiy's feedback (I say 'target of the as clause of the with statement'.) ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 02:26:53 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Feb 2014 01:26:53 +0000 Subject: [docs] [issue20521] [PATCH] Cleanup for "dis" module documentation In-Reply-To: <1391608572.54.0.381225308012.issue20521@psf.upfronthosting.co.za> Message-ID: <1391650013.6.0.620741313257.issue20521@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:50:06 2014 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Feb 2014 14:50:06 +0000 Subject: [docs] [issue20488] importlib title and introduction are out of date In-Reply-To: <1391355718.64.0.231740167188.issue20488@psf.upfronthosting.co.za> Message-ID: <3fKjH14qFQz7Lkf@mail.python.org> Roundup Robot added the comment: New changeset cc08bf665dea by Brett Cannon in branch '3.3': Issue #20488: Update docs to say importlib is *the* implementaiton of http://hg.python.org/cpython/rev/cc08bf665dea New changeset 5641c0b50072 by Brett Cannon in branch 'default': Merge for issue #20488 http://hg.python.org/cpython/rev/5641c0b50072 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 15:50:50 2014 From: report at bugs.python.org (Brett Cannon) Date: Thu, 06 Feb 2014 14:50:50 +0000 Subject: [docs] [issue20488] importlib title and introduction are out of date In-Reply-To: <1391355718.64.0.231740167188.issue20488@psf.upfronthosting.co.za> Message-ID: <1391698250.26.0.775445542785.issue20488@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 16:50:03 2014 From: report at bugs.python.org (Gareth Rees) Date: Thu, 06 Feb 2014 15:50:03 +0000 Subject: [docs] [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1391701803.43.0.924025145822.issue12691@psf.upfronthosting.co.za> Gareth Rees added the comment: I did some research on the cause of this issue. The assertion was added in this change by Jeremy Hylton in August 2006: (The corresponding Mercurial commit is here: ). At that point I believe the assertion was reasonable. I think it would have been triggered by backslash-continued lines, but otherwise it worked. But in this change in March 2008 Trent Nelson applied this patch by Michael Foord to implement PEP 263 and fix issue719888. The patch added ENCODING tokens to the output of tokenize.tokenize(). The ENCODING token is always generated with row number 0, while the first actual token is generated with row number 1. So now every token stream from tokenize.tokenize() sets off the assertion. The lack of a test case for tokenize.untokenize() in "full" mode meant that it was (and is) all too easy for someone to accidentally break it like this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 6 17:25:42 2014 From: report at bugs.python.org (Ethan Furman) Date: Thu, 06 Feb 2014 16:25:42 +0000 Subject: [docs] [issue20386] socket.SocketType enum overwrites import of _socket.SocketType In-Reply-To: <1390603701.84.0.039670998795.issue20386@psf.upfronthosting.co.za> Message-ID: <1391703941.24.0.798604609962.issue20386@psf.upfronthosting.co.za> Ethan Furman added the comment: Thanks for the hints, Georg! ---------- Added file: http://bugs.python.org/file33945/issue20386.stoneleaf.04.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 16:55:33 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Feb 2014 15:55:33 +0000 Subject: [docs] [issue20477] Add examples of using the new contentmanager api to the email docs In-Reply-To: <1391294758.28.0.146811184979.issue20477@psf.upfronthosting.co.za> Message-ID: <3fLLh40Zpfz7LjN@mail.python.org> Roundup Robot added the comment: New changeset a9d7d53d5fbd by R David Murray in branch 'default': #20477: add examples of using the new contentmanager API. http://hg.python.org/cpython/rev/a9d7d53d5fbd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 7 16:56:56 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Feb 2014 15:56:56 +0000 Subject: [docs] [issue20477] Add examples of using the new contentmanager api to the email docs In-Reply-To: <1391294758.28.0.146811184979.issue20477@psf.upfronthosting.co.za> Message-ID: <1391788616.7.0.357739987974.issue20477@psf.upfronthosting.co.za> R. David Murray added the comment: There being no objections, I have committed these. Now we'll see if Antoine or someone corrects my google-translated French in post review... ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 14:43:16 2014 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Feb 2014 13:43:16 +0000 Subject: [docs] [issue19363] Python 2.7's future_builtins.map is not compatible with Python 3's map In-Reply-To: <1382534189.14.0.63787411181.issue19363@psf.upfronthosting.co.za> Message-ID: <1391866996.08.0.279731111927.issue19363@psf.upfronthosting.co.za> Nick Coghlan added the comment: Switched to be a docs-only bug as Gareth suggested. ---------- assignee: rhettinger -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, ncoghlan resolution: wont fix -> stage: committed/rejected -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 16:00:17 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 15:00:17 +0000 Subject: [docs] [issue20496] function definition tutorial encourages bad practice In-Reply-To: <1391404187.28.0.545168168954.issue20496@psf.upfronthosting.co.za> Message-ID: <1391871617.81.0.294367436212.issue20496@psf.upfronthosting.co.za> Terry J. Reedy added the comment: There is a later example introduced by "It is simple to write a function that returns a list of the numbers of the Fibonacci series, instead of printing it:" that does exactly what you suggest. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 8 16:04:15 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Feb 2014 15:04:15 +0000 Subject: [docs] [issue20497] Unclear word in socket document. In-Reply-To: <1391408382.37.0.746852071929.issue20497@psf.upfronthosting.co.za> Message-ID: <1391871854.91.0.971521006747.issue20497@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'Single' that argument passing has changed, but I would have to know what it was previously (3.1) to know what the change is. Perhaps you can review the 3.1 signature and suggest a better wording for the change note. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 9 12:38:37 2014 From: report at bugs.python.org (Ned Deily) Date: Sun, 09 Feb 2014 11:38:37 +0000 Subject: [docs] [issue20573] "built-in repr()" function link on the repr module documentation is incorrect In-Reply-To: <1391943562.07.0.0261710580563.issue20573@psf.upfronthosting.co.za> Message-ID: <1391945917.26.0.871520710146.issue20573@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 08:59:17 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Feb 2014 07:59:17 +0000 Subject: [docs] [issue19906] Typo in urllib documentation In-Reply-To: <1386326764.33.0.520291465102.issue19906@psf.upfronthosting.co.za> Message-ID: <3fMzz90SMCz7LkP@mail.python.org> Roundup Robot added the comment: New changeset 2ac7551986ba by Ezio Melotti in branch '2.7': #19906: clarify note in urllib docs. http://hg.python.org/cpython/rev/2ac7551986ba ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:00:06 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 10 Feb 2014 08:00:06 +0000 Subject: [docs] [issue19906] Typo in urllib documentation In-Reply-To: <1386326764.33.0.520291465102.issue19906@psf.upfronthosting.co.za> Message-ID: <1392019205.96.0.9232116848.issue19906@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the initial patch! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:10:04 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 10 Feb 2014 08:10:04 +0000 Subject: [docs] [issue19871] json module won't parse a float that starts with a decimal point In-Reply-To: <1386058873.01.0.290791588539.issue19871@psf.upfronthosting.co.za> Message-ID: <1392019804.49.0.332708751899.issue19871@psf.upfronthosting.co.za> Ezio Melotti added the comment: I missed this comment from Serhiy: > There are too many cases where json and Python syntax differ. How many differences there are between the two? I think we might add notes to the table at http://docs.python.org/3/library/json.html#encoders-and-decoders (either something similar to the notes in the table at http://docs.python.org/3/library/stdtypes.html#mutable-sequence-types, or just a couple of lines in a third column). If there are too many differences and we follow the specs we can just add a note saying that the decoding is done according to the specs, add a link to them, and mention a few examples that are valid in Python but not in JSON (like Serhiy did in his message). ---------- keywords: +easy nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:21:29 2014 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Feb 2014 08:21:29 +0000 Subject: [docs] [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1392020489.38.0.72999803295.issue9694@psf.upfronthosting.co.za> Martin Panter added the comment: A new ?required arguments? section seems too arbitrary to me. It would clash with the ?positional arguments? heading, since those are also required by default. I would go with the heading ?options?, as a noun. That term seems to be well used, at least on Linux and Wikipedia (see https://en.wikipedia.org/wiki/Command-line_option). Other terms are ?flag? and ?switch?. In this thread I see two arguments against this: 1. Eric Smith prefers to retain the noun ?arguments?. How about something like ?non-positional arguments? then? 2. Steven Bethard is worried about backwards compatibility. I thought the Python people were happy to make these sort of changes each minor release (e.g. 3.4 to 3.5). The module?s source code uses the term ?optionals? a lot more than this one heading. It would be clearer if this term were dropped, or only used for things that are truly optional. So even if you can?t fix the help output until Python 4, please fix the documentation and the rest of the source code :) ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 09:43:07 2014 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Feb 2014 08:43:07 +0000 Subject: [docs] [issue20351] Add doc examples for DictReader and DictWriter In-Reply-To: <1390414077.91.0.281809568509.issue20351@psf.upfronthosting.co.za> Message-ID: <1392021787.14.0.0298161188236.issue20351@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 10:05:41 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Feb 2014 09:05:41 +0000 Subject: [docs] [issue19871] json module won't parse a float that starts with a decimal point In-Reply-To: <1386058873.01.0.290791588539.issue19871@psf.upfronthosting.co.za> Message-ID: <1392023141.88.0.0869079818513.issue19871@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: My point is that Python and JSON are two different languages which have different syntaxes. JSON is not Python and Python is not JSON. We can't enumerate all differences unless to cite Python [1] and JSON [2] specifications. For differences from JSON specifications see [3]. [1] http://docs.python.org/3/reference/index.html [2] http://tools.ietf.org/html/rfc4627.html [3] http://docs.python.org/3/library/json.html#standard-compliance ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 11:20:13 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Feb 2014 10:20:13 +0000 Subject: [docs] [issue19871] json module won't parse a float that starts with a decimal point In-Reply-To: <1386058873.01.0.290791588539.issue19871@psf.upfronthosting.co.za> Message-ID: <1392027613.82.0.668330214697.issue19871@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To me, the JSONDecoder doc at the top of this section http://docs.python.org/3/library/json.html#encoders-and-decoders is unclear about decoding process and timing of application and the signature of all 5 hook functions. The timing and signature issues are related. My questions and suggestions: - 'Simple JSON decoder.' + 'A simple JSON decoder that splits JSON strings into JSON substrings that represent programming objects and then converts the substrings into Python objects.' I took the above from Mark's description, using 'substring' instead of 'token'. - '\nPerforms the following translations in decoding by default:' + 'The default translations from JSON object strings to Python objects are as follows:' Should the table have multiple notes? The intended use case for JSON is program to program communication, where both programs 'understand' the legal JSON syntax. Is handcrafting JSON strings, without knowing the syntax, also an intended usecase? I think not. Teaching the syntax is out of scope for the docs. However, the table could be followed by a generic note that JSON syntax and Python syntax for objects are different. + "The legal JSON syntax for various classes is different from Python syntax for the same classes. The tranformations above are only applied to legal JSON strings. For instance, both float('.5') and float(0.5) are legal Python code, but a JSON encoder will only produce '0.5', so a JSON decoder will reject '.5' as an error and not pass it on to float() or its parse_float substitute." This suggestion is intended to replace class by class notes or the proposed addition to the parse_float entry. I think the description of the parse hooks would be clearer if the input signature were given immediately with the name. object_hook: I do not understand enough to suggest anything. Is the input a json string representing an object or a Python dict? object_pairs_hook: Ditto. What is its input? parse_int: This should come before parse_float, to match the table. - '*parse_int*, if specified ...' + '*parse_int*(*num_str*), if specified ...' 'num_str' as the parameter name is used in the ... part. parse_float(num_str): ditto parse_constant(const_str): I do not understand "This can be used to raise an exception if invalid JSON numbers are encountered." >>> def f(s): raise ValueError('custom') ... >>> json.loads('.5', parse_constant=f) gives same error as as without parse_constant. The sentence should be rewritten or removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 11:22:32 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Feb 2014 10:22:32 +0000 Subject: [docs] [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1392027752.57.0.935889327798.issue9694@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 11:27:39 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Feb 2014 10:27:39 +0000 Subject: [docs] [issue19871] json module won't parse a float that starts with a decimal point In-Reply-To: <1386058873.01.0.290791588539.issue19871@psf.upfronthosting.co.za> Message-ID: <1392028059.27.0.195834229843.issue19871@psf.upfronthosting.co.za> Terry J. Reedy added the comment: > My point is that Python and JSON are two different languages which have different syntaxes. That is also the point of the generic note I suggested, which explains the consequence of the difference (rejection by JSON parser before calling Python constructor), with just one example given. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 12:21:52 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Feb 2014 11:21:52 +0000 Subject: [docs] [issue19871] json module won't parse a float that starts with a decimal point In-Reply-To: <1392027613.82.0.668330214697.issue19871@psf.upfronthosting.co.za> Message-ID: <1392031310.2284.2.camel@fsol> Antoine Pitrou added the comment: > - 'Simple JSON decoder.' > + 'A simple JSON decoder that splits JSON strings into JSON substrings > that represent programming objects and then converts the substrings > into Python objects.' Please let's keep the description simple. Everyone is able to understand what a JSON decoder is, and your suggested change is strangely confusing ("programming objects"?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 15:24:25 2014 From: report at bugs.python.org (Roy Smith) Date: Mon, 10 Feb 2014 14:24:25 +0000 Subject: [docs] [issue20582] socket.getnameinfo() does not document flags Message-ID: <1392042265.22.0.885252016144.issue20582@psf.upfronthosting.co.za> New submission from Roy Smith: http://docs.python.org/2/library/socket.html The description for getnameinfo() says, "... Depending on the settings of flags, the result can contain a fully-qualified domain name or numeric address representation in host.", but does not say what to pass for flags to get those behaviors. ---------- assignee: docs at python components: Documentation messages: 210838 nosy: docs at python, roysmith priority: normal severity: normal status: open title: socket.getnameinfo() does not document flags versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From vadmium+py at gmail.com Mon Feb 10 09:41:59 2014 From: vadmium+py at gmail.com (vadmium+py at gmail.com) Date: Mon, 10 Feb 2014 08:41:59 -0000 Subject: [docs] Add doc examples for DictReader and DictWriter (issue 20351) Message-ID: <20140210084159.22743.92313@psf.upfronthosting.co.za> http://bugs.python.org/review/20351/diff/10699/Doc/library/csv.rst File Doc/library/csv.rst (right): http://bugs.python.org/review/20351/diff/10699/Doc/library/csv.rst#newcode166 Doc/library/csv.rst:166: Wonderful SPAM I think the space argument to print() shouldn?t be there; print() should already be adding the single space separator on its own. Also, making the capitalisation agree with the DictWriter example below would be nice. http://bugs.python.org/review/20351/ From report at bugs.python.org Mon Feb 10 15:32:31 2014 From: report at bugs.python.org (R. David Murray) Date: Mon, 10 Feb 2014 14:32:31 +0000 Subject: [docs] [issue20582] socket.getnameinfo() does not document flags In-Reply-To: <1392042265.22.0.885252016144.issue20582@psf.upfronthosting.co.za> Message-ID: <1392042751.83.0.855890070261.issue20582@psf.upfronthosting.co.za> R. David Murray added the comment: Like the other socket functions, you have to look it up in the man page. A number of the other functions that take a flag argument mention this in their description, so a similar mention should be added to the getnameinfo entry. ---------- nosy: +r.david.murray versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 15:38:48 2014 From: report at bugs.python.org (Roy Smith) Date: Mon, 10 Feb 2014 14:38:48 +0000 Subject: [docs] [issue20582] socket.getnameinfo() does not document flags In-Reply-To: <1392042265.22.0.885252016144.issue20582@psf.upfronthosting.co.za> Message-ID: <1392043128.33.0.537518626067.issue20582@psf.upfronthosting.co.za> Roy Smith added the comment: What might make sense is for all of those, document the function call as taking "native_flags" (or something like that), with a single note at the top of the page saying, "native_flags means look up the specific values in the man page" and link to that note each time it's used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 10 16:32:35 2014 From: report at bugs.python.org (R. David Murray) Date: Mon, 10 Feb 2014 15:32:35 +0000 Subject: [docs] [issue20582] socket.getnameinfo() does not document flags In-Reply-To: <1392042265.22.0.885252016144.issue20582@psf.upfronthosting.co.za> Message-ID: <1392046355.65.0.306721803629.issue20582@psf.upfronthosting.co.za> R. David Murray added the comment: I thought about that, but different functions refer to different man pages, and it isn't always obvious from the function name which one. ---------- _______________________________________ Python tracker _______________________________________ From andrew.gorcester at gmail.com Mon Feb 10 21:00:08 2014 From: andrew.gorcester at gmail.com (Andrew Gorcester) Date: Mon, 10 Feb 2014 12:00:08 -0800 Subject: [docs] Google search results for Python docs have misleading titles Message-ID: Hello, Sorry for filing this bug by email, but I think it is an issue with the Python documentation production webserver configuration and not anything in the repo. I may be wrong, but hopefully someone on this list can help me sort it out. For the last several months, at least, there has been a problem where using Google to search for Python documentation, for instance "python unittest", brings up a result that shows e.g. "Unittest - Python 3.3.3 documentation" as the title of the page. However, clicking through brings the user to the Python 2.7.x documentation. Users unfamiliar with the different layouts of the two documentation versions may not realize that this has happened and be mislead to thinking they are actually on the 3.3 documentation page. https://www.google.com/search?q=python+unittest This applies to other modules and even applies if the user searches for e.g. "python 2.7 unittest". A search query for "python 3.3 unittest" works as expected. Strangely, this does not affect Duck Duck Go or Bing, both of which correctly identify the page as Python 2.7 documentation. I was unable to determine why this has happened via my cursory inspection of the generated source for the documentation page, so I'm afraid I don't have any more specific information. Thank you, Andrew Gorcester -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Mon Feb 10 23:53:32 2014 From: report at bugs.python.org (Martin Panter) Date: Mon, 10 Feb 2014 22:53:32 +0000 Subject: [docs] =?utf-8?q?=5Bissue18956=5D_Document_useful_functions_in_?= =?utf-8?b?4oCYcHlkb2PigJkgbW9kdWxl?= In-Reply-To: <1378532336.08.0.216765249116.issue18956@psf.upfronthosting.co.za> Message-ID: <1392072812.91.0.230507680984.issue18956@psf.upfronthosting.co.za> Changes by Martin Panter : ---------- nosy: +vadmium _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 11 16:28:25 2014 From: report at bugs.python.org (Thomas Guettler) Date: Tue, 11 Feb 2014 15:28:25 +0000 Subject: [docs] [issue20598] argparse docs: '7'.split() is confusing magic Message-ID: <1392132505.16.0.864715722344.issue20598@psf.upfronthosting.co.za> New submission from Thomas Guettler: I think the docs of argparse still contain confusing magic: parser.parse_args('7'.split()) You know what it does and I know it. But a lot of people new to Python, don't understand what this should be. Please use: parser.parse_args(['7']) Close this ticket, if you don't care for people new to Python. ---------- assignee: docs at python components: Documentation messages: 210950 nosy: docs at python, guettli priority: normal severity: normal status: open title: argparse docs: '7'.split() is confusing magic versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 11 16:35:36 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Feb 2014 15:35:36 +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: <1392132936.78.0.248656068289.issue20598@psf.upfronthosting.co.za> STINNER Victor added the comment: I agree that '7'.split() looks strange, an explicit list would be more obvious and simpler: ['7']. 'X --foo Y'.split() can be replaced with ['X', '--foo', 'Y']. argparse examples: http://docs.python.org/dev/library/argparse.html#type ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 11 16:36:34 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Feb 2014 15:36:34 +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: <1392132994.64.0.600304454803.issue20598@psf.upfronthosting.co.za> STINNER Victor added the comment: @Thomas Guettler: Would you be interested to propose a patch on the source of the documentation directly? You can find the file here: http://hg.python.org/cpython/file/default/Doc/library/argparse.rst ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 11 16:37:08 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 11 Feb 2014 15:37:08 +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: <1392133028.46.0.862221225724.issue20598@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I agree that does look weird. However, it's nicely consistent with the the normal case which has multiple arguments like "-foo 3 -l".split(). I think this is an excellent thing for newcomers to try out with the interactive shell. :) ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 11 16:38:25 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 11 Feb 2014 15:38:25 +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: <1392133105.07.0.292204004814.issue20598@psf.upfronthosting.co.za> Benjamin Peterson added the comment: IMO, keeping the string intact is slightly better because it's easier to read than a commandline with a bunch of quotes and commas in the middle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 11 17:22:16 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Feb 2014 16:22:16 +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: <1392135736.65.0.447603741811.issue20598@psf.upfronthosting.co.za> STINNER Victor added the comment: > IMO, keeping the string intact is slightly better because it's easier to read than a commandline with a bunch of quotes and commas in the middle. Many other argparse examples which use list literals. I don't see quotes in >>7<< string :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 11 18:53:34 2014 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Feb 2014 17:53:34 +0000 Subject: [docs] [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383258981.48.0.274242938687.issue19465@psf.upfronthosting.co.za> Message-ID: <1392141214.95.0.475101634294.issue19465@psf.upfronthosting.co.za> STINNER Victor added the comment: It looks you rejected my idea, so I'm in favor of just closing the issue. Do you agree? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 11 19:36:59 2014 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Feb 2014 18:36:59 +0000 Subject: [docs] [issue19465] selectors: provide a helper to choose a selector using constraints In-Reply-To: <1383258981.48.0.274242938687.issue19465@psf.upfronthosting.co.za> Message-ID: <1392143819.44.0.0197384119534.issue19465@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 12 11:40:34 2014 From: report at bugs.python.org (silentbat) Date: Wed, 12 Feb 2014 10:40:34 +0000 Subject: [docs] [issue20606] Operator Documentation Example doesn't work Message-ID: <1392201634.78.0.0474474805722.issue20606@psf.upfronthosting.co.za> New submission from silentbat: In the Docs for Python3.3 http://docs.python.org/3.3/library/operator.html#operator.__setitem__ the following example doesn't work. ---------- assignee: docs at python components: Documentation messages: 211079 nosy: docs at python, silent.bat priority: normal severity: normal status: open title: Operator Documentation Example doesn't work type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 12 13:38:32 2014 From: report at bugs.python.org (Gareth Rees) Date: Wed, 12 Feb 2014 12:38:32 +0000 Subject: [docs] [issue20606] Operator Documentation Example doesn't work In-Reply-To: <1392201634.78.0.0474474805722.issue20606@psf.upfronthosting.co.za> Message-ID: <1392208712.4.0.373903895258.issue20606@psf.upfronthosting.co.za> Gareth Rees added the comment: The failing example is: d = {} keys = range(256) vals = map(chr, keys) map(operator.setitem, [d]*len(keys), keys, vals) which works in Python 2 where map returns a list, but not in Python 3 where map returns an iterator. Doc/library/operator.rst follows the example with this note: .. XXX: find a better, readable, example Additional problems with the example: 1. It's poorly motivated because a dictionary comprehension would be simpler and shorter: d = {i: chr(i) for i in range(256)} 2. It's also unclear why you'd need this dictionary when you could just call the function chr (but I suppose some interface might require a dictionary rather than a function). 3. To force the map to be evaluated, you need to write list(map(...)) which allocates an unnecessary list object and then throws it away. To avoid the unnecessary allocation you could use the "consume" recipe from the itertools documentation and write collections.deque(map(...), maxlen=0) but this is surely too obscure to use as an example. I had a look through the Python sources, and made an Ohloh Code search for "operator.setitem" and I didn't find any good examples of its use, so I think the best thing to do is just to delete the example. ---------- nosy: +Gareth.Rees _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 12 13:41:29 2014 From: report at bugs.python.org (Gareth Rees) Date: Wed, 12 Feb 2014 12:41:29 +0000 Subject: [docs] [issue20606] Operator Documentation Example doesn't work In-Reply-To: <1392201634.78.0.0474474805722.issue20606@psf.upfronthosting.co.za> Message-ID: <1392208889.14.0.0766287203272.issue20606@psf.upfronthosting.co.za> Changes by Gareth Rees : ---------- keywords: +patch Added file: http://bugs.python.org/file34059/operator.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 12 15:55:47 2014 From: report at bugs.python.org (Daniel Ellis) Date: Wed, 12 Feb 2014 14:55:47 +0000 Subject: [docs] [issue20610] Documentation with two slashes in URL links to v2.6.5c2 Message-ID: <1392216947.66.0.816905762086.issue20610@psf.upfronthosting.co.za> New submission from Daniel Ellis: I was searching for the documentation for itertools via Google and was sent here: http://www.python.org/doc//current/library/itertools.html After glancing at the upper-left hand corner, I wondered why Google was sending people to the 2.6 documentation, and a release candidate at that. After checking out the URL, it became obvious that there's an issue somewhere in the Python docs that is causing this. Quite a bizarre and obscure bug, but probably should be fixed since a major search engine is passing front-page search traffic there. ---------- assignee: docs at python components: Documentation messages: 211094 nosy: Daniel.Ellis, docs at python priority: normal severity: normal status: open title: Documentation with two slashes in URL links to v2.6.5c2 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 12 20:38:17 2014 From: report at bugs.python.org (Berker Peksag) Date: Wed, 12 Feb 2014 19:38:17 +0000 Subject: [docs] [issue20610] Documentation with two slashes in URL links to v2.6.5c2 In-Reply-To: <1392216947.66.0.816905762086.issue20610@psf.upfronthosting.co.za> Message-ID: <1392233897.52.0.912422232949.issue20610@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 13 02:32:08 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 13 Feb 2014 01:32:08 +0000 Subject: [docs] [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1392255127.71.0.412477423218.issue9694@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > How about calling required arguments "required arguments"? > ... > Clear and unambiguous. With this approach the user does > not have to bloat the help to state "This is required". +1 This is straight-forward, logical, and easy-to-read. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 13 04:22:54 2014 From: report at bugs.python.org (paul j3) Date: Thu, 13 Feb 2014 03:22:54 +0000 Subject: [docs] [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1392261774.4.0.0112486935545.issue9694@psf.upfronthosting.co.za> paul j3 added the comment: As Steven pointed out, the existing `add_argument_group` mechanism can be used to group required arguments. For example ------------------------- temp.py -------------------------- parser = argparse.ArgumentParser(description = 'Do something') group1 = parser.add_argument_group('required arguments') group1.add_argument('--reqarg', '-r', required=True) parser.add_argument('--optarg','-o') parser.add_argument('foo') parser.print_help() ------------------------------------------------------------ usage: ipython [-h] --reqarg REQARG [--optarg OPTARG] foo Do something positional arguments: foo optional arguments: -h, --help show this help message and exit --optarg OPTARG, -o OPTARG required arguments: --reqarg REQARG, -r REQARG Positional 'foo' can also be put in the 'required' group: group1.add_argument('foo') required arguments: --reqarg REQARG, -r REQARG foo The distinction between 'positionals' and 'optionals' (or flagged) is essential to the parsing, but it is not necessary for Help Formatting. I can imagine grouping arguments by 'required/not-required' properties. It might be worth constructing an alternative HelpFormatter class that regroups the arguments in this way. Subclassing the HelpFormatter is the established way of adding features to the help display. The existing HelpFormatter flags 'required' arguments in the usage line with '[]'. There it is has the added task of flagging Mutually Exclusive Groups in the same way. It's worth keeping in mind that whether an argument is 'required' or not is determined in 2 different ways. There is an optional 'required' flag (default False). But this flag is not allowed for 'positionals'. Instead with those 'argparse' looks at 'nargs' ('?*' are not required). The 'required' attribute of an argument (Action) is ignored during 'parse_args' until the end. At that time it makes an inventory of 'required' arguments that have not been seen, and potentially raises an error. That testing was changed in a relatively recent patch, and produced an unintended change in whether 'subparsers' were required or not. (I could look up those issues in needed). I'll think about creating the alternative HelpFormatter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 13 04:44:30 2014 From: report at bugs.python.org (Cimarron Mittelsteadt) Date: Thu, 13 Feb 2014 03:44:30 +0000 Subject: [docs] [issue15657] Error in Python 3 docs for PyMethodDef In-Reply-To: <1344970966.7.0.115664419243.issue15657@psf.upfronthosting.co.za> Message-ID: <1392263070.31.0.65343748633.issue15657@psf.upfronthosting.co.za> Cimarron Mittelsteadt added the comment: Appears to be a duplicate of issue 11587 but better explanation here ---------- nosy: +cimarron _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 13 05:14:45 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Feb 2014 04:14:45 +0000 Subject: [docs] [issue20199] status of module_for_loader and utils._module_to_load In-Reply-To: <1389233222.57.0.373422642128.issue20199@psf.upfronthosting.co.za> Message-ID: <1392264885.86.0.0343351293238.issue20199@psf.upfronthosting.co.za> R. David Murray added the comment: Here is another one: There's a news entry for the introduction of importlib.abc.Loader.init_module_attrs, but no news entry for its removal (but it is gone). There is still a whatsnew entry that mentions it. IMO there should be a NEWS entry that mentions the removal, since there is one that mentions the add. Similarly for module_to_load. Based on the deprecation warning in the module_for_loader code, I'm changing the whatsnew entry for its deprecation to the same text (that the import system handles it automatically) and referencing the pep 451 entry. I get the impression from that entry that there are quite a few more importlib methods and functions that need to be listed there as deprecated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 13 09:34:38 2014 From: report at bugs.python.org (paul j3) Date: Thu, 13 Feb 2014 08:34:38 +0000 Subject: [docs] [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1392280478.24.0.220493298591.issue9694@psf.upfronthosting.co.za> paul j3 added the comment: The attached file shows how the default argument groups could be redefined, using 'required' as the criteria. I've implemented it as a method that is added to a subclass of ArgumentParser. This method is invoked after arguments are defined, prior to generating the help. The help looks something like this: usage: alt_grouping.py [-h] [-f FOO] -g GOO pos [baz] required: pos required positional -g GOO, --goo GOO required optional optional: -h, --help show this help message and exit -f FOO, --foo FOO optional baz optional positional I was thinking of implementing this as a formatter subclass, but given the way the help is assembled, invoking this method from the parser is simpler. ---------- Added file: http://bugs.python.org/file34065/alt_grouping.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 13 16:41:32 2014 From: report at bugs.python.org (Brett Cannon) Date: Thu, 13 Feb 2014 15:41:32 +0000 Subject: [docs] [issue20199] status of module_for_loader and utils._module_to_load In-Reply-To: <1389233222.57.0.373422642128.issue20199@psf.upfronthosting.co.za> Message-ID: <1392306092.31.0.682266992651.issue20199@psf.upfronthosting.co.za> Brett Cannon added the comment: set_loader and set_package are also deprecated (docs are accurate for that: http://docs.python.org/3.4/library/importlib.html#module-importlib.util . Everything else that is deprecated are methods are were deprecated in Python 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 13 16:42:17 2014 From: report at bugs.python.org (Brett Cannon) Date: Thu, 13 Feb 2014 15:42:17 +0000 Subject: [docs] [issue20199] status of module_for_loader and utils._module_to_load In-Reply-To: <1389233222.57.0.373422642128.issue20199@psf.upfronthosting.co.za> Message-ID: <1392306137.32.0.533281770442.issue20199@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +larry priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From cocoatomo77 at gmail.com Thu Feb 13 16:49:02 2014 From: cocoatomo77 at gmail.com (tomo cocoa) Date: Fri, 14 Feb 2014 00:49:02 +0900 Subject: [docs] a documentation bug report Message-ID: Hello, I'm a Japanese Pythonista and a translator of Python documents. I found a miscellaneous doc bug. The explanation for PyErr_SyntaxLocation (http://docs.python.org/3/c-api/exceptions.html#PyErr_SyntaxLocation) has a reference for 'PyErr_SyntaxLocationEx', but it is misspelled as 'PyErr_SyntaxLocationExc'. Regards, cocoatomo -- class Cocoatomo: name = 'cocoatomo' email_address = 'cocoatomo77 at gmail.com' twitter_id = '@cocoatomo' -------------- next part -------------- An HTML attachment was scrubbed... URL: From cocoatomo77 at gmail.com Thu Feb 13 19:03:47 2014 From: cocoatomo77 at gmail.com (tomo cocoa) Date: Fri, 14 Feb 2014 03:03:47 +0900 Subject: [docs] a parameter name suggestion Message-ID: Hello, I'm a Japanese translator for Python documents. http://docs.python.org/3.3/c-api/exceptions.html#PyException_SetCause In the documentation about PyException_SetCause, its second argument is named 'ctx', while this argument represent a 'cause'. It should be named 'cause' to avoid confusion. Regards, cocoatomo -- class Cocoatomo: name = 'cocoatomo' email_address = 'cocoatomo77 at gmail.com' twitter_id = '@cocoatomo' -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Thu Feb 13 21:08:49 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 13 Feb 2014 20:08:49 +0000 Subject: [docs] [issue20620] Update the min()/max() docs for the new default argument Message-ID: <1392322129.66.0.847659571757.issue20620@psf.upfronthosting.co.za> New submission from Raymond Hettinger: There is a new "default" argument for min() and max(): >>> min([], default=10) 10 The new argument is not currently shown by help(): >>> help(min) Help on built-in function min in module builtins: min(...) min(iterable[, key=func]) -> value min(a, b, c, ...[, key=func]) -> value With a single iterable argument, return its smallest item. With two or more arguments, return the smallest argument. ---------- assignee: docs at python components: Documentation messages: 211168 nosy: docs at python, rhettinger priority: normal severity: normal status: open title: Update the min()/max() docs for the new default argument versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 02:53:30 2014 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 14 Feb 2014 01:53:30 +0000 Subject: [docs] [issue20620] Update the min()/max() docs for the new default argument In-Reply-To: <1392322129.66.0.847659571757.issue20620@psf.upfronthosting.co.za> Message-ID: <1392342810.23.0.812519829995.issue20620@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 05:57:39 2014 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Feb 2014 04:57:39 +0000 Subject: [docs] [issue19627] python open built-in function - "updating" is not defined In-Reply-To: <1384627981.21.0.789966534785.issue19627@psf.upfronthosting.co.za> Message-ID: <1392353859.74.0.847392811654.issue19627@psf.upfronthosting.co.za> Ezio Melotti added the comment: This seems to be in 3.3 already, so only 2.7 is left. ---------- keywords: +easy stage: -> needs patch versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 06:04:33 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Feb 2014 05:04:33 +0000 Subject: [docs] [issue19680] Help missing for exec and print In-Reply-To: <1385036985.98.0.128644104733.issue19680@psf.upfronthosting.co.za> Message-ID: <3fQMvh49PQz7Lkk@mail.python.org> Roundup Robot added the comment: New changeset cc62d856fc5f by Ezio Melotti in branch '2.7': #19680: add back documentation for print and exec in the interactive help. http://hg.python.org/cpython/rev/cc62d856fc5f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 06:05:02 2014 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Feb 2014 05:05:02 +0000 Subject: [docs] [issue19680] Help missing for exec and print In-Reply-To: <1385036985.98.0.128644104733.issue19680@psf.upfronthosting.co.za> Message-ID: <1392354302.49.0.241570610594.issue19680@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 08:32:12 2014 From: report at bugs.python.org (paul j3) Date: Fri, 14 Feb 2014 07:32:12 +0000 Subject: [docs] [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1392363132.73.0.554537935133.issue9694@psf.upfronthosting.co.za> paul j3 added the comment: Here's another possible solution: add a `help_groups` parameter to ArgumentParser. It is a list of base argument group names. `parser.add_argument(...)' places the action in one of those groups. This is a generalization of the current code which creates two groups titled 'positional arguments' and 'optional arguments', and assigns actions based on 'optional strings' (e.g. '-f','--foo'). 'help_groups' could have 1, 2, or 3 items. 1 - just one argument group 2 - the current postional/optional split, but with user chosen names 3 - a 'positional', 'required', and 'optional' split. A 4 way split that distinguishes splits positionals between those that allow 0 values and 1 or more, is possible, but probably not that useful. The changes are in the ArgumentParser.__init__ and _add_action methods. 'subparsers' do not inherit this parameter. I have not explored how it plays out with 'parents'. 'test_argparse.py' runs fine. ---------- keywords: +patch Added file: http://bugs.python.org/file34073/helpgroups.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 08:33:36 2014 From: report at bugs.python.org (paul j3) Date: Fri, 14 Feb 2014 07:33:36 +0000 Subject: [docs] [issue9694] argparse required arguments displayed under "optional arguments" In-Reply-To: <1282846759.11.0.900867962743.issue9694@psf.upfronthosting.co.za> Message-ID: <1392363216.77.0.570377258789.issue9694@psf.upfronthosting.co.za> Changes by paul j3 : Added file: http://bugs.python.org/file34074/alt_grouping2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 12:31:29 2014 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 14 Feb 2014 11:31:29 +0000 Subject: [docs] [issue20624] Clarify recommendation to inherit from Exception Message-ID: <1392377489.91.0.767550317256.issue20624@psf.upfronthosting.co.za> New submission from Mark Dickinson: >From http://docs.python.org/3.4/library/exceptions.html: "... programmers are encouraged to at least derive new exceptions from the Exception class and not BaseException." This wording had someone I've talked to recently thinking that user-defined exceptions should inherit *directly* from Exception. Suggested rewording, dropping the "at least" qualification that as far as I can tell serves no real purpose: "... programmers are encouraged to derive new exceptions from the Exception class or one of its subclasses, and not from BaseException." ---------- assignee: docs at python components: Documentation messages: 211214 nosy: docs at python, mark.dickinson priority: normal severity: normal status: open title: Clarify recommendation to inherit from Exception versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 13:25:02 2014 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Fri, 14 Feb 2014 12:25:02 +0000 Subject: [docs] [issue10728] argparse.ArgumentParser.print_help uses sys.stdout In-Reply-To: <1292641856.45.0.125469009304.issue10728@psf.upfronthosting.co.za> Message-ID: <1392380701.98.0.0446690845987.issue10728@psf.upfronthosting.co.za> Jan-Philip Gehrcke added the comment: The version action currently writes to stderr. The _VersionAction(Action)'s __call__() method finishes off with parser.exit(message=formatter.format_help()) and parser.exit() by default writes to stderr. Here, Steven says "Help is definitely intended to print to stdout." and I expected the same to happen regarding the version information. Why should it go to stderr? I see that this is a minor problem and only if someone here agrees I would open an issue for that. ---------- nosy: +jgehrcke _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 17:02:30 2014 From: report at bugs.python.org (Irvin Probst) Date: Fri, 14 Feb 2014 16:02:30 +0000 Subject: [docs] [issue20626] Manager documentation unclear about lists and thread safeness In-Reply-To: <1392389766.44.0.393784619009.issue20626@psf.upfronthosting.co.za> Message-ID: <1392393750.16.0.482241760168.issue20626@psf.upfronthosting.co.za> Changes by Irvin Probst : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 18:34:23 2014 From: report at bugs.python.org (Zachary Ware) Date: Fri, 14 Feb 2014 17:34:23 +0000 Subject: [docs] [issue20626] Manager documentation unclear about lists and thread safeness In-Reply-To: <1392389766.44.0.393784619009.issue20626@psf.upfronthosting.co.za> Message-ID: <1392399263.03.0.572250098488.issue20626@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- stage: -> needs patch type: -> enhancement versions: -Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 18:38:58 2014 From: report at bugs.python.org (Berker Peksag) Date: Fri, 14 Feb 2014 17:38:58 +0000 Subject: [docs] [issue20620] Update the min()/max() docs for the new default argument In-Reply-To: <1392322129.66.0.847659571757.issue20620@psf.upfronthosting.co.za> Message-ID: <1392399538.58.0.418557535598.issue20620@psf.upfronthosting.co.za> Berker Peksag added the comment: Here's a patch to update the min() and max() documentations. ---------- keywords: +patch nosy: +berker.peksag Added file: http://bugs.python.org/file34081/issue20620.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 18:43:34 2014 From: report at bugs.python.org (Roger Erens) Date: Fri, 14 Feb 2014 17:43:34 +0000 Subject: [docs] [issue20628] csv.DictReader Message-ID: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> New submission from Roger Erens: The sections on DictReader and DictWriter do not give information on what the type is of the parameter 'fieldnames'. The source code comments that it is a 'list of keys for the dict'. ---------- assignee: docs at python components: Documentation messages: 211226 nosy: docs at python, rogererens priority: normal severity: normal status: open title: csv.DictReader type: enhancement versions: Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 19:23:28 2014 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 14 Feb 2014 18:23:28 +0000 Subject: [docs] [issue20624] Clarify recommendation to inherit from Exception In-Reply-To: <1392377489.91.0.767550317256.issue20624@psf.upfronthosting.co.za> Message-ID: <1392402208.45.0.51802926838.issue20624@psf.upfronthosting.co.za> ?ric Araujo added the comment: In my reading ?at least? means that exceptions should derive from Exception if they don?t derive from a more specific subclass. IOW the same meaning as your proposed wording, but less clear. +1 to your rewording. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 19:35:16 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Feb 2014 18:35:16 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392402916.35.0.533537741368.issue20628@psf.upfronthosting.co.za> R. David Murray added the comment: Fieldnames is referred to as a sequence, which does define its type. That said, defining the type earlier in that paragraph would probably be a good thing. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 19:35:50 2014 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 14 Feb 2014 18:35:50 +0000 Subject: [docs] [issue20606] Operator Documentation Example doesn't work In-Reply-To: <1392201634.78.0.0474474805722.issue20606@psf.upfronthosting.co.za> Message-ID: <1392402950.74.0.583248125079.issue20606@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 19:52:37 2014 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 14 Feb 2014 18:52:37 +0000 Subject: [docs] [issue20573] "built-in repr()" function link on the repr module documentation is incorrect In-Reply-To: <1391943562.07.0.0261710580563.issue20573@psf.upfronthosting.co.za> Message-ID: <1392403957.59.0.912490110432.issue20573@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 19:54:52 2014 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 14 Feb 2014 18:54:52 +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: <1392404092.1.0.340191020771.issue20598@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 20:10:46 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Feb 2014 19:10:46 +0000 Subject: [docs] [issue20573] "built-in repr()" function link on the repr module documentation is incorrect In-Reply-To: <1391943562.07.0.0261710580563.issue20573@psf.upfronthosting.co.za> Message-ID: <3fQkh55R7lz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset 7c47529bda0e by Benjamin Peterson in branch '2.7': fix links to builtin repr function (closes #20573) http://hg.python.org/cpython/rev/7c47529bda0e ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 22:35:31 2014 From: report at bugs.python.org (Berker Peksag) Date: Fri, 14 Feb 2014 21:35:31 +0000 Subject: [docs] [issue20626] Manager documentation unclear about lists and thread safeness In-Reply-To: <1392389766.44.0.393784619009.issue20626@psf.upfronthosting.co.za> Message-ID: <1392413731.28.0.838419670126.issue20626@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 23:47:38 2014 From: report at bugs.python.org (Sean Rodman) Date: Fri, 14 Feb 2014 22:47:38 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392418058.13.0.808760203655.issue20628@psf.upfronthosting.co.za> Sean Rodman added the comment: I am new to contributing to python, and I would like to take a shot a creating a patch for this. ---------- nosy: +sean.rodman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 14 23:57:59 2014 From: report at bugs.python.org (Sean Rodman) Date: Fri, 14 Feb 2014 22:57:59 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392418679.08.0.241459210318.issue20628@psf.upfronthosting.co.za> Sean Rodman added the comment: I have created a patch for this documentation issue. Could you please review this for me and tell me what you think? ---------- keywords: +patch Added file: http://bugs.python.org/file34084/DictReader_DictWriter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 15:33:34 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 14:33:34 +0000 Subject: [docs] [issue19861] Update What's New for Python 3.4 In-Reply-To: <1385986982.03.0.371652275474.issue19861@psf.upfronthosting.co.za> Message-ID: <1392474814.39.0.450860098726.issue19861@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 15:59:56 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Feb 2014 14:59:56 +0000 Subject: [docs] [issue19890] Typo in multiprocessing docs In-Reply-To: <1386198252.12.0.881873603907.issue19890@psf.upfronthosting.co.za> Message-ID: <3fRF4C59ymzS4l@mail.python.org> Roundup Robot added the comment: New changeset 655dffe47b5a by Ezio Melotti in branch '2.7': #19890: fix typo in multiprocessing docs. Patch by Mike Short. http://hg.python.org/cpython/rev/655dffe47b5a New changeset f45d4823f63c by Ezio Melotti in branch '3.3': #19890: fix typo in multiprocessing docs. Patch by Mike Short. http://hg.python.org/cpython/rev/f45d4823f63c New changeset 72f9b6222476 by Ezio Melotti in branch 'default': #19890: merge with 3.3. http://hg.python.org/cpython/rev/72f9b6222476 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:00:29 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:00:29 +0000 Subject: [docs] [issue19890] Typo in multiprocessing docs In-Reply-To: <1386198252.12.0.881873603907.issue19890@psf.upfronthosting.co.za> Message-ID: <1392476429.8.0.806137929974.issue19890@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks Antony for the report and Mike for the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:04:42 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:04:42 +0000 Subject: [docs] [issue19950] Document that unittest.TestCase.__init__ is called once per test In-Reply-To: <1386714858.72.0.878231586551.issue19950@psf.upfronthosting.co.za> Message-ID: <1392476682.18.0.675354262267.issue19950@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:11:38 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:11:38 +0000 Subject: [docs] [issue20039] Missing documentation for argparse.ArgumentTypeError In-Reply-To: <1387622425.21.0.562750433804.issue20039@psf.upfronthosting.co.za> Message-ID: <1392477098.78.0.536028907464.issue20039@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +bethard type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:20:15 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:20:15 +0000 Subject: [docs] [issue20090] slight ambiguity in README.txt instructions for building docs In-Reply-To: <1388243674.59.0.297728620179.issue20090@psf.upfronthosting.co.za> Message-ID: <1392477615.71.0.566682171181.issue20090@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:20:52 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:20:52 +0000 Subject: [docs] [issue20091] An index entry for __main__ in "30.5 runpy" is missing In-Reply-To: <1388243842.91.0.578293707742.issue20091@psf.upfronthosting.co.za> Message-ID: <1392477652.6.0.996533958382.issue20091@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:21:22 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:21:22 +0000 Subject: [docs] [issue20109] TestProgram is mentioned in the unittest docs but is not documented In-Reply-To: <1388685707.72.0.688331916968.issue20109@psf.upfronthosting.co.za> Message-ID: <1392477682.26.0.405348805909.issue20109@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, michael.foord type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:27:05 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:27:05 +0000 Subject: [docs] [issue20146] UserDict module docs link is obsolete In-Reply-To: <1389021583.36.0.157919967896.issue20146@psf.upfronthosting.co.za> Message-ID: <1392478025.83.0.746751565118.issue20146@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:28:09 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:28:09 +0000 Subject: [docs] [issue20169] random module doc page has broken links In-Reply-To: <1389135190.46.0.595431802912.issue20169@psf.upfronthosting.co.za> Message-ID: <1392478089.15.0.697659563759.issue20169@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:35:23 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:35:23 +0000 Subject: [docs] [issue20265] Bring Doc/using/windows up to date In-Reply-To: <1389757265.26.0.116885263001.issue20265@psf.upfronthosting.co.za> Message-ID: <1392478523.63.0.0522440937591.issue20265@psf.upfronthosting.co.za> Ezio Melotti added the comment: Are you just going to reference this issue whenever you update that file, or do you have a plan? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:35:52 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:35:52 +0000 Subject: [docs] [issue20266] Bring Doc/faq/windows up to date In-Reply-To: <1389758449.02.0.48240700444.issue20266@psf.upfronthosting.co.za> Message-ID: <1392478552.48.0.46507181429.issue20266@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:41:36 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:41:36 +0000 Subject: [docs] [issue20351] Add doc examples for DictReader and DictWriter In-Reply-To: <1390414077.91.0.281809568509.issue20351@psf.upfronthosting.co.za> Message-ID: <1392478896.41.0.0315028367264.issue20351@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> patch review type: -> enhancement versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:47:43 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:47:43 +0000 Subject: [docs] [issue20393] Docs: mark deprecated items in the TOC In-Reply-To: <1390685369.63.0.965002484298.issue20393@psf.upfronthosting.co.za> Message-ID: <1392479263.07.0.602804153789.issue20393@psf.upfronthosting.co.za> Ezio Melotti added the comment: Are you talking about http://docs.python.org/3/library/index.html ? That might work for whole modules, but not for classes/methods/functions. An easy fix for modules would be to add (deprecated) right in the title so that it's visible in the index and also in the Google results (and doesn't require changes in the CSS). ---------- nosy: +ezio.melotti versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:48:12 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:48:12 +0000 Subject: [docs] [issue20402] List comprehensions should be noted in for loop documentation In-Reply-To: <1390793056.66.0.0906291243976.issue20402@psf.upfronthosting.co.za> Message-ID: <1392479292.28.0.736594701643.issue20402@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch versions: +Python 2.7, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:48:31 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:48:31 +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: <1392479311.09.0.600485004569.issue20413@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:55:25 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:55:25 +0000 Subject: [docs] [issue20487] Odd words in unittest.mock document. In-Reply-To: <1391355507.86.0.158179018907.issue20487@psf.upfronthosting.co.za> Message-ID: <1392479725.04.0.215607141855.issue20487@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 16:57:21 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 15:57:21 +0000 Subject: [docs] [issue20497] Unclear word in socket document. In-Reply-To: <1391408382.37.0.746852071929.issue20497@psf.upfronthosting.co.za> Message-ID: <1392479841.86.0.707915191365.issue20497@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +giampaolo.rodola versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 17:09:55 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 16:09:55 +0000 Subject: [docs] [issue20606] Operator Documentation Example doesn't work In-Reply-To: <1392201634.78.0.0474474805722.issue20606@psf.upfronthosting.co.za> Message-ID: <1392480595.71.0.909847165858.issue20606@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 17:10:08 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 16:10:08 +0000 Subject: [docs] [issue20610] Documentation with two slashes in URL links to v2.6.5c2 In-Reply-To: <1392216947.66.0.816905762086.issue20610@psf.upfronthosting.co.za> Message-ID: <1392480608.35.0.954118324818.issue20610@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 17:10:49 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 15 Feb 2014 16:10:49 +0000 Subject: [docs] [issue20620] Update the min()/max() docs for the new default argument In-Reply-To: <1392322129.66.0.847659571757.issue20620@psf.upfronthosting.co.za> Message-ID: <1392480649.75.0.810366917421.issue20620@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 20:23:15 2014 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 15 Feb 2014 19:23:15 +0000 Subject: [docs] [issue20610] Documentation with two slashes in URL links to v2.6.5c2 In-Reply-To: <1392216947.66.0.816905762086.issue20610@psf.upfronthosting.co.za> Message-ID: <1392492195.11.0.360435586524.issue20610@psf.upfronthosting.co.za> A.M. Kuchling added the comment: To clarify: http://www.python.org/doc//current/library/itertools.html returns the corresponding page from the 2.6.5c2 docs, while http://www.python.org/doc/current/library/itertools.html returns a 301 redirect to http://docs.python.org/library/itertools.html. Presumably there's a RewriteRule that fails to match with the doubled-slashes, so Apache falls through to the filesystem. Maybe there's an old 'current' symlink that's pointing at 2.6.5c2. ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 20:37:50 2014 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 15 Feb 2014 19:37:50 +0000 Subject: [docs] [issue19363] Python 2.7's future_builtins.map is not compatible with Python 3's map In-Reply-To: <1382534189.14.0.63787411181.issue19363@psf.upfronthosting.co.za> Message-ID: <1392493070.74.0.658209494393.issue19363@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Gareth Rees: it doesn't look like you attached the patch mentioned in your 02/04 comment. ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 21:33:59 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Feb 2014 20:33:59 +0000 Subject: [docs] [issue20237] Ambiguous sentence in document of xml package. In-Reply-To: <1389608026.69.0.492339232238.issue20237@psf.upfronthosting.co.za> Message-ID: <3fRNTf182pzSVp@mail.python.org> Roundup Robot added the comment: New changeset 1c93895c32d8 by Andrew Kuchling in branch '3.3': #20237: make a revision pass over the XML vulnerabilities section http://hg.python.org/cpython/rev/1c93895c32d8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 21:35:23 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 15 Feb 2014 20:35:23 +0000 Subject: [docs] [issue20610] Documentation with two slashes in URL links to v2.6.5c2 In-Reply-To: <1392216947.66.0.816905762086.issue20610@psf.upfronthosting.co.za> Message-ID: <1392496523.62.0.782673298885.issue20610@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I zapped the 2.6.c2 docs. I don't particularly feel like messing with mod_rewrite horrors on python.org to fix it to redirect properly. I think we should drop redirects those soon anyway. Probably will happen with the new site... ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 21:35:42 2014 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 15 Feb 2014 20:35:42 +0000 Subject: [docs] [issue20237] Ambiguous sentence in document of xml package. In-Reply-To: <1389608026.69.0.492339232238.issue20237@psf.upfronthosting.co.za> Message-ID: <1392496542.08.0.291348472098.issue20237@psf.upfronthosting.co.za> A.M. Kuchling added the comment: I applied Fran Bull's change; thanks for the patch! The vulnerabilities section had several grammar issues, so I made an editing pass over it and made various other changes in my commit. ---------- nosy: +akuchling stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 22:17:58 2014 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 15 Feb 2014 21:17:58 +0000 Subject: [docs] [issue20487] Odd words in unittest.mock document. In-Reply-To: <1391355507.86.0.158179018907.issue20487@psf.upfronthosting.co.za> Message-ID: <1392499078.47.0.341257401551.issue20487@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Maybe this would be clearer if it used the keyword, i.e. "using the :attr:`~Mock.side_effect` attribute". Also, there's a typo in the quoted text: "two equality method" should be method'S'. ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 22:39:47 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Feb 2014 21:39:47 +0000 Subject: [docs] [issue20497] Unclear word in socket document. In-Reply-To: <1391408382.37.0.746852071929.issue20497@psf.upfronthosting.co.za> Message-ID: <3fRPxZ4RQvzQv8@mail.python.org> Roundup Robot added the comment: New changeset 3352b5abe1e4 by Andrew Kuchling in branch '3.3': Clarify versionchanged sentence. Closes #20497. http://hg.python.org/cpython/rev/3352b5abe1e4 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 22:41:24 2014 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 15 Feb 2014 21:41:24 +0000 Subject: [docs] [issue20497] Unclear word in socket document. In-Reply-To: <1391408382.37.0.746852071929.issue20497@psf.upfronthosting.co.za> Message-ID: <1392500484.28.0.943095405663.issue20497@psf.upfronthosting.co.za> A.M. Kuchling added the comment: That line of documentation was introduced in changeset ca2a859e9bf6, which was issue #8866. Previously the parameters to getaddrinfo() were positional, so you had to supply all 5 of them. ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 23:04:59 2014 From: report at bugs.python.org (A.M. Kuchling) Date: Sat, 15 Feb 2014 22:04:59 +0000 Subject: [docs] [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1392501899.49.0.214669173105.issue16728@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Here's a possible patch that mentions collections.abc.Sequence. I left out MutableSequence, because I couldn't see how to mention it without making the definition longer and more complicated. (It could be objected that this is the *glossary*, and is supposed to provide brief descriptions of terms, not precisely detailed descriptions. In that case, the patch could simply be rejected.) ---------- nosy: +akuchling Added file: http://bugs.python.org/file34095/issue16728.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 23:11:16 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Feb 2014 22:11:16 +0000 Subject: [docs] [issue20241] Bad reference to RFC in document of ipaddress? In-Reply-To: <1389626719.4.0.511378840941.issue20241@psf.upfronthosting.co.za> Message-ID: <3fRQdw0XC3z7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 383f4eede628 by Andrew Kuchling in branch '3.3': #20241: use correct RFC number http://hg.python.org/cpython/rev/383f4eede628 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 15 23:11:17 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Feb 2014 22:11:17 +0000 Subject: [docs] [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <3fRQdw5dcQz7LjQ@mail.python.org> Roundup Robot added the comment: New changeset 30d0816939a3 by Andrew Kuchling in branch '3.3': #16728: Mention collections.abc.Sequence in 'sequence' glossary entry http://hg.python.org/cpython/rev/30d0816939a3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 06:11:20 2014 From: report at bugs.python.org (Todd Rovito) Date: Sun, 16 Feb 2014 05:11:20 +0000 Subject: [docs] [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1392527480.15.0.656599943341.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: Retested this patch with the latest 3.4 and made one tiny change to get it to apply cleanly. Please provide feedback or commit. I would like to get this committed after more than a year since the original bug report. ---------- Added file: http://bugs.python.org/file34097/16278OSRenameDocsTestV5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 06:13:43 2014 From: report at bugs.python.org (Todd Rovito) Date: Sun, 16 Feb 2014 05:13:43 +0000 Subject: [docs] [issue16278] os.rename documentation slightly inaccurate In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1392527623.89.0.558605300345.issue16278@psf.upfronthosting.co.za> Todd Rovito added the comment: I forgot to mention this patch only works on 3.4 but if it is committed I will work on a patch for 2.7. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 11:39:16 2014 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 16 Feb 2014 10:39:16 +0000 Subject: [docs] [issue20638] KeyError building the Python html doc with sphinx Message-ID: <1392547156.76.0.116028176695.issue20638@psf.upfronthosting.co.za> New submission from Xavier de Gaye: Occurs on the tip of the Python default branch on ArchLinux when running 'make html PYTHON=python2' from Doc/. Traceback attached. ---------- assignee: docs at python components: Documentation files: sphinx-err-DH3qAl.log messages: 211311 nosy: docs at python, georg.brandl, xdegaye priority: normal severity: normal status: open title: KeyError building the Python html doc with sphinx type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file34098/sphinx-err-DH3qAl.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 12:15:29 2014 From: report at bugs.python.org (Georg Brandl) Date: Sun, 16 Feb 2014 11:15:29 +0000 Subject: [docs] [issue20638] KeyError building the Python html doc with sphinx In-Reply-To: <1392547156.76.0.116028176695.issue20638@psf.upfronthosting.co.za> Message-ID: <1392549329.52.0.244833389707.issue20638@psf.upfronthosting.co.za> Georg Brandl added the comment: Which revision is your tip? In the latest revision, the documentation should refuse being built with 1.0.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 15:52:51 2014 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 16 Feb 2014 14:52:51 +0000 Subject: [docs] [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1392562371.48.0.162148906844.issue16728@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 16:34:07 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 16 Feb 2014 15:34:07 +0000 Subject: [docs] [issue13663] pootle.python.org is outdated. In-Reply-To: <1324903809.07.0.39088932351.issue13663@psf.upfronthosting.co.za> Message-ID: <1392564847.82.0.117900844685.issue13663@psf.upfronthosting.co.za> Benjamin Peterson added the comment: pootle.python.org has been disabled. ---------- nosy: +benjamin.peterson resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 17:14:17 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Feb 2014 16:14:17 +0000 Subject: [docs] [issue12211] Better document math.copysign behavior. In-Reply-To: <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za> Message-ID: <3fRtgX17TCz7Ljl@mail.python.org> Roundup Robot added the comment: New changeset 3ad7725b5013 by Andrew Kuchling in branch '3.3': #12211: clarify math.copysign() documentation and docstring http://hg.python.org/cpython/rev/3ad7725b5013 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 17:16:31 2014 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 16 Feb 2014 16:16:31 +0000 Subject: [docs] [issue12211] Better document math.copysign behavior. In-Reply-To: <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za> Message-ID: <1392567391.42.0.802119497783.issue12211@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Applied. I added two sentences describing the NaN behaviour. ---------- nosy: +akuchling resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 17:19:04 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 16 Feb 2014 16:19:04 +0000 Subject: [docs] [issue12211] Better document math.copysign behavior. In-Reply-To: <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za> Message-ID: <1392567544.59.0.754769102812.issue12211@psf.upfronthosting.co.za> Mark Dickinson added the comment: The paragraph about NaNs isn't correct. For example: >>> from math import copysign >>> copysign(1.0, float('nan')) 1.0 >>> copysign(1.0, -float('nan')) -1.0 Though it doesn't really make sense to talk about 'positive' or 'negative' NaNs, a NaN still has a sign bit, and that sign bit is used in the copysign operation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 17:21:15 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 16 Feb 2014 16:21:15 +0000 Subject: [docs] [issue12211] Better document math.copysign behavior. In-Reply-To: <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za> Message-ID: <1392567675.37.0.464213323079.issue12211@psf.upfronthosting.co.za> Mark Dickinson added the comment: More examples, showing that `y` is not ignored when `x` is a NaN. >>> result1 = copysign(float('nan'), 1.0) >>> result2 = copysign(float('nan'), -1.0) >>> copysign(1.0, result1) # result1 is a NaN whose sign bit is cleared. 1.0 >>> copysign(1.0, result2) # result2 is a NaN whose sign bit is set. -1.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 17:21:34 2014 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 16 Feb 2014 16:21:34 +0000 Subject: [docs] [issue12211] Better document math.copysign behavior. In-Reply-To: <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za> Message-ID: <1392567694.77.0.182238162379.issue12211@psf.upfronthosting.co.za> A.M. Kuchling added the comment: OK; I'll just drop the 'If y is NaN' sentence. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 17:26:15 2014 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 16 Feb 2014 16:26:15 +0000 Subject: [docs] [issue12211] Better document math.copysign behavior. In-Reply-To: <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za> Message-ID: <1392567975.6.0.548453410627.issue12211@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Actually ISTM the 'if x is NaN' sentence can also go; it seems to just copy the sign bit no matter what x and y are. >>> from math import * >>> nan = float('nan') >>> neg = -nan >>> copysign(+1, copysign(nan, neg)) -1.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 17:27:01 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 16 Feb 2014 16:27:01 +0000 Subject: [docs] [issue16278] Improve os.rename documentation and tests In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1392568021.02.0.0586385091285.issue16278@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: docs at python -> components: +Library (Lib), Tests nosy: +loewis title: os.rename documentation slightly inaccurate -> Improve os.rename documentation and tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 17:35:31 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 16 Feb 2014 16:35:31 +0000 Subject: [docs] [issue12211] Better document math.copysign behavior. In-Reply-To: <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za> Message-ID: <1392568531.74.0.0299199148386.issue12211@psf.upfronthosting.co.za> Mark Dickinson added the comment: > It seems to just copy the sign bit no matter what x and y are. Yep, that's exactly what happens. The sign bit from y just gets blindly transferred to x, with no regard to any meaning of x or y. So it works exactly the same way for zeros, NaNs, infinities, or whatever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 18:11:03 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Feb 2014 17:11:03 +0000 Subject: [docs] [issue12211] Better document math.copysign behavior. In-Reply-To: <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za> Message-ID: <3fRvx22F7PzSRW@mail.python.org> Roundup Robot added the comment: New changeset b01f4ed077fa by Andrew Kuchling in branch '3.3': #12211: remove paragraph about NaNs http://hg.python.org/cpython/rev/b01f4ed077fa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 18:43:42 2014 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 16 Feb 2014 17:43:42 +0000 Subject: [docs] [issue12211] Better document math.copysign behavior. In-Reply-To: <1306710150.53.0.509116993934.issue12211@psf.upfronthosting.co.za> Message-ID: <1392572622.86.0.0111812831405.issue12211@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks! (And apologies for the nitpicking.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 19:39:19 2014 From: report at bugs.python.org (Berker Peksag) Date: Sun, 16 Feb 2014 18:39:19 +0000 Subject: [docs] [issue20241] Bad reference to RFC in document of ipaddress? In-Reply-To: <1389626719.4.0.511378840941.issue20241@psf.upfronthosting.co.za> Message-ID: <1392575959.13.0.704807056336.issue20241@psf.upfronthosting.co.za> Berker Peksag added the comment: This was also fixed in default: http://hg.python.org/cpython/rev/2d62ee3c7617 ---------- nosy: +berker.peksag resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 19:50:22 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 16 Feb 2014 18:50:22 +0000 Subject: [docs] [issue20261] Cannot pickle some objects that have a __getattr__() In-Reply-To: <1389728767.16.0.141259686696.issue20261@psf.upfronthosting.co.za> Message-ID: <1392576622.54.0.187171007137.issue20261@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed. Should be in 3.4.0. I'll deal with #16251 in 3.5. ---------- assignee: docs at python -> larry nosy: +benjamin.peterson, larry priority: normal -> release blocker superseder: pickle special methods are looked up on the instance rather than the type -> versions: -Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 19:51:51 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 16 Feb 2014 18:51:51 +0000 Subject: [docs] [issue20261] Cannot pickle some objects that have a __getattr__() In-Reply-To: <1389728767.16.0.141259686696.issue20261@psf.upfronthosting.co.za> Message-ID: <1392576711.35.0.434793221358.issue20261@psf.upfronthosting.co.za> Benjamin Peterson added the comment: (See http://hg.python.org/cpython/rev/b328f8ccbccf) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 22:37:19 2014 From: report at bugs.python.org (Roger Erens) Date: Sun, 16 Feb 2014 21:37:19 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392586639.56.0.160450395296.issue20628@psf.upfronthosting.co.za> Roger Erens added the comment: I did not fully realize the meaning of it being a sequence as it is referred to a little later indeed. Which implies both a tuple and a list can be used, right? So then the patch might look like: + The *fieldnames* parameter is a list or tuple of keys used for the dict. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 22:47:38 2014 From: report at bugs.python.org (Sean Rodman) Date: Sun, 16 Feb 2014 21:47:38 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392587258.39.0.418732470883.issue20628@psf.upfronthosting.co.za> Sean Rodman added the comment: It looks like you are right. I have updated the patch to reflect that it could be a list or a tuple. ---------- Added file: http://bugs.python.org/file34109/DictReader_DictWriter_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 22:48:48 2014 From: report at bugs.python.org (Sean Rodman) Date: Sun, 16 Feb 2014 21:48:48 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392587328.4.0.938721759053.issue20628@psf.upfronthosting.co.za> Changes by Sean Rodman : Removed file: http://bugs.python.org/file34084/DictReader_DictWriter.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 16 22:57:51 2014 From: report at bugs.python.org (Vladimir Rutsky) Date: Sun, 16 Feb 2014 21:57:51 +0000 Subject: [docs] [issue20643] Strange dot in documentation (after generator.close) Message-ID: <1392587871.68.0.444276628486.issue20643@psf.upfronthosting.co.za> New submission from Vladimir Rutsky: In 3.4 docs after generator.close() description there is strange dot: http://docs.python.org/3.4/reference/expressions.html#generator.close Looks like it's due to following code in Doc/reference/expressions.rst:452: .. class:: . This line should be removed. ---------- assignee: docs at python components: Documentation messages: 211364 nosy: docs at python, rutsky priority: normal severity: normal status: open title: Strange dot in documentation (after generator.close) versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 03:20:57 2014 From: report at bugs.python.org (Charles-Axel Dein) Date: Mon, 17 Feb 2014 02:20:57 +0000 Subject: [docs] [issue20351] Add doc examples for DictReader and DictWriter In-Reply-To: <1390414077.91.0.281809568509.issue20351@psf.upfronthosting.co.za> Message-ID: <1392603657.85.0.933970201932.issue20351@psf.upfronthosting.co.za> Charles-Axel Dein added the comment: Updated patch following review. ---------- Added file: http://bugs.python.org/file34110/add_csvdict_examples.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 07:33:22 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 17 Feb 2014 06:33:22 +0000 Subject: [docs] [issue20652] Example in asyncio task gives resource warning Message-ID: <1392618802.39.0.436656290548.issue20652@psf.upfronthosting.co.za> New submission from Vajrasky Kok: >From http://docs.python.org/3.4/library/asyncio-task.html#example-future-with-run-until-complete there is an example code: import asyncio @asyncio.coroutine def slow_operation(future): yield from asyncio.sleep(1) future.set_result('Future in done!') def got_result(future): print(future.result()) loop.stop() loop = asyncio.get_event_loop() future = asyncio.Future() asyncio.Task(slow_operation(future)) future.add_done_callback(got_result) loop.run_forever() I got this: ethan at amiau:~/Documents/code/python/cpython3.4$ ./python /tmp/demo.py Future in done! sys:1: ResourceWarning: unclosed sys:1: ResourceWarning: unclosed Here is the patch to shut off the resource warning. ---------- assignee: docs at python components: Documentation files: shut_off_resource_warning_run_forever_asyncio_example.patch keywords: patch messages: 211392 nosy: docs at python, haypo, vajrasky priority: normal severity: normal status: open title: Example in asyncio task gives resource warning type: resource usage versions: Python 3.4 Added file: http://bugs.python.org/file34111/shut_off_resource_warning_run_forever_asyncio_example.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 07:34:32 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 17 Feb 2014 06:34:32 +0000 Subject: [docs] [issue20652] Example in asyncio task gives resource warning In-Reply-To: <1392618802.39.0.436656290548.issue20652@psf.upfronthosting.co.za> Message-ID: <1392618872.76.0.0683083455278.issue20652@psf.upfronthosting.co.za> Changes by Vajrasky Kok : Removed file: http://bugs.python.org/file34111/shut_off_resource_warning_run_forever_asyncio_example.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 07:35:04 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Mon, 17 Feb 2014 06:35:04 +0000 Subject: [docs] [issue20652] Example in asyncio task gives resource warning In-Reply-To: <1392618802.39.0.436656290548.issue20652@psf.upfronthosting.co.za> Message-ID: <1392618904.3.0.484534701715.issue20652@psf.upfronthosting.co.za> Vajrasky Kok added the comment: The patch also fixed some typos. s/Future in done/Future is done/ ---------- Added file: http://bugs.python.org/file34112/shut_off_resource_warning_run_forever_asyncio_example.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 10:56:14 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Feb 2014 09:56:14 +0000 Subject: [docs] [issue20652] Example in asyncio task gives resource warning In-Reply-To: <1392618802.39.0.436656290548.issue20652@psf.upfronthosting.co.za> Message-ID: <3fSLDs0wjMz7LjT@mail.python.org> Roundup Robot added the comment: New changeset ea4c74cc4da5 by Victor Stinner in branch 'default': Close #20652: asyncio doc: close the event loop in run_forever() example. Fix http://hg.python.org/cpython/rev/ea4c74cc4da5 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 11:36:04 2014 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 17 Feb 2014 10:36:04 +0000 Subject: [docs] [issue20638] KeyError building the Python html doc with sphinx In-Reply-To: <1392547156.76.0.116028176695.issue20638@psf.upfronthosting.co.za> Message-ID: <1392633364.31.0.365491518282.issue20638@psf.upfronthosting.co.za> Xavier de Gaye added the comment: $ hg log -r tip changeset: 89198:72f9b6222476 tag: tip parent: 89195:dcbbff7e6b56 parent: 89197:f45d4823f63c user: Ezio Melotti date: Sat Feb 15 16:59:39 2014 +0200 summary: #19890: merge with 3.3. The README.txt says: A "make update" updates the Subversion checkouts in `tools/` After running 'make update', 'make html' does not fail anymore. Maybe 'update' should be made a prerequisite of 'html' in the Makefile. Otherwise, sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 11:37:52 2014 From: report at bugs.python.org (Georg Brandl) Date: Mon, 17 Feb 2014 10:37:52 +0000 Subject: [docs] [issue20638] KeyError building the Python html doc with sphinx In-Reply-To: <1392547156.76.0.116028176695.issue20638@psf.upfronthosting.co.za> Message-ID: <1392633472.26.0.0747991460416.issue20638@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the feedback. This was not the latest tip anyway: in the current tip the checked-out toolchain is gone and your system Sphinx is used. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 11:55:22 2014 From: report at bugs.python.org (Gareth Rees) Date: Mon, 17 Feb 2014 10:55:22 +0000 Subject: [docs] [issue19363] Python 2.7's future_builtins.map is not compatible with Python 3's map In-Reply-To: <1382534189.14.0.63787411181.issue19363@psf.upfronthosting.co.za> Message-ID: <1392634522.63.0.289934308826.issue19363@psf.upfronthosting.co.za> Gareth Rees added the comment: Sorry about that; here it is. I had second thoughts about recommending zip() as an alternative (that would only work for cases where the None was constant; in other cases you might need lambda *args: args, but this seemed too complicated), so the note now says only: Note: In Python 3, map() does not accept None for the function argument. ---------- keywords: +patch Added file: http://bugs.python.org/file34117/issue19363.patch _______________________________________ Python tracker _______________________________________ From sdfjsfjaei-thomas at yahoo.de Sat Feb 15 13:28:21 2014 From: sdfjsfjaei-thomas at yahoo.de (sdfjsfjaei-thomas at yahoo.de) Date: Sat, 15 Feb 2014 12:28:21 +0000 (GMT) Subject: [docs] bug report index method Message-ID: <1392467301.37479.YahooMailNeo@web171603.mail.ir2.yahoo.com> Hello, can you please file a bug report about this inconsistency: for list None is not allowed in the index method, while for str it is. Also there are 2 different formats for optional paremeters in the help. >>> ''.index('', 0, None) 97: 0 >>> [].index('', 0, None) Traceback (most recent call last): ? File "", line 1, in ??? [].index('', 0, None) TypeError: slice indices must be integers or None or have an __index__ method >>> help(''.index) Help on built-in function index: index(...) ??? S.index(sub[, start[, end]]) -> int ? ? ??? Like S.find() but raise ValueError when the substring is not found. >>> help([].index) Help on built-in function index: index(...) ??? L.index(value, [start, [stop]]) -> integer -- return first index of value. ??? Raises ValueError if the value is not present. -------------- next part -------------- An HTML attachment was scrubbed... URL: From gby_sdu at 163.com Sun Feb 16 14:19:05 2014 From: gby_sdu at 163.com (gby) Date: Sun, 16 Feb 2014 21:19:05 +0800 (CST) Subject: [docs] cannot set default encoding in python3.3.3 Message-ID: <181edff9.dad0.1443ad9a13d.Coremail.gby_sdu@163.com> Dear sir: In python 2.7,we can set the default encoding by: import sys reload(sys) sys.setdefaultencoding('gbk') But in python3.3, the default encoding is 'utf-8' and I can't set it 'gbk' ! The "sys.setdefaultencoding()" function is disappeared ! I am really worried,I have tried several days but I can't solve it ! Please help me and show me how to set the default encoding in python 3.3, please! -------------- next part -------------- An HTML attachment was scrubbed... URL: From zachary.ware+pytut at gmail.com Mon Feb 17 17:59:58 2014 From: zachary.ware+pytut at gmail.com (Zachary Ware) Date: Mon, 17 Feb 2014 10:59:58 -0600 Subject: [docs] cannot set default encoding in python3.3.3 In-Reply-To: <181edff9.dad0.1443ad9a13d.Coremail.gby_sdu@163.com> References: <181edff9.dad0.1443ad9a13d.Coremail.gby_sdu@163.com> Message-ID: On Sun, Feb 16, 2014 at 7:19 AM, gby wrote: > Dear sir: > In python 2.7,we can set the default encoding by: > > import sys > reload(sys) > sys.setdefaultencoding('gbk') > > But in python3.3, the default encoding is 'utf-8' and I can't set it > 'gbk' ! The "sys.setdefaultencoding()" function is disappeared ! > I am really worried,I have tried several days but I can't solve it ! > Please help me and show me how to set the default encoding in python 3.3, > please! First off, this is not the right place to send this kind of question. docs at python.org is geared towards discussion of the documentation of Python, not its usage. In future, send this kind of question to python-list at python.org or tutor at python.org, where many knowledgeable people are listening in and willing to help. With that out of the way: Sorry, but the answer here is "don't". Googling for "python setdefaultencoding" will give you many results saying why it's a bad idea in 2.7, and impossible in 3.x. The real solution is to make sure to decode all input to unicode (the unicode type in 2.7, str in 3.3) as early as possible, and encode all output to bytes (str type in 2.7, bytes in 3.3) as late as possible. If you need help with this, please ask on tutor at python.org. Hope this helps, -- Zach From report at bugs.python.org Mon Feb 17 18:16:21 2014 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 17 Feb 2014 17:16:21 +0000 Subject: [docs] [issue16278] Improve os.rename documentation and tests In-Reply-To: <1350581776.08.0.668682100781.issue16278@psf.upfronthosting.co.za> Message-ID: <1392657381.84.0.427422473268.issue16278@psf.upfronthosting.co.za> Benjamin Peterson added the comment: 1. You removed the note about files being on the same filesystem on Unix. That's useful. 2. I don't think it needs to be mentioned that you'll get an error if *src* doesn't exist. 3. The table is strange because the "destination" header spans 2 columns, while the description of destination types seems to be 3 columns. 4. The destination type entries are marked as the table header, but the source type entries are not. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 19:05:20 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 17 Feb 2014 18:05:20 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1392660320.65.0.135165986564.issue15871@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 3.5 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 22:18:03 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 17 Feb 2014 21:18:03 +0000 Subject: [docs] [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1392671883.47.0.922922100754.issue12691@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: docs at python -> terry.reedy nosy: +terry.reedy stage: test needed -> patch review versions: +Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 22:28:39 2014 From: report at bugs.python.org (Zachary Ware) Date: Mon, 17 Feb 2014 21:28:39 +0000 Subject: [docs] [issue20265] Bring Doc/using/windows up to date In-Reply-To: <1389757265.26.0.116885263001.issue20265@psf.upfronthosting.co.za> Message-ID: <1392672519.37.0.887177197453.issue20265@psf.upfronthosting.co.za> Zachary Ware added the comment: The plan is to eventually have enough time to pick through the file and make sure everything is actually up to date :). >From just a quick glance, here's a couple of the things that still need to be done: - all of the external links should be checked for whether they are up to date (and still relevant to current Python) - the 'Excursus: Setting environment variables' section needs a major overhaul ('autoexec.bat' isn't used (or at least not recommended) anymore, among other things) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 22:50:20 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Feb 2014 21:50:20 +0000 Subject: [docs] [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <3fSf4q363Mz7Ljg@mail.python.org> Roundup Robot added the comment: New changeset c896d292080a by Terry Jan Reedy in branch '2.7': Untokenize: An logically incorrect assert tested user input validity. http://hg.python.org/cpython/rev/c896d292080a New changeset 51e5a89afb3b by Terry Jan Reedy in branch '3.3': Untokenize: An logically incorrect assert tested user input validity. http://hg.python.org/cpython/rev/51e5a89afb3b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 17 23:45:55 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 17 Feb 2014 22:45:55 +0000 Subject: [docs] [issue20620] Update the min()/max() docs for the new default argument In-Reply-To: <1392322129.66.0.847659571757.issue20620@psf.upfronthosting.co.za> Message-ID: <1392677155.23.0.711340539775.issue20620@psf.upfronthosting.co.za> Larry Hastings added the comment: key and default are keyword-only arguments, the signature should have a '*'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 01:09:03 2014 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Tue, 18 Feb 2014 00:09:03 +0000 Subject: [docs] [issue20265] Bring Doc/using/windows up to date In-Reply-To: <1389757265.26.0.116885263001.issue20265@psf.upfronthosting.co.za> Message-ID: <1392682143.39.0.0859398575597.issue20265@psf.upfronthosting.co.za> Westley Mart?nez added the comment: I personally like this page about environment variables: http://www.computerhope.com/issues/ch000549.htm It is clear, concise, and has pretty pictures. However, it does not address Windows 8. Since Windows 8 is becoming more popular everyday, and since it is rather odd and difficult to configure, we should update the article to include stuff for Windows 8. Unfortunately, I don't have Windows 8, so I can't help there. ---------- nosy: +westley.martinez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 01:46:59 2014 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Tue, 18 Feb 2014 00:46:59 +0000 Subject: [docs] [issue20402] List comprehensions should be noted in for loop documentation In-Reply-To: <1390793056.66.0.0906291243976.issue20402@psf.upfronthosting.co.za> Message-ID: <1392684419.02.0.452638915305.issue20402@psf.upfronthosting.co.za> Westley Mart?nez added the comment: I'm curious what the best way to do this would be. Obviously the simplest would just be 'See also list comprehensions.' However since this is a tutorial, I was thinking of adding something like this: 'In other languages, for loops are often used to fill a sequence with data. While this method works just as well in Python, it is often better to use a list comprehension' and then there could be an example like that found here: http://docs.python.org/2/tutorial/datastructures.html#list-comprehensions Followed by a link to more info on list comprehensions. ---------- nosy: +westley.martinez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 01:49:22 2014 From: report at bugs.python.org (=?utf-8?q?Westley_Mart=C3=ADnez?=) Date: Tue, 18 Feb 2014 00:49:22 +0000 Subject: [docs] [issue20146] UserDict module docs link is obsolete In-Reply-To: <1389021583.36.0.157919967896.issue20146@psf.upfronthosting.co.za> Message-ID: <1392684562.07.0.89851744325.issue20146@psf.upfronthosting.co.za> Changes by Westley Mart?nez : ---------- nosy: +westley.martinez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 03:33:32 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 18 Feb 2014 02:33:32 +0000 Subject: [docs] [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1392690812.63.0.311077503195.issue12691@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The problem of the first iterator pair token being discarded is the subject of #8478. Consider that part of this issue as being closed as a duplicate. The issue of a string being returned if there is no encoding should have been opened as a separate issue, and it was in #16223. I explain there why I think the behavior should be left as is and the docstring changed, and the doc clarified. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 11:11:10 2014 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 18 Feb 2014 10:11:10 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1392718269.91.0.0106855094067.issue15871@psf.upfronthosting.co.za> Ezio Melotti added the comment: This seems to have been fixed/improved already. A search for "random" now returns the random module as first result and random.random as second. Searching for "print" returns the pprint module first, and then the print function. With "str" or "list" the results are a bit worse, with the builtin function in 6th and 4th position respectively. Searching for keywords (e.g. "with") still doesn't give useful results. The code now uses something similar to what I suggested in the previous message (if ((fullname == object) || (fullname.split('.').pop() == object)) {...}) and a scoring system. It might still need some tweaking to get better results with "str" and "list" and for keywords, but it's already much better. Terry, given these improvements, do you still think that using the index is better? Are there still searches that don't return the desired results? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 17:08:26 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Feb 2014 16:08:26 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392739706.08.0.476539832184.issue20628@psf.upfronthosting.co.za> R. David Murray added the comment: Well, there is a reason why the term 'sequence' was used. It covers lists, tuples...and anything else that implements the Sequence ABC (http://docs.python.org/library/collections.html#collections-abstract-base-classes). The word 'sequence' could be made a link to that section by doing: :mod:`sequence ` in the Python3 docs (it would need to be a :ref: to the subsection in the python2 docs, I think). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 17:43:18 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 18 Feb 2014 16:43:18 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1392741798.09.0.858410227935.issue15871@psf.upfronthosting.co.za> Terry J. Reedy added the comment: We have collectively spent much time creating reasonably good module and term indexes and more improvements can and will be made. I strongly feel that they should be made as easily searchable and usable as the full text searches that are generally less useful to useless and are always more resource consuming. You already answered your first question. While 'print' is listed second (but should be first)-- after a delay that would not be needed if the index were used -- it is followed by 62 lines of noise. What a waste. If the index were used, the response to 'with' would start with 'with: statement'. As for other searches: 'if' returns hits for 'snIFf', 'dIFference', 'hexlIFy', etc, but not the 'if' statement, which would be first if the index were used; **' return no hits, whereas an index search would return the current entries for '**'. Ditto for '%' and '&'. Google and other search engines do not search for symbols. It is a shame that the search box on the docs does not either. A few years ago I collected to data needed to vastly improve the symbol index, but doing so will not do the current doc search box any good if the index is not used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 18:38:56 2014 From: report at bugs.python.org (Georg Brandl) Date: Tue, 18 Feb 2014 17:38:56 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1392745136.48.0.269235389076.issue15871@psf.upfronthosting.co.za> Georg Brandl added the comment: What a waste indeed. After all, when I want to search I only ever want one single match to be displayed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 18:45:37 2014 From: report at bugs.python.org (Sean Rodman) Date: Tue, 18 Feb 2014 17:45:37 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392745537.33.0.233937281072.issue20628@psf.upfronthosting.co.za> Sean Rodman added the comment: Here is a patch for DictReader that adds a mod link to the sequence abstract as requested. Please review this if you could and let me know what you think. Note: This patch is for python 3 and if you like how I have done it on here I will go ahead and create a patch that covers python 2 as well. ---------- Added file: http://bugs.python.org/file34135/DictReader_python3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 18:56:42 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Feb 2014 17:56:42 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392746202.2.0.831986389425.issue20628@psf.upfronthosting.co.za> R. David Murray added the comment: I'd like to combine the two approaches: mention that fieldnames is a sequence (with the link) as soon as fieldnames is introduced in the paragraph, analogous to what you did in the first patch. Whether you then make what becomes the second occurrence of the word sequence also a link is a matter of taste, but I probably wouldn't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 19:05:26 2014 From: report at bugs.python.org (Sean Rodman) Date: Tue, 18 Feb 2014 18:05:26 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392746726.69.0.0533105918225.issue20628@psf.upfronthosting.co.za> Changes by Sean Rodman : Removed file: http://bugs.python.org/file34109/DictReader_DictWriter_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 19:05:35 2014 From: report at bugs.python.org (Sean Rodman) Date: Tue, 18 Feb 2014 18:05:35 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392746735.79.0.349219510803.issue20628@psf.upfronthosting.co.za> Changes by Sean Rodman : Removed file: http://bugs.python.org/file34135/DictReader_python3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 19:09:42 2014 From: report at bugs.python.org (Sean Rodman) Date: Tue, 18 Feb 2014 18:09:42 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392746982.51.0.295961546529.issue20628@psf.upfronthosting.co.za> Sean Rodman added the comment: Ok, I have take the approach I used with the original patch and applied it to this one, listing that fieldnames is a sequence. Then, I added a link to the collections abstract on that instance of the word sequence. I did this for both DictReader and DictWriter as I did in the original patch. Would this be what you think is needed? ---------- Added file: http://bugs.python.org/file34136/DictReader_DictWriter_python3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 19:20:01 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Feb 2014 18:20:01 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392747601.84.0.710597581764.issue20628@psf.upfronthosting.co.za> R. David Murray added the comment: This looks pretty good. In the DictReader part, it might be good to add something analogous to the DictWriter clarifying what the order of the sequence means. Something like "a :mod:`sequence ` whose elements are associated with the fields of the input data in order, and which become the keys of the resulting dictionary". If think you have a way to improve that wording, please try, as I'm not entirely happy with it :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 19:25:07 2014 From: report at bugs.python.org (flashk) Date: Tue, 18 Feb 2014 18:25:07 +0000 Subject: [docs] [issue20677] Minor typo in enum docs Message-ID: <1392747907.16.0.237533745689.issue20677@psf.upfronthosting.co.za> New submission from flashk: On line 142 in the enum library documentation, I believe the text is missing "you". It should be changed from: "If have an enum member and need its name or value:" to: "If you have an enum member and need its name or value:" ---------- assignee: docs at python components: Documentation messages: 211536 nosy: docs at python, flashk priority: normal severity: normal status: open title: Minor typo in enum docs type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From cocoatomo77 at gmail.com Tue Feb 18 20:01:05 2014 From: cocoatomo77 at gmail.com (tomo cocoa) Date: Wed, 19 Feb 2014 04:01:05 +0900 Subject: [docs] mistyping on a document Message-ID: Hello, I am a Japanese translator on Python documents. The character "i" on the tail of the PyModule_GetDef description may be mistyped. http://docs.python.org/3.3/c-api/module.html#PyModule_GetDef Thanks, cocoatomo -- class Cocoatomo: name = 'cocoatomo' email_address = 'cocoatomo77 at gmail.com' twitter_id = '@cocoatomo' -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Tue Feb 18 21:20:02 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 18 Feb 2014 20:20:02 +0000 Subject: [docs] [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1392754802.21.0.512909930673.issue12691@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I fixed the assert and dropped first iter compat-mode token bugs one-by-one by writing narrow unittests that fail and code that makes them pass. I am now working on the '\' continuation issue. That is the subject of #9974, which has a nearly identical patch. Where it differs from yours, I will choose on the basis of tests. Any further discussion of this bug should be on that issue. I appreciate the warning that the full mode is undertested, so I need to be concerned about breaking untested functionality that works. That was not so much a concern with the first two issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 21:25:50 2014 From: report at bugs.python.org (Sean Rodman) Date: Tue, 18 Feb 2014 20:25:50 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392755150.8.0.556778824949.issue20628@psf.upfronthosting.co.za> Sean Rodman added the comment: What about if I put "The *fieldnames* parameter is a :mod:`sequence ` whose elements are associated with the fields of the input data in order. These elements become the keys of the resulting dictionary." It contains all of the information that you have but it feels more to the point when you separate it as two sentences. The attached patch reflect these changes. ---------- Added file: http://bugs.python.org/file34139/DictReader_DictWriter_python3_NewWording.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 21:25:59 2014 From: report at bugs.python.org (Sean Rodman) Date: Tue, 18 Feb 2014 20:25:59 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392755159.26.0.807519876857.issue20628@psf.upfronthosting.co.za> Changes by Sean Rodman : Removed file: http://bugs.python.org/file34136/DictReader_DictWriter_python3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 21:48:09 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 18 Feb 2014 20:48:09 +0000 Subject: [docs] [issue15871] Online docs: make index search always available. In-Reply-To: <1346951666.84.0.523873961498.issue15871@psf.upfronthosting.co.za> Message-ID: <1392756489.88.0.951397104952.issue15871@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I believe I somewhere proposed that there be an option to get more *if one wanted more*. The real waste is not using the available index resources. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 22:16:23 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 18 Feb 2014 21:16:23 +0000 Subject: [docs] [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1392758183.3.0.67245663126.issue12691@psf.upfronthosting.co.za> Gareth Rees added the comment: Thanks for your work on this, Terry. I apologise for the complexity of my original report, and will try not to do it again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 22:45:57 2014 From: report at bugs.python.org (Berker Peksag) Date: Tue, 18 Feb 2014 21:45:57 +0000 Subject: [docs] [issue20677] Minor typo in enum docs In-Reply-To: <1392747907.16.0.237533745689.issue20677@psf.upfronthosting.co.za> Message-ID: <1392759957.75.0.330155930014.issue20677@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +ethan.furman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 18 23:44:03 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Feb 2014 22:44:03 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392763443.53.0.922700669115.issue20628@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, that does sound better. If you can make an equivalent 2.7 patch I will apply them. ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 19 02:02:38 2014 From: report at bugs.python.org (Sean Rodman) Date: Wed, 19 Feb 2014 01:02:38 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392771758.9.0.865108540862.issue20628@psf.upfronthosting.co.za> Sean Rodman added the comment: Here is the equivalent 2.7 patch. I used a relative link with the format `sequence `_ in order to link to the collections page. I tried to use the reference syntax but I could find the subsection that I needed to reference in the documentation. If you would like for me to go that route I don't mind trying to figure it out, this is just the way I was able to get the documentation compiling and working correctly. ---------- Added file: http://bugs.python.org/file34141/DictReader_DictWriter_python2_NewWording.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 19 02:04:29 2014 From: report at bugs.python.org (Sean Rodman) Date: Wed, 19 Feb 2014 01:04:29 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392771869.48.0.0564887907868.issue20628@psf.upfronthosting.co.za> Sean Rodman added the comment: That is supposed to say I couldn't find the subsection that I needed to reference in the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 19 03:55:20 2014 From: report at bugs.python.org (Saimadhav Heblikar) Date: Wed, 19 Feb 2014 02:55:20 +0000 Subject: [docs] [issue20677] Minor typo in enum docs In-Reply-To: <1392747907.16.0.237533745689.issue20677@psf.upfronthosting.co.za> Message-ID: <1392778520.74.0.578558494478.issue20677@psf.upfronthosting.co.za> Saimadhav Heblikar added the comment: Corrects the typo. ---------- keywords: +patch nosy: +sahutd Added file: http://bugs.python.org/file34142/enum-typo-fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 19 09:27:32 2014 From: report at bugs.python.org (Karl Richter) Date: Wed, 19 Feb 2014 08:27:32 +0000 Subject: [docs] [issue20683] [doc] Ease comprehension of section 9.2 of docs for Python 2 and 3 with example Message-ID: <1392798452.78.0.903259935516.issue20683@psf.upfronthosting.co.za> New submission from Karl Richter: The explanation of namespaces in section 9.2 in documentation (http://docs.python.org/3/tutorial/classes.html#python-scopes-and-namespaces) is just so complicated without (at least one tiny) example. The example would ease the comprehension of the section by a high factor. ---------- assignee: docs at python components: Documentation messages: 211607 nosy: docs at python, krichter priority: normal severity: normal status: open title: [doc] Ease comprehension of section 9.2 of docs for Python 2 and 3 with example type: enhancement versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 19 17:24:55 2014 From: report at bugs.python.org (Daniel U. Thibault) Date: Wed, 19 Feb 2014 16:24:55 +0000 Subject: [docs] [issue20686] Confusing statement Message-ID: <1392827095.92.0.836578340147.issue20686@psf.upfronthosting.co.za> New submission from Daniel U. Thibault: Near the end of 3.1.3 http://docs.python.org/2/tutorial/introduction.html#unicode-strings you can read: "When a Unicode string is printed, written to a file, or converted with str(), conversion takes place using this default encoding." This can be interpreted as stating that stating that printing a Unicode string (using the print function or the shell's default print behaviour) results in ASCII printout. It can likewise be interpreted as stating that any write of a Unicode string to a file converts the string to ASCII. Experimentation shows this is not true. Perhaps you meant something like this: "When a Unicode string is converted with str() in order to be printed or written to a file, conversion takes place using this default encoding." Grammatical comments: In the statement "When a Unicode string is printed, written to a file, or converted with str(), conversion takes place using this default encoding.", the ", or" puts the three elements of the enumeration on the same level (respectively "printed", "written to a file", and "converted with str()"). The confusion seems to arise because "with str()" was meant to apply to the list as a whole, not just its last element. ---------- assignee: docs at python components: Documentation messages: 211627 nosy: Daniel.U..Thibault, docs at python priority: normal severity: normal status: open title: Confusing statement type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 19 19:16:41 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Feb 2014 18:16:41 +0000 Subject: [docs] [issue20686] Confusing statement In-Reply-To: <1392827095.92.0.836578340147.issue20686@psf.upfronthosting.co.za> Message-ID: <1392833801.89.0.628292693467.issue20686@psf.upfronthosting.co.za> R. David Murray added the comment: It seems to me the statement is correct as written. What experiments indicate otherwise? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 19 19:25:06 2014 From: report at bugs.python.org (Georg Brandl) Date: Wed, 19 Feb 2014 18:25:06 +0000 Subject: [docs] [issue20686] Confusing statement In-Reply-To: <1392827095.92.0.836578340147.issue20686@psf.upfronthosting.co.za> Message-ID: <1392834306.75.0.24734605433.issue20686@psf.upfronthosting.co.za> Georg Brandl added the comment: The only problem I can see is that "print" uses the console encoding. For files and str(), the comment is correct for Python 2. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 19 23:50:24 2014 From: report at bugs.python.org (Jon Shemitz) Date: Wed, 19 Feb 2014 22:50:24 +0000 Subject: [docs] [issue20692] Tutorial section 9.4 Message-ID: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za> New submission from Jon Shemitz: The tutorial says "Each value is an object, and therefore has a class (also called its type). It is stored as object.__class__." So, I tried >>> 3.__class__ File "", line 1 3.__class__ ^ SyntaxError: invalid syntax Yet, "foo".__class__ worked, as did 3j.__class__ and 3.5.__class__. When my son (!) suggested that I try (3).__class__, I did indeed get , while (3,).__class__ gave . This *looks like* a minor error in the parser, where seeing \d+\. puts it in a state where it expects \d+ and it can't handle \w+ This may be the sort of thing that only a newbie would even think to try, so may not be worth fixing. If so, it may be worth mentioning in the tutorial. ---------- assignee: docs at python components: Documentation, Interpreter Core messages: 211670 nosy: Jon.Shemitz, docs at python priority: normal severity: normal status: open title: Tutorial section 9.4 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 00:59:47 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Feb 2014 23:59:47 +0000 Subject: [docs] [issue20692] Tutorial section 9.4 In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za> Message-ID: <1392854387.93.0.542975779821.issue20692@psf.upfronthosting.co.za> R. David Murray added the comment: It's actually almost a FAQ at this point. The answer is that because of the way the parser works (it's a relatively simple parser, and we want to keep it that way), the tokenizer sees the '.' as making the token a float, and '3.__class__' is not a valid float token. So you have to precede the period by something that allows the tokenizer to know it isn't a decimal point. Parens is one way. Believe it or not, a space is another: >>> 3 .__class__ ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 01:01:10 2014 From: report at bugs.python.org (Nick Timkovich) Date: Thu, 20 Feb 2014 00:01:10 +0000 Subject: [docs] [issue20693] Sidebar scrolls down 2x as fast as page content Message-ID: <1392854470.16.0.730014647108.issue20693@psf.upfronthosting.co.za> New submission from Nick Timkovich: When scrolling down in the Python 3.4 docs (e.g. http://docs.python.org/3.4/library/index.html ) the Sphinx sidebar's top value increases twice as fast as the user moves down the page, resulting in it "running away". I don't know sufficient JS to identify the problem, but I'm guessing it's somewhere in the sidebar.js:scroll_sidebar() function or whatever might configure it. (apologies, I *think* I may have sent a similar mail to the docs list already) ---------- assignee: docs at python components: Documentation files: py34sidebar.png messages: 211675 nosy: docs at python, nicktimko priority: normal severity: normal status: open title: Sidebar scrolls down 2x as fast as page content type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file34149/py34sidebar.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 01:04:23 2014 From: report at bugs.python.org (Jon Shemitz) Date: Thu, 20 Feb 2014 00:04:23 +0000 Subject: [docs] [issue20692] Tutorial section 9.4 In-Reply-To: <1392854387.93.0.542975779821.issue20692@psf.upfronthosting.co.za> Message-ID: Jon Shemitz added the comment: That makes sense. Perhaps, then, the tutorial should include the FAQ? (I can't be the only person who thought to try this.) On Wed, Feb 19, 2014 at 3:59 PM, R. David Murray wrote: > > R. David Murray added the comment: > > It's actually almost a FAQ at this point. The answer is that because of > the way the parser works (it's a relatively simple parser, and we want to > keep it that way), the tokenizer sees the '.' as making the token a float, > and '3.__class__' is not a valid float token. So you have to precede the > period by something that allows the tokenizer to know it isn't a decimal > point. Parens is one way. Believe it or not, a space is another: > > >>> 3 .__class__ > > > ---------- > nosy: +r.david.murray > resolution: -> invalid > stage: -> committed/rejected > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 01:38:24 2014 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Feb 2014 00:38:24 +0000 Subject: [docs] [issue20694] asyncio.docs: Document subprocess_exec and subprocess_shell Message-ID: <1392856704.93.0.244775404101.issue20694@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- assignee: docs at python components: Documentation nosy: docs at python, gvanrossum, haypo, larry, yselivanov priority: release blocker severity: normal status: open title: asyncio.docs: Document subprocess_exec and subprocess_shell type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 01:39:01 2014 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Feb 2014 00:39:01 +0000 Subject: [docs] [issue20694] asyncio.docs: Document subprocess_exec and subprocess_shell Message-ID: <1392856741.43.0.87091314637.issue20694@psf.upfronthosting.co.za> New submission from Yury Selivanov: (I'd document this myself, but I lack the experience of working with these functions) ---------- _______________________________________ Python tracker _______________________________________ From prometheus235 at gmail.com Thu Feb 20 00:30:43 2014 From: prometheus235 at gmail.com (Nick Timkovich) Date: Wed, 19 Feb 2014 17:30:43 -0600 Subject: [docs] Sidebar scrolls down 2x as fast as page Message-ID: A peculiar bug with the 3.4 documentation: when scrolling down the page, the sidebar scrolls down the page faster than the window, leading to it dropping off the screen entirely. This doesn't happen in the 3.3 docs. Happens on both IE 10 (Win7) and Chrome (Win7 and Ubuntu 12.04). Nick From report at bugs.python.org Thu Feb 20 05:24:04 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 20 Feb 2014 04:24:04 +0000 Subject: [docs] [issue20693] Sidebar scrolls down 2x as fast as page content In-Reply-To: <1392854470.16.0.730014647108.issue20693@psf.upfronthosting.co.za> Message-ID: <1392870244.78.0.654805329337.issue20693@psf.upfronthosting.co.za> Zachary Ware added the comment: I noticed this earlier today as well, but didn't have a chance to report. I also happened to have a week-old doc page still loaded in the next tab over (which didn't have the problem), and noticed that it was marked as being built by Sphinx 1.2, whereas today's is Sphinx 1.1.3, which I suspect may have something to do with it since I don't see any other major changes to how the docs are built in recent changesets. Nick: You did report it on docs@, but it was held for moderation since you aren't subscribed. It has now been approved. ---------- nosy: +georg.brandl, zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 05:44:33 2014 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 20 Feb 2014 04:44:33 +0000 Subject: [docs] [issue20693] Sidebar scrolls down 2x as fast as page content In-Reply-To: <1392854470.16.0.730014647108.issue20693@psf.upfronthosting.co.za> Message-ID: <1392871473.26.0.296607372393.issue20693@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 07:16:10 2014 From: report at bugs.python.org (Larry Hastings) Date: Thu, 20 Feb 2014 06:16:10 +0000 Subject: [docs] [issue20199] status of module_for_loader and utils._module_to_load In-Reply-To: <1389233222.57.0.373422642128.issue20199@psf.upfronthosting.co.za> Message-ID: <1392876970.51.0.0436226789975.issue20199@psf.upfronthosting.co.za> Larry Hastings added the comment: Are there still changes needed for 3.4.0? Or is 3.4.0 okay? This is marked as "release blocker". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 13:32:38 2014 From: report at bugs.python.org (Daniel U. Thibault) Date: Thu, 20 Feb 2014 12:32:38 +0000 Subject: [docs] [issue20686] Confusing statement In-Reply-To: <1392827095.92.0.836578340147.issue20686@psf.upfronthosting.co.za> Message-ID: <1392899558.11.0.615761031049.issue20686@psf.upfronthosting.co.za> Daniel U. Thibault added the comment: "It seems to me the statement is correct as written. What experiments indicate otherwise?" Here's a simple one: >>> print ?1? The guillemets are certainly not ASCII (Unicode AB and BB, well outside ASCII's 7F upper limit) but are rendered as guillemets. (Guillemets are easy for me 'cause I use a French keyboard) I haven't actually checked yet what happens when writing to a file. If Python is unable to write anything but ASCII to file, it becomes nearly useless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 15:14:56 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 20 Feb 2014 14:14:56 +0000 Subject: [docs] [issue20199] status of module_for_loader and utils._module_to_load In-Reply-To: <1389233222.57.0.373422642128.issue20199@psf.upfronthosting.co.za> Message-ID: <1392905696.32.0.259264835658.issue20199@psf.upfronthosting.co.za> R. David Murray added the comment: I think the docs are accurate (but I haven't been *all* the way down the NEWS chain yet). I have a fix for whatsnew in my buffer that I haven't applied yet. Probably this weekend. But as a doc change, I don't see this as a release blocker anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 15:22:26 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 20 Feb 2014 14:22:26 +0000 Subject: [docs] [issue20686] Confusing statement In-Reply-To: <1392827095.92.0.836578340147.issue20686@psf.upfronthosting.co.za> Message-ID: <1392906146.82.0.696557538908.issue20686@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks, yes, Georg already pointed out the issue with print. I suppose that this is something that changed at some point in Python2's history but this bit of the docs was not updated. Python can write anything to a file, you just have to tell it what encoding to use, either by explicitly encoding the unicode to binary before writing it to the file, or by using codecs.open and specifying an encoding for the file. (This is all much easier in python3, where the unicode support is part of the core of the language.) ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 16:29:20 2014 From: report at bugs.python.org (David Felix) Date: Thu, 20 Feb 2014 15:29:20 +0000 Subject: [docs] [issue20700] Docs sidebar scrolls strangely in 3.4 docs Message-ID: <1392910160.23.0.342984738746.issue20700@psf.upfronthosting.co.za> New submission from David Felix: On longer documentation pages, the sidebar is scrolling out of view and in an unexpected manner when the main page is scrolled. Seems to only affect 3.4 docs, but I'm not positive. http://docs.python.org/3.4/whatsnew/3.4.html is a good example. Using Firefox 27.0.1 I view this page and scroll down. When I scroll down in the main area (the page is moving upwards in my view) past the summary section, the left side bar/navigation begins scrolling in the opposite direction, presumably to keep up with my scrolling. Its movement is not proportional to my downward scrolling and it is quickly lost "below" the view. ---------- assignee: docs at python components: Documentation messages: 211729 nosy: David.Felix, docs at python priority: normal severity: normal status: open title: Docs sidebar scrolls strangely in 3.4 docs versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From cocoatomo77 at gmail.com Thu Feb 20 16:26:20 2014 From: cocoatomo77 at gmail.com (tomo cocoa) Date: Fri, 21 Feb 2014 00:26:20 +0900 Subject: [docs] typo in the type object document Message-ID: Hello, I'm a Japanese translator of Python documents. I found a typo on http://docs.python.org/3.3/c-api/typeobj.html#PyTypeObject.tp_print A sentence "the instance should be printed the same was as" should be "the instance should be printed the same way as". Thank you, cocoatomo -- class Cocoatomo: name = 'cocoatomo' email_address = 'cocoatomo77 at gmail.com' twitter_id = '@cocoatomo' -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Thu Feb 20 16:43:21 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 20 Feb 2014 15:43:21 +0000 Subject: [docs] [issue20693] Sidebar scrolls down 2x as fast as page content In-Reply-To: <1392854470.16.0.730014647108.issue20693@psf.upfronthosting.co.za> Message-ID: <1392911001.33.0.500582028331.issue20693@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +David.Felix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 16:43:27 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 20 Feb 2014 15:43:27 +0000 Subject: [docs] [issue20700] Docs sidebar scrolls strangely in 3.4 docs In-Reply-To: <1392910160.23.0.342984738746.issue20700@psf.upfronthosting.co.za> Message-ID: <1392911007.74.0.734079845031.issue20700@psf.upfronthosting.co.za> Zachary Ware added the comment: Hi David, Thanks for the report, but this has already been reported in issue20693. I've added you to the nosy list on that issue. ---------- assignee: docs at python -> nosy: +zach.ware resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Sidebar scrolls down 2x as fast as page content _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 17:01:39 2014 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 20 Feb 2014 16:01:39 +0000 Subject: [docs] [issue20693] Sidebar scrolls down 2x as fast as page content In-Reply-To: <1392854470.16.0.730014647108.issue20693@psf.upfronthosting.co.za> Message-ID: <1392912099.05.0.157818591106.issue20693@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, pitrou stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 17:11:25 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 20 Feb 2014 16:11:25 +0000 Subject: [docs] [issue20701] warning in compileall.rst Message-ID: <1392912685.12.0.93082248857.issue20701@psf.upfronthosting.co.za> New submission from Antoine Pitrou: When building the docs, I get the following message: /home/antoine/cpython/default/Doc/library/compileall.rst:23: WARNING: Malformed option description u'[directory|file]...', should look like "-opt args", "--opt args" or "/opt args" ---------- assignee: docs at python components: Documentation messages: 211733 nosy: docs at python, pitrou priority: normal severity: normal status: open title: warning in compileall.rst type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 17:11:51 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 20 Feb 2014 16:11:51 +0000 Subject: [docs] [issue20702] warning in cmdline.rst Message-ID: <1392912711.56.0.068160127769.issue20702@psf.upfronthosting.co.za> New submission from Antoine Pitrou: When building the docs, I get the following message: /home/antoine/cpython/default/Doc/using/cmdline.rst:167: WARNING: Malformed option description u'-?', should look like "-opt args", "--opt args" or "/opt args" ---------- assignee: docs at python components: Documentation messages: 211734 nosy: docs at python, pitrou priority: normal severity: normal status: open title: warning in cmdline.rst versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 17:12:54 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 20 Feb 2014 16:12:54 +0000 Subject: [docs] [issue20693] Sidebar scrolls down 2x as fast as page content In-Reply-To: <1392854470.16.0.730014647108.issue20693@psf.upfronthosting.co.za> Message-ID: <1392912774.42.0.835265853003.issue20693@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Doesn't seem to happen with a local build of the doc tree, using Sphinx 1.2.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 17:39:22 2014 From: report at bugs.python.org (Sean Rodman) Date: Thu, 20 Feb 2014 16:39:22 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392914362.55.0.700920425811.issue20628@psf.upfronthosting.co.za> Sean Rodman added the comment: I just realized that my two last updates on this ticket could be sort of confusing. So here is what I did for the 2.7 patch. First I copied the wording that I used for the 3.3/4 patch and then I created a relative link using the syntax `sequence `_ because I couldn't find a way to get the :ref: syntax to work correctly. I have applied this patch to the 2.7 branch and compiled the html documentation. When I tested it the link does work correctly. It goes to the collections page of the documentation. If you have time could you review the patch for 2.7 for me? (The patch is named DictReader_DictWriter_python2_NewWording.patch.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 18:30:02 2014 From: report at bugs.python.org (R. David Murray) Date: Thu, 20 Feb 2014 17:30:02 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392917402.39.0.824058059107.issue20628@psf.upfronthosting.co.za> R. David Murray added the comment: I figured out what you meant, but thanks for the clarification. The section of interest in 2.7 is near the bottom of the page you linked to. It already has a Sphinx section reference (collections-abstract-base-classes), so you can use :ref: to link to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 20:37:55 2014 From: report at bugs.python.org (Sean Rodman) Date: Thu, 20 Feb 2014 19:37:55 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392925075.21.0.730804559841.issue20628@psf.upfronthosting.co.za> Sean Rodman added the comment: Great! Thank you for the reference name. I have changed the patch to use a ref link. Here is the new patch. ---------- Added file: http://bugs.python.org/file34155/DictReader_DictWriter_python2_ref.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 20:38:05 2014 From: report at bugs.python.org (Sean Rodman) Date: Thu, 20 Feb 2014 19:38:05 +0000 Subject: [docs] [issue20628] csv.DictReader In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1392925085.53.0.688349170887.issue20628@psf.upfronthosting.co.za> Changes by Sean Rodman : Removed file: http://bugs.python.org/file34141/DictReader_DictWriter_python2_NewWording.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 23:27:08 2014 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Feb 2014 22:27:08 +0000 Subject: [docs] [issue20694] asyncio.docs: Document subprocess_exec and subprocess_shell In-Reply-To: <1392856741.43.0.87091314637.issue20694@psf.upfronthosting.co.za> Message-ID: <1392935228.91.0.324305852437.issue20694@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 23:50:06 2014 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Feb 2014 22:50:06 +0000 Subject: [docs] [issue20694] asyncio.docs: Document subprocess_exec and subprocess_shell In-Reply-To: <1392856741.43.0.87091314637.issue20694@psf.upfronthosting.co.za> Message-ID: <1392936606.61.0.15080225746.issue20694@psf.upfronthosting.co.za> Yury Selivanov added the comment: Patch is attached, please review. ---------- keywords: +patch Added file: http://bugs.python.org/file34156/asyncio_subp_docs_01.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 23:57:36 2014 From: report at bugs.python.org (Jan-Philip Gehrcke) Date: Thu, 20 Feb 2014 22:57:36 +0000 Subject: [docs] [issue20709] os.utime(path_to_directory): wrong documentation for Windows. Message-ID: <1392937056.04.0.541478480244.issue20709@psf.upfronthosting.co.za> New submission from Jan-Philip Gehrcke: The os.utime() docs for Python 2 (http://docs.python.org/2/library/os.html#os.utime) and 3 (http://docs.python.org/3/library/os.html#os.utime) both contain the sentence "Whether a directory can be given for path depends on whether the operating system implements directories as files (for example, *Windows does not*)" "Windoes does not" is wrong. CPython 2.7 on Windows 7: >>> os.utime(".", (100, 100)) >>> os.stat(".").st_mtime 100.0 We should - either name a specific system for which this does not work - or remove this example. Windows XP and newer support this operation via SetFileTime (http://msdn.microsoft.com/en-us/library/windows/desktop/ms724933%28v=vs.85%29.aspx): "Sets the date and time that the specified file or directory was created, last accessed, or last modified." I have grepped myself through a couple of CPython source trees and found posixmodule.c: if (!SetFileTime(hFile, NULL, &atime, &mtime) in 2.5, 2.6, 2.7. I guess the statement comes from 2.4 times, where `SetFileTime` only appears in `PC/bdist_wininst/extract.c`. So, do we just remove the hint or does someone have an example at hand for which combination of Python and platform this does not work for directories? Once we have a decision, I will be happy to provide the mini patch. ---------- assignee: docs at python components: Documentation messages: 211760 nosy: docs at python, jgehrcke priority: normal severity: normal status: open title: os.utime(path_to_directory): wrong documentation for Windows. versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 20 23:58:58 2014 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Feb 2014 22:58:58 +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: <1392937138.93.0.891253572082.issue20709@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +larry _______________________________________ Python tracker _______________________________________ From guido at python.org Fri Feb 21 00:32:26 2014 From: guido at python.org (guido at python.org) Date: Thu, 20 Feb 2014 23:32:26 -0000 Subject: [docs] asyncio.docs: Document subprocess_exec and subprocess_shell (issue 20694) Message-ID: <20140220233226.7428.53480@psf.upfronthosting.co.za> http://bugs.python.org/review/20694/diff/11109/Doc/library/asyncio-eventloop.rst File Doc/library/asyncio-eventloop.rst (right): http://bugs.python.org/review/20694/diff/11109/Doc/library/asyncio-eventloop.rst#newcode470 Doc/library/asyncio-eventloop.rst:470: .. method:: BaseEventLoop.subprocess_exec(protocol_factory, \*args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=False, shell=False, bufsize=0, \*\*kwargs) Please remove universal_newlines, shell and bufsize from this signature (and also from the next one). http://bugs.python.org/review/20694/diff/11109/Doc/library/asyncio-eventloop.rst#newcode479 Doc/library/asyncio-eventloop.rst:479: list of strings, :func:`subprocess_exec` takes multiple string arguments. Maybe add "similar to os.execl()"? http://bugs.python.org/review/20694/diff/11109/Doc/library/asyncio-eventloop.rst#newcode503 Doc/library/asyncio-eventloop.rst:503: * *bufsize*: The buffer size to be used when creating a pipe; this is I don't actually see a use case for setting this nonzero on any platform, as buffered I/O doesn't mesh well with async I/O. I'd rather not call it out in the argument list, but instead add a note to the next bullet saying "(however, *bufsize* should be omitted or zero)". The same is true for shell and universal_newlines -- they are only present in the signature so we can explicitly check that they aren't set to different values than what we need. Maybe it makes more sense to give an explicit list of the parameters that *do* make sense to pass to Popen? http://bugs.python.org/review/20694/diff/11109/Doc/library/asyncio-eventloop.rst#newcode525 Doc/library/asyncio-eventloop.rst:525: the arguments. the remaining arguments. http://bugs.python.org/review/20694/ From report at bugs.python.org Fri Feb 21 00:47:13 2014 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Feb 2014 23:47:13 +0000 Subject: [docs] [issue20694] asyncio.docs: Document subprocess_exec and subprocess_shell In-Reply-To: <1392856741.43.0.87091314637.issue20694@psf.upfronthosting.co.za> Message-ID: <1392940033.71.0.469667269555.issue20694@psf.upfronthosting.co.za> Changes by Yury Selivanov : Added file: http://bugs.python.org/file34160/asyncio_subp_docs_02.patch _______________________________________ Python tracker _______________________________________ From yselivanov.ml at gmail.com Fri Feb 21 00:47:30 2014 From: yselivanov.ml at gmail.com (yselivanov.ml at gmail.com) Date: Thu, 20 Feb 2014 23:47:30 -0000 Subject: [docs] asyncio.docs: Document subprocess_exec and subprocess_shell (issue 20694) Message-ID: <20140220234730.7428.70592@psf.upfronthosting.co.za> Reviewers: gvanrossum, Message: Second patch version is uploaded. http://bugs.python.org/review/20694/diff/11109/Doc/library/asyncio-eventloop.rst File Doc/library/asyncio-eventloop.rst (right): http://bugs.python.org/review/20694/diff/11109/Doc/library/asyncio-eventloop.rst#newcode479 Doc/library/asyncio-eventloop.rst:479: list of strings, :func:`subprocess_exec` takes multiple string arguments. On 2014/02/21 00:32:26, gvanrossum wrote: > Maybe add "similar to os.execl()"? I think it's too low-level and not really widely used/known to add reference to it, but up to you. http://bugs.python.org/review/20694/diff/11109/Doc/library/asyncio-eventloop.rst#newcode503 Doc/library/asyncio-eventloop.rst:503: * *bufsize*: The buffer size to be used when creating a pipe; this is On 2014/02/21 00:32:26, gvanrossum wrote: > I don't actually see a use case for setting this nonzero on any platform, as > buffered I/O doesn't mesh well with async I/O. I'd rather not call it out in the > argument list, but instead add a note to the next bullet saying "(however, > *bufsize* should be omitted or zero)". The same is true for shell and > universal_newlines -- they are only present in the signature so we can > explicitly check that they aren't set to different values than what we need. OK > Maybe it makes more sense to give an explicit list of the parameters that *do* > make sense to pass to Popen? Maybe you can draft a list? Please review this at http://bugs.python.org/review/20694/ Affected files: Doc/library/asyncio-eventloop.rst diff -r cd23d0c3f850 Doc/library/asyncio-eventloop.rst --- a/Doc/library/asyncio-eventloop.rst Thu Feb 20 16:20:44 2014 -0500 +++ b/Doc/library/asyncio-eventloop.rst Thu Feb 20 17:49:34 2014 -0500 @@ -469,7 +469,47 @@ .. method:: BaseEventLoop.subprocess_exec(protocol_factory, \*args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=False, shell=False, bufsize=0, \*\*kwargs) - XXX + Create a subprocess from one or more string arguments, where the first string + specifies the program to execute, and the remaining strings specify the + program's arguments. (Thus, together the string arguments form the + ``sys.argv`` value of the program, assuming it is a Python script.) This is + similar to the standard library :class:`subprocess.Popen` class called with + shell=False and the list of strings passed as the first argument; + however, where :class:`~subprocess.Popen` takes a single argument which is + list of strings, :func:`subprocess_exec` takes multiple string arguments. + + Other parameters: + + * *stdin*: Either a file-like object representing the pipe to be connected + to the subprocess's standard input stream using + :meth:`~BaseEventLoop.connect_write_pipe`, or the constant + :const:`subprocess.PIPE` (the default). By default a new pipe will be + created and connected. + + * *stdout*: Either a file-like object representing the pipe to be connected + to the subprocess's standard output stream using + :meth:`~BaseEventLoop.connect_write_pipe`, or the constant + :const:`subprocess.PIPE` (the default). By default a new pipe will be + created and connected. + + * *stderr*: Either a file-like object representing the pipe to be connected + to the subprocess's standard error stream using + :meth:`~BaseEventLoop.connect_read_pipe`, or one of the constants + :const:`subprocess.PIPE` (the default) or :const:`subprocess.STDOUT`. + By default a new pipe will be created and connected. When + :const:`subprocess.STDOUT` is specified, the subprocess's standard error + stream will be connected to the same pipe as the standard output stream. + + * *bufsize*: The buffer size to be used when creating a pipe; this is + passed to :class:`subprocess.Popen`. In the default implementation + this defaults to zero, and on Windows it must be zero; these defaults + deviate from :class:`subprocess.Popen`. + + * All other keyword arguments are passed to :class:`subprocess.Popen` + without interpretation. + + Returns a pair of ``(transport, protocol)``, where *transport* is an + instance of :class:`BaseSubprocessTransport`. This method is a :ref:`coroutine `. @@ -477,7 +517,15 @@ .. method:: BaseEventLoop.subprocess_shell(protocol_factory, cmd, \*, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=False, shell=True, bufsize=0, \*\*kwargs) - XXX + Create a subprocess from *cmd*, which is a string using the platform's + "shell" syntax. This is similar to the standard library + :class:`subprocess.Popen` class called with ``shell=True``. + + See :meth:`~BaseEventLoop.subprocess_exec` for more details about + the arguments. + + Returns a pair of ``(transport, protocol)``, where *transport* is an + instance of :class:`BaseSubprocessTransport`. This method is a :ref:`coroutine `. From guido at python.org Fri Feb 21 00:51:53 2014 From: guido at python.org (guido at python.org) Date: Thu, 20 Feb 2014 23:51:53 -0000 Subject: [docs] asyncio.docs: Document subprocess_exec and subprocess_shell (issue 20694) Message-ID: <20140220235153.18745.84755@psf.upfronthosting.co.za> http://bugs.python.org/review/20694/diff/11109/Doc/library/asyncio-eventloop.rst File Doc/library/asyncio-eventloop.rst (right): http://bugs.python.org/review/20694/diff/11109/Doc/library/asyncio-eventloop.rst#newcode479 Doc/library/asyncio-eventloop.rst:479: list of strings, :func:`subprocess_exec` takes multiple string arguments. On 2014/02/21 00:47:30, Yury Selivanov wrote: > On 2014/02/21 00:32:26, gvanrossum wrote: > > Maybe add "similar to os.execl()"? > > I think it's too low-level and not really widely used/known to add reference to > it, but up to you. OK, NM. http://bugs.python.org/review/20694/diff/11109/Doc/library/asyncio-eventloop.rst#newcode503 Doc/library/asyncio-eventloop.rst:503: * *bufsize*: The buffer size to be used when creating a pipe; this is On 2014/02/21 00:47:30, Yury Selivanov wrote: > On 2014/02/21 00:32:26, gvanrossum wrote: > > I don't actually see a use case for setting this nonzero on any platform, as > > buffered I/O doesn't mesh well with async I/O. I'd rather not call it out in > the > > argument list, but instead add a note to the next bullet saying "(however, > > *bufsize* should be omitted or zero)". The same is true for shell and > > universal_newlines -- they are only present in the signature so we can > > explicitly check that they aren't set to different values than what we need. > > OK > > > Maybe it makes more sense to give an explicit list of the parameters that *do* > > make sense to pass to Popen? > > Maybe you can draft a list? I take it back. They are all extremely obscure (and seem to vary by version). Let's say "except for bufsize, universal_newlines and shell, which should not be specified at all". That we actually allow you to pass redundant values for those will be our little secret. :-) http://bugs.python.org/review/20694/ From report at bugs.python.org Fri Feb 21 00:58:46 2014 From: report at bugs.python.org (Yury Selivanov) Date: Thu, 20 Feb 2014 23:58:46 +0000 Subject: [docs] [issue20694] asyncio.docs: Document subprocess_exec and subprocess_shell In-Reply-To: <1392856741.43.0.87091314637.issue20694@psf.upfronthosting.co.za> Message-ID: <1392940726.03.0.698213716142.issue20694@psf.upfronthosting.co.za> Changes by Yury Selivanov : Added file: http://bugs.python.org/file34161/asyncio_subp_docs_03.patch _______________________________________ Python tracker _______________________________________ From yselivanov.ml at gmail.com Fri Feb 21 01:02:05 2014 From: yselivanov.ml at gmail.com (yselivanov.ml at gmail.com) Date: Fri, 21 Feb 2014 00:02:05 -0000 Subject: [docs] asyncio.docs: Document subprocess_exec and subprocess_shell (issue 20694) Message-ID: <20140221000205.5704.97482@psf.upfronthosting.co.za> http://bugs.python.org/review/20694/diff/11113/Doc/library/asyncio-eventloop.rst File Doc/library/asyncio-eventloop.rst (right): http://bugs.python.org/review/20694/diff/11113/Doc/library/asyncio-eventloop.rst#newcode505 Doc/library/asyncio-eventloop.rst:505: *shell*, which should not be specified at all. OK, please review the final patch before I commit it. http://bugs.python.org/review/20694/ From guido at python.org Fri Feb 21 02:04:10 2014 From: guido at python.org (guido at python.org) Date: Fri, 21 Feb 2014 01:04:10 -0000 Subject: [docs] asyncio.docs: Document subprocess_exec and subprocess_shell (issue 20694) Message-ID: <20140221010410.7428.73796@psf.upfronthosting.co.za> LGTM. http://bugs.python.org/review/20694/ From report at bugs.python.org Fri Feb 21 02:10:43 2014 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Feb 2014 01:10:43 +0000 Subject: [docs] [issue20694] asyncio.docs: Document subprocess_exec and subprocess_shell In-Reply-To: <1392856741.43.0.87091314637.issue20694@psf.upfronthosting.co.za> Message-ID: <3fVZNf2Gdfz7Ljr@mail.python.org> Roundup Robot added the comment: New changeset ec3a70ef759d by Yury Selivanov in branch 'default': asyncio.docs: Document subprocess_exec and subprocess_shell. Issue #20694. http://hg.python.org/cpython/rev/ec3a70ef759d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 21 02:10:54 2014 From: report at bugs.python.org (Yury Selivanov) Date: Fri, 21 Feb 2014 01:10:54 +0000 Subject: [docs] [issue20694] asyncio.docs: Document subprocess_exec and subprocess_shell In-Reply-To: <1392856741.43.0.87091314637.issue20694@psf.upfronthosting.co.za> Message-ID: <1392945054.04.0.867070047099.issue20694@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 21 14:24:07 2014 From: report at bugs.python.org (Devin Jeanpierre) Date: Fri, 21 Feb 2014 13:24:07 +0000 Subject: [docs] [issue20722] newline is (partially) independent of universal newlines; needs to be made more clear in docs Message-ID: <1392989047.5.0.441949548663.issue20722@psf.upfronthosting.co.za> New submission from Devin Jeanpierre: http://docs.python.org/3.4/library/functions.html#open says "newline controls how universal newlines mode works (it only applies to text mode)." My reading of this when I saw it was that newline= doesn't do anything unless universal newlines mode is enabled. This is untrue, and you can infer it's untrue from the following lines, but then the docs appear to contradict themselves. Please fix to say something more along the lines of "newline controls how newlines are read and written. It only applies to text mode." The interactions with universal newlines mode are explained in the following text, so they don't need to be called out upfront. newline does more than just that. ---------- assignee: docs at python components: Documentation messages: 211854 nosy: Devin Jeanpierre, docs at python priority: normal severity: normal status: open title: newline is (partially) independent of universal newlines; needs to be made more clear in docs versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 21 14:26:51 2014 From: report at bugs.python.org (Thomas Wouters) Date: Fri, 21 Feb 2014 13:26:51 +0000 Subject: [docs] [issue20722] newline is (partially) independent of universal newlines; needs to be made more clear in docs In-Reply-To: <1392989047.5.0.441949548663.issue20722@psf.upfronthosting.co.za> Message-ID: <1392989211.45.0.0783702892447.issue20722@psf.upfronthosting.co.za> Thomas Wouters added the comment: Additionally, the deprecation notice for 'U' in the table of modules should mention that the 'U' mode, not universal newlines, is deprecated because it is unnecessary. Or 'controlled by the newline argument' perhaps. ---------- nosy: +twouters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 21 15:43:55 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 21 Feb 2014 14:43:55 +0000 Subject: [docs] [issue20692] Tutorial section 9.4 and FAQ: how to call a method on an int In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za> Message-ID: <1392993835.81.0.246711295438.issue20692@psf.upfronthosting.co.za> R. David Murray added the comment: Upon consideration, I think you are right: we should add a FAQ and link it from the tutorial. ---------- resolution: invalid -> stage: committed/rejected -> needs patch status: closed -> open title: Tutorial section 9.4 -> Tutorial section 9.4 and FAQ: how to call a method on an int _______________________________________ Python tracker _______________________________________ From cocoatomo77 at gmail.com Fri Feb 21 03:23:20 2014 From: cocoatomo77 at gmail.com (tomo cocoa) Date: Fri, 21 Feb 2014 11:23:20 +0900 Subject: [docs] maybe a typo? Message-ID: Hello, I am a Japanese translator of Python documents. In an explanation of tp_print ( http://docs.python.org/3.3/c-api/typeobj.html#PyTypeObject.tp_print), the third paragraph contains words "when an error occurred during the comparison". What does the word "comparison" mean? May tp_print functions contain a comparing operation? Otherwise, it is typo, and should be replaced with an other word, for example, "serialization"? Thank you, cocoatomo -- class Cocoatomo: name = 'cocoatomo' email_address = 'cocoatomo77 at gmail.com' twitter_id = '@cocoatomo' -------------- next part -------------- An HTML attachment was scrubbed... URL: From dlindquist at google.com Fri Feb 21 04:29:40 2014 From: dlindquist at google.com (David Lindquist) Date: Thu, 20 Feb 2014 20:29:40 -0700 Subject: [docs] Better roundrobin itertools recipe, IMHO Message-ID: Greetings! I recently perused the documentation for the itertools module ( http://docs.python.org/2/library/itertools.html), and attempted to understand the examples in the Recipes section. The roundrobin example was particularly vexing me, so I set out to code up an alternative that was more clear and concise. I believe I succeeded and wondered if my code might be a better example for the documentation (with due respect to George Sakkis!). Not only is it fewer lines, it is more straightforward and idiomatic, I think. Plus, it's more than twice as fast to boot (on my machine at least, according to timeit): from itertools import * def roundrobin(*iterables): "roundrobin('ABC', 'D', 'EF') --> A D E B F C" sentinel = object() it = chain.from_iterable(izip_longest(fillvalue=sentinel, *iterables)) return (i for i in it if i is not sentinel) if __name__ == '__main__': import timeit print(timeit.timeit("list(roundrobin('ABC', 'D', 'EF'))", setup="from __main__ import roundrobin")) A typical result from timeit: $ python roundrobin_mine.py 5.45610809326 $ python roundrobin_from_docs.py 13.8604800701 What do you think? Might this version supplant the current one in the documentation? Cheers, David Lindquist -------------- next part -------------- An HTML attachment was scrubbed... URL: From CCC at zurich.ibm.com Fri Feb 21 17:50:29 2014 From: CCC at zurich.ibm.com (Christian C Clauss) Date: Fri, 21 Feb 2014 17:50:29 +0100 Subject: [docs] Compressing the ePub version of Python docs is a mistake Message-ID: Compressing the ePub version of Python docs is a mistake http://docs.python.org/3/download.html makes available ePub versions of Python docs as a .zip or a .tar.bz2 file. Take a standard out of the box iPad and try do download and read either of these files. iOS by default does not know how to decompress these file formats so you can not read the Python docs that you have just downloaded. There are plenty of workarounds but none of them are nearly as cool as reading Python docs. Thanks, CCC - +41-79-799-1210 =================================================== Christian C. Clauss Director of Architecture, Technical Strategy, and Partner Recruitment IBM Software Group, Industry Solutions Mobile: +41-79-799-1210 Email: ccc at zurich.ibm.com Note new mail address!!! External: http://www.ibm.com/software/industry -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.crockey at epitech.eu Fri Feb 21 19:38:51 2014 From: nicolas.crockey at epitech.eu (crocke_n) Date: Fri, 21 Feb 2014 18:38:51 +0000 Subject: [docs] [Bug report] Message-ID: <2be6c2d1cae94d3fa941e88df3509434@DB4PR01MB109.eurprd01.prod.exchangelabs.com> Hello I've just found a bug: when I try to make this operation 65 % (-62) the result should be 3 because my first operand is positive (in order to get precision later), but for python, result is -59. Regards Nicolas Crockey {EPITECH} Toulouse Promotion 2017 Consultant du GameLab Toulouse -------------- next part -------------- An HTML attachment was scrubbed... URL: From wgoulet at gmail.com Fri Feb 21 22:02:09 2014 From: wgoulet at gmail.com (Walter Goulet) Date: Fri, 21 Feb 2014 15:02:09 -0600 Subject: [docs] Recent site redesign broke links to old doc versions Message-ID: Hi, The links to older documentation through www.python.org are broken; http://www.python.org/doc/2.5.1/ returns 404. You can still get to the old versions via docs.python.org, but since the new front page is the main landing point I think that the links should be fixed there. Thanks! Walter From report at bugs.python.org Fri Feb 21 22:40:11 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Feb 2014 21:40:11 +0000 Subject: [docs] [issue20628] Improve doc for csv.DictReader 'fieldnames' parameter In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1393018811.49.0.0868438322094.issue20628@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: csv.DictReader -> Improve doc for csv.DictReader 'fieldnames' parameter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 21 23:29:07 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Feb 2014 22:29:07 +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: <1393021747.18.0.511361303148.issue20683@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- title: [doc] Ease comprehension of section 9.2 of docs for Python 2 and 3 with example -> Add example to tutorial namespace doc, section 9.2 versions: +Python 2.7, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 21 23:53:00 2014 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Feb 2014 22:53:00 +0000 Subject: [docs] [issue20692] Tutorial section 9.4 and FAQ: how to call a method on an int In-Reply-To: <1392850224.09.0.571764135364.issue20692@psf.upfronthosting.co.za> Message-ID: <1393023180.77.0.610258205912.issue20692@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree that the tutorial should somewhere make it clear (possibly with a FAQ link) that int literals must be parenthesized or spaced before .name attribute access because .name is parsed as (.)name. That is a consequence of float literals not requiring a fractional part (unlike some other languages). ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 22 07:33:01 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 22 Feb 2014 06:33:01 +0000 Subject: [docs] [issue20693] Sidebar scrolls down 2x as fast as page content In-Reply-To: <1392854470.16.0.730014647108.issue20693@psf.upfronthosting.co.za> Message-ID: <3fWKV32PCrz7N6T@mail.python.org> Roundup Robot added the comment: New changeset b514339e41ef by Benjamin Peterson in branch '2.7': use sphinx from its own virtualenv (closes #20693) http://hg.python.org/cpython/rev/b514339e41ef ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 22 07:36:58 2014 From: report at bugs.python.org (David Lindquist) Date: Sat, 22 Feb 2014 06:36:58 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe Message-ID: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> New submission from David Lindquist: The roundrobin example in the Recipes section of the itertools documentation (http://docs.python.org/3/library/itertools.html#itertools-recipes) is overly complex. Here is a more straightforward implementation: def roundrobin(*iterables): "roundrobin('ABC', 'D', 'EF') --> A D E B F C" sentinel = object() it = chain.from_iterable(zip_longest(fillvalue=sentinel, *iterables)) return (i for i in it if i is not sentinel) Not only is it one-third the lines of the existing example, benchmarks show it to be more than twice as fast. See attached patch file. ---------- assignee: docs at python components: Documentation files: roundrobin.patch keywords: patch messages: 211907 nosy: david.lindquist, docs at python priority: normal severity: normal status: open title: Improved roundrobin itertools recipe versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file34180/roundrobin.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 22 10:51:14 2014 From: report at bugs.python.org (Ned Deily) Date: Sat, 22 Feb 2014 09:51:14 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393062674.06.0.776918538294.issue20727@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 22 11:13:54 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Feb 2014 10:13:54 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393064034.25.0.792815613627.issue20727@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review versions: -Python 3.1, Python 3.2, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 22 13:57:20 2014 From: report at bugs.python.org (Roger Erens) Date: Sat, 22 Feb 2014 12:57:20 +0000 Subject: [docs] [issue20628] Improve doc for csv.DictReader 'fieldnames' parameter In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1393073840.66.0.361776042944.issue20628@psf.upfronthosting.co.za> Roger Erens added the comment: One more nitpick: is it the sequence [of keys] that identif_ies_ the order, or is it the keys that identif_y_ the order? Not being a native English speaker, I'd opt for the first choice. Thank you both for your meticulous attention for details! ---------- _______________________________________ Python tracker _______________________________________ From bgailer at gmail.com Sat Feb 22 17:20:57 2014 From: bgailer at gmail.com (bob gailer) Date: Sat, 22 Feb 2014 11:20:57 -0500 Subject: [docs] [Bug report] In-Reply-To: <2be6c2d1cae94d3fa941e88df3509434@DB4PR01MB109.eurprd01.prod.exchangelabs.com> References: <2be6c2d1cae94d3fa941e88df3509434@DB4PR01MB109.eurprd01.prod.exchangelabs.com> Message-ID: <5308CE69.7030308@gmail.com> On 2/21/2014 1:38 PM, crocke_n wrote: > > Hello Hi and welcome. This list if for reporting documentation bugs. Your issue is not a documentation issue. > > I've just found a bug: when I try to make this operation > > 65 % (-62) > > the result should be 3 because my first operand is positive (in order to get precision later), but for python, result is -59. > This is not even a bug. Please do some research before reporting bugs. See http://en.wikipedia.org/wiki/Modulo_operation. Note the table labeled Integer modulo operators in various programming languages and see the entry for Python. From report at bugs.python.org Sat Feb 22 20:29:08 2014 From: report at bugs.python.org (Roundup Robot) Date: Sat, 22 Feb 2014 19:29:08 +0000 Subject: [docs] [issue20199] status of module_for_loader and utils._module_to_load In-Reply-To: <1389233222.57.0.373422642128.issue20199@psf.upfronthosting.co.za> Message-ID: <3fWfjb6fCLz7Lk9@mail.python.org> Roundup Robot added the comment: New changeset 8f54f601fd75 by R David Murray in branch 'default': whatsnew: importlib deprecations. http://hg.python.org/cpython/rev/8f54f601fd75 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 22 20:35:04 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 22 Feb 2014 19:35:04 +0000 Subject: [docs] [issue20199] status of module_for_loader and utils._module_to_load In-Reply-To: <1389233222.57.0.373422642128.issue20199@psf.upfronthosting.co.za> Message-ID: <1393097703.94.0.115597192048.issue20199@psf.upfronthosting.co.za> R. David Murray added the comment: I just committed a fix for the importlib deprecations entry, based on the deprecation notes in the docs. There are quite a few methods deprecated in 3.4 because of modulespec, but only a few *sorts* of methods. One possible anomaly (though it looks intentional) is that the importlib.abc.FileLoader exec_module method is deprecated, just like for the other abcs, but unlike the other abcs, there is no replacement exec_module method...instead the deprecation note directs the reader to Loader.exec_module. I'm not familiar enough with importlib to know if that redirection would make sense to a Loader implementor. I'm let one of the imporlib maintainers close this if they agree that I've gotten it right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 22 21:34:58 2014 From: report at bugs.python.org (Elazar Gershuni) Date: Sat, 22 Feb 2014 20:34:58 +0000 Subject: [docs] [issue20733] Typo in itertools docs - "itertool-functions" Message-ID: <1393101298.1.0.906876299112.issue20733@psf.upfronthosting.co.za> New submission from Elazar Gershuni: typo - should be "itertools-functions" instead of "itertool-functions" http://docs.python.org/3.4/library/itertools.html#itertool-functions ---------- assignee: docs at python components: Documentation messages: 211950 nosy: docs at python, elazar priority: normal severity: normal status: open title: Typo in itertools docs - "itertool-functions" versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 22 22:51:06 2014 From: report at bugs.python.org (R. David Murray) Date: Sat, 22 Feb 2014 21:51:06 +0000 Subject: [docs] [issue20733] Typo in itertools docs - "itertool-functions" In-Reply-To: <1393101298.1.0.906876299112.issue20733@psf.upfronthosting.co.za> Message-ID: <1393105866.42.0.0936688033676.issue20733@psf.upfronthosting.co.za> R. David Murray added the comment: I'm not sure there's a problem here. Calling the section "Itertool Functions" is a matter of choice of English phrasing. And given that the section is called that, the label is parallel to it (and in any case is an internal matter). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 22 23:14:00 2014 From: report at bugs.python.org (Elazar Gershuni) Date: Sat, 22 Feb 2014 22:14:00 +0000 Subject: [docs] [issue20733] Typo in itertools docs - "itertool-functions" In-Reply-To: <1393101298.1.0.906876299112.issue20733@psf.upfronthosting.co.za> Message-ID: <1393107240.82.0.974381540511.issue20733@psf.upfronthosting.co.za> Elazar Gershuni added the comment: "itertools" is not English, but the name of the Python library. So it is not plural, and not a matter of choice of English phrasing. In addition, as a section name, it should be "Functions" with a capital F, just like "Itertools Recipes" down there. http://docs.python.org/3.4/library/itertools.html#itertools-recipes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Feb 22 23:16:07 2014 From: report at bugs.python.org (abcdef) Date: Sat, 22 Feb 2014 22:16:07 +0000 Subject: [docs] [issue20735] Documentation: mark stringprep as deprecated Message-ID: <1393107367.35.0.913025016095.issue20735@psf.upfronthosting.co.za> New submission from abcdef: This is a nitpick, but the documentation is not clear whether the stringprep module is deprecated or not. It is listed as "Deprecated" on http://docs.python.org/3.3/py-modindex.html#cap-s but there's no information on http://docs.python.org/3.3/library/stringprep.html. Contrast with http://docs.python.org/3.3/library/optparse.html which has a clear warning. ---------- assignee: docs at python components: Documentation messages: 211964 nosy: abcdef, docs at python priority: normal severity: normal status: open title: Documentation: mark stringprep as deprecated type: enhancement versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 01:10:35 2014 From: report at bugs.python.org (Brett Cannon) Date: Sun, 23 Feb 2014 00:10:35 +0000 Subject: [docs] [issue20199] status of module_for_loader and utils._module_to_load In-Reply-To: <1389233222.57.0.373422642128.issue20199@psf.upfronthosting.co.za> Message-ID: <1393114235.6.0.73348508689.issue20199@psf.upfronthosting.co.za> Brett Cannon added the comment: The importlib.abc.FileLoader deprecation w/o exec_module() makes sense. The load_module() method simply called super().load_module() as the class is fully abstract and only provides get_filename() and get_data() for convenience. And since importlib.abc.Loader doesn't have exec_module() as abstract there's simply no need to define the method. And thanks for doing all of this work to make the What's New doc be so thorough! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 05:30:20 2014 From: report at bugs.python.org (Berker Peksag) Date: Sun, 23 Feb 2014 04:30:20 +0000 Subject: [docs] [issue20735] Documentation: mark stringprep as deprecated In-Reply-To: <1393107367.35.0.913025016095.issue20735@psf.upfronthosting.co.za> Message-ID: <1393129820.97.0.655687042108.issue20735@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 07:56:49 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 23 Feb 2014 06:56:49 +0000 Subject: [docs] [issue20199] status of module_for_loader and utils._module_to_load In-Reply-To: <1389233222.57.0.373422642128.issue20199@psf.upfronthosting.co.za> Message-ID: <1393138609.4.0.968528030997.issue20199@psf.upfronthosting.co.za> Larry Hastings added the comment: I'll cherry-pick 8f54f601fd75. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 08:06:33 2014 From: report at bugs.python.org (Larry Hastings) Date: Sun, 23 Feb 2014 07:06:33 +0000 Subject: [docs] [issue20261] Cannot pickle some objects that have a __getattr__() In-Reply-To: <1389728767.16.0.141259686696.issue20261@psf.upfronthosting.co.za> Message-ID: <1393139192.95.0.52123828345.issue20261@psf.upfronthosting.co.za> Larry Hastings added the comment: My understanding is, this is fixed, and cherry-picked into 3.4. If that's in error please reopen. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 08:10:54 2014 From: report at bugs.python.org (Pavel Kazakov) Date: Sun, 23 Feb 2014 07:10:54 +0000 Subject: [docs] [issue20740] Remove invalid number from squares in introduction section Message-ID: <1393139454.24.0.23441362157.issue20740@psf.upfronthosting.co.za> New submission from Pavel Kazakov: This is probably being nitpicky, but in the introduction section, the squares list include a 2: squares = [1, 2, 4, 9, 16, 25] However, 2 is not a square number (perfect square). So it should be: [1, 4, 9, 16, 25] I've included a patch that removes the 2. ---------- assignee: docs at python components: Documentation files: fix_squares.patch keywords: patch messages: 211982 nosy: docs at python, nullishzero priority: normal severity: normal status: open title: Remove invalid number from squares in introduction section type: enhancement Added file: http://bugs.python.org/file34196/fix_squares.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 08:26:12 2014 From: report at bugs.python.org (Georg Brandl) Date: Sun, 23 Feb 2014 07:26:12 +0000 Subject: [docs] [issue20740] Remove invalid number from squares in introduction section In-Reply-To: <1393139454.24.0.23441362157.issue20740@psf.upfronthosting.co.za> Message-ID: <1393140372.29.0.202557158627.issue20740@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 11:10:11 2014 From: report at bugs.python.org (akira) Date: Sun, 23 Feb 2014 10:10:11 +0000 Subject: [docs] [issue19940] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC In-Reply-To: <1386660552.46.0.291263983729.issue19940@psf.upfronthosting.co.za> Message-ID: <1393150211.15.0.816475636717.issue19940@psf.upfronthosting.co.za> akira added the comment: The point of the locale issue is that "notBefore", "notAfter" strings do not change if your locale changes. You don't need a new regex for each locale. I've attached ssl_cert_time_seconds.py file that contains example cert_time_to_seconds(cert_time) implementation that fixes both the timezone and the locale issues. ---------- Added file: http://bugs.python.org/file34197/ssl_cert_time_seconds.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 13:08:53 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 23 Feb 2014 12:08:53 +0000 Subject: [docs] [issue19940] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC In-Reply-To: <1386660552.46.0.291263983729.issue19940@psf.upfronthosting.co.za> Message-ID: <1393157333.87.0.405087219484.issue19940@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Akira, do you want to write a proper patch with tests? If you are interested, you can take a look at http://docs.python.org/devguide/ You'll also have to sign a contributor's agreement at http://www.python.org/psf/contrib/contrib-form/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 14:57:17 2014 From: report at bugs.python.org (R. David Murray) Date: Sun, 23 Feb 2014 13:57:17 +0000 Subject: [docs] [issue20199] status of module_for_loader and utils._module_to_load In-Reply-To: <1389233222.57.0.373422642128.issue20199@psf.upfronthosting.co.za> Message-ID: <1393163837.84.0.786372461656.issue20199@psf.upfronthosting.co.za> R. David Murray added the comment: What you might want to do instead is wait until just before final (or until I say I am done, if we get that lucky) and copy the whole 3.4 whatsnew file over. I'm up through Alpha 1 in the NEWS file at this point, and I do intend to continue to to work on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 15:52:04 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 23 Feb 2014 14:52:04 +0000 Subject: [docs] [issue20643] Strange dot in documentation (after generator.close) In-Reply-To: <1392587871.68.0.444276628486.issue20643@psf.upfronthosting.co.za> Message-ID: <1393167124.12.0.141789703576.issue20643@psf.upfronthosting.co.za> Ezio Melotti added the comment: Serhiy, you seem to have added that line (in #19190). Was it a mistake or is it supposed to do something? ---------- nosy: +ezio.melotti, serhiy.storchaka stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 16:13:43 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Feb 2014 15:13:43 +0000 Subject: [docs] [issue20677] Minor typo in enum docs In-Reply-To: <1392747907.16.0.237533745689.issue20677@psf.upfronthosting.co.za> Message-ID: <3fX90Q4Pqwz7LjS@mail.python.org> Roundup Robot added the comment: New changeset 569589d3abb5 by Ezio Melotti in branch 'default': #20677: fix typo in enum docs. Patch by Saimadhav Heblikar. http://hg.python.org/cpython/rev/569589d3abb5 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 16:14:15 2014 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 23 Feb 2014 15:14:15 +0000 Subject: [docs] [issue20677] Minor typo in enum docs In-Reply-To: <1392747907.16.0.237533745689.issue20677@psf.upfronthosting.co.za> Message-ID: <1393168455.37.0.0556264019846.issue20677@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 17:52:29 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Feb 2014 16:52:29 +0000 Subject: [docs] [issue20643] Strange dot in documentation (after generator.close) In-Reply-To: <1392587871.68.0.444276628486.issue20643@psf.upfronthosting.co.za> Message-ID: <1393174349.12.0.8955445554.issue20643@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It was supposed to reset current class. Perhaps correct way is to remove this directive (and other "class" directive above) at all. ---------- keywords: +patch nosy: +georg.brandl stage: needs patch -> patch review type: enhancement -> behavior versions: +Python 2.7, Python 3.3 Added file: http://bugs.python.org/file34199/docs_generator_class.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 19:54:20 2014 From: report at bugs.python.org (akira) Date: Sun, 23 Feb 2014 18:54:20 +0000 Subject: [docs] [issue19940] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC In-Reply-To: <1386660552.46.0.291263983729.issue19940@psf.upfronthosting.co.za> Message-ID: <1393181660.16.0.0555684667579.issue19940@psf.upfronthosting.co.za> akira added the comment: Antoine, I've signed the agreement. I've added ssl_cert_time_toseconds.patch with code, tests, and documention updates. ---------- keywords: +patch Added file: http://bugs.python.org/file34201/ssl_cert_time_to_seconds.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 22:13:37 2014 From: report at bugs.python.org (Jakub Wilk) Date: Sun, 23 Feb 2014 21:13:37 +0000 Subject: [docs] [issue20749] shutil.unpack_archive(): security concerns not documented Message-ID: <1393190017.96.0.0939250007559.issue20749@psf.upfronthosting.co.za> New submission from Jakub Wilk: shutil.unpack_archive() uses tarfile.extractall() under the hood, so it's not suitable for unpacking untrusted archives. But this fact is not documented. Please add a security warning to shutil.unpack_archive() documentation. ---------- assignee: docs at python components: Documentation messages: 212029 nosy: docs at python, jwilk priority: normal severity: normal status: open title: shutil.unpack_archive(): security concerns not documented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 22:34:14 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 23 Feb 2014 21:34:14 +0000 Subject: [docs] [issue20735] Documentation: mark stringprep as deprecated In-Reply-To: <1393107367.35.0.913025016095.issue20735@psf.upfronthosting.co.za> Message-ID: <1393191253.96.0.612668125631.issue20735@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm not quite sure why the module is marked as deprecated - IMO it's not deprecated. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 23:13:56 2014 From: report at bugs.python.org (Jan Kaliszewski) Date: Sun, 23 Feb 2014 22:13:56 +0000 Subject: [docs] [issue20751] Misleading examples indDescriptor protocol documentation Message-ID: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> New submission from Jan Kaliszewski: 1. One misleading detail in the descriptor protocol documentation for super bindings is that the following fragment of the http://docs.python.org/reference/datamodel.html#invoking-descriptors page: """ Super Binding If a is an instance of super, then the binding super(B, obj).m() searches obj.__class__.__mro__ for the base class A immediately preceding B and then invokes the descriptor with the call: A.__dict__['m'].__get__(obj, obj.__class__). """ ...introduces the method *call* (".m()") which AFAIK has nothing to do with the actual matter of the description (attribute resolution). Also, the "If *a* is an instance of super" fragment is strange, as *a* is not used in the following sentences at all. I believe the description should be: """ Super Binding If binding to a super instance, super(B, obj).x searches obj.__class__.__mro__ for the base class A immediately preceding B and then invokes the descriptor with the call: A.__dict__['x'].__get__(obj, obj.__class__). """ (using 'x' as the attribute name, as for the other kinds of binding). *** 2. Also, in some earlier fragment of the same page: """ Direct Call The simplest and least common call is when user code directly invokes a descriptor method: x.__get__(a). """ The call x.__get__(a) without the second argument seems to be wrong if __get__ is implemented according to the specification "object.__get__(self, instance, owner)" from the same documentation page. ---------- assignee: docs at python components: Documentation messages: 212035 nosy: docs at python, zuo priority: normal severity: normal status: open title: Misleading examples indDescriptor protocol documentation versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Feb 23 23:51:39 2014 From: report at bugs.python.org (Jan Kaliszewski) Date: Sun, 23 Feb 2014 22:51:39 +0000 Subject: [docs] [issue20751] Misleading examples in the descriptor protocol documentation In-Reply-To: <1393193636.36.0.125202538555.issue20751@psf.upfronthosting.co.za> Message-ID: <1393195899.97.0.458225111134.issue20751@psf.upfronthosting.co.za> Changes by Jan Kaliszewski : ---------- title: Misleading examples indDescriptor protocol documentation -> Misleading examples in the descriptor protocol documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 00:01:29 2014 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Feb 2014 23:01:29 +0000 Subject: [docs] [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <3fXMN81Sshz7N5d@mail.python.org> Roundup Robot added the comment: New changeset 8d6dd02a973f by Terry Jan Reedy in branch '3.3': Issue #20750, Enable roundtrip tests for new 5-tuple untokenize. The http://hg.python.org/cpython/rev/8d6dd02a973f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 03:12:08 2014 From: report at bugs.python.org (Ned Deily) Date: Mon, 24 Feb 2014 02:12:08 +0000 Subject: [docs] [issue20755] 3.3.4: doc build fails on Sphinx < 1.2 In-Reply-To: <1393202024.84.0.959375038368.issue20755@psf.upfronthosting.co.za> Message-ID: <1393207928.6.0.0714458788297.issue20755@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 05:40:41 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Feb 2014 04:40:41 +0000 Subject: [docs] [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <3fXVvX6vb3z7MLw@mail.python.org> Roundup Robot added the comment: New changeset 0f0e9b7d4f1d by Terry Jan Reedy in branch '2.7': Issue #9974: When untokenizing, use row info to insert backslash+newline. http://hg.python.org/cpython/rev/0f0e9b7d4f1d New changeset 24b4cd5695d9 by Terry Jan Reedy in branch '3.3': Issue #9974: When untokenizing, use row info to insert backslash+newline. http://hg.python.org/cpython/rev/24b4cd5695d9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 09:16:25 2014 From: report at bugs.python.org (Georg Brandl) Date: Mon, 24 Feb 2014 08:16:25 +0000 Subject: [docs] [issue20755] 3.3.4: doc build fails on Sphinx < 1.2 In-Reply-To: <1393202024.84.0.959375038368.issue20755@psf.upfronthosting.co.za> Message-ID: <1393229785.34.0.467674412849.issue20755@psf.upfronthosting.co.za> Georg Brandl added the comment: Until 3.4, the docs are meant to be built with the Sphinx versions checked out by "make". Someone might want to port the fix for 1.1.x on the default branch if they are interested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 09:22:55 2014 From: report at bugs.python.org (Georg Brandl) Date: Mon, 24 Feb 2014 08:22:55 +0000 Subject: [docs] [issue20735] Documentation: remove stringprep deprecation mark in docs In-Reply-To: <1393107367.35.0.913025016095.issue20735@psf.upfronthosting.co.za> Message-ID: <1393230175.83.0.467114217765.issue20735@psf.upfronthosting.co.za> Georg Brandl added the comment: Strange, the "deprecated" marker seems to have crept in in revision 20aec9f34598 -- I don't see it in the 2.5 docs. Since Martin is the module author and probably maintainer, I would say this was an accident. ---------- nosy: +georg.brandl title: Documentation: mark stringprep as deprecated -> Documentation: remove stringprep deprecation mark in docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 09:26:26 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Feb 2014 08:26:26 +0000 Subject: [docs] [issue20735] Documentation: remove stringprep deprecation mark in docs In-Reply-To: <1393107367.35.0.913025016095.issue20735@psf.upfronthosting.co.za> Message-ID: <3fXbw16MYJz7Mj0@mail.python.org> Roundup Robot added the comment: New changeset de5d4a60ab95 by Georg Brandl in branch '3.3': Closes #20735: remove erroneous deprecated marker from stringprep docs http://hg.python.org/cpython/rev/de5d4a60ab95 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 09:34:21 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Feb 2014 08:34:21 +0000 Subject: [docs] [issue20755] 3.3.4: doc build fails on Sphinx < 1.2 In-Reply-To: <1393202024.84.0.959375038368.issue20755@psf.upfronthosting.co.za> Message-ID: <3fXc590Vpnz7Mj0@mail.python.org> Roundup Robot added the comment: New changeset 7358ca69f351 by Georg Brandl in branch '3.3': Closes #20755: port sphinx-1.1 fixes from default http://hg.python.org/cpython/rev/7358ca69f351 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 09:37:09 2014 From: report at bugs.python.org (Georg Brandl) Date: Mon, 24 Feb 2014 08:37:09 +0000 Subject: [docs] [issue20693] Sidebar scrolls down 2x as fast as page content In-Reply-To: <1392854470.16.0.730014647108.issue20693@psf.upfronthosting.co.za> Message-ID: <1393231029.28.0.893943100551.issue20693@psf.upfronthosting.co.za> Georg Brandl added the comment: Not quite fixed yet: this will happen with any build using sphinx1.1, which is supposed to be supported now. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 10:13:05 2014 From: report at bugs.python.org (Georg Brandl) Date: Mon, 24 Feb 2014 09:13:05 +0000 Subject: [docs] [issue20693] Sidebar scrolls down 2x as fast as page content In-Reply-To: <1392854470.16.0.730014647108.issue20693@psf.upfronthosting.co.za> Message-ID: <1393233184.98.0.55273955586.issue20693@psf.upfronthosting.co.za> Georg Brandl added the comment: Hmm, I can't reproduce here with 1.1.3. Can someone build the tip docs locally with Sphinx 1.1.3 and try to reproduce? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 10:39:12 2014 From: report at bugs.python.org (=?utf-8?q?Jurko_Gospodneti=C4=87?=) Date: Mon, 24 Feb 2014 09:39:12 +0000 Subject: [docs] [issue20759] unittest.mock documentation typo Message-ID: <1393234752.67.0.021930442298.issue20759@psf.upfronthosting.co.za> New submission from Jurko Gospodneti?: Python unittest.mock documentation has typo: indvidually instead of individually Can be seen in the documentation source file at: http://hg.python.org/releasing/3.4/file/c1f9fbefb237/Doc/library/unittest.mock-examples.rst#l429 ---------- assignee: docs at python components: Documentation messages: 212079 nosy: Jurko.Gospodneti?, docs at python priority: normal severity: normal status: open title: unittest.mock documentation typo versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 12:02:19 2014 From: report at bugs.python.org (=?utf-8?q?Jurko_Gospodneti=C4=87?=) Date: Mon, 24 Feb 2014 11:02:19 +0000 Subject: [docs] [issue20759] unittest.mock documentation typos In-Reply-To: <1393234752.67.0.021930442298.issue20759@psf.upfronthosting.co.za> Message-ID: <1393239739.82.0.376463374728.issue20759@psf.upfronthosting.co.za> Jurko Gospodneti? added the comment: Another related documentation 'bug' - the following wording: > Mock doesn?t create these but instead of raises an > AttributeError. should be changed to something like: > Mock doesn?t create these on demand and raises an AttributeError > instead. Can be seen in the documentation source file at: http://hg.python.org/releasing/3.4/file/c1f9fbefb237/Doc/library/unittest.mock.rst#l960 ---------- title: unittest.mock documentation typo -> unittest.mock documentation typos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 12:14:27 2014 From: report at bugs.python.org (=?utf-8?q?Jurko_Gospodneti=C4=87?=) Date: Mon, 24 Feb 2014 11:14:27 +0000 Subject: [docs] [issue20759] unittest.mock documentation typos In-Reply-To: <1393234752.67.0.021930442298.issue20759@psf.upfronthosting.co.za> Message-ID: <1393240467.64.0.913919564314.issue20759@psf.upfronthosting.co.za> Jurko Gospodneti? added the comment: And another one: 'setttings' should be spelled 'settings' in: http://hg.python.org/releasing/3.4/file/c1f9fbefb237/Doc/library/unittest.mock.rst#l1512 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 15:14:20 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Feb 2014 14:14:20 +0000 Subject: [docs] [issue20733] Typo in itertools docs - "itertool-functions" In-Reply-To: <1393101298.1.0.906876299112.issue20733@psf.upfronthosting.co.za> Message-ID: <1393251260.49.0.642602994665.issue20733@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Elazar, this is a nit and isn't worth changing the section head (that would break any external links to the section). Also, I like the way it reads now (itertools functions is technically correct but sounds odd to my ear). ---------- nosy: +rhettinger resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 15:36:32 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Feb 2014 14:36:32 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393252592.01.0.8480897266.issue20727@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I like the brevity and clarity of your version. If you would like, I can also add your name as the credit for the recipe. It is up to Larry whether this goes in before or after the 3.4 release. ---------- assignee: docs at python -> rhettinger nosy: +larry priority: normal -> low type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 18:21:43 2014 From: report at bugs.python.org (Enrico Bianchi) Date: Mon, 24 Feb 2014 17:21:43 +0000 Subject: [docs] [issue20762] SSLSocket.read() not documented Message-ID: <1393262503.02.0.956219773808.issue20762@psf.upfronthosting.co.za> New submission from Enrico Bianchi: although exists, read() method isn't reported in the SSLSocket documentation. Please, fix it ---------- assignee: docs at python components: Documentation messages: 212115 nosy: docs at python, ebianchi priority: normal severity: normal status: open title: SSLSocket.read() not documented versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 18:22:00 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 24 Feb 2014 17:22:00 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393262520.14.0.597108359234.issue20727@psf.upfronthosting.co.za> Larry Hastings added the comment: Doc changes are fine basically anytime, but I don't want low-priority changes in Lib for 3.4.0. But this would be fine for 3.4.1 if you like, or you could just wait for 3.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 18:26:24 2014 From: report at bugs.python.org (R. David Murray) Date: Mon, 24 Feb 2014 17:26:24 +0000 Subject: [docs] [issue20762] SSLSocket.read() not documented In-Reply-To: <1393262503.02.0.956219773808.issue20762@psf.upfronthosting.co.za> Message-ID: <1393262784.6.0.257746007076.issue20762@psf.upfronthosting.co.za> R. David Murray added the comment: That's because SSLSocket is a wrapper around a regular socket, and the read method is documented in the Socket documentation. You will notice that *only* SSL specific methods are documented in the SSLSocket documentation. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 18:27:57 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Feb 2014 17:27:57 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393262877.01.0.780552526457.issue20727@psf.upfronthosting.co.za> Raymond Hettinger added the comment: It's a doc change only. Do you want it in the 3.4.0RC or in 3.4.1? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 18:29:10 2014 From: report at bugs.python.org (Larry Hastings) Date: Mon, 24 Feb 2014 17:29:10 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393262950.52.0.254864457921.issue20727@psf.upfronthosting.co.za> Larry Hastings added the comment: The patch attached to this issue has changes to Lib/test/test_itertools.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 18:30:58 2014 From: report at bugs.python.org (R. David Murray) Date: Mon, 24 Feb 2014 17:30:58 +0000 Subject: [docs] [issue20762] SSLSocket.read() not documented In-Reply-To: <1393262503.02.0.956219773808.issue20762@psf.upfronthosting.co.za> Message-ID: <1393263058.37.0.868677246292.issue20762@psf.upfronthosting.co.za> R. David Murray added the comment: Oops. My mistake. It's been too long since I did any socket programming :( ---------- resolution: invalid -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 18:35:25 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 24 Feb 2014 17:35:25 +0000 Subject: [docs] [issue20762] SSLSocket.read() not documented In-Reply-To: <1393262503.02.0.956219773808.issue20762@psf.upfronthosting.co.za> Message-ID: <1393263325.4.0.0685938236374.issue20762@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm, yeah, this is actually intended. The read() and write() methods on SSLSocket are not intended to be a public API: you should call send() or recv() instead. Ideally we would deprecate the read() and write() methods and rename the internal helpers to _read() and _write(). Christian, what do you think? ---------- nosy: +christian.heimes, pitrou versions: +Python 3.5 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 19:08:59 2014 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Feb 2014 18:08:59 +0000 Subject: [docs] [issue20740] Remove invalid number from squares in introduction section In-Reply-To: <1393139454.24.0.23441362157.issue20740@psf.upfronthosting.co.za> Message-ID: <1393265339.61.0.376589237883.issue20740@psf.upfronthosting.co.za> Mark Dickinson added the comment: That's not nitpicky! It's a potentially confusing error that should definitely be rectified. (Alternatively, we could redefine squares in Python. All other languages just have the regular squares; Python has a super *extra* square 2! That clearly makes squares in Python *better* than squares in other languages...) ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 19:50:17 2014 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 24 Feb 2014 18:50:17 +0000 Subject: [docs] [issue20740] Remove invalid number from squares in introduction section In-Reply-To: <1393139454.24.0.23441362157.issue20740@psf.upfronthosting.co.za> Message-ID: <1393267817.27.0.813181372495.issue20740@psf.upfronthosting.co.za> Martin v. L?wis added the comment: We should then declare that ? is a square, which would allow an easy solution to squaring a circle in Python ? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 19:53:44 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 24 Feb 2014 18:53:44 +0000 Subject: [docs] [issue20740] Remove invalid number from squares in introduction section In-Reply-To: <1393139454.24.0.23441362157.issue20740@psf.upfronthosting.co.za> Message-ID: <1393268024.64.0.356983442438.issue20740@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Python has a super *extra* square 2! And let's not forget about -1. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 20:00:00 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Feb 2014 19:00:00 +0000 Subject: [docs] [issue20740] Remove invalid number from squares in introduction section In-Reply-To: <1393139454.24.0.23441362157.issue20740@psf.upfronthosting.co.za> Message-ID: <3fXsz30t01z7NDg@mail.python.org> Roundup Robot added the comment: New changeset 151a498c55e3 by Ezio Melotti in branch '3.3': #20740: desquarify 2. http://hg.python.org/cpython/rev/151a498c55e3 New changeset 1bc585ba5df2 by Ezio Melotti in branch 'default': #20740: merge with 3.3. http://hg.python.org/cpython/rev/1bc585ba5df2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 20:01:42 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Feb 2014 19:01:42 +0000 Subject: [docs] [issue20740] Remove invalid number from squares in introduction section In-Reply-To: <1393139454.24.0.23441362157.issue20740@psf.upfronthosting.co.za> Message-ID: <1393268502.56.0.527487874762.issue20740@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 20:06:06 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Feb 2014 19:06:06 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393268766.56.0.95431640156.issue20501@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Can anyone please test the patch on Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 20:10:00 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Feb 2014 19:10:00 +0000 Subject: [docs] [issue20693] Sidebar scrolls down 2x as fast as page content In-Reply-To: <1392854470.16.0.730014647108.issue20693@psf.upfronthosting.co.za> Message-ID: <1393269000.63.0.97845223843.issue20693@psf.upfronthosting.co.za> Ezio Melotti added the comment: I can reproduce on tip with Sphinx v1.1.3; seems to work fine on 3.3 and tip with Sphinx v1.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 20:19:08 2014 From: report at bugs.python.org (Sean Rodman) Date: Mon, 24 Feb 2014 19:19:08 +0000 Subject: [docs] [issue20628] Improve doc for csv.DictReader 'fieldnames' parameter In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1393269548.21.0.280527068247.issue20628@psf.upfronthosting.co.za> Sean Rodman added the comment: Is there anything else that should be added to this patch? I don't mean to bug you guys just want to make sure that everything is right with it so that if and or when it is applied it will apply without any problems. Also, if there is anything else I should change I am definitely open to changing anything that is needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 20:47:22 2014 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Feb 2014 19:47:22 +0000 Subject: [docs] [issue20762] SSLSocket.read() not documented In-Reply-To: <1393262503.02.0.956219773808.issue20762@psf.upfronthosting.co.za> Message-ID: <1393271242.52.0.695991222558.issue20762@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 21:09:19 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 24 Feb 2014 20:09:19 +0000 Subject: [docs] [issue20749] shutil.unpack_archive(): security concerns not documented In-Reply-To: <1393190017.96.0.0939250007559.issue20749@psf.upfronthosting.co.za> Message-ID: <1393272559.53.0.355359546063.issue20749@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 21:37:25 2014 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Feb 2014 20:37:25 +0000 Subject: [docs] [issue20628] Improve doc for csv.DictReader 'fieldnames' parameter In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <3fXw7S0fBYz7NFM@mail.python.org> Roundup Robot added the comment: New changeset a5d4660c6cb6 by R David Murray in branch '3.3': #20628: make it clear that DictReader/Writer *fieldnames* is a Sequence. http://hg.python.org/cpython/rev/a5d4660c6cb6 New changeset 9f036047187b by R David Murray in branch '3.3': #20628: wrap lines to < 80. http://hg.python.org/cpython/rev/9f036047187b New changeset 5eb7e29df762 by R David Murray in branch 'default': Merge #20628: make it clear that DictReader/Writer *fieldnames* is a Sequence. http://hg.python.org/cpython/rev/5eb7e29df762 New changeset 0e77dd295a88 by R David Murray in branch '2.7': #20628: make it clear that DictReader/Writer *fieldnames* is a Sequence. http://hg.python.org/cpython/rev/0e77dd295a88 New changeset 0926adcc335c by R David Murray in branch '2.7': #20628: wrap lines to < 80. http://hg.python.org/cpython/rev/0926adcc335c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 21:39:10 2014 From: report at bugs.python.org (R. David Murray) Date: Mon, 24 Feb 2014 20:39:10 +0000 Subject: [docs] [issue20628] Improve doc for csv.DictReader 'fieldnames' parameter In-Reply-To: <1392399814.31.0.309043975377.issue20628@psf.upfronthosting.co.za> Message-ID: <1393274350.12.0.863515317023.issue20628@psf.upfronthosting.co.za> R. David Murray added the comment: Applied. Thanks, Sean. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 21:50:17 2014 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Feb 2014 20:50:17 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393275017.17.0.253897461661.issue20727@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Okay, after the RC then. David, would you like to be credited in the recipe? ---------- resolution: -> remind _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 22:06:09 2014 From: report at bugs.python.org (David Lindquist) Date: Mon, 24 Feb 2014 21:06:09 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393275969.16.0.995475798126.issue20727@psf.upfronthosting.co.za> David Lindquist added the comment: Sure. That would be nice. :) Thanks Raymond and Larry ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Feb 24 23:38:49 2014 From: report at bugs.python.org (Sean Rodman) Date: Mon, 24 Feb 2014 22:38:49 +0000 Subject: [docs] [issue20146] UserDict module docs link is obsolete In-Reply-To: <1389021583.36.0.157919967896.issue20146@psf.upfronthosting.co.za> Message-ID: <1393281529.26.0.796974760695.issue20146@psf.upfronthosting.co.za> Sean Rodman added the comment: Hey drunax, I would like to create a patch for this and upload, but I don't see the link you are talking about. Is it in the documentation or is it in the file UserDict.py? ---------- nosy: +sean.rodman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 01:41:37 2014 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Feb 2014 00:41:37 +0000 Subject: [docs] [issue20146] UserDict module docs link is obsolete In-Reply-To: <1389021583.36.0.157919967896.issue20146@psf.upfronthosting.co.za> Message-ID: <1393288897.26.0.288121515452.issue20146@psf.upfronthosting.co.za> Ned Deily added the comment: This problem is a duplicate of Issue16484. The URL is generated by pydoc's getdocloc() when you use pydoc explicitly or through the interactive interpreter's help command. But the doc web server is not set up to handle links for modules with mixed-case names, like UserDict; http://docs.python.org/2/library/userdict works. Sean, you can add yourself to Issue16484 if you'd like to help. ---------- nosy: +ned.deily resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 01:45:53 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 25 Feb 2014 00:45:53 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393289153.62.0.945952452474.issue20727@psf.upfronthosting.co.za> Gareth Rees added the comment: > benchmarks show it to be more than twice as fast I'm sure they do, but other benchmarks show it to be more than twice as slow. Try something like: iterables = [range(100)] + [()] * 100 ---------- nosy: +Gareth.Rees _______________________________________ Python tracker _______________________________________ From roman at us.ibm.com Mon Feb 24 23:45:14 2014 From: roman at us.ibm.com (Roman Chernobelskiy) Date: Mon, 24 Feb 2014 15:45:14 -0700 Subject: [docs] 2 bugs, 1 in python, 1 in tracker Message-ID: Hi, I found 2 bugs: 1) I am not able to register for an account on the bug tracker - it never sends me a confirmation email. 2) I would like to report this bug that I posted on stackoverflow: http://stackoverflow.com/questions/21194380/is-subprocess-popen-not-thread-safe Thank you, Roman -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Tue Feb 25 05:37:54 2014 From: report at bugs.python.org (Antony Lee) Date: Tue, 25 Feb 2014 04:37:54 +0000 Subject: [docs] [issue20765] Pathlib docs fail to mention with_name, with_suffix Message-ID: <1393303073.92.0.0729490655848.issue20765@psf.upfronthosting.co.za> New submission from Antony Lee: I actually thought that Path.with_{name,suffix} had been removed before 3.4 when I didn't find them in the official docs... ---------- assignee: docs at python components: Documentation messages: 212160 nosy: Antony.Lee, docs at python priority: normal severity: normal status: open title: Pathlib docs fail to mention with_name, with_suffix versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 06:16:51 2014 From: report at bugs.python.org (David Lindquist) Date: Tue, 25 Feb 2014 05:16:51 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393305411.04.0.513276484335.issue20727@psf.upfronthosting.co.za> David Lindquist added the comment: > other benchmarks show it to be more than twice as slow Can you share the method you used to get those results? Here's what I did: $ python -m timeit --number=1000000 --setup="from rr_mine import roundrobin" "its = ['ABC', 'D', 'EF']; list(roundrobin(*its))" 1000000 loops, best of 3: 6.59 usec per loop $ python -m timeit --number=1000000 --setup="from rr_theirs import roundrobin" "its = ['ABC', 'D', 'EF']; list(roundrobin(*its))" 1000000 loops, best of 3: 14.4 usec per loop Using your recommended iterables (reducing the number of executions so it completes in my lifetime), the results are much closer, but my version still edges out the original: $ python -m timeit --number=10000 --setup="from rr_mine import roundrobin" "its = [range(100)] + [()] * 100; list(roundrobin(*its))" 10000 loops, best of 3: 641 usec per loop $ python -m timeit --number=10000 --setup="from rr_theirs import roundrobin" "its = [range(100)] + [()] * 100; list(roundrobin(*its))" 10000 loops, best of 3: 699 usec per loop ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 06:52:08 2014 From: report at bugs.python.org (Yury Selivanov) Date: Tue, 25 Feb 2014 05:52:08 +0000 Subject: [docs] [issue20765] Pathlib docs fail to mention with_name, with_suffix In-Reply-To: <1393303073.92.0.0729490655848.issue20765@psf.upfronthosting.co.za> Message-ID: <1393307528.83.0.826973881284.issue20765@psf.upfronthosting.co.za> Changes by Yury Selivanov : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 11:30:57 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 25 Feb 2014 10:30:57 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393324257.2.0.527291794804.issue20727@psf.upfronthosting.co.za> Gareth Rees added the comment: If 100 doesn't work for you, try a larger number. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 11:55:04 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 25 Feb 2014 10:55:04 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393325704.79.0.90476063878.issue20727@psf.upfronthosting.co.za> Gareth Rees added the comment: I suspect I messed up the timing I did yesterday, because today I find that 100 isn't large enough, but here's what I found today (in Python 3.3): >>> from timeit import timeit >>> test = [tuple(range(300))] + [()] * 100 >>> timeit(lambda:list(roundrobin1(*test)), number=10000) # old recipe 8.386148632998811 >>> timeit(lambda:list(roundrobin2(*test)), number=10000) # new recipe 16.757110453007044 The new recipe is more than twice as slow as the old in this case, and its performance gets relatively worse as you increase the number 300. I should add that I do recognise that the new recipe is better for nearly all cases (it's simpler as well as faster), but I want to point out an important feature of the old recipe, namely that it discards iterables as they are finished with, giving it worst-case O(n) performance (albeit slow) whereas the new recipe has worst case O(n^2). As we found out with hash tables, worst-case O(n^2) performance can be a problem when inputs are untrusted, so there are use cases where people might legitimately prefer an O(n) solution even if it's a bit slower in common cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 13:09:53 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 25 Feb 2014 12:09:53 +0000 Subject: [docs] [issue20765] Pathlib docs fail to mention with_name, with_suffix In-Reply-To: <1393303073.92.0.0729490655848.issue20765@psf.upfronthosting.co.za> Message-ID: <1393330193.11.0.183422679983.issue20765@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Interesting. According to the Mercurial logs, they were never actually documented... ---------- assignee: docs at python -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 14:04:15 2014 From: report at bugs.python.org (Gareth Rees) Date: Tue, 25 Feb 2014 13:04:15 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393333455.28.0.523637259087.issue20727@psf.upfronthosting.co.za> Gareth Rees added the comment: But now that I look at the code more carefully, the old recipe also has O(n^2) behaviour, because cycle(islice(nexts, pending)) costs O(n) and is called O(n) times. To have worst-case O(n) behaviour, you'd need something like this: from collections import deque def roundrobin3(*iterables): "roundrobin('ABC', 'D', 'EF') --> A D E B F C" nexts = deque(iter(it).__next__ for it in iterables) while nexts: try: while True: yield nexts[0]() nexts.rotate(-1) except StopIteration: nexts.popleft() >>> from timeit import timeit >>> test = [tuple(range(1000))] + [()] * 1000 >>> timeit(lambda:list(roundrobin1(*test)), number=100) # old recipe 5.184364624001319 >>> timeit(lambda:list(roundrobin2(*test)), number=100) # new recipe 5.139592286024708 >>> timeit(lambda:list(roundrobin3(*test)), number=100) 0.16217014100402594 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 16:05:13 2014 From: report at bugs.python.org (David Lindquist) Date: Tue, 25 Feb 2014 15:05:13 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393340713.22.0.051291776611.issue20727@psf.upfronthosting.co.za> David Lindquist added the comment: Thanks Gareth for your analysis. Very informative! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 17:23:55 2014 From: report at bugs.python.org (Roy Smith) Date: Tue, 25 Feb 2014 16:23:55 +0000 Subject: [docs] [issue20769] Reload() description is unclear Message-ID: <1393345435.57.0.757218905385.issue20769@psf.upfronthosting.co.za> New submission from Roy Smith: http://docs.python.org/2/library/functions.html#reload says: It is legal though generally not very useful to reload built-in or dynamically loaded modules, except for sys, __main__ and __builtin__. It is unclear what the "except for ..." part is referring to. Is it not legal to reload those modules? Or is it not very useful to reload them? ---------- assignee: docs at python components: Documentation messages: 212187 nosy: docs at python, roysmith priority: normal severity: normal status: open title: Reload() description is unclear versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 19:50:28 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 25 Feb 2014 18:50:28 +0000 Subject: [docs] [issue20769] Reload() description is unclear In-Reply-To: <1393345435.57.0.757218905385.issue20769@psf.upfronthosting.co.za> Message-ID: <1393354228.18.0.71387773386.issue20769@psf.upfronthosting.co.za> R. David Murray added the comment: The python3 docs say: It is legal though generally not very useful to reload built-in or dynamically loaded modules (this is not true for e.g. sys, __main__, builtins and other key modules where reloading is frowned upon). "So, it is the former...sort of. You don't get an error when you reload them, so implying that it is not "legal" is an odd phrasing. Probably that sentence should be clarified in both the python2 and python3 docs." ---------- nosy: +brett.cannon, eric.smith, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 19:51:22 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 25 Feb 2014 18:51:22 +0000 Subject: [docs] [issue20769] Reload() description is unclear In-Reply-To: <1393345435.57.0.757218905385.issue20769@psf.upfronthosting.co.za> Message-ID: <1393354282.78.0.593019868465.issue20769@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- Removed message: http://bugs.python.org/msg212197 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 19:52:03 2014 From: report at bugs.python.org (R. David Murray) Date: Tue, 25 Feb 2014 18:52:03 +0000 Subject: [docs] [issue20769] Reload() description is unclear In-Reply-To: <1393345435.57.0.757218905385.issue20769@psf.upfronthosting.co.za> Message-ID: <1393354323.47.0.388548051964.issue20769@psf.upfronthosting.co.za> R. David Murray added the comment: The python3 docs say: "It is legal though generally not very useful to reload built-in or dynamically loaded modules (this is not true for e.g. sys, __main__, builtins and other key modules where reloading is frowned upon)." So, it is the former...sort of. You don't get an error when you reload them, so implying that it is not "legal" is an odd phrasing. Probably that sentence should be clarified in both the python2 and python3 docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 20:32:31 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 25 Feb 2014 19:32:31 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393356750.96.0.0764762769269.issue20501@psf.upfronthosting.co.za> Zachary Ware added the comment: > Can anyone please test the patch on Windows? It seems to work; memory usage is much lower with the patch than without using an 8 MB file. I don't notice any behavioral change with the patch; if there's anything specific to look for on that front, give me a test script in either English or Python :) ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 20:33:09 2014 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Feb 2014 19:33:09 +0000 Subject: [docs] [issue20765] Pathlib docs fail to mention with_name, with_suffix In-Reply-To: <1393303073.92.0.0729490655848.issue20765@psf.upfronthosting.co.za> Message-ID: <3fYVfr3lVxzSDC@mail.python.org> Roundup Robot added the comment: New changeset 879861161b84 by Antoine Pitrou in branch 'default': Issue #20765: Add missing documentation for PurePath.with_name() and PurePath.with_suffix(). http://hg.python.org/cpython/rev/879861161b84 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 20:33:44 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 25 Feb 2014 19:33:44 +0000 Subject: [docs] [issue20765] Pathlib docs fail to mention with_name, with_suffix In-Reply-To: <1393303073.92.0.0729490655848.issue20765@psf.upfronthosting.co.za> Message-ID: <1393356824.84.0.255878029908.issue20765@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've now added the missing doc entries. Thanks for reporting! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior versions: +Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 22:36:09 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Feb 2014 21:36:09 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393364169.41.0.265524874881.issue20501@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Zachary. Here is a patch with a test. I'm not sure that it is successful on Windows. ---------- Added file: http://bugs.python.org/file34222/fileinput_hook_encoded_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 22:50:13 2014 From: report at bugs.python.org (Zachary Ware) Date: Tue, 25 Feb 2014 21:50:13 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393365013.28.0.689690627931.issue20501@psf.upfronthosting.co.za> Zachary Ware added the comment: The new test passes on Windows with the whole patch applied, but fails without the changes to fileinput.py. Is this change meant to fix behavior, or just the memory usage issue? Just for completeness, here's the failure output (with unpatched fileinput.py): ====================================================================== FAIL: test_modes (__main__.Test_hook_encoded) ---------------------------------------------------------------------- Traceback (most recent call last): File "P:\ath\to\2.7\cpython\lib\test\test_fileinput.py", line 235, in test_modes check('r', [u'A\n', u'B\r\n', u'C\rD\u20ac']) File "P:\ath\to\2.7\cpython\lib\test\test_fileinput.py", line 233, in check self.assertEqual(lines, expected_lines) AssertionError: Lists differ: [u'A\n', u'B\r\n', u'C\r', u'D... != [u'A\n', u'B\r\n', u'C\rD\u20a... First differing element 2: C D\u20ac First list contains 1 additional elements. First extra element 3: D\u20ac - [u'A\n', u'B\r\n', u'C\r', u'D\u20ac'] ? ----- + [u'A\n', u'B\r\n', u'C\rD\u20ac'] ---------------------------------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Feb 25 23:01:10 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 25 Feb 2014 22:01:10 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393365670.82.0.296218829362.issue20501@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What would be the failure output when comment out first 1, 2 or three checks? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 07:20:06 2014 From: report at bugs.python.org (Pavel Kazakov) Date: Wed, 26 Feb 2014 06:20:06 +0000 Subject: [docs] [issue20740] Remove invalid number from squares in introduction section In-Reply-To: <1393139454.24.0.23441362157.issue20740@psf.upfronthosting.co.za> Message-ID: <1393395606.42.0.519791617175.issue20740@psf.upfronthosting.co.za> Pavel Kazakov added the comment: > (Alternatively, we could redefine squares in Python. All other languages just have the regular squares; Python has a super *extra* square 2! That clearly makes squares in Python *better* than squares in other languages...) Heh. I initially wasn't sure if I was just missing a super fancy feauture of Python, but I eventually concluded the 2 probably wasn't supposed to be there. In the name of making Python better, since ? and -1 have already been proposed as additional squares, I vote for including the constant e as well. > Fixed, thanks for the report and the patch! Great! Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 16:08:28 2014 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Feb 2014 15:08:28 +0000 Subject: [docs] [issue20782] base64 module docs do not use the terms 'bytes' and 'string' consistently. Message-ID: <1393427308.42.0.0461164572304.issue20782@psf.upfronthosting.co.za> New submission from R. David Murray: The base64 documentation (http://docs.python.org/3/library/base64.html) does not use the new python3 byte/string terminology consistently (sometimes not even within the same paragraph). ---------- assignee: docs at python components: Documentation messages: 212258 nosy: docs at python, r.david.murray priority: normal severity: normal stage: needs patch status: open title: base64 module docs do not use the terms 'bytes' and 'string' consistently. type: behavior versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 16:30:19 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 26 Feb 2014 15:30:19 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393428619.07.0.374601173773.issue20501@psf.upfronthosting.co.za> Zachary Ware added the comment: Output attached. ---------- Added file: http://bugs.python.org/file34231/20501.output _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 16:39:05 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Feb 2014 15:39:05 +0000 Subject: [docs] [issue20759] unittest.mock documentation typos In-Reply-To: <1393234752.67.0.021930442298.issue20759@psf.upfronthosting.co.za> Message-ID: <3fZ1QJ64pyz7LjX@mail.python.org> Roundup Robot added the comment: New changeset 045f048cc116 by Zachary Ware in branch '3.3': Issue #20759: Fix some typos in the mock docs. http://hg.python.org/cpython/rev/045f048cc116 New changeset 42ef1c82d645 by Zachary Ware in branch 'default': Close #20759: Fix some typos in the mock docs. (Merge with 3.3) http://hg.python.org/cpython/rev/42ef1c82d645 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 16:39:47 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 26 Feb 2014 15:39:47 +0000 Subject: [docs] [issue20759] unittest.mock documentation typos In-Reply-To: <1393234752.67.0.021930442298.issue20759@psf.upfronthosting.co.za> Message-ID: <1393429187.33.0.930883343271.issue20759@psf.upfronthosting.co.za> Zachary Ware added the comment: Thanks for the report! ---------- assignee: docs at python -> zach.ware nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From zachary.ware+pydocs at gmail.com Wed Feb 26 17:43:01 2014 From: zachary.ware+pydocs at gmail.com (Zachary Ware) Date: Wed, 26 Feb 2014 10:43:01 -0600 Subject: [docs] a documentation bug report In-Reply-To: References: Message-ID: On Thu, Feb 13, 2014 at 9:49 AM, tomo cocoa wrote: > Hello, > > I'm a Japanese Pythonista and a translator of Python documents. > > I found a miscellaneous doc bug. > > The explanation for PyErr_SyntaxLocation > (http://docs.python.org/3/c-api/exceptions.html#PyErr_SyntaxLocation) has a > reference for 'PyErr_SyntaxLocationEx', > but it is misspelled as 'PyErr_SyntaxLocationExc'. Thanks for the report, this is now fixed. -- Zach From zachary.ware+pydocs at gmail.com Wed Feb 26 17:43:10 2014 From: zachary.ware+pydocs at gmail.com (Zachary Ware) Date: Wed, 26 Feb 2014 10:43:10 -0600 Subject: [docs] a parameter name suggestion In-Reply-To: References: Message-ID: On Thu, Feb 13, 2014 at 12:03 PM, tomo cocoa wrote: > Hello, > > I'm a Japanese translator for Python documents. > > http://docs.python.org/3.3/c-api/exceptions.html#PyException_SetCause > > In the documentation about PyException_SetCause, > its second argument is named 'ctx', > while this argument represent a 'cause'. > It should be named 'cause' to avoid confusion. Thanks for the report! The actual code uses 'cause' as well, so this has been fixed to match. -- Zach From zachary.ware+pydocs at gmail.com Wed Feb 26 17:43:16 2014 From: zachary.ware+pydocs at gmail.com (Zachary Ware) Date: Wed, 26 Feb 2014 10:43:16 -0600 Subject: [docs] mistyping on a document In-Reply-To: References: Message-ID: On Tue, Feb 18, 2014 at 1:01 PM, tomo cocoa wrote: > Hello, > > I am a Japanese translator on Python documents. > > The character "i" on the tail of the PyModule_GetDef description may be > mistyped. > > http://docs.python.org/3.3/c-api/module.html#PyModule_GetDef Thanks for the report, this has now been fixed. -- Zach From zachary.ware+pydocs at gmail.com Wed Feb 26 17:43:24 2014 From: zachary.ware+pydocs at gmail.com (Zachary Ware) Date: Wed, 26 Feb 2014 10:43:24 -0600 Subject: [docs] typo in the type object document In-Reply-To: References: Message-ID: On Thu, Feb 20, 2014 at 9:26 AM, tomo cocoa wrote: > Hello, > > I'm a Japanese translator of Python documents. > > I found a typo on > http://docs.python.org/3.3/c-api/typeobj.html#PyTypeObject.tp_print > > A sentence "the instance should be printed the same was as" should be "the > instance should be printed the same way as". Thanks for the report, this has now been fixed. -- Zach From zachary.ware+pydocs at gmail.com Wed Feb 26 17:43:47 2014 From: zachary.ware+pydocs at gmail.com (Zachary Ware) Date: Wed, 26 Feb 2014 10:43:47 -0600 Subject: [docs] maybe a typo? In-Reply-To: References: Message-ID: On Thu, Feb 20, 2014 at 8:23 PM, tomo cocoa wrote: > Hello, > > I am a Japanese translator of Python documents. > > In an explanation of tp_print > (http://docs.python.org/3.3/c-api/typeobj.html#PyTypeObject.tp_print), > the third paragraph contains words "when an error occurred during the > comparison". > > What does the word "comparison" mean? > May tp_print functions contain a comparing operation? > Otherwise, it is typo, and should be replaced with an other word, for > example, "serialization"? Thanks for the report! Best I can tell, it's a typo. To make this simpler, I just removed that clause from the end of the sentence. It now ends "when an error occurs." -- Zach From report at bugs.python.org Wed Feb 26 18:15:02 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Feb 2014 17:15:02 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393434902.61.0.775731301936.issue20501@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Same as on Linux (and differs from 3.x). Thank you Zachary. Here is corrected patch. Added also a test which tests that readline() doesn't read whole file. ---------- Added file: http://bugs.python.org/file34232/fileinput_hook_encoded_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 18:24:32 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Feb 2014 17:24:32 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393435472.25.0.450198435523.issue20501@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file33934/fileinput_hook_encoded.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 18:29:55 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Feb 2014 17:29:55 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393435795.66.0.957299524278.issue20501@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file34222/fileinput_hook_encoded_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 19:00:35 2014 From: report at bugs.python.org (Zachary Ware) Date: Wed, 26 Feb 2014 18:00:35 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393437635.05.0.0236067752141.issue20501@psf.upfronthosting.co.za> Zachary Ware added the comment: New patch passes on Windows. Without the patch to fileinput.py, the new hook_encoded tests pass and the new test_readline test fails (as expected). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 20:05:27 2014 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Feb 2014 19:05:27 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <3fZ60Q32YpzRYc@mail.python.org> Roundup Robot added the comment: New changeset 1a1a9d6fb278 by Serhiy Storchaka in branch '2.7': Issue #20501: fileinput module no longer reads whole file into memory when using http://hg.python.org/cpython/rev/1a1a9d6fb278 New changeset b4a139713b3b by Serhiy Storchaka in branch '3.3': Added tests for issue #20501. http://hg.python.org/cpython/rev/b4a139713b3b New changeset 1a38fa1f701d by Serhiy Storchaka in branch 'default': Added tests for issue #20501. http://hg.python.org/cpython/rev/1a38fa1f701d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 20:13:25 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Feb 2014 19:13:25 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393442005.78.0.210687363282.issue20501@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you Zachary that ran tests for me. Thank you Gunnar for your report. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 20:13:50 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Feb 2014 19:13:50 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393442030.14.0.935755204719.issue20501@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Feb 26 23:27:38 2014 From: report at bugs.python.org (akira) Date: Wed, 26 Feb 2014 22:27:38 +0000 Subject: [docs] [issue20787] typo in asyncio docs for subprocess_exec() Message-ID: <1393453658.86.0.247755965136.issue20787@psf.upfronthosting.co.za> New submission from akira: subprocess' stdout pipe is open for *reading* but its value is documented as an argument for `BaseEventLoop.connect_write_pipe`. It should be `BaseEventLoop.connect_read_pipe` instead. As it currently is for subprocess' stderr. The patch is attached. ---------- assignee: docs at python components: Documentation files: typo-subprocess_exec-docs.patch keywords: patch messages: 212316 nosy: akira, docs at python priority: normal severity: normal status: open title: typo in asyncio docs for subprocess_exec() versions: Python 3.4 Added file: http://bugs.python.org/file34235/typo-subprocess_exec-docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 27 03:28:14 2014 From: report at bugs.python.org (Vajrasky Kok) Date: Thu, 27 Feb 2014 02:28:14 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393468094.53.0.2564100873.issue20501@psf.upfronthosting.co.za> Vajrasky Kok added the comment: >From http://hg.python.org/cpython/rev/1a1a9d6fb278 + t1 = TESTFN + #t1 = writeTmp(1, ['A\nB\r\nC\rD+IKw-'], mode='wb') + self.addCleanup(safe_unlink, TESTFN) You left out the debugging statement. And this English statement: # Unlikely UTF-7 is locale encoding could be made clearer. Does it mean: "UTF-7 is an unlikely locale encoding"? ---------- nosy: +vajrasky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 27 15:42:52 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 27 Feb 2014 14:42:52 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393512172.01.0.661777275097.issue20501@psf.upfronthosting.co.za> Zachary Ware added the comment: Agreed with Vajrasky, the 2.7 commit wasn't as clean as it could be (sorry I didn't get an actual review done before you committed, I posted my last test results in a bit of a hurry). The commented out line should either be removed, or used instead of the 'with' block above it. I would actually vote for using writeTmp, and make a new issue for making writeTmp use a context manager. Also, I think the new test_readline could be made a little clearer by putting + fi = FileInput(files=TESTFN, openhook=hook_encoded('ascii'), bufsize=8) + self.assertEqual(fi.readline(), u'A\n') + self.assertEqual(fi.readline(), u'B\r\n') + self.assertEqual(fi.readline(), u'C\r') inside a `try ... except UnicodeDecodeError: self.fail('Read to end of file')` block. ---------- _______________________________________ Python tracker _______________________________________ From cocoatomo77 at gmail.com Thu Feb 27 03:55:16 2014 From: cocoatomo77 at gmail.com (tomo cocoa) Date: Thu, 27 Feb 2014 11:55:16 +0900 Subject: [docs] maybe typo in C-API/type object Message-ID: Hello, I'am a Japanese translator for Python documents. In the PyTypeObject.tp_dictoffset explanation, the 6th paragraph contains a sentence "Since the dictionary is always found via tp_dictoffset". But this may be "Since the dictionary offset is always found via tp_dictoffset". http://docs.python.org/3.3/c-api/typeobj.html#PyTypeObject.tp_dictoffset Thank you, cocoatomo -- class Cocoatomo: name = 'cocoatomo' email_address = 'cocoatomo77 at gmail.com' twitter_id = '@cocoatomo' -------------- next part -------------- An HTML attachment was scrubbed... URL: From lidwinevanas at gmail.com Thu Feb 27 09:54:35 2014 From: lidwinevanas at gmail.com (Lidwine van As) Date: Thu, 27 Feb 2014 09:54:35 +0100 Subject: [docs] dutch python tutorial Message-ID: <6493FBEE-7615-404E-B63E-E5F868DD19B0@gmail.com> Dear sir, madam, I am the translator of the dutch version of the Python tutorial, and have maintained it online at www.coolpython.nl for a number of years now. For several reasons I have to stop maintaining it, and have taken the site offline. Would you be interested in receiving the files for the translation, in order to keep it available for the dutch audience? At no cost of course (other than stating my name in it as the translator). I'm looking forward to hearing from you; also, please let me know if you think I should direct my question elsewhere. Best regards, Lidwine van As From report at bugs.python.org Thu Feb 27 18:22:32 2014 From: report at bugs.python.org (Berker Peksag) Date: Thu, 27 Feb 2014 17:22:32 +0000 Subject: [docs] [issue20620] Update the min()/max() docs for the new default argument In-Reply-To: <1392322129.66.0.847659571757.issue20620@psf.upfronthosting.co.za> Message-ID: <1393521752.13.0.936027312539.issue20620@psf.upfronthosting.co.za> Berker Peksag added the comment: Updated patch adressing Larry's comment. I also fixed a typo in the max() documentation. Thanks! ---------- stage: -> patch review Added file: http://bugs.python.org/file34248/issue20620_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Feb 27 20:46:15 2014 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 27 Feb 2014 19:46:15 +0000 Subject: [docs] [issue19940] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC In-Reply-To: <1386660552.46.0.291263983729.issue19940@psf.upfronthosting.co.za> Message-ID: <1393530375.2.0.820233804851.issue19940@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Akira, thanks. I have posted a review; if you haven't received the e-mail notification, you can still access it at http://bugs.python.org/review/19940/#ps11142 ---------- stage: needs patch -> patch review versions: +Python 3.5 -Python 3.4 _______________________________________ Python tracker _______________________________________ From pitrou at free.fr Thu Feb 27 20:44:43 2014 From: pitrou at free.fr (pitrou at free.fr) Date: Thu, 27 Feb 2014 19:44:43 -0000 Subject: [docs] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC (issue 19940) Message-ID: <20140227194443.22693.50426@psf.upfronthosting.co.za> Here are a couple comments on the patch. Since those are mostly cosmetic, I'll fix them myself if you don't want to provide another patch. Thank you! http://bugs.python.org/review/19940/diff/11142/Doc/library/ssl.rst File Doc/library/ssl.rst (right): http://bugs.python.org/review/19940/diff/11142/Doc/library/ssl.rst#newcode379 Doc/library/ssl.rst:379: "notBefore" or "notAfter" dates must use GMT (:rfc:`3280`). It seems RFC 3280 was superseded by RFC 5280? http://bugs.python.org/review/19940/diff/11142/Lib/test/test_ssl.py File Lib/test/test_ssl.py (right): http://bugs.python.org/review/19940/diff/11142/Lib/test/test_ssl.py#newcode654 Lib/test/test_ssl.py:654: class UtilityTests(unittest.TestCase): The tests can go in BasicSocketTests, which already has many tests for module-level utilities. http://bugs.python.org/review/19940/diff/11142/Lib/test/test_ssl.py#newcode656 Lib/test/test_ssl.py:656: def good(self, timestring, timestamp): As a matter of naming, I would prefer something more explicit than "good". "cert_time_ok" perhaps? http://bugs.python.org/review/19940/diff/11142/Lib/test/test_ssl.py#newcode659 Lib/test/test_ssl.py:659: def bad(self, timestring): Same here. http://bugs.python.org/review/19940/diff/11142/Lib/test/test_ssl.py#newcode663 Lib/test/test_ssl.py:663: @unittest.skipUnless(utc_offset(), I don't understand the skip. The test will work even if the local time is UTC. (be assured that most computers running the tests, even our buildbots, won't be set on an UTC timezone anyway) http://bugs.python.org/review/19940/diff/11142/Lib/test/test_ssl.py#newcode705 Lib/test/test_ssl.py:705: locale.setlocale(locale.LC_TIME, 'pl_PL.utf8') To maximize chances that the test is run, you could simply set the locale to locale.getdefaultlocale(). Below, you can use the result of `time.strftime('%b %d %H:%M:%S %Y GMT')` instead of the hardcoded Polish time string. http://bugs.python.org/review/19940/ From report at bugs.python.org Thu Feb 27 22:05:05 2014 From: report at bugs.python.org (Zachary Ware) Date: Thu, 27 Feb 2014 21:05:05 +0000 Subject: [docs] [issue20265] Bring Doc/using/windows up to date In-Reply-To: <1389757265.26.0.116885263001.issue20265@psf.upfronthosting.co.za> Message-ID: <1393535105.02.0.27808310254.issue20265@psf.upfronthosting.co.za> Zachary Ware added the comment: Windows 8 (or at least 8.1) doesn't seem to be too far off from the directions on that site. If you're proficient enough to change an environment variable in Windows 7, chances are good you can figure it out on Windows 8(.1). If you're not, chances are good you probably shouldn't :) Either way, I think that these days giving instructions on how to set an environment variable is beyond the scope of the Python documentation. We ought to just say "here's the environment variables that Python cares about, and here's what they do" and leave the instructions for setting them to other sites. We might link to some site deemed to have good instructions, but keeping them inline means trying to keep them updated, which has apparently not gone well :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 28 13:33:25 2014 From: report at bugs.python.org (Geoffrey Spear) Date: Fri, 28 Feb 2014 12:33:25 +0000 Subject: [docs] [issue20806] os.times document points to wrong section of non-Linux manual Message-ID: <1393590805.13.0.860460942185.issue20806@psf.upfronthosting.co.za> New submission from Geoffrey Spear: The documentation for os.times directs the reader: "See the Unix manual page times(2) or the corresponding Windows Platform API documentation." However, the POSIX manual page in question is times(3P), and on OS X and BSD systems it's times(3). Falling back to "man times" without specifying a manual section also doesn't work, since this finds the bash builtin rather than the library function. ---------- assignee: docs at python components: Documentation messages: 212424 nosy: docs at python, geoffreyspear priority: normal severity: normal status: open title: os.times document points to wrong section of non-Linux manual versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 28 15:44:57 2014 From: report at bugs.python.org (R. David Murray) Date: Fri, 28 Feb 2014 14:44:57 +0000 Subject: [docs] [issue20806] os.times document points to wrong section of non-Linux manual In-Reply-To: <1393590805.13.0.860460942185.issue20806@psf.upfronthosting.co.za> Message-ID: <1393598697.08.0.996512512947.issue20806@psf.upfronthosting.co.za> R. David Murray added the comment: section 2 is the linux man page (system calls). On the other hand, on a freebsd 6.4 system I have access to, 'man times' does show the man 3 page. Since linux normally ships with the posix man pages as well, we should probably change the the section reference to 3p. I also notice that os/2 is mentioned in the python3 entry for os.times, but os/2 is no longer supported. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 28 18:18:01 2014 From: report at bugs.python.org (Chris Rebert) Date: Fri, 28 Feb 2014 17:18:01 +0000 Subject: [docs] [issue20727] Improved roundrobin itertools recipe In-Reply-To: <1393051018.22.0.696460210134.issue20727@psf.upfronthosting.co.za> Message-ID: <1393607881.14.0.137481789256.issue20727@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 28 22:26:12 2014 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Feb 2014 21:26:12 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393622772.5.0.357776427536.issue20501@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: My bad. I had cleaned patch before committing to 3.x, but forgot to revert and correct it in 2.7. Thank you Vajrasky an Zachary. > Does it mean: "UTF-7 is an unlikely locale encoding"? Sorry for my bad English. I meant that UTF-7 is used here because it is unlikely that it is locale encoding. Is "an" needed here? > I would actually vote for using writeTmp, and make a new issue for making writeTmp use a context manager. I think that explicit two-line code is better than calling superfluous function. We don't need generated filename, we write only one chunk of code, we use context manager, so the code is only two lines long. > inside a `try ... except UnicodeDecodeError: self.fail('Read to end of file')` block. May be, but in 2.7 a traceback doesn't contain info about original exception and this can hide necessary details in case of failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Feb 28 23:22:39 2014 From: report at bugs.python.org (Zachary Ware) Date: Fri, 28 Feb 2014 22:22:39 +0000 Subject: [docs] [issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded In-Reply-To: <1391437653.41.0.935040025319.issue20501@psf.upfronthosting.co.za> Message-ID: <1393626159.76.0.333127125249.issue20501@psf.upfronthosting.co.za> Zachary Ware added the comment: For the UTF-7 comment, I'd go with something like "locale encoding is probably not UTF-7" or "UTF-7 is a convenient, seldom used encoding", or something to that effect. About writeTmp vs. context manager: as you wish. It would still be good to convert writeTmp to use a context manager though, but that is a separate issue. Just cleaning up 2.7 to match 3.x is enough to make me happy :) For the explicit failure message, perhaps the best we can do in 2.7 is a comment saying that the most likely failure is a UnicodeDecodeError due to the entire file being read when it shouldn't have been. That can be deduced from the separate comments you already have there (and especially from the issue link), but I think it may be better to just come right out and say it. If exception chaining means the original exception is kept with a self.fail call in 3.x, I think 3.x should get the explicit failure message, though. I don't feel too strongly about it, though; I'll leave it to you to change or not as you like :) ---------- _______________________________________ Python tracker _______________________________________